Skip to content

Commit 1fc08c8

Browse files
chore: 🐝 Update SDK - Generate 0.20.0 (#138)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/linting-report/465f365b843b3e98b45505cf823a7653> > OpenAPI Change report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/changes-report/e9fe1449bd0e149e9ec9f50b8dbea0a4> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.488.0 (2.506.0) https://github.com/speakeasy-api/speakeasy ## Versioning Version Bump Type: [minor] - 🤖 (automated) ## OpenAPI Change Summary ``` ├─┬Info │ └──[🔀] version (5:16) └─┬Components └─┬partition_parameters └─┬chunking_strategy ├─┬ANYOF │ └──[🔀] type (365:25)❌ └─┬ANYOF ├──[➖] enum (1:7118)❌ ├──[➖] enum (1:7129)❌ ├──[➖] enum (1:7146)❌ ├──[➖] enum (1:7109)❌ └──[🔀] type (368:25)❌ ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | info | 1 | 0 | | components | 6 | 6 | ## TYPESCRIPT CHANGELOG ## core: 3.19.0 - 2025-02-04 ### 🐝 New Features - make testing security example matching more forgiving *(commit by [@ryan-timothy-albert](https://github.com/ryan-timothy-albert))* ## core: 3.18.22 - 2025-01-31 ### 🐛 Bug Fixes - try to use Blob type in raw requests *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.18.21 - 2025-01-31 ### 🐛 Bug Fixes - fixed handling of default fields in usage snippets and tests, fixed validation of required schema property *(commit by [@TristanSpeakEasy](https://github.com/tristanspeakeasy))* ## core: 3.18.20 - 2025-01-29 ### 🔧 Chores - upgrade to ESLint 9 *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.18.19 - 2025-01-27 ### 🐛 Bug Fixes - sort subresponses based on the worst scoring response in the group to ensure that no unreachable code paths are created *(commit by [@idbentley](https://github.com/idbentley))* ## core: 3.18.18 - 2025-01-24 ### 🔧 Chores - update default module format for TS *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.18.17 - 2025-01-20 ### 🐛 Bug Fixes - update vitest and tshy dependencies *(commit by [@disintegrator](https://github.com/disintegrator))* ## core: 3.18.16 - 2025-01-16 ### 🐛 Bug Fixes - publish `dist/*/package.json` in dual mode *(commit by [@disintegrator](https://github.com/disintegrator))* Co-authored-by: speakeasybot <[email protected]>
1 parent e33d8a7 commit 1fc08c8

23 files changed

+1244
-3509
lines changed

.eslintrc.cjs

-28
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.eslintcache
12
/react-query
23
/.speakeasy/reports
34
/__tests__

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
!/REACT_QUERY.md
55
!/**/*.ts
66
!/**/*.js
7+
!/**/*.json
78
!/**/*.map
89

9-
/.eslintrc.js
10+
/eslint.config.mjs
1011
/cjs
1112
/.tshy
1213
/.tshy-*

.speakeasy/gen.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
33
management:
4-
docChecksum: 4717c00d28425bfad21b5c8706ed4ca7
5-
docVersion: 1.0.58
6-
speakeasyVersion: 1.468.6
7-
generationVersion: 2.493.13
8-
releaseVersion: 0.19.0
9-
configChecksum: 756522998ca4a24ef07ae29599125e94
4+
docChecksum: 7fee91d87907efe050b134e8b5b5e567
5+
docVersion: 1.0.68
6+
speakeasyVersion: 1.488.0
7+
generationVersion: 2.506.0
8+
releaseVersion: 0.20.0
9+
configChecksum: ded2fcd70f95791912c933a433b8800a
1010
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
@@ -16,7 +16,7 @@ features:
1616
acceptHeaders: 2.81.2
1717
additionalDependencies: 0.1.0
1818
constsAndDefaults: 0.1.11
19-
core: 3.18.14
19+
core: 3.19.0
2020
defaultEnabledRetries: 0.1.0
2121
enumUnions: 0.1.0
2222
envVarSecurityUsage: 0.1.2
@@ -34,7 +34,6 @@ features:
3434
unions: 2.85.8
3535
uploadStreams: 0.1.0
3636
generatedFiles:
37-
- .eslintrc.cjs
3837
- .gitattributes
3938
- .npmignore
4039
- FUNCTIONS.md
@@ -46,7 +45,6 @@ generatedFiles:
4645
- docs/sdk/models/errors/servererror.md
4746
- docs/sdk/models/operations/partitionrequest.md
4847
- docs/sdk/models/operations/partitionresponse.md
49-
- docs/sdk/models/shared/chunkingstrategy.md
5048
- docs/sdk/models/shared/files.md
5149
- docs/sdk/models/shared/loc.md
5250
- docs/sdk/models/shared/outputformat.md
@@ -56,6 +54,7 @@ generatedFiles:
5654
- docs/sdk/models/shared/validationerror.md
5755
- docs/sdks/general/README.md
5856
- docs/sdks/unstructuredclient/README.md
57+
- eslint.config.mjs
5958
- jsr.json
6059
- package.json
6160
- src/core.ts
@@ -107,7 +106,7 @@ examples:
107106
partition:
108107
speakeasy-default-partition:
109108
requestBody:
110-
multipart/form-data: {"chunking_strategy": "by_title", "files": {"": "{\"summary\":\"File to be partitioned\",\"externalValue\":\"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf\"}"}, "split_pdf_page_range": [1, 10], "strategy": "hi_res"}
109+
multipart/form-data: {"chunking_strategy": "by_title", "coordinates": false, "files": {"": "{\"summary\":\"File to be partitioned\",\"externalValue\":\"https://github.com/Unstructured-IO/unstructured/blob/98d3541909f64290b5efb65a226fc3ee8a7cc5ee/example-docs/layout-parser-paper.pdf\"}"}, "include_page_breaks": false, "include_slide_notes": true, "multipage_sections": true, "output_format": "application/json", "overlap": 0, "overlap_all": false, "pdf_infer_table_structure": true, "split_pdf_allow_failed": false, "split_pdf_concurrency_level": 5, "split_pdf_page": true, "split_pdf_page_range": [1, 10], "strategy": "hi_res", "unique_element_ids": false, "xml_keep_tags": false}
111110
responses:
112111
"200":
113112
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"}}]
@@ -116,4 +115,5 @@ examples:
116115
application/json: {"detail": []}
117116
5XX:
118117
application/json: {"detail": "An error occurred"}
118+
examplesVersion: 1.0.0
119119
generatedTests: {}

.speakeasy/workflow.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.468.6
1+
speakeasyVersion: 1.488.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:3ce862c538447f14371df47b3eb07ae3ac20d1dd7f127ecaafbdbda175e5f967
6-
sourceBlobDigest: sha256:5b768ce3d603f07d017095a42738571836d3d0698c1713bf9b184a6235cffdd2
5+
sourceRevisionDigest: sha256:f97624d306630f3e96d29e7169f824b40af26c9098b948e902d75c3fa0ebb132
6+
sourceBlobDigest: sha256:446c5e224c375fca629b3ee1283a516f07104c2c80afadef0d260c6d4e276509
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1731198560
10-
- 1.0.58
9+
- speakeasy-sdk-regen-1739061007
10+
- 1.0.68
1111
targets:
1212
unstructed-typescript:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:3ce862c538447f14371df47b3eb07ae3ac20d1dd7f127ecaafbdbda175e5f967
16-
sourceBlobDigest: sha256:5b768ce3d603f07d017095a42738571836d3d0698c1713bf9b184a6235cffdd2
15+
sourceRevisionDigest: sha256:f97624d306630f3e96d29e7169f824b40af26c9098b948e902d75c3fa0ebb132
16+
sourceBlobDigest: sha256:446c5e224c375fca629b3ee1283a516f07104c2c80afadef0d260c6d4e276509
1717
codeSamplesNamespace: my-source-typescript-code-samples
18-
codeSamplesRevisionDigest: sha256:36362ca76ec0ffe7ab5d84c904a5e4ecb16158194fedd282fa1c2bb0399b91fa
18+
codeSamplesRevisionDigest: sha256:7c77c0f814f238b6c6a388b9df20e4cec4a687399fc0a55da62e240daaa03e5e
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

FUNCTIONS.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { openAsBlob } from "node:fs";
2323
import { UnstructuredClientCore } from "unstructured-client/core.js";
2424
import { generalPartition } from "unstructured-client/funcs/generalPartition.js";
2525
import { SDKValidationError } from "unstructured-client/sdk/models/errors/sdkvalidationerror.js";
26-
import { ChunkingStrategy, Strategy } from "unstructured-client/sdk/models/shared";
2726

2827
// Use `UnstructuredClientCore` for best tree-shaking performance.
2928
// You can create one instance of it to use across an application.
@@ -33,12 +32,11 @@ async function run() {
3332
const res = await generalPartition(unstructuredClient, {
3433
partitionParameters: {
3534
files: await openAsBlob("example.file"),
36-
chunkingStrategy: ChunkingStrategy.ByTitle,
35+
chunkingStrategy: "by_title",
3736
splitPdfPageRange: [
3837
1,
3938
10,
4039
],
41-
strategy: Strategy.HiRes,
4240
},
4341
});
4442

README.md

+3-18
Original file line numberDiff line numberDiff line change
@@ -154,23 +154,18 @@ To change the default retry strategy for a single API call, simply provide a ret
154154
```typescript
155155
import { openAsBlob } from "node:fs";
156156
import { UnstructuredClient } from "unstructured-client";
157-
import {
158-
ChunkingStrategy,
159-
Strategy,
160-
} from "unstructured-client/sdk/models/shared";
161157

162158
const unstructuredClient = new UnstructuredClient();
163159

164160
async function run() {
165161
const result = await unstructuredClient.general.partition({
166162
partitionParameters: {
167163
files: await openAsBlob("example.file"),
168-
chunkingStrategy: ChunkingStrategy.ByTitle,
164+
chunkingStrategy: "by_title",
169165
splitPdfPageRange: [
170166
1,
171167
10,
172168
],
173-
strategy: Strategy.HiRes,
174169
},
175170
}, {
176171
retries: {
@@ -197,10 +192,6 @@ If you'd like to override the default retry strategy for all operations that sup
197192
```typescript
198193
import { openAsBlob } from "node:fs";
199194
import { UnstructuredClient } from "unstructured-client";
200-
import {
201-
ChunkingStrategy,
202-
Strategy,
203-
} from "unstructured-client/sdk/models/shared";
204195

205196
const unstructuredClient = new UnstructuredClient({
206197
retryConfig: {
@@ -219,12 +210,11 @@ async function run() {
219210
const result = await unstructuredClient.general.partition({
220211
partitionParameters: {
221212
files: await openAsBlob("example.file"),
222-
chunkingStrategy: ChunkingStrategy.ByTitle,
213+
chunkingStrategy: "by_title",
223214
splitPdfPageRange: [
224215
1,
225216
10,
226217
],
227-
strategy: Strategy.HiRes,
228218
},
229219
});
230220

@@ -324,23 +314,18 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
324314
```typescript
325315
import { openAsBlob } from "node:fs";
326316
import { UnstructuredClient } from "unstructured-client";
327-
import {
328-
ChunkingStrategy,
329-
Strategy,
330-
} from "unstructured-client/sdk/models/shared";
331317

332318
const unstructuredClient = new UnstructuredClient();
333319

334320
async function run() {
335321
const result = await unstructuredClient.general.partition({
336322
partitionParameters: {
337323
files: await openAsBlob("example.file"),
338-
chunkingStrategy: ChunkingStrategy.ByTitle,
324+
chunkingStrategy: "by_title",
339325
splitPdfPageRange: [
340326
1,
341327
10,
342328
],
343-
strategy: Strategy.HiRes,
344329
},
345330
});
346331

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -514,4 +514,14 @@ Based on:
514514
### Generated
515515
- [typescript v0.19.0] .
516516
### Releases
517-
- [NPM v0.19.0] https://www.npmjs.com/package/unstructured-client/v/0.19.0 - .
517+
- [NPM v0.19.0] https://www.npmjs.com/package/unstructured-client/v/0.19.0 - .
518+
519+
## 2025-02-12 00:27:27
520+
### Changes
521+
Based on:
522+
- OpenAPI Doc
523+
- Speakeasy CLI 1.488.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
524+
### Generated
525+
- [typescript v0.20.0] .
526+
### Releases
527+
- [NPM v0.20.0] https://www.npmjs.com/package/unstructured-client/v/0.20.0 - .

USAGE.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,18 @@
22
```typescript
33
import { openAsBlob } from "node:fs";
44
import { UnstructuredClient } from "unstructured-client";
5-
import {
6-
ChunkingStrategy,
7-
Strategy,
8-
} from "unstructured-client/sdk/models/shared";
95

106
const unstructuredClient = new UnstructuredClient();
117

128
async function run() {
139
const result = await unstructuredClient.general.partition({
1410
partitionParameters: {
1511
files: await openAsBlob("example.file"),
16-
chunkingStrategy: ChunkingStrategy.ByTitle,
12+
chunkingStrategy: "by_title",
1713
splitPdfPageRange: [
1814
1,
1915
10,
2016
],
21-
strategy: Strategy.HiRes,
2217
},
2318
});
2419

codeSamples.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ actions:
88
"x-codeSamples":
99
- "lang": "typescript"
1010
"label": "partition"
11-
"source": "import { openAsBlob } from \"node:fs\";\nimport { UnstructuredClient } from \"unstructured-client\";\nimport { ChunkingStrategy, Strategy } from \"unstructured-client/sdk/models/shared\";\n\nconst unstructuredClient = new UnstructuredClient();\n\nasync function run() {\n const result = await unstructuredClient.general.partition({\n partitionParameters: {\n files: await openAsBlob(\"example.file\"),\n strategy: Strategy.Auto,\n chunkingStrategy: ChunkingStrategy.Basic,\n splitPdfPageRange: [\n 1,\n 10,\n ],\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"
11+
"source": "import { openAsBlob } from \"node:fs\";\nimport { UnstructuredClient } from \"unstructured-client\";\n\nconst unstructuredClient = new UnstructuredClient();\n\nasync function run() {\n const result = await unstructuredClient.general.partition({\n partitionParameters: {\n files: await openAsBlob(\"example.file\"),\n chunkingStrategy: \"basic\",\n splitPdfPageRange: [\n 1,\n 10,\n ],\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"

docs/sdk/models/shared/chunkingstrategy.md

-21
This file was deleted.

0 commit comments

Comments
 (0)