@orq-ai/node 3.3.2 → 3.4.0-rc.0

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