Skip to content

Commit c256aa4

Browse files
committed
ci: regenerated with OpenAPI Doc 0.0.1, Speakeasy CLI 1.114.1
1 parent ee48e8f commit c256aa4

File tree

17 files changed

+812
-699
lines changed

17 files changed

+812
-699
lines changed

README.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,180 @@ const sdk = new UnstructuredClient({defaultClient: httpClient});
122122
```
123123
<!-- End Custom HTTP Client -->
124124
125+
126+
127+
<!-- Start Retries -->
128+
# Retries
129+
130+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
131+
132+
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
133+
134+
135+
## Example
136+
137+
```typescript
138+
import { UnstructuredClient } from "unstructured-client";
139+
140+
(async () => {
141+
const sdk = new UnstructuredClient({
142+
security: {
143+
apiKeyAuth: "YOUR_API_KEY",
144+
},
145+
});
146+
147+
const res = await sdk.general.partition(
148+
{
149+
chunkingStrategy: "by_title",
150+
combineUnderNChars: 500,
151+
encoding: "utf-8",
152+
files: {
153+
content: new TextEncoder().encode("0x2cC94b2FEF"),
154+
fileName: "um.shtml",
155+
},
156+
gzUncompressedContentType: "application/pdf",
157+
hiResModelName: "yolox",
158+
languages: ["[", "e", "n", "g", "]"],
159+
maxCharacters: 1500,
160+
newAfterNChars: 1500,
161+
outputFormat: "application/json",
162+
skipInferTableTypes: ["p", "d", "f"],
163+
strategy: "hi_res",
164+
},
165+
{
166+
strategy: "backoff",
167+
backoff: {
168+
initialInterval: 1,
169+
maxInterval: 50,
170+
exponent: 1.1,
171+
maxElapsedTime: 100,
172+
},
173+
retryConnectionErrors: false,
174+
}
175+
);
176+
177+
if (res.statusCode == 200) {
178+
// handle response
179+
}
180+
})();
181+
182+
```
183+
184+
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
185+
186+
187+
## Example
188+
189+
```typescript
190+
import { UnstructuredClient } from "unstructured-client";
191+
192+
(async() => {
193+
const sdk = new UnstructuredClient({
194+
retry_config: {
195+
strategy: "backoff",
196+
backoff: {
197+
initialInterval: 1,
198+
maxInterval: 50,
199+
exponent: 1.1,
200+
maxElapsedTime: 100,
201+
},
202+
retryConnectionErrors: false,
203+
}
204+
security: {
205+
apiKeyAuth: "YOUR_API_KEY",
206+
},
207+
});
208+
209+
const res = await sdk.general.partition({
210+
chunkingStrategy: "by_title",
211+
combineUnderNChars: 500,
212+
encoding: "utf-8",
213+
files: {
214+
content: new TextEncoder().encode("0x2cC94b2FEF"),
215+
fileName: "um.shtml",
216+
},
217+
gzUncompressedContentType: "application/pdf",
218+
hiResModelName: "yolox",
219+
languages: [
220+
"[",
221+
"e",
222+
"n",
223+
"g",
224+
"]",
225+
],
226+
maxCharacters: 1500,
227+
newAfterNChars: 1500,
228+
outputFormat: "application/json",
229+
skipInferTableTypes: [
230+
"p",
231+
"d",
232+
"f",
233+
],
234+
strategy: "hi_res",
235+
});
236+
237+
238+
if (res.statusCode == 200) {
239+
// handle response
240+
}
241+
})();
242+
```
243+
244+
245+
<!-- End Retries -->
246+
247+
248+
249+
<!-- Start Authentication -->
250+
251+
# Authentication
252+
253+
## Per-Client Security Schemes
254+
255+
Your SDK supports the following security scheme globally:
256+
257+
| Name | Type | Scheme |
258+
| ------------ | ------------ | ------------ |
259+
| `apiKeyAuth` | apiKey | API key |
260+
261+
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example:
262+
263+
```typescript
264+
import { UnstructuredClient } from "unstructured-client";
265+
266+
(async () => {
267+
const sdk = new UnstructuredClient({
268+
security: {
269+
apiKeyAuth: "YOUR_API_KEY",
270+
},
271+
});
272+
273+
const res = await sdk.general.partition({
274+
chunkingStrategy: "by_title",
275+
combineUnderNChars: 500,
276+
encoding: "utf-8",
277+
files: {
278+
content: new TextEncoder().encode("0x2cC94b2FEF"),
279+
fileName: "um.shtml",
280+
},
281+
gzUncompressedContentType: "application/pdf",
282+
hiResModelName: "yolox",
283+
languages: ["[", "e", "n", "g", "]"],
284+
maxCharacters: 1500,
285+
newAfterNChars: 1500,
286+
outputFormat: "application/json",
287+
skipInferTableTypes: ["p", "d", "f"],
288+
strategy: "hi_res",
289+
});
290+
291+
if (res.statusCode == 200) {
292+
// handle response
293+
}
294+
})();
295+
296+
```
297+
<!-- End Authentication -->
298+
125299
<!-- Placeholder for Future Speakeasy SDK Sections -->
126300

127301
### Maturity

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,14 @@ Based on:
182182
### Generated
183183
- [typescript v0.8.2] .
184184
### Releases
185-
- [NPM v0.8.2] https://www.npmjs.com/package/unstructured-client/v/0.8.2 - .
185+
- [NPM v0.8.2] https://www.npmjs.com/package/unstructured-client/v/0.8.2 - .
186+
187+
## 2023-11-07 00:20:51
188+
### Changes
189+
Based on:
190+
- OpenAPI Doc 0.0.1
191+
- Speakeasy CLI 1.114.1 (2.181.1) https://github.com/speakeasy-api/speakeasy
192+
### Generated
193+
- [typescript v0.9.0] .
194+
### Releases
195+
- [NPM v0.9.0] https://www.npmjs.com/package/unstructured-client/v/0.9.0 - .

USAGE.md

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,35 @@
44
```typescript
55
import { UnstructuredClient } from "unstructured-client";
66

