Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/mcp-server
/bin
/.eslintcache
/react-query
/.speakeasy/reports
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.mjs
!/**/*.json
!/**/*.map

Expand Down
23 changes: 13 additions & 10 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
management:
docChecksum: 7fee91d87907efe050b134e8b5b5e567
docVersion: 1.0.68
speakeasyVersion: 1.488.0
generationVersion: 2.506.0
releaseVersion: 0.20.0
configChecksum: ded2fcd70f95791912c933a433b8800a
docChecksum: f2a95da32ec2c53d1f83bd13ad725334
docVersion: 1.0.78
speakeasyVersion: 1.509.0
generationVersion: 2.539.0
releaseVersion: 0.21.0
configChecksum: 13f5e8bad8597e9ba62b12b6ffeed9c5
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand All @@ -16,16 +16,16 @@ features:
acceptHeaders: 2.81.2
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11
core: 3.19.0
core: 3.21.3
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
examples: 2.81.5
globalSecurity: 2.82.12
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
nameOverrides: 2.81.2
nullables: 0.1.0
nullables: 0.1.1
openEnums: 0.1.1
responseFormat: 0.2.3
retries: 2.83.0
Expand All @@ -49,6 +49,8 @@ generatedFiles:
- docs/sdk/models/shared/loc.md
- docs/sdk/models/shared/outputformat.md
- docs/sdk/models/shared/partitionparameters.md
- docs/sdk/models/shared/partitionparametersschemasstrategy.md
- docs/sdk/models/shared/partitionparametersstrategy.md
- docs/sdk/models/shared/security.md
- docs/sdk/models/shared/strategy.md
- docs/sdk/models/shared/validationerror.md
Expand Down Expand Up @@ -93,6 +95,7 @@ generatedFiles:
- src/sdk/models/shared/security.ts
- src/sdk/models/shared/validationerror.ts
- src/sdk/sdk.ts
- src/sdk/types/async.ts
- src/sdk/types/blobs.ts
- src/sdk/types/constdatetime.ts
- src/sdk/types/enums.ts
Expand All @@ -106,7 +109,7 @@ examples:
partition:
speakeasy-default-partition:
requestBody:
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}
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": "vlm", "unique_element_ids": false, "vlm_model": "gpt-4o", "vlm_model_provider": "openai", "xml_keep_tags": false}
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"}}]
Expand Down
18 changes: 9 additions & 9 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
speakeasyVersion: 1.488.0
speakeasyVersion: 1.509.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:f97624d306630f3e96d29e7169f824b40af26c9098b948e902d75c3fa0ebb132
sourceBlobDigest: sha256:446c5e224c375fca629b3ee1283a516f07104c2c80afadef0d260c6d4e276509
sourceRevisionDigest: sha256:ab1dc784837828b31a8a2e2a171f359c58bca0948f806d83225045c14421689b
sourceBlobDigest: sha256:13042ba05dc2acf87d4a80c13c6e59d290f9dd0564de710759b0dced2b171f01
tags:
- latest
- speakeasy-sdk-regen-1739061007
- 1.0.68
- speakeasy-sdk-regen-1741024400
- 1.0.78
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:f97624d306630f3e96d29e7169f824b40af26c9098b948e902d75c3fa0ebb132
sourceBlobDigest: sha256:446c5e224c375fca629b3ee1283a516f07104c2c80afadef0d260c6d4e276509
sourceRevisionDigest: sha256:ab1dc784837828b31a8a2e2a171f359c58bca0948f806d83225045c14421689b
sourceBlobDigest: sha256:13042ba05dc2acf87d4a80c13c6e59d290f9dd0564de710759b0dced2b171f01
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:7c77c0f814f238b6c6a388b9df20e4cec4a687399fc0a55da62e240daaa03e5e
codeSamplesRevisionDigest: sha256:bd453feade54d360a88a820a9854fa64c6be4abc145518455742ae1d1591961b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
my-source:
inputs:
- location: https://api.unstructured.io/general/openapi.json
- location: https://api.unstructuredapp.io/general/openapi.json
overlays:
- location: ./overlay_client.yaml
registry:
Expand Down
3 changes: 3 additions & 0 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { openAsBlob } from "node:fs";
import { UnstructuredClientCore } from "unstructured-client/core.js";
import { generalPartition } from "unstructured-client/funcs/generalPartition.js";
import { SDKValidationError } from "unstructured-client/sdk/models/errors/sdkvalidationerror.js";
import { PartitionParametersSchemasStrategy, PartitionParametersStrategy } from "unstructured-client/sdk/models/shared";

