@openrouter/sdk 1.2.54 → 1.2.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/esm/funcs/containersDownloadContainerFileContent.d.ts +18 -0
  2. package/esm/funcs/containersDownloadContainerFileContent.js +107 -0
  3. package/esm/funcs/containersGetContainerFile.d.ts +19 -0
  4. package/esm/funcs/containersGetContainerFile.js +107 -0
  5. package/esm/funcs/containersListContainerFiles.d.ts +19 -0
  6. package/esm/funcs/containersListContainerFiles.js +108 -0
  7. package/esm/lib/config.d.ts +2 -2
  8. package/esm/lib/config.js +2 -2
  9. package/esm/models/chatcontentfile.d.ts +8 -8
  10. package/esm/models/chatcontentfile.js +8 -8
  11. package/esm/models/containerfile.d.ts +53 -0
  12. package/esm/models/containerfile.js +40 -0
  13. package/esm/models/containerfilelistresponse.d.ts +25 -0
  14. package/esm/models/containerfilelistresponse.js +31 -0
  15. package/esm/models/containerreferenceenvironment.d.ts +2 -2
  16. package/esm/models/index.d.ts +2 -0
  17. package/esm/models/index.js +2 -0
  18. package/esm/models/messagesbashtoolresultblock.d.ts +37 -0
  19. package/esm/models/messagesbashtoolresultblock.js +29 -0
  20. package/esm/models/messagesshelltoolresultblock.d.ts +37 -0
  21. package/esm/models/messagesshelltoolresultblock.js +29 -0
  22. package/esm/models/operations/downloadcontainerfilecontent.d.ts +63 -0
  23. package/esm/models/operations/downloadcontainerfilecontent.js +24 -0
  24. package/esm/models/operations/getcontainerfile.d.ts +63 -0
  25. package/esm/models/operations/getcontainerfile.js +24 -0
  26. package/esm/models/operations/index.d.ts +3 -0
  27. package/esm/models/operations/index.js +3 -0
  28. package/esm/models/operations/listcontainerfiles.d.ts +68 -0
  29. package/esm/models/operations/listcontainerfiles.js +24 -0
  30. package/esm/models/outputbashservertoolitem.d.ts +46 -5
  31. package/esm/models/outputbashservertoolitem.js +58 -5
  32. package/esm/models/outputshellcalloutputitem.d.ts +26 -0
  33. package/esm/models/outputshellcalloutputitem.js +28 -0
  34. package/esm/models/outputshellservertoolitem.d.ts +46 -5
  35. package/esm/models/outputshellservertoolitem.js +58 -5
  36. package/esm/sdk/containers.d.ts +27 -0
  37. package/esm/sdk/containers.js +39 -0
  38. package/esm/sdk/sdk.d.ts +3 -0
  39. package/esm/sdk/sdk.js +4 -0
  40. package/jsr.json +1 -1
  41. package/package.json +7 -7
