@openrouter/sdk 0.12.15 → 0.12.17

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 (103) hide show
  1. package/esm/funcs/apiKeysCreate.d.ts +1 -1
  2. package/esm/funcs/apiKeysCreate.js +2 -2
  3. package/esm/funcs/generationsGetGeneration.d.ts +2 -1
  4. package/esm/funcs/generationsGetGeneration.js +2 -1
  5. package/esm/funcs/generationsListGenerationContent.d.ts +16 -0
  6. package/esm/funcs/generationsListGenerationContent.js +108 -0
  7. package/esm/funcs/guardrailsCreate.d.ts +1 -1
  8. package/esm/funcs/guardrailsCreate.js +2 -2
  9. package/esm/funcs/guardrailsList.js +1 -0
  10. package/esm/funcs/ttsCreateSpeech.d.ts +18 -0
  11. package/esm/funcs/ttsCreateSpeech.js +110 -0
  12. package/esm/funcs/workspacesBulkAddMembers.d.ts +19 -0
  13. package/esm/funcs/workspacesBulkAddMembers.js +105 -0
  14. package/esm/funcs/workspacesBulkRemoveMembers.d.ts +19 -0
  15. package/esm/funcs/workspacesBulkRemoveMembers.js +105 -0
  16. package/esm/funcs/workspacesCreate.d.ts +19 -0
  17. package/esm/funcs/workspacesCreate.js +99 -0
  18. package/esm/funcs/workspacesDelete.d.ts +19 -0
  19. package/esm/funcs/workspacesDelete.js +102 -0
  20. package/esm/funcs/workspacesGet.d.ts +19 -0
  21. package/esm/funcs/workspacesGet.js +102 -0
  22. package/esm/funcs/workspacesList.d.ts +21 -0
  23. package/esm/funcs/workspacesList.js +133 -0
  24. package/esm/funcs/workspacesUpdate.d.ts +19 -0
  25. package/esm/funcs/workspacesUpdate.js +105 -0
  26. package/esm/lib/config.d.ts +2 -2
  27. package/esm/lib/config.js +2 -2
  28. package/esm/models/bulkaddworkspacemembersrequest.d.ts +15 -0
  29. package/esm/models/bulkaddworkspacemembersrequest.js +18 -0
  30. package/esm/models/bulkaddworkspacemembersresponse.d.ts +18 -0
  31. package/esm/models/bulkaddworkspacemembersresponse.js +21 -0
  32. package/esm/models/bulkremoveworkspacemembersrequest.d.ts +15 -0
  33. package/esm/models/bulkremoveworkspacemembersrequest.js +18 -0
  34. package/esm/models/bulkremoveworkspacemembersresponse.d.ts +13 -0
  35. package/esm/models/bulkremoveworkspacemembersresponse.js +19 -0
  36. package/esm/models/createguardrailrequest.d.ts +5 -0
  37. package/esm/models/createguardrailrequest.js +2 -0
  38. package/esm/models/createworkspacerequest.d.ts +55 -0
  39. package/esm/models/createworkspacerequest.js +31 -0
  40. package/esm/models/createworkspaceresponse.d.ts +11 -0
  41. package/esm/models/createworkspaceresponse.js +15 -0
  42. package/esm/models/deleteworkspaceresponse.d.ts +13 -0
  43. package/esm/models/deleteworkspaceresponse.js +14 -0
  44. package/esm/models/generationcontentdata.d.ts +55 -0
  45. package/esm/models/generationcontentdata.js +45 -0
  46. package/esm/models/generationcontentresponse.d.ts +17 -0
  47. package/esm/models/generationcontentresponse.js +15 -0
  48. package/esm/models/generationresponse.d.ts +198 -0
  49. package/esm/models/generationresponse.js +109 -0
  50. package/esm/models/getworkspaceresponse.d.ts +11 -0
  51. package/esm/models/getworkspaceresponse.js +15 -0
  52. package/esm/models/guardrail.d.ts +4 -0
  53. package/esm/models/guardrail.js +2 -0
  54. package/esm/models/index.d.ts +16 -0
  55. package/esm/models/index.js +16 -0
  56. package/esm/models/listworkspacesresponse.d.ts +18 -0
  57. package/esm/models/listworkspacesresponse.js +21 -0
  58. package/esm/models/modelscountresponse.d.ts +4 -4
  59. package/esm/models/modelscountresponse.js +4 -4
  60. package/esm/models/operations/bulkaddworkspacemembers.d.ts +61 -0
  61. package/esm/models/operations/bulkaddworkspacemembers.js +24 -0
  62. package/esm/models/operations/bulkremoveworkspacemembers.d.ts +61 -0
  63. package/esm/models/operations/bulkremoveworkspacemembers.js +24 -0
  64. package/esm/models/operations/createkeys.d.ts +5 -0
  65. package/esm/models/operations/createkeys.js +2 -0
  66. package/esm/models/operations/createtts.d.ts +779 -0
  67. package/esm/models/operations/createtts.js +193 -0
  68. package/esm/models/operations/createworkspace.d.ts +56 -0
  69. package/esm/models/operations/createworkspace.js +23 -0
  70. package/esm/models/operations/deleteworkspace.d.ts +58 -0
  71. package/esm/models/operations/deleteworkspace.js +21 -0
  72. package/esm/models/operations/getgeneration.d.ts +0 -196
  73. package/esm/models/operations/getgeneration.js +0 -102
  74. package/esm/models/operations/getworkspace.d.ts +58 -0
  75. package/esm/models/operations/getworkspace.js +21 -0
  76. package/esm/models/operations/index.d.ts +9 -0
  77. package/esm/models/operations/index.js +9 -0
  78. package/esm/models/operations/listgenerationcontent.d.ts +58 -0
  79. package/esm/models/operations/listgenerationcontent.js +21 -0
  80. package/esm/models/operations/listguardrails.d.ts +5 -0
  81. package/esm/models/operations/listguardrails.js +2 -0
  82. package/esm/models/operations/listworkspaces.d.ts +72 -0
  83. package/esm/models/operations/listworkspaces.js +35 -0
  84. package/esm/models/operations/updateworkspace.d.ts +61 -0
  85. package/esm/models/operations/updateworkspace.js +24 -0
  86. package/esm/models/updateworkspacerequest.d.ts +55 -0
  87. package/esm/models/updateworkspacerequest.js +31 -0
  88. package/esm/models/updateworkspaceresponse.d.ts +11 -0
  89. package/esm/models/updateworkspaceresponse.js +15 -0
  90. package/esm/models/workspace.d.ts +61 -0
  91. package/esm/models/workspace.js +39 -0
  92. package/esm/models/workspacemember.d.ts +43 -0
  93. package/esm/models/workspacemember.js +35 -0
  94. package/esm/sdk/generations.d.ts +6 -1
  95. package/esm/sdk/generations.js +7 -0
  96. package/esm/sdk/sdk.d.ts +6 -0
  97. package/esm/sdk/sdk.js +8 -0
  98. package/esm/sdk/tts.d.ts +12 -0
  99. package/esm/sdk/tts.js +19 -0
  100. package/esm/sdk/workspaces.d.ts +58 -0
  101. package/esm/sdk/workspaces.js +80 -0
  102. package/jsr.json +1 -1
  103. package/package.json +6 -6