7-
(async() => {
8-
const sdk = new UnstructuredClient({
9-
security: {
10-
apiKeyAuth: "YOUR_API_KEY",
11-
},
12-
});
7+
(async () => {
8+
const sdk = new UnstructuredClient({
9+
security: {
10+
apiKeyAuth: "YOUR_API_KEY",
11+
},
12+
});
1313

14-
const res = await sdk.general.partition({
15-
chunkingStrategy: "by_title",
16-
combineUnderNChars: 500,
17-
encoding: "utf-8",
18-
files: {
19-
content: "+WmI5Q)|yy" as bytes <<<>>>,
20-
files: "string",
21-
},
22-
gzUncompressedContentType: "application/pdf",
23-
hiResModelName: "yolox",
24-
languages: [
25-
"[",
26-
"e",
27-
"n",
28-
"g",
29-
"]",
30-
],
31-
maxCharacters: 1500,
32-
newAfterNChars: 1500,
33-
outputFormat: "application/json",
34-
skipInferTableTypes: [
35-
"p",
36-
"d",
37-
"f",
38-
],
39-
strategy: "hi_res",
40-
});
14+
const res = await sdk.general.partition({
15+
chunkingStrategy: "by_title",
16+
combineUnderNChars: 500,
17+
encoding: "utf-8",
18+
files: {
19+
content: new TextEncoder().encode("0x2cC94b2FEF"),
20+
fileName: "um.shtml",
21+
},
22+
gzUncompressedContentType: "application/pdf",
23+
hiResModelName: "yolox",
24+
languages: ["[", "e", "n", "g", "]"],
25+
maxCharacters: 1500,
26+
newAfterNChars: 1500,
27+
outputFormat: "application/json",
28+
skipInferTableTypes: ["p", "d", "f"],
29+
strategy: "hi_res",
30+
});
4131

42-
43-
if (res.statusCode == 200) {
44-
// handle response
45-
}
32+
if (res.statusCode == 200) {
33+
// handle response
34+
}
4635
})();
36+
4737
```
4838
<!-- End SDK Example Usage -->

docs/models/errors/httpvalidationerror.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
8-
| `detail` | [ValidationError](../../models/errors/validationerror.md)[] | :heavy_minus_sign: | N/A |
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
8+
| `detail` | [errors.ValidationError](../../models/errors/validationerror.md)[] | :heavy_minus_sign: | N/A |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# PartitionParametersFiles
1+
# Files
22

33

44
## Fields
55

66
| Field | Type | Required | Description |
77
| ------------------ | ------------------ | ------------------ | ------------------ |
88
| `content` | *Uint8Array* | :heavy_check_mark: | N/A |
9-
| `files` | *string* | :heavy_check_mark: | N/A |
9+
| `fileName` | *string* | :heavy_check_mark: | N/A |

docs/models/shared/partitionparameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| `combineUnderNChars` | *number* | :heavy_minus_sign: | If chunking strategy is set, combine elements until a section reaches a length of n chars. Default: 500 | 500 |
1010
| `coordinates` | *boolean* | :heavy_minus_sign: | If true, return coordinates for each element. Default: false | |
1111
| `encoding` | *string* | :heavy_minus_sign: | The encoding method used to decode the text input. Default: utf-8 | utf-8 |
12-
| `files` | [PartitionParametersFiles](../../models/shared/partitionparametersfiles.md) | :heavy_minus_sign: | The file to extract | |
12+
| `files` | [shared.Files](../../models/shared/files.md) | :heavy_minus_sign: | The file to extract | |
1313
| `gzUncompressedContentType` | *string* | :heavy_minus_sign: | If file is gzipped, use this content type after unzipping | application/pdf |
1414
| `hiResModelName` | *string* | :heavy_minus_sign: | The name of the inference model used when strategy is hi_res | yolox |
1515
| `includePageBreaks` | *boolean* | :heavy_minus_sign: | If True, the output will include page breaks if the filetype supports it. Default: false | |

docs/sdks/general/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# General
2-
(*general*)
2+
(*.general*)
33

44
### Available Operations
55

@@ -26,8 +26,8 @@ import { UnstructuredClient } from "unstructured-client";
2626
combineUnderNChars: 500,
2727
encoding: "utf-8",
2828
files: {
29-
content: "+WmI5Q)|yy" as bytes <<<>>>,
30-
files: "string",
29+
content: new TextEncoder().encode("0x2cC94b2FEF"),
30+
fileName: "um.shtml",
3131
},
3232
gzUncompressedContentType: "application/pdf",
3333
hiResModelName: "yolox",

files.gen

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ src/sdk/types/index.ts
2020
src/sdk/types/rfcdate.ts
2121
tsconfig.json
2222
src/sdk/models/operations/partition.ts
23-
src/sdk/models/operations/index.ts
2423
src/sdk/models/errors/httpvalidationerror.ts
2524
src/sdk/models/errors/validationerror.ts
26-
src/sdk/models/errors/index.ts
2725
src/sdk/models/shared/partitionparameters.ts
2826
src/sdk/models/shared/security.ts
27+
src/sdk/models/errors/index.ts
28+
src/sdk/models/operations/index.ts
2929
src/sdk/models/shared/index.ts
3030
USAGE.md
3131
docs/models/operations/partitionresponse.md
3232
docs/models/errors/httpvalidationerror.md
3333
docs/models/errors/validationerror.md
34-
docs/models/shared/partitionparametersfiles.md
34+
docs/models/shared/files.md
3535
docs/models/shared/partitionparameters.md
3636
docs/models/shared/security.md
3737
docs/sdks/unstructuredclient/README.md

gen.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,34 @@ configVersion: 1.0.0
22
management:
33
docChecksum: bf57420eebd40f2b1d166092f01e3927
44
docVersion: 0.0.1
5-
speakeasyVersion: 1.109.2
6-
generationVersion: 2.173.0
5+
speakeasyVersion: 1.114.1
6+
generationVersion: 2.181.1
77
generation:
8-
comments:
9-
disableComments: false
10-
omitDescriptionIfSummaryPresent: false
11-
baseServerURL: ""
12-
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
8+
comments: {}
139
sdkClassName: unstructured_client
14-
singleTagPerOp: false
15-
tagNamespacingDisabled: false
10+
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
1611
features:
1712
typescript:
18-
core: 2.94.0
13+
core: 3.1.0
1914
examples: 2.81.3
2015
globalSecurity: 2.82.0
2116
globalServerURLs: 2.82.0
2217
nameOverrides: 2.81.1
2318
retries: 2.82.1
2419
serverIDs: 2.81.2
2520
typescript:
26-
version: 0.8.2
21+
version: 0.9.0
2722
author: Unstructured
2823
clientServerStatusCodesAsErrors: true
2924
flattenGlobalSecurity: false
25+
imports:
26+
option: openapi
27+
paths:
28+
callbacks: sdk/models/callbacks
29+
errors: sdk/models/errors
30+
operations: sdk/models/operations
31+
shared: sdk/models/shared
32+
webhooks: sdk/models/webhooks
3033
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
3134
maxMethodParams: 0
3235
packageName: unstructured-client

0 commit comments

Comments
 (0)