@openrouter/sdk 1.1.18 → 1.1.20

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 (71) hide show
  1. package/esm/funcs/filesDelete.d.ts +1 -1
  2. package/esm/funcs/filesDelete.js +2 -1
  3. package/esm/funcs/filesDownload.d.ts +1 -1
  4. package/esm/funcs/filesDownload.js +2 -1
  5. package/esm/funcs/filesList.d.ts +1 -1
  6. package/esm/funcs/filesList.js +10 -3
  7. package/esm/funcs/filesRetrieve.d.ts +1 -1
  8. package/esm/funcs/filesRetrieve.js +2 -1
  9. package/esm/funcs/filesUpload.d.ts +1 -1
  10. package/esm/funcs/filesUpload.js +2 -1
  11. package/esm/funcs/workspacesSetBudget.d.ts +1 -1
  12. package/esm/funcs/workspacesSetBudget.js +1 -1
  13. package/esm/lib/config.d.ts +2 -2
  14. package/esm/lib/config.js +2 -2
  15. package/esm/models/anthropicfile.d.ts +33 -0
  16. package/esm/models/anthropicfile.js +40 -0
  17. package/esm/models/anthropicfiledeleted.d.ts +22 -0
  18. package/esm/models/anthropicfiledeleted.js +26 -0
  19. package/esm/models/anthropicfilelist.d.ts +18 -0
  20. package/esm/models/anthropicfilelist.js +27 -0
  21. package/esm/models/filedeleteresponse.d.ts +6 -12
  22. package/esm/models/filedeleteresponse.js +9 -10
  23. package/esm/models/filelistresponse.d.ts +6 -12
  24. package/esm/models/filelistresponse.js +9 -16
  25. package/esm/models/fileprovider.d.ts +16 -0
  26. package/esm/models/fileprovider.js +15 -0
  27. package/esm/models/fileresponse.d.ts +21 -0
  28. package/esm/models/fileresponse.js +26 -0
  29. package/esm/models/index.d.ts +12 -1
  30. package/esm/models/index.js +12 -1
  31. package/esm/models/listworkspacebudgetsresponse.d.ts +4 -0
  32. package/esm/models/listworkspacebudgetsresponse.js +6 -0
  33. package/esm/models/model.d.ts +5 -0
  34. package/esm/models/model.js +3 -0
  35. package/esm/models/modelaliastarget.d.ts +20 -0
  36. package/esm/models/modelaliastarget.js +15 -0
  37. package/esm/models/openaifile.d.ts +53 -0
  38. package/esm/models/openaifile.js +58 -0
  39. package/esm/models/openaifiledeleted.d.ts +23 -0
  40. package/esm/models/openaifiledeleted.js +27 -0
  41. package/esm/models/openaifilelist.d.ts +26 -0
  42. package/esm/models/openaifilelist.js +33 -0
  43. package/esm/models/openrouterfile.d.ts +33 -0
  44. package/esm/models/openrouterfile.js +39 -0
  45. package/esm/models/openrouterfiledeleted.d.ts +22 -0
  46. package/esm/models/openrouterfiledeleted.js +26 -0
  47. package/esm/models/openrouterfilelist.d.ts +22 -0
  48. package/esm/models/openrouterfilelist.js +28 -0
  49. package/esm/models/operations/deletefile.d.ts +6 -0
  50. package/esm/models/operations/deletefile.js +2 -0
  51. package/esm/models/operations/downloadfilecontent.d.ts +6 -0
  52. package/esm/models/operations/downloadfilecontent.js +2 -0
  53. package/esm/models/operations/getfilemetadata.d.ts +6 -0
  54. package/esm/models/operations/getfilemetadata.js +2 -0
  55. package/esm/models/operations/listfiles.d.ts +39 -0
  56. package/esm/models/operations/listfiles.js +18 -0
  57. package/esm/models/operations/uploadfile.d.ts +6 -0
  58. package/esm/models/operations/uploadfile.js +2 -0
  59. package/esm/models/upsertworkspacebudgetrequest.d.ts +5 -0
  60. package/esm/models/upsertworkspacebudgetrequest.js +2 -0
  61. package/esm/models/upsertworkspacebudgetresponse.d.ts +4 -0
  62. package/esm/models/upsertworkspacebudgetresponse.js +6 -0
  63. package/esm/models/workspace.d.ts +4 -0
  64. package/esm/models/workspace.js +2 -0
  65. package/esm/sdk/files.d.ts +2 -2
  66. package/esm/sdk/workspaces.d.ts +1 -1
  67. package/esm/sdk/workspaces.js +1 -1
  68. package/jsr.json +1 -1
  69. package/package.json +6 -6
  70. package/esm/models/filemetadata.d.ts +0 -26
  71. package/esm/models/filemetadata.js +0 -33
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod/v4";
2
+ import * as models from "../index.js";
2
3
  export type DownloadFileContentGlobals = {
3
4
  /**
4
5
  * The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -45,6 +46,10 @@ export type DownloadFileContentRequest = {
45
46
  * Workspace to scope the request to. Defaults to the caller’s default workspace.
46
47
  */
47
48
  workspaceId?: string | undefined;
49
+ /**
50
+ * Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
51
+ */
52
+ provider?: models.FileProvider | undefined;
48
53
  };
