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