@orq-ai/node 3.2.8 → 3.3.0-rc.1

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 (215) hide show
  1. package/bin/mcp-server.js +32 -35
  2. package/bin/mcp-server.js.map +20 -20
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/lib/config.js.map +1 -1
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/mcp-server.js.map +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/mcp-server/server.js.map +1 -1
  11. package/models/operations/bulkcreatedatapoints.js +2 -2
  12. package/models/operations/createcontact.js +2 -2
  13. package/models/operations/createdataset.js +2 -2
  14. package/models/operations/createdatasetitem.js +2 -2
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/listdatasetdatapoints.js +2 -2
  19. package/models/operations/listdatasets.js +2 -2
  20. package/models/operations/retrievedatapoint.js +2 -2
  21. package/models/operations/retrievedataset.js +2 -2
  22. package/models/operations/updatedatapoint.js +2 -2
  23. package/models/operations/updatedataset.js +2 -2
  24. package/package.json +3 -2
  25. package/src/lib/config.ts +2 -2
  26. package/src/mcp-server/mcp-server.ts +1 -1
  27. package/src/mcp-server/server.ts +1 -1
  28. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  29. package/src/models/operations/createcontact.ts +2 -2
  30. package/src/models/operations/createdataset.ts +2 -2
  31. package/src/models/operations/createdatasetitem.ts +2 -2
  32. package/src/models/operations/fileget.ts +2 -2
  33. package/src/models/operations/filelist.ts +2 -2
  34. package/src/models/operations/fileupload.ts +2 -2
  35. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  36. package/src/models/operations/listdatasets.ts +2 -2
  37. package/src/models/operations/retrievedatapoint.ts +2 -2
  38. package/src/models/operations/retrievedataset.ts +2 -2
  39. package/src/models/operations/updatedatapoint.ts +2 -2
  40. package/src/models/operations/updatedataset.ts +2 -2
  41. package/packages/orq-rc/FUNCTIONS.md +0 -106
  42. package/packages/orq-rc/README.md +0 -660
  43. package/packages/orq-rc/RUNTIMES.md +0 -48
  44. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  45. package/packages/orq-rc/docs/sdks/datasets/README.md +0 -934
  46. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  47. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  48. package/packages/orq-rc/docs/sdks/files/README.md +0 -305
  49. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  50. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  51. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
  52. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -80
  53. package/packages/orq-rc/jsr.json +0 -28
  54. package/packages/orq-rc/package-lock.json +0 -3217
  55. package/packages/orq-rc/package.json +0 -45
  56. package/packages/orq-rc/src/core.ts +0 -13
  57. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -154
  58. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -161
  59. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -159
  60. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -161
  61. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +0 -165
  62. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -161
  63. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -176
  64. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -162
  65. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -169
  66. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -169
  67. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -175
  68. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -170
  69. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -173
  70. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -162
  71. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -170
  72. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -171
  73. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -162
  74. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -178
  75. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -154
  76. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -177
  77. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -158
  78. package/packages/orq-rc/src/funcs/filesGet.ts +0 -160
  79. package/packages/orq-rc/src/funcs/filesList.ts +0 -162
  80. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -154
  81. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -158
  82. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -175
  83. package/packages/orq-rc/src/funcs/promptsList.ts +0 -162
  84. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -168
  85. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -160
  86. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -167
  87. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -155
  88. package/packages/orq-rc/src/hooks/global.ts +0 -44
  89. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  90. package/packages/orq-rc/src/hooks/index.ts +0 -6
  91. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  92. package/packages/orq-rc/src/hooks/types.ts +0 -110
  93. package/packages/orq-rc/src/index.ts +0 -7
  94. package/packages/orq-rc/src/lib/base64.ts +0 -37
  95. package/packages/orq-rc/src/lib/config.ts +0 -70
  96. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  97. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  98. package/packages/orq-rc/src/lib/env.ts +0 -73
  99. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  100. package/packages/orq-rc/src/lib/files.ts +0 -40
  101. package/packages/orq-rc/src/lib/http.ts +0 -323
  102. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  103. package/packages/orq-rc/src/lib/logger.ts +0 -9
  104. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  105. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  106. package/packages/orq-rc/src/lib/retries.ts +0 -218
  107. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  108. package/packages/orq-rc/src/lib/sdks.ts +0 -395
  109. package/packages/orq-rc/src/lib/security.ts +0 -261
  110. package/packages/orq-rc/src/lib/url.ts +0 -33
  111. package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -125
  112. package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -140
  113. package/packages/orq-rc/src/mcp-server/cli.ts +0 -13
  114. package/packages/orq-rc/src/mcp-server/console-logger.ts +0 -71
  115. package/packages/orq-rc/src/mcp-server/extensions.ts +0 -17
  116. package/packages/orq-rc/src/mcp-server/mcp-server.ts +0 -26
  117. package/packages/orq-rc/src/mcp-server/prompts.ts +0 -110
  118. package/packages/orq-rc/src/mcp-server/resources.ts +0 -158
  119. package/packages/orq-rc/src/mcp-server/scopes.ts +0 -7
  120. package/packages/orq-rc/src/mcp-server/server.ts +0 -125
  121. package/packages/orq-rc/src/mcp-server/shared.ts +0 -75
  122. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +0 -37
  123. package/packages/orq-rc/src/mcp-server/tools/datasetsClear.ts +0 -35
  124. package/packages/orq-rc/src/mcp-server/tools/datasetsCreate.ts +0 -37
  125. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoint.ts +0 -37
  126. package/packages/orq-rc/src/mcp-server/tools/datasetsCreateDatapoints.ts +0 -37
  127. package/packages/orq-rc/src/mcp-server/tools/datasetsDelete.ts +0 -35
  128. package/packages/orq-rc/src/mcp-server/tools/datasetsDeleteDatapoint.ts +0 -35
  129. package/packages/orq-rc/src/mcp-server/tools/datasetsList.ts +0 -37
  130. package/packages/orq-rc/src/mcp-server/tools/datasetsListDatapoints.ts +0 -37
  131. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieve.ts +0 -37
  132. package/packages/orq-rc/src/mcp-server/tools/datasetsRetrieveDatapoint.ts +0 -37
  133. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdate.ts +0 -37
  134. package/packages/orq-rc/src/mcp-server/tools/datasetsUpdateDatapoint.ts +0 -35
  135. package/packages/orq-rc/src/mcp-server/tools/deploymentsGetConfig.ts +0 -37
  136. package/packages/orq-rc/src/mcp-server/tools/deploymentsInvoke.ts +0 -37
  137. package/packages/orq-rc/src/mcp-server/tools/deploymentsList.ts +0 -37
  138. package/packages/orq-rc/src/mcp-server/tools/deploymentsMetricsCreate.ts +0 -37
  139. package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
  140. package/packages/orq-rc/src/mcp-server/tools/feedbackCreate.ts +0 -37
  141. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +0 -37
  142. package/packages/orq-rc/src/mcp-server/tools/filesDelete.ts +0 -33
  143. package/packages/orq-rc/src/mcp-server/tools/filesGet.ts +0 -37
  144. package/packages/orq-rc/src/mcp-server/tools/filesList.ts +0 -37
  145. package/packages/orq-rc/src/mcp-server/tools/promptsCreate.ts +0 -35
  146. package/packages/orq-rc/src/mcp-server/tools/promptsDelete.ts +0 -33
  147. package/packages/orq-rc/src/mcp-server/tools/promptsGetVersion.ts +0 -37
  148. package/packages/orq-rc/src/mcp-server/tools/promptsList.ts +0 -37
  149. package/packages/orq-rc/src/mcp-server/tools/promptsListVersions.ts +0 -37
  150. package/packages/orq-rc/src/mcp-server/tools/promptsRetrieve.ts +0 -37
  151. package/packages/orq-rc/src/mcp-server/tools/promptsUpdate.ts +0 -35
  152. package/packages/orq-rc/src/mcp-server/tools/remoteconfigsRetrieve.ts +0 -36
  153. package/packages/orq-rc/src/mcp-server/tools.ts +0 -126
  154. package/packages/orq-rc/src/models/components/deployments.ts +0 -4164
  155. package/packages/orq-rc/src/models/components/index.ts +0 -6
  156. package/packages/orq-rc/src/models/components/security.ts +0 -71
  157. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  158. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  159. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  160. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  161. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  162. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  163. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  164. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +0 -1816
  165. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -75
  166. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  167. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -296
  168. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -1740
  169. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  170. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3735
  171. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -81
  172. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -75
  173. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  174. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -4936
  175. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -6090
  176. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1199
  177. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2194
  178. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -5960
  179. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  180. package/packages/orq-rc/src/models/operations/fileget.ts +0 -223
  181. package/packages/orq-rc/src/models/operations/filelist.ts +0 -377
  182. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -324
  183. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2165
  184. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1989
  185. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1987
  186. package/packages/orq-rc/src/models/operations/index.ts +0 -35
  187. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1115
  188. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -448
  189. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2163
  190. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  191. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -924
  192. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -288
  193. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -1729
  194. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -374
  195. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3914
  196. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  197. package/packages/orq-rc/src/sdk/datasets.ts +0 -222
  198. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  199. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  200. package/packages/orq-rc/src/sdk/files.ts +0 -78
  201. package/packages/orq-rc/src/sdk/index.ts +0 -5
  202. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  203. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  204. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  205. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  206. package/packages/orq-rc/src/types/async.ts +0 -68
  207. package/packages/orq-rc/src/types/blobs.ts +0 -31
  208. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  209. package/packages/orq-rc/src/types/enums.ts +0 -16
  210. package/packages/orq-rc/src/types/fp.ts +0 -50
  211. package/packages/orq-rc/src/types/index.ts +0 -11
  212. package/packages/orq-rc/src/types/operations.ts +0 -105
  213. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  214. package/packages/orq-rc/src/types/streams.ts +0 -21
  215. package/packages/orq-rc/tsconfig.json +0 -41
