Skip to content

chore: 🐝 Update SDK - Generate 0.22.0 #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2025
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
4 changes: 2 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ management:
docVersion: 1.0.81
speakeasyVersion: 1.517.3
generationVersion: 2.548.6
releaseVersion: 0.22.1
configChecksum: 2cebaaef5f17f81677d245e1b6606f99
releaseVersion: 0.22.0
configChecksum: 0de256135a61cf1f1f4aa7e2b4cc8f93
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand Down
7 changes: 4 additions & 3 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ speakeasyVersion: 1.517.3
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:9e9f4ecb34f6a07b353e1209254ed5fca4b14fa19b7117d4d9c263c8160cf1cf
sourceRevisionDigest: sha256:7b3ee52d5e5acc9bc97268e7996c203d4bec0181379eb5c95868c982fb820726
sourceBlobDigest: sha256:822e38da0c61b9aeaa5446413a6cec058a464920a02d20d9ee7955c827446050
tags:
- latest
- speakeasy-sdk-regen-1742057884
- 1.0.81
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:9e9f4ecb34f6a07b353e1209254ed5fca4b14fa19b7117d4d9c263c8160cf1cf
sourceRevisionDigest: sha256:7b3ee52d5e5acc9bc97268e7996c203d4bec0181379eb5c95868c982fb820726
sourceBlobDigest: sha256:822e38da0c61b9aeaa5446413a6cec058a464920a02d20d9ee7955c827446050
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:4d09779f82fdbd1876eb140badbe39203ed5dc68f2104e7a383e1c3ce77ef820
codeSamplesRevisionDigest: sha256:86e8bf47bf21198d030067fd18395449530c67061224d03d612d9f6de944baa4
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,4 +544,14 @@ Based on:
### Generated
- [typescript v0.21.1] .
### Releases
- [NPM v0.21.1] https://www.npmjs.com/package/unstructured-client/v/0.21.1 - .
- [NPM v0.21.1] https://www.npmjs.com/package/unstructured-client/v/0.21.1 - .

## 2025-03-15 16:57:48
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.517.3 (2.548.6) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.22.0] .
### Releases
- [NPM v0.22.0] https://www.npmjs.com/package/unstructured-client/v/0.22.0 - .
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "unstructured-client",
"version": "0.22.1",
"version": "0.22.0",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unstructured-client",
"version": "0.22.1",
"version": "0.22.0",
"author": "Unstructured",
"type": "module",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.81",
sdkVersion: "0.22.1",
sdkVersion: "0.22.0",
genVersion: "2.548.6",
userAgent:
"speakeasy-sdk/typescript 0.22.1 2.548.6 1.0.81 unstructured-client",
"speakeasy-sdk/typescript 0.22.0 2.548.6 1.0.81 unstructured-client",
} as const;
2 changes: 1 addition & 1 deletion src/mcp-server/mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const routes = buildRouteMap({
export const app = buildApplication(routes, {
name: "mcp",
versionInfo: {
currentVersion: "0.22.1",
currentVersion: "0.22.0",
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function createMCPServer(deps: {
}) {
const server = new McpServer({
name: "UnstructuredClient",
version: "0.22.1",
version: "0.22.0",
});

const client = new UnstructuredClientCore({
Expand Down
2 changes: 1 addition & 1 deletion test/integration/HttpsCheckHook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ describe("HttpsCheckHook integration tests", () => {
},
});

expect(res.statusCode).toEqual(200);
expect(res.length).toBeGreaterThan(0)
});
});
32 changes: 13 additions & 19 deletions test/integration/SplitPdfHook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,16 @@ describe("SplitPdfHook integration tests check splitted file is same as not spli
},
});

expect(respSplit.elements?.length).toEqual(respSingle.elements?.length);
expect(respSplit.contentType).toEqual(respSingle.contentType);
expect(respSplit.statusCode).toEqual(respSingle.statusCode);

expect(respSplit.length).toEqual(respSingle.length);
// Remove 'parent_id' metadata
const splitElements = respSplit.elements?.map((el) => ({
const splitElements = respSplit.map((el) => ({
...el,
metadata: {
...el['metadata'],
parent_id: undefined,
},
}));
const singleElements = respSingle.elements?.map((el) => ({
const singleElements = respSingle.map((el) => ({
...el,
metadata: {
...el['metadata'],
Expand Down Expand Up @@ -323,9 +320,9 @@ describe("SplitPdfHook integration tests page range parameter", () => {
const filename = "test/data/layout-parser-paper.pdf";
const file = { content: readFileSync(filename), fileName: filename };

let startingPageNumber = 1;
const startingPageNumber = 1;
try {
let response = await client.general.partition({
const response = await client.general.partition({
partitionParameters: {
files: file,
strategy: Strategy.Fast,
Expand All @@ -336,7 +333,7 @@ describe("SplitPdfHook integration tests page range parameter", () => {

// Grab the set of page numbers in the result
// Assert that all returned elements are in the expected page range
const pageNumbers = new Set(response?.elements?.map((element: any) => element.metadata.page_number));
const pageNumbers = new Set(response?.map((element: any) => element.metadata.page_number));
const minPageNumber = expectedPages?.[0] ?? 0 + startingPageNumber - 1;
const maxPageNumber = expectedPages?.[1] ?? 0 + startingPageNumber - 1;

Expand Down Expand Up @@ -390,8 +387,7 @@ describe("SplitPDF succeeds for large PDF with high concurrency", () => {
},
});

expect(res.statusCode).toEqual(200);
expect(res.elements?.length).toBeGreaterThan(0);
expect(res.length).toBeGreaterThan(0);
},
300000);
});
Expand Down Expand Up @@ -440,10 +436,9 @@ describe("SplitPDF async can be used to send multiple files concurrently", () =>
...requestParams
},
});
expect(res.statusCode).toEqual(200);
expect(res.elements?.length).toBeGreaterThan(0);
if (res.elements) {
serialElements.push(res.elements);
expect(res.length).toBeGreaterThan(0);
if (res) {
serialElements.push(res);
}
}

Expand All @@ -456,10 +451,9 @@ describe("SplitPDF async can be used to send multiple files concurrently", () =>
));

for (const res of concurrentResponses) {
expect(res.statusCode).toEqual(200);
expect(res.elements?.length).toBeGreaterThan(0);
if (res.elements) {
concurrentElements.push(res.elements);
expect(res.length).toBeGreaterThan(0);
if (res) {
concurrentElements.push(res);
}
}

Expand Down