Skip to content

Commit 43ac43c

Browse files
chore: 🐝 Update SDK - Generate 0.24.1 (#148)
> [!IMPORTANT] > Linting report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/linting-report/3e9641b919e1c51ede68d67a8c01e09a> > OpenAPI Change report available at: <https://app.speakeasy.com/org/unstructured/unstructured5xr/changes-report/6c024423b46313f44f2642b3b1f6710a> # SDK update Based on: - OpenAPI Doc - Speakeasy CLI 1.531.0 (2.568.2) https://github.com/speakeasy-api/speakeasy ## Versioning Version Bump Type: [patch] - 🤖 (automated) ## OpenAPI Change Summary ``` ├─┬Info │ ├──[🔀] title (4:14) │ └──[🔀] version (5:16) ├─┬Servers │ └──[➖] servers (1:220)❌ └─┬Components └─┬partition_parameters └─┬vlm_model └──[➕] enum (356:15) ``` | Document Element | Total Changes | Breaking Changes | |------------------|---------------|------------------| | servers | 1 | 1 | | components | 1 | 0 | | info | 2 | 0 | ## TYPESCRIPT CHANGELOG ## core: 3.21.5 - 2025-04-03 ### 🐛 Bug Fixes - improve performance of generation on multicore machines and various fixes to correctness based on order of generation *(commit by [@TristanSpeakEasy](https://github.com/tristanspeakeasy))* ## mcpServer: 0.9.1 - 2025-04-04 ### 🐛 Bug Fixes - correctly handle partial scopes *(commit by [@ryan-timothy-albert](https://github.com/ryan-timothy-albert))* Co-authored-by: speakeasybot <[email protected]>
1 parent caee4fe commit 43ac43c

25 files changed

+93
-62
lines changed

.speakeasy/gen.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: f42cb8e6-e2ce-4565-b975-5a9f38b94d5a
33
management:
4-
docChecksum: 836a71c214bbd252ed63f3ce3ba6b20f
5-
docVersion: 1.1.4
6-
speakeasyVersion: 1.526.0
7-
generationVersion: 2.563.0
8-
releaseVersion: 0.24.0
9-
configChecksum: bf57ed240e6647b8f46d61e7a668981f
4+
docChecksum: 9e84e8d53fbc7c48d4bf35240b476a5b
5+
docVersion: 1.1.7
6+
speakeasyVersion: 1.531.0
7+
generationVersion: 2.568.2
8+
releaseVersion: 0.24.1
9+
configChecksum: e318c02067c106739f38d2f8e11f5407
1010
repoURL: https://github.com/Unstructured-IO/unstructured-js-client.git
1111
repoSubDirectory: .
1212
installationURL: https://github.com/Unstructured-IO/unstructured-js-client
@@ -16,15 +16,15 @@ features:
1616
acceptHeaders: 2.81.2
1717
additionalDependencies: 0.1.0
1818
constsAndDefaults: 0.1.11
19-
core: 3.21.4
19+
core: 3.21.5
2020
defaultEnabledRetries: 0.1.0
2121
enumUnions: 0.1.0
2222
envVarSecurityUsage: 0.1.2
2323
examples: 2.81.5
2424
globalSecurity: 2.82.13
2525
globalSecurityCallbacks: 0.1.0
2626
globalServerURLs: 2.82.4
27-
mcpServer: 0.9.0
27+
mcpServer: 0.9.1
2828
nameOverrides: 2.81.2
2929
nullables: 0.1.1
3030
openEnums: 0.1.1
@@ -133,5 +133,5 @@ examples:
133133
application/json: {"detail": []}
134134
5XX:
135135
application/json: {"detail": "An error occurred"}
136-
examplesVersion: 1.0.0
136+
examplesVersion: 1.0.1
137137
generatedTests: {}

.speakeasy/workflow.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.526.0
1+
speakeasyVersion: 1.531.0
22
sources:
33
my-source:
44
sourceNamespace: my-source
5-
sourceRevisionDigest: sha256:48993802cc67795e3789ee890eef5fe1c982a2b35e88e24945abe11831725e11
6-
sourceBlobDigest: sha256:a010b23fbfe96d4c7f91bffa6d9247d90e8e0f499e7b99f81f0d30af125517cf
5+
sourceRevisionDigest: sha256:7560ec216c554bca569c62c9ab518f0218f24cfb66f0e57b136b07d2c0a9b73e
6+
sourceBlobDigest: sha256:2f8e18d1de0c41db8af50b06c236c6e68fe38a884a4f04aef5a04591af60cb7b
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1743121795
10-
- 1.1.4
9+
- speakeasy-sdk-regen-1744072198
10+
- 1.1.7
1111
targets:
1212
unstructed-typescript:
1313
source: my-source
1414
sourceNamespace: my-source
15-
sourceRevisionDigest: sha256:48993802cc67795e3789ee890eef5fe1c982a2b35e88e24945abe11831725e11
16-
sourceBlobDigest: sha256:a010b23fbfe96d4c7f91bffa6d9247d90e8e0f499e7b99f81f0d30af125517cf
15+
sourceRevisionDigest: sha256:7560ec216c554bca569c62c9ab518f0218f24cfb66f0e57b136b07d2c0a9b73e
16+
sourceBlobDigest: sha256:2f8e18d1de0c41db8af50b06c236c6e68fe38a884a4f04aef5a04591af60cb7b
1717
codeSamplesNamespace: my-source-typescript-code-samples
18-
codeSamplesRevisionDigest: sha256:088b6af4d3d80368306b838d59c11f499eea3ec8fa83c000175d551671195cb5
18+
codeSamplesRevisionDigest: sha256:aea1e9a86c9c9aec7564f8fdc04f3e75a6a02912b25a3cd7c57c7ff3c8e320ee
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

FUNCTIONS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const unstructuredClient = new UnstructuredClientCore();
3232
async function run() {
3333
const res = await generalPartition(unstructuredClient, {
3434
partitionParameters: {
35-
files: await openAsBlob("example.file"),
3635
chunkingStrategy: "by_title",
36+
files: await openAsBlob("example.file"),
3737
splitPdfPageRange: [
3838
1,
3939
10,

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ const unstructuredClient = new UnstructuredClient();
215215
async function run() {
216216
const result = await unstructuredClient.general.partition({
217217
partitionParameters: {
218-
files: await openAsBlob("example.file"),
219218
chunkingStrategy: "by_title",
219+
files: await openAsBlob("example.file"),
220220
splitPdfPageRange: [
221221
1,
222222
10,
@@ -270,8 +270,8 @@ const unstructuredClient = new UnstructuredClient({
270270
async function run() {
271271
const result = await unstructuredClient.general.partition({
272272
partitionParameters: {
273-
files: await openAsBlob("example.file"),
274273
chunkingStrategy: "by_title",
274+
files: await openAsBlob("example.file"),
275275
splitPdfPageRange: [
276276
1,
277277
10,
@@ -387,8 +387,8 @@ const unstructuredClient = new UnstructuredClient();
387387
async function run() {
388388
const result = await unstructuredClient.general.partition({
389389
partitionParameters: {
390-
files: await openAsBlob("example.file"),
391390
chunkingStrategy: "by_title",
391+
files: await openAsBlob("example.file"),
392392
splitPdfPageRange: [
393393
1,
394394
10,

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -564,4 +564,14 @@ Based on:
564564
### Generated
565565
- [typescript v0.24.0] .
566566
### Releases
567-
- [NPM v0.24.0] https://www.npmjs.com/package/unstructured-client/v/0.24.0 - .
567+
- [NPM v0.24.0] https://www.npmjs.com/package/unstructured-client/v/0.24.0 - .
568+
569+
## 2025-04-08 00:29:42
570+
### Changes
571+
Based on:
572+
- OpenAPI Doc
573+
- Speakeasy CLI 1.531.0 (2.568.2) https://github.com/speakeasy-api/speakeasy
574+
### Generated
575+
- [typescript v0.24.1] .
576+
### Releases
577+
- [NPM v0.24.1] https://www.npmjs.com/package/unstructured-client/v/0.24.1 - .

USAGE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const unstructuredClient = new UnstructuredClient();
1212
async function run() {
1313
const result = await unstructuredClient.general.partition({
1414
partitionParameters: {
15-
files: await openAsBlob("example.file"),
1615
chunkingStrategy: "by_title",
16+
files: await openAsBlob("example.file"),
1717
splitPdfPageRange: [
1818
1,
1919
10,

docs/sdk/models/errors/detail.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
const value: shared.ValidationError[] = [
1010
{
1111
loc: [
12-
715190,
12+
569227,
1313
],
1414
msg: "<value>",
1515
type: "<value>",

docs/sdk/models/shared/loc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ const value: string = "<value>";
1212
### `number`
1313

1414
```typescript
15-
const value: number = 602763;
15+
const value: number = 128403;
1616
```
1717

docs/sdk/models/shared/outputformat.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The format of the response. Supported formats are application/json and text/csv.
77
```typescript
88
import { OutputFormat } from "unstructured-client/sdk/models/shared";
99

10-
let value: OutputFormat = OutputFormat.TextCsv;
10+
let value: OutputFormat = OutputFormat.ApplicationJson;
1111
```
1212

1313
## Values

docs/sdk/models/shared/partitionparameters.md

+1-1
Large diffs are not rendered by default.

docs/sdk/models/shared/strategy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The strategy to use for partitioning PDF/image. Options are fast, hi_res, auto.
77
```typescript
88
import { Strategy } from "unstructured-client/sdk/models/shared";
99

10-
let value: Strategy = Strategy.HiRes;
10+
let value: Strategy = Strategy.Vlm;
1111
```
1212

1313
## Values

docs/sdk/models/shared/validationerror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ValidationError } from "unstructured-client/sdk/models/shared";
77

88
let value: ValidationError = {
99
loc: [
10-
423655,
10+
598752,
1111
],
1212
msg: "<value>",
1313
type: "<value>",

docs/sdk/models/shared/vlmmodel.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This is an open enum. Unrecognized values will be captured as the `Unrecognized<
1717
| Name | Value |
1818
| -------------------------------------------- | -------------------------------------------- |
1919
| `Claude35Sonnet20241022` | claude-3-5-sonnet-20241022 |
20+
| `Claude37Sonnet20250219` | claude-3-7-sonnet-20250219 |
2021
| `Gpt4o` | gpt-4o |
2122
| `Gemini15Pro` | gemini-1.5-pro |
2223
| `UsAmazonNovaProV10` | us.amazon.nova-pro-v1:0 |

docs/sdks/general/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const unstructuredClient = new UnstructuredClient();
2323
async function run() {
2424
const result = await unstructuredClient.general.partition({
2525
partitionParameters: {
26-
files: await openAsBlob("example.file"),
2726
chunkingStrategy: "by_title",
27+
files: await openAsBlob("example.file"),
2828
splitPdfPageRange: [
2929
1,
3030
10,
@@ -58,8 +58,8 @@ const unstructuredClient = new UnstructuredClientCore();
5858
async function run() {
5959
const res = await generalPartition(unstructuredClient, {
6060
partitionParameters: {
61-
files: await openAsBlob("example.file"),
6261
chunkingStrategy: "by_title",
62+
files: await openAsBlob("example.file"),
6363
splitPdfPageRange: [
6464
1,
6565
10,

gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation:
1212
oAuth2ClientCredentialsEnabled: false
1313
oAuth2PasswordEnabled: false
1414
typescript:
15-
version: 0.24.0
15+
version: 0.24.1
1616
additionalDependencies:
1717
dependencies:
1818
async: ^3.2.5

jsr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "unstructured-client",
5-
"version": "0.24.0",
5+
"version": "0.24.1",
66
"exports": {
77
".": "./src/index.ts",
88
"./sdk/models/errors": "./src/sdk/models/errors/index.ts",

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unstructured-client",
3-
"version": "0.24.0",
3+
"version": "0.24.1",
44
"author": "Unstructured",
55
"type": "module",
66
"bin": {

src/lib/config.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import { Params, pathToFunc } from "./url.js";
1212
* Serverless SaaS API
1313
*/
1414
export const ServerSaasApi = "saas-api";
15-
/**
16-
* Hosted API Free
17-
*/
18-
export const ServerFreeApi = "free-api";
1915
/**
2016
* Development server
2117
*/
@@ -25,7 +21,6 @@ export const ServerDevelopment = "development";
2521
*/
2622
export const ServerList = {
2723
[ServerSaasApi]: "https://api.unstructuredapp.io",
28-
[ServerFreeApi]: "https://api.unstructured.io",
2924
[ServerDevelopment]: "http://localhost:8000",
3025
} as const;
3126

@@ -68,9 +63,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
6863

6964
export const SDK_METADATA = {
7065
language: "typescript",
71-
openapiDocVersion: "1.1.4",
72-
sdkVersion: "0.24.0",
73-
genVersion: "2.563.0",
66+
openapiDocVersion: "1.1.7",
67+
sdkVersion: "0.24.1",
68+
genVersion: "2.568.2",
7469
userAgent:
75-
"speakeasy-sdk/typescript 0.24.0 2.563.0 1.1.4 unstructured-client",
70+
"speakeasy-sdk/typescript 0.24.1 2.568.2 1.1.7 unstructured-client",
7671
} as const;

src/mcp-server/mcp-server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
1919
export const app = buildApplication(routes, {
2020
name: "mcp",
2121
versionInfo: {
22-
currentVersion: "0.24.0",
22+
currentVersion: "0.24.1",
2323
},
2424
});
2525

src/mcp-server/prompts.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,14 @@ export function createRegisterPrompt(
7474
prompt: PromptDefinition<A>,
7575
): void => {
7676
const scopes = prompt.scopes ?? [];
77-
if (!scopes.every((s: MCPScope) => allowedScopes.has(s))) {
77+
if (allowedScopes.size > 0 && scopes.length === 0) {
78+
return;
79+
}
80+
81+
if (
82+
allowedScopes.size > 0
83+
&& !scopes.every((s: MCPScope) => allowedScopes.has(s))
84+
) {
7885
return;
7986
}
8087

src/mcp-server/resources.ts

+16-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ export function createRegisterResource(
109109
): (resource: ResourceDefinition) => void {
110110
return (resource: ResourceDefinition): void => {
111111
const scopes = resource.scopes ?? [];
112-
if (!scopes.every((s: MCPScope) => allowedScopes.has(s))) {
112+
if (allowedScopes.size > 0 && scopes.length === 0) {
113+
return;
114+
}
115+
116+
if (
117+
allowedScopes.size > 0
118+
&& !scopes.every((s: MCPScope) => allowedScopes.has(s))
119+
) {
113120
return;
114121
}
115122

@@ -137,7 +144,14 @@ export function createRegisterResourceTemplate(
137144
): (resource: ResourceTemplateDefinition) => void {
138145
return (resource: ResourceTemplateDefinition): void => {
139146
const scopes = resource.scopes ?? [];
140-
if (!scopes.every((s: MCPScope) => allowedScopes.has(s))) {
147+
if (allowedScopes.size > 0 && scopes.length === 0) {
148+
return;
149+
}
150+
151+
if (
152+
allowedScopes.size > 0
153+
&& !scopes.every((s: MCPScope) => allowedScopes.has(s))
154+
) {
141155
return;
142156
}
143157

src/mcp-server/server.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
createRegisterResource,
1313
createRegisterResourceTemplate,
1414
} from "./resources.js";
15-
import { MCPScope, mcpScopes } from "./scopes.js";
15+
import { MCPScope } from "./scopes.js";
1616
import { registerMCPExtensions } from "./server.extensions.js";
1717
import { createRegisterTool } from "./tools.js";
1818
import { tool$generalPartition } from "./tools/generalPartition.js";
@@ -27,7 +27,7 @@ export function createMCPServer(deps: {
2727
}) {
2828
const server = new McpServer({
2929
name: "UnstructuredClient",
30-
version: "0.24.0",
30+
version: "0.24.1",
3131
});
3232

3333
const client = new UnstructuredClientCore({
@@ -36,7 +36,7 @@ export function createMCPServer(deps: {
3636
server: deps.server,
3737
});
3838

39-
const scopes = new Set(deps.scopes ?? mcpScopes);
39+
const scopes = new Set(deps.scopes);
4040

4141
const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
4242
const tool = createRegisterTool(

src/mcp-server/tools.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,15 @@ export function createRegisterTool(
102102
return;
103103
}
104104

105-
const toolScopes = tool.scopes ?? [];
106-
if (allowedScopes.size > 0 && toolScopes.length === 0) {
105+
const scopes = tool.scopes ?? [];
106+
if (allowedScopes.size > 0 && scopes.length === 0) {
107107
return;
108108
}
109109

110-
if (!toolScopes.every((s) => allowedScopes.has(s))) {
110+
if (
111+
allowedScopes.size > 0
112+
&& !scopes.every((s: MCPScope) => allowedScopes.has(s))
113+
) {
111114
return;
112115
}
113116

0 commit comments

Comments
 (0)