@@ -0,0 +1,58 @@
1
+ import * as z from "zod/v4";
2
+ export type GetWorkspaceGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ appTitle?: string | undefined;
16
+ /**
17
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
+ *
19
+ * @remarks
20
+ */
21
+ appCategories?: string | undefined;
22
+ };
23
+ export type GetWorkspaceRequest = {
24
+ /**
25
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
+ *
27
+ * @remarks
28
+ * This is used to track API usage per application.
29
+ */
30
+ httpReferer?: string | undefined;
31
+ /**
32
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
+ *
34
+ * @remarks
35
+ */
36
+ appTitle?: string | undefined;
37
+ /**
38
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
+ *
40
+ * @remarks
41
+ */
42
+ appCategories?: string | undefined;
43
+ /**
44
+ * The workspace ID (UUID) or slug
45
+ */
46
+ id: string;
47
+ };
48
+ /** @internal */
49
+ export type GetWorkspaceRequest$Outbound = {
50
+ "HTTP-Referer"?: string | undefined;
51
+ appTitle?: string | undefined;
52
+ appCategories?: string | undefined;
53
+ id: string;
54
+ };
55
+ /** @internal */
56
+ export declare const GetWorkspaceRequest$outboundSchema: z.ZodType<GetWorkspaceRequest$Outbound, GetWorkspaceRequest>;
57
+ export declare function getWorkspaceRequestToJSON(getWorkspaceRequest: GetWorkspaceRequest): string;
58
+ //# sourceMappingURL=getworkspace.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: bd847aca12d8
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const GetWorkspaceRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ appTitle: z.string().optional(),
11
+ appCategories: z.string().optional(),
12
+ id: z.string(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ httpReferer: "HTTP-Referer",
16
+ });
17
+ });
18
+ export function getWorkspaceRequestToJSON(getWorkspaceRequest) {
19
+ return JSON.stringify(GetWorkspaceRequest$outboundSchema.parse(getWorkspaceRequest));
20
+ }
21
+ //# sourceMappingURL=getworkspace.js.map
@@ -1,5 +1,7 @@
1
+ export * from "./bulkaddworkspacemembers.js";
1
2
  export * from "./bulkassignkeystoguardrail.js";
