Skip to content

Commit a43a003

Browse files
feat(api): update via SDK Studio
1 parent 4bedf3d commit a43a003

7 files changed

Lines changed: 75 additions & 81 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 17
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scan-documents%2Fscan-documents-89170108a4ff25a4120f8723c8c03382b8cc176008e091b90ec26fbd3613b199.yml
33
openapi_spec_hash: a627d69beb662fa6e8bd9c0ace7bf243
4-
config_hash: c0982818f8942bd915b5e0d65b61be67
4+
config_hash: 4f1180f734cbc7323ff2ed85a9cd510d

api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Shared
2+
3+
Types:
4+
5+
- <code><a href="./src/resources/shared.ts">JsonSchemaSpec</a></code>
6+
17
# Files
28

39
Types:

packages/mcp-server/src/tools/image-operations/extract-text-image-operations.ts

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -71,41 +71,46 @@ export const tool: Tool = {
7171
description: 'The id of the file to operate on.',
7272
},
7373
schema: {
74+
$ref: '#/$defs/json_schema_spec',
75+
},
76+
},
77+
},
78+
],
79+
$defs: {
80+
json_schema_spec: {
81+
type: 'object',
82+
description:
83+
"An OpenAPI schema object describing the expected JSON structure. Required if format is 'json'.",
84+
properties: {
85+
description: {
86+
type: 'string',
87+
},
88+
example: {
89+
type: 'object',
90+
},
91+
format: {
92+
type: 'string',
93+
},
94+
items: {
95+
$ref: '#/$defs/json_schema_spec',
96+
},
97+
properties: {
7498
type: 'object',
75-
description:
76-
"An OpenAPI schema object describing the expected JSON structure. Required if format is 'json'.",
77-
properties: {
78-
description: {
79-
type: 'string',
80-
},
81-
example: {
82-
type: 'object',
83-
},
84-
format: {
85-
type: 'string',
86-
},
87-
items: {
88-
type: 'object',
89-
},
90-
properties: {
91-
type: 'object',
92-
},
93-
required: {
94-
type: 'array',
95-
items: {
96-
type: 'string',
97-
},
98-
},
99-
type: {
100-
type: 'string',
101-
enum: ['string', 'number', 'integer', 'boolean', 'array', 'object'],
102-
},
99+
},
100+
required: {
101+
type: 'array',
102+
items: {
103+
type: 'string',
103104
},
104-
required: [],
105+
},
106+
type: {
107+
type: 'string',
108+
enum: ['string', 'number', 'integer', 'boolean', 'array', 'object'],
105109
},
106110
},
111+
required: [],
107112
},
108-
],
113+
},
109114
},
110115
};
111116

src/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,4 +791,6 @@ export declare namespace ScanDocuments {
791791
type PdfOperationRenderParams as PdfOperationRenderParams,
792792
type PdfOperationSplitParams as PdfOperationSplitParams,
793793
};
794+
795+
export type JsonSchemaSpec = API.JsonSchemaSpec;
794796
}

src/resources/image-operations.ts

Lines changed: 3 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { APIResource } from '../core/resource';
44
import * as ImageOperationsAPI from './image-operations';
5+
import * as Shared from './shared';
56
import { APIPromise } from '../core/api-promise';
67
import { RequestOptions } from '../internal/request-options';
78

@@ -804,31 +805,7 @@ export namespace ExtractTextRequest {
804805
* An OpenAPI schema object describing the expected JSON structure. Required if
805806
* format is 'json'.
806807
*/
807-
schema: Json.Schema;
808-
}
809-
810-
export namespace Json {
811-
/**
812-
* An OpenAPI schema object describing the expected JSON structure. Required if
813-
* format is 'json'.
814-
*/
815-
export interface Schema {
816-
description?: string;
817-
818-
example?: unknown;
819-
820-
format?: string;
821-
822-
items?: unknown;
823-
824-
properties?: Record<string, unknown>;
825-
826-
required?: Array<string>;
827-
828-
type?: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
829-
830-
[k: string]: unknown;
831-
}
808+
schema: Shared.JsonSchemaSpec;
832809
}
833810
}
834811

@@ -1377,31 +1354,7 @@ export declare namespace ImageOperationExtractTextParams {
13771354
* An OpenAPI schema object describing the expected JSON structure. Required if
13781355
* format is 'json'.
13791356
*/
1380-
schema: Json.Schema;
1381-
}
1382-
1383-
export namespace Json {
1384-
/**
1385-
* An OpenAPI schema object describing the expected JSON structure. Required if
1386-
* format is 'json'.
1387-
*/
1388-
export interface Schema {
1389-
description?: string;
1390-
1391-
example?: unknown;
1392-
1393-
format?: string;
1394-
1395-
items?: unknown;
1396-
1397-
properties?: Record<string, unknown>;
1398-
1399-
required?: Array<string>;
1400-
1401-
type?: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
1402-
1403-
[k: string]: unknown;
1404-
}
1357+
schema: Shared.JsonSchemaSpec;
14051358
}
14061359
}
14071360

src/resources/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
export * from './shared';
34
export { Events, type EventListResponse, type EventListParams } from './events';
45
export { Files, type File, type FileListResponse, type FileListParams, type FileUploadParams } from './files';
56
export {

src/resources/shared.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
/**
4+
* An OpenAPI schema object describing the expected JSON structure. Required if
5+
* format is 'json'.
6+
*/
7+
export interface JsonSchemaSpec {
8+
description?: string;
9+
10+
example?: unknown;
11+
12+
format?: string;
13+
14+
/**
15+
* An OpenAPI schema object describing the expected JSON structure. Required if
16+
* format is 'json'.
17+
*/
18+
items?: JsonSchemaSpec;
19+
20+
properties?: Record<string, JsonSchemaSpec>;
21+
22+
required?: Array<string>;
23+
24+
type?: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
25+
26+
[k: string]: unknown;
27+
}

0 commit comments

Comments
 (0)