@@ -0,0 +1,18 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Download container file content
13
+ *
14
+ * @remarks
15
+ * Streams the raw bytes of a file in a container.
16
+ */
17
+ export declare function containersDownloadContainerFileContent(client: OpenRouterCore, request: operations.DownloadContainerFileContentRequest, options?: RequestOptions): APIPromise<Result<ReadableStream<Uint8Array>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=containersDownloadContainerFileContent.d.ts.map
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5c9b66d827d2
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as errors from "../models/errors/index.js";
14
+ import * as operations from "../models/operations/index.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * Download container file content
18
+ *
19
+ * @remarks
20
+ * Streams the raw bytes of a file in a container.
21
+ */
22
+ export function containersDownloadContainerFileContent(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations.DownloadContainerFileContentRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = null;
32
+ const pathParams = {
33
+ container_id: encodeSimple("container_id", payload.container_id, {
34
+ explode: false,
35
+ charEncoding: "percent",
36
+ }),
37
+ file_id: encodeSimple("file_id", payload.file_id, {
38
+ explode: false,
39
+ charEncoding: "percent",
40
+ }),
41
+ };
42
+ const path = pathToFunc("/containers/{container_id}/files/{file_id}/content")(pathParams);
43
+ const headers = new Headers(compactMap({
44
+ Accept: "application/octet-stream",
45
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
46
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
47
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
48
+ }));
49
+ const secConfig = await extractSecurity(client._options.apiKey);
50
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
51
+ const requestSecurity = resolveGlobalSecurity(securityInput);
52
+ const context = {
53
+ options: client._options,
54
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
55
+ operationID: "downloadContainerFileContent",
56
+ oAuth2Scopes: null,
57
+ resolvedSecurity: requestSecurity,
58
+ securitySource: client._options.apiKey,
59
+ retryConfig: options?.retries
60
+ || client._options.retryConfig
61
+ || {
62
+ strategy: "backoff",
63
+ backoff: {
64
+ initialInterval: 500,
65
+ maxInterval: 60000,
66
+ exponent: 1.5,
67
+ maxElapsedTime: 3600000,
68
+ },
69
+ retryConnectionErrors: true,
70
+ }
71
+ || { strategy: "none" },
72
+ retryCodes: options?.retryCodes || ["5XX"],
73
+ };
74
+ const requestRes = client._createRequest(context, {
75
+ security: requestSecurity,
76
+ method: "GET",
77
+ baseURL: options?.serverURL,
78
+ path: path,
79
+ headers: headers,
80
+ body: body,
81
+ userAgent: client._options.userAgent,
82
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
83
+ }, options);
84
+ if (!requestRes.ok) {
85
+ return [requestRes, { status: "invalid" }];
86
+ }
87
+ const req = requestRes.value;
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return [doResult, { status: "request-error", request: req }];
96
+ }
97
+ const response = doResult.value;
98
+ const responseFields = {
99
+ HttpMeta: { Response: response, Request: req },
100
+ };
101
+ const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream)), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
102
+ if (!result.ok) {
103
+ return [result, { status: "complete", request: req, response }];
104
+ }
105
+ return [result, { status: "complete", request: req, response }];
106
+ }
107
+ //# sourceMappingURL=containersDownloadContainerFileContent.js.map
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * Retrieve a container file
14
+ *
15
+ * @remarks
16
+ * Returns the metadata of a single file in a container.
17
+ */
18
+ export declare function containersGetContainerFile(client: OpenRouterCore, request: operations.GetContainerFileRequest, options?: RequestOptions): APIPromise<Result<models.ContainerFile, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
+ //# sourceMappingURL=containersGetContainerFile.d.ts.map
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 9450910db6e6
4
+ */
5
+ import { encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as errors from "../models/errors/index.js";
13
+ import * as models from "../models/index.js";
14
+ import * as operations from "../models/operations/index.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * Retrieve a container file
18
+ *
19
+ * @remarks
20
+ * Returns the metadata of a single file in a container.
21
+ */
22
+ export function containersGetContainerFile(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations.GetContainerFileRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = null;
32
+ const pathParams = {
33
+ container_id: encodeSimple("container_id", payload.container_id, {
34
+ explode: false,
35
+ charEncoding: "percent",
36
+ }),
37
+ file_id: encodeSimple("file_id", payload.file_id, {
38
+ explode: false,
39
+ charEncoding: "percent",
40
+ }),
41
+ };
42
+ const path = pathToFunc("/containers/{container_id}/files/{file_id}")(pathParams);
43
+ const headers = new Headers(compactMap({
44
+ Accept: "application/json",
45
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
46
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
47
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
48
+ }));
49
+ const secConfig = await extractSecurity(client._options.apiKey);
50
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
51
+ const requestSecurity = resolveGlobalSecurity(securityInput);
52
+ const context = {
53
+ options: client._options,
54
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
55
+ operationID: "getContainerFile",
56
+ oAuth2Scopes: null,
57
+ resolvedSecurity: requestSecurity,
58
+ securitySource: client._options.apiKey,
59
+ retryConfig: options?.retries
60
+ || client._options.retryConfig
61
+ || {
62
+ strategy: "backoff",
63
+ backoff: {
64
+ initialInterval: 500,
65
+ maxInterval: 60000,
66
+ exponent: 1.5,
67
+ maxElapsedTime: 3600000,
68
+ },
69
+ retryConnectionErrors: true,
70
+ }
71
+ || { strategy: "none" },
72
+ retryCodes: options?.retryCodes || ["5XX"],
73
+ };
74
+ const requestRes = client._createRequest(context, {
75
+ security: requestSecurity,
76
+ method: "GET",
77
+ baseURL: options?.serverURL,
78
+ path: path,
79
+ headers: headers,
80
+ body: body,
81
+ userAgent: client._options.userAgent,
82
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
83
+ }, options);
84
+ if (!requestRes.ok) {
85
+ return [requestRes, { status: "invalid" }];
86
+ }
87
+ const req = requestRes.value;
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return [doResult, { status: "request-error", request: req }];
96
+ }
97
+ const response = doResult.value;
98
+ const responseFields = {
99
+ HttpMeta: { Response: response, Request: req },
100
+ };
101
+ const [result] = await M.match(M.json(200, models.ContainerFile$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
102
+ if (!result.ok) {
103
+ return [result, { status: "complete", request: req, response }];
104
+ }
105
+ return [result, { status: "complete", request: req, response }];
106
+ }
107
+ //# sourceMappingURL=containersGetContainerFile.js.map
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * List container files
14
+ *
15
+ * @remarks
16
+ * Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
17
+ */
18
+ export declare function containersListContainerFiles(client: OpenRouterCore, request: operations.ListContainerFilesRequest, options?: RequestOptions): APIPromise<Result<models.ContainerFileListResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
+ //# sourceMappingURL=containersListContainerFiles.d.ts.map
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: a5b09a82f065
4
+ */
5
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as errors from "../models/errors/index.js";
13
+ import * as models from "../models/index.js";
14
+ import * as operations from "../models/operations/index.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * List container files
18
+ *
19
+ * @remarks
20
+ * Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
21
+ */
22
+ export function containersListContainerFiles(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations.ListContainerFilesRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = null;
32
+ const pathParams = {
33
+ container_id: encodeSimple("container_id", payload.container_id, {
34
+ explode: false,
35
+ charEncoding: "percent",
36
+ }),
37
+ };
38
+ const path = pathToFunc("/containers/{container_id}/files")(pathParams);
39
+ const query = encodeFormQuery({
40
+ "after": payload.after,
41
+ "limit": payload.limit,
42
+ });
43
+ const headers = new Headers(compactMap({
44
+ Accept: "application/json",
45
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
46
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
47
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
48
+ }));
49
+ const secConfig = await extractSecurity(client._options.apiKey);
50
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
51
+ const requestSecurity = resolveGlobalSecurity(securityInput);
52
+ const context = {
53
+ options: client._options,
54
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
55
+ operationID: "listContainerFiles",
56
+ oAuth2Scopes: null,
57
+ resolvedSecurity: requestSecurity,
58
+ securitySource: client._options.apiKey,
59
+ retryConfig: options?.retries
60
+ || client._options.retryConfig
61
+ || {
62
+ strategy: "backoff",
63
+ backoff: {
64
+ initialInterval: 500,
65
+ maxInterval: 60000,
66
+ exponent: 1.5,
67
+ maxElapsedTime: 3600000,
68
+ },
69
+ retryConnectionErrors: true,
70
+ }
71
+ || { strategy: "none" },
72
+ retryCodes: options?.retryCodes || ["5XX"],
73
+ };
74
+ const requestRes = client._createRequest(context, {
75
+ security: requestSecurity,
76
+ method: "GET",
77
+ baseURL: options?.serverURL,
78
+ path: path,
79
+ headers: headers,
80
+ query: query,
81
+ body: body,
82
+ userAgent: client._options.userAgent,
83
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
84
+ }, options);
85
+ if (!requestRes.ok) {
86
+ return [requestRes, { status: "invalid" }];
87
+ }
88
+ const req = requestRes.value;
89
+ const doResult = await client._do(req, {
90
+ context,
91
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
92
+ retryConfig: context.retryConfig,
93
+ retryCodes: context.retryCodes,
94
+ });
95
+ if (!doResult.ok) {
96
+ return [doResult, { status: "request-error", request: req }];
97
+ }
98
+ const response = doResult.value;
99
+ const responseFields = {
100
+ HttpMeta: { Response: response, Request: req },
101
+ };
102
+ const [result] = await M.match(M.json(200, models.ContainerFileListResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.jsonErr(503, errors.ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
103
+ if (!result.ok) {
104
+ return [result, { status: "complete", request: req, response }];
105
+ }
106
+ return [result, { status: "complete", request: req, response }];
107
+ }
108
+ //# sourceMappingURL=containersListContainerFiles.js.map
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
50
50
  export declare const SDK_METADATA: {
51
51
  readonly language: "typescript";
52
52
  readonly openapiDocVersion: "1.0.0";
53
- readonly sdkVersion: "1.2.54";
53
+ readonly sdkVersion: "1.2.56";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.54 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.56 2.914.0 1.0.0 @openrouter/sdk";
56
56
  };
57
57
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
29
29
  export const SDK_METADATA = {
30
30
  language: "typescript",
31
31
  openapiDocVersion: "1.0.0",
32
- sdkVersion: "1.2.54",
32
+ sdkVersion: "1.2.56",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.54 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.56 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
- export type FileT = {
4
+ export type ChatContentFileFile = {
5
5
  /**
6
6
  * File content as base64 data URL or URL
7
7
  */
@@ -19,26 +19,26 @@ export type FileT = {
19
19
  * File content part for document processing
20
20
  */
21
21
  export type ChatContentFile = {
22
- file: FileT;
22
+ file: ChatContentFileFile;
23
23
  type: "file";
24
24
  };
25
25
  /** @internal */
26
- export declare const FileT$inboundSchema: z.ZodType<FileT, unknown>;
26
+ export declare const ChatContentFileFile$inboundSchema: z.ZodType<ChatContentFileFile, unknown>;
27
27
  /** @internal */
28
- export type FileT$Outbound = {
28
+ export type ChatContentFileFile$Outbound = {
29
29
  file_data?: string | undefined;
30
30
  file_id?: string | undefined;
31
31
  filename?: string | undefined;
32
32
  };
33
33
  /** @internal */
34
- export declare const FileT$outboundSchema: z.ZodType<FileT$Outbound, FileT>;
35
- export declare function fileToJSON(fileT: FileT): string;
36
- export declare function fileFromJSON(jsonString: string): SafeParseResult<FileT, SDKValidationError>;
34
+ export declare const ChatContentFileFile$outboundSchema: z.ZodType<ChatContentFileFile$Outbound, ChatContentFileFile>;
35
+ export declare function chatContentFileFileToJSON(chatContentFileFile: ChatContentFileFile): string;
36
+ export declare function chatContentFileFileFromJSON(jsonString: string): SafeParseResult<ChatContentFileFile, SDKValidationError>;
37
37
  /** @internal */
38
38
  export declare const ChatContentFile$inboundSchema: z.ZodType<ChatContentFile, unknown>;
39
39
  /** @internal */
40
40
  export type ChatContentFile$Outbound = {
41
- file: FileT$Outbound;
41
+ file: ChatContentFileFile$Outbound;
42
42
  type: "file";
43
43
  };
44
44
  /** @internal */
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
8
  /** @internal */
9
- export const FileT$inboundSchema = z.object({
9
+ export const ChatContentFileFile$inboundSchema = z.object({
10
10
  file_data: z.string().optional(),
11
11
  file_id: z.string().optional(),
12
12
  filename: z.string().optional(),
@@ -17,7 +17,7 @@ export const FileT$inboundSchema = z.object({
17
17
  });
18
18
  });
19
19
  /** @internal */
20
- export const FileT$outboundSchema = z.object({
20
+ export const ChatContentFileFile$outboundSchema = z.object({
21
21
  fileData: z.string().optional(),
22
22
  fileId: z.string().optional(),
23
23
  filename: z.string().optional(),
@@ -27,20 +27,20 @@ export const FileT$outboundSchema = z.object({
27
27
  fileId: "file_id",
28
28
  });
29
29
  });
30
- export function fileToJSON(fileT) {
31
- return JSON.stringify(FileT$outboundSchema.parse(fileT));
30
+ export function chatContentFileFileToJSON(chatContentFileFile) {
31
+ return JSON.stringify(ChatContentFileFile$outboundSchema.parse(chatContentFileFile));
32
32
  }
33
- export function fileFromJSON(jsonString) {
34
- return safeParse(jsonString, (x) => FileT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FileT' from JSON`);
33
+ export function chatContentFileFileFromJSON(jsonString) {
34
+ return safeParse(jsonString, (x) => ChatContentFileFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatContentFileFile' from JSON`);
35
35
  }
36
36
  /** @internal */
37
37
  export const ChatContentFile$inboundSchema = z.object({
38
- file: z.lazy(() => FileT$inboundSchema),
38
+ file: z.lazy(() => ChatContentFileFile$inboundSchema),
39
39
  type: z.literal("file"),
40
40
  });
41
41
  /** @internal */
42
42
  export const ChatContentFile$outboundSchema = z.object({
43
- file: z.lazy(() => FileT$outboundSchema),
43
+ file: z.lazy(() => ChatContentFileFile$outboundSchema),
44
44
  type: z.literal("file"),
45
45
  });
46
46
  export function chatContentFileToJSON(chatContentFile) {
@@ -0,0 +1,53 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const ContainerFileObject: {
6
+ readonly ContainerFile: "container.file";
7
+ };
8
+ export type ContainerFileObject = ClosedEnum<typeof ContainerFileObject>;
9
+ /**
10
+ * Container files are always produced by the assistant sandbox.
11
+ */
12
+ export declare const ContainerFileSource: {
13
+ readonly Assistant: "assistant";
14
+ };
15
+ /**
16
+ * Container files are always produced by the assistant sandbox.
17
+ */
18
+ export type ContainerFileSource = ClosedEnum<typeof ContainerFileSource>;
19
+ export type ContainerFile = {
20
+ /**
21
+ * File size in bytes.
22
+ */
23
+ bytes: number;
24
+ /**
25
+ * The container the file belongs to — echoes the `container_id` path parameter (OpenAI field name).
26
+ */
27
+ containerId: string;
28
+ /**
29
+ * Unix timestamp (seconds) when the file was last synced.
30
+ */
31
+ createdAt: number;
32
+ /**
33
+ * Container file id: `cfile_` + base64url of the file path.
34
+ */
35
+ id: string;
36
+ object: ContainerFileObject;
37
+ /**
38
+ * Container-relative file path.
39
+ */
40
+ path: string;
41
+ /**
42
+ * Container files are always produced by the assistant sandbox.
43
+ */
44
+ source: ContainerFileSource;
45
+ };
46
+ /** @internal */
47
+ export declare const ContainerFileObject$inboundSchema: z.ZodEnum<typeof ContainerFileObject>;
48
+ /** @internal */
49
+ export declare const ContainerFileSource$inboundSchema: z.ZodEnum<typeof ContainerFileSource>;
50
+ /** @internal */
51
+ export declare const ContainerFile$inboundSchema: z.ZodType<ContainerFile, unknown>;
52
+ export declare function containerFileFromJSON(jsonString: string): SafeParseResult<ContainerFile, SDKValidationError>;
53
+ //# sourceMappingURL=containerfile.d.ts.map
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ece4a8ddc017
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ export const ContainerFileObject = {
9
+ ContainerFile: "container.file",
10
+ };
11
+ /**
12
+ * Container files are always produced by the assistant sandbox.
13
+ */
14
+ export const ContainerFileSource = {
15
+ Assistant: "assistant",
16
+ };
17
+ /** @internal */
18
+ export const ContainerFileObject$inboundSchema = z.enum(ContainerFileObject);
19
+ /** @internal */
20
+ export const ContainerFileSource$inboundSchema = z.enum(ContainerFileSource);
21
+ /** @internal */
22
+ export const ContainerFile$inboundSchema = z
23
+ .object({
24
+ bytes: z.int(),
25
+ container_id: z.string(),
26
+ created_at: z.int(),
27
+ id: z.string(),
28
+ object: ContainerFileObject$inboundSchema,
29
+ path: z.string(),
30
+ source: ContainerFileSource$inboundSchema,
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "container_id": "containerId",
34
+ "created_at": "createdAt",
35
+ });
36
+ });
37
+ export function containerFileFromJSON(jsonString) {
38
+ return safeParse(jsonString, (x) => ContainerFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ContainerFile' from JSON`);
39
+ }
40
+ //# sourceMappingURL=containerfile.js.map
@@ -0,0 +1,25 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { ContainerFile } from "./containerfile.js";
5
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
+ export declare const ContainerFileListResponseObject: {
7
+ readonly List: "list";
8
+ };
9
+ export type ContainerFileListResponseObject = ClosedEnum<typeof ContainerFileListResponseObject>;
10
+ export type ContainerFileListResponse = {
11
+ data: Array<ContainerFile>;
12
+ firstId: string | null;
13
+ /**
14
+ * True when another page can be fetched by passing `after=last_id`.
15
+ */
16
+ hasMore: boolean;
17
+ lastId: string | null;
18
+ object: ContainerFileListResponseObject;
19
+ };
20
+ /** @internal */
21
+ export declare const ContainerFileListResponseObject$inboundSchema: z.ZodEnum<typeof ContainerFileListResponseObject>;
22
+ /** @internal */
23
+ export declare const ContainerFileListResponse$inboundSchema: z.ZodType<ContainerFileListResponse, unknown>;
24
+ export declare function containerFileListResponseFromJSON(jsonString: string): SafeParseResult<ContainerFileListResponse, SDKValidationError>;
25
+ //# sourceMappingURL=containerfilelistresponse.d.ts.map
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 74b945b6c8e1
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { ContainerFile$inboundSchema } from "./containerfile.js";
9
+ export const ContainerFileListResponseObject = {
10
+ List: "list",
11
+ };
12
+ /** @internal */
13
+ export const ContainerFileListResponseObject$inboundSchema = z.enum(ContainerFileListResponseObject);
14
+ /** @internal */
15
+ export const ContainerFileListResponse$inboundSchema = z.object({
16
+ data: z.array(ContainerFile$inboundSchema),
17
+ first_id: z.nullable(z.string()),
18
+ has_more: z.boolean(),
19
+ last_id: z.nullable(z.string()),
20
+ object: ContainerFileListResponseObject$inboundSchema,
21
+ }).transform((v) => {
22
+ return remap$(v, {
23
+ "first_id": "firstId",
24
+ "has_more": "hasMore",
25
+ "last_id": "lastId",
26
+ });
27
+ });
28
+ export function containerFileListResponseFromJSON(jsonString) {
29
+ return safeParse(jsonString, (x) => ContainerFileListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ContainerFileListResponse' from JSON`);
30
+ }
31
+ //# sourceMappingURL=containerfilelistresponse.js.map