2
3
  export * from "./bulkassignmemberstoguardrail.js";
4
+ export * from "./bulkremoveworkspacemembers.js";
3
5
  export * from "./bulkunassignkeysfromguardrail.js";
4
6
  export * from "./bulkunassignmembersfromguardrail.js";
5
7
  export * from "./createauthkeyscode.js";
@@ -8,9 +10,12 @@ export * from "./createguardrail.js";
8
10
  export * from "./createkeys.js";
9
11
  export * from "./creatererank.js";
10
12
  export * from "./createresponses.js";
13
+ export * from "./createtts.js";
11
14
  export * from "./createvideos.js";
15
+ export * from "./createworkspace.js";
12
16
  export * from "./deleteguardrail.js";
13
17
  export * from "./deletekeys.js";
18
+ export * from "./deleteworkspace.js";
14
19
  export * from "./exchangeauthcodeforapikey.js";
15
20
  export * from "./getcredits.js";
16
21
  export * from "./getcurrentkey.js";
@@ -20,10 +25,12 @@ export * from "./getkey.js";
20
25
  export * from "./getmodels.js";
21
26
  export * from "./getuseractivity.js";
22
27
  export * from "./getvideos.js";
28
+ export * from "./getworkspace.js";
23
29
  export * from "./list.js";
24
30
  export * from "./listembeddingsmodels.js";
25
31
  export * from "./listendpoints.js";
26
32
  export * from "./listendpointszdr.js";
33
+ export * from "./listgenerationcontent.js";
27
34
  export * from "./listguardrailkeyassignments.js";
28
35
  export * from "./listguardrailmemberassignments.js";
29
36
  export * from "./listguardrails.js";
@@ -35,7 +42,9 @@ export * from "./listorganizationmembers.js";
35
42
  export * from "./listproviders.js";
36
43
  export * from "./listvideoscontent.js";
37
44
  export * from "./listvideosmodels.js";
45
+ export * from "./listworkspaces.js";
38
46
  export * from "./sendchatcompletionrequest.js";
39
47
  export * from "./updateguardrail.js";
40
48
  export * from "./updatekeys.js";
