Skip to content

Commit

Permalink
chore: 🐝 Update SDK - Generate 0.19.0 (#136)
Browse files Browse the repository at this point in the history
> [!IMPORTANT]
> Linting report available at:
<https://app.speakeasy.com/org/unstructured/unstructured5xr/linting-report/824b9f90ba7196da07c221cb7f0d71e6>
> OpenAPI Change report available at:
<https://app.speakeasy.com/org/unstructured/unstructured5xr/changes-report/b702fa86d0b84d9997084bd5d9b34d74>
# SDK update
Based on:
- OpenAPI Doc  
- Speakeasy CLI 1.468.6 (2.493.13)
https://github.com/speakeasy-api/speakeasy
## Versioning

Version Bump Type: [minor] - 🤖 (automated)
## OpenAPI Change Summary


```
├─┬Info
│ └──[🔀] version (5:16)
├─┬Paths
│ └─┬/general/v0/general
│   └─┬POST
│     └─┬Responses
│       └─┬200
│         ├──[➕] content (76:27)
│         └─┬application/json
│           └─┬Schema
│             └─┬Extensions
│               └──[➕] x-speakeasy-name-override (73:48)
└─┬Components
  ├──[➕] schemas (526:22)
  └─┬partition_parameters
    ├──[➕] properties (337:11)
    ├─┬strategy
    │ └──[➕] enum (326:15)
    └─┬unique_element_ids
      └──[🔀] title (352:22)
```

| Document Element | Total Changes | Breaking Changes |
|------------------|---------------|------------------|
| components       | 4             | 0                |
| info             | 1             | 0                |
| paths            | 2             | 0                |



## TYPESCRIPT CHANGELOG
## sdkHooks: 0.2.0 - 2024-11-02
### 🐝 New Features
- allow hooks to trigger retries *(commit by
[@disintegrator](https://github.com/disintegrator))*



## envVarSecurityUsage: 0.1.2 - 2024-11-04
### 🐛 Bug Fixes
- speakeasy examples override default strings *(commit by
[@ryan-timothy-albert](https://github.com/ryan-timothy-albert))*



## examples: 2.81.5 - 2025-01-08
### 🐛 Bug Fixes
- prevent map examples from retaining obsolete key-value pairs *(commit
by [@2ynn](https://github.com/2ynn))*



## acceptHeaders: 2.81.2 - 2024-04-30
### 🐛 Bug Fixes
- compute accept types from success responses *(commit by
[@disintegrator](https://github.com/disintegrator))*



## globalSecurity: 2.82.12 - 2024-12-23
### 🐛 Bug Fixes
- remove default basic auth username / password *(commit by
[@disintegrator](https://github.com/disintegrator))*



## core: 3.18.14 - 2025-01-13
### 🐛 Bug Fixes
- skip null and undefined parameter values during serialization *(commit
by [@disintegrator](https://github.com/disintegrator))*



## core: 3.18.13 - 2025-01-13
### 🐛 Bug Fixes
- avoid setting `Content-Type: */*` request header for relevant
operations *(commit by
[@disintegrator](https://github.com/disintegrator))*



## core: 3.18.12 - 2024-12-19
### 🔧 Chores
- bump typescript transpilation target to ES2020 *(commit by
[@mfbx9da4](https://github.com/mfbx9da4))*



## core: 3.18.11 - 2024-12-16
### 🐛 Bug Fixes
- flattening with hidden parameters *(commit by
[@mfbx9da4](https://github.com/mfbx9da4))*



## core: 3.18.10 - 2024-12-13
### 🐛 Bug Fixes
- Support OAS references under multipart/form-data file properties
*(commit by [@bflad](https://github.com/bflad))*



## core: 3.18.9 - 2024-12-06
### 🐛 Bug Fixes
- support property names solely comprised of illegal characters *(commit
by [@mfbx9da4](https://github.com/mfbx9da4))*



## core: 3.18.8 - 2024-11-28
### 🐛 Bug Fixes
- add arguments to variable name exclusion list to avoid shadowing
errors *(commit by
[@TristanSpeakEasy](https://github.com/tristanspeakeasy))*



## core: 3.18.7 - 2024-11-22
### 🐛 Bug Fixes
- handle circular references through unions correctly *(commit by
[@disintegrator](https://github.com/disintegrator))*



## core: 3.18.6 - 2024-11-19
### 🐛 Bug Fixes
- detect import cycles between models living in different modules
*(commit by [@disintegrator](https://github.com/disintegrator))*



## core: 3.18.5 - 2024-11-15
### 🐛 Bug Fixes
- handling of raw buffers when deserialzing into zod types *(commit by
[@TristanSpeakEasy](https://github.com/tristanspeakeasy))*



## core: 3.18.4 - 2024-11-12
### 🐛 Bug Fixes
- sort media type objects by specificity *(commit by
[@disintegrator](https://github.com/disintegrator))*



## core: 3.18.3 - 2024-10-31
### 🐛 Bug Fixes
- Prevent panic with invalid implicit discriminator mappings with
propertyName within allOf object *(commit by
[@bflad](https://github.com/bflad))*



## unions: 2.85.8 - 2024-11-05
### 🐛 Bug Fixes
- improved handling of complex allOf schemas that merge multiple types
*(commit by [@TristanSpeakEasy](https://github.com/tristanspeakeasy))*

Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Jan 15, 2025
1 parent a8c0297 commit e33d8a7
Show file tree
Hide file tree
Showing 36 changed files with 907 additions and 263 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/react-query
/.speakeasy/reports
/__tests__
/funcs
/core.*
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
**/*
!/FUNCTIONS.md
!/RUNTIMES.md
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.map
Expand Down
31 changes: 18 additions & 13 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
lockVersion: 2.0.0
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
management:
docChecksum: 0ecb1bbbef6c9805d6a3edcc0afd098a
docVersion: 1.0.51
speakeasyVersion: 1.422.1
generationVersion: 2.438.15
releaseVersion: 0.18.2
configChecksum: ca25abf7161ef39bf7793f0e79caf68e
docChecksum: 4717c00d28425bfad21b5c8706ed4ca7
docVersion: 1.0.58
speakeasyVersion: 1.468.6
generationVersion: 2.493.13
releaseVersion: 0.19.0
configChecksum: 756522998ca4a24ef07ae29599125e94
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
published: true
features:
typescript:
acceptHeaders: 2.81.2
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11
core: 3.18.2
core: 3.18.14
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.1
examples: 2.81.4
globalSecurity: 2.82.11
envVarSecurityUsage: 0.1.2
examples: 2.81.5
globalSecurity: 2.82.12
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
nameOverrides: 2.81.2
nullables: 0.1.0
openEnums: 0.1.1
responseFormat: 0.2.3
retries: 2.83.0
sdkHooks: 0.1.0
sdkHooks: 0.2.0
serverIDs: 2.81.2
unions: 2.85.7
unions: 2.85.8
uploadStreams: 0.1.0
generatedFiles:
- .eslintrc.cjs
- .gitattributes
- .npmignore
- CONTRIBUTING.md
- FUNCTIONS.md
- RUNTIMES.md
- USAGE.md
- docs/lib/utils/retryconfig.md
- docs/sdk/models/errors/detail.md
- docs/sdk/models/errors/httpvalidationerror.md
- docs/sdk/models/errors/servererror.md
Expand All @@ -53,6 +54,8 @@ generatedFiles:
- docs/sdk/models/shared/security.md
- docs/sdk/models/shared/strategy.md
- docs/sdk/models/shared/validationerror.md
- docs/sdks/general/README.md
- docs/sdks/unstructuredclient/README.md
- jsr.json
- package.json
- src/core.ts
Expand Down Expand Up @@ -108,7 +111,9 @@ examples:
responses:
"200":
application/json: [{"type": "Title", "element_id": "6aa0ff22f91bbe7e26e8e25ca8052acd", "text": "LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis", "metadata": {"languages": ["eng"], "page_number": 1, "filename": "layout-parser-paper.pdf", "filetype": "application/pdf"}}]
text/csv: "<value>"
"422":
application/json: {"detail": []}
5XX:
application/json: {"detail": "An error occurred"}
generatedTests: {}
17 changes: 11 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
speakeasyVersion: 1.422.1
speakeasyVersion: 1.468.6
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:7904e30126e3e30e77b56f6d901513e7009cbdc1d433dd7f6baa7da71a31b79a
sourceBlobDigest: sha256:4747157b44baaa540a909f6947d16b08b096845a816819d9b0d35d074561fb68
sourceRevisionDigest: sha256:3ce862c538447f14371df47b3eb07ae3ac20d1dd7f127ecaafbdbda175e5f967
sourceBlobDigest: sha256:5b768ce3d603f07d017095a42738571836d3d0698c1713bf9b184a6235cffdd2
tags:
- latest
- main
- speakeasy-sdk-regen-1731198560
- 1.0.58
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:7904e30126e3e30e77b56f6d901513e7009cbdc1d433dd7f6baa7da71a31b79a
sourceBlobDigest: sha256:4747157b44baaa540a909f6947d16b08b096845a816819d9b0d35d074561fb68
sourceRevisionDigest: sha256:3ce862c538447f14371df47b3eb07ae3ac20d1dd7f127ecaafbdbda175e5f967
sourceBlobDigest: sha256:5b768ce3d603f07d017095a42738571836d3d0698c1713bf9b184a6235cffdd2
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:36362ca76ec0ffe7ab5d84c904a5e4ecb16158194fedd282fa1c2bb0399b91fa
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -33,3 +36,5 @@ workflow:
token: $NPM_TOKEN
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/unstructured/unstructured5xr/my-source-typescript-code-samples
2 changes: 2 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ targets:
token: $NPM_TOKEN
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/unstructured/unstructured5xr/my-source-typescript-code-samples
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,19 +268,17 @@ client.general.partition({
<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
* [Change the base URL](#change-the-base-url)
* [Custom HTTP Client](#custom-http-client)
* [Retries](#retries)
* [Requirements](#requirements)
* [Standalone functions](#standalone-functions)
* [File uploads](#file-uploads)
* [Debugging](#debugging)
* [SDK Installation](#sdk-installation)
* [Requirements](#requirements)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Standalone functions](#standalone-functions)
* [File uploads](#file-uploads)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
<!-- End Table of Contents [toc] -->
<!-- Start Requirements [requirements] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,4 +504,14 @@ Based on:
### Generated
- [typescript v0.18.2] .
### Releases
- [NPM v0.18.2] https://www.npmjs.com/package/unstructured-client/v/0.18.2 - .
- [NPM v0.18.2] https://www.npmjs.com/package/unstructured-client/v/0.18.2 - .

## 2025-01-15 00:27:25
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.468.6 (2.493.13) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.19.0] .
### Releases
- [NPM v0.19.0] https://www.npmjs.com/package/unstructured-client/v/0.19.0 - .
28 changes: 27 additions & 1 deletion RUNTIMES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported JavaScript runtimes

This SDK is intended to be used in JavaScript runtimes that support the following features:
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:

* [Web Fetch API][web-fetch]
* [Web Streams API][web-streams] and in particular `ReadableStream`
Expand All @@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])

[deno-file-streaming]: https://github.com/denoland/deno/issues/11018

## Recommended TypeScript compiler options

The following `tsconfig.json` options are recommended for projects using this
SDK in order to get static type support for features like async iterables,
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
so on):

[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response

```jsonc
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"],
}
}
```

While `target` can be set to older ECMAScript versions, it may result in extra,
unnecessary compatibility code being generated if you are not targeting old
runtimes.
24 changes: 24 additions & 0 deletions docs/lib/utils/retryconfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# RetryConfig

Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies.

## Fields

| Name | Type | Description | Example |
| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- |
| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` |
| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | |
| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` |

## BackoffStrategy

The backoff strategy allows retrying a request with an exponential backoff between each retry.

### Fields

| Name | Type | Description | Example |
| ------------------ | ------------ | ----------------------------------------- | -------- |
| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` |
| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` |
| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` |
| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` |
13 changes: 7 additions & 6 deletions docs/sdk/models/operations/partitionresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { PartitionResponse } from "unstructured-client/sdk/models/operations";

let value: PartitionResponse = {
contentType: "<value>",
statusCode: 306,
rawResponse: new Response("{\"message\": \"hello world\"}", {
headers: { "Content-Type": "application/json" },
}),
elements: [
{
"type": "Title",
Expand All @@ -23,10 +27,6 @@ let value: PartitionResponse = {
},
},
],
statusCode: 306,
rawResponse: new Response("{\"message\": \"hello world\"}", {
headers: { "Content-Type": "application/json" },
}),
};
```

Expand All @@ -35,6 +35,7 @@ let value: PartitionResponse = {
| Field | Type | Required | Description |
| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
| `elements` | Record<string, *any*>[] | :heavy_minus_sign: | Successful Response |
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `csvElements` | *string* | :heavy_minus_sign: | Successful Response |
| `elements` | Record<string, *any*>[] | :heavy_minus_sign: | Successful Response |
Loading

0 comments on commit e33d8a7

Please sign in to comment.