Skip to content
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

chore: 🐝 Update SDK - Generate 0.24.0 #147

Merged
merged 1 commit into from
Mar 31, 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
14 changes: 7 additions & 7 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: 2e7f129641ad96d49fcda2ceb173d43c
docVersion: 1.0.81
speakeasyVersion: 1.519.0
generationVersion: 2.552.1
releaseVersion: 0.23.0
configChecksum: 86d5f752c6378b160f1e0a2fb1b0cea7
docChecksum: 836a71c214bbd252ed63f3ce3ba6b20f
docVersion: 1.1.4
speakeasyVersion: 1.526.0
generationVersion: 2.563.0
releaseVersion: 0.24.0
configChecksum: bf57ed240e6647b8f46d61e7a668981f
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
repoSubDirectory: .
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
Expand All @@ -24,7 +24,7 @@ features:
globalSecurity: 2.82.13
globalSecurityCallbacks: 0.1.0
globalServerURLs: 2.82.4
mcpServer: 0.8.0
mcpServer: 0.9.0
nameOverrides: 2.81.2
nullables: 0.1.1
openEnums: 0.1.1
Expand Down
15 changes: 8 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
speakeasyVersion: 1.519.0
speakeasyVersion: 1.526.0
sources:
my-source:
sourceNamespace: my-source
sourceRevisionDigest: sha256:acb76c58ac398f0d1ea1f9eef8df422c40d5a237c7cf020522258b327792a68d
sourceBlobDigest: sha256:822e38da0c61b9aeaa5446413a6cec058a464920a02d20d9ee7955c827446050
sourceRevisionDigest: sha256:48993802cc67795e3789ee890eef5fe1c982a2b35e88e24945abe11831725e11
sourceBlobDigest: sha256:a010b23fbfe96d4c7f91bffa6d9247d90e8e0f499e7b99f81f0d30af125517cf
tags:
- latest
- 1.0.81
- speakeasy-sdk-regen-1743121795
- 1.1.4
targets:
unstructed-typescript:
source: my-source
sourceNamespace: my-source
sourceRevisionDigest: sha256:acb76c58ac398f0d1ea1f9eef8df422c40d5a237c7cf020522258b327792a68d
sourceBlobDigest: sha256:822e38da0c61b9aeaa5446413a6cec058a464920a02d20d9ee7955c827446050
sourceRevisionDigest: sha256:48993802cc67795e3789ee890eef5fe1c982a2b35e88e24945abe11831725e11
sourceBlobDigest: sha256:a010b23fbfe96d4c7f91bffa6d9247d90e8e0f499e7b99f81f0d30af125517cf
codeSamplesNamespace: my-source-typescript-code-samples
codeSamplesRevisionDigest: sha256:bc9b9485931a5f01bce3a872cdba2295e5aa3e155f52890568c3e8b18c9fd66d
codeSamplesRevisionDigest: sha256:088b6af4d3d80368306b838d59c11f499eea3ec8fa83c000175d551671195cb5
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 @@ -554,4 +554,14 @@ Based on:
### Generated
- [typescript v0.22.0] .
### Releases
- [NPM v0.22.0] https://www.npmjs.com/package/unstructured-client/v/0.22.0 - .
- [NPM v0.22.0] https://www.npmjs.com/package/unstructured-client/v/0.22.0 - .