49
+ export * from "./updateworkspace.js";
41
50
  //# sourceMappingURL=index.d.ts.map
@@ -2,8 +2,10 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  * @generated-id: 0d9ffaf774d2
4
4
  */
5
+ export * from "./bulkaddworkspacemembers.js";
5
6
  export * from "./bulkassignkeystoguardrail.js";
6
7
  export * from "./bulkassignmemberstoguardrail.js";
8
+ export * from "./bulkremoveworkspacemembers.js";
7
9
  export * from "./bulkunassignkeysfromguardrail.js";
8
10
  export * from "./bulkunassignmembersfromguardrail.js";
9
11
  export * from "./createauthkeyscode.js";
@@ -12,9 +14,12 @@ export * from "./createguardrail.js";
12
14
  export * from "./createkeys.js";
13
15
  export * from "./creatererank.js";
14
16
  export * from "./createresponses.js";
17
+ export * from "./createtts.js";
15
18
  export * from "./createvideos.js";
19
+ export * from "./createworkspace.js";
16
20
  export * from "./deleteguardrail.js";
17
21
  export * from "./deletekeys.js";
22
+ export * from "./deleteworkspace.js";
18
23
  export * from "./exchangeauthcodeforapikey.js";
19
24
  export * from "./getcredits.js";
20
25
  export * from "./getcurrentkey.js";
@@ -24,10 +29,12 @@ export * from "./getkey.js";
24
29
  export * from "./getmodels.js";
25
30
  export * from "./getuseractivity.js";
26
31
  export * from "./getvideos.js";
32
+ export * from "./getworkspace.js";
27
33
  export * from "./list.js";
28
34
  export * from "./listembeddingsmodels.js";
29
35
  export * from "./listendpoints.js";
30
36
  export * from "./listendpointszdr.js";
37
+ export * from "./listgenerationcontent.js";
31
38
  export * from "./listguardrailkeyassignments.js";
32
39
  export * from "./listguardrailmemberassignments.js";
33
40
  export * from "./listguardrails.js";
@@ -39,7 +46,9 @@ export * from "./listorganizationmembers.js";
39
46
  export * from "./listproviders.js";
40
47
  export * from "./listvideoscontent.js";
41
48
  export * from "./listvideosmodels.js";
49
+ export * from "./listworkspaces.js";
42
50
  export * from "./sendchatcompletionrequest.js";
43
51
  export * from "./updateguardrail.js";
44
52
  export * from "./updatekeys.js";
53
+ export * from "./updateworkspace.js";
45
54
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,58 @@
1
+ import * as z from "zod/v4";
2
+ export type ListGenerationContentGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ appTitle?: string | undefined;
16
+ /**
17
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
+ *
19
+ * @remarks
20
+ */
21
+ appCategories?: string | undefined;
22
+ };
23
+ export type ListGenerationContentRequest = {
24
+ /**
25
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
+ *
27
+ * @remarks
28
+ * This is used to track API usage per application.
29
+ */
30
+ httpReferer?: string | undefined;
31
+ /**
32
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
+ *
34
+ * @remarks
35
+ */
36
+ appTitle?: string | undefined;
37
+ /**
38
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
+ *
40
+ * @remarks
41
+ */
42
+ appCategories?: string | undefined;
43
+ /**
44
+ * The generation ID
45
+ */
46
+ id: string;
47
+ };
48
+ /** @internal */
49
+ export type ListGenerationContentRequest$Outbound = {
50
+ "HTTP-Referer"?: string | undefined;
51
+ appTitle?: string | undefined;
52
+ appCategories?: string | undefined;
53
+ id: string;
54
+ };
55
+ /** @internal */
56
+ export declare const ListGenerationContentRequest$outboundSchema: z.ZodType<ListGenerationContentRequest$Outbound, ListGenerationContentRequest>;
57
+ export declare function listGenerationContentRequestToJSON(listGenerationContentRequest: ListGenerationContentRequest): string;
58
+ //# sourceMappingURL=listgenerationcontent.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 75c4167b92a2
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const ListGenerationContentRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ appTitle: z.string().optional(),
11
+ appCategories: z.string().optional(),
12
+ id: z.string(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ httpReferer: "HTTP-Referer",
16
+ });
17
+ });
18
+ export function listGenerationContentRequestToJSON(listGenerationContentRequest) {
19
+ return JSON.stringify(ListGenerationContentRequest$outboundSchema.parse(listGenerationContentRequest));
20
+ }
21
+ //# sourceMappingURL=listgenerationcontent.js.map
@@ -51,6 +51,10 @@ export type ListGuardrailsRequest = {
51
51
  * Maximum number of records to return (max 100)
52
52
  */
53
53
  limit?: number | undefined;
54
+ /**
55
+ * Filter guardrails by workspace ID. By default, guardrails in the default workspace are returned.
56
+ */
57
+ workspaceId?: string | undefined;
54
58
  };
