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
28 changes: 0 additions & 28 deletions .eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.eslintcache
/react-query
/.speakeasy/reports
/__tests__
Expand Down
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
!/REACT_QUERY.md
!/**/*.ts
!/**/*.js
!/**/*.json
!/**/*.map

/.eslintrc.js
/eslint.config.mjs
/cjs
/.tshy
/.tshy-*
Expand Down
20 changes: 10 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: 4717c00d28425bfad21b5c8706ed4ca7
docVersion: 1.0.58
speakeasyVersion: 1.468.6
generationVersion: 2.493.13
releaseVersion: 0.19.0
configChecksum: 756522998ca4a24ef07ae29599125e94
docChecksum: 7fee91d87907efe050b134e8b5b5e567
docVersion: 1.0.68
speakeasyVersion: 1.488.0
generationVersion: 2.506.0
releaseVersion: 0.20.0
configChecksum: ded2fcd70f95791912c933a433b8800a
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand All @@ -16,7 +16,7 @@ features:
acceptHeaders: 2.81.2
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11
core: 3.18.14
core: 3.19.0
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
Expand All @@ -34,7 +34,6 @@ features:
unions: 2.85.8
uploadStreams: 0.1.0
generatedFiles:
- .eslintrc.cjs
- .gitattributes
- .npmignore
- FUNCTIONS.md
Expand All @@ -46,7 +45,6 @@ generatedFiles:
- docs/sdk/models/errors/servererror.md
- docs/sdk/models/operations/partitionrequest.md
- docs/sdk/models/operations/partitionresponse.md
- docs/sdk/models/shared/chunkingstrategy.md
- docs/sdk/models/shared/files.md
- docs/sdk/models/shared/loc.md
- docs/sdk/models/shared/outputformat.md
Expand All @@ -56,6 +54,7 @@ generatedFiles:
- docs/sdk/models/shared/validationerror.md
- docs/sdks/general/README.md
- docs/sdks/unstructuredclient/README.md
- eslint.config.mjs
- jsr.json
- package.json
- src/core.ts
Expand Down Expand Up @@ -107,7 +106,7 @@ examples:
partition:
speakeasy-default-partition:
requestBody:
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"}
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}
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 All @@ -116,4 +115,5 @@ examples:
application/json: {"detail": []}
5XX:
application/json: {"detail": "An error occurred"}
examplesVersion: 1.0.0
generatedTests: {}
16 changes: 8 additions & 8 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.468.6
speakeasyVersion: 1.488.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:3ce862c538447f14371df47b3eb07ae3ac20d1dd7f127ecaafbdbda175e5f967
sourceBlobDigest: sha256:5b768ce3d603f07d017095a42738571836d3d0698c1713bf9b184a6235cffdd2
sourceRevisionDigest: sha256:f97624d306630f3e96d29e7169f824b40af26c9098b948e902d75c3fa0ebb132
sourceBlobDigest: sha256:446c5e224c375fca629b3ee1283a516f07104c2c80afadef0d260c6d4e276509
tags:
- latest
- speakeasy-sdk-regen-1731198560
- 1.0.58
- speakeasy-sdk-regen-1739061007
- 1.0.68
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:3ce862c538447f14371df47b3eb07ae3ac20d1dd7f127ecaafbdbda175e5f967
sourceBlobDigest: sha256:5b768ce3d603f07d017095a42738571836d3d0698c1713bf9b184a6235cffdd2
sourceRevisionDigest: sha256:f97624d306630f3e96d29e7169f824b40af26c9098b948e902d75c3fa0ebb132
sourceBlobDigest: sha256:446c5e224c375fca629b3ee1283a516f07104c2c80afadef0d260c6d4e276509
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:36362ca76ec0ffe7ab5d84c904a5e4ecb16158194fedd282fa1c2bb0399b91fa
codeSamplesRevisionDigest: sha256:7c77c0f814f238b6c6a388b9df20e4cec4a687399fc0a55da62e240daaa03e5e
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
4 changes: 1 addition & 3 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ 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 { ChunkingStrategy, Strategy } 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 @@ -33,12 +32,11 @@ async function run() {
const res = await generalPartition(unstructuredClient, {
partitionParameters: {
files: await openAsBlob("example.file"),
chunkingStrategy: ChunkingStrategy.ByTitle,
chunkingStrategy: "by_title",
splitPdfPageRange: [
1,
10,
],
strategy: Strategy.HiRes,
},
});

Expand Down
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,18 @@ 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 {
ChunkingStrategy,
Strategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

async function run() {
const result = await unstructuredClient.general.partition({
partitionParameters: {
files: await openAsBlob("example.file"),
chunkingStrategy: ChunkingStrategy.ByTitle,
chunkingStrategy: "by_title",
splitPdfPageRange: [
1,
10,
],
strategy: Strategy.HiRes,
},
}, {
retries: {
Expand All @@ -197,10 +192,6 @@ 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 {
ChunkingStrategy,
Strategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient({
retryConfig: {
Expand All @@ -219,12 +210,11 @@ async function run() {
const result = await unstructuredClient.general.partition({
partitionParameters: {
files: await openAsBlob("example.file"),
chunkingStrategy: ChunkingStrategy.ByTitle,
chunkingStrategy: "by_title",
splitPdfPageRange: [
1,
10,
],
strategy: Strategy.HiRes,
},
});

Expand Down Expand Up @@ -324,23 +314,18 @@ 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 {
ChunkingStrategy,
Strategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

async function run() {
const result = await unstructuredClient.general.partition({
partitionParameters: {
files: await openAsBlob("example.file"),
chunkingStrategy: ChunkingStrategy.ByTitle,
chunkingStrategy: "by_title",
splitPdfPageRange: [
1,
10,
],
strategy: Strategy.HiRes,
},
});

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

## 2025-02-12 00:27:27
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.488.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.20.0] .
### Releases
- [NPM v0.20.0] https://www.npmjs.com/package/unstructured-client/v/0.20.0 - .
7 changes: 1 addition & 6 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,18 @@
```typescript
import { openAsBlob } from "node:fs";
import { UnstructuredClient } from "unstructured-client";
import {
ChunkingStrategy,
Strategy,
} from "unstructured-client/sdk/models/shared";

const unstructuredClient = new UnstructuredClient();

async function run() {
const result = await unstructuredClient.general.partition({
partitionParameters: {
files: await openAsBlob("example.file"),
chunkingStrategy: ChunkingStrategy.ByTitle,
chunkingStrategy: "by_title",
splitPdfPageRange: [
1,
10,
],
strategy: Strategy.HiRes,
},
});

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\";\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();"
"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();"
21 changes: 0 additions & 21 deletions docs/sdk/models/shared/chunkingstrategy.md

This file was deleted.

Loading