49
54
  /** @internal */
50
55
  export type DownloadFileContentRequest$Outbound = {
@@ -53,6 +58,7 @@ export type DownloadFileContentRequest$Outbound = {
53
58
  appCategories?: string | undefined;
54
59
  file_id: string;
55
60
  workspace_id?: string | undefined;
61
+ provider?: string | undefined;
56
62
  };
57
63
  /** @internal */
58
64
  export declare const DownloadFileContentRequest$outboundSchema: z.ZodType<DownloadFileContentRequest$Outbound, DownloadFileContentRequest>;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
7
8
  /** @internal */
8
9
  export const DownloadFileContentRequest$outboundSchema = z.object({
9
10
  httpReferer: z.string().optional(),
@@ -11,6 +12,7 @@ export const DownloadFileContentRequest$outboundSchema = z.object({
11
12
  appCategories: z.string().optional(),
12
13
  fileId: z.string(),
13
14
  workspaceId: z.string().optional(),
15
+ provider: models.FileProvider$outboundSchema.optional(),
14
16
  }).transform((v) => {
15
17
  return remap$(v, {
16
18
  httpReferer: "HTTP-Referer",
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod/v4";
2
+ import * as models from "../index.js";
2
3
  export type GetFileMetadataGlobals = {
3
4
  /**
4
5
  * The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -45,6 +46,10 @@ export type GetFileMetadataRequest = {
45
46
  * Workspace to scope the request to. Defaults to the caller’s default workspace.
46
47
  */
47
48
  workspaceId?: string | undefined;
49
+ /**
50
+ * Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
51
+ */
52
+ provider?: models.FileProvider | undefined;
48
53
  };
49
54
  /** @internal */
50
55
  export type GetFileMetadataRequest$Outbound = {
@@ -53,6 +58,7 @@ export type GetFileMetadataRequest$Outbound = {
53
58
  appCategories?: string | undefined;
54
59
  file_id: string;
55
60
  workspace_id?: string | undefined;
61
+ provider?: string | undefined;
56
62
  };
57
63
  /** @internal */
58
64
  export declare const GetFileMetadataRequest$outboundSchema: z.ZodType<GetFileMetadataRequest$Outbound, GetFileMetadataRequest>;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
7
8
  /** @internal */
8
9
  export const GetFileMetadataRequest$outboundSchema = z.object({
9
10
  httpReferer: z.string().optional(),
@@ -11,6 +12,7 @@ export const GetFileMetadataRequest$outboundSchema = z.object({
11
12
  appCategories: z.string().optional(),
12
13
  fileId: z.string(),
13
14
  workspaceId: z.string().optional(),
15
+ provider: models.FileProvider$outboundSchema.optional(),
14
16
  }).transform((v) => {
15
17
  return remap$(v, {
16
18
  httpReferer: "HTTP-Referer",
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod/v4";
2
+ import { OpenEnum } from "../../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../../types/fp.js";
3
4
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
5
  import * as models from "../index.js";
@@ -23,6 +24,17 @@ export type ListFilesGlobals = {
23
24
  */
24
25
  appCategories?: string | undefined;
25
26
  };
27
+ /**
28
+ * Sort direction. Only `asc` is supported by OpenRouter storage.
29
+ */
30
+ export declare const Order: {
31
+ readonly Asc: "asc";
32
+ readonly Desc: "desc";
33
+ };
34
+ /**
35
+ * Sort direction. Only `asc` is supported by OpenRouter storage.
36
+ */
37
+ export type Order = OpenEnum<typeof Order>;
26
38
  export type ListFilesRequest = {
27
39
  /**
28
40
  * The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -55,11 +67,33 @@ export type ListFilesRequest = {
55
67
  * Workspace to scope the request to. Defaults to the caller’s default workspace.
56
68
  */
57
69
  workspaceId?: string | undefined;
70
+ /**
71
+ * Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
72
+ */
73
+ provider?: models.FileProvider | undefined;
74
+ /**
75
+ * OpenAI-style forward cursor: the id to list after.
76
+ */
77
+ after?: string | undefined;
78
+ /**
79
+ * Anthropic-style forward cursor: the id to list after.
80
+ */
81
+ afterId?: string | undefined;
82
+ /**
83
+ * Anthropic-style reverse cursor. Not supported by OpenRouter storage.
84
+ */
85
+ beforeId?: string | undefined;
86
+ /**
87
+ * Sort direction. Only `asc` is supported by OpenRouter storage.
88
+ */
89
+ order?: Order | undefined;
58
90
  };
59
91
  export type ListFilesResponse = {
60
92
  result: models.FileListResponse;
61
93
  };
62
94
  /** @internal */
95
+ export declare const Order$outboundSchema: z.ZodType<string, Order>;
96
+ /** @internal */
63
97
  export type ListFilesRequest$Outbound = {
64
98
  "HTTP-Referer"?: string | undefined;
65
99
  appTitle?: string | undefined;
@@ -67,6 +101,11 @@ export type ListFilesRequest$Outbound = {
67
101
  limit?: number | undefined;
68
102
  cursor?: string | undefined;
69
103
  workspace_id?: string | undefined;
104
+ provider?: string | undefined;
105
+ after?: string | undefined;
106
+ after_id?: string | undefined;
107
+ before_id?: string | undefined;
108
+ order?: string | undefined;
70
109
  };
71
110
  /** @internal */
72
111
  export declare const ListFilesRequest$outboundSchema: z.ZodType<ListFilesRequest$Outbound, ListFilesRequest>;
@@ -5,7 +5,18 @@
5
5
  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
+ import * as openEnums from "../../types/enums.js";
8
9
  import * as models from "../index.js";
10
+ /**
11
+ * Sort direction. Only `asc` is supported by OpenRouter storage.
12
+ */
13
+ export const Order = {
14
+ Asc: "asc",
15
+ Desc: "desc",
16
+ };
17
+ /** @internal */
18
+ export const Order$outboundSchema = openEnums
19
+ .outboundSchema(Order);
9
20
  /** @internal */
10
21
  export const ListFilesRequest$outboundSchema = z.object({
11
22
  httpReferer: z.string().optional(),
@@ -14,10 +25,17 @@ export const ListFilesRequest$outboundSchema = z.object({
14
25
  limit: z.int().optional(),
15
26
  cursor: z.string().optional(),
16
27
  workspaceId: z.string().optional(),
28
+ provider: models.FileProvider$outboundSchema.optional(),
29
+ after: z.string().optional(),
30
+ afterId: z.string().optional(),
31
+ beforeId: z.string().optional(),
32
+ order: Order$outboundSchema.optional(),
17
33
  }).transform((v) => {
18
34
  return remap$(v, {
19
35
  httpReferer: "HTTP-Referer",
20
36
  workspaceId: "workspace_id",
37
+ afterId: "after_id",
38
+ beforeId: "before_id",
21
39
  });
22
40
  });
23
41
  export function listFilesRequestToJSON(listFilesRequest) {
@@ -1,4 +1,5 @@
1
1
  import * as z from "zod/v4";
2
+ import * as models from "../index.js";
2
3
  export type UploadFileGlobals = {
3
4
  /**
4
5
  * The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -51,6 +52,10 @@ export type UploadFileRequest = {
51
52
  * Workspace to scope the request to. Defaults to the caller’s default workspace.
52
53
  */
53
54
  workspaceId?: string | undefined;
55
+ /**
56
+ * Store or read this file on the named provider using your own API key for it. Omit to use OpenRouter storage.
57
+ */
58
+ provider?: models.FileProvider | undefined;
54
59
  requestBody: UploadFileRequestBody;
55
60
  };
56
61
  /** @internal */
@@ -74,6 +79,7 @@ export type UploadFileRequest$Outbound = {
74
79
  appTitle?: string | undefined;
75
80
  appCategories?: string | undefined;
76
81
  workspace_id?: string | undefined;
82
+ provider?: string | undefined;
77
83
  RequestBody: UploadFileRequestBody$Outbound;
78
84
  };
79
85
  /** @internal */
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { blobLikeSchema } from "../../types/blobs.js";
8
+ import * as models from "../index.js";
8
9
  /** @internal */
9
10
  export const UploadFileFile$outboundSchema = z.object({
10
11
  fileName: z.string(),
@@ -31,6 +32,7 @@ export const UploadFileRequest$outboundSchema = z.object({
31
32
  appTitle: z.string().optional(),
32
33
  appCategories: z.string().optional(),
33
34
  workspaceId: z.string().optional(),
35
+ provider: models.FileProvider$outboundSchema.optional(),
34
36
  requestBody: z.lazy(() => UploadFileRequestBody$outboundSchema),
35
37
  }).transform((v) => {
36
38
  return remap$(v, {
@@ -1,5 +1,9 @@
1
1
  import * as z from "zod/v4";
2
2
  export type UpsertWorkspaceBudgetRequest = {
3
+ /**
4
+ * Whether to include BYOK (bring-your-own-key) spend when enforcing the workspace's budgets. This is a workspace-wide setting: it applies to every budget interval (daily, weekly, monthly, and lifetime), not just the interval being upserted in this request. Omit to leave the current setting unchanged.
5
+ */
6
+ includeByokInBudgets?: boolean | undefined;
3
7
  /**
4
8
  * Spending limit in USD. Must be greater than 0.
5
9
  */
@@ -7,6 +11,7 @@ export type UpsertWorkspaceBudgetRequest = {
7
11
  };
8
12
  /** @internal */
9
13
  export type UpsertWorkspaceBudgetRequest$Outbound = {
14
+ include_byok_in_budgets?: boolean | undefined;
10
15
  limit_usd: number;
11
16
  };
12
17
  /** @internal */
@@ -6,9 +6,11 @@ import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  /** @internal */
8
8
  export const UpsertWorkspaceBudgetRequest$outboundSchema = z.object({
9
+ includeByokInBudgets: z.boolean().optional(),
9
10
  limitUsd: z.number(),
10
11
  }).transform((v) => {
11
12
  return remap$(v, {
13
+ includeByokInBudgets: "include_byok_in_budgets",
12
14
  limitUsd: "limit_usd",
13
15
  });
14
16
  });
@@ -4,6 +4,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  import { WorkspaceBudget } from "./workspacebudget.js";
5
5
  export type UpsertWorkspaceBudgetResponse = {
6
6
  data: WorkspaceBudget;
7
+ /**
8
+ * Whether BYOK (bring-your-own-key) spend is included when enforcing the workspace's budgets. This is a workspace-wide setting that applies to all budget intervals (daily, weekly, monthly, and lifetime).
9
+ */
10
+ includeByokInBudgets?: boolean | undefined;
7
11
  };
8
12
  /** @internal */
9
13
  export declare const UpsertWorkspaceBudgetResponse$inboundSchema: z.ZodType<UpsertWorkspaceBudgetResponse, unknown>;
@@ -3,11 +3,17 @@
3
3
  * @generated-id: ad34c44c01ce
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
7
  import { safeParse } from "../lib/schemas.js";
7
8
  import { WorkspaceBudget$inboundSchema, } from "./workspacebudget.js";
8
9
  /** @internal */
9
10
  export const UpsertWorkspaceBudgetResponse$inboundSchema = z.object({
10
11
  data: WorkspaceBudget$inboundSchema,
12
+ include_byok_in_budgets: z.boolean().optional(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ "include_byok_in_budgets": "includeByokInBudgets",
16
+ });
11
17
  });
12
18
  export function upsertWorkspaceBudgetResponseFromJSON(jsonString) {
13
19
  return safeParse(jsonString, (x) => UpsertWorkspaceBudgetResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpsertWorkspaceBudgetResponse' from JSON`);
@@ -34,6 +34,10 @@ export type Workspace = {
34
34
  * Unique identifier for the workspace
35
35
  */
36
36
  id: string;
37
+ /**
38
+ * Whether BYOK (bring-your-own-key) spend counts toward this workspace's budgets. Set it via the workspace budget endpoints.
39
+ */
40
+ includeByokInBudgets?: boolean | undefined;
37
41
  /**
38
42
  * Optional array of API key IDs to filter I/O logging. Null means all keys are logged.
39
43
  */
@@ -15,6 +15,7 @@ export const Workspace$inboundSchema = z.object({
15
15
  default_text_model: z.nullable(z.string()),
16
16
  description: z.nullable(z.string()),
17
17
  id: z.string(),
18
+ include_byok_in_budgets: z.boolean().optional(),
18
19
  io_logging_api_key_ids: z.nullable(z.array(z.int())),
19
20
  io_logging_sampling_rate: z.number(),
20
21
  is_data_discount_logging_enabled: z.boolean(),
@@ -31,6 +32,7 @@ export const Workspace$inboundSchema = z.object({
31
32
  "default_image_model": "defaultImageModel",
32
33
  "default_provider_sort": "defaultProviderSort",
33
34
  "default_text_model": "defaultTextModel",
35
+ "include_byok_in_budgets": "includeByokInBudgets",
34
36
  "io_logging_api_key_ids": "ioLoggingApiKeyIds",
35
37
  "io_logging_sampling_rate": "ioLoggingSamplingRate",
36
38
  "is_data_discount_logging_enabled": "isDataDiscountLoggingEnabled",
@@ -18,7 +18,7 @@ export declare class Files extends ClientSDK {
18
18
  * @remarks
19
19
  * Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB.
20
20
  */
21
- upload(request: operations.UploadFileRequest, options?: RequestOptions): Promise<models.FileMetadata>;
21
+ upload(request: operations.UploadFileRequest, options?: RequestOptions): Promise<models.FileResponse>;
22
22
  /**
23
23
  * Delete a file
24
24
  *
@@ -32,7 +32,7 @@ export declare class Files extends ClientSDK {
32
32
  * @remarks
33
33
  * Retrieves metadata for a single file owned by the requesting workspace.
34
34
  */
35
- retrieve(request: operations.GetFileMetadataRequest, options?: RequestOptions): Promise<models.FileMetadata>;
35
+ retrieve(request: operations.GetFileMetadataRequest, options?: RequestOptions): Promise<models.FileResponse>;
36
36
  /**
37
37
  * Download file content
38
38
  *
@@ -58,7 +58,7 @@ export declare class Workspaces extends ClientSDK {
58
58
  * Create or update a workspace budget
59
59
  *
60
60
  * @remarks
61
- * Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). [Management key](/docs/guides/overview/auth/management-api-keys) required.
61
+ * Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). The optional `include_byok_in_budgets` flag is a workspace-wide setting: when provided it applies to every budget interval for the workspace, not just the interval in this request. Note that a change made here is applied to budget enforcement immediately, but an already-open workspace settings page in the web dashboard may keep showing the previous value until it is reloaded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
62
62
  */
63
63
  setBudget(request: operations.UpsertWorkspaceBudgetRequest, options?: RequestOptions): Promise<models.UpsertWorkspaceBudgetResponse>;
64
64
  /**
@@ -84,7 +84,7 @@ export class Workspaces extends ClientSDK {
84
84
  * Create or update a workspace budget
85
85
  *
86
86
  * @remarks
87
- * Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). [Management key](/docs/guides/overview/auth/management-api-keys) required.
87
+ * Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). The optional `include_byok_in_budgets` flag is a workspace-wide setting: when provided it applies to every budget interval for the workspace, not just the interval in this request. Note that a change made here is applied to budget enforcement immediately, but an already-open workspace settings page in the web dashboard may keep showing the previous value until it is reloaded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
88
88
  */
89
89
  async setBudget(request, options) {
90
90
  return unwrapAsync(workspacesSetBudget(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.1.18",
5
+ "version": "1.1.20",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
6
6
  "keywords": [
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
- "test:e2e": "vitest --run --project e2e",
76
+ "typecheck:transit": "exit 0",
77
+ "test:transit": "exit 0",
77
78
  "test:watch": "vitest --watch --project unit",
78
79
  "compile": "tsc",
79
80
  "postinstall": "node scripts/check-types.js || true",
80
- "test:transit": "exit 0",
81
- "typecheck": "tsc --noEmit",
82
- "typecheck:transit": "exit 0",
83
81
  "prepare": "npm run build",
84
- "test": "vitest --run --project unit"
82
+ "test": "vitest --run --project unit",
83
+ "test:e2e": "vitest --run --project e2e",
84
+ "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {
@@ -1,26 +0,0 @@
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 FileMetadataType: {
6
- readonly File: "file";
7
- };
8
- export type FileMetadataType = ClosedEnum<typeof FileMetadataType>;
9
- /**
10
- * Metadata describing a stored file.
11
- */
12
- export type FileMetadata = {
13
- createdAt: string;
14
- downloadable: boolean;
15
- filename: string;
16
- id: string;
17
- mimeType: string;
18
- sizeBytes: number;
19
- type: FileMetadataType;
20
- };
21
- /** @internal */
22
- export declare const FileMetadataType$inboundSchema: z.ZodEnum<typeof FileMetadataType>;
23
- /** @internal */
24
- export declare const FileMetadata$inboundSchema: z.ZodType<FileMetadata, unknown>;
25
- export declare function fileMetadataFromJSON(jsonString: string): SafeParseResult<FileMetadata, SDKValidationError>;
26
- //# sourceMappingURL=filemetadata.d.ts.map
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 7a5c3a86d7a2
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 FileMetadataType = {
9
- File: "file",
10
- };
11
- /** @internal */
12
- export const FileMetadataType$inboundSchema = z.enum(FileMetadataType);
13
- /** @internal */
14
- export const FileMetadata$inboundSchema = z
15
- .object({
16
- created_at: z.string(),
17
- downloadable: z.boolean(),
18
- filename: z.string(),
19
- id: z.string(),
20
- mime_type: z.string(),
21
- size_bytes: z.int(),
22
- type: FileMetadataType$inboundSchema,
23
- }).transform((v) => {
24
- return remap$(v, {
25
- "created_at": "createdAt",
26
- "mime_type": "mimeType",
27
- "size_bytes": "sizeBytes",
28
- });
29
- });
30
- export function fileMetadataFromJSON(jsonString) {
31
- return safeParse(jsonString, (x) => FileMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FileMetadata' from JSON`);
32
- }
33
- //# sourceMappingURL=filemetadata.js.map