55
59
  export type ListGuardrailsResponse = {
56
60
  result: models.ListGuardrailsResponse;
@@ -62,6 +66,7 @@ export type ListGuardrailsRequest$Outbound = {
62
66
  appCategories?: string | undefined;
63
67
  offset?: number | null | undefined;
64
68
  limit?: number | undefined;
69
+ workspace_id?: string | undefined;
65
70
  };
66
71
  /** @internal */
67
72
  export declare const ListGuardrailsRequest$outboundSchema: z.ZodType<ListGuardrailsRequest$Outbound, ListGuardrailsRequest>;
@@ -13,9 +13,11 @@ export const ListGuardrailsRequest$outboundSchema = z.object({
13
13
  appCategories: z.string().optional(),
14
14
  offset: z.nullable(z.int()).optional(),
15
15
  limit: z.int().optional(),
16
+ workspaceId: z.string().optional(),
16
17
  }).transform((v) => {
17
18
  return remap$(v, {
18
19
  httpReferer: "HTTP-Referer",
20
+ workspaceId: "workspace_id",
19
21
  });
20
22
  });
21
23
  export function listGuardrailsRequestToJSON(listGuardrailsRequest) {
@@ -0,0 +1,72 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import * as models from "../index.js";
5
+ export type ListWorkspacesGlobals = {
6
+ /**
7
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
8
+ *
9
+ * @remarks
10
+ * This is used to track API usage per application.
11
+ */
12
+ httpReferer?: string | undefined;
13
+ /**
14
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
15
+ *
16
+ * @remarks
17
+ */
18
+ appTitle?: string | undefined;
19
+ /**
20
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
21
+ *
22
+ * @remarks
23
+ */
24
+ appCategories?: string | undefined;
25
+ };
26
+ export type ListWorkspacesRequest = {
27
+ /**
28
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
29
+ *
30
+ * @remarks
31
+ * This is used to track API usage per application.
32
+ */
33
+ httpReferer?: string | undefined;
34
+ /**
35
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
36
+ *
37
+ * @remarks
38
+ */
39
+ appTitle?: string | undefined;
40
+ /**
41
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
42
+ *
43
+ * @remarks
44
+ */
45
+ appCategories?: string | undefined;
46
+ /**
47
+ * Number of records to skip for pagination
48
+ */
49
+ offset?: number | null | undefined;
50
+ /**
51
+ * Maximum number of records to return (max 100)
52
+ */
53
+ limit?: number | undefined;
54
+ };
55
+ export type ListWorkspacesResponse = {
56
+ result: models.ListWorkspacesResponse;
57
+ };
58
+ /** @internal */
59
+ export type ListWorkspacesRequest$Outbound = {
60
+ "HTTP-Referer"?: string | undefined;
61
+ appTitle?: string | undefined;
62
+ appCategories?: string | undefined;
63
+ offset?: number | null | undefined;
64
+ limit?: number | undefined;
65
+ };
66
+ /** @internal */
67
+ export declare const ListWorkspacesRequest$outboundSchema: z.ZodType<ListWorkspacesRequest$Outbound, ListWorkspacesRequest>;
68
+ export declare function listWorkspacesRequestToJSON(listWorkspacesRequest: ListWorkspacesRequest): string;
69
+ /** @internal */
70
+ export declare const ListWorkspacesResponse$inboundSchema: z.ZodType<ListWorkspacesResponse, unknown>;
71
+ export declare function listWorkspacesResponseFromJSON(jsonString: string): SafeParseResult<ListWorkspacesResponse, SDKValidationError>;
72
+ //# sourceMappingURL=listworkspaces.d.ts.map
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 04f9b5b78c0f
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 * as models from "../index.js";
9
+ /** @internal */
10
+ export const ListWorkspacesRequest$outboundSchema = z.object({
11
+ httpReferer: z.string().optional(),
12
+ appTitle: z.string().optional(),
13
+ appCategories: z.string().optional(),
14
+ offset: z.nullable(z.int()).optional(),
15
+ limit: z.int().optional(),
16
+ }).transform((v) => {
17
+ return remap$(v, {
18
+ httpReferer: "HTTP-Referer",
19
+ });
20
+ });
21
+ export function listWorkspacesRequestToJSON(listWorkspacesRequest) {
22
+ return JSON.stringify(ListWorkspacesRequest$outboundSchema.parse(listWorkspacesRequest));
23
+ }
24
+ /** @internal */
25
+ export const ListWorkspacesResponse$inboundSchema = z.object({
26
+ Result: models.ListWorkspacesResponse$inboundSchema,
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "Result": "result",
30
+ });
31
+ });
32
+ export function listWorkspacesResponseFromJSON(jsonString) {
33
+ return safeParse(jsonString, (x) => ListWorkspacesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListWorkspacesResponse' from JSON`);
34
+ }
35
+ //# sourceMappingURL=listworkspaces.js.map
@@ -0,0 +1,61 @@
1
+ import * as z from "zod/v4";
2
+ import * as models from "../index.js";
3
+ export type UpdateWorkspaceGlobals = {
4
+ /**
5
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
+ *
7
+ * @remarks
8
+ * This is used to track API usage per application.
9
+ */
10
+ httpReferer?: string | undefined;
11
+ /**
12
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
+ *
14
+ * @remarks
15
+ */
16
+ appTitle?: string | undefined;
17
+ /**
18
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
+ *
20
+ * @remarks
21
+ */
22
+ appCategories?: string | undefined;
23
+ };
24
+ export type UpdateWorkspaceRequest = {
25
+ /**
26
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
27
+ *
28
+ * @remarks
29
+ * This is used to track API usage per application.
30
+ */
31
+ httpReferer?: string | undefined;
32
+ /**
33
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
34
+ *
35
+ * @remarks
36
+ */
37
+ appTitle?: string | undefined;
38
+ /**
39
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
40
+ *
41
+ * @remarks
42
+ */
43
+ appCategories?: string | undefined;
44
+ /**
45
+ * The workspace ID (UUID) or slug
46
+ */
47
+ id: string;
48
+ updateWorkspaceRequest: models.UpdateWorkspaceRequest;
49
+ };
50
+ /** @internal */
51
+ export type UpdateWorkspaceRequest$Outbound = {
52
+ "HTTP-Referer"?: string | undefined;
53
+ appTitle?: string | undefined;
54
+ appCategories?: string | undefined;
55
+ id: string;
56
+ UpdateWorkspaceRequest: models.UpdateWorkspaceRequest$Outbound;
57
+ };
58
+ /** @internal */
59
+ export declare const UpdateWorkspaceRequest$outboundSchema: z.ZodType<UpdateWorkspaceRequest$Outbound, UpdateWorkspaceRequest>;
60
+ export declare function updateWorkspaceRequestToJSON(updateWorkspaceRequest: UpdateWorkspaceRequest): string;
61
+ //# sourceMappingURL=updateworkspace.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b10c83b1ce4f
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
8
+ /** @internal */
9
+ export const UpdateWorkspaceRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ appTitle: z.string().optional(),
12
+ appCategories: z.string().optional(),
13
+ id: z.string(),
14
+ updateWorkspaceRequest: models.UpdateWorkspaceRequest$outboundSchema,
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ updateWorkspaceRequest: "UpdateWorkspaceRequest",
19
+ });
20
+ });
21
+ export function updateWorkspaceRequestToJSON(updateWorkspaceRequest) {
22
+ return JSON.stringify(UpdateWorkspaceRequest$outboundSchema.parse(updateWorkspaceRequest));
23
+ }
24
+ //# sourceMappingURL=updateworkspace.js.map
@@ -0,0 +1,55 @@
1
+ import * as z from "zod/v4";
2
+ export type UpdateWorkspaceRequest = {
3
+ /**
4
+ * Default image model for this workspace
5
+ */
6
+ defaultImageModel?: string | null | undefined;
7
+ /**
8
+ * Default provider sort preference (price, throughput, latency, exacto)
9
+ */
10
+ defaultProviderSort?: string | null | undefined;
11
+ /**
12
+ * Default text model for this workspace
13
+ */
14
+ defaultTextModel?: string | null | undefined;
15
+ /**
16
+ * New description for the workspace
17
+ */
18
+ description?: string | null | undefined;
19
+ /**
20
+ * Whether data discount logging is enabled
21
+ */
22
+ isDataDiscountLoggingEnabled?: boolean | undefined;
23
+ /**
24
+ * Whether broadcast is enabled
25
+ */
26
+ isObservabilityBroadcastEnabled?: boolean | undefined;
27
+ /**
28
+ * Whether private logging is enabled
29
+ */
30
+ isObservabilityIoLoggingEnabled?: boolean | undefined;
31
+ /**
32
+ * New name for the workspace
33
+ */
34
+ name?: string | undefined;
35
+ /**
36
+ * New URL-friendly slug
37
+ */
38
+ slug?: string | undefined;
39
+ };
40
+ /** @internal */
41
+ export type UpdateWorkspaceRequest$Outbound = {
42
+ default_image_model?: string | null | undefined;
43
+ default_provider_sort?: string | null | undefined;
44
+ default_text_model?: string | null | undefined;
45
+ description?: string | null | undefined;
46
+ is_data_discount_logging_enabled?: boolean | undefined;
47
+ is_observability_broadcast_enabled?: boolean | undefined;
48
+ is_observability_io_logging_enabled?: boolean | undefined;
49
+ name?: string | undefined;
50
+ slug?: string | undefined;
51
+ };
52
+ /** @internal */
53
+ export declare const UpdateWorkspaceRequest$outboundSchema: z.ZodType<UpdateWorkspaceRequest$Outbound, UpdateWorkspaceRequest>;
54
+ export declare function updateWorkspaceRequestToJSON(updateWorkspaceRequest: UpdateWorkspaceRequest): string;
55
+ //# sourceMappingURL=updateworkspacerequest.d.ts.map
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 84dd4f01b245
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ /** @internal */
8
+ export const UpdateWorkspaceRequest$outboundSchema = z.object({
9
+ defaultImageModel: z.nullable(z.string()).optional(),
10
+ defaultProviderSort: z.nullable(z.string()).optional(),
11
+ defaultTextModel: z.nullable(z.string()).optional(),
12
+ description: z.nullable(z.string()).optional(),
13
+ isDataDiscountLoggingEnabled: z.boolean().optional(),
14
+ isObservabilityBroadcastEnabled: z.boolean().optional(),
15
+ isObservabilityIoLoggingEnabled: z.boolean().optional(),
16
+ name: z.string().optional(),
17
+ slug: z.string().optional(),
18
+ }).transform((v) => {
19
+ return remap$(v, {
20
+ defaultImageModel: "default_image_model",
21
+ defaultProviderSort: "default_provider_sort",
22
+ defaultTextModel: "default_text_model",
23
+ isDataDiscountLoggingEnabled: "is_data_discount_logging_enabled",
24
+ isObservabilityBroadcastEnabled: "is_observability_broadcast_enabled",
25
+ isObservabilityIoLoggingEnabled: "is_observability_io_logging_enabled",
26
+ });
27
+ });
28
+ export function updateWorkspaceRequestToJSON(updateWorkspaceRequest) {
29
+ return JSON.stringify(UpdateWorkspaceRequest$outboundSchema.parse(updateWorkspaceRequest));
30
+ }
31
+ //# sourceMappingURL=updateworkspacerequest.js.map
@@ -0,0 +1,11 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { Workspace } from "./workspace.js";
5
+ export type UpdateWorkspaceResponse = {
6
+ data: Workspace;
7
+ };
8
+ /** @internal */
9
+ export declare const UpdateWorkspaceResponse$inboundSchema: z.ZodType<UpdateWorkspaceResponse, unknown>;
10
+ export declare function updateWorkspaceResponseFromJSON(jsonString: string): SafeParseResult<UpdateWorkspaceResponse, SDKValidationError>;
11
+ //# sourceMappingURL=updateworkspaceresponse.d.ts.map
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5b6906dad2d6
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Workspace$inboundSchema } from "./workspace.js";
8
+ /** @internal */
9
+ export const UpdateWorkspaceResponse$inboundSchema = z.object({
10
+ data: Workspace$inboundSchema,
11
+ });
12
+ export function updateWorkspaceResponseFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => UpdateWorkspaceResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateWorkspaceResponse' from JSON`);
14
+ }
15
+ //# sourceMappingURL=updateworkspaceresponse.js.map
@@ -0,0 +1,61 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type Workspace = {
5
+ /**
6
+ * ISO 8601 timestamp of when the workspace was created
7
+ */
8
+ createdAt: string;
9
+ /**
10
+ * User ID of the workspace creator
11
+ */
12
+ createdBy: string | null;
13
+ /**
14
+ * Default image model for this workspace
15
+ */
16
+ defaultImageModel: string | null;
17
+ /**
18
+ * Default provider sort preference (price, throughput, latency, exacto)
19
+ */
20
+ defaultProviderSort: string | null;
21
+ /**
22
+ * Default text model for this workspace
23
+ */
24
+ defaultTextModel: string | null;
25
+ /**
26
+ * Description of the workspace
27
+ */
28
+ description: string | null;
29
+ /**
30
+ * Unique identifier for the workspace
31
+ */
32
+ id: string;
33
+ /**
34
+ * Whether data discount logging is enabled for this workspace
35
+ */
36
+ isDataDiscountLoggingEnabled: boolean;
37
+ /**
38
+ * Whether broadcast is enabled for this workspace
39
+ */
40
+ isObservabilityBroadcastEnabled: boolean;
41
+ /**
42
+ * Whether private logging is enabled for this workspace
43
+ */
44
+ isObservabilityIoLoggingEnabled: boolean;
45
+ /**
46
+ * Name of the workspace
47
+ */
48
+ name: string;
49
+ /**
50
+ * URL-friendly slug for the workspace
51
+ */
52
+ slug: string;
53
+ /**
54
+ * ISO 8601 timestamp of when the workspace was last updated
55
+ */
56
+ updatedAt: string | null;
57
+ };
58
+ /** @internal */
59
+ export declare const Workspace$inboundSchema: z.ZodType<Workspace, unknown>;
60
+ export declare function workspaceFromJSON(jsonString: string): SafeParseResult<Workspace, SDKValidationError>;
61
+ //# sourceMappingURL=workspace.d.ts.map