@@ -1,3914 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- /**
13
- * The type of the model
14
- */
15
- export const UpdatePromptModelType = {
16
- Chat: "chat",
17
- Completion: "completion",
18
- Embedding: "embedding",
19
- Vision: "vision",
20
- Image: "image",
21
- Tts: "tts",
22
- Stt: "stt",
23
- Rerank: "rerank",
24
- Moderations: "moderations",
25
- } as const;
26
- /**
27
- * The type of the model
28
- */
29
- export type UpdatePromptModelType = ClosedEnum<typeof UpdatePromptModelType>;
30
-
31
- /**
32
- * Only supported on `image` models.
33
- */
34
- export const UpdatePromptFormat = {
35
- Url: "url",
36
- B64Json: "b64_json",
37
- Text: "text",
38
- JsonObject: "json_object",
39
- } as const;
40
- /**
41
- * Only supported on `image` models.
42
- */
43
- export type UpdatePromptFormat = ClosedEnum<typeof UpdatePromptFormat>;
44
-
45
- /**
46
- * Only supported on `image` models.
47
- */
48
- export const UpdatePromptQuality = {
49
- Standard: "standard",
50
- Hd: "hd",
51
- } as const;
52
- /**
53
- * Only supported on `image` models.
54
- */
55
- export type UpdatePromptQuality = ClosedEnum<typeof UpdatePromptQuality>;
56
-
57
- export const UpdatePromptResponseFormatPromptsType = {
58
- JsonObject: "json_object",
59
- } as const;
60
- export type UpdatePromptResponseFormatPromptsType = ClosedEnum<
61
- typeof UpdatePromptResponseFormatPromptsType
62
- >;
63
-
64
- export type UpdatePromptResponseFormat2 = {
65
- type: UpdatePromptResponseFormatPromptsType;
66
- };
67
-
68
- export const UpdatePromptResponseFormatType = {
69
- JsonSchema: "json_schema",
70
- } as const;
71
- export type UpdatePromptResponseFormatType = ClosedEnum<
72
- typeof UpdatePromptResponseFormatType
73
- >;
74
-
75
- export type ResponseFormatJsonSchema = {
76
- name: string;
77
- strict: boolean;
78
- schema: { [k: string]: any };
79
- };
80
-
81
- export type UpdatePromptResponseFormat1 = {
82
- type: UpdatePromptResponseFormatType;
83
- jsonSchema: ResponseFormatJsonSchema;
84
- };
85
-
86
- /**
87
- * An object specifying the format that the model must output.
88
- *
89
- * @remarks
90
- *
91
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
92
- *
93
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
94
- *
95
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
96
- */
97
- export type UpdatePromptResponseFormat =
98
- | UpdatePromptResponseFormat2
99
- | UpdatePromptResponseFormat1;
100
-
101
- /**
102
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
103
- */
104
- export const UpdatePromptPhotoRealVersion = {
105
- V1: "v1",
106
- V2: "v2",
107
- } as const;
108
- /**
109
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
110
- */
111
- export type UpdatePromptPhotoRealVersion = ClosedEnum<
112
- typeof UpdatePromptPhotoRealVersion
113
- >;
114
-
115
- /**
116
- * The format to return the embeddings
117
- */
118
- export const UpdatePromptEncodingFormat = {
119
- Float: "float",
120
- Base64: "base64",
121
- } as const;
122
- /**
123
- * The format to return the embeddings
124
- */
125
- export type UpdatePromptEncodingFormat = ClosedEnum<
126
- typeof UpdatePromptEncodingFormat
127
- >;
128
-
129
- /**
130
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
131
- */
132
- export const UpdatePromptReasoningEffort = {
133
- Low: "low",
134
- Medium: "medium",
135
- High: "high",
136
- } as const;
137
- /**
138
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
139
- */
140
- export type UpdatePromptReasoningEffort = ClosedEnum<
141
- typeof UpdatePromptReasoningEffort
142
- >;
143
-
144
- /**
145
- * Model Parameters: Not all parameters apply to every model
146
- */
147
- export type UpdatePromptModelParameters = {
148
- /**
149
- * Only supported on `chat` and `completion` models.
150
- */
151
- temperature?: number | undefined;
152
- /**
153
- * Only supported on `chat` and `completion` models.
154
- */
155
- maxTokens?: number | undefined;
156
- /**
157
- * Only supported on `chat` and `completion` models.
158
- */
159
- topK?: number | undefined;
160
- /**
161
- * Only supported on `chat` and `completion` models.
162
- */
163
- topP?: number | undefined;
164
- /**
165
- * Only supported on `chat` and `completion` models.
166
- */
167
- frequencyPenalty?: number | undefined;
168
- /**
169
- * Only supported on `chat` and `completion` models.
170
- */
171
- presencePenalty?: number | undefined;
172
- /**
173
- * Only supported on `image` models.
174
- */
175
- numImages?: number | undefined;
176
- /**
177
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
178
- */
179
- seed?: number | undefined;
180
- /**
181
- * Only supported on `image` models.
182
- */
183
- format?: UpdatePromptFormat | undefined;
184
- /**
185
- * Only supported on `image` models.
186
- */
187
- dimensions?: string | undefined;
188
- /**
189
- * Only supported on `image` models.
190
- */
191
- quality?: UpdatePromptQuality | undefined;
192
- /**
193
- * Only supported on `image` models.
194
- */
195
- style?: string | undefined;
196
- /**
197
- * An object specifying the format that the model must output.
198
- *
199
- * @remarks
200
- *
201
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
202
- *
203
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
204
- *
205
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
206
- */
207
- responseFormat?:
208
- | UpdatePromptResponseFormat2
209
- | UpdatePromptResponseFormat1
210
- | null
211
- | undefined;
212
- /**
213
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
214
- */
215
- photoRealVersion?: UpdatePromptPhotoRealVersion | undefined;
216
- /**
217
- * The format to return the embeddings
218
- */
219
- encodingFormat?: UpdatePromptEncodingFormat | undefined;
220
- /**
221
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
222
- */
223
- reasoningEffort?: UpdatePromptReasoningEffort | undefined;
224
- /**
225
- * Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
226
- */
227
- budgetTokens?: number | undefined;
228
- };
229
-
230
- export const UpdatePromptProvider = {
231
- Cohere: "cohere",
232
- Openai: "openai",
233
- Anthropic: "anthropic",
234
- Huggingface: "huggingface",
235
- Replicate: "replicate",
236
- Google: "google",
237
- GoogleAi: "google-ai",
238
- Azure: "azure",
239
- Aws: "aws",
240
- Anyscale: "anyscale",
241
- Perplexity: "perplexity",
242
- Groq: "groq",
243
- Fal: "fal",
244
- Leonardoai: "leonardoai",
245
- Nvidia: "nvidia",
246
- Jina: "jina",
247
- Togetherai: "togetherai",
248
- Elevenlabs: "elevenlabs",
249
- } as const;
250
- export type UpdatePromptProvider = ClosedEnum<typeof UpdatePromptProvider>;
251
-
252
- /**
253
- * The role of the prompt message
254
- */
255
- export const UpdatePromptRole = {
256
- System: "system",
257
- Assistant: "assistant",
258
- User: "user",
259
- Exception: "exception",
260
- Tool: "tool",
261
- Prompt: "prompt",
262
- Correction: "correction",
263
- ExpectedOutput: "expected_output",
264
- } as const;
265
- /**
266
- * The role of the prompt message
267
- */
268
- export type UpdatePromptRole = ClosedEnum<typeof UpdatePromptRole>;
269
-
270
- export const UpdatePrompt2PromptsType = {
271
- ImageUrl: "image_url",
272
- } as const;
273
- export type UpdatePrompt2PromptsType = ClosedEnum<
274
- typeof UpdatePrompt2PromptsType
275
- >;
276
-
277
- export type UpdatePrompt2ImageUrl = {
278
- /**
279
- * Either a URL of the image or the base64 encoded data URI.
280
- */
281
- url: string;
282
- /**
283
- * Specifies the detail level of the image. Currently only supported with OpenAI models
284
- */
285
- detail?: string | undefined;
286
- };
287
-
288
- /**
289
- * The image part of the prompt message. Only supported with vision models.
290
- */
291
- export type UpdatePrompt22 = {
292
- type: UpdatePrompt2PromptsType;
293
- imageUrl: UpdatePrompt2ImageUrl;
294
- };
295
-
296
- export const UpdatePrompt2Type = {
297
- Text: "text",
298
- } as const;
299
- export type UpdatePrompt2Type = ClosedEnum<typeof UpdatePrompt2Type>;
300
-
301
- /**
302
- * Text content part of a prompt message
303
- */
304
- export type UpdatePrompt21 = {
305
- type: UpdatePrompt2Type;
306
- text: string;
307
- };
308
-
309
- export type UpdatePromptContent2 = UpdatePrompt21 | UpdatePrompt22;
310
-
311
- /**
312
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
313
- */
314
- export type UpdatePromptContent =
315
- | string
316
- | Array<UpdatePrompt21 | UpdatePrompt22>;
317
-
318
- export const UpdatePromptType = {
319
- Function: "function",
320
- } as const;
321
- export type UpdatePromptType = ClosedEnum<typeof UpdatePromptType>;
322
-
323
- export type UpdatePromptFunction = {
324
- name: string;
325
- /**
326
- * JSON string arguments for the functions
327
- */
328
- arguments: string;
329
- };
330
-
331
- export type UpdatePromptToolCalls = {
332
- id?: string | undefined;
333
- index?: number | undefined;
334
- type: UpdatePromptType;
335
- function: UpdatePromptFunction;
336
- };
337
-
338
- export type UpdatePromptMessages = {
339
- /**
340
- * The role of the prompt message
341
- */
342
- role: UpdatePromptRole;
343
- /**
344
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
345
- */
346
- content: string | Array<UpdatePrompt21 | UpdatePrompt22>;
347
- toolCalls?: Array<UpdatePromptToolCalls> | undefined;
348
- };
349
-
350
- /**
351
- * A list of messages compatible with the openAI schema
352
- */
353
- export type UpdatePromptPromptConfig = {
354
- stream?: boolean | undefined;
355
- model?: string | undefined;
356
- /**
357
- * The type of the model
358
- */
359
- modelType?: UpdatePromptModelType | undefined;
360
- /**
361
- * Model Parameters: Not all parameters apply to every model
362
- */
363
- modelParameters?: UpdatePromptModelParameters | undefined;
364
- provider?: UpdatePromptProvider | undefined;
365
- version?: string | undefined;
366
- messages: Array<UpdatePromptMessages>;
367
- };
368
-
369
- export const UpdatePromptUseCases = {
370
- Agents: "Agents",
371
- AgentsSimulations: "Agents simulations",
372
- APIInteraction: "API interaction",
373
- AutonomousAgents: "Autonomous Agents",
374
- Chatbots: "Chatbots",
375
- Classification: "Classification",
376
- CodeUnderstanding: "Code understanding",
377
- CodeWriting: "Code writing",
378
- DocumentsQA: "Documents QA",
379
- Conversation: "Conversation",
380
- Extraction: "Extraction",
381
- MultiModal: "Multi-modal",
382
- SelfChecking: "Self-checking",
383
- Sql: "SQL",
384
- Summarization: "Summarization",
385
- Tagging: "Tagging",
386
- } as const;
387
- export type UpdatePromptUseCases = ClosedEnum<typeof UpdatePromptUseCases>;
388
-
389
- /**
390
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
391
- */
392
- export const UpdatePromptLanguage = {
393
- Chinese: "Chinese",
394
- Dutch: "Dutch",
395
- English: "English",
396
- French: "French",
397
- German: "German",
398
- Russian: "Russian",
399
- Spanish: "Spanish",
400
- } as const;
401
- /**
402
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
403
- */
404
- export type UpdatePromptLanguage = ClosedEnum<typeof UpdatePromptLanguage>;
405
-
406
- export type UpdatePromptMetadata = {
407
- /**
408
- * A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
409
- */
410
- useCases?: Array<UpdatePromptUseCases> | undefined;
411
- /**
412
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
413
- */
414
- language?: UpdatePromptLanguage | undefined;
415
- };
416
-
417
- export type UpdatePromptRequestBody = {
418
- owner?: string | undefined;
419
- domainId?: string | undefined;
420
- created?: string | undefined;
421
- updated?: string | undefined;
422
- createdById?: string | null | undefined;
423
- updatedById?: string | null | undefined;
424
- /**
425
- * The prompt’s name, meant to be displayable in the UI.
426
- */
427
- displayName?: string | undefined;
428
- /**
429
- * The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
430
- */
431
- description?: string | null | undefined;
432
- /**
433
- * A list of messages compatible with the openAI schema
434
- */
435
- promptConfig?: UpdatePromptPromptConfig | undefined;
436
- metadata?: UpdatePromptMetadata | undefined;
437
- };
438
-
439
- export type UpdatePromptRequest = {
440
- /**
441
- * Unique identifier of the prompt
442
- */
443
- id: string;
444
- requestBody?: UpdatePromptRequestBody | undefined;
445
- };
446
-
447
- export const UpdatePromptPromptsType = {
448
- Prompt: "prompt",
449
- } as const;
450
- export type UpdatePromptPromptsType = ClosedEnum<
451
- typeof UpdatePromptPromptsType
452
- >;
453
-
454
- /**
455
- * The type of the model
456
- */
457
- export const UpdatePromptPromptsModelType = {
458
- Chat: "chat",
459
- Completion: "completion",
460
- Embedding: "embedding",
461
- Vision: "vision",
462
- Image: "image",
463
- Tts: "tts",
464
- Stt: "stt",
465
- Rerank: "rerank",
466
- Moderations: "moderations",
467
- } as const;
468
- /**
469
- * The type of the model
470
- */
471
- export type UpdatePromptPromptsModelType = ClosedEnum<
472
- typeof UpdatePromptPromptsModelType
473
- >;
474
-
475
- /**
476
- * Only supported on `image` models.
477
- */
478
- export const UpdatePromptPromptsFormat = {
479
- Url: "url",
480
- B64Json: "b64_json",
481
- Text: "text",
482
- JsonObject: "json_object",
483
- } as const;
484
- /**
485
- * Only supported on `image` models.
486
- */
487
- export type UpdatePromptPromptsFormat = ClosedEnum<
488
- typeof UpdatePromptPromptsFormat
489
- >;
490
-
491
- /**
492
- * Only supported on `image` models.
493
- */
494
- export const UpdatePromptPromptsQuality = {
495
- Standard: "standard",
496
- Hd: "hd",
497
- } as const;
498
- /**
499
- * Only supported on `image` models.
500
- */
501
- export type UpdatePromptPromptsQuality = ClosedEnum<
502
- typeof UpdatePromptPromptsQuality
503
- >;
504
-
505
- export const UpdatePromptResponseFormatPromptsResponse200Type = {
506
- JsonObject: "json_object",
507
- } as const;
508
- export type UpdatePromptResponseFormatPromptsResponse200Type = ClosedEnum<
509
- typeof UpdatePromptResponseFormatPromptsResponse200Type
510
- >;
511
-
512
- export type UpdatePromptResponseFormatPrompts2 = {
513
- type: UpdatePromptResponseFormatPromptsResponse200Type;
514
- };
515
-
516
- export const UpdatePromptResponseFormatPromptsResponseType = {
517
- JsonSchema: "json_schema",
518
- } as const;
519
- export type UpdatePromptResponseFormatPromptsResponseType = ClosedEnum<
520
- typeof UpdatePromptResponseFormatPromptsResponseType
521
- >;
522
-
523
- export type UpdatePromptResponseFormatJsonSchema = {
524
- name: string;
525
- strict: boolean;
526
- schema: { [k: string]: any };
527
- };
528
-
529
- export type UpdatePromptResponseFormatPrompts1 = {
530
- type: UpdatePromptResponseFormatPromptsResponseType;
531
- jsonSchema: UpdatePromptResponseFormatJsonSchema;
532
- };
533
-
534
- /**
535
- * An object specifying the format that the model must output.
536
- *
537
- * @remarks
538
- *
539
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
540
- *
541
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
542
- *
543
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
544
- */
545
- export type UpdatePromptPromptsResponseFormat =
546
- | UpdatePromptResponseFormatPrompts2
547
- | UpdatePromptResponseFormatPrompts1;
548
-
549
- /**
550
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
551
- */
552
- export const UpdatePromptPromptsPhotoRealVersion = {
553
- V1: "v1",
554
- V2: "v2",
555
- } as const;
556
- /**
557
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
558
- */
559
- export type UpdatePromptPromptsPhotoRealVersion = ClosedEnum<
560
- typeof UpdatePromptPromptsPhotoRealVersion
561
- >;
562
-
563
- /**
564
- * The format to return the embeddings
565
- */
566
- export const UpdatePromptPromptsEncodingFormat = {
567
- Float: "float",
568
- Base64: "base64",
569
- } as const;
570
- /**
571
- * The format to return the embeddings
572
- */
573
- export type UpdatePromptPromptsEncodingFormat = ClosedEnum<
574
- typeof UpdatePromptPromptsEncodingFormat
575
- >;
576
-
577
- /**
578
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
579
- */
580
- export const UpdatePromptPromptsReasoningEffort = {
581
- Low: "low",
582
- Medium: "medium",
583
- High: "high",
584
- } as const;
585
- /**
586
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
587
- */
588
- export type UpdatePromptPromptsReasoningEffort = ClosedEnum<
589
- typeof UpdatePromptPromptsReasoningEffort
590
- >;
591
-
592
- /**
593
- * Model Parameters: Not all parameters apply to every model
594
- */
595
- export type UpdatePromptPromptsModelParameters = {
596
- /**
597
- * Only supported on `chat` and `completion` models.
598
- */
599
- temperature?: number | undefined;
600
- /**
601
- * Only supported on `chat` and `completion` models.
602
- */
603
- maxTokens?: number | undefined;
604
- /**
605
- * Only supported on `chat` and `completion` models.
606
- */
607
- topK?: number | undefined;
608
- /**
609
- * Only supported on `chat` and `completion` models.
610
- */
611
- topP?: number | undefined;
612
- /**
613
- * Only supported on `chat` and `completion` models.
614
- */
615
- frequencyPenalty?: number | undefined;
616
- /**
617
- * Only supported on `chat` and `completion` models.
618
- */
619
- presencePenalty?: number | undefined;
620
- /**
621
- * Only supported on `image` models.
622
- */
623
- numImages?: number | undefined;
624
- /**
625
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
626
- */
627
- seed?: number | undefined;
628
- /**
629
- * Only supported on `image` models.
630
- */
631
- format?: UpdatePromptPromptsFormat | undefined;
632
- /**
633
- * Only supported on `image` models.
634
- */
635
- dimensions?: string | undefined;
636
- /**
637
- * Only supported on `image` models.
638
- */
639
- quality?: UpdatePromptPromptsQuality | undefined;
640
- /**
641
- * Only supported on `image` models.
642
- */
643
- style?: string | undefined;
644
- /**
645
- * An object specifying the format that the model must output.
646
- *
647
- * @remarks
648
- *
649
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
650
- *
651
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
652
- *
653
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
654
- */
655
- responseFormat?:
656
- | UpdatePromptResponseFormatPrompts2
657
- | UpdatePromptResponseFormatPrompts1
658
- | null
659
- | undefined;
660
- /**
661
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
662
- */
663
- photoRealVersion?: UpdatePromptPromptsPhotoRealVersion | undefined;
664
- /**
665
- * The format to return the embeddings
666
- */
667
- encodingFormat?: UpdatePromptPromptsEncodingFormat | undefined;
668
- /**
669
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
670
- */
671
- reasoningEffort?: UpdatePromptPromptsReasoningEffort | undefined;
672
- /**
673
- * Gives the model enhanced reasoning capabilities for complex tasks. A value of 0 disables thinking. The minimum budget tokens for thinking are 1024. The Budget Tokens should never exceed the Max Tokens parameter. Only supported by `Anthropic`
674
- */
675
- budgetTokens?: number | undefined;
676
- };
677
-
678
- export const UpdatePromptPromptsProvider = {
679
- Cohere: "cohere",
680
- Openai: "openai",
681
- Anthropic: "anthropic",
682
- Huggingface: "huggingface",
683
- Replicate: "replicate",
684
- Google: "google",
685
- GoogleAi: "google-ai",
686
- Azure: "azure",
687
- Aws: "aws",
688
- Anyscale: "anyscale",
689
- Perplexity: "perplexity",
690
- Groq: "groq",
691
- Fal: "fal",
692
- Leonardoai: "leonardoai",
693
- Nvidia: "nvidia",
694
- Jina: "jina",
695
- Togetherai: "togetherai",
696
- Elevenlabs: "elevenlabs",
697
- } as const;
698
- export type UpdatePromptPromptsProvider = ClosedEnum<
699
- typeof UpdatePromptPromptsProvider
700
- >;
701
-
702
- /**
703
- * The role of the prompt message
704
- */
705
- export const UpdatePromptPromptsRole = {
706
- System: "system",
707
- Assistant: "assistant",
708
- User: "user",
709
- Exception: "exception",
710
- Tool: "tool",
711
- Prompt: "prompt",
712
- Correction: "correction",
713
- ExpectedOutput: "expected_output",
714
- } as const;
715
- /**
716
- * The role of the prompt message
717
- */
718
- export type UpdatePromptPromptsRole = ClosedEnum<
719
- typeof UpdatePromptPromptsRole
720
- >;
721
-
722
- export const UpdatePrompt2PromptsResponse200Type = {
723
- ImageUrl: "image_url",
724
- } as const;
725
- export type UpdatePrompt2PromptsResponse200Type = ClosedEnum<
726
- typeof UpdatePrompt2PromptsResponse200Type
727
- >;
728
-
729
- export type UpdatePrompt2PromptsImageUrl = {
730
- /**
731
- * The orq.ai id of the image
732
- */
733
- id?: string | undefined;
734
- /**
735
- * Either a URL of the image or the base64 encoded data URI.
736
- */
737
- url: string;
738
- /**
739
- * Specifies the detail level of the image. Currently only supported with OpenAI models
740
- */
741
- detail?: string | undefined;
742
- };
743
-
744
- /**
745
- * The image part of the prompt message. Only supported with vision models.
746
- */
747
- export type UpdatePrompt2Prompts2 = {
748
- type: UpdatePrompt2PromptsResponse200Type;
749
- imageUrl: UpdatePrompt2PromptsImageUrl;
750
- };
751
-
752
- export const UpdatePrompt2PromptsResponseType = {
753
- Text: "text",
754
- } as const;
755
- export type UpdatePrompt2PromptsResponseType = ClosedEnum<
756
- typeof UpdatePrompt2PromptsResponseType
757
- >;
758
-
759
- /**
760
- * Text content part of a prompt message
761
- */
762
- export type UpdatePrompt2Prompts1 = {
763
- type: UpdatePrompt2PromptsResponseType;
764
- text: string;
765
- };
766
-
767
- export type UpdatePromptContentPrompts2 =
768
- | UpdatePrompt2Prompts1
769
- | UpdatePrompt2Prompts2;
770
-
771
- /**
772
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
773
- */
774
- export type UpdatePromptPromptsContent =
775
- | string
776
- | Array<UpdatePrompt2Prompts1 | UpdatePrompt2Prompts2>;
777
-
778
- export const UpdatePromptPromptsResponseType = {
779
- Function: "function",
780
- } as const;
781
- export type UpdatePromptPromptsResponseType = ClosedEnum<
782
- typeof UpdatePromptPromptsResponseType
783
- >;
784
-
785
- export type UpdatePromptPromptsFunction = {
786
- name: string;
787
- /**
788
- * JSON string arguments for the functions
789
- */
790
- arguments: string;
791
- };
792
-
793
- export type UpdatePromptPromptsToolCalls = {
794
- id?: string | undefined;
795
- index?: number | undefined;
796
- type: UpdatePromptPromptsResponseType;
797
- function: UpdatePromptPromptsFunction;
798
- };
799
-
800
- export type UpdatePromptPromptsMessages = {
801
- /**
802
- * The role of the prompt message
803
- */
804
- role: UpdatePromptPromptsRole;
805
- /**
806
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
807
- */
808
- content: string | Array<UpdatePrompt2Prompts1 | UpdatePrompt2Prompts2>;
809
- toolCalls?: Array<UpdatePromptPromptsToolCalls> | undefined;
810
- };
811
-
812
- /**
813
- * A list of messages compatible with the openAI schema
814
- */
815
- export type UpdatePromptPromptsPromptConfig = {
816
- stream?: boolean | undefined;
817
- model?: string | undefined;
818
- /**
819
- * The id of the resource
820
- */
821
- modelDbId?: string | undefined;
822
- /**
823
- * The type of the model
824
- */
825
- modelType?: UpdatePromptPromptsModelType | undefined;
826
- /**
827
- * Model Parameters: Not all parameters apply to every model
828
- */
829
- modelParameters?: UpdatePromptPromptsModelParameters | undefined;
830
- provider?: UpdatePromptPromptsProvider | undefined;
831
- /**
832
- * The id of the resource
833
- */
834
- integrationId?: string | null | undefined;
835
- version?: string | undefined;
836
- messages: Array<UpdatePromptPromptsMessages>;
837
- };
838
-
839
- export const UpdatePromptPromptsUseCases = {
840
- Agents: "Agents",
841
- AgentsSimulations: "Agents simulations",
842
- APIInteraction: "API interaction",
843
- AutonomousAgents: "Autonomous Agents",
844
- Chatbots: "Chatbots",
845
- Classification: "Classification",
846
- CodeUnderstanding: "Code understanding",
847
- CodeWriting: "Code writing",
848
- DocumentsQA: "Documents QA",
849
- Conversation: "Conversation",
850
- Extraction: "Extraction",
851
- MultiModal: "Multi-modal",
852
- SelfChecking: "Self-checking",
853
- Sql: "SQL",
854
- Summarization: "Summarization",
855
- Tagging: "Tagging",
856
- } as const;
857
- export type UpdatePromptPromptsUseCases = ClosedEnum<
858
- typeof UpdatePromptPromptsUseCases
859
- >;
860
-
861
- /**
862
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
863
- */
864
- export const UpdatePromptPromptsLanguage = {
865
- Chinese: "Chinese",
866
- Dutch: "Dutch",
867
- English: "English",
868
- French: "French",
869
- German: "German",
870
- Russian: "Russian",
871
- Spanish: "Spanish",
872
- } as const;
873
- /**
874
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
875
- */
876
- export type UpdatePromptPromptsLanguage = ClosedEnum<
877
- typeof UpdatePromptPromptsLanguage
878
- >;
879
-
880
- export type UpdatePromptPromptsMetadata = {
881
- /**
882
- * A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
883
- */
884
- useCases?: Array<UpdatePromptPromptsUseCases> | undefined;
885
- /**
886
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
887
- */
888
- language?: UpdatePromptPromptsLanguage | undefined;
889
- };
890
-
891
- /**
892
- * Prompt updated.
893
- */
894
- export type UpdatePromptResponseBody = {
895
- id: string;
896
- type: UpdatePromptPromptsType;
897
- owner: string;
898
- domainId: string;
899
- created: string;
900
- updated: string;
901
- createdById?: string | null | undefined;
902
- updatedById?: string | null | undefined;
903
- /**
904
- * The prompt’s name, meant to be displayable in the UI.
905
- */
906
- displayName: string;
907
- /**
908
- * The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
909
- */
910
- description?: string | null | undefined;
911
- /**
912
- * A list of messages compatible with the openAI schema
913
- */
914
- promptConfig: UpdatePromptPromptsPromptConfig;
915
- metadata?: UpdatePromptPromptsMetadata | undefined;
916
- };
917
-
918
- /** @internal */
919
- export const UpdatePromptModelType$inboundSchema: z.ZodNativeEnum<
920
- typeof UpdatePromptModelType
921
- > = z.nativeEnum(UpdatePromptModelType);
922
-
923
- /** @internal */
924
- export const UpdatePromptModelType$outboundSchema: z.ZodNativeEnum<
925
- typeof UpdatePromptModelType
926
- > = UpdatePromptModelType$inboundSchema;
927
-
928
- /**
929
- * @internal
930
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
931
- */
932
- export namespace UpdatePromptModelType$ {
933
- /** @deprecated use `UpdatePromptModelType$inboundSchema` instead. */
934
- export const inboundSchema = UpdatePromptModelType$inboundSchema;
935
- /** @deprecated use `UpdatePromptModelType$outboundSchema` instead. */
936
- export const outboundSchema = UpdatePromptModelType$outboundSchema;
937
- }
938
-
939
- /** @internal */
940
- export const UpdatePromptFormat$inboundSchema: z.ZodNativeEnum<
941
- typeof UpdatePromptFormat
942
- > = z.nativeEnum(UpdatePromptFormat);
943
-
944
- /** @internal */
945
- export const UpdatePromptFormat$outboundSchema: z.ZodNativeEnum<
946
- typeof UpdatePromptFormat
947
- > = UpdatePromptFormat$inboundSchema;
948
-
949
- /**
950
- * @internal
951
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
952
- */
953
- export namespace UpdatePromptFormat$ {
954
- /** @deprecated use `UpdatePromptFormat$inboundSchema` instead. */
955
- export const inboundSchema = UpdatePromptFormat$inboundSchema;
956
- /** @deprecated use `UpdatePromptFormat$outboundSchema` instead. */
957
- export const outboundSchema = UpdatePromptFormat$outboundSchema;
958
- }
959
-
960
- /** @internal */
961
- export const UpdatePromptQuality$inboundSchema: z.ZodNativeEnum<
962
- typeof UpdatePromptQuality
963
- > = z.nativeEnum(UpdatePromptQuality);
964
-
965
- /** @internal */
966
- export const UpdatePromptQuality$outboundSchema: z.ZodNativeEnum<
967
- typeof UpdatePromptQuality
968
- > = UpdatePromptQuality$inboundSchema;
969
-
970
- /**
971
- * @internal
972
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
973
- */
974
- export namespace UpdatePromptQuality$ {
975
- /** @deprecated use `UpdatePromptQuality$inboundSchema` instead. */
976
- export const inboundSchema = UpdatePromptQuality$inboundSchema;
977
- /** @deprecated use `UpdatePromptQuality$outboundSchema` instead. */
978
- export const outboundSchema = UpdatePromptQuality$outboundSchema;
979
- }
980
-
981
- /** @internal */
982
- export const UpdatePromptResponseFormatPromptsType$inboundSchema:
983
- z.ZodNativeEnum<typeof UpdatePromptResponseFormatPromptsType> = z.nativeEnum(
984
- UpdatePromptResponseFormatPromptsType,
985
- );
986
-
987
- /** @internal */
988
- export const UpdatePromptResponseFormatPromptsType$outboundSchema:
989
- z.ZodNativeEnum<typeof UpdatePromptResponseFormatPromptsType> =
990
- UpdatePromptResponseFormatPromptsType$inboundSchema;
991
-
992
- /**
993
- * @internal
994
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
995
- */
996
- export namespace UpdatePromptResponseFormatPromptsType$ {
997
- /** @deprecated use `UpdatePromptResponseFormatPromptsType$inboundSchema` instead. */
998
- export const inboundSchema =
999
- UpdatePromptResponseFormatPromptsType$inboundSchema;
1000
- /** @deprecated use `UpdatePromptResponseFormatPromptsType$outboundSchema` instead. */
1001
- export const outboundSchema =
1002
- UpdatePromptResponseFormatPromptsType$outboundSchema;
1003
- }
1004
-
1005
- /** @internal */
1006
- export const UpdatePromptResponseFormat2$inboundSchema: z.ZodType<
1007
- UpdatePromptResponseFormat2,
1008
- z.ZodTypeDef,
1009
- unknown
1010
- > = z.object({
1011
- type: UpdatePromptResponseFormatPromptsType$inboundSchema,
1012
- });
1013
-
1014
- /** @internal */
1015
- export type UpdatePromptResponseFormat2$Outbound = {
1016
- type: string;
1017
- };
1018
-
1019
- /** @internal */
1020
- export const UpdatePromptResponseFormat2$outboundSchema: z.ZodType<
1021
- UpdatePromptResponseFormat2$Outbound,
1022
- z.ZodTypeDef,
1023
- UpdatePromptResponseFormat2
1024
- > = z.object({
1025
- type: UpdatePromptResponseFormatPromptsType$outboundSchema,
1026
- });
1027
-
1028
- /**
1029
- * @internal
1030
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1031
- */
1032
- export namespace UpdatePromptResponseFormat2$ {
1033
- /** @deprecated use `UpdatePromptResponseFormat2$inboundSchema` instead. */
1034
- export const inboundSchema = UpdatePromptResponseFormat2$inboundSchema;
1035
- /** @deprecated use `UpdatePromptResponseFormat2$outboundSchema` instead. */
1036
- export const outboundSchema = UpdatePromptResponseFormat2$outboundSchema;
1037
- /** @deprecated use `UpdatePromptResponseFormat2$Outbound` instead. */
1038
- export type Outbound = UpdatePromptResponseFormat2$Outbound;
1039
- }
1040
-
1041
- export function updatePromptResponseFormat2ToJSON(
1042
- updatePromptResponseFormat2: UpdatePromptResponseFormat2,
1043
- ): string {
1044
- return JSON.stringify(
1045
- UpdatePromptResponseFormat2$outboundSchema.parse(
1046
- updatePromptResponseFormat2,
1047
- ),
1048
- );
1049
- }
1050
-
1051
- export function updatePromptResponseFormat2FromJSON(
1052
- jsonString: string,
1053
- ): SafeParseResult<UpdatePromptResponseFormat2, SDKValidationError> {
1054
- return safeParse(
1055
- jsonString,
1056
- (x) => UpdatePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
1057
- `Failed to parse 'UpdatePromptResponseFormat2' from JSON`,
1058
- );
1059
- }
1060
-
1061
- /** @internal */
1062
- export const UpdatePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
1063
- typeof UpdatePromptResponseFormatType
1064
- > = z.nativeEnum(UpdatePromptResponseFormatType);
1065
-
1066
- /** @internal */
1067
- export const UpdatePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
1068
- typeof UpdatePromptResponseFormatType
1069
- > = UpdatePromptResponseFormatType$inboundSchema;
1070
-
1071
- /**
1072
- * @internal
1073
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1074
- */
1075
- export namespace UpdatePromptResponseFormatType$ {
1076
- /** @deprecated use `UpdatePromptResponseFormatType$inboundSchema` instead. */
1077
- export const inboundSchema = UpdatePromptResponseFormatType$inboundSchema;
1078
- /** @deprecated use `UpdatePromptResponseFormatType$outboundSchema` instead. */
1079
- export const outboundSchema = UpdatePromptResponseFormatType$outboundSchema;
1080
- }
1081
-
1082
- /** @internal */
1083
- export const ResponseFormatJsonSchema$inboundSchema: z.ZodType<
1084
- ResponseFormatJsonSchema,
1085
- z.ZodTypeDef,
1086
- unknown
1087
- > = z.object({
1088
- name: z.string(),
1089
- strict: z.boolean(),
1090
- schema: z.record(z.any()),
1091
- });
1092
-
1093
- /** @internal */
1094
- export type ResponseFormatJsonSchema$Outbound = {
1095
- name: string;
1096
- strict: boolean;
1097
- schema: { [k: string]: any };
1098
- };
1099
-
1100
- /** @internal */
1101
- export const ResponseFormatJsonSchema$outboundSchema: z.ZodType<
1102
- ResponseFormatJsonSchema$Outbound,
1103
- z.ZodTypeDef,
1104
- ResponseFormatJsonSchema
1105
- > = z.object({
1106
- name: z.string(),
1107
- strict: z.boolean(),
1108
- schema: z.record(z.any()),
1109
- });
1110
-
1111
- /**
1112
- * @internal
1113
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1114
- */
1115
- export namespace ResponseFormatJsonSchema$ {
1116
- /** @deprecated use `ResponseFormatJsonSchema$inboundSchema` instead. */
1117
- export const inboundSchema = ResponseFormatJsonSchema$inboundSchema;
1118
- /** @deprecated use `ResponseFormatJsonSchema$outboundSchema` instead. */
1119
- export const outboundSchema = ResponseFormatJsonSchema$outboundSchema;
1120
- /** @deprecated use `ResponseFormatJsonSchema$Outbound` instead. */
1121
- export type Outbound = ResponseFormatJsonSchema$Outbound;
1122
- }
1123
-
1124
- export function responseFormatJsonSchemaToJSON(
1125
- responseFormatJsonSchema: ResponseFormatJsonSchema,
1126
- ): string {
1127
- return JSON.stringify(
1128
- ResponseFormatJsonSchema$outboundSchema.parse(responseFormatJsonSchema),
1129
- );
1130
- }
1131
-
1132
- export function responseFormatJsonSchemaFromJSON(
1133
- jsonString: string,
1134
- ): SafeParseResult<ResponseFormatJsonSchema, SDKValidationError> {
1135
- return safeParse(
1136
- jsonString,
1137
- (x) => ResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
1138
- `Failed to parse 'ResponseFormatJsonSchema' from JSON`,
1139
- );
1140
- }
1141
-
1142
- /** @internal */
1143
- export const UpdatePromptResponseFormat1$inboundSchema: z.ZodType<
1144
- UpdatePromptResponseFormat1,
1145
- z.ZodTypeDef,
1146
- unknown
1147
- > = z.object({
1148
- type: UpdatePromptResponseFormatType$inboundSchema,
1149
- json_schema: z.lazy(() => ResponseFormatJsonSchema$inboundSchema),
1150
- }).transform((v) => {
1151
- return remap$(v, {
1152
- "json_schema": "jsonSchema",
1153
- });
1154
- });
1155
-
1156
- /** @internal */
1157
- export type UpdatePromptResponseFormat1$Outbound = {
1158
- type: string;
1159
- json_schema: ResponseFormatJsonSchema$Outbound;
1160
- };
1161
-
1162
- /** @internal */
1163
- export const UpdatePromptResponseFormat1$outboundSchema: z.ZodType<
1164
- UpdatePromptResponseFormat1$Outbound,
1165
- z.ZodTypeDef,
1166
- UpdatePromptResponseFormat1
1167
- > = z.object({
1168
- type: UpdatePromptResponseFormatType$outboundSchema,
1169
- jsonSchema: z.lazy(() => ResponseFormatJsonSchema$outboundSchema),
1170
- }).transform((v) => {
1171
- return remap$(v, {
1172
- jsonSchema: "json_schema",
1173
- });
1174
- });
1175
-
1176
- /**
1177
- * @internal
1178
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1179
- */
1180
- export namespace UpdatePromptResponseFormat1$ {
1181
- /** @deprecated use `UpdatePromptResponseFormat1$inboundSchema` instead. */
1182
- export const inboundSchema = UpdatePromptResponseFormat1$inboundSchema;
1183
- /** @deprecated use `UpdatePromptResponseFormat1$outboundSchema` instead. */
1184
- export const outboundSchema = UpdatePromptResponseFormat1$outboundSchema;
1185
- /** @deprecated use `UpdatePromptResponseFormat1$Outbound` instead. */
1186
- export type Outbound = UpdatePromptResponseFormat1$Outbound;
1187
- }
1188
-
1189
- export function updatePromptResponseFormat1ToJSON(
1190
- updatePromptResponseFormat1: UpdatePromptResponseFormat1,
1191
- ): string {
1192
- return JSON.stringify(
1193
- UpdatePromptResponseFormat1$outboundSchema.parse(
1194
- updatePromptResponseFormat1,
1195
- ),
1196
- );
1197
- }
1198
-
1199
- export function updatePromptResponseFormat1FromJSON(
1200
- jsonString: string,
1201
- ): SafeParseResult<UpdatePromptResponseFormat1, SDKValidationError> {
1202
- return safeParse(
1203
- jsonString,
1204
- (x) => UpdatePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1205
- `Failed to parse 'UpdatePromptResponseFormat1' from JSON`,
1206
- );
1207
- }
1208
-
1209
- /** @internal */
1210
- export const UpdatePromptResponseFormat$inboundSchema: z.ZodType<
1211
- UpdatePromptResponseFormat,
1212
- z.ZodTypeDef,
1213
- unknown
1214
- > = z.union([
1215
- z.lazy(() => UpdatePromptResponseFormat2$inboundSchema),
1216
- z.lazy(() => UpdatePromptResponseFormat1$inboundSchema),
1217
- ]);
1218
-
1219
- /** @internal */
1220
- export type UpdatePromptResponseFormat$Outbound =
1221
- | UpdatePromptResponseFormat2$Outbound
1222
- | UpdatePromptResponseFormat1$Outbound;
1223
-
1224
- /** @internal */
1225
- export const UpdatePromptResponseFormat$outboundSchema: z.ZodType<
1226
- UpdatePromptResponseFormat$Outbound,
1227
- z.ZodTypeDef,
1228
- UpdatePromptResponseFormat
1229
- > = z.union([
1230
- z.lazy(() => UpdatePromptResponseFormat2$outboundSchema),
1231
- z.lazy(() => UpdatePromptResponseFormat1$outboundSchema),
1232
- ]);
1233
-
1234
- /**
1235
- * @internal
1236
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1237
- */
1238
- export namespace UpdatePromptResponseFormat$ {
1239
- /** @deprecated use `UpdatePromptResponseFormat$inboundSchema` instead. */
1240
- export const inboundSchema = UpdatePromptResponseFormat$inboundSchema;
1241
- /** @deprecated use `UpdatePromptResponseFormat$outboundSchema` instead. */
1242
- export const outboundSchema = UpdatePromptResponseFormat$outboundSchema;
1243
- /** @deprecated use `UpdatePromptResponseFormat$Outbound` instead. */
1244
- export type Outbound = UpdatePromptResponseFormat$Outbound;
1245
- }
1246
-
1247
- export function updatePromptResponseFormatToJSON(
1248
- updatePromptResponseFormat: UpdatePromptResponseFormat,
1249
- ): string {
1250
- return JSON.stringify(
1251
- UpdatePromptResponseFormat$outboundSchema.parse(updatePromptResponseFormat),
1252
- );
1253
- }
1254
-
1255
- export function updatePromptResponseFormatFromJSON(
1256
- jsonString: string,
1257
- ): SafeParseResult<UpdatePromptResponseFormat, SDKValidationError> {
1258
- return safeParse(
1259
- jsonString,
1260
- (x) => UpdatePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
1261
- `Failed to parse 'UpdatePromptResponseFormat' from JSON`,
1262
- );
1263
- }
1264
-
1265
- /** @internal */
1266
- export const UpdatePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1267
- typeof UpdatePromptPhotoRealVersion
1268
- > = z.nativeEnum(UpdatePromptPhotoRealVersion);
1269
-
1270
- /** @internal */
1271
- export const UpdatePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
1272
- typeof UpdatePromptPhotoRealVersion
1273
- > = UpdatePromptPhotoRealVersion$inboundSchema;
1274
-
1275
- /**
1276
- * @internal
1277
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1278
- */
1279
- export namespace UpdatePromptPhotoRealVersion$ {
1280
- /** @deprecated use `UpdatePromptPhotoRealVersion$inboundSchema` instead. */
1281
- export const inboundSchema = UpdatePromptPhotoRealVersion$inboundSchema;
1282
- /** @deprecated use `UpdatePromptPhotoRealVersion$outboundSchema` instead. */
1283
- export const outboundSchema = UpdatePromptPhotoRealVersion$outboundSchema;
1284
- }
1285
-
1286
- /** @internal */
1287
- export const UpdatePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
1288
- typeof UpdatePromptEncodingFormat
1289
- > = z.nativeEnum(UpdatePromptEncodingFormat);
1290
-
1291
- /** @internal */
1292
- export const UpdatePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
1293
- typeof UpdatePromptEncodingFormat
1294
- > = UpdatePromptEncodingFormat$inboundSchema;
1295
-
1296
- /**
1297
- * @internal
1298
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1299
- */
1300
- export namespace UpdatePromptEncodingFormat$ {
1301
- /** @deprecated use `UpdatePromptEncodingFormat$inboundSchema` instead. */
1302
- export const inboundSchema = UpdatePromptEncodingFormat$inboundSchema;
1303
- /** @deprecated use `UpdatePromptEncodingFormat$outboundSchema` instead. */
1304
- export const outboundSchema = UpdatePromptEncodingFormat$outboundSchema;
1305
- }
1306
-
1307
- /** @internal */
1308
- export const UpdatePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
1309
- typeof UpdatePromptReasoningEffort
1310
- > = z.nativeEnum(UpdatePromptReasoningEffort);
1311
-
1312
- /** @internal */
1313
- export const UpdatePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
1314
- typeof UpdatePromptReasoningEffort
1315
- > = UpdatePromptReasoningEffort$inboundSchema;
1316
-
1317
- /**
1318
- * @internal
1319
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1320
- */
1321
- export namespace UpdatePromptReasoningEffort$ {
1322
- /** @deprecated use `UpdatePromptReasoningEffort$inboundSchema` instead. */
1323
- export const inboundSchema = UpdatePromptReasoningEffort$inboundSchema;
1324
- /** @deprecated use `UpdatePromptReasoningEffort$outboundSchema` instead. */
1325
- export const outboundSchema = UpdatePromptReasoningEffort$outboundSchema;
1326
- }
1327
-
1328
- /** @internal */
1329
- export const UpdatePromptModelParameters$inboundSchema: z.ZodType<
1330
- UpdatePromptModelParameters,
1331
- z.ZodTypeDef,
1332
- unknown
1333
- > = z.object({
1334
- temperature: z.number().optional(),
1335
- maxTokens: z.number().optional(),
1336
- topK: z.number().optional(),
1337
- topP: z.number().optional(),
1338
- frequencyPenalty: z.number().optional(),
1339
- presencePenalty: z.number().optional(),
1340
- numImages: z.number().optional(),
1341
- seed: z.number().optional(),
1342
- format: UpdatePromptFormat$inboundSchema.optional(),
1343
- dimensions: z.string().optional(),
1344
- quality: UpdatePromptQuality$inboundSchema.optional(),
1345
- style: z.string().optional(),
1346
- responseFormat: z.nullable(
1347
- z.union([
1348
- z.lazy(() => UpdatePromptResponseFormat2$inboundSchema),
1349
- z.lazy(() => UpdatePromptResponseFormat1$inboundSchema),
1350
- ]),
1351
- ).optional(),
1352
- photoRealVersion: UpdatePromptPhotoRealVersion$inboundSchema.optional(),
1353
- encoding_format: UpdatePromptEncodingFormat$inboundSchema.optional(),
1354
- reasoningEffort: UpdatePromptReasoningEffort$inboundSchema.optional(),
1355
- budgetTokens: z.number().optional(),
1356
- }).transform((v) => {
1357
- return remap$(v, {
1358
- "encoding_format": "encodingFormat",
1359
- });
1360
- });
1361
-
1362
- /** @internal */
1363
- export type UpdatePromptModelParameters$Outbound = {
1364
- temperature?: number | undefined;
1365
- maxTokens?: number | undefined;
1366
- topK?: number | undefined;
1367
- topP?: number | undefined;
1368
- frequencyPenalty?: number | undefined;
1369
- presencePenalty?: number | undefined;
1370
- numImages?: number | undefined;
1371
- seed?: number | undefined;
1372
- format?: string | undefined;
1373
- dimensions?: string | undefined;
1374
- quality?: string | undefined;
1375
- style?: string | undefined;
1376
- responseFormat?:
1377
- | UpdatePromptResponseFormat2$Outbound
1378
- | UpdatePromptResponseFormat1$Outbound
1379
- | null
1380
- | undefined;
1381
- photoRealVersion?: string | undefined;
1382
- encoding_format?: string | undefined;
1383
- reasoningEffort?: string | undefined;
1384
- budgetTokens?: number | undefined;
1385
- };
1386
-
1387
- /** @internal */
1388
- export const UpdatePromptModelParameters$outboundSchema: z.ZodType<
1389
- UpdatePromptModelParameters$Outbound,
1390
- z.ZodTypeDef,
1391
- UpdatePromptModelParameters
1392
- > = z.object({
1393
- temperature: z.number().optional(),
1394
- maxTokens: z.number().optional(),
1395
- topK: z.number().optional(),
1396
- topP: z.number().optional(),
1397
- frequencyPenalty: z.number().optional(),
1398
- presencePenalty: z.number().optional(),
1399
- numImages: z.number().optional(),
1400
- seed: z.number().optional(),
1401
- format: UpdatePromptFormat$outboundSchema.optional(),
1402
- dimensions: z.string().optional(),
1403
- quality: UpdatePromptQuality$outboundSchema.optional(),
1404
- style: z.string().optional(),
1405
- responseFormat: z.nullable(
1406
- z.union([
1407
- z.lazy(() => UpdatePromptResponseFormat2$outboundSchema),
1408
- z.lazy(() => UpdatePromptResponseFormat1$outboundSchema),
1409
- ]),
1410
- ).optional(),
1411
- photoRealVersion: UpdatePromptPhotoRealVersion$outboundSchema.optional(),
1412
- encodingFormat: UpdatePromptEncodingFormat$outboundSchema.optional(),
1413
- reasoningEffort: UpdatePromptReasoningEffort$outboundSchema.optional(),
1414
- budgetTokens: z.number().optional(),
1415
- }).transform((v) => {
1416
- return remap$(v, {
1417
- encodingFormat: "encoding_format",
1418
- });
1419
- });
1420
-
1421
- /**
1422
- * @internal
1423
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1424
- */
1425
- export namespace UpdatePromptModelParameters$ {
1426
- /** @deprecated use `UpdatePromptModelParameters$inboundSchema` instead. */
1427
- export const inboundSchema = UpdatePromptModelParameters$inboundSchema;
1428
- /** @deprecated use `UpdatePromptModelParameters$outboundSchema` instead. */
1429
- export const outboundSchema = UpdatePromptModelParameters$outboundSchema;
1430
- /** @deprecated use `UpdatePromptModelParameters$Outbound` instead. */
1431
- export type Outbound = UpdatePromptModelParameters$Outbound;
1432
- }
1433
-
1434
- export function updatePromptModelParametersToJSON(
1435
- updatePromptModelParameters: UpdatePromptModelParameters,
1436
- ): string {
1437
- return JSON.stringify(
1438
- UpdatePromptModelParameters$outboundSchema.parse(
1439
- updatePromptModelParameters,
1440
- ),
1441
- );
1442
- }
1443
-
1444
- export function updatePromptModelParametersFromJSON(
1445
- jsonString: string,
1446
- ): SafeParseResult<UpdatePromptModelParameters, SDKValidationError> {
1447
- return safeParse(
1448
- jsonString,
1449
- (x) => UpdatePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
1450
- `Failed to parse 'UpdatePromptModelParameters' from JSON`,
1451
- );
1452
- }
1453
-
1454
- /** @internal */
1455
- export const UpdatePromptProvider$inboundSchema: z.ZodNativeEnum<
1456
- typeof UpdatePromptProvider
1457
- > = z.nativeEnum(UpdatePromptProvider);
1458
-
1459
- /** @internal */
1460
- export const UpdatePromptProvider$outboundSchema: z.ZodNativeEnum<
1461
- typeof UpdatePromptProvider
1462
- > = UpdatePromptProvider$inboundSchema;
1463
-
1464
- /**
1465
- * @internal
1466
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1467
- */
1468
- export namespace UpdatePromptProvider$ {
1469
- /** @deprecated use `UpdatePromptProvider$inboundSchema` instead. */
1470
- export const inboundSchema = UpdatePromptProvider$inboundSchema;
1471
- /** @deprecated use `UpdatePromptProvider$outboundSchema` instead. */
1472
- export const outboundSchema = UpdatePromptProvider$outboundSchema;
1473
- }
1474
-
1475
- /** @internal */
1476
- export const UpdatePromptRole$inboundSchema: z.ZodNativeEnum<
1477
- typeof UpdatePromptRole
1478
- > = z.nativeEnum(UpdatePromptRole);
1479
-
1480
- /** @internal */
1481
- export const UpdatePromptRole$outboundSchema: z.ZodNativeEnum<
1482
- typeof UpdatePromptRole
1483
- > = UpdatePromptRole$inboundSchema;
1484
-
1485
- /**
1486
- * @internal
1487
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1488
- */
1489
- export namespace UpdatePromptRole$ {
1490
- /** @deprecated use `UpdatePromptRole$inboundSchema` instead. */
1491
- export const inboundSchema = UpdatePromptRole$inboundSchema;
1492
- /** @deprecated use `UpdatePromptRole$outboundSchema` instead. */
1493
- export const outboundSchema = UpdatePromptRole$outboundSchema;
1494
- }
1495
-
1496
- /** @internal */
1497
- export const UpdatePrompt2PromptsType$inboundSchema: z.ZodNativeEnum<
1498
- typeof UpdatePrompt2PromptsType
1499
- > = z.nativeEnum(UpdatePrompt2PromptsType);
1500
-
1501
- /** @internal */
1502
- export const UpdatePrompt2PromptsType$outboundSchema: z.ZodNativeEnum<
1503
- typeof UpdatePrompt2PromptsType
1504
- > = UpdatePrompt2PromptsType$inboundSchema;
1505
-
1506
- /**
1507
- * @internal
1508
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1509
- */
1510
- export namespace UpdatePrompt2PromptsType$ {
1511
- /** @deprecated use `UpdatePrompt2PromptsType$inboundSchema` instead. */
1512
- export const inboundSchema = UpdatePrompt2PromptsType$inboundSchema;
1513
- /** @deprecated use `UpdatePrompt2PromptsType$outboundSchema` instead. */
1514
- export const outboundSchema = UpdatePrompt2PromptsType$outboundSchema;
1515
- }
1516
-
1517
- /** @internal */
1518
- export const UpdatePrompt2ImageUrl$inboundSchema: z.ZodType<
1519
- UpdatePrompt2ImageUrl,
1520
- z.ZodTypeDef,
1521
- unknown
1522
- > = z.object({
1523
- url: z.string(),
1524
- detail: z.string().optional(),
1525
- });
1526
-
1527
- /** @internal */
1528
- export type UpdatePrompt2ImageUrl$Outbound = {
1529
- url: string;
1530
- detail?: string | undefined;
1531
- };
1532
-
1533
- /** @internal */
1534
- export const UpdatePrompt2ImageUrl$outboundSchema: z.ZodType<
1535
- UpdatePrompt2ImageUrl$Outbound,
1536
- z.ZodTypeDef,
1537
- UpdatePrompt2ImageUrl
1538
- > = z.object({
1539
- url: z.string(),
1540
- detail: z.string().optional(),
1541
- });
1542
-
1543
- /**
1544
- * @internal
1545
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1546
- */
1547
- export namespace UpdatePrompt2ImageUrl$ {
1548
- /** @deprecated use `UpdatePrompt2ImageUrl$inboundSchema` instead. */
1549
- export const inboundSchema = UpdatePrompt2ImageUrl$inboundSchema;
1550
- /** @deprecated use `UpdatePrompt2ImageUrl$outboundSchema` instead. */
1551
- export const outboundSchema = UpdatePrompt2ImageUrl$outboundSchema;
1552
- /** @deprecated use `UpdatePrompt2ImageUrl$Outbound` instead. */
1553
- export type Outbound = UpdatePrompt2ImageUrl$Outbound;
1554
- }
1555
-
1556
- export function updatePrompt2ImageUrlToJSON(
1557
- updatePrompt2ImageUrl: UpdatePrompt2ImageUrl,
1558
- ): string {
1559
- return JSON.stringify(
1560
- UpdatePrompt2ImageUrl$outboundSchema.parse(updatePrompt2ImageUrl),
1561
- );
1562
- }
1563
-
1564
- export function updatePrompt2ImageUrlFromJSON(
1565
- jsonString: string,
1566
- ): SafeParseResult<UpdatePrompt2ImageUrl, SDKValidationError> {
1567
- return safeParse(
1568
- jsonString,
1569
- (x) => UpdatePrompt2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1570
- `Failed to parse 'UpdatePrompt2ImageUrl' from JSON`,
1571
- );
1572
- }
1573
-
1574
- /** @internal */
1575
- export const UpdatePrompt22$inboundSchema: z.ZodType<
1576
- UpdatePrompt22,
1577
- z.ZodTypeDef,
1578
- unknown
1579
- > = z.object({
1580
- type: UpdatePrompt2PromptsType$inboundSchema,
1581
- image_url: z.lazy(() => UpdatePrompt2ImageUrl$inboundSchema),
1582
- }).transform((v) => {
1583
- return remap$(v, {
1584
- "image_url": "imageUrl",
1585
- });
1586
- });
1587
-
1588
- /** @internal */
1589
- export type UpdatePrompt22$Outbound = {
1590
- type: string;
1591
- image_url: UpdatePrompt2ImageUrl$Outbound;
1592
- };
1593
-
1594
- /** @internal */
1595
- export const UpdatePrompt22$outboundSchema: z.ZodType<
1596
- UpdatePrompt22$Outbound,
1597
- z.ZodTypeDef,
1598
- UpdatePrompt22
1599
- > = z.object({
1600
- type: UpdatePrompt2PromptsType$outboundSchema,
1601
- imageUrl: z.lazy(() => UpdatePrompt2ImageUrl$outboundSchema),
1602
- }).transform((v) => {
1603
- return remap$(v, {
1604
- imageUrl: "image_url",
1605
- });
1606
- });
1607
-
1608
- /**
1609
- * @internal
1610
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1611
- */
1612
- export namespace UpdatePrompt22$ {
1613
- /** @deprecated use `UpdatePrompt22$inboundSchema` instead. */
1614
- export const inboundSchema = UpdatePrompt22$inboundSchema;
1615
- /** @deprecated use `UpdatePrompt22$outboundSchema` instead. */
1616
- export const outboundSchema = UpdatePrompt22$outboundSchema;
1617
- /** @deprecated use `UpdatePrompt22$Outbound` instead. */
1618
- export type Outbound = UpdatePrompt22$Outbound;
1619
- }
1620
-
1621
- export function updatePrompt22ToJSON(updatePrompt22: UpdatePrompt22): string {
1622
- return JSON.stringify(UpdatePrompt22$outboundSchema.parse(updatePrompt22));
1623
- }
1624
-
1625
- export function updatePrompt22FromJSON(
1626
- jsonString: string,
1627
- ): SafeParseResult<UpdatePrompt22, SDKValidationError> {
1628
- return safeParse(
1629
- jsonString,
1630
- (x) => UpdatePrompt22$inboundSchema.parse(JSON.parse(x)),
1631
- `Failed to parse 'UpdatePrompt22' from JSON`,
1632
- );
1633
- }
1634
-
1635
- /** @internal */
1636
- export const UpdatePrompt2Type$inboundSchema: z.ZodNativeEnum<
1637
- typeof UpdatePrompt2Type
1638
- > = z.nativeEnum(UpdatePrompt2Type);
1639
-
1640
- /** @internal */
1641
- export const UpdatePrompt2Type$outboundSchema: z.ZodNativeEnum<
1642
- typeof UpdatePrompt2Type
1643
- > = UpdatePrompt2Type$inboundSchema;
1644
-
1645
- /**
1646
- * @internal
1647
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1648
- */
1649
- export namespace UpdatePrompt2Type$ {
1650
- /** @deprecated use `UpdatePrompt2Type$inboundSchema` instead. */
1651
- export const inboundSchema = UpdatePrompt2Type$inboundSchema;
1652
- /** @deprecated use `UpdatePrompt2Type$outboundSchema` instead. */
1653
- export const outboundSchema = UpdatePrompt2Type$outboundSchema;
1654
- }
1655
-
1656
- /** @internal */
1657
- export const UpdatePrompt21$inboundSchema: z.ZodType<
1658
- UpdatePrompt21,
1659
- z.ZodTypeDef,
1660
- unknown
1661
- > = z.object({
1662
- type: UpdatePrompt2Type$inboundSchema,
1663
- text: z.string(),
1664
- });
1665
-
1666
- /** @internal */
1667
- export type UpdatePrompt21$Outbound = {
1668
- type: string;
1669
- text: string;
1670
- };
1671
-
1672
- /** @internal */
1673
- export const UpdatePrompt21$outboundSchema: z.ZodType<
1674
- UpdatePrompt21$Outbound,
1675
- z.ZodTypeDef,
1676
- UpdatePrompt21
1677
- > = z.object({
1678
- type: UpdatePrompt2Type$outboundSchema,
1679
- text: z.string(),
1680
- });
1681
-
1682
- /**
1683
- * @internal
1684
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1685
- */
1686
- export namespace UpdatePrompt21$ {
1687
- /** @deprecated use `UpdatePrompt21$inboundSchema` instead. */
1688
- export const inboundSchema = UpdatePrompt21$inboundSchema;
1689
- /** @deprecated use `UpdatePrompt21$outboundSchema` instead. */
1690
- export const outboundSchema = UpdatePrompt21$outboundSchema;
1691
- /** @deprecated use `UpdatePrompt21$Outbound` instead. */
1692
- export type Outbound = UpdatePrompt21$Outbound;
1693
- }
1694
-
1695
- export function updatePrompt21ToJSON(updatePrompt21: UpdatePrompt21): string {
1696
- return JSON.stringify(UpdatePrompt21$outboundSchema.parse(updatePrompt21));
1697
- }
1698
-
1699
- export function updatePrompt21FromJSON(
1700
- jsonString: string,
1701
- ): SafeParseResult<UpdatePrompt21, SDKValidationError> {
1702
- return safeParse(
1703
- jsonString,
1704
- (x) => UpdatePrompt21$inboundSchema.parse(JSON.parse(x)),
1705
- `Failed to parse 'UpdatePrompt21' from JSON`,
1706
- );
1707
- }
1708
-
1709
- /** @internal */
1710
- export const UpdatePromptContent2$inboundSchema: z.ZodType<
1711
- UpdatePromptContent2,
1712
- z.ZodTypeDef,
1713
- unknown
1714
- > = z.union([
1715
- z.lazy(() => UpdatePrompt21$inboundSchema),
1716
- z.lazy(() => UpdatePrompt22$inboundSchema),
1717
- ]);
1718
-
1719
- /** @internal */
1720
- export type UpdatePromptContent2$Outbound =
1721
- | UpdatePrompt21$Outbound
1722
- | UpdatePrompt22$Outbound;
1723
-
1724
- /** @internal */
1725
- export const UpdatePromptContent2$outboundSchema: z.ZodType<
1726
- UpdatePromptContent2$Outbound,
1727
- z.ZodTypeDef,
1728
- UpdatePromptContent2
1729
- > = z.union([
1730
- z.lazy(() => UpdatePrompt21$outboundSchema),
1731
- z.lazy(() => UpdatePrompt22$outboundSchema),
1732
- ]);
1733
-
1734
- /**
1735
- * @internal
1736
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1737
- */
1738
- export namespace UpdatePromptContent2$ {
1739
- /** @deprecated use `UpdatePromptContent2$inboundSchema` instead. */
1740
- export const inboundSchema = UpdatePromptContent2$inboundSchema;
1741
- /** @deprecated use `UpdatePromptContent2$outboundSchema` instead. */
1742
- export const outboundSchema = UpdatePromptContent2$outboundSchema;
1743
- /** @deprecated use `UpdatePromptContent2$Outbound` instead. */
1744
- export type Outbound = UpdatePromptContent2$Outbound;
1745
- }
1746
-
1747
- export function updatePromptContent2ToJSON(
1748
- updatePromptContent2: UpdatePromptContent2,
1749
- ): string {
1750
- return JSON.stringify(
1751
- UpdatePromptContent2$outboundSchema.parse(updatePromptContent2),
1752
- );
1753
- }
1754
-
1755
- export function updatePromptContent2FromJSON(
1756
- jsonString: string,
1757
- ): SafeParseResult<UpdatePromptContent2, SDKValidationError> {
1758
- return safeParse(
1759
- jsonString,
1760
- (x) => UpdatePromptContent2$inboundSchema.parse(JSON.parse(x)),
1761
- `Failed to parse 'UpdatePromptContent2' from JSON`,
1762
- );
1763
- }
1764
-
1765
- /** @internal */
1766
- export const UpdatePromptContent$inboundSchema: z.ZodType<
1767
- UpdatePromptContent,
1768
- z.ZodTypeDef,
1769
- unknown
1770
- > = z.union([
1771
- z.string(),
1772
- z.array(z.union([
1773
- z.lazy(() => UpdatePrompt21$inboundSchema),
1774
- z.lazy(() => UpdatePrompt22$inboundSchema),
1775
- ])),
1776
- ]);
1777
-
1778
- /** @internal */
1779
- export type UpdatePromptContent$Outbound =
1780
- | string
1781
- | Array<UpdatePrompt21$Outbound | UpdatePrompt22$Outbound>;
1782
-
1783
- /** @internal */
1784
- export const UpdatePromptContent$outboundSchema: z.ZodType<
1785
- UpdatePromptContent$Outbound,
1786
- z.ZodTypeDef,
1787
- UpdatePromptContent
1788
- > = z.union([
1789
- z.string(),
1790
- z.array(z.union([
1791
- z.lazy(() => UpdatePrompt21$outboundSchema),
1792
- z.lazy(() => UpdatePrompt22$outboundSchema),
1793
- ])),
1794
- ]);
1795
-
1796
- /**
1797
- * @internal
1798
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1799
- */
1800
- export namespace UpdatePromptContent$ {
1801
- /** @deprecated use `UpdatePromptContent$inboundSchema` instead. */
1802
- export const inboundSchema = UpdatePromptContent$inboundSchema;
1803
- /** @deprecated use `UpdatePromptContent$outboundSchema` instead. */
1804
- export const outboundSchema = UpdatePromptContent$outboundSchema;
1805
- /** @deprecated use `UpdatePromptContent$Outbound` instead. */
1806
- export type Outbound = UpdatePromptContent$Outbound;
1807
- }
1808
-
1809
- export function updatePromptContentToJSON(
1810
- updatePromptContent: UpdatePromptContent,
1811
- ): string {
1812
- return JSON.stringify(
1813
- UpdatePromptContent$outboundSchema.parse(updatePromptContent),
1814
- );
1815
- }
1816
-
1817
- export function updatePromptContentFromJSON(
1818
- jsonString: string,
1819
- ): SafeParseResult<UpdatePromptContent, SDKValidationError> {
1820
- return safeParse(
1821
- jsonString,
1822
- (x) => UpdatePromptContent$inboundSchema.parse(JSON.parse(x)),
1823
- `Failed to parse 'UpdatePromptContent' from JSON`,
1824
- );
1825
- }
1826
-
1827
- /** @internal */
1828
- export const UpdatePromptType$inboundSchema: z.ZodNativeEnum<
1829
- typeof UpdatePromptType
1830
- > = z.nativeEnum(UpdatePromptType);
1831
-
1832
- /** @internal */
1833
- export const UpdatePromptType$outboundSchema: z.ZodNativeEnum<
1834
- typeof UpdatePromptType
1835
- > = UpdatePromptType$inboundSchema;
1836
-
1837
- /**
1838
- * @internal
1839
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1840
- */
1841
- export namespace UpdatePromptType$ {
1842
- /** @deprecated use `UpdatePromptType$inboundSchema` instead. */
1843
- export const inboundSchema = UpdatePromptType$inboundSchema;
1844
- /** @deprecated use `UpdatePromptType$outboundSchema` instead. */
1845
- export const outboundSchema = UpdatePromptType$outboundSchema;
1846
- }
1847
-
1848
- /** @internal */
1849
- export const UpdatePromptFunction$inboundSchema: z.ZodType<
1850
- UpdatePromptFunction,
1851
- z.ZodTypeDef,
1852
- unknown
1853
- > = z.object({
1854
- name: z.string(),
1855
- arguments: z.string(),
1856
- });
1857
-
1858
- /** @internal */
1859
- export type UpdatePromptFunction$Outbound = {
1860
- name: string;
1861
- arguments: string;
1862
- };
1863
-
1864
- /** @internal */
1865
- export const UpdatePromptFunction$outboundSchema: z.ZodType<
1866
- UpdatePromptFunction$Outbound,
1867
- z.ZodTypeDef,
1868
- UpdatePromptFunction
1869
- > = z.object({
1870
- name: z.string(),
1871
- arguments: z.string(),
1872
- });
1873
-
1874
- /**
1875
- * @internal
1876
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1877
- */
1878
- export namespace UpdatePromptFunction$ {
1879
- /** @deprecated use `UpdatePromptFunction$inboundSchema` instead. */
1880
- export const inboundSchema = UpdatePromptFunction$inboundSchema;
1881
- /** @deprecated use `UpdatePromptFunction$outboundSchema` instead. */
1882
- export const outboundSchema = UpdatePromptFunction$outboundSchema;
1883
- /** @deprecated use `UpdatePromptFunction$Outbound` instead. */
1884
- export type Outbound = UpdatePromptFunction$Outbound;
1885
- }
1886
-
1887
- export function updatePromptFunctionToJSON(
1888
- updatePromptFunction: UpdatePromptFunction,
1889
- ): string {
1890
- return JSON.stringify(
1891
- UpdatePromptFunction$outboundSchema.parse(updatePromptFunction),
1892
- );
1893
- }
1894
-
1895
- export function updatePromptFunctionFromJSON(
1896
- jsonString: string,
1897
- ): SafeParseResult<UpdatePromptFunction, SDKValidationError> {
1898
- return safeParse(
1899
- jsonString,
1900
- (x) => UpdatePromptFunction$inboundSchema.parse(JSON.parse(x)),
1901
- `Failed to parse 'UpdatePromptFunction' from JSON`,
1902
- );
1903
- }
1904
-
1905
- /** @internal */
1906
- export const UpdatePromptToolCalls$inboundSchema: z.ZodType<
1907
- UpdatePromptToolCalls,
1908
- z.ZodTypeDef,
1909
- unknown
1910
- > = z.object({
1911
- id: z.string().optional(),
1912
- index: z.number().optional(),
1913
- type: UpdatePromptType$inboundSchema,
1914
- function: z.lazy(() => UpdatePromptFunction$inboundSchema),
1915
- });
1916
-
1917
- /** @internal */
1918
- export type UpdatePromptToolCalls$Outbound = {
1919
- id?: string | undefined;
1920
- index?: number | undefined;
1921
- type: string;
1922
- function: UpdatePromptFunction$Outbound;
1923
- };
1924
-
1925
- /** @internal */
1926
- export const UpdatePromptToolCalls$outboundSchema: z.ZodType<
1927
- UpdatePromptToolCalls$Outbound,
1928
- z.ZodTypeDef,
1929
- UpdatePromptToolCalls
1930
- > = z.object({
1931
- id: z.string().optional(),
1932
- index: z.number().optional(),
1933
- type: UpdatePromptType$outboundSchema,
1934
- function: z.lazy(() => UpdatePromptFunction$outboundSchema),
1935
- });
1936
-
1937
- /**
1938
- * @internal
1939
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1940
- */
1941
- export namespace UpdatePromptToolCalls$ {
1942
- /** @deprecated use `UpdatePromptToolCalls$inboundSchema` instead. */
1943
- export const inboundSchema = UpdatePromptToolCalls$inboundSchema;
1944
- /** @deprecated use `UpdatePromptToolCalls$outboundSchema` instead. */
1945
- export const outboundSchema = UpdatePromptToolCalls$outboundSchema;
1946
- /** @deprecated use `UpdatePromptToolCalls$Outbound` instead. */
1947
- export type Outbound = UpdatePromptToolCalls$Outbound;
1948
- }
1949
-
1950
- export function updatePromptToolCallsToJSON(
1951
- updatePromptToolCalls: UpdatePromptToolCalls,
1952
- ): string {
1953
- return JSON.stringify(
1954
- UpdatePromptToolCalls$outboundSchema.parse(updatePromptToolCalls),
1955
- );
1956
- }
1957
-
1958
- export function updatePromptToolCallsFromJSON(
1959
- jsonString: string,
1960
- ): SafeParseResult<UpdatePromptToolCalls, SDKValidationError> {
1961
- return safeParse(
1962
- jsonString,
1963
- (x) => UpdatePromptToolCalls$inboundSchema.parse(JSON.parse(x)),
1964
- `Failed to parse 'UpdatePromptToolCalls' from JSON`,
1965
- );
1966
- }
1967
-
1968
- /** @internal */
1969
- export const UpdatePromptMessages$inboundSchema: z.ZodType<
1970
- UpdatePromptMessages,
1971
- z.ZodTypeDef,
1972
- unknown
1973
- > = z.object({
1974
- role: UpdatePromptRole$inboundSchema,
1975
- content: z.union([
1976
- z.string(),
1977
- z.array(z.union([
1978
- z.lazy(() => UpdatePrompt21$inboundSchema),
1979
- z.lazy(() => UpdatePrompt22$inboundSchema),
1980
- ])),
1981
- ]),
1982
- tool_calls: z.array(z.lazy(() => UpdatePromptToolCalls$inboundSchema))
1983
- .optional(),
1984
- }).transform((v) => {
1985
- return remap$(v, {
1986
- "tool_calls": "toolCalls",
1987
- });
1988
- });
1989
-
1990
- /** @internal */
1991
- export type UpdatePromptMessages$Outbound = {
1992
- role: string;
1993
- content: string | Array<UpdatePrompt21$Outbound | UpdatePrompt22$Outbound>;
1994
- tool_calls?: Array<UpdatePromptToolCalls$Outbound> | undefined;
1995
- };
1996
-
1997
- /** @internal */
1998
- export const UpdatePromptMessages$outboundSchema: z.ZodType<
1999
- UpdatePromptMessages$Outbound,
2000
- z.ZodTypeDef,
2001
- UpdatePromptMessages
2002
- > = z.object({
2003
- role: UpdatePromptRole$outboundSchema,
2004
- content: z.union([
2005
- z.string(),
2006
- z.array(z.union([
2007
- z.lazy(() => UpdatePrompt21$outboundSchema),
2008
- z.lazy(() => UpdatePrompt22$outboundSchema),
2009
- ])),
2010
- ]),
2011
- toolCalls: z.array(z.lazy(() => UpdatePromptToolCalls$outboundSchema))
2012
- .optional(),
2013
- }).transform((v) => {
2014
- return remap$(v, {
2015
- toolCalls: "tool_calls",
2016
- });
2017
- });
2018
-
2019
- /**
2020
- * @internal
2021
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2022
- */
2023
- export namespace UpdatePromptMessages$ {
2024
- /** @deprecated use `UpdatePromptMessages$inboundSchema` instead. */
2025
- export const inboundSchema = UpdatePromptMessages$inboundSchema;
2026
- /** @deprecated use `UpdatePromptMessages$outboundSchema` instead. */
2027
- export const outboundSchema = UpdatePromptMessages$outboundSchema;
2028
- /** @deprecated use `UpdatePromptMessages$Outbound` instead. */
2029
- export type Outbound = UpdatePromptMessages$Outbound;
2030
- }
2031
-
2032
- export function updatePromptMessagesToJSON(
2033
- updatePromptMessages: UpdatePromptMessages,
2034
- ): string {
2035
- return JSON.stringify(
2036
- UpdatePromptMessages$outboundSchema.parse(updatePromptMessages),
2037
- );
2038
- }
2039
-
2040
- export function updatePromptMessagesFromJSON(
2041
- jsonString: string,
2042
- ): SafeParseResult<UpdatePromptMessages, SDKValidationError> {
2043
- return safeParse(
2044
- jsonString,
2045
- (x) => UpdatePromptMessages$inboundSchema.parse(JSON.parse(x)),
2046
- `Failed to parse 'UpdatePromptMessages' from JSON`,
2047
- );
2048
- }
2049
-
2050
- /** @internal */
2051
- export const UpdatePromptPromptConfig$inboundSchema: z.ZodType<
2052
- UpdatePromptPromptConfig,
2053
- z.ZodTypeDef,
2054
- unknown
2055
- > = z.object({
2056
- stream: z.boolean().optional(),
2057
- model: z.string().optional(),
2058
- model_type: UpdatePromptModelType$inboundSchema.optional(),
2059
- model_parameters: z.lazy(() => UpdatePromptModelParameters$inboundSchema)
2060
- .optional(),
2061
- provider: UpdatePromptProvider$inboundSchema.optional(),
2062
- version: z.string().optional(),
2063
- messages: z.array(z.lazy(() => UpdatePromptMessages$inboundSchema)),
2064
- }).transform((v) => {
2065
- return remap$(v, {
2066
- "model_type": "modelType",
2067
- "model_parameters": "modelParameters",
2068
- });
2069
- });
2070
-
2071
- /** @internal */
2072
- export type UpdatePromptPromptConfig$Outbound = {
2073
- stream?: boolean | undefined;
2074
- model?: string | undefined;
2075
- model_type?: string | undefined;
2076
- model_parameters?: UpdatePromptModelParameters$Outbound | undefined;
2077
- provider?: string | undefined;
2078
- version?: string | undefined;
2079
- messages: Array<UpdatePromptMessages$Outbound>;
2080
- };
2081
-
2082
- /** @internal */
2083
- export const UpdatePromptPromptConfig$outboundSchema: z.ZodType<
2084
- UpdatePromptPromptConfig$Outbound,
2085
- z.ZodTypeDef,
2086
- UpdatePromptPromptConfig
2087
- > = z.object({
2088
- stream: z.boolean().optional(),
2089
- model: z.string().optional(),
2090
- modelType: UpdatePromptModelType$outboundSchema.optional(),
2091
- modelParameters: z.lazy(() => UpdatePromptModelParameters$outboundSchema)
2092
- .optional(),
2093
- provider: UpdatePromptProvider$outboundSchema.optional(),
2094
- version: z.string().optional(),
2095
- messages: z.array(z.lazy(() => UpdatePromptMessages$outboundSchema)),
2096
- }).transform((v) => {
2097
- return remap$(v, {
2098
- modelType: "model_type",
2099
- modelParameters: "model_parameters",
2100
- });
2101
- });
2102
-
2103
- /**
2104
- * @internal
2105
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2106
- */
2107
- export namespace UpdatePromptPromptConfig$ {
2108
- /** @deprecated use `UpdatePromptPromptConfig$inboundSchema` instead. */
2109
- export const inboundSchema = UpdatePromptPromptConfig$inboundSchema;
2110
- /** @deprecated use `UpdatePromptPromptConfig$outboundSchema` instead. */
2111
- export const outboundSchema = UpdatePromptPromptConfig$outboundSchema;
2112
- /** @deprecated use `UpdatePromptPromptConfig$Outbound` instead. */
2113
- export type Outbound = UpdatePromptPromptConfig$Outbound;
2114
- }
2115
-
2116
- export function updatePromptPromptConfigToJSON(
2117
- updatePromptPromptConfig: UpdatePromptPromptConfig,
2118
- ): string {
2119
- return JSON.stringify(
2120
- UpdatePromptPromptConfig$outboundSchema.parse(updatePromptPromptConfig),
2121
- );
2122
- }
2123
-
2124
- export function updatePromptPromptConfigFromJSON(
2125
- jsonString: string,
2126
- ): SafeParseResult<UpdatePromptPromptConfig, SDKValidationError> {
2127
- return safeParse(
2128
- jsonString,
2129
- (x) => UpdatePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
2130
- `Failed to parse 'UpdatePromptPromptConfig' from JSON`,
2131
- );
2132
- }
2133
-
2134
- /** @internal */
2135
- export const UpdatePromptUseCases$inboundSchema: z.ZodNativeEnum<
2136
- typeof UpdatePromptUseCases
2137
- > = z.nativeEnum(UpdatePromptUseCases);
2138
-
2139
- /** @internal */
2140
- export const UpdatePromptUseCases$outboundSchema: z.ZodNativeEnum<
2141
- typeof UpdatePromptUseCases
2142
- > = UpdatePromptUseCases$inboundSchema;
2143
-
2144
- /**
2145
- * @internal
2146
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2147
- */
2148
- export namespace UpdatePromptUseCases$ {
2149
- /** @deprecated use `UpdatePromptUseCases$inboundSchema` instead. */
2150
- export const inboundSchema = UpdatePromptUseCases$inboundSchema;
2151
- /** @deprecated use `UpdatePromptUseCases$outboundSchema` instead. */
2152
- export const outboundSchema = UpdatePromptUseCases$outboundSchema;
2153
- }
2154
-
2155
- /** @internal */
2156
- export const UpdatePromptLanguage$inboundSchema: z.ZodNativeEnum<
2157
- typeof UpdatePromptLanguage
2158
- > = z.nativeEnum(UpdatePromptLanguage);
2159
-
2160
- /** @internal */
2161
- export const UpdatePromptLanguage$outboundSchema: z.ZodNativeEnum<
2162
- typeof UpdatePromptLanguage
2163
- > = UpdatePromptLanguage$inboundSchema;
2164
-
2165
- /**
2166
- * @internal
2167
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2168
- */
2169
- export namespace UpdatePromptLanguage$ {
2170
- /** @deprecated use `UpdatePromptLanguage$inboundSchema` instead. */
2171
- export const inboundSchema = UpdatePromptLanguage$inboundSchema;
2172
- /** @deprecated use `UpdatePromptLanguage$outboundSchema` instead. */
2173
- export const outboundSchema = UpdatePromptLanguage$outboundSchema;
2174
- }
2175
-
2176
- /** @internal */
2177
- export const UpdatePromptMetadata$inboundSchema: z.ZodType<
2178
- UpdatePromptMetadata,
2179
- z.ZodTypeDef,
2180
- unknown
2181
- > = z.object({
2182
- use_cases: z.array(UpdatePromptUseCases$inboundSchema).optional(),
2183
- language: UpdatePromptLanguage$inboundSchema.optional(),
2184
- }).transform((v) => {
2185
- return remap$(v, {
2186
- "use_cases": "useCases",
2187
- });
2188
- });
2189
-
2190
- /** @internal */
2191
- export type UpdatePromptMetadata$Outbound = {
2192
- use_cases?: Array<string> | undefined;
2193
- language?: string | undefined;
2194
- };
2195
-
2196
- /** @internal */
2197
- export const UpdatePromptMetadata$outboundSchema: z.ZodType<
2198
- UpdatePromptMetadata$Outbound,
2199
- z.ZodTypeDef,
2200
- UpdatePromptMetadata
2201
- > = z.object({
2202
- useCases: z.array(UpdatePromptUseCases$outboundSchema).optional(),
2203
- language: UpdatePromptLanguage$outboundSchema.optional(),
2204
- }).transform((v) => {
2205
- return remap$(v, {
2206
- useCases: "use_cases",
2207
- });
2208
- });
2209
-
2210
- /**
2211
- * @internal
2212
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2213
- */
2214
- export namespace UpdatePromptMetadata$ {
2215
- /** @deprecated use `UpdatePromptMetadata$inboundSchema` instead. */
2216
- export const inboundSchema = UpdatePromptMetadata$inboundSchema;
2217
- /** @deprecated use `UpdatePromptMetadata$outboundSchema` instead. */
2218
- export const outboundSchema = UpdatePromptMetadata$outboundSchema;
2219
- /** @deprecated use `UpdatePromptMetadata$Outbound` instead. */
2220
- export type Outbound = UpdatePromptMetadata$Outbound;
2221
- }
2222
-
2223
- export function updatePromptMetadataToJSON(
2224
- updatePromptMetadata: UpdatePromptMetadata,
2225
- ): string {
2226
- return JSON.stringify(
2227
- UpdatePromptMetadata$outboundSchema.parse(updatePromptMetadata),
2228
- );
2229
- }
2230
-
2231
- export function updatePromptMetadataFromJSON(
2232
- jsonString: string,
2233
- ): SafeParseResult<UpdatePromptMetadata, SDKValidationError> {
2234
- return safeParse(
2235
- jsonString,
2236
- (x) => UpdatePromptMetadata$inboundSchema.parse(JSON.parse(x)),
2237
- `Failed to parse 'UpdatePromptMetadata' from JSON`,
2238
- );
2239
- }
2240
-
2241
- /** @internal */
2242
- export const UpdatePromptRequestBody$inboundSchema: z.ZodType<
2243
- UpdatePromptRequestBody,
2244
- z.ZodTypeDef,
2245
- unknown
2246
- > = z.object({
2247
- owner: z.string().optional(),
2248
- domain_id: z.string().optional(),
2249
- created: z.string().optional(),
2250
- updated: z.string().optional(),
2251
- created_by_id: z.nullable(z.string()).optional(),
2252
- updated_by_id: z.nullable(z.string()).optional(),
2253
- display_name: z.string().optional(),
2254
- description: z.nullable(z.string()).optional(),
2255
- prompt_config: z.lazy(() => UpdatePromptPromptConfig$inboundSchema)
2256
- .optional(),
2257
- metadata: z.lazy(() => UpdatePromptMetadata$inboundSchema).optional(),
2258
- }).transform((v) => {
2259
- return remap$(v, {
2260
- "domain_id": "domainId",
2261
- "created_by_id": "createdById",
2262
- "updated_by_id": "updatedById",
2263
- "display_name": "displayName",
2264
- "prompt_config": "promptConfig",
2265
- });
2266
- });
2267
-
2268
- /** @internal */
2269
- export type UpdatePromptRequestBody$Outbound = {
2270
- owner?: string | undefined;
2271
- domain_id?: string | undefined;
2272
- created?: string | undefined;
2273
- updated?: string | undefined;
2274
- created_by_id?: string | null | undefined;
2275
- updated_by_id?: string | null | undefined;
2276
- display_name?: string | undefined;
2277
- description?: string | null | undefined;
2278
- prompt_config?: UpdatePromptPromptConfig$Outbound | undefined;
2279
- metadata?: UpdatePromptMetadata$Outbound | undefined;
2280
- };
2281
-
2282
- /** @internal */
2283
- export const UpdatePromptRequestBody$outboundSchema: z.ZodType<
2284
- UpdatePromptRequestBody$Outbound,
2285
- z.ZodTypeDef,
2286
- UpdatePromptRequestBody
2287
- > = z.object({
2288
- owner: z.string().optional(),
2289
- domainId: z.string().optional(),
2290
- created: z.string().optional(),
2291
- updated: z.string().optional(),
2292
- createdById: z.nullable(z.string()).optional(),
2293
- updatedById: z.nullable(z.string()).optional(),
2294
- displayName: z.string().optional(),
2295
- description: z.nullable(z.string()).optional(),
2296
- promptConfig: z.lazy(() => UpdatePromptPromptConfig$outboundSchema)
2297
- .optional(),
2298
- metadata: z.lazy(() => UpdatePromptMetadata$outboundSchema).optional(),
2299
- }).transform((v) => {
2300
- return remap$(v, {
2301
- domainId: "domain_id",
2302
- createdById: "created_by_id",
2303
- updatedById: "updated_by_id",
2304
- displayName: "display_name",
2305
- promptConfig: "prompt_config",
2306
- });
2307
- });
2308
-
2309
- /**
2310
- * @internal
2311
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2312
- */
2313
- export namespace UpdatePromptRequestBody$ {
2314
- /** @deprecated use `UpdatePromptRequestBody$inboundSchema` instead. */
2315
- export const inboundSchema = UpdatePromptRequestBody$inboundSchema;
2316
- /** @deprecated use `UpdatePromptRequestBody$outboundSchema` instead. */
2317
- export const outboundSchema = UpdatePromptRequestBody$outboundSchema;
2318
- /** @deprecated use `UpdatePromptRequestBody$Outbound` instead. */
2319
- export type Outbound = UpdatePromptRequestBody$Outbound;
2320
- }
2321
-
2322
- export function updatePromptRequestBodyToJSON(
2323
- updatePromptRequestBody: UpdatePromptRequestBody,
2324
- ): string {
2325
- return JSON.stringify(
2326
- UpdatePromptRequestBody$outboundSchema.parse(updatePromptRequestBody),
2327
- );
2328
- }
2329
-
2330
- export function updatePromptRequestBodyFromJSON(
2331
- jsonString: string,
2332
- ): SafeParseResult<UpdatePromptRequestBody, SDKValidationError> {
2333
- return safeParse(
2334
- jsonString,
2335
- (x) => UpdatePromptRequestBody$inboundSchema.parse(JSON.parse(x)),
2336
- `Failed to parse 'UpdatePromptRequestBody' from JSON`,
2337
- );
2338
- }
2339
-
2340
- /** @internal */
2341
- export const UpdatePromptRequest$inboundSchema: z.ZodType<
2342
- UpdatePromptRequest,
2343
- z.ZodTypeDef,
2344
- unknown
2345
- > = z.object({
2346
- id: z.string(),
2347
- RequestBody: z.lazy(() => UpdatePromptRequestBody$inboundSchema).optional(),
2348
- }).transform((v) => {
2349
- return remap$(v, {
2350
- "RequestBody": "requestBody",
2351
- });
2352
- });
2353
-
2354
- /** @internal */
2355
- export type UpdatePromptRequest$Outbound = {
2356
- id: string;
2357
- RequestBody?: UpdatePromptRequestBody$Outbound | undefined;
2358
- };
2359
-
2360
- /** @internal */
2361
- export const UpdatePromptRequest$outboundSchema: z.ZodType<
2362
- UpdatePromptRequest$Outbound,
2363
- z.ZodTypeDef,
2364
- UpdatePromptRequest
2365
- > = z.object({
2366
- id: z.string(),
2367
- requestBody: z.lazy(() => UpdatePromptRequestBody$outboundSchema).optional(),
2368
- }).transform((v) => {
2369
- return remap$(v, {
2370
- requestBody: "RequestBody",
2371
- });
2372
- });
2373
-
2374
- /**
2375
- * @internal
2376
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2377
- */
2378
- export namespace UpdatePromptRequest$ {
2379
- /** @deprecated use `UpdatePromptRequest$inboundSchema` instead. */
2380
- export const inboundSchema = UpdatePromptRequest$inboundSchema;
2381
- /** @deprecated use `UpdatePromptRequest$outboundSchema` instead. */
2382
- export const outboundSchema = UpdatePromptRequest$outboundSchema;
2383
- /** @deprecated use `UpdatePromptRequest$Outbound` instead. */
2384
- export type Outbound = UpdatePromptRequest$Outbound;
2385
- }
2386
-
2387
- export function updatePromptRequestToJSON(
2388
- updatePromptRequest: UpdatePromptRequest,
2389
- ): string {
2390
- return JSON.stringify(
2391
- UpdatePromptRequest$outboundSchema.parse(updatePromptRequest),
2392
- );
2393
- }
2394
-
2395
- export function updatePromptRequestFromJSON(
2396
- jsonString: string,
2397
- ): SafeParseResult<UpdatePromptRequest, SDKValidationError> {
2398
- return safeParse(
2399
- jsonString,
2400
- (x) => UpdatePromptRequest$inboundSchema.parse(JSON.parse(x)),
2401
- `Failed to parse 'UpdatePromptRequest' from JSON`,
2402
- );
2403
- }
2404
-
2405
- /** @internal */
2406
- export const UpdatePromptPromptsType$inboundSchema: z.ZodNativeEnum<
2407
- typeof UpdatePromptPromptsType
2408
- > = z.nativeEnum(UpdatePromptPromptsType);
2409
-
2410
- /** @internal */
2411
- export const UpdatePromptPromptsType$outboundSchema: z.ZodNativeEnum<
2412
- typeof UpdatePromptPromptsType
2413
- > = UpdatePromptPromptsType$inboundSchema;
2414
-
2415
- /**
2416
- * @internal
2417
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2418
- */
2419
- export namespace UpdatePromptPromptsType$ {
2420
- /** @deprecated use `UpdatePromptPromptsType$inboundSchema` instead. */
2421
- export const inboundSchema = UpdatePromptPromptsType$inboundSchema;
2422
- /** @deprecated use `UpdatePromptPromptsType$outboundSchema` instead. */
2423
- export const outboundSchema = UpdatePromptPromptsType$outboundSchema;
2424
- }
2425
-
2426
- /** @internal */
2427
- export const UpdatePromptPromptsModelType$inboundSchema: z.ZodNativeEnum<
2428
- typeof UpdatePromptPromptsModelType
2429
- > = z.nativeEnum(UpdatePromptPromptsModelType);
2430
-
2431
- /** @internal */
2432
- export const UpdatePromptPromptsModelType$outboundSchema: z.ZodNativeEnum<
2433
- typeof UpdatePromptPromptsModelType
2434
- > = UpdatePromptPromptsModelType$inboundSchema;
2435
-
2436
- /**
2437
- * @internal
2438
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2439
- */
2440
- export namespace UpdatePromptPromptsModelType$ {
2441
- /** @deprecated use `UpdatePromptPromptsModelType$inboundSchema` instead. */
2442
- export const inboundSchema = UpdatePromptPromptsModelType$inboundSchema;
2443
- /** @deprecated use `UpdatePromptPromptsModelType$outboundSchema` instead. */
2444
- export const outboundSchema = UpdatePromptPromptsModelType$outboundSchema;
2445
- }
2446
-
2447
- /** @internal */
2448
- export const UpdatePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
2449
- typeof UpdatePromptPromptsFormat
2450
- > = z.nativeEnum(UpdatePromptPromptsFormat);
2451
-
2452
- /** @internal */
2453
- export const UpdatePromptPromptsFormat$outboundSchema: z.ZodNativeEnum<
2454
- typeof UpdatePromptPromptsFormat
2455
- > = UpdatePromptPromptsFormat$inboundSchema;
2456
-
2457
- /**
2458
- * @internal
2459
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2460
- */
2461
- export namespace UpdatePromptPromptsFormat$ {
2462
- /** @deprecated use `UpdatePromptPromptsFormat$inboundSchema` instead. */
2463
- export const inboundSchema = UpdatePromptPromptsFormat$inboundSchema;
2464
- /** @deprecated use `UpdatePromptPromptsFormat$outboundSchema` instead. */
2465
- export const outboundSchema = UpdatePromptPromptsFormat$outboundSchema;
2466
- }
2467
-
2468
- /** @internal */
2469
- export const UpdatePromptPromptsQuality$inboundSchema: z.ZodNativeEnum<
2470
- typeof UpdatePromptPromptsQuality
2471
- > = z.nativeEnum(UpdatePromptPromptsQuality);
2472
-
2473
- /** @internal */
2474
- export const UpdatePromptPromptsQuality$outboundSchema: z.ZodNativeEnum<
2475
- typeof UpdatePromptPromptsQuality
2476
- > = UpdatePromptPromptsQuality$inboundSchema;
2477
-
2478
- /**
2479
- * @internal
2480
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2481
- */
2482
- export namespace UpdatePromptPromptsQuality$ {
2483
- /** @deprecated use `UpdatePromptPromptsQuality$inboundSchema` instead. */
2484
- export const inboundSchema = UpdatePromptPromptsQuality$inboundSchema;
2485
- /** @deprecated use `UpdatePromptPromptsQuality$outboundSchema` instead. */
2486
- export const outboundSchema = UpdatePromptPromptsQuality$outboundSchema;
2487
- }
2488
-
2489
- /** @internal */
2490
- export const UpdatePromptResponseFormatPromptsResponse200Type$inboundSchema:
2491
- z.ZodNativeEnum<typeof UpdatePromptResponseFormatPromptsResponse200Type> = z
2492
- .nativeEnum(UpdatePromptResponseFormatPromptsResponse200Type);
2493
-
2494
- /** @internal */
2495
- export const UpdatePromptResponseFormatPromptsResponse200Type$outboundSchema:
2496
- z.ZodNativeEnum<typeof UpdatePromptResponseFormatPromptsResponse200Type> =
2497
- UpdatePromptResponseFormatPromptsResponse200Type$inboundSchema;
2498
-
2499
- /**
2500
- * @internal
2501
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2502
- */
2503
- export namespace UpdatePromptResponseFormatPromptsResponse200Type$ {
2504
- /** @deprecated use `UpdatePromptResponseFormatPromptsResponse200Type$inboundSchema` instead. */
2505
- export const inboundSchema =
2506
- UpdatePromptResponseFormatPromptsResponse200Type$inboundSchema;
2507
- /** @deprecated use `UpdatePromptResponseFormatPromptsResponse200Type$outboundSchema` instead. */
2508
- export const outboundSchema =
2509
- UpdatePromptResponseFormatPromptsResponse200Type$outboundSchema;
2510
- }
2511
-
2512
- /** @internal */
2513
- export const UpdatePromptResponseFormatPrompts2$inboundSchema: z.ZodType<
2514
- UpdatePromptResponseFormatPrompts2,
2515
- z.ZodTypeDef,
2516
- unknown
2517
- > = z.object({
2518
- type: UpdatePromptResponseFormatPromptsResponse200Type$inboundSchema,
2519
- });
2520
-
2521
- /** @internal */
2522
- export type UpdatePromptResponseFormatPrompts2$Outbound = {
2523
- type: string;
2524
- };
2525
-
2526
- /** @internal */
2527
- export const UpdatePromptResponseFormatPrompts2$outboundSchema: z.ZodType<
2528
- UpdatePromptResponseFormatPrompts2$Outbound,
2529
- z.ZodTypeDef,
2530
- UpdatePromptResponseFormatPrompts2
2531
- > = z.object({
2532
- type: UpdatePromptResponseFormatPromptsResponse200Type$outboundSchema,
2533
- });
2534
-
2535
- /**
2536
- * @internal
2537
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2538
- */
2539
- export namespace UpdatePromptResponseFormatPrompts2$ {
2540
- /** @deprecated use `UpdatePromptResponseFormatPrompts2$inboundSchema` instead. */
2541
- export const inboundSchema = UpdatePromptResponseFormatPrompts2$inboundSchema;
2542
- /** @deprecated use `UpdatePromptResponseFormatPrompts2$outboundSchema` instead. */
2543
- export const outboundSchema =
2544
- UpdatePromptResponseFormatPrompts2$outboundSchema;
2545
- /** @deprecated use `UpdatePromptResponseFormatPrompts2$Outbound` instead. */
2546
- export type Outbound = UpdatePromptResponseFormatPrompts2$Outbound;
2547
- }
2548
-
2549
- export function updatePromptResponseFormatPrompts2ToJSON(
2550
- updatePromptResponseFormatPrompts2: UpdatePromptResponseFormatPrompts2,
2551
- ): string {
2552
- return JSON.stringify(
2553
- UpdatePromptResponseFormatPrompts2$outboundSchema.parse(
2554
- updatePromptResponseFormatPrompts2,
2555
- ),
2556
- );
2557
- }
2558
-
2559
- export function updatePromptResponseFormatPrompts2FromJSON(
2560
- jsonString: string,
2561
- ): SafeParseResult<UpdatePromptResponseFormatPrompts2, SDKValidationError> {
2562
- return safeParse(
2563
- jsonString,
2564
- (x) =>
2565
- UpdatePromptResponseFormatPrompts2$inboundSchema.parse(JSON.parse(x)),
2566
- `Failed to parse 'UpdatePromptResponseFormatPrompts2' from JSON`,
2567
- );
2568
- }
2569
-
2570
- /** @internal */
2571
- export const UpdatePromptResponseFormatPromptsResponseType$inboundSchema:
2572
- z.ZodNativeEnum<typeof UpdatePromptResponseFormatPromptsResponseType> = z
2573
- .nativeEnum(UpdatePromptResponseFormatPromptsResponseType);
2574
-
2575
- /** @internal */
2576
- export const UpdatePromptResponseFormatPromptsResponseType$outboundSchema:
2577
- z.ZodNativeEnum<typeof UpdatePromptResponseFormatPromptsResponseType> =
2578
- UpdatePromptResponseFormatPromptsResponseType$inboundSchema;
2579
-
2580
- /**
2581
- * @internal
2582
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2583
- */
2584
- export namespace UpdatePromptResponseFormatPromptsResponseType$ {
2585
- /** @deprecated use `UpdatePromptResponseFormatPromptsResponseType$inboundSchema` instead. */
2586
- export const inboundSchema =
2587
- UpdatePromptResponseFormatPromptsResponseType$inboundSchema;
2588
- /** @deprecated use `UpdatePromptResponseFormatPromptsResponseType$outboundSchema` instead. */
2589
- export const outboundSchema =
2590
- UpdatePromptResponseFormatPromptsResponseType$outboundSchema;
2591
- }
2592
-
2593
- /** @internal */
2594
- export const UpdatePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
2595
- UpdatePromptResponseFormatJsonSchema,
2596
- z.ZodTypeDef,
2597
- unknown
2598
- > = z.object({
2599
- name: z.string(),
2600
- strict: z.boolean(),
2601
- schema: z.record(z.any()),
2602
- });
2603
-
2604
- /** @internal */
2605
- export type UpdatePromptResponseFormatJsonSchema$Outbound = {
2606
- name: string;
2607
- strict: boolean;
2608
- schema: { [k: string]: any };
2609
- };
2610
-
2611
- /** @internal */
2612
- export const UpdatePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
2613
- UpdatePromptResponseFormatJsonSchema$Outbound,
2614
- z.ZodTypeDef,
2615
- UpdatePromptResponseFormatJsonSchema
2616
- > = z.object({
2617
- name: z.string(),
2618
- strict: z.boolean(),
2619
- schema: z.record(z.any()),
2620
- });
2621
-
2622
- /**
2623
- * @internal
2624
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2625
- */
2626
- export namespace UpdatePromptResponseFormatJsonSchema$ {
2627
- /** @deprecated use `UpdatePromptResponseFormatJsonSchema$inboundSchema` instead. */
2628
- export const inboundSchema =
2629
- UpdatePromptResponseFormatJsonSchema$inboundSchema;
2630
- /** @deprecated use `UpdatePromptResponseFormatJsonSchema$outboundSchema` instead. */
2631
- export const outboundSchema =
2632
- UpdatePromptResponseFormatJsonSchema$outboundSchema;
2633
- /** @deprecated use `UpdatePromptResponseFormatJsonSchema$Outbound` instead. */
2634
- export type Outbound = UpdatePromptResponseFormatJsonSchema$Outbound;
2635
- }
2636
-
2637
- export function updatePromptResponseFormatJsonSchemaToJSON(
2638
- updatePromptResponseFormatJsonSchema: UpdatePromptResponseFormatJsonSchema,
2639
- ): string {
2640
- return JSON.stringify(
2641
- UpdatePromptResponseFormatJsonSchema$outboundSchema.parse(
2642
- updatePromptResponseFormatJsonSchema,
2643
- ),
2644
- );
2645
- }
2646
-
2647
- export function updatePromptResponseFormatJsonSchemaFromJSON(
2648
- jsonString: string,
2649
- ): SafeParseResult<UpdatePromptResponseFormatJsonSchema, SDKValidationError> {
2650
- return safeParse(
2651
- jsonString,
2652
- (x) =>
2653
- UpdatePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
2654
- `Failed to parse 'UpdatePromptResponseFormatJsonSchema' from JSON`,
2655
- );
2656
- }
2657
-
2658
- /** @internal */
2659
- export const UpdatePromptResponseFormatPrompts1$inboundSchema: z.ZodType<
2660
- UpdatePromptResponseFormatPrompts1,
2661
- z.ZodTypeDef,
2662
- unknown
2663
- > = z.object({
2664
- type: UpdatePromptResponseFormatPromptsResponseType$inboundSchema,
2665
- json_schema: z.lazy(() => UpdatePromptResponseFormatJsonSchema$inboundSchema),
2666
- }).transform((v) => {
2667
- return remap$(v, {
2668
- "json_schema": "jsonSchema",
2669
- });
2670
- });
2671
-
2672
- /** @internal */
2673
- export type UpdatePromptResponseFormatPrompts1$Outbound = {
2674
- type: string;
2675
- json_schema: UpdatePromptResponseFormatJsonSchema$Outbound;
2676
- };
2677
-
2678
- /** @internal */
2679
- export const UpdatePromptResponseFormatPrompts1$outboundSchema: z.ZodType<
2680
- UpdatePromptResponseFormatPrompts1$Outbound,
2681
- z.ZodTypeDef,
2682
- UpdatePromptResponseFormatPrompts1
2683
- > = z.object({
2684
- type: UpdatePromptResponseFormatPromptsResponseType$outboundSchema,
2685
- jsonSchema: z.lazy(() => UpdatePromptResponseFormatJsonSchema$outboundSchema),
2686
- }).transform((v) => {
2687
- return remap$(v, {
2688
- jsonSchema: "json_schema",
2689
- });
2690
- });
2691
-
2692
- /**
2693
- * @internal
2694
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2695
- */
2696
- export namespace UpdatePromptResponseFormatPrompts1$ {
2697
- /** @deprecated use `UpdatePromptResponseFormatPrompts1$inboundSchema` instead. */
2698
- export const inboundSchema = UpdatePromptResponseFormatPrompts1$inboundSchema;
2699
- /** @deprecated use `UpdatePromptResponseFormatPrompts1$outboundSchema` instead. */
2700
- export const outboundSchema =
2701
- UpdatePromptResponseFormatPrompts1$outboundSchema;
2702
- /** @deprecated use `UpdatePromptResponseFormatPrompts1$Outbound` instead. */
2703
- export type Outbound = UpdatePromptResponseFormatPrompts1$Outbound;
2704
- }
2705
-
2706
- export function updatePromptResponseFormatPrompts1ToJSON(
2707
- updatePromptResponseFormatPrompts1: UpdatePromptResponseFormatPrompts1,
2708
- ): string {
2709
- return JSON.stringify(
2710
- UpdatePromptResponseFormatPrompts1$outboundSchema.parse(
2711
- updatePromptResponseFormatPrompts1,
2712
- ),
2713
- );
2714
- }
2715
-
2716
- export function updatePromptResponseFormatPrompts1FromJSON(
2717
- jsonString: string,
2718
- ): SafeParseResult<UpdatePromptResponseFormatPrompts1, SDKValidationError> {
2719
- return safeParse(
2720
- jsonString,
2721
- (x) =>
2722
- UpdatePromptResponseFormatPrompts1$inboundSchema.parse(JSON.parse(x)),
2723
- `Failed to parse 'UpdatePromptResponseFormatPrompts1' from JSON`,
2724
- );
2725
- }
2726
-
2727
- /** @internal */
2728
- export const UpdatePromptPromptsResponseFormat$inboundSchema: z.ZodType<
2729
- UpdatePromptPromptsResponseFormat,
2730
- z.ZodTypeDef,
2731
- unknown
2732
- > = z.union([
2733
- z.lazy(() => UpdatePromptResponseFormatPrompts2$inboundSchema),
2734
- z.lazy(() => UpdatePromptResponseFormatPrompts1$inboundSchema),
2735
- ]);
2736
-
2737
- /** @internal */
2738
- export type UpdatePromptPromptsResponseFormat$Outbound =
2739
- | UpdatePromptResponseFormatPrompts2$Outbound
2740
- | UpdatePromptResponseFormatPrompts1$Outbound;
2741
-
2742
- /** @internal */
2743
- export const UpdatePromptPromptsResponseFormat$outboundSchema: z.ZodType<
2744
- UpdatePromptPromptsResponseFormat$Outbound,
2745
- z.ZodTypeDef,
2746
- UpdatePromptPromptsResponseFormat
2747
- > = z.union([
2748
- z.lazy(() => UpdatePromptResponseFormatPrompts2$outboundSchema),
2749
- z.lazy(() => UpdatePromptResponseFormatPrompts1$outboundSchema),
2750
- ]);
2751
-
2752
- /**
2753
- * @internal
2754
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2755
- */
2756
- export namespace UpdatePromptPromptsResponseFormat$ {
2757
- /** @deprecated use `UpdatePromptPromptsResponseFormat$inboundSchema` instead. */
2758
- export const inboundSchema = UpdatePromptPromptsResponseFormat$inboundSchema;
2759
- /** @deprecated use `UpdatePromptPromptsResponseFormat$outboundSchema` instead. */
2760
- export const outboundSchema =
2761
- UpdatePromptPromptsResponseFormat$outboundSchema;
2762
- /** @deprecated use `UpdatePromptPromptsResponseFormat$Outbound` instead. */
2763
- export type Outbound = UpdatePromptPromptsResponseFormat$Outbound;
2764
- }
2765
-
2766
- export function updatePromptPromptsResponseFormatToJSON(
2767
- updatePromptPromptsResponseFormat: UpdatePromptPromptsResponseFormat,
2768
- ): string {
2769
- return JSON.stringify(
2770
- UpdatePromptPromptsResponseFormat$outboundSchema.parse(
2771
- updatePromptPromptsResponseFormat,
2772
- ),
2773
- );
2774
- }
2775
-
2776
- export function updatePromptPromptsResponseFormatFromJSON(
2777
- jsonString: string,
2778
- ): SafeParseResult<UpdatePromptPromptsResponseFormat, SDKValidationError> {
2779
- return safeParse(
2780
- jsonString,
2781
- (x) => UpdatePromptPromptsResponseFormat$inboundSchema.parse(JSON.parse(x)),
2782
- `Failed to parse 'UpdatePromptPromptsResponseFormat' from JSON`,
2783
- );
2784
- }
2785
-
2786
- /** @internal */
2787
- export const UpdatePromptPromptsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
2788
- typeof UpdatePromptPromptsPhotoRealVersion
2789
- > = z.nativeEnum(UpdatePromptPromptsPhotoRealVersion);
2790
-
2791
- /** @internal */
2792
- export const UpdatePromptPromptsPhotoRealVersion$outboundSchema:
2793
- z.ZodNativeEnum<typeof UpdatePromptPromptsPhotoRealVersion> =
2794
- UpdatePromptPromptsPhotoRealVersion$inboundSchema;
2795
-
2796
- /**
2797
- * @internal
2798
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2799
- */
2800
- export namespace UpdatePromptPromptsPhotoRealVersion$ {
2801
- /** @deprecated use `UpdatePromptPromptsPhotoRealVersion$inboundSchema` instead. */
2802
- export const inboundSchema =
2803
- UpdatePromptPromptsPhotoRealVersion$inboundSchema;
2804
- /** @deprecated use `UpdatePromptPromptsPhotoRealVersion$outboundSchema` instead. */
2805
- export const outboundSchema =
2806
- UpdatePromptPromptsPhotoRealVersion$outboundSchema;
2807
- }
2808
-
2809
- /** @internal */
2810
- export const UpdatePromptPromptsEncodingFormat$inboundSchema: z.ZodNativeEnum<
2811
- typeof UpdatePromptPromptsEncodingFormat
2812
- > = z.nativeEnum(UpdatePromptPromptsEncodingFormat);
2813
-
2814
- /** @internal */
2815
- export const UpdatePromptPromptsEncodingFormat$outboundSchema: z.ZodNativeEnum<
2816
- typeof UpdatePromptPromptsEncodingFormat
2817
- > = UpdatePromptPromptsEncodingFormat$inboundSchema;
2818
-
2819
- /**
2820
- * @internal
2821
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2822
- */
2823
- export namespace UpdatePromptPromptsEncodingFormat$ {
2824
- /** @deprecated use `UpdatePromptPromptsEncodingFormat$inboundSchema` instead. */
2825
- export const inboundSchema = UpdatePromptPromptsEncodingFormat$inboundSchema;
2826
- /** @deprecated use `UpdatePromptPromptsEncodingFormat$outboundSchema` instead. */
2827
- export const outboundSchema =
2828
- UpdatePromptPromptsEncodingFormat$outboundSchema;
2829
- }
2830
-
2831
- /** @internal */
2832
- export const UpdatePromptPromptsReasoningEffort$inboundSchema: z.ZodNativeEnum<
2833
- typeof UpdatePromptPromptsReasoningEffort
2834
- > = z.nativeEnum(UpdatePromptPromptsReasoningEffort);
2835
-
2836
- /** @internal */
2837
- export const UpdatePromptPromptsReasoningEffort$outboundSchema: z.ZodNativeEnum<
2838
- typeof UpdatePromptPromptsReasoningEffort
2839
- > = UpdatePromptPromptsReasoningEffort$inboundSchema;
2840
-
2841
- /**
2842
- * @internal
2843
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2844
- */
2845
- export namespace UpdatePromptPromptsReasoningEffort$ {
2846
- /** @deprecated use `UpdatePromptPromptsReasoningEffort$inboundSchema` instead. */
2847
- export const inboundSchema = UpdatePromptPromptsReasoningEffort$inboundSchema;
2848
- /** @deprecated use `UpdatePromptPromptsReasoningEffort$outboundSchema` instead. */
2849
- export const outboundSchema =
2850
- UpdatePromptPromptsReasoningEffort$outboundSchema;
2851
- }
2852
-
2853
- /** @internal */
2854
- export const UpdatePromptPromptsModelParameters$inboundSchema: z.ZodType<
2855
- UpdatePromptPromptsModelParameters,
2856
- z.ZodTypeDef,
2857
- unknown
2858
- > = z.object({
2859
- temperature: z.number().optional(),
2860
- maxTokens: z.number().optional(),
2861
- topK: z.number().optional(),
2862
- topP: z.number().optional(),
2863
- frequencyPenalty: z.number().optional(),
2864
- presencePenalty: z.number().optional(),
2865
- numImages: z.number().optional(),
2866
- seed: z.number().optional(),
2867
- format: UpdatePromptPromptsFormat$inboundSchema.optional(),
2868
- dimensions: z.string().optional(),
2869
- quality: UpdatePromptPromptsQuality$inboundSchema.optional(),
2870
- style: z.string().optional(),
2871
- responseFormat: z.nullable(
2872
- z.union([
2873
- z.lazy(() => UpdatePromptResponseFormatPrompts2$inboundSchema),
2874
- z.lazy(() => UpdatePromptResponseFormatPrompts1$inboundSchema),
2875
- ]),
2876
- ).optional(),
2877
- photoRealVersion: UpdatePromptPromptsPhotoRealVersion$inboundSchema
2878
- .optional(),
2879
- encoding_format: UpdatePromptPromptsEncodingFormat$inboundSchema.optional(),
2880
- reasoningEffort: UpdatePromptPromptsReasoningEffort$inboundSchema.optional(),
2881
- budgetTokens: z.number().optional(),
2882
- }).transform((v) => {
2883
- return remap$(v, {
2884
- "encoding_format": "encodingFormat",
2885
- });
2886
- });
2887
-
2888
- /** @internal */
2889
- export type UpdatePromptPromptsModelParameters$Outbound = {
2890
- temperature?: number | undefined;
2891
- maxTokens?: number | undefined;
2892
- topK?: number | undefined;
2893
- topP?: number | undefined;
2894
- frequencyPenalty?: number | undefined;
2895
- presencePenalty?: number | undefined;
2896
- numImages?: number | undefined;
2897
- seed?: number | undefined;
2898
- format?: string | undefined;
2899
- dimensions?: string | undefined;
2900
- quality?: string | undefined;
2901
- style?: string | undefined;
2902
- responseFormat?:
2903
- | UpdatePromptResponseFormatPrompts2$Outbound
2904
- | UpdatePromptResponseFormatPrompts1$Outbound
2905
- | null
2906
- | undefined;
2907
- photoRealVersion?: string | undefined;
2908
- encoding_format?: string | undefined;
2909
- reasoningEffort?: string | undefined;
2910
- budgetTokens?: number | undefined;
2911
- };
2912
-
2913
- /** @internal */
2914
- export const UpdatePromptPromptsModelParameters$outboundSchema: z.ZodType<
2915
- UpdatePromptPromptsModelParameters$Outbound,
2916
- z.ZodTypeDef,
2917
- UpdatePromptPromptsModelParameters
2918
- > = z.object({
2919
- temperature: z.number().optional(),
2920
- maxTokens: z.number().optional(),
2921
- topK: z.number().optional(),
2922
- topP: z.number().optional(),
2923
- frequencyPenalty: z.number().optional(),
2924
- presencePenalty: z.number().optional(),
2925
- numImages: z.number().optional(),
2926
- seed: z.number().optional(),
2927
- format: UpdatePromptPromptsFormat$outboundSchema.optional(),
2928
- dimensions: z.string().optional(),
2929
- quality: UpdatePromptPromptsQuality$outboundSchema.optional(),
2930
- style: z.string().optional(),
2931
- responseFormat: z.nullable(
2932
- z.union([
2933
- z.lazy(() => UpdatePromptResponseFormatPrompts2$outboundSchema),
2934
- z.lazy(() => UpdatePromptResponseFormatPrompts1$outboundSchema),
2935
- ]),
2936
- ).optional(),
2937
- photoRealVersion: UpdatePromptPromptsPhotoRealVersion$outboundSchema
2938
- .optional(),
2939
- encodingFormat: UpdatePromptPromptsEncodingFormat$outboundSchema.optional(),
2940
- reasoningEffort: UpdatePromptPromptsReasoningEffort$outboundSchema.optional(),
2941
- budgetTokens: z.number().optional(),
2942
- }).transform((v) => {
2943
- return remap$(v, {
2944
- encodingFormat: "encoding_format",
2945
- });
2946
- });
2947
-
2948
- /**
2949
- * @internal
2950
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2951
- */
2952
- export namespace UpdatePromptPromptsModelParameters$ {
2953
- /** @deprecated use `UpdatePromptPromptsModelParameters$inboundSchema` instead. */
2954
- export const inboundSchema = UpdatePromptPromptsModelParameters$inboundSchema;
2955
- /** @deprecated use `UpdatePromptPromptsModelParameters$outboundSchema` instead. */
2956
- export const outboundSchema =
2957
- UpdatePromptPromptsModelParameters$outboundSchema;
2958
- /** @deprecated use `UpdatePromptPromptsModelParameters$Outbound` instead. */
2959
- export type Outbound = UpdatePromptPromptsModelParameters$Outbound;
2960
- }
2961
-
2962
- export function updatePromptPromptsModelParametersToJSON(
2963
- updatePromptPromptsModelParameters: UpdatePromptPromptsModelParameters,
2964
- ): string {
2965
- return JSON.stringify(
2966
- UpdatePromptPromptsModelParameters$outboundSchema.parse(
2967
- updatePromptPromptsModelParameters,
2968
- ),
2969
- );
2970
- }
2971
-
2972
- export function updatePromptPromptsModelParametersFromJSON(
2973
- jsonString: string,
2974
- ): SafeParseResult<UpdatePromptPromptsModelParameters, SDKValidationError> {
2975
- return safeParse(
2976
- jsonString,
2977
- (x) =>
2978
- UpdatePromptPromptsModelParameters$inboundSchema.parse(JSON.parse(x)),
2979
- `Failed to parse 'UpdatePromptPromptsModelParameters' from JSON`,
2980
- );
2981
- }
2982
-
2983
- /** @internal */
2984
- export const UpdatePromptPromptsProvider$inboundSchema: z.ZodNativeEnum<
2985
- typeof UpdatePromptPromptsProvider
2986
- > = z.nativeEnum(UpdatePromptPromptsProvider);
2987
-
2988
- /** @internal */
2989
- export const UpdatePromptPromptsProvider$outboundSchema: z.ZodNativeEnum<
2990
- typeof UpdatePromptPromptsProvider
2991
- > = UpdatePromptPromptsProvider$inboundSchema;
2992
-
2993
- /**
2994
- * @internal
2995
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2996
- */
2997
- export namespace UpdatePromptPromptsProvider$ {
2998
- /** @deprecated use `UpdatePromptPromptsProvider$inboundSchema` instead. */
2999
- export const inboundSchema = UpdatePromptPromptsProvider$inboundSchema;
3000
- /** @deprecated use `UpdatePromptPromptsProvider$outboundSchema` instead. */
3001
- export const outboundSchema = UpdatePromptPromptsProvider$outboundSchema;
3002
- }
3003
-
3004
- /** @internal */
3005
- export const UpdatePromptPromptsRole$inboundSchema: z.ZodNativeEnum<
3006
- typeof UpdatePromptPromptsRole
3007
- > = z.nativeEnum(UpdatePromptPromptsRole);
3008
-
3009
- /** @internal */
3010
- export const UpdatePromptPromptsRole$outboundSchema: z.ZodNativeEnum<
3011
- typeof UpdatePromptPromptsRole
3012
- > = UpdatePromptPromptsRole$inboundSchema;
3013
-
3014
- /**
3015
- * @internal
3016
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3017
- */
3018
- export namespace UpdatePromptPromptsRole$ {
3019
- /** @deprecated use `UpdatePromptPromptsRole$inboundSchema` instead. */
3020
- export const inboundSchema = UpdatePromptPromptsRole$inboundSchema;
3021
- /** @deprecated use `UpdatePromptPromptsRole$outboundSchema` instead. */
3022
- export const outboundSchema = UpdatePromptPromptsRole$outboundSchema;
3023
- }
3024
-
3025
- /** @internal */
3026
- export const UpdatePrompt2PromptsResponse200Type$inboundSchema: z.ZodNativeEnum<
3027
- typeof UpdatePrompt2PromptsResponse200Type
3028
- > = z.nativeEnum(UpdatePrompt2PromptsResponse200Type);
3029
-
3030
- /** @internal */
3031
- export const UpdatePrompt2PromptsResponse200Type$outboundSchema:
3032
- z.ZodNativeEnum<typeof UpdatePrompt2PromptsResponse200Type> =
3033
- UpdatePrompt2PromptsResponse200Type$inboundSchema;
3034
-
3035
- /**
3036
- * @internal
3037
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3038
- */
3039
- export namespace UpdatePrompt2PromptsResponse200Type$ {
3040
- /** @deprecated use `UpdatePrompt2PromptsResponse200Type$inboundSchema` instead. */
3041
- export const inboundSchema =
3042
- UpdatePrompt2PromptsResponse200Type$inboundSchema;
3043
- /** @deprecated use `UpdatePrompt2PromptsResponse200Type$outboundSchema` instead. */
3044
- export const outboundSchema =
3045
- UpdatePrompt2PromptsResponse200Type$outboundSchema;
3046
- }
3047
-
3048
- /** @internal */
3049
- export const UpdatePrompt2PromptsImageUrl$inboundSchema: z.ZodType<
3050
- UpdatePrompt2PromptsImageUrl,
3051
- z.ZodTypeDef,
3052
- unknown
3053
- > = z.object({
3054
- id: z.string().optional(),
3055
- url: z.string(),
3056
- detail: z.string().optional(),
3057
- });
3058
-
3059
- /** @internal */
3060
- export type UpdatePrompt2PromptsImageUrl$Outbound = {
3061
- id?: string | undefined;
3062
- url: string;
3063
- detail?: string | undefined;
3064
- };
3065
-
3066
- /** @internal */
3067
- export const UpdatePrompt2PromptsImageUrl$outboundSchema: z.ZodType<
3068
- UpdatePrompt2PromptsImageUrl$Outbound,
3069
- z.ZodTypeDef,
3070
- UpdatePrompt2PromptsImageUrl
3071
- > = z.object({
3072
- id: z.string().optional(),
3073
- url: z.string(),
3074
- detail: z.string().optional(),
3075
- });
3076
-
3077
- /**
3078
- * @internal
3079
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3080
- */
3081
- export namespace UpdatePrompt2PromptsImageUrl$ {
3082
- /** @deprecated use `UpdatePrompt2PromptsImageUrl$inboundSchema` instead. */
3083
- export const inboundSchema = UpdatePrompt2PromptsImageUrl$inboundSchema;
3084
- /** @deprecated use `UpdatePrompt2PromptsImageUrl$outboundSchema` instead. */
3085
- export const outboundSchema = UpdatePrompt2PromptsImageUrl$outboundSchema;
3086
- /** @deprecated use `UpdatePrompt2PromptsImageUrl$Outbound` instead. */
3087
- export type Outbound = UpdatePrompt2PromptsImageUrl$Outbound;
3088
- }
3089
-
3090
- export function updatePrompt2PromptsImageUrlToJSON(
3091
- updatePrompt2PromptsImageUrl: UpdatePrompt2PromptsImageUrl,
3092
- ): string {
3093
- return JSON.stringify(
3094
- UpdatePrompt2PromptsImageUrl$outboundSchema.parse(
3095
- updatePrompt2PromptsImageUrl,
3096
- ),
3097
- );
3098
- }
3099
-
3100
- export function updatePrompt2PromptsImageUrlFromJSON(
3101
- jsonString: string,
3102
- ): SafeParseResult<UpdatePrompt2PromptsImageUrl, SDKValidationError> {
3103
- return safeParse(
3104
- jsonString,
3105
- (x) => UpdatePrompt2PromptsImageUrl$inboundSchema.parse(JSON.parse(x)),
3106
- `Failed to parse 'UpdatePrompt2PromptsImageUrl' from JSON`,
3107
- );
3108
- }
3109
-
3110
- /** @internal */
3111
- export const UpdatePrompt2Prompts2$inboundSchema: z.ZodType<
3112
- UpdatePrompt2Prompts2,
3113
- z.ZodTypeDef,
3114
- unknown
3115
- > = z.object({
3116
- type: UpdatePrompt2PromptsResponse200Type$inboundSchema,
3117
- image_url: z.lazy(() => UpdatePrompt2PromptsImageUrl$inboundSchema),
3118
- }).transform((v) => {
3119
- return remap$(v, {
3120
- "image_url": "imageUrl",
3121
- });
3122
- });
3123
-
3124
- /** @internal */
3125
- export type UpdatePrompt2Prompts2$Outbound = {
3126
- type: string;
3127
- image_url: UpdatePrompt2PromptsImageUrl$Outbound;
3128
- };
3129
-
3130
- /** @internal */
3131
- export const UpdatePrompt2Prompts2$outboundSchema: z.ZodType<
3132
- UpdatePrompt2Prompts2$Outbound,
3133
- z.ZodTypeDef,
3134
- UpdatePrompt2Prompts2
3135
- > = z.object({
3136
- type: UpdatePrompt2PromptsResponse200Type$outboundSchema,
3137
- imageUrl: z.lazy(() => UpdatePrompt2PromptsImageUrl$outboundSchema),
3138
- }).transform((v) => {
3139
- return remap$(v, {
3140
- imageUrl: "image_url",
3141
- });
3142
- });
3143
-
3144
- /**
3145
- * @internal
3146
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3147
- */
3148
- export namespace UpdatePrompt2Prompts2$ {
3149
- /** @deprecated use `UpdatePrompt2Prompts2$inboundSchema` instead. */
3150
- export const inboundSchema = UpdatePrompt2Prompts2$inboundSchema;
3151
- /** @deprecated use `UpdatePrompt2Prompts2$outboundSchema` instead. */
3152
- export const outboundSchema = UpdatePrompt2Prompts2$outboundSchema;
3153
- /** @deprecated use `UpdatePrompt2Prompts2$Outbound` instead. */
3154
- export type Outbound = UpdatePrompt2Prompts2$Outbound;
3155
- }
3156
-
3157
- export function updatePrompt2Prompts2ToJSON(
3158
- updatePrompt2Prompts2: UpdatePrompt2Prompts2,
3159
- ): string {
3160
- return JSON.stringify(
3161
- UpdatePrompt2Prompts2$outboundSchema.parse(updatePrompt2Prompts2),
3162
- );
3163
- }
3164
-
3165
- export function updatePrompt2Prompts2FromJSON(
3166
- jsonString: string,
3167
- ): SafeParseResult<UpdatePrompt2Prompts2, SDKValidationError> {
3168
- return safeParse(
3169
- jsonString,
3170
- (x) => UpdatePrompt2Prompts2$inboundSchema.parse(JSON.parse(x)),
3171
- `Failed to parse 'UpdatePrompt2Prompts2' from JSON`,
3172
- );
3173
- }
3174
-
3175
- /** @internal */
3176
- export const UpdatePrompt2PromptsResponseType$inboundSchema: z.ZodNativeEnum<
3177
- typeof UpdatePrompt2PromptsResponseType
3178
- > = z.nativeEnum(UpdatePrompt2PromptsResponseType);
3179
-
3180
- /** @internal */
3181
- export const UpdatePrompt2PromptsResponseType$outboundSchema: z.ZodNativeEnum<
3182
- typeof UpdatePrompt2PromptsResponseType
3183
- > = UpdatePrompt2PromptsResponseType$inboundSchema;
3184
-
3185
- /**
3186
- * @internal
3187
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3188
- */
3189
- export namespace UpdatePrompt2PromptsResponseType$ {
3190
- /** @deprecated use `UpdatePrompt2PromptsResponseType$inboundSchema` instead. */
3191
- export const inboundSchema = UpdatePrompt2PromptsResponseType$inboundSchema;
3192
- /** @deprecated use `UpdatePrompt2PromptsResponseType$outboundSchema` instead. */
3193
- export const outboundSchema = UpdatePrompt2PromptsResponseType$outboundSchema;
3194
- }
3195
-
3196
- /** @internal */
3197
- export const UpdatePrompt2Prompts1$inboundSchema: z.ZodType<
3198
- UpdatePrompt2Prompts1,
3199
- z.ZodTypeDef,
3200
- unknown
3201
- > = z.object({
3202
- type: UpdatePrompt2PromptsResponseType$inboundSchema,
3203
- text: z.string(),
3204
- });
3205
-
3206
- /** @internal */
3207
- export type UpdatePrompt2Prompts1$Outbound = {
3208
- type: string;
3209
- text: string;
3210
- };
3211
-
3212
- /** @internal */
3213
- export const UpdatePrompt2Prompts1$outboundSchema: z.ZodType<
3214
- UpdatePrompt2Prompts1$Outbound,
3215
- z.ZodTypeDef,
3216
- UpdatePrompt2Prompts1
3217
- > = z.object({
3218
- type: UpdatePrompt2PromptsResponseType$outboundSchema,
3219
- text: z.string(),
3220
- });
3221
-
3222
- /**
3223
- * @internal
3224
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3225
- */
3226
- export namespace UpdatePrompt2Prompts1$ {
3227
- /** @deprecated use `UpdatePrompt2Prompts1$inboundSchema` instead. */
3228
- export const inboundSchema = UpdatePrompt2Prompts1$inboundSchema;
3229
- /** @deprecated use `UpdatePrompt2Prompts1$outboundSchema` instead. */
3230
- export const outboundSchema = UpdatePrompt2Prompts1$outboundSchema;
3231
- /** @deprecated use `UpdatePrompt2Prompts1$Outbound` instead. */
3232
- export type Outbound = UpdatePrompt2Prompts1$Outbound;
3233
- }
3234
-
3235
- export function updatePrompt2Prompts1ToJSON(
3236
- updatePrompt2Prompts1: UpdatePrompt2Prompts1,
3237
- ): string {
3238
- return JSON.stringify(
3239
- UpdatePrompt2Prompts1$outboundSchema.parse(updatePrompt2Prompts1),
3240
- );
3241
- }
3242
-
3243
- export function updatePrompt2Prompts1FromJSON(
3244
- jsonString: string,
3245
- ): SafeParseResult<UpdatePrompt2Prompts1, SDKValidationError> {
3246
- return safeParse(
3247
- jsonString,
3248
- (x) => UpdatePrompt2Prompts1$inboundSchema.parse(JSON.parse(x)),
3249
- `Failed to parse 'UpdatePrompt2Prompts1' from JSON`,
3250
- );
3251
- }
3252
-
3253
- /** @internal */
3254
- export const UpdatePromptContentPrompts2$inboundSchema: z.ZodType<
3255
- UpdatePromptContentPrompts2,
3256
- z.ZodTypeDef,
3257
- unknown
3258
- > = z.union([
3259
- z.lazy(() => UpdatePrompt2Prompts1$inboundSchema),
3260
- z.lazy(() => UpdatePrompt2Prompts2$inboundSchema),
3261
- ]);
3262
-
3263
- /** @internal */
3264
- export type UpdatePromptContentPrompts2$Outbound =
3265
- | UpdatePrompt2Prompts1$Outbound
3266
- | UpdatePrompt2Prompts2$Outbound;
3267
-
3268
- /** @internal */
3269
- export const UpdatePromptContentPrompts2$outboundSchema: z.ZodType<
3270
- UpdatePromptContentPrompts2$Outbound,
3271
- z.ZodTypeDef,
3272
- UpdatePromptContentPrompts2
3273
- > = z.union([
3274
- z.lazy(() => UpdatePrompt2Prompts1$outboundSchema),
3275
- z.lazy(() => UpdatePrompt2Prompts2$outboundSchema),
3276
- ]);
3277
-
3278
- /**
3279
- * @internal
3280
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3281
- */
3282
- export namespace UpdatePromptContentPrompts2$ {
3283
- /** @deprecated use `UpdatePromptContentPrompts2$inboundSchema` instead. */
3284
- export const inboundSchema = UpdatePromptContentPrompts2$inboundSchema;
3285
- /** @deprecated use `UpdatePromptContentPrompts2$outboundSchema` instead. */
3286
- export const outboundSchema = UpdatePromptContentPrompts2$outboundSchema;
3287
- /** @deprecated use `UpdatePromptContentPrompts2$Outbound` instead. */
3288
- export type Outbound = UpdatePromptContentPrompts2$Outbound;
3289
- }
3290
-
3291
- export function updatePromptContentPrompts2ToJSON(
3292
- updatePromptContentPrompts2: UpdatePromptContentPrompts2,
3293
- ): string {
3294
- return JSON.stringify(
3295
- UpdatePromptContentPrompts2$outboundSchema.parse(
3296
- updatePromptContentPrompts2,
3297
- ),
3298
- );
3299
- }
3300
-
3301
- export function updatePromptContentPrompts2FromJSON(
3302
- jsonString: string,
3303
- ): SafeParseResult<UpdatePromptContentPrompts2, SDKValidationError> {
3304
- return safeParse(
3305
- jsonString,
3306
- (x) => UpdatePromptContentPrompts2$inboundSchema.parse(JSON.parse(x)),
3307
- `Failed to parse 'UpdatePromptContentPrompts2' from JSON`,
3308
- );
3309
- }
3310
-
3311
- /** @internal */
3312
- export const UpdatePromptPromptsContent$inboundSchema: z.ZodType<
3313
- UpdatePromptPromptsContent,
3314
- z.ZodTypeDef,
3315
- unknown
3316
- > = z.union([
3317
- z.string(),
3318
- z.array(z.union([
3319
- z.lazy(() => UpdatePrompt2Prompts1$inboundSchema),
3320
- z.lazy(() => UpdatePrompt2Prompts2$inboundSchema),
3321
- ])),
3322
- ]);
3323
-
3324
- /** @internal */
3325
- export type UpdatePromptPromptsContent$Outbound =
3326
- | string
3327
- | Array<UpdatePrompt2Prompts1$Outbound | UpdatePrompt2Prompts2$Outbound>;
3328
-
3329
- /** @internal */
3330
- export const UpdatePromptPromptsContent$outboundSchema: z.ZodType<
3331
- UpdatePromptPromptsContent$Outbound,
3332
- z.ZodTypeDef,
3333
- UpdatePromptPromptsContent
3334
- > = z.union([
3335
- z.string(),
3336
- z.array(z.union([
3337
- z.lazy(() => UpdatePrompt2Prompts1$outboundSchema),
3338
- z.lazy(() => UpdatePrompt2Prompts2$outboundSchema),
3339
- ])),
3340
- ]);
3341
-
3342
- /**
3343
- * @internal
3344
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3345
- */
3346
- export namespace UpdatePromptPromptsContent$ {
3347
- /** @deprecated use `UpdatePromptPromptsContent$inboundSchema` instead. */
3348
- export const inboundSchema = UpdatePromptPromptsContent$inboundSchema;
3349
- /** @deprecated use `UpdatePromptPromptsContent$outboundSchema` instead. */
3350
- export const outboundSchema = UpdatePromptPromptsContent$outboundSchema;
3351
- /** @deprecated use `UpdatePromptPromptsContent$Outbound` instead. */
3352
- export type Outbound = UpdatePromptPromptsContent$Outbound;
3353
- }
3354
-
3355
- export function updatePromptPromptsContentToJSON(
3356
- updatePromptPromptsContent: UpdatePromptPromptsContent,
3357
- ): string {
3358
- return JSON.stringify(
3359
- UpdatePromptPromptsContent$outboundSchema.parse(updatePromptPromptsContent),
3360
- );
3361
- }
3362
-
3363
- export function updatePromptPromptsContentFromJSON(
3364
- jsonString: string,
3365
- ): SafeParseResult<UpdatePromptPromptsContent, SDKValidationError> {
3366
- return safeParse(
3367
- jsonString,
3368
- (x) => UpdatePromptPromptsContent$inboundSchema.parse(JSON.parse(x)),
3369
- `Failed to parse 'UpdatePromptPromptsContent' from JSON`,
3370
- );
3371
- }
3372
-
3373
- /** @internal */
3374
- export const UpdatePromptPromptsResponseType$inboundSchema: z.ZodNativeEnum<
3375
- typeof UpdatePromptPromptsResponseType
3376
- > = z.nativeEnum(UpdatePromptPromptsResponseType);
3377
-
3378
- /** @internal */
3379
- export const UpdatePromptPromptsResponseType$outboundSchema: z.ZodNativeEnum<
3380
- typeof UpdatePromptPromptsResponseType
3381
- > = UpdatePromptPromptsResponseType$inboundSchema;
3382
-
3383
- /**
3384
- * @internal
3385
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3386
- */
3387
- export namespace UpdatePromptPromptsResponseType$ {
3388
- /** @deprecated use `UpdatePromptPromptsResponseType$inboundSchema` instead. */
3389
- export const inboundSchema = UpdatePromptPromptsResponseType$inboundSchema;
3390
- /** @deprecated use `UpdatePromptPromptsResponseType$outboundSchema` instead. */
3391
- export const outboundSchema = UpdatePromptPromptsResponseType$outboundSchema;
3392
- }
3393
-
3394
- /** @internal */
3395
- export const UpdatePromptPromptsFunction$inboundSchema: z.ZodType<
3396
- UpdatePromptPromptsFunction,
3397
- z.ZodTypeDef,
3398
- unknown
3399
- > = z.object({
3400
- name: z.string(),
3401
- arguments: z.string(),
3402
- });
3403
-
3404
- /** @internal */
3405
- export type UpdatePromptPromptsFunction$Outbound = {
3406
- name: string;
3407
- arguments: string;
3408
- };
3409
-
3410
- /** @internal */
3411
- export const UpdatePromptPromptsFunction$outboundSchema: z.ZodType<
3412
- UpdatePromptPromptsFunction$Outbound,
3413
- z.ZodTypeDef,
3414
- UpdatePromptPromptsFunction
3415
- > = z.object({
3416
- name: z.string(),
3417
- arguments: z.string(),
3418
- });
3419
-
3420
- /**
3421
- * @internal
3422
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3423
- */
3424
- export namespace UpdatePromptPromptsFunction$ {
3425
- /** @deprecated use `UpdatePromptPromptsFunction$inboundSchema` instead. */
3426
- export const inboundSchema = UpdatePromptPromptsFunction$inboundSchema;
3427
- /** @deprecated use `UpdatePromptPromptsFunction$outboundSchema` instead. */
3428
- export const outboundSchema = UpdatePromptPromptsFunction$outboundSchema;
3429
- /** @deprecated use `UpdatePromptPromptsFunction$Outbound` instead. */
3430
- export type Outbound = UpdatePromptPromptsFunction$Outbound;
3431
- }
3432
-
3433
- export function updatePromptPromptsFunctionToJSON(
3434
- updatePromptPromptsFunction: UpdatePromptPromptsFunction,
3435
- ): string {
3436
- return JSON.stringify(
3437
- UpdatePromptPromptsFunction$outboundSchema.parse(
3438
- updatePromptPromptsFunction,
3439
- ),
3440
- );
3441
- }
3442
-
3443
- export function updatePromptPromptsFunctionFromJSON(
3444
- jsonString: string,
3445
- ): SafeParseResult<UpdatePromptPromptsFunction, SDKValidationError> {
3446
- return safeParse(
3447
- jsonString,
3448
- (x) => UpdatePromptPromptsFunction$inboundSchema.parse(JSON.parse(x)),
3449
- `Failed to parse 'UpdatePromptPromptsFunction' from JSON`,
3450
- );
3451
- }
3452
-
3453
- /** @internal */
3454
- export const UpdatePromptPromptsToolCalls$inboundSchema: z.ZodType<
3455
- UpdatePromptPromptsToolCalls,
3456
- z.ZodTypeDef,
3457
- unknown
3458
- > = z.object({
3459
- id: z.string().optional(),
3460
- index: z.number().optional(),
3461
- type: UpdatePromptPromptsResponseType$inboundSchema,
3462
- function: z.lazy(() => UpdatePromptPromptsFunction$inboundSchema),
3463
- });
3464
-
3465
- /** @internal */
3466
- export type UpdatePromptPromptsToolCalls$Outbound = {
3467
- id?: string | undefined;
3468
- index?: number | undefined;
3469
- type: string;
3470
- function: UpdatePromptPromptsFunction$Outbound;
3471
- };
3472
-
3473
- /** @internal */
3474
- export const UpdatePromptPromptsToolCalls$outboundSchema: z.ZodType<
3475
- UpdatePromptPromptsToolCalls$Outbound,
3476
- z.ZodTypeDef,
3477
- UpdatePromptPromptsToolCalls
3478
- > = z.object({
3479
- id: z.string().optional(),
3480
- index: z.number().optional(),
3481
- type: UpdatePromptPromptsResponseType$outboundSchema,
3482
- function: z.lazy(() => UpdatePromptPromptsFunction$outboundSchema),
3483
- });
3484
-
3485
- /**
3486
- * @internal
3487
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3488
- */
3489
- export namespace UpdatePromptPromptsToolCalls$ {
3490
- /** @deprecated use `UpdatePromptPromptsToolCalls$inboundSchema` instead. */
3491
- export const inboundSchema = UpdatePromptPromptsToolCalls$inboundSchema;
3492
- /** @deprecated use `UpdatePromptPromptsToolCalls$outboundSchema` instead. */
3493
- export const outboundSchema = UpdatePromptPromptsToolCalls$outboundSchema;
3494
- /** @deprecated use `UpdatePromptPromptsToolCalls$Outbound` instead. */
3495
- export type Outbound = UpdatePromptPromptsToolCalls$Outbound;
3496
- }
3497
-
3498
- export function updatePromptPromptsToolCallsToJSON(
3499
- updatePromptPromptsToolCalls: UpdatePromptPromptsToolCalls,
3500
- ): string {
3501
- return JSON.stringify(
3502
- UpdatePromptPromptsToolCalls$outboundSchema.parse(
3503
- updatePromptPromptsToolCalls,
3504
- ),
3505
- );
3506
- }
3507
-
3508
- export function updatePromptPromptsToolCallsFromJSON(
3509
- jsonString: string,
3510
- ): SafeParseResult<UpdatePromptPromptsToolCalls, SDKValidationError> {
3511
- return safeParse(
3512
- jsonString,
3513
- (x) => UpdatePromptPromptsToolCalls$inboundSchema.parse(JSON.parse(x)),
3514
- `Failed to parse 'UpdatePromptPromptsToolCalls' from JSON`,
3515
- );
3516
- }
3517
-
3518
- /** @internal */
3519
- export const UpdatePromptPromptsMessages$inboundSchema: z.ZodType<
3520
- UpdatePromptPromptsMessages,
3521
- z.ZodTypeDef,
3522
- unknown
3523
- > = z.object({
3524
- role: UpdatePromptPromptsRole$inboundSchema,
3525
- content: z.union([
3526
- z.string(),
3527
- z.array(z.union([
3528
- z.lazy(() => UpdatePrompt2Prompts1$inboundSchema),
3529
- z.lazy(() => UpdatePrompt2Prompts2$inboundSchema),
3530
- ])),
3531
- ]),
3532
- tool_calls: z.array(z.lazy(() => UpdatePromptPromptsToolCalls$inboundSchema))
3533
- .optional(),
3534
- }).transform((v) => {
3535
- return remap$(v, {
3536
- "tool_calls": "toolCalls",
3537
- });
3538
- });
3539
-
3540
- /** @internal */
3541
- export type UpdatePromptPromptsMessages$Outbound = {
3542
- role: string;
3543
- content:
3544
- | string
3545
- | Array<UpdatePrompt2Prompts1$Outbound | UpdatePrompt2Prompts2$Outbound>;
3546
- tool_calls?: Array<UpdatePromptPromptsToolCalls$Outbound> | undefined;
3547
- };
3548
-
3549
- /** @internal */
3550
- export const UpdatePromptPromptsMessages$outboundSchema: z.ZodType<
3551
- UpdatePromptPromptsMessages$Outbound,
3552
- z.ZodTypeDef,
3553
- UpdatePromptPromptsMessages
3554
- > = z.object({
3555
- role: UpdatePromptPromptsRole$outboundSchema,
3556
- content: z.union([
3557
- z.string(),
3558
- z.array(z.union([
3559
- z.lazy(() => UpdatePrompt2Prompts1$outboundSchema),
3560
- z.lazy(() => UpdatePrompt2Prompts2$outboundSchema),
3561
- ])),
3562
- ]),
3563
- toolCalls: z.array(z.lazy(() => UpdatePromptPromptsToolCalls$outboundSchema))
3564
- .optional(),
3565
- }).transform((v) => {
3566
- return remap$(v, {
3567
- toolCalls: "tool_calls",
3568
- });
3569
- });
3570
-
3571
- /**
3572
- * @internal
3573
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3574
- */
3575
- export namespace UpdatePromptPromptsMessages$ {
3576
- /** @deprecated use `UpdatePromptPromptsMessages$inboundSchema` instead. */
3577
- export const inboundSchema = UpdatePromptPromptsMessages$inboundSchema;
3578
- /** @deprecated use `UpdatePromptPromptsMessages$outboundSchema` instead. */
3579
- export const outboundSchema = UpdatePromptPromptsMessages$outboundSchema;
3580
- /** @deprecated use `UpdatePromptPromptsMessages$Outbound` instead. */
3581
- export type Outbound = UpdatePromptPromptsMessages$Outbound;
3582
- }
3583
-
3584
- export function updatePromptPromptsMessagesToJSON(
3585
- updatePromptPromptsMessages: UpdatePromptPromptsMessages,
3586
- ): string {
3587
- return JSON.stringify(
3588
- UpdatePromptPromptsMessages$outboundSchema.parse(
3589
- updatePromptPromptsMessages,
3590
- ),
3591
- );
3592
- }
3593
-
3594
- export function updatePromptPromptsMessagesFromJSON(
3595
- jsonString: string,
3596
- ): SafeParseResult<UpdatePromptPromptsMessages, SDKValidationError> {
3597
- return safeParse(
3598
- jsonString,
3599
- (x) => UpdatePromptPromptsMessages$inboundSchema.parse(JSON.parse(x)),
3600
- `Failed to parse 'UpdatePromptPromptsMessages' from JSON`,
3601
- );
3602
- }
3603
-
3604
- /** @internal */
3605
- export const UpdatePromptPromptsPromptConfig$inboundSchema: z.ZodType<
3606
- UpdatePromptPromptsPromptConfig,
3607
- z.ZodTypeDef,
3608
- unknown
3609
- > = z.object({
3610
- stream: z.boolean().optional(),
3611
- model: z.string().optional(),
3612
- model_db_id: z.string().optional(),
3613
- model_type: UpdatePromptPromptsModelType$inboundSchema.optional(),
3614
- model_parameters: z.lazy(() =>
3615
- UpdatePromptPromptsModelParameters$inboundSchema
3616
- ).optional(),
3617
- provider: UpdatePromptPromptsProvider$inboundSchema.optional(),
3618
- integration_id: z.nullable(z.string()).optional(),
3619
- version: z.string().optional(),
3620
- messages: z.array(z.lazy(() => UpdatePromptPromptsMessages$inboundSchema)),
3621
- }).transform((v) => {
3622
- return remap$(v, {
3623
- "model_db_id": "modelDbId",
3624
- "model_type": "modelType",
3625
- "model_parameters": "modelParameters",
3626
- "integration_id": "integrationId",
3627
- });
3628
- });
3629
-
3630
- /** @internal */
3631
- export type UpdatePromptPromptsPromptConfig$Outbound = {
3632
- stream?: boolean | undefined;
3633
- model?: string | undefined;
3634
- model_db_id?: string | undefined;
3635
- model_type?: string | undefined;
3636
- model_parameters?: UpdatePromptPromptsModelParameters$Outbound | undefined;
3637
- provider?: string | undefined;
3638
- integration_id?: string | null | undefined;
3639
- version?: string | undefined;
3640
- messages: Array<UpdatePromptPromptsMessages$Outbound>;
3641
- };
3642
-
3643
- /** @internal */
3644
- export const UpdatePromptPromptsPromptConfig$outboundSchema: z.ZodType<
3645
- UpdatePromptPromptsPromptConfig$Outbound,
3646
- z.ZodTypeDef,
3647
- UpdatePromptPromptsPromptConfig
3648
- > = z.object({
3649
- stream: z.boolean().optional(),
3650
- model: z.string().optional(),
3651
- modelDbId: z.string().optional(),
3652
- modelType: UpdatePromptPromptsModelType$outboundSchema.optional(),
3653
- modelParameters: z.lazy(() =>
3654
- UpdatePromptPromptsModelParameters$outboundSchema
3655
- ).optional(),
3656
- provider: UpdatePromptPromptsProvider$outboundSchema.optional(),
3657
- integrationId: z.nullable(z.string()).optional(),
3658
- version: z.string().optional(),
3659
- messages: z.array(z.lazy(() => UpdatePromptPromptsMessages$outboundSchema)),
3660
- }).transform((v) => {
3661
- return remap$(v, {
3662
- modelDbId: "model_db_id",
3663
- modelType: "model_type",
3664
- modelParameters: "model_parameters",
3665
- integrationId: "integration_id",
3666
- });
3667
- });
3668
-
3669
- /**
3670
- * @internal
3671
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3672
- */
3673
- export namespace UpdatePromptPromptsPromptConfig$ {
3674
- /** @deprecated use `UpdatePromptPromptsPromptConfig$inboundSchema` instead. */
3675
- export const inboundSchema = UpdatePromptPromptsPromptConfig$inboundSchema;
3676
- /** @deprecated use `UpdatePromptPromptsPromptConfig$outboundSchema` instead. */
3677
- export const outboundSchema = UpdatePromptPromptsPromptConfig$outboundSchema;
3678
- /** @deprecated use `UpdatePromptPromptsPromptConfig$Outbound` instead. */
3679
- export type Outbound = UpdatePromptPromptsPromptConfig$Outbound;
3680
- }
3681
-
3682
- export function updatePromptPromptsPromptConfigToJSON(
3683
- updatePromptPromptsPromptConfig: UpdatePromptPromptsPromptConfig,
3684
- ): string {
3685
- return JSON.stringify(
3686
- UpdatePromptPromptsPromptConfig$outboundSchema.parse(
3687
- updatePromptPromptsPromptConfig,
3688
- ),
3689
- );
3690
- }
3691
-
3692
- export function updatePromptPromptsPromptConfigFromJSON(
3693
- jsonString: string,
3694
- ): SafeParseResult<UpdatePromptPromptsPromptConfig, SDKValidationError> {
3695
- return safeParse(
3696
- jsonString,
3697
- (x) => UpdatePromptPromptsPromptConfig$inboundSchema.parse(JSON.parse(x)),
3698
- `Failed to parse 'UpdatePromptPromptsPromptConfig' from JSON`,
3699
- );
3700
- }
3701
-
3702
- /** @internal */
3703
- export const UpdatePromptPromptsUseCases$inboundSchema: z.ZodNativeEnum<
3704
- typeof UpdatePromptPromptsUseCases
3705
- > = z.nativeEnum(UpdatePromptPromptsUseCases);
3706
-
3707
- /** @internal */
3708
- export const UpdatePromptPromptsUseCases$outboundSchema: z.ZodNativeEnum<
3709
- typeof UpdatePromptPromptsUseCases
3710
- > = UpdatePromptPromptsUseCases$inboundSchema;
3711
-
3712
- /**
3713
- * @internal
3714
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3715
- */
3716
- export namespace UpdatePromptPromptsUseCases$ {
3717
- /** @deprecated use `UpdatePromptPromptsUseCases$inboundSchema` instead. */
3718
- export const inboundSchema = UpdatePromptPromptsUseCases$inboundSchema;
3719
- /** @deprecated use `UpdatePromptPromptsUseCases$outboundSchema` instead. */
3720
- export const outboundSchema = UpdatePromptPromptsUseCases$outboundSchema;
3721
- }
3722
-
3723
- /** @internal */
3724
- export const UpdatePromptPromptsLanguage$inboundSchema: z.ZodNativeEnum<
3725
- typeof UpdatePromptPromptsLanguage
3726
- > = z.nativeEnum(UpdatePromptPromptsLanguage);
3727
-
3728
- /** @internal */
3729
- export const UpdatePromptPromptsLanguage$outboundSchema: z.ZodNativeEnum<
3730
- typeof UpdatePromptPromptsLanguage
3731
- > = UpdatePromptPromptsLanguage$inboundSchema;
3732
-
3733
- /**
3734
- * @internal
3735
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3736
- */
3737
- export namespace UpdatePromptPromptsLanguage$ {
3738
- /** @deprecated use `UpdatePromptPromptsLanguage$inboundSchema` instead. */
3739
- export const inboundSchema = UpdatePromptPromptsLanguage$inboundSchema;
3740
- /** @deprecated use `UpdatePromptPromptsLanguage$outboundSchema` instead. */
3741
- export const outboundSchema = UpdatePromptPromptsLanguage$outboundSchema;
3742
- }
3743
-
3744
- /** @internal */
3745
- export const UpdatePromptPromptsMetadata$inboundSchema: z.ZodType<
3746
- UpdatePromptPromptsMetadata,
3747
- z.ZodTypeDef,
3748
- unknown
3749
- > = z.object({
3750
- use_cases: z.array(UpdatePromptPromptsUseCases$inboundSchema).optional(),
3751
- language: UpdatePromptPromptsLanguage$inboundSchema.optional(),
3752
- }).transform((v) => {
3753
- return remap$(v, {
3754
- "use_cases": "useCases",
3755
- });
3756
- });
3757
-
3758
- /** @internal */
3759
- export type UpdatePromptPromptsMetadata$Outbound = {
3760
- use_cases?: Array<string> | undefined;
3761
- language?: string | undefined;
3762
- };
3763
-
3764
- /** @internal */
3765
- export const UpdatePromptPromptsMetadata$outboundSchema: z.ZodType<
3766
- UpdatePromptPromptsMetadata$Outbound,
3767
- z.ZodTypeDef,
3768
- UpdatePromptPromptsMetadata
3769
- > = z.object({
3770
- useCases: z.array(UpdatePromptPromptsUseCases$outboundSchema).optional(),
3771
- language: UpdatePromptPromptsLanguage$outboundSchema.optional(),
3772
- }).transform((v) => {
3773
- return remap$(v, {
3774
- useCases: "use_cases",
3775
- });
3776
- });
3777
-
3778
- /**
3779
- * @internal
3780
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3781
- */
3782
- export namespace UpdatePromptPromptsMetadata$ {
3783
- /** @deprecated use `UpdatePromptPromptsMetadata$inboundSchema` instead. */
3784
- export const inboundSchema = UpdatePromptPromptsMetadata$inboundSchema;
3785
- /** @deprecated use `UpdatePromptPromptsMetadata$outboundSchema` instead. */
3786
- export const outboundSchema = UpdatePromptPromptsMetadata$outboundSchema;
3787
- /** @deprecated use `UpdatePromptPromptsMetadata$Outbound` instead. */
3788
- export type Outbound = UpdatePromptPromptsMetadata$Outbound;
3789
- }
3790
-
3791
- export function updatePromptPromptsMetadataToJSON(
3792
- updatePromptPromptsMetadata: UpdatePromptPromptsMetadata,
3793
- ): string {
3794
- return JSON.stringify(
3795
- UpdatePromptPromptsMetadata$outboundSchema.parse(
3796
- updatePromptPromptsMetadata,
3797
- ),
3798
- );
3799
- }
3800
-
3801
- export function updatePromptPromptsMetadataFromJSON(
3802
- jsonString: string,
3803
- ): SafeParseResult<UpdatePromptPromptsMetadata, SDKValidationError> {
3804
- return safeParse(
3805
- jsonString,
3806
- (x) => UpdatePromptPromptsMetadata$inboundSchema.parse(JSON.parse(x)),
3807
- `Failed to parse 'UpdatePromptPromptsMetadata' from JSON`,
3808
- );
3809
- }
3810
-
3811
- /** @internal */
3812
- export const UpdatePromptResponseBody$inboundSchema: z.ZodType<
3813
- UpdatePromptResponseBody,
3814
- z.ZodTypeDef,
3815
- unknown
3816
- > = z.object({
3817
- _id: z.string(),
3818
- type: UpdatePromptPromptsType$inboundSchema,
3819
- owner: z.string(),
3820
- domain_id: z.string(),
3821
- created: z.string(),
3822
- updated: z.string(),
3823
- created_by_id: z.nullable(z.string()).optional(),
3824
- updated_by_id: z.nullable(z.string()).optional(),
3825
- display_name: z.string(),
3826
- description: z.nullable(z.string()).optional(),
3827
- prompt_config: z.lazy(() => UpdatePromptPromptsPromptConfig$inboundSchema),
3828
- metadata: z.lazy(() => UpdatePromptPromptsMetadata$inboundSchema).optional(),
3829
- }).transform((v) => {
3830
- return remap$(v, {
3831
- "_id": "id",
3832
- "domain_id": "domainId",
3833
- "created_by_id": "createdById",
3834
- "updated_by_id": "updatedById",
3835
- "display_name": "displayName",
3836
- "prompt_config": "promptConfig",
3837
- });
3838
- });
3839
-
3840
- /** @internal */
3841
- export type UpdatePromptResponseBody$Outbound = {
3842
- _id: string;
3843
- type: string;
3844
- owner: string;
3845
- domain_id: string;
3846
- created: string;
3847
- updated: string;
3848
- created_by_id?: string | null | undefined;
3849
- updated_by_id?: string | null | undefined;
3850
- display_name: string;
3851
- description?: string | null | undefined;
3852
- prompt_config: UpdatePromptPromptsPromptConfig$Outbound;
3853
- metadata?: UpdatePromptPromptsMetadata$Outbound | undefined;
3854
- };
3855
-
3856
- /** @internal */
3857
- export const UpdatePromptResponseBody$outboundSchema: z.ZodType<
3858
- UpdatePromptResponseBody$Outbound,
3859
- z.ZodTypeDef,
3860
- UpdatePromptResponseBody
3861
- > = z.object({
3862
- id: z.string(),
3863
- type: UpdatePromptPromptsType$outboundSchema,
3864
- owner: z.string(),
3865
- domainId: z.string(),
3866
- created: z.string(),
3867
- updated: z.string(),
3868
- createdById: z.nullable(z.string()).optional(),
3869
- updatedById: z.nullable(z.string()).optional(),
3870
- displayName: z.string(),
3871
- description: z.nullable(z.string()).optional(),
3872
- promptConfig: z.lazy(() => UpdatePromptPromptsPromptConfig$outboundSchema),
3873
- metadata: z.lazy(() => UpdatePromptPromptsMetadata$outboundSchema).optional(),
3874
- }).transform((v) => {
3875
- return remap$(v, {
3876
- id: "_id",
3877
- domainId: "domain_id",
3878
- createdById: "created_by_id",
3879
- updatedById: "updated_by_id",
3880
- displayName: "display_name",
3881
- promptConfig: "prompt_config",
3882
- });
3883
- });
3884
-
3885
- /**
3886
- * @internal
3887
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3888
- */
3889
- export namespace UpdatePromptResponseBody$ {
3890
- /** @deprecated use `UpdatePromptResponseBody$inboundSchema` instead. */
3891
- export const inboundSchema = UpdatePromptResponseBody$inboundSchema;
3892
- /** @deprecated use `UpdatePromptResponseBody$outboundSchema` instead. */
3893
- export const outboundSchema = UpdatePromptResponseBody$outboundSchema;
3894
- /** @deprecated use `UpdatePromptResponseBody$Outbound` instead. */
3895
- export type Outbound = UpdatePromptResponseBody$Outbound;
3896
- }
3897
-
3898
- export function updatePromptResponseBodyToJSON(
3899
- updatePromptResponseBody: UpdatePromptResponseBody,
3900
- ): string {
3901
- return JSON.stringify(
3902
- UpdatePromptResponseBody$outboundSchema.parse(updatePromptResponseBody),
3903
- );
3904
- }
3905
-
3906
- export function updatePromptResponseBodyFromJSON(
3907
- jsonString: string,
3908
- ): SafeParseResult<UpdatePromptResponseBody, SDKValidationError> {
3909
- return safeParse(
3910
- jsonString,
3911
- (x) => UpdatePromptResponseBody$inboundSchema.parse(JSON.parse(x)),
3912
- `Failed to parse 'UpdatePromptResponseBody' from JSON`,
3913
- );
3914
- }