Skip to content
Open
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
18 changes: 9 additions & 9 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: f69e063f6bdd37a7b29266aa34bb30a4
docVersion: 1.2.0
speakeasyVersion: 1.636.3
generationVersion: 2.723.11
releaseVersion: 0.28.0
configChecksum: 2f7d038efc0c06515032eb8b02c062d8
docChecksum: a9cd06bdac5fb6851149f5b0e9776c5d
docVersion: 1.2.7
speakeasyVersion: 1.640.0
generationVersion: 2.730.5
releaseVersion: 0.29.0
configChecksum: 1f76a58994d947686614d3d55e7e7133
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.12
core: 3.21.26
core: 3.24.1
defaultEnabledRetries: 0.1.0
enumUnions: 0.1.0
envVarSecurityUsage: 0.1.2
Expand Down Expand Up @@ -128,7 +128,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": "auto", "unique_element_ids": false, "vlm_model": "gpt-4o", "vlm_model_provider": "openai", "xml_keep_tags": false}
multipart/form-data: {"chunking_strategy": "by_title", "coordinates": false, "do_not_break_similarity_on_footer_header": 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": "auto", "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 All @@ -139,4 +139,4 @@ examples:
application/json: {"detail": "An error occurred"}
examplesVersion: 1.0.2
generatedTests: {}
releaseNotes: "## Typescript SDK Changes Detected:\n* `unstructured_client.general.partition()`: \n * `request.partitionParameters.vlmModel` **Changed** **Breaking** :warning:\n"
releaseNotes: "## Typescript SDK Changes Detected:\n* `unstructured_client.general.partition()`: \n * `request.partitionParameters.doNotBreakSimilarityOnFooterHeader` **Added**\n"
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.636.3
speakeasyVersion: 1.640.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:05de7030a5d70689f6aa854ba186d44d83fe0951c5ae72a2310e91686946cadf
sourceBlobDigest: sha256:cfb1e6a24482556f98c7b5845db67aaf57ecbf7556a0d9904e673bfe0fc3ba7d
sourceRevisionDigest: sha256:6a1d1cac95c1b8f6ed4f055dffa907f1f96bf75b5d5bfa190f4a437048ef4865
sourceBlobDigest: sha256:e8c9fd0a7a559a840d32944c7eccb9fadbade798336b70ecd0d507e27e014d34
tags:
- latest
- speakeasy-sdk-regen-1760488307
- 1.2.0
- speakeasy-sdk-regen-1761265716
- 1.2.7
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:05de7030a5d70689f6aa854ba186d44d83fe0951c5ae72a2310e91686946cadf
sourceBlobDigest: sha256:cfb1e6a24482556f98c7b5845db67aaf57ecbf7556a0d9904e673bfe0fc3ba7d
sourceRevisionDigest: sha256:6a1d1cac95c1b8f6ed4f055dffa907f1f96bf75b5d5bfa190f4a437048ef4865
sourceBlobDigest: sha256:e8c9fd0a7a559a840d32944c7eccb9fadbade798336b70ecd0d507e27e014d34
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:c138bec1c39605da1156d9adb9a7ee21d9c28952f59b3f713b5400a97316ac96
codeSamplesRevisionDigest: sha256:eb4fafeb42461e65141860fa0a1c8a24a89a9b8d13a43aea73f857cf2a51d7a6
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 @@ -704,4 +704,14 @@ Based on:
### Generated
- [typescript v0.28.0] .
### Releases
- [NPM v0.28.0] https://www.npmjs.com/package/unstructured-client/v/0.28.0 - .
- [NPM v0.28.0] https://www.npmjs.com/package/unstructured-client/v/0.28.0 - .

## 2025-10-28 00:30:39
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.640.0 (2.730.5) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.29.0] .
### Releases
- [NPM v0.29.0] https://www.npmjs.com/package/unstructured-client/v/0.29.0 - .
1 change: 1 addition & 0 deletions docs/sdk/models/shared/partitionparameters.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/package-lock.json

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

5 changes: 4 additions & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
hoistGlobalSecurity: true
schemas:
allOfMergeStrategy: shallowMerge
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
typescript:
version: 0.28.0
version: 0.29.0
acceptHeaderEnum: true
additionalDependencies:
dependencies:
Expand Down Expand Up @@ -64,3 +66,4 @@ typescript:
templateVersion: v2
usageSDKInitImports: []
useIndexModules: true
zodVersion: v3
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.28.0",
"version": "0.29.0",
"exports": {
".": "./src/index.ts",
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unstructured-client",
"version": "0.28.0",
"version": "0.29.0",
"author": "Unstructured",
"type": "module",
"bin": {
Expand Down Expand Up @@ -60,7 +60,7 @@
"dependencies": {
"async": "^3.2.5",
"pdf-lib": "^1.17.1",
"zod": "^3.20.0"
"zod": "^3.25.0 || ^4.0.0"
},
"exports": {
".": {
Expand Down
10 changes: 10 additions & 0 deletions src/funcs/generalPartition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ async function $do(
if (payload.partition_parameters.coordinates !== undefined) {
appendForm(body, "coordinates", payload.partition_parameters.coordinates);
}
if (
payload.partition_parameters.do_not_break_similarity_on_footer_header
!== undefined
) {
appendForm(
body,
"do_not_break_similarity_on_footer_header",
payload.partition_parameters.do_not_break_similarity_on_footer_header,
);
}
if (payload.partition_parameters.encoding !== undefined) {
appendForm(body, "encoding", payload.partition_parameters.encoding);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/base64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";

export function bytesToBase64(u8arr: Uint8Array): string {
return btoa(String.fromCodePoint(...u8arr));
Expand Down
8 changes: 4 additions & 4 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {

export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.2.0",
sdkVersion: "0.28.0",
genVersion: "2.723.11",
openapiDocVersion: "1.2.7",
sdkVersion: "0.29.0",
genVersion: "2.730.5",
userAgent:
"speakeasy-sdk/typescript 0.28.0 2.723.11 1.2.0 unstructured-client",
"speakeasy-sdk/typescript 0.29.0 2.730.5 1.2.7 unstructured-client",
} as const;
2 changes: 1 addition & 1 deletion src/lib/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ZodObject,
ZodRawShape,
ZodTypeAny,
} from "zod";
} from "zod/v3";
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
import { ERR, OK, Result } from "../sdk/types/fp.js";

Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/cli/start/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { buildCommand } from "@stricli/core";
import * as z from "zod";
import * as z from "zod/v3";
import { ServerList } from "../../../lib/config.js";
import { consoleLoggerLevels } from "../../console-logger.js";

Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import { ZodRawShape } from "zod";
import { ZodRawShape } from "zod/v3";
import { PromptArgsRawShape, PromptDefinition } from "./prompts.js";
import { ResourceDefinition, ResourceTemplateDefinition } from "./resources.js";
import { ToolDefinition } from "./tools.js";
Expand Down
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.28.0",
currentVersion: "0.29.0",
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ZodType,
ZodTypeAny,
ZodTypeDef,
} from "zod";
} from "zod/v3";
import { UnstructuredClientCore } from "../core.js";
import { ConsoleLogger } from "./console-logger.js";
import { MCPScope } from "./scopes.js";
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 @@ -27,7 +27,7 @@ export function createMCPServer(deps: {
}) {
const server = new McpServer({
name: "UnstructuredClient",
version: "0.28.0",
version: "0.29.0",
});

const client = new UnstructuredClientCore({
Expand Down
3 changes: 1 addition & 2 deletions src/mcp-server/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";
import { bytesToBase64 } from "../lib/base64.js";

type BinaryData =
| Uint8Array
| ArrayBuffer
Expand Down
2 changes: 1 addition & 1 deletion src/mcp-server/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod";
import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod/v3";
import { UnstructuredClientCore } from "../core.js";
import { ConsoleLogger } from "./console-logger.js";
import { MCPScope } from "./scopes.js";
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/models/errors/httpvalidationerror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";
import { safeParse } from "../../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import * as shared from "../shared/index.js";
Expand Down Expand Up @@ -47,7 +47,7 @@ export type Detail$Outbound = Array<shared.ValidationError$Outbound> | string;
export const Detail$outboundSchema: z.ZodType<
Detail$Outbound,
z.ZodTypeDef,
Detail
unknown
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Inconsistent Type Parameter Reduces Schema Safety

The third type parameter of Detail$outboundSchema was changed from Detail to unknown. In Zod's ZodType<Output, Def, Input>, the third parameter represents the input type. Changing it to unknown weakens type safety by allowing any input type to be passed to the schema instead of requiring the specific Detail type. This is inconsistent with the pattern used in other schemas in the codebase (e.g., PartitionParameters$outboundSchema uses PartitionParameters as the third parameter) and could hide type errors at compile time.

Fix in CursorΒ Fix in Web

> = z.union([z.array(shared.ValidationError$outboundSchema), z.string()]);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/models/errors/responsevalidationerror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";
import { formatZodError } from "./sdkvalidationerror.js";
import { UnstructuredClientError } from "./unstructuredclienterror.js";

Expand Down
2 changes: 1 addition & 1 deletion src/sdk/models/errors/sdkvalidationerror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";

export class SDKValidationError extends Error {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/models/errors/servererror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";
import { UnstructuredClientError } from "./unstructuredclienterror.js";

export type ServerErrorData = {
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/models/operations/partition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/

import * as z from "zod";
import * as z from "zod/v3";
import { remap as remap$ } from "../../../lib/primitives.js";
import { safeParse } from "../../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
Expand Down
Loading