// Use `UnstructuredClientCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
Expand All @@ -37,6 +38,8 @@ async function run() {
1,
10,
],
vlmModel: PartitionParametersStrategy.Gpt4o,
vlmModelProvider: PartitionParametersSchemasStrategy.Openai,
},
});

Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ To change the default retry strategy for a single API call, simply provide a ret
```typescript
import { openAsBlob } from "node:fs";
import { UnstructuredClient } from "unstructured-client";
import {
PartitionParametersSchemasStrategy,
PartitionParametersStrategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

Expand All @@ -167,6 +171,8 @@ async function run() {
1,
10,
],
vlmModel: PartitionParametersStrategy.Gpt4o,
vlmModelProvider: PartitionParametersSchemasStrategy.Openai,
},
}, {
retries: {
Expand All @@ -193,6 +199,10 @@ If you'd like to override the default retry strategy for all operations that sup
```typescript
import { openAsBlob } from "node:fs";
import { UnstructuredClient } from "unstructured-client";
import {
PartitionParametersSchemasStrategy,
PartitionParametersStrategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient({
retryConfig: {
Expand All @@ -216,6 +226,8 @@ async function run() {
1,
10,
],
vlmModel: PartitionParametersStrategy.Gpt4o,
vlmModelProvider: PartitionParametersSchemasStrategy.Openai,
},
});

Expand Down Expand Up @@ -315,6 +327,10 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
```typescript
import { openAsBlob } from "node:fs";
import { UnstructuredClient } from "unstructured-client";
import {
PartitionParametersSchemasStrategy,
PartitionParametersStrategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

Expand All @@ -327,6 +343,8 @@ async function run() {
1,
10,
],
vlmModel: PartitionParametersStrategy.Gpt4o,
vlmModelProvider: PartitionParametersSchemasStrategy.Openai,
},
});

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,4 +524,14 @@ Based on:
### Generated
- [typescript v0.20.0] .
### Releases
- [NPM v0.20.0] https://www.npmjs.com/package/unstructured-client/v/0.20.0 - .
- [NPM v0.20.0] https://www.npmjs.com/package/unstructured-client/v/0.20.0 - .

## 2025-03-03 17:53:04
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.509.0 (2.539.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.21.0] .
### Releases
- [NPM v0.21.0] https://www.npmjs.com/package/unstructured-client/v/0.21.0 - .
6 changes: 6 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
```typescript
import { openAsBlob } from "node:fs";
import { UnstructuredClient } from "unstructured-client";
import {
PartitionParametersSchemasStrategy,
PartitionParametersStrategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

Expand All @@ -14,6 +18,8 @@ async function run() {
1,
10,
],
vlmModel: PartitionParametersStrategy.Gpt4o,
vlmModelProvider: PartitionParametersSchemasStrategy.Openai,
},
});

Expand Down
2 changes: 1 addition & 1 deletion codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ actions:
"x-codeSamples":
- "lang": "typescript"
"label": "partition"
"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();"
"source": "import { openAsBlob } from \"node:fs\";\nimport { UnstructuredClient } from \"unstructured-client\";\nimport { PartitionParametersSchemasStrategy, PartitionParametersStrategy } 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 vlmModelProvider: PartitionParametersStrategy.Openai,\n vlmModel: PartitionParametersSchemasStrategy.Gpt4o,\n chunkingStrategy: \"basic\",\n splitPdfPageRange: [\n 1,\n 10,\n ],\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();"
Loading