## 2025-03-31 00:31:49
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.526.0 (2.563.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.24.0] .
### Releases
- [NPM v0.24.0] https://www.npmjs.com/package/unstructured-client/v/0.24.0 - .
4 changes: 4 additions & 0 deletions docs/sdk/models/shared/partitionparameters.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.23.0
version: 0.24.0
additionalDependencies:
dependencies:
async: ^3.2.5
Expand Down
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.23.0",
"version": "0.24.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.23.0",
"version": "0.24.0",
"author": "Unstructured",
"type": "module",
"bin": {
Expand Down
28 changes: 28 additions & 0 deletions src/funcs/generalPartition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,34 @@ async function $do(
payload.partition_parameters.pdf_infer_table_structure,
);
}
if (payload.partition_parameters.pdfminer_char_margin !== undefined) {
appendForm(
body,
"pdfminer_char_margin",
payload.partition_parameters.pdfminer_char_margin,
);
}
if (payload.partition_parameters.pdfminer_line_margin !== undefined) {
appendForm(
body,
"pdfminer_line_margin",
payload.partition_parameters.pdfminer_line_margin,
);
}
if (payload.partition_parameters.pdfminer_line_overlap !== undefined) {
appendForm(
body,
"pdfminer_line_overlap",
payload.partition_parameters.pdfminer_line_overlap,
);
}
if (payload.partition_parameters.pdfminer_word_margin !== undefined) {
appendForm(
body,
"pdfminer_word_margin",
payload.partition_parameters.pdfminer_word_margin,
);
}
if (payload.partition_parameters.similarity_threshold !== undefined) {
appendForm(
body,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SecurityState } from "../lib/security.js";
export type HookContext = {
baseURL: string | URL;
operationID: string;
oAuth2Scopes?: string[];
oAuth2Scopes: string[] | null;
securitySource?: any | (() => Promise<any>);
retryConfig: RetryConfig;
resolvedSecurity: SecurityState | null;
Expand Down
8 changes: 4 additions & 4 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {

export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "1.0.81",
sdkVersion: "0.23.0",
genVersion: "2.552.1",
openapiDocVersion: "1.1.4",
sdkVersion: "0.24.0",
genVersion: "2.563.0",
userAgent:
"speakeasy-sdk/typescript 0.23.0 2.552.1 1.0.81 unstructured-client",
"speakeasy-sdk/typescript 0.24.0 2.563.0 1.1.4 unstructured-client",
} as const;
14 changes: 11 additions & 3 deletions src/lib/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

import * as shared from "../sdk/models/shared/index.js";

type OAuth2PasswordFlow = {
username: string;
password?: string | undefined;
Expand Down Expand Up @@ -84,7 +85,9 @@ type SecurityInputOAuth2ClientCredentials = {
value:
| { clientID?: string | undefined; clientSecret?: string | undefined }
| null
| string
| undefined;
fieldName?: string;
};

type SecurityInputOAuth2PasswordCredentials = {
Expand All @@ -93,13 +96,13 @@ type SecurityInputOAuth2PasswordCredentials = {
| string
| null
| undefined;
fieldName: string;
fieldName?: string;
};

type SecurityInputCustom = {
type: "http:custom";
value: any | null | undefined;
fieldName: string;
fieldName?: string;
};

export type SecurityInput =
Expand Down Expand Up @@ -136,6 +139,9 @@ export function resolveSecurity(
typeof o.value === "string" && !!o.value
);
} else if (o.type === "oauth2:client_credentials") {
if (typeof o.value == "string") {
return !!o.value;
}
return o.value.clientID != null || o.value.clientSecret != null;
} else if (typeof o.value === "string") {
return !!o.value;
Expand Down Expand Up @@ -224,7 +230,9 @@ function applyBearer(
value = `Bearer ${value}`;
}

state.headers[spec.fieldName] = value;
if (spec.fieldName !== undefined) {
state.headers[spec.fieldName] = value;
}
}

export function resolveGlobalSecurity(
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.23.0",
currentVersion: "0.24.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 @@ -27,7 +27,7 @@ export function createMCPServer(deps: {
}) {
const server = new McpServer({
name: "UnstructuredClient",
version: "0.23.0",
version: "0.24.0",
});

const client = new UnstructuredClientCore({
Expand Down
36 changes: 36 additions & 0 deletions src/sdk/models/shared/partitionparameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,22 @@ export type PartitionParameters = {
* Deprecated! Use skip_infer_table_types to opt out of table extraction for any file type. If False and strategy=hi_res, no Table Elements will be extracted from pdf files regardless of skip_infer_table_types contents.
*/
pdfInferTableStructure?: boolean | undefined;
/**
* If two characters are closer together than this margin they are considered part of the same line. The margin is specified relative to the width of the character.
*/
pdfminerCharMargin?: number | null | undefined;
/**
* If two lines are close together they are considered to be part of the same paragraph. The margin is specified relative to the height of a line.
*/
pdfminerLineMargin?: number | null | undefined;
/**
* If two characters have more overlap than this they are considered to be on the same line. The overlap is specified relative to the minimum height of both characters.
*/
pdfminerLineOverlap?: number | null | undefined;
/**
* If two characters on the same line are further apart than this margin then they are considered to be two separate words, and an intermediate space will be added for readability. The margin is specified relative to the width of the character.
*/
pdfminerWordMargin?: number | null | undefined;
/**
* A value between 0.0 and 1.0 describing the minimum similarity two elements must have to be included in the same chunk. Note that similar elements may be separated to meet chunk-size criteria; this value can only guarantees that two elements with similarity below the threshold will appear in separate chunks.
*/
Expand Down Expand Up @@ -446,6 +462,10 @@ export const PartitionParameters$inboundSchema: z.ZodType<
overlap: z.number().int().default(0),
overlap_all: z.boolean().default(false),
pdf_infer_table_structure: z.boolean().default(true),
pdfminer_char_margin: z.nullable(z.number()).optional(),
pdfminer_line_margin: z.nullable(z.number()).optional(),
pdfminer_line_overlap: z.nullable(z.number()).optional(),
pdfminer_word_margin: z.nullable(z.number()).optional(),
similarity_threshold: z.nullable(z.number()).optional(),
skip_infer_table_types: z.array(z.string()).optional(),
split_pdf_allow_failed: z.boolean().default(false),
Expand Down Expand Up @@ -477,6 +497,10 @@ export const PartitionParameters$inboundSchema: z.ZodType<
"output_format": "outputFormat",
"overlap_all": "overlapAll",
"pdf_infer_table_structure": "pdfInferTableStructure",
"pdfminer_char_margin": "pdfminerCharMargin",
"pdfminer_line_margin": "pdfminerLineMargin",
"pdfminer_line_overlap": "pdfminerLineOverlap",
"pdfminer_word_margin": "pdfminerWordMargin",
"similarity_threshold": "similarityThreshold",
"skip_infer_table_types": "skipInferTableTypes",
"split_pdf_allow_failed": "splitPdfAllowFailed",
Expand Down Expand Up @@ -515,6 +539,10 @@ export type PartitionParameters$Outbound = {
overlap: number;
overlap_all: boolean;
pdf_infer_table_structure: boolean;
pdfminer_char_margin?: number | null | undefined;
pdfminer_line_margin?: number | null | undefined;
pdfminer_line_overlap?: number | null | undefined;
pdfminer_word_margin?: number | null | undefined;
similarity_threshold?: number | null | undefined;
skip_infer_table_types?: Array<string> | undefined;
split_pdf_allow_failed: boolean;
Expand Down Expand Up @@ -559,6 +587,10 @@ export const PartitionParameters$outboundSchema: z.ZodType<
overlap: z.number().int().default(0),
overlapAll: z.boolean().default(false),
pdfInferTableStructure: z.boolean().default(true),
pdfminerCharMargin: z.nullable(z.number()).optional(),
pdfminerLineMargin: z.nullable(z.number()).optional(),
pdfminerLineOverlap: z.nullable(z.number()).optional(),
pdfminerWordMargin: z.nullable(z.number()).optional(),
similarityThreshold: z.nullable(z.number()).optional(),
skipInferTableTypes: z.array(z.string()).optional(),
splitPdfAllowFailed: z.boolean().default(false),
Expand Down Expand Up @@ -590,6 +622,10 @@ export const PartitionParameters$outboundSchema: z.ZodType<
outputFormat: "output_format",
overlapAll: "overlap_all",
pdfInferTableStructure: "pdf_infer_table_structure",
pdfminerCharMargin: "pdfminer_char_margin",
pdfminerLineMargin: "pdfminer_line_margin",
pdfminerLineOverlap: "pdfminer_line_overlap",
pdfminerWordMargin: "pdfminer_word_margin",
similarityThreshold: "similarity_threshold",
skipInferTableTypes: "skip_infer_table_types",
splitPdfAllowFailed: "split_pdf_allow_failed",
Expand Down