@orq-ai/node 4.2.0-rc.44 → 4.2.0-rc.46

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 (151) hide show
  1. package/README.md +2 -1
  2. package/bin/mcp-server.js +4770 -1625
  3. package/bin/mcp-server.js.map +57 -56
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/promptsDelete.d.ts +2 -1
  6. package/funcs/promptsDelete.d.ts.map +1 -1
  7. package/funcs/promptsDelete.js +7 -3
  8. package/funcs/promptsDelete.js.map +1 -1
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/mcp-server/mcp-server.js +1 -1
  13. package/mcp-server/server.js +1 -1
  14. package/models/components/conversationresponse.js +2 -2
  15. package/models/components/conversationwithmessagesresponse.js +2 -2
  16. package/models/components/partdoneevent.js +2 -2
  17. package/models/components/reasoningpart.js +2 -2
  18. package/models/errors/deleteprompt.d.ts +29 -0
  19. package/models/errors/deleteprompt.d.ts.map +1 -0
  20. package/models/errors/deleteprompt.js +74 -0
  21. package/models/errors/deleteprompt.js.map +1 -0
  22. package/models/errors/index.d.ts +1 -0
  23. package/models/errors/index.d.ts.map +1 -1
  24. package/models/errors/index.js +1 -0
  25. package/models/errors/index.js.map +1 -1
  26. package/models/operations/createcontact.js +2 -2
  27. package/models/operations/createconversation.js +2 -2
  28. package/models/operations/createconversationresponse.js +4 -4
  29. package/models/operations/createdataset.js +2 -2
  30. package/models/operations/createdatasetitem.js +8 -8
  31. package/models/operations/createdatasource.js +2 -2
  32. package/models/operations/createeval.d.ts +16 -16
  33. package/models/operations/createeval.d.ts.map +1 -1
  34. package/models/operations/createeval.js +56 -53
  35. package/models/operations/createeval.js.map +1 -1
  36. package/models/operations/createidentity.js +2 -2
  37. package/models/operations/createprompt.d.ts +1746 -976
  38. package/models/operations/createprompt.d.ts.map +1 -1
  39. package/models/operations/createprompt.js +2032 -1282
  40. package/models/operations/createprompt.js.map +1 -1
  41. package/models/operations/createtool.js +12 -12
  42. package/models/operations/deploymentgetconfig.d.ts +88 -88
  43. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  44. package/models/operations/deploymentgetconfig.js +131 -130
  45. package/models/operations/deploymentgetconfig.js.map +1 -1
  46. package/models/operations/deploymentinvoke.d.ts +5 -5
  47. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  48. package/models/operations/deploymentinvoke.js +7 -6
  49. package/models/operations/deploymentinvoke.js.map +1 -1
  50. package/models/operations/fileget.js +2 -2
  51. package/models/operations/filelist.js +2 -2
  52. package/models/operations/fileupload.js +2 -2
  53. package/models/operations/generateconversationname.js +2 -2
  54. package/models/operations/getallprompts.d.ts +1051 -42
  55. package/models/operations/getallprompts.d.ts.map +1 -1
  56. package/models/operations/getallprompts.js +1069 -48
  57. package/models/operations/getallprompts.js.map +1 -1
  58. package/models/operations/getalltools.js +12 -12
  59. package/models/operations/getevals.js +28 -28
  60. package/models/operations/getoneprompt.d.ts +1051 -42
  61. package/models/operations/getoneprompt.d.ts.map +1 -1
  62. package/models/operations/getoneprompt.js +1071 -47
  63. package/models/operations/getoneprompt.js.map +1 -1
  64. package/models/operations/getpromptversion.d.ts +1051 -42
  65. package/models/operations/getpromptversion.d.ts.map +1 -1
  66. package/models/operations/getpromptversion.js +1070 -48
  67. package/models/operations/getpromptversion.js.map +1 -1
  68. package/models/operations/listcontacts.js +2 -2
  69. package/models/operations/listdatasetdatapoints.js +8 -8
  70. package/models/operations/listdatasets.js +2 -2
  71. package/models/operations/listdatasources.js +2 -2
  72. package/models/operations/listidentities.js +2 -2
  73. package/models/operations/listpromptversions.d.ts +1051 -42
  74. package/models/operations/listpromptversions.d.ts.map +1 -1
  75. package/models/operations/listpromptversions.js +1070 -47
  76. package/models/operations/listpromptversions.js.map +1 -1
  77. package/models/operations/retrievecontact.js +2 -2
  78. package/models/operations/retrievedatapoint.js +8 -8
  79. package/models/operations/retrievedataset.js +2 -2
  80. package/models/operations/retrievedatasource.js +2 -2
  81. package/models/operations/retrieveidentity.js +2 -2
  82. package/models/operations/retrievetool.js +12 -12
  83. package/models/operations/runagent.js +2 -2
  84. package/models/operations/streamrunagent.js +2 -2
  85. package/models/operations/updatecontact.js +2 -2
  86. package/models/operations/updateconversation.js +2 -2
  87. package/models/operations/updatedatapoint.js +8 -8
  88. package/models/operations/updatedataset.js +2 -2
  89. package/models/operations/updatedatasource.js +2 -2
  90. package/models/operations/updateeval.js +28 -28
  91. package/models/operations/updateidentity.js +2 -2
  92. package/models/operations/updateprompt.d.ts +2112 -1413
  93. package/models/operations/updateprompt.d.ts.map +1 -1
  94. package/models/operations/updateprompt.js +2200 -1525
  95. package/models/operations/updateprompt.js.map +1 -1
  96. package/models/operations/updatetool.js +14 -14
  97. package/package.json +1 -1
  98. package/src/funcs/promptsDelete.ts +12 -3
  99. package/src/lib/config.ts +3 -3
  100. package/src/mcp-server/mcp-server.ts +1 -1
  101. package/src/mcp-server/server.ts +1 -1
  102. package/src/models/components/conversationresponse.ts +2 -2
  103. package/src/models/components/conversationwithmessagesresponse.ts +2 -2
  104. package/src/models/components/partdoneevent.ts +2 -2
  105. package/src/models/components/reasoningpart.ts +2 -2
  106. package/src/models/errors/deleteprompt.ts +67 -0
  107. package/src/models/errors/index.ts +1 -0
  108. package/src/models/operations/createcontact.ts +2 -2
  109. package/src/models/operations/createconversation.ts +2 -2
  110. package/src/models/operations/createconversationresponse.ts +4 -4
  111. package/src/models/operations/createdataset.ts +2 -2
  112. package/src/models/operations/createdatasetitem.ts +8 -8
  113. package/src/models/operations/createdatasource.ts +2 -2
  114. package/src/models/operations/createeval.ts +76 -96
  115. package/src/models/operations/createidentity.ts +2 -2
  116. package/src/models/operations/createprompt.ts +5179 -3019
  117. package/src/models/operations/createtool.ts +12 -12
  118. package/src/models/operations/deploymentgetconfig.ts +252 -337
  119. package/src/models/operations/deploymentinvoke.ts +9 -13
  120. package/src/models/operations/fileget.ts +2 -2
  121. package/src/models/operations/filelist.ts +2 -2
  122. package/src/models/operations/fileupload.ts +2 -2
  123. package/src/models/operations/generateconversationname.ts +2 -2
  124. package/src/models/operations/getallprompts.ts +3543 -850
  125. package/src/models/operations/getalltools.ts +12 -12
  126. package/src/models/operations/getevals.ts +28 -28
  127. package/src/models/operations/getoneprompt.ts +3463 -786
  128. package/src/models/operations/getpromptversion.ts +3579 -835
  129. package/src/models/operations/listcontacts.ts +2 -2
  130. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  131. package/src/models/operations/listdatasets.ts +2 -2
  132. package/src/models/operations/listdatasources.ts +2 -2
  133. package/src/models/operations/listidentities.ts +2 -2
  134. package/src/models/operations/listpromptversions.ts +3644 -864
  135. package/src/models/operations/retrievecontact.ts +2 -2
  136. package/src/models/operations/retrievedatapoint.ts +8 -8
  137. package/src/models/operations/retrievedataset.ts +2 -2
  138. package/src/models/operations/retrievedatasource.ts +2 -2
  139. package/src/models/operations/retrieveidentity.ts +2 -2
  140. package/src/models/operations/retrievetool.ts +12 -12
  141. package/src/models/operations/runagent.ts +2 -2
  142. package/src/models/operations/streamrunagent.ts +2 -2
  143. package/src/models/operations/updatecontact.ts +2 -2
  144. package/src/models/operations/updateconversation.ts +2 -2
  145. package/src/models/operations/updatedatapoint.ts +8 -8
  146. package/src/models/operations/updatedataset.ts +2 -2
  147. package/src/models/operations/updatedatasource.ts +2 -2
  148. package/src/models/operations/updateeval.ts +28 -28
  149. package/src/models/operations/updateidentity.ts +2 -2
  150. package/src/models/operations/updateprompt.ts +5281 -3301
  151. package/src/models/operations/updatetool.ts +14 -14
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
12
 
12
13
  export type GetOnePromptRequest = {
@@ -85,36 +86,40 @@ export type GetOnePromptResponseFormat4 = ClosedEnum<
85
86
  typeof GetOnePromptResponseFormat4
86
87
  >;
87
88
 
88
- export const GetOnePromptResponseFormatPromptsResponseType = {
89
- Text: "text",
90
- } as const;
91
- export type GetOnePromptResponseFormatPromptsResponseType = ClosedEnum<
92
- typeof GetOnePromptResponseFormatPromptsResponseType
93
- >;
89
+ export const GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
90
+ {
91
+ Text: "text",
92
+ } as const;
93
+ export type GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType =
94
+ ClosedEnum<
95
+ typeof GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
96
+ >;
94
97
 
95
98
  export type GetOnePromptResponseFormat3 = {
96
- type: GetOnePromptResponseFormatPromptsResponseType;
99
+ type:
100
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType;
97
101
  };
98
102
 
99
- export const GetOnePromptResponseFormatPromptsType = {
103
+ export const GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType = {
100
104
  JsonObject: "json_object",
101
105
  } as const;
102
- export type GetOnePromptResponseFormatPromptsType = ClosedEnum<
103
- typeof GetOnePromptResponseFormatPromptsType
104
- >;
106
+ export type GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType =
107
+ ClosedEnum<
108
+ typeof GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType
109
+ >;
105
110
 
106
111
  export type GetOnePromptResponseFormat2 = {
107
- type: GetOnePromptResponseFormatPromptsType;
112
+ type: GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType;
108
113
  };
109
114
 
110
- export const GetOnePromptResponseFormatType = {
115
+ export const GetOnePromptResponseFormatPromptsResponse200Type = {
111
116
  JsonSchema: "json_schema",
112
117
  } as const;
113
- export type GetOnePromptResponseFormatType = ClosedEnum<
114
- typeof GetOnePromptResponseFormatType
118
+ export type GetOnePromptResponseFormatPromptsResponse200Type = ClosedEnum<
119
+ typeof GetOnePromptResponseFormatPromptsResponse200Type
115
120
  >;
116
121
 
117
- export type GetOnePromptResponseFormatJsonSchema = {
122
+ export type GetOnePromptResponseFormatPromptsResponseJsonSchema = {
118
123
  name: string;
119
124
  description?: string | undefined;
120
125
  strict?: boolean | undefined;
@@ -122,9 +127,9 @@ export type GetOnePromptResponseFormatJsonSchema = {
122
127
  };
123
128
 
124
129
  export type GetOnePromptResponseFormat1 = {
125
- type: GetOnePromptResponseFormatType;
130
+ type: GetOnePromptResponseFormatPromptsResponse200Type;
126
131
  displayName?: string | undefined;
127
- jsonSchema: GetOnePromptResponseFormatJsonSchema;
132
+ jsonSchema: GetOnePromptResponseFormatPromptsResponseJsonSchema;
128
133
  };
129
134
 
130
135
  /**
@@ -138,7 +143,7 @@ export type GetOnePromptResponseFormat1 = {
138
143
  *
139
144
  * 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.
140
145
  */
141
- export type GetOnePromptResponseFormat =
146
+ export type GetOnePromptPromptsResponseFormat =
142
147
  | GetOnePromptResponseFormat1
143
148
  | GetOnePromptResponseFormat2
144
149
  | GetOnePromptResponseFormat3
@@ -177,7 +182,7 @@ export type GetOnePromptEncodingFormat = ClosedEnum<
177
182
  /**
178
183
  * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
179
184
  */
180
- export const GetOnePromptReasoningEffort = {
185
+ export const GetOnePromptPromptsReasoningEffort = {
181
186
  None: "none",
182
187
  Disable: "disable",
183
188
  Minimal: "minimal",
@@ -188,8 +193,8 @@ export const GetOnePromptReasoningEffort = {
188
193
  /**
189
194
  * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
190
195
  */
191
- export type GetOnePromptReasoningEffort = ClosedEnum<
192
- typeof GetOnePromptReasoningEffort
196
+ export type GetOnePromptPromptsReasoningEffort = ClosedEnum<
197
+ typeof GetOnePromptPromptsReasoningEffort
193
198
  >;
194
199
 
195
200
  /**
@@ -302,7 +307,7 @@ export type GetOnePromptModelParameters = {
302
307
  /**
303
308
  * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
304
309
  */
305
- reasoningEffort?: GetOnePromptReasoningEffort | undefined;
310
+ reasoningEffort?: GetOnePromptPromptsReasoningEffort | undefined;
306
311
  /**
307
312
  * 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`
308
313
  */
@@ -474,11 +479,13 @@ export type GetOnePromptMessages = {
474
479
  };
475
480
 
476
481
  /**
477
- * A list of messages compatible with the openAI schema
482
+ * [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
483
+ *
484
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
478
485
  */
479
486
  export type GetOnePromptPromptConfig = {
480
487
  stream?: boolean | undefined;
481
- model?: string | undefined;
488
+ model?: string | null | undefined;
482
489
  /**
483
490
  * The id of the resource
484
491
  */
@@ -491,7 +498,7 @@ export type GetOnePromptPromptConfig = {
491
498
  * Model Parameters: Not all parameters apply to every model
492
499
  */
493
500
  modelParameters?: GetOnePromptModelParameters | undefined;
494
- provider?: GetOnePromptProvider | undefined;
501
+ provider?: GetOnePromptProvider | null | undefined;
495
502
  /**
496
503
  * The ID of the integration to use
497
504
  */
@@ -500,1219 +507,3884 @@ export type GetOnePromptPromptConfig = {
500
507
  messages: Array<GetOnePromptMessages>;
501
508
  };
502
509
 
503
- export const GetOnePromptUseCases = {
504
- AgentsSimulations: "Agents simulations",
505
- Agents: "Agents",
506
- APIInteraction: "API interaction",
507
- AutonomousAgents: "Autonomous Agents",
508
- Chatbots: "Chatbots",
509
- Classification: "Classification",
510
- CodeUnderstanding: "Code understanding",
511
- CodeWriting: "Code writing",
512
- Conversation: "Conversation",
513
- DocumentsQA: "Documents QA",
514
- Evaluation: "Evaluation",
515
- Extraction: "Extraction",
516
- MultiModal: "Multi-modal",
517
- SelfChecking: "Self-checking",
518
- SentimentAnalysis: "Sentiment analysis",
519
- Sql: "SQL",
520
- Summarization: "Summarization",
521
- Tagging: "Tagging",
522
- TranslationDocument: "Translation (document)",
523
- TranslationSentences: "Translation (sentences)",
510
+ /**
511
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
512
+ */
513
+ export const GetOnePromptVoice = {
514
+ Alloy: "alloy",
515
+ Echo: "echo",
516
+ Fable: "fable",
517
+ Onyx: "onyx",
518
+ Nova: "nova",
519
+ Shimmer: "shimmer",
524
520
  } as const;
525
- export type GetOnePromptUseCases = ClosedEnum<typeof GetOnePromptUseCases>;
521
+ /**
522
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
523
+ */
524
+ export type GetOnePromptVoice = ClosedEnum<typeof GetOnePromptVoice>;
526
525
 
527
526
  /**
528
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
527
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
529
528
  */
530
- export const GetOnePromptLanguage = {
531
- Chinese: "Chinese",
532
- Dutch: "Dutch",
533
- English: "English",
534
- French: "French",
535
- German: "German",
536
- Russian: "Russian",
537
- Spanish: "Spanish",
529
+ export const GetOnePromptPromptsFormat = {
530
+ Wav: "wav",
531
+ Mp3: "mp3",
532
+ Flac: "flac",
533
+ Opus: "opus",
534
+ Pcm16: "pcm16",
538
535
  } as const;
539
536
  /**
540
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
537
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
541
538
  */
542
- export type GetOnePromptLanguage = ClosedEnum<typeof GetOnePromptLanguage>;
539
+ export type GetOnePromptPromptsFormat = ClosedEnum<
540
+ typeof GetOnePromptPromptsFormat
541
+ >;
543
542
 
544
- export type GetOnePromptMetadata = {
543
+ /**
544
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
545
+ */
546
+ export type GetOnePromptAudio = {
545
547
  /**
546
- * 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
548
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
547
549
  */
548
- useCases?: Array<GetOnePromptUseCases> | undefined;
550
+ voice: GetOnePromptVoice;
549
551
  /**
550
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
552
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
551
553
  */
552
- language?: GetOnePromptLanguage | null | undefined;
554
+ format: GetOnePromptPromptsFormat;
553
555
  };
554
556
 
555
- /**
556
- * A prompt entity with configuration, metadata, and versioning.
557
- */
558
- export type GetOnePromptPrompt = {
559
- id: string;
560
- type: GetOnePromptType;
561
- owner: string;
562
- domainId: string;
563
- created: string;
564
- updated: string;
565
- createdById?: string | null | undefined;
566
- updatedById?: string | null | undefined;
557
+ export type GetOnePromptResponseFormatJsonSchema = {
567
558
  /**
568
- * The prompt’s name, meant to be displayable in the UI.
559
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
569
560
  */
570
- displayName: string;
561
+ description?: string | undefined;
571
562
  /**
572
- * 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
563
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
573
564
  */
574
- description?: string | null | undefined;
565
+ name: string;
575
566
  /**
576
- * A list of messages compatible with the openAI schema
567
+ * The schema for the response format, described as a JSON Schema object.
577
568
  */
578
- promptConfig: GetOnePromptPromptConfig;
579
- metadata?: GetOnePromptMetadata | undefined;
569
+ schema?: any | undefined;
570
+ /**
571
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
572
+ */
573
+ strict?: boolean | undefined;
580
574
  };
581
575
 
582
- /** @internal */
583
- export const GetOnePromptRequest$inboundSchema: z.ZodType<
584
- GetOnePromptRequest,
585
- z.ZodTypeDef,
586
- unknown
587
- > = z.object({
588
- id: z.string(),
589
- });
590
- /** @internal */
591
- export type GetOnePromptRequest$Outbound = {
592
- id: string;
576
+ /**
577
+ * @remarks
578
+ *
579
+ * JSON Schema response format. Used to generate structured JSON responses
580
+ */
581
+ export type GetOnePromptResponseFormatPromptsJSONSchema = {
582
+ type: "json_schema";
583
+ jsonSchema: GetOnePromptResponseFormatJsonSchema;
593
584
  };
594
585
 
595
- /** @internal */
596
- export const GetOnePromptRequest$outboundSchema: z.ZodType<
597
- GetOnePromptRequest$Outbound,
598
- z.ZodTypeDef,
599
- GetOnePromptRequest
600
- > = z.object({
601
- id: z.string(),
602
- });
586
+ /**
587
+ * @remarks
588
+ *
589
+ * JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
590
+ */
591
+ export type GetOnePromptResponseFormatJSONObject = {
592
+ type: "json_object";
593
+ };
603
594
 
604
- export function getOnePromptRequestToJSON(
605
- getOnePromptRequest: GetOnePromptRequest,
606
- ): string {
607
- return JSON.stringify(
608
- GetOnePromptRequest$outboundSchema.parse(getOnePromptRequest),
609
- );
610
- }
611
- export function getOnePromptRequestFromJSON(
612
- jsonString: string,
613
- ): SafeParseResult<GetOnePromptRequest, SDKValidationError> {
614
- return safeParse(
615
- jsonString,
616
- (x) => GetOnePromptRequest$inboundSchema.parse(JSON.parse(x)),
617
- `Failed to parse 'GetOnePromptRequest' from JSON`,
618
- );
619
- }
595
+ /**
596
+ * @remarks
597
+ *
598
+ * Default response format. Used to generate text responses
599
+ */
600
+ export type GetOnePromptResponseFormatText = {
601
+ type: "text";
602
+ };
620
603
 
621
- /** @internal */
622
- export const GetOnePromptType$inboundSchema: z.ZodNativeEnum<
623
- typeof GetOnePromptType
624
- > = z.nativeEnum(GetOnePromptType);
625
- /** @internal */
626
- export const GetOnePromptType$outboundSchema: z.ZodNativeEnum<
627
- typeof GetOnePromptType
628
- > = GetOnePromptType$inboundSchema;
604
+ /**
605
+ * An object specifying the format that the model must output
606
+ */
607
+ export type GetOnePromptResponseFormat =
608
+ | GetOnePromptResponseFormatText
609
+ | GetOnePromptResponseFormatJSONObject
610
+ | GetOnePromptResponseFormatPromptsJSONSchema;
629
611
 
630
- /** @internal */
631
- export const GetOnePromptModelType$inboundSchema: z.ZodNativeEnum<
632
- typeof GetOnePromptModelType
633
- > = z.nativeEnum(GetOnePromptModelType);
634
- /** @internal */
635
- export const GetOnePromptModelType$outboundSchema: z.ZodNativeEnum<
636
- typeof GetOnePromptModelType
637
- > = GetOnePromptModelType$inboundSchema;
612
+ /**
613
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
614
+ *
615
+ * @remarks
616
+ *
617
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
618
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
619
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
620
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
621
+ *
622
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
623
+ */
624
+ export const GetOnePromptReasoningEffort = {
625
+ None: "none",
626
+ Minimal: "minimal",
627
+ Low: "low",
628
+ Medium: "medium",
629
+ High: "high",
630
+ Xhigh: "xhigh",
631
+ } as const;
632
+ /**
633
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
634
+ *
635
+ * @remarks
636
+ *
637
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
638
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
639
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
640
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
641
+ *
642
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
643
+ */
644
+ export type GetOnePromptReasoningEffort = ClosedEnum<
645
+ typeof GetOnePromptReasoningEffort
646
+ >;
638
647
 
639
- /** @internal */
640
- export const GetOnePromptFormat$inboundSchema: z.ZodNativeEnum<
641
- typeof GetOnePromptFormat
642
- > = z.nativeEnum(GetOnePromptFormat);
643
- /** @internal */
644
- export const GetOnePromptFormat$outboundSchema: z.ZodNativeEnum<
645
- typeof GetOnePromptFormat
646
- > = GetOnePromptFormat$inboundSchema;
648
+ /**
649
+ * Up to 4 sequences where the API will stop generating further tokens.
650
+ */
651
+ export type GetOnePromptStop = string | Array<string>;
647
652
 
648
- /** @internal */
649
- export const GetOnePromptResponseFormat6$inboundSchema: z.ZodNativeEnum<
650
- typeof GetOnePromptResponseFormat6
651
- > = z.nativeEnum(GetOnePromptResponseFormat6);
652
- /** @internal */
653
- export const GetOnePromptResponseFormat6$outboundSchema: z.ZodNativeEnum<
654
- typeof GetOnePromptResponseFormat6
655
- > = GetOnePromptResponseFormat6$inboundSchema;
653
+ /**
654
+ * Options for streaming response. Only set this when you set stream: true.
655
+ */
656
+ export type GetOnePromptStreamOptions = {
657
+ /**
658
+ * If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
659
+ */
660
+ includeUsage?: boolean | undefined;
661
+ };
656
662
 
657
- /** @internal */
658
- export const GetOnePromptResponseFormat5$inboundSchema: z.ZodNativeEnum<
659
- typeof GetOnePromptResponseFormat5
660
- > = z.nativeEnum(GetOnePromptResponseFormat5);
661
- /** @internal */
662
- export const GetOnePromptResponseFormat5$outboundSchema: z.ZodNativeEnum<
663
- typeof GetOnePromptResponseFormat5
664
- > = GetOnePromptResponseFormat5$inboundSchema;
663
+ export type GetOnePromptThinking =
664
+ | components.ThinkingConfigDisabledSchema
665
+ | components.ThinkingConfigEnabledSchema;
665
666
 
666
- /** @internal */
667
- export const GetOnePromptResponseFormat4$inboundSchema: z.ZodNativeEnum<
668
- typeof GetOnePromptResponseFormat4
669
- > = z.nativeEnum(GetOnePromptResponseFormat4);
670
- /** @internal */
671
- export const GetOnePromptResponseFormat4$outboundSchema: z.ZodNativeEnum<
672
- typeof GetOnePromptResponseFormat4
673
- > = GetOnePromptResponseFormat4$inboundSchema;
667
+ /**
668
+ * The type of the tool. Currently, only function is supported.
669
+ */
670
+ export const GetOnePromptToolChoiceType = {
671
+ Function: "function",
672
+ } as const;
673
+ /**
674
+ * The type of the tool. Currently, only function is supported.
675
+ */
676
+ export type GetOnePromptToolChoiceType = ClosedEnum<
677
+ typeof GetOnePromptToolChoiceType
678
+ >;
674
679
 
675
- /** @internal */
676
- export const GetOnePromptResponseFormatPromptsResponseType$inboundSchema:
677
- z.ZodNativeEnum<typeof GetOnePromptResponseFormatPromptsResponseType> = z
678
- .nativeEnum(GetOnePromptResponseFormatPromptsResponseType);
679
- /** @internal */
680
- export const GetOnePromptResponseFormatPromptsResponseType$outboundSchema:
681
- z.ZodNativeEnum<typeof GetOnePromptResponseFormatPromptsResponseType> =
682
- GetOnePromptResponseFormatPromptsResponseType$inboundSchema;
680
+ export type GetOnePromptToolChoiceFunction = {
681
+ /**
682
+ * The name of the function to call.
683
+ */
684
+ name: string;
685
+ };
683
686
 
684
- /** @internal */
685
- export const GetOnePromptResponseFormat3$inboundSchema: z.ZodType<
686
- GetOnePromptResponseFormat3,
687
- z.ZodTypeDef,
688
- unknown
689
- > = z.object({
690
- type: GetOnePromptResponseFormatPromptsResponseType$inboundSchema,
691
- });
692
- /** @internal */
693
- export type GetOnePromptResponseFormat3$Outbound = {
694
- type: string;
687
+ export type GetOnePromptToolChoice2 = {
688
+ /**
689
+ * The type of the tool. Currently, only function is supported.
690
+ */
691
+ type?: GetOnePromptToolChoiceType | undefined;
692
+ function: GetOnePromptToolChoiceFunction;
695
693
  };
696
694
 
697
- /** @internal */
698
- export const GetOnePromptResponseFormat3$outboundSchema: z.ZodType<
699
- GetOnePromptResponseFormat3$Outbound,
700
- z.ZodTypeDef,
701
- GetOnePromptResponseFormat3
702
- > = z.object({
703
- type: GetOnePromptResponseFormatPromptsResponseType$outboundSchema,
704
- });
695
+ export const GetOnePromptToolChoice1 = {
696
+ None: "none",
697
+ Auto: "auto",
698
+ Required: "required",
699
+ } as const;
700
+ export type GetOnePromptToolChoice1 = ClosedEnum<
701
+ typeof GetOnePromptToolChoice1
702
+ >;
705
703
 
706
- export function getOnePromptResponseFormat3ToJSON(
707
- getOnePromptResponseFormat3: GetOnePromptResponseFormat3,
708
- ): string {
709
- return JSON.stringify(
704
+ /**
705
+ * Controls which (if any) tool is called by the model.
706
+ */
707
+ export type GetOnePromptToolChoice =
708
+ | GetOnePromptToolChoice2
709
+ | GetOnePromptToolChoice1;
710
+
711
+ export const GetOnePromptModalities = {
712
+ Text: "text",
713
+ Audio: "audio",
714
+ } as const;
715
+ export type GetOnePromptModalities = ClosedEnum<typeof GetOnePromptModalities>;
716
+
717
+ /**
718
+ * The key of the guardrail.
719
+ */
720
+ export const GetOnePromptId1 = {
721
+ OrqPiiDetection: "orq_pii_detection",
722
+ OrqSexualModeration: "orq_sexual_moderation",
723
+ OrqHarmfulModeration: "orq_harmful_moderation",
724
+ } as const;
725
+ /**
726
+ * The key of the guardrail.
727
+ */
728
+ export type GetOnePromptId1 = ClosedEnum<typeof GetOnePromptId1>;
729
+
730
+ export type GetOnePromptId = GetOnePromptId1 | string;
731
+
732
+ /**
733
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
734
+ */
735
+ export const GetOnePromptExecuteOn = {
736
+ Input: "input",
737
+ Output: "output",
738
+ } as const;
739
+ /**
740
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
741
+ */
742
+ export type GetOnePromptExecuteOn = ClosedEnum<typeof GetOnePromptExecuteOn>;
743
+
744
+ export type GetOnePromptGuardrails = {
745
+ id: GetOnePromptId1 | string;
746
+ /**
747
+ * Determines whether the guardrail runs on the input (user message) or output (model response).
748
+ */
749
+ executeOn: GetOnePromptExecuteOn;
750
+ };
751
+
752
+ export type GetOnePromptContentPromptsResponse2002 =
753
+ components.TextContentPartSchema;
754
+
755
+ /**
756
+ * The contents of the tool message.
757
+ */
758
+ export type GetOnePromptMessagesPromptsResponse200Content =
759
+ | string
760
+ | Array<components.TextContentPartSchema>;
761
+
762
+ /**
763
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
764
+ */
765
+ export const GetOnePromptMessagesPromptsType = {
766
+ Ephemeral: "ephemeral",
767
+ } as const;
768
+ /**
769
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
770
+ */
771
+ export type GetOnePromptMessagesPromptsType = ClosedEnum<
772
+ typeof GetOnePromptMessagesPromptsType
773
+ >;
774
+
775
+ /**
776
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
777
+ *
778
+ * @remarks
779
+ *
780
+ * - `5m`: 5 minutes
781
+ * - `1h`: 1 hour
782
+ *
783
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
784
+ */
785
+ export const GetOnePromptMessagesTtl = {
786
+ Fivem: "5m",
787
+ Oneh: "1h",
788
+ } as const;
789
+ /**
790
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
791
+ *
792
+ * @remarks
793
+ *
794
+ * - `5m`: 5 minutes
795
+ * - `1h`: 1 hour
796
+ *
797
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
798
+ */
799
+ export type GetOnePromptMessagesTtl = ClosedEnum<
800
+ typeof GetOnePromptMessagesTtl
801
+ >;
802
+
803
+ export type GetOnePromptMessagesCacheControl = {
804
+ /**
805
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
806
+ */
807
+ type: GetOnePromptMessagesPromptsType;
808
+ /**
809
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
810
+ *
811
+ * @remarks
812
+ *
813
+ * - `5m`: 5 minutes
814
+ * - `1h`: 1 hour
815
+ *
816
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
817
+ */
818
+ ttl?: GetOnePromptMessagesTtl | undefined;
819
+ };
820
+
821
+ export type GetOnePromptMessagesToolMessage = {
822
+ /**
823
+ * The role of the messages author, in this case tool.
824
+ */
825
+ role: "tool";
826
+ /**
827
+ * The contents of the tool message.
828
+ */
829
+ content: string | Array<components.TextContentPartSchema>;
830
+ /**
831
+ * Tool call that this message is responding to.
832
+ */
833
+ toolCallId: string | null;
834
+ cacheControl?: GetOnePromptMessagesCacheControl | undefined;
835
+ };
836
+
837
+ export type GetOnePromptContentPromptsResponse2 =
838
+ | (components.TextContentPartSchema & { type: "text" })
839
+ | components.RefusalPartSchema
840
+ | components.ReasoningPartSchema
841
+ | components.RedactedReasoningPartSchema;
842
+
843
+ /**
844
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
845
+ */
846
+ export type GetOnePromptMessagesPromptsResponseContent =
847
+ | string
848
+ | Array<
849
+ | (components.TextContentPartSchema & { type: "text" })
850
+ | components.RefusalPartSchema
851
+ | components.ReasoningPartSchema
852
+ | components.RedactedReasoningPartSchema
853
+ >;
854
+
855
+ /**
856
+ * Data about a previous audio response from the model.
857
+ */
858
+ export type GetOnePromptMessagesAudio = {
859
+ /**
860
+ * Unique identifier for a previous audio response from the model.
861
+ */
862
+ id: string;
863
+ };
864
+
865
+ /**
866
+ * The type of the tool. Currently, only `function` is supported.
867
+ */
868
+ export const GetOnePromptMessagesType = {
869
+ Function: "function",
870
+ } as const;
871
+ /**
872
+ * The type of the tool. Currently, only `function` is supported.
873
+ */
874
+ export type GetOnePromptMessagesType = ClosedEnum<
875
+ typeof GetOnePromptMessagesType
876
+ >;
877
+
878
+ export type GetOnePromptMessagesFunction = {
879
+ /**
880
+ * The name of the function to call.
881
+ */
882
+ name?: string | undefined;
883
+ /**
884
+ * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
885
+ */
886
+ arguments?: string | undefined;
887
+ };
888
+
889
+ export type GetOnePromptMessagesToolCalls = {
890
+ /**
891
+ * The ID of the tool call.
892
+ */
893
+ id: string;
894
+ /**
895
+ * The type of the tool. Currently, only `function` is supported.
896
+ */
897
+ type: GetOnePromptMessagesType;
898
+ function: GetOnePromptMessagesFunction;
899
+ /**
900
+ * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
901
+ */
902
+ thoughtSignature?: string | undefined;
903
+ };
904
+
905
+ export type GetOnePromptMessagesAssistantMessage = {
906
+ /**
907
+ * The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.
908
+ */
909
+ content?:
910
+ | string
911
+ | Array<
912
+ | (components.TextContentPartSchema & { type: "text" })
913
+ | components.RefusalPartSchema
914
+ | components.ReasoningPartSchema
915
+ | components.RedactedReasoningPartSchema
916
+ >
917
+ | null
918
+ | undefined;
919
+ /**
920
+ * The refusal message by the assistant.
921
+ */
922
+ refusal?: string | null | undefined;
923
+ /**
924
+ * The role of the messages author, in this case `assistant`.
925
+ */
926
+ role: "assistant";
927
+ /**
928
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
929
+ */
930
+ name?: string | undefined;
931
+ /**
932
+ * Data about a previous audio response from the model.
933
+ */
934
+ audio?: GetOnePromptMessagesAudio | null | undefined;
935
+ /**
936
+ * The tool calls generated by the model, such as function calls.
937
+ */
938
+ toolCalls?: Array<GetOnePromptMessagesToolCalls> | undefined;
939
+ };
940
+
941
+ /**
942
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
943
+ */
944
+ export const GetOnePrompt2PromptsResponse200ApplicationJSONType = {
945
+ Ephemeral: "ephemeral",
946
+ } as const;
947
+ /**
948
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
949
+ */
950
+ export type GetOnePrompt2PromptsResponse200ApplicationJSONType = ClosedEnum<
951
+ typeof GetOnePrompt2PromptsResponse200ApplicationJSONType
952
+ >;
953
+
954
+ /**
955
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
956
+ *
957
+ * @remarks
958
+ *
959
+ * - `5m`: 5 minutes
960
+ * - `1h`: 1 hour
961
+ *
962
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
963
+ */
964
+ export const GetOnePrompt2Ttl = {
965
+ Fivem: "5m",
966
+ Oneh: "1h",
967
+ } as const;
968
+ /**
969
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
970
+ *
971
+ * @remarks
972
+ *
973
+ * - `5m`: 5 minutes
974
+ * - `1h`: 1 hour
975
+ *
976
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
977
+ */
978
+ export type GetOnePrompt2Ttl = ClosedEnum<typeof GetOnePrompt2Ttl>;
979
+
980
+ export type GetOnePrompt2CacheControl = {
981
+ /**
982
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
983
+ */
984
+ type: GetOnePrompt2PromptsResponse200ApplicationJSONType;
985
+ /**
986
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
987
+ *
988
+ * @remarks
989
+ *
990
+ * - `5m`: 5 minutes
991
+ * - `1h`: 1 hour
992
+ *
993
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
994
+ */
995
+ ttl?: GetOnePrompt2Ttl | undefined;
996
+ };
997
+
998
+ export type GetOnePrompt24 = {
999
+ /**
1000
+ * The type of the content part. Always `file`.
1001
+ */
1002
+ type: "file";
1003
+ cacheControl?: GetOnePrompt2CacheControl | undefined;
1004
+ /**
1005
+ * File data for the content part. Must contain either file_data or uri, but not both.
1006
+ */
1007
+ file: components.FileContentPartSchema;
1008
+ };
1009
+
1010
+ export type GetOnePromptContentPrompts2 =
1011
+ | (components.TextContentPartSchema & { type: "text" })
1012
+ | components.ImageContentPartSchema
1013
+ | components.AudioContentPartSchema
1014
+ | GetOnePrompt24;
1015
+
1016
+ /**
1017
+ * The contents of the user message.
1018
+ */
1019
+ export type GetOnePromptMessagesPromptsContent =
1020
+ | string
1021
+ | Array<
1022
+ | (components.TextContentPartSchema & { type: "text" })
1023
+ | components.ImageContentPartSchema
1024
+ | components.AudioContentPartSchema
1025
+ | GetOnePrompt24
1026
+ >;
1027
+
1028
+ export type GetOnePromptMessagesUserMessage = {
1029
+ /**
1030
+ * The role of the messages author, in this case `user`.
1031
+ */
1032
+ role: "user";
1033
+ /**
1034
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1035
+ */
1036
+ name?: string | undefined;
1037
+ /**
1038
+ * The contents of the user message.
1039
+ */
1040
+ content:
1041
+ | string
1042
+ | Array<
1043
+ | (components.TextContentPartSchema & { type: "text" })
1044
+ | components.ImageContentPartSchema
1045
+ | components.AudioContentPartSchema
1046
+ | GetOnePrompt24
1047
+ >;
1048
+ };
1049
+
1050
+ /**
1051
+ * The contents of the system message.
1052
+ */
1053
+ export type GetOnePromptMessagesContent =
1054
+ | string
1055
+ | Array<components.TextContentPartSchema>;
1056
+
1057
+ /**
1058
+ * Developer-provided instructions that the model should follow, regardless of messages sent by the user.
1059
+ */
1060
+ export type GetOnePromptMessagesSystemMessage = {
1061
+ /**
1062
+ * The role of the messages author, in this case `system`.
1063
+ */
1064
+ role: "system";
1065
+ /**
1066
+ * The contents of the system message.
1067
+ */
1068
+ content: string | Array<components.TextContentPartSchema>;
1069
+ /**
1070
+ * An optional name for the participant. Provides the model information to differentiate between participants of the same role.
1071
+ */
1072
+ name?: string | undefined;
1073
+ };
1074
+
1075
+ export type GetOnePromptPromptsMessages =
1076
+ | GetOnePromptMessagesSystemMessage
1077
+ | GetOnePromptMessagesUserMessage
1078
+ | GetOnePromptMessagesAssistantMessage
1079
+ | GetOnePromptMessagesToolMessage;
1080
+
1081
+ /**
1082
+ * Prompt configuration with model and messages. Use this instead of prompt_config.
1083
+ */
1084
+ export type GetOnePromptPromptField = {
1085
+ /**
1086
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
1087
+ */
1088
+ audio?: GetOnePromptAudio | null | undefined;
1089
+ /**
1090
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
1091
+ */
1092
+ frequencyPenalty?: number | null | undefined;
1093
+ /**
1094
+ * `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
1095
+ *
1096
+ * @remarks
1097
+ *
1098
+ * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
1099
+ */
1100
+ maxTokens?: number | null | undefined;
1101
+ /**
1102
+ * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
1103
+ */
1104
+ maxCompletionTokens?: number | null | undefined;
1105
+ /**
1106
+ * Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
1107
+ */
1108
+ logprobs?: boolean | null | undefined;
1109
+ /**
1110
+ * An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
1111
+ */
1112
+ topLogprobs?: number | null | undefined;
1113
+ /**
1114
+ * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
1115
+ */
1116
+ n?: number | null | undefined;
1117
+ /**
1118
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
1119
+ */
1120
+ presencePenalty?: number | null | undefined;
1121
+ /**
1122
+ * An object specifying the format that the model must output
1123
+ */
1124
+ responseFormat?:
1125
+ | GetOnePromptResponseFormatText
1126
+ | GetOnePromptResponseFormatJSONObject
1127
+ | GetOnePromptResponseFormatPromptsJSONSchema
1128
+ | undefined;
1129
+ /**
1130
+ * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1131
+ *
1132
+ * @remarks
1133
+ *
1134
+ * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
1135
+ * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
1136
+ * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1137
+ * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1138
+ *
1139
+ * Any of "none", "minimal", "low", "medium", "high", "xhigh".
1140
+ */
1141
+ reasoningEffort?: GetOnePromptReasoningEffort | undefined;
1142
+ /**
1143
+ * Adjusts response verbosity. Lower levels yield shorter answers.
1144
+ */
1145
+ verbosity?: string | undefined;
1146
+ /**
1147
+ * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
1148
+ */
1149
+ seed?: number | null | undefined;
1150
+ /**
1151
+ * Up to 4 sequences where the API will stop generating further tokens.
1152
+ */
1153
+ stop?: string | Array<string> | null | undefined;
1154
+ /**
1155
+ * Options for streaming response. Only set this when you set stream: true.
1156
+ */
1157
+ streamOptions?: GetOnePromptStreamOptions | null | undefined;
1158
+ thinking?:
1159
+ | components.ThinkingConfigDisabledSchema
1160
+ | components.ThinkingConfigEnabledSchema
1161
+ | undefined;
1162
+ /**
1163
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
1164
+ */
1165
+ temperature?: number | null | undefined;
1166
+ /**
1167
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
1168
+ */
1169
+ topP?: number | null | undefined;
1170
+ /**
1171
+ * Limits the model to consider only the top k most likely tokens at each step.
1172
+ */
1173
+ topK?: number | null | undefined;
1174
+ /**
1175
+ * Controls which (if any) tool is called by the model.
1176
+ */
1177
+ toolChoice?: GetOnePromptToolChoice2 | GetOnePromptToolChoice1 | undefined;
1178
+ /**
1179
+ * Whether to enable parallel function calling during tool use.
1180
+ */
1181
+ parallelToolCalls?: boolean | undefined;
1182
+ /**
1183
+ * Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
1184
+ */
1185
+ modalities?: Array<GetOnePromptModalities> | null | undefined;
1186
+ /**
1187
+ * A list of guardrails to apply to the request.
1188
+ */
1189
+ guardrails?: Array<GetOnePromptGuardrails> | undefined;
1190
+ /**
1191
+ * Array of messages that make up the conversation. Each message has a role (system, user, assistant, or tool) and content.
1192
+ */
1193
+ messages?:
1194
+ | Array<
1195
+ | GetOnePromptMessagesSystemMessage
1196
+ | GetOnePromptMessagesUserMessage
1197
+ | GetOnePromptMessagesAssistantMessage
1198
+ | GetOnePromptMessagesToolMessage
1199
+ >
1200
+ | undefined;
1201
+ /**
1202
+ * Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`. For private models, use format: `{workspaceKey}@{provider}/{model}`.
1203
+ */
1204
+ model?: string | null | undefined;
1205
+ version?: string | undefined;
1206
+ };
1207
+
1208
+ export const GetOnePromptUseCases = {
1209
+ AgentsSimulations: "Agents simulations",
1210
+ Agents: "Agents",
1211
+ APIInteraction: "API interaction",
1212
+ AutonomousAgents: "Autonomous Agents",
1213
+ Chatbots: "Chatbots",
1214
+ Classification: "Classification",
1215
+ CodeUnderstanding: "Code understanding",
1216
+ CodeWriting: "Code writing",
1217
+ Conversation: "Conversation",
1218
+ DocumentsQA: "Documents QA",
1219
+ Evaluation: "Evaluation",
1220
+ Extraction: "Extraction",
1221
+ MultiModal: "Multi-modal",
1222
+ SelfChecking: "Self-checking",
1223
+ SentimentAnalysis: "Sentiment analysis",
1224
+ Sql: "SQL",
1225
+ Summarization: "Summarization",
1226
+ Tagging: "Tagging",
1227
+ TranslationDocument: "Translation (document)",
1228
+ TranslationSentences: "Translation (sentences)",
1229
+ } as const;
1230
+ export type GetOnePromptUseCases = ClosedEnum<typeof GetOnePromptUseCases>;
1231
+
1232
+ /**
1233
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1234
+ */
1235
+ export const GetOnePromptLanguage = {
1236
+ Chinese: "Chinese",
1237
+ Dutch: "Dutch",
1238
+ English: "English",
1239
+ French: "French",
1240
+ German: "German",
1241
+ Russian: "Russian",
1242
+ Spanish: "Spanish",
1243
+ } as const;
1244
+ /**
1245
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1246
+ */
1247
+ export type GetOnePromptLanguage = ClosedEnum<typeof GetOnePromptLanguage>;
1248
+
1249
+ export type GetOnePromptMetadata = {
1250
+ /**
1251
+ * 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
1252
+ */
1253
+ useCases?: Array<GetOnePromptUseCases> | undefined;
1254
+ /**
1255
+ * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
1256
+ */
1257
+ language?: GetOnePromptLanguage | null | undefined;
1258
+ };
1259
+
1260
+ /**
1261
+ * A prompt entity with configuration, metadata, and versioning.
1262
+ */
1263
+ export type GetOnePromptPrompt = {
1264
+ id: string;
1265
+ type: GetOnePromptType;
1266
+ owner: string;
1267
+ domainId: string;
1268
+ created: string;
1269
+ updated: string;
1270
+ createdById?: string | null | undefined;
1271
+ updatedById?: string | null | undefined;
1272
+ /**
1273
+ * The prompt’s name, meant to be displayable in the UI.
1274
+ */
1275
+ displayName: string;
1276
+ /**
1277
+ * 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
1278
+ */
1279
+ description?: string | null | undefined;
1280
+ /**
1281
+ * [DEPRECATED] Use the `prompt` property instead. A list of messages compatible with the openAI schema.
1282
+ *
1283
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
1284
+ */
1285
+ promptConfig?: GetOnePromptPromptConfig | undefined;
1286
+ /**
1287
+ * Prompt configuration with model and messages. Use this instead of prompt_config.
1288
+ */
1289
+ prompt: GetOnePromptPromptField;
1290
+ metadata?: GetOnePromptMetadata | undefined;
1291
+ };
1292
+
1293
+ /** @internal */
1294
+ export const GetOnePromptRequest$inboundSchema: z.ZodType<
1295
+ GetOnePromptRequest,
1296
+ z.ZodTypeDef,
1297
+ unknown
1298
+ > = z.object({
1299
+ id: z.string(),
1300
+ });
1301
+ /** @internal */
1302
+ export type GetOnePromptRequest$Outbound = {
1303
+ id: string;
1304
+ };
1305
+
1306
+ /** @internal */
1307
+ export const GetOnePromptRequest$outboundSchema: z.ZodType<
1308
+ GetOnePromptRequest$Outbound,
1309
+ z.ZodTypeDef,
1310
+ GetOnePromptRequest
1311
+ > = z.object({
1312
+ id: z.string(),
1313
+ });
1314
+
1315
+ export function getOnePromptRequestToJSON(
1316
+ getOnePromptRequest: GetOnePromptRequest,
1317
+ ): string {
1318
+ return JSON.stringify(
1319
+ GetOnePromptRequest$outboundSchema.parse(getOnePromptRequest),
1320
+ );
1321
+ }
1322
+ export function getOnePromptRequestFromJSON(
1323
+ jsonString: string,
1324
+ ): SafeParseResult<GetOnePromptRequest, SDKValidationError> {
1325
+ return safeParse(
1326
+ jsonString,
1327
+ (x) => GetOnePromptRequest$inboundSchema.parse(JSON.parse(x)),
1328
+ `Failed to parse 'GetOnePromptRequest' from JSON`,
1329
+ );
1330
+ }
1331
+
1332
+ /** @internal */
1333
+ export const GetOnePromptType$inboundSchema: z.ZodNativeEnum<
1334
+ typeof GetOnePromptType
1335
+ > = z.nativeEnum(GetOnePromptType);
1336
+ /** @internal */
1337
+ export const GetOnePromptType$outboundSchema: z.ZodNativeEnum<
1338
+ typeof GetOnePromptType
1339
+ > = GetOnePromptType$inboundSchema;
1340
+
1341
+ /** @internal */
1342
+ export const GetOnePromptModelType$inboundSchema: z.ZodNativeEnum<
1343
+ typeof GetOnePromptModelType
1344
+ > = z.nativeEnum(GetOnePromptModelType);
1345
+ /** @internal */
1346
+ export const GetOnePromptModelType$outboundSchema: z.ZodNativeEnum<
1347
+ typeof GetOnePromptModelType
1348
+ > = GetOnePromptModelType$inboundSchema;
1349
+
1350
+ /** @internal */
1351
+ export const GetOnePromptFormat$inboundSchema: z.ZodNativeEnum<
1352
+ typeof GetOnePromptFormat
1353
+ > = z.nativeEnum(GetOnePromptFormat);
1354
+ /** @internal */
1355
+ export const GetOnePromptFormat$outboundSchema: z.ZodNativeEnum<
1356
+ typeof GetOnePromptFormat
1357
+ > = GetOnePromptFormat$inboundSchema;
1358
+
1359
+ /** @internal */
1360
+ export const GetOnePromptResponseFormat6$inboundSchema: z.ZodNativeEnum<
1361
+ typeof GetOnePromptResponseFormat6
1362
+ > = z.nativeEnum(GetOnePromptResponseFormat6);
1363
+ /** @internal */
1364
+ export const GetOnePromptResponseFormat6$outboundSchema: z.ZodNativeEnum<
1365
+ typeof GetOnePromptResponseFormat6
1366
+ > = GetOnePromptResponseFormat6$inboundSchema;
1367
+
1368
+ /** @internal */
1369
+ export const GetOnePromptResponseFormat5$inboundSchema: z.ZodNativeEnum<
1370
+ typeof GetOnePromptResponseFormat5
1371
+ > = z.nativeEnum(GetOnePromptResponseFormat5);
1372
+ /** @internal */
1373
+ export const GetOnePromptResponseFormat5$outboundSchema: z.ZodNativeEnum<
1374
+ typeof GetOnePromptResponseFormat5
1375
+ > = GetOnePromptResponseFormat5$inboundSchema;
1376
+
1377
+ /** @internal */
1378
+ export const GetOnePromptResponseFormat4$inboundSchema: z.ZodNativeEnum<
1379
+ typeof GetOnePromptResponseFormat4
1380
+ > = z.nativeEnum(GetOnePromptResponseFormat4);
1381
+ /** @internal */
1382
+ export const GetOnePromptResponseFormat4$outboundSchema: z.ZodNativeEnum<
1383
+ typeof GetOnePromptResponseFormat4
1384
+ > = GetOnePromptResponseFormat4$inboundSchema;
1385
+
1386
+ /** @internal */
1387
+ export const GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema:
1388
+ z.ZodNativeEnum<
1389
+ typeof GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
1390
+ > = z.nativeEnum(
1391
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType,
1392
+ );
1393
+ /** @internal */
1394
+ export const GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$outboundSchema:
1395
+ z.ZodNativeEnum<
1396
+ typeof GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType
1397
+ > =
1398
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema;
1399
+
1400
+ /** @internal */
1401
+ export const GetOnePromptResponseFormat3$inboundSchema: z.ZodType<
1402
+ GetOnePromptResponseFormat3,
1403
+ z.ZodTypeDef,
1404
+ unknown
1405
+ > = z.object({
1406
+ type:
1407
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$inboundSchema,
1408
+ });
1409
+ /** @internal */
1410
+ export type GetOnePromptResponseFormat3$Outbound = {
1411
+ type: string;
1412
+ };
1413
+
1414
+ /** @internal */
1415
+ export const GetOnePromptResponseFormat3$outboundSchema: z.ZodType<
1416
+ GetOnePromptResponseFormat3$Outbound,
1417
+ z.ZodTypeDef,
1418
+ GetOnePromptResponseFormat3
1419
+ > = z.object({
1420
+ type:
1421
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONResponseBodyType$outboundSchema,
1422
+ });
1423
+
1424
+ export function getOnePromptResponseFormat3ToJSON(
1425
+ getOnePromptResponseFormat3: GetOnePromptResponseFormat3,
1426
+ ): string {
1427
+ return JSON.stringify(
710
1428
  GetOnePromptResponseFormat3$outboundSchema.parse(
711
1429
  getOnePromptResponseFormat3,
712
1430
  ),
713
1431
  );
714
1432
  }
715
- export function getOnePromptResponseFormat3FromJSON(
1433
+ export function getOnePromptResponseFormat3FromJSON(
1434
+ jsonString: string,
1435
+ ): SafeParseResult<GetOnePromptResponseFormat3, SDKValidationError> {
1436
+ return safeParse(
1437
+ jsonString,
1438
+ (x) => GetOnePromptResponseFormat3$inboundSchema.parse(JSON.parse(x)),
1439
+ `Failed to parse 'GetOnePromptResponseFormat3' from JSON`,
1440
+ );
1441
+ }
1442
+
1443
+ /** @internal */
1444
+ export const GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema:
1445
+ z.ZodNativeEnum<
1446
+ typeof GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType
1447
+ > = z.nativeEnum(
1448
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType,
1449
+ );
1450
+ /** @internal */
1451
+ export const GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType$outboundSchema:
1452
+ z.ZodNativeEnum<
1453
+ typeof GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType
1454
+ > =
1455
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema;
1456
+
1457
+ /** @internal */
1458
+ export const GetOnePromptResponseFormat2$inboundSchema: z.ZodType<
1459
+ GetOnePromptResponseFormat2,
1460
+ z.ZodTypeDef,
1461
+ unknown
1462
+ > = z.object({
1463
+ type:
1464
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType$inboundSchema,
1465
+ });
1466
+ /** @internal */
1467
+ export type GetOnePromptResponseFormat2$Outbound = {
1468
+ type: string;
1469
+ };
1470
+
1471
+ /** @internal */
1472
+ export const GetOnePromptResponseFormat2$outboundSchema: z.ZodType<
1473
+ GetOnePromptResponseFormat2$Outbound,
1474
+ z.ZodTypeDef,
1475
+ GetOnePromptResponseFormat2
1476
+ > = z.object({
1477
+ type:
1478
+ GetOnePromptResponseFormatPromptsResponse200ApplicationJSONType$outboundSchema,
1479
+ });
1480
+
1481
+ export function getOnePromptResponseFormat2ToJSON(
1482
+ getOnePromptResponseFormat2: GetOnePromptResponseFormat2,
1483
+ ): string {
1484
+ return JSON.stringify(
1485
+ GetOnePromptResponseFormat2$outboundSchema.parse(
1486
+ getOnePromptResponseFormat2,
1487
+ ),
1488
+ );
1489
+ }
1490
+ export function getOnePromptResponseFormat2FromJSON(
1491
+ jsonString: string,
1492
+ ): SafeParseResult<GetOnePromptResponseFormat2, SDKValidationError> {
1493
+ return safeParse(
1494
+ jsonString,
1495
+ (x) => GetOnePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
1496
+ `Failed to parse 'GetOnePromptResponseFormat2' from JSON`,
1497
+ );
1498
+ }
1499
+
1500
+ /** @internal */
1501
+ export const GetOnePromptResponseFormatPromptsResponse200Type$inboundSchema:
1502
+ z.ZodNativeEnum<typeof GetOnePromptResponseFormatPromptsResponse200Type> = z
1503
+ .nativeEnum(GetOnePromptResponseFormatPromptsResponse200Type);
1504
+ /** @internal */
1505
+ export const GetOnePromptResponseFormatPromptsResponse200Type$outboundSchema:
1506
+ z.ZodNativeEnum<typeof GetOnePromptResponseFormatPromptsResponse200Type> =
1507
+ GetOnePromptResponseFormatPromptsResponse200Type$inboundSchema;
1508
+
1509
+ /** @internal */
1510
+ export const GetOnePromptResponseFormatPromptsResponseJsonSchema$inboundSchema:
1511
+ z.ZodType<
1512
+ GetOnePromptResponseFormatPromptsResponseJsonSchema,
1513
+ z.ZodTypeDef,
1514
+ unknown
1515
+ > = z.object({
1516
+ name: z.string(),
1517
+ description: z.string().optional(),
1518
+ strict: z.boolean().optional(),
1519
+ schema: z.record(z.any()),
1520
+ });
1521
+ /** @internal */
1522
+ export type GetOnePromptResponseFormatPromptsResponseJsonSchema$Outbound = {
1523
+ name: string;
1524
+ description?: string | undefined;
1525
+ strict?: boolean | undefined;
1526
+ schema: { [k: string]: any };
1527
+ };
1528
+
1529
+ /** @internal */
1530
+ export const GetOnePromptResponseFormatPromptsResponseJsonSchema$outboundSchema:
1531
+ z.ZodType<
1532
+ GetOnePromptResponseFormatPromptsResponseJsonSchema$Outbound,
1533
+ z.ZodTypeDef,
1534
+ GetOnePromptResponseFormatPromptsResponseJsonSchema
1535
+ > = z.object({
1536
+ name: z.string(),
1537
+ description: z.string().optional(),
1538
+ strict: z.boolean().optional(),
1539
+ schema: z.record(z.any()),
1540
+ });
1541
+
1542
+ export function getOnePromptResponseFormatPromptsResponseJsonSchemaToJSON(
1543
+ getOnePromptResponseFormatPromptsResponseJsonSchema:
1544
+ GetOnePromptResponseFormatPromptsResponseJsonSchema,
1545
+ ): string {
1546
+ return JSON.stringify(
1547
+ GetOnePromptResponseFormatPromptsResponseJsonSchema$outboundSchema.parse(
1548
+ getOnePromptResponseFormatPromptsResponseJsonSchema,
1549
+ ),
1550
+ );
1551
+ }
1552
+ export function getOnePromptResponseFormatPromptsResponseJsonSchemaFromJSON(
1553
+ jsonString: string,
1554
+ ): SafeParseResult<
1555
+ GetOnePromptResponseFormatPromptsResponseJsonSchema,
1556
+ SDKValidationError
1557
+ > {
1558
+ return safeParse(
1559
+ jsonString,
1560
+ (x) =>
1561
+ GetOnePromptResponseFormatPromptsResponseJsonSchema$inboundSchema.parse(
1562
+ JSON.parse(x),
1563
+ ),
1564
+ `Failed to parse 'GetOnePromptResponseFormatPromptsResponseJsonSchema' from JSON`,
1565
+ );
1566
+ }
1567
+
1568
+ /** @internal */
1569
+ export const GetOnePromptResponseFormat1$inboundSchema: z.ZodType<
1570
+ GetOnePromptResponseFormat1,
1571
+ z.ZodTypeDef,
1572
+ unknown
1573
+ > = z.object({
1574
+ type: GetOnePromptResponseFormatPromptsResponse200Type$inboundSchema,
1575
+ display_name: z.string().optional(),
1576
+ json_schema: z.lazy(() =>
1577
+ GetOnePromptResponseFormatPromptsResponseJsonSchema$inboundSchema
1578
+ ),
1579
+ }).transform((v) => {
1580
+ return remap$(v, {
1581
+ "display_name": "displayName",
1582
+ "json_schema": "jsonSchema",
1583
+ });
1584
+ });
1585
+ /** @internal */
1586
+ export type GetOnePromptResponseFormat1$Outbound = {
1587
+ type: string;
1588
+ display_name?: string | undefined;
1589
+ json_schema: GetOnePromptResponseFormatPromptsResponseJsonSchema$Outbound;
1590
+ };
1591
+
1592
+ /** @internal */
1593
+ export const GetOnePromptResponseFormat1$outboundSchema: z.ZodType<
1594
+ GetOnePromptResponseFormat1$Outbound,
1595
+ z.ZodTypeDef,
1596
+ GetOnePromptResponseFormat1
1597
+ > = z.object({
1598
+ type: GetOnePromptResponseFormatPromptsResponse200Type$outboundSchema,
1599
+ displayName: z.string().optional(),
1600
+ jsonSchema: z.lazy(() =>
1601
+ GetOnePromptResponseFormatPromptsResponseJsonSchema$outboundSchema
1602
+ ),
1603
+ }).transform((v) => {
1604
+ return remap$(v, {
1605
+ displayName: "display_name",
1606
+ jsonSchema: "json_schema",
1607
+ });
1608
+ });
1609
+
1610
+ export function getOnePromptResponseFormat1ToJSON(
1611
+ getOnePromptResponseFormat1: GetOnePromptResponseFormat1,
1612
+ ): string {
1613
+ return JSON.stringify(
1614
+ GetOnePromptResponseFormat1$outboundSchema.parse(
1615
+ getOnePromptResponseFormat1,
1616
+ ),
1617
+ );
1618
+ }
1619
+ export function getOnePromptResponseFormat1FromJSON(
1620
+ jsonString: string,
1621
+ ): SafeParseResult<GetOnePromptResponseFormat1, SDKValidationError> {
1622
+ return safeParse(
1623
+ jsonString,
1624
+ (x) => GetOnePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1625
+ `Failed to parse 'GetOnePromptResponseFormat1' from JSON`,
1626
+ );
1627
+ }
1628
+
1629
+ /** @internal */
1630
+ export const GetOnePromptPromptsResponseFormat$inboundSchema: z.ZodType<
1631
+ GetOnePromptPromptsResponseFormat,
1632
+ z.ZodTypeDef,
1633
+ unknown
1634
+ > = z.union([
1635
+ z.lazy(() => GetOnePromptResponseFormat1$inboundSchema),
1636
+ z.lazy(() => GetOnePromptResponseFormat2$inboundSchema),
1637
+ z.lazy(() => GetOnePromptResponseFormat3$inboundSchema),
1638
+ GetOnePromptResponseFormat4$inboundSchema,
1639
+ GetOnePromptResponseFormat5$inboundSchema,
1640
+ GetOnePromptResponseFormat6$inboundSchema,
1641
+ ]);
1642
+ /** @internal */
1643
+ export type GetOnePromptPromptsResponseFormat$Outbound =
1644
+ | GetOnePromptResponseFormat1$Outbound
1645
+ | GetOnePromptResponseFormat2$Outbound
1646
+ | GetOnePromptResponseFormat3$Outbound
1647
+ | string
1648
+ | string
1649
+ | string;
1650
+
1651
+ /** @internal */
1652
+ export const GetOnePromptPromptsResponseFormat$outboundSchema: z.ZodType<
1653
+ GetOnePromptPromptsResponseFormat$Outbound,
1654
+ z.ZodTypeDef,
1655
+ GetOnePromptPromptsResponseFormat
1656
+ > = z.union([
1657
+ z.lazy(() => GetOnePromptResponseFormat1$outboundSchema),
1658
+ z.lazy(() => GetOnePromptResponseFormat2$outboundSchema),
1659
+ z.lazy(() => GetOnePromptResponseFormat3$outboundSchema),
1660
+ GetOnePromptResponseFormat4$outboundSchema,
1661
+ GetOnePromptResponseFormat5$outboundSchema,
1662
+ GetOnePromptResponseFormat6$outboundSchema,
1663
+ ]);
1664
+
1665
+ export function getOnePromptPromptsResponseFormatToJSON(
1666
+ getOnePromptPromptsResponseFormat: GetOnePromptPromptsResponseFormat,
1667
+ ): string {
1668
+ return JSON.stringify(
1669
+ GetOnePromptPromptsResponseFormat$outboundSchema.parse(
1670
+ getOnePromptPromptsResponseFormat,
1671
+ ),
1672
+ );
1673
+ }
1674
+ export function getOnePromptPromptsResponseFormatFromJSON(
1675
+ jsonString: string,
1676
+ ): SafeParseResult<GetOnePromptPromptsResponseFormat, SDKValidationError> {
1677
+ return safeParse(
1678
+ jsonString,
1679
+ (x) => GetOnePromptPromptsResponseFormat$inboundSchema.parse(JSON.parse(x)),
1680
+ `Failed to parse 'GetOnePromptPromptsResponseFormat' from JSON`,
1681
+ );
1682
+ }
1683
+
1684
+ /** @internal */
1685
+ export const GetOnePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1686
+ typeof GetOnePromptPhotoRealVersion
1687
+ > = z.nativeEnum(GetOnePromptPhotoRealVersion);
1688
+ /** @internal */
1689
+ export const GetOnePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
1690
+ typeof GetOnePromptPhotoRealVersion
1691
+ > = GetOnePromptPhotoRealVersion$inboundSchema;
1692
+
1693
+ /** @internal */
1694
+ export const GetOnePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
1695
+ typeof GetOnePromptEncodingFormat
1696
+ > = z.nativeEnum(GetOnePromptEncodingFormat);
1697
+ /** @internal */
1698
+ export const GetOnePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
1699
+ typeof GetOnePromptEncodingFormat
1700
+ > = GetOnePromptEncodingFormat$inboundSchema;
1701
+
1702
+ /** @internal */
1703
+ export const GetOnePromptPromptsReasoningEffort$inboundSchema: z.ZodNativeEnum<
1704
+ typeof GetOnePromptPromptsReasoningEffort
1705
+ > = z.nativeEnum(GetOnePromptPromptsReasoningEffort);
1706
+ /** @internal */
1707
+ export const GetOnePromptPromptsReasoningEffort$outboundSchema: z.ZodNativeEnum<
1708
+ typeof GetOnePromptPromptsReasoningEffort
1709
+ > = GetOnePromptPromptsReasoningEffort$inboundSchema;
1710
+
1711
+ /** @internal */
1712
+ export const GetOnePromptVerbosity$inboundSchema: z.ZodNativeEnum<
1713
+ typeof GetOnePromptVerbosity
1714
+ > = z.nativeEnum(GetOnePromptVerbosity);
1715
+ /** @internal */
1716
+ export const GetOnePromptVerbosity$outboundSchema: z.ZodNativeEnum<
1717
+ typeof GetOnePromptVerbosity
1718
+ > = GetOnePromptVerbosity$inboundSchema;
1719
+
1720
+ /** @internal */
1721
+ export const GetOnePromptThinkingLevel$inboundSchema: z.ZodNativeEnum<
1722
+ typeof GetOnePromptThinkingLevel
1723
+ > = z.nativeEnum(GetOnePromptThinkingLevel);
1724
+ /** @internal */
1725
+ export const GetOnePromptThinkingLevel$outboundSchema: z.ZodNativeEnum<
1726
+ typeof GetOnePromptThinkingLevel
1727
+ > = GetOnePromptThinkingLevel$inboundSchema;
1728
+
1729
+ /** @internal */
1730
+ export const GetOnePromptModelParameters$inboundSchema: z.ZodType<
1731
+ GetOnePromptModelParameters,
1732
+ z.ZodTypeDef,
1733
+ unknown
1734
+ > = z.object({
1735
+ temperature: z.number().optional(),
1736
+ maxTokens: z.number().optional(),
1737
+ topK: z.number().optional(),
1738
+ topP: z.number().optional(),
1739
+ frequencyPenalty: z.number().optional(),
1740
+ presencePenalty: z.number().optional(),
1741
+ numImages: z.number().optional(),
1742
+ seed: z.number().optional(),
1743
+ format: GetOnePromptFormat$inboundSchema.optional(),
1744
+ dimensions: z.string().optional(),
1745
+ quality: z.string().optional(),
1746
+ style: z.string().optional(),
1747
+ responseFormat: z.nullable(
1748
+ z.union([
1749
+ z.lazy(() => GetOnePromptResponseFormat1$inboundSchema),
1750
+ z.lazy(() => GetOnePromptResponseFormat2$inboundSchema),
1751
+ z.lazy(() => GetOnePromptResponseFormat3$inboundSchema),
1752
+ GetOnePromptResponseFormat4$inboundSchema,
1753
+ GetOnePromptResponseFormat5$inboundSchema,
1754
+ GetOnePromptResponseFormat6$inboundSchema,
1755
+ ]),
1756
+ ).optional(),
1757
+ photoRealVersion: GetOnePromptPhotoRealVersion$inboundSchema.optional(),
1758
+ encoding_format: GetOnePromptEncodingFormat$inboundSchema.optional(),
1759
+ reasoningEffort: GetOnePromptPromptsReasoningEffort$inboundSchema.optional(),
1760
+ budgetTokens: z.number().optional(),
1761
+ verbosity: GetOnePromptVerbosity$inboundSchema.optional(),
1762
+ thinkingLevel: GetOnePromptThinkingLevel$inboundSchema.optional(),
1763
+ }).transform((v) => {
1764
+ return remap$(v, {
1765
+ "encoding_format": "encodingFormat",
1766
+ });
1767
+ });
1768
+ /** @internal */
1769
+ export type GetOnePromptModelParameters$Outbound = {
1770
+ temperature?: number | undefined;
1771
+ maxTokens?: number | undefined;
1772
+ topK?: number | undefined;
1773
+ topP?: number | undefined;
1774
+ frequencyPenalty?: number | undefined;
1775
+ presencePenalty?: number | undefined;
1776
+ numImages?: number | undefined;
1777
+ seed?: number | undefined;
1778
+ format?: string | undefined;
1779
+ dimensions?: string | undefined;
1780
+ quality?: string | undefined;
1781
+ style?: string | undefined;
1782
+ responseFormat?:
1783
+ | GetOnePromptResponseFormat1$Outbound
1784
+ | GetOnePromptResponseFormat2$Outbound
1785
+ | GetOnePromptResponseFormat3$Outbound
1786
+ | string
1787
+ | string
1788
+ | string
1789
+ | null
1790
+ | undefined;
1791
+ photoRealVersion?: string | undefined;
1792
+ encoding_format?: string | undefined;
1793
+ reasoningEffort?: string | undefined;
1794
+ budgetTokens?: number | undefined;
1795
+ verbosity?: string | undefined;
1796
+ thinkingLevel?: string | undefined;
1797
+ };
1798
+
1799
+ /** @internal */
1800
+ export const GetOnePromptModelParameters$outboundSchema: z.ZodType<
1801
+ GetOnePromptModelParameters$Outbound,
1802
+ z.ZodTypeDef,
1803
+ GetOnePromptModelParameters
1804
+ > = z.object({
1805
+ temperature: z.number().optional(),
1806
+ maxTokens: z.number().optional(),
1807
+ topK: z.number().optional(),
1808
+ topP: z.number().optional(),
1809
+ frequencyPenalty: z.number().optional(),
1810
+ presencePenalty: z.number().optional(),
1811
+ numImages: z.number().optional(),
1812
+ seed: z.number().optional(),
1813
+ format: GetOnePromptFormat$outboundSchema.optional(),
1814
+ dimensions: z.string().optional(),
1815
+ quality: z.string().optional(),
1816
+ style: z.string().optional(),
1817
+ responseFormat: z.nullable(
1818
+ z.union([
1819
+ z.lazy(() => GetOnePromptResponseFormat1$outboundSchema),
1820
+ z.lazy(() => GetOnePromptResponseFormat2$outboundSchema),
1821
+ z.lazy(() => GetOnePromptResponseFormat3$outboundSchema),
1822
+ GetOnePromptResponseFormat4$outboundSchema,
1823
+ GetOnePromptResponseFormat5$outboundSchema,
1824
+ GetOnePromptResponseFormat6$outboundSchema,
1825
+ ]),
1826
+ ).optional(),
1827
+ photoRealVersion: GetOnePromptPhotoRealVersion$outboundSchema.optional(),
1828
+ encodingFormat: GetOnePromptEncodingFormat$outboundSchema.optional(),
1829
+ reasoningEffort: GetOnePromptPromptsReasoningEffort$outboundSchema.optional(),
1830
+ budgetTokens: z.number().optional(),
1831
+ verbosity: GetOnePromptVerbosity$outboundSchema.optional(),
1832
+ thinkingLevel: GetOnePromptThinkingLevel$outboundSchema.optional(),
1833
+ }).transform((v) => {
1834
+ return remap$(v, {
1835
+ encodingFormat: "encoding_format",
1836
+ });
1837
+ });
1838
+
1839
+ export function getOnePromptModelParametersToJSON(
1840
+ getOnePromptModelParameters: GetOnePromptModelParameters,
1841
+ ): string {
1842
+ return JSON.stringify(
1843
+ GetOnePromptModelParameters$outboundSchema.parse(
1844
+ getOnePromptModelParameters,
1845
+ ),
1846
+ );
1847
+ }
1848
+ export function getOnePromptModelParametersFromJSON(
1849
+ jsonString: string,
1850
+ ): SafeParseResult<GetOnePromptModelParameters, SDKValidationError> {
1851
+ return safeParse(
1852
+ jsonString,
1853
+ (x) => GetOnePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
1854
+ `Failed to parse 'GetOnePromptModelParameters' from JSON`,
1855
+ );
1856
+ }
1857
+
1858
+ /** @internal */
1859
+ export const GetOnePromptProvider$inboundSchema: z.ZodNativeEnum<
1860
+ typeof GetOnePromptProvider
1861
+ > = z.nativeEnum(GetOnePromptProvider);
1862
+ /** @internal */
1863
+ export const GetOnePromptProvider$outboundSchema: z.ZodNativeEnum<
1864
+ typeof GetOnePromptProvider
1865
+ > = GetOnePromptProvider$inboundSchema;
1866
+
1867
+ /** @internal */
1868
+ export const GetOnePromptRole$inboundSchema: z.ZodNativeEnum<
1869
+ typeof GetOnePromptRole
1870
+ > = z.nativeEnum(GetOnePromptRole);
1871
+ /** @internal */
1872
+ export const GetOnePromptRole$outboundSchema: z.ZodNativeEnum<
1873
+ typeof GetOnePromptRole
1874
+ > = GetOnePromptRole$inboundSchema;
1875
+
1876
+ /** @internal */
1877
+ export const GetOnePrompt2File$inboundSchema: z.ZodType<
1878
+ GetOnePrompt2File,
1879
+ z.ZodTypeDef,
1880
+ unknown
1881
+ > = z.object({
1882
+ file_data: z.string().optional(),
1883
+ uri: z.string().optional(),
1884
+ mimeType: z.string().optional(),
1885
+ filename: z.string().optional(),
1886
+ }).transform((v) => {
1887
+ return remap$(v, {
1888
+ "file_data": "fileData",
1889
+ });
1890
+ });
1891
+ /** @internal */
1892
+ export type GetOnePrompt2File$Outbound = {
1893
+ file_data?: string | undefined;
1894
+ uri?: string | undefined;
1895
+ mimeType?: string | undefined;
1896
+ filename?: string | undefined;
1897
+ };
1898
+
1899
+ /** @internal */
1900
+ export const GetOnePrompt2File$outboundSchema: z.ZodType<
1901
+ GetOnePrompt2File$Outbound,
1902
+ z.ZodTypeDef,
1903
+ GetOnePrompt2File
1904
+ > = z.object({
1905
+ fileData: z.string().optional(),
1906
+ uri: z.string().optional(),
1907
+ mimeType: z.string().optional(),
1908
+ filename: z.string().optional(),
1909
+ }).transform((v) => {
1910
+ return remap$(v, {
1911
+ fileData: "file_data",
1912
+ });
1913
+ });
1914
+
1915
+ export function getOnePrompt2FileToJSON(
1916
+ getOnePrompt2File: GetOnePrompt2File,
1917
+ ): string {
1918
+ return JSON.stringify(
1919
+ GetOnePrompt2File$outboundSchema.parse(getOnePrompt2File),
1920
+ );
1921
+ }
1922
+ export function getOnePrompt2FileFromJSON(
1923
+ jsonString: string,
1924
+ ): SafeParseResult<GetOnePrompt2File, SDKValidationError> {
1925
+ return safeParse(
1926
+ jsonString,
1927
+ (x) => GetOnePrompt2File$inboundSchema.parse(JSON.parse(x)),
1928
+ `Failed to parse 'GetOnePrompt2File' from JSON`,
1929
+ );
1930
+ }
1931
+
1932
+ /** @internal */
1933
+ export const GetOnePrompt23$inboundSchema: z.ZodType<
1934
+ GetOnePrompt23,
1935
+ z.ZodTypeDef,
1936
+ unknown
1937
+ > = z.object({
1938
+ type: z.literal("file"),
1939
+ file: z.lazy(() => GetOnePrompt2File$inboundSchema),
1940
+ });
1941
+ /** @internal */
1942
+ export type GetOnePrompt23$Outbound = {
1943
+ type: "file";
1944
+ file: GetOnePrompt2File$Outbound;
1945
+ };
1946
+
1947
+ /** @internal */
1948
+ export const GetOnePrompt23$outboundSchema: z.ZodType<
1949
+ GetOnePrompt23$Outbound,
1950
+ z.ZodTypeDef,
1951
+ GetOnePrompt23
1952
+ > = z.object({
1953
+ type: z.literal("file"),
1954
+ file: z.lazy(() => GetOnePrompt2File$outboundSchema),
1955
+ });
1956
+
1957
+ export function getOnePrompt23ToJSON(getOnePrompt23: GetOnePrompt23): string {
1958
+ return JSON.stringify(GetOnePrompt23$outboundSchema.parse(getOnePrompt23));
1959
+ }
1960
+ export function getOnePrompt23FromJSON(
1961
+ jsonString: string,
1962
+ ): SafeParseResult<GetOnePrompt23, SDKValidationError> {
1963
+ return safeParse(
1964
+ jsonString,
1965
+ (x) => GetOnePrompt23$inboundSchema.parse(JSON.parse(x)),
1966
+ `Failed to parse 'GetOnePrompt23' from JSON`,
1967
+ );
1968
+ }
1969
+
1970
+ /** @internal */
1971
+ export const GetOnePrompt2ImageUrl$inboundSchema: z.ZodType<
1972
+ GetOnePrompt2ImageUrl,
1973
+ z.ZodTypeDef,
1974
+ unknown
1975
+ > = z.object({
1976
+ id: z.string().optional(),
1977
+ url: z.string(),
1978
+ detail: z.string().optional(),
1979
+ });
1980
+ /** @internal */
1981
+ export type GetOnePrompt2ImageUrl$Outbound = {
1982
+ id?: string | undefined;
1983
+ url: string;
1984
+ detail?: string | undefined;
1985
+ };
1986
+
1987
+ /** @internal */
1988
+ export const GetOnePrompt2ImageUrl$outboundSchema: z.ZodType<
1989
+ GetOnePrompt2ImageUrl$Outbound,
1990
+ z.ZodTypeDef,
1991
+ GetOnePrompt2ImageUrl
1992
+ > = z.object({
1993
+ id: z.string().optional(),
1994
+ url: z.string(),
1995
+ detail: z.string().optional(),
1996
+ });
1997
+
1998
+ export function getOnePrompt2ImageUrlToJSON(
1999
+ getOnePrompt2ImageUrl: GetOnePrompt2ImageUrl,
2000
+ ): string {
2001
+ return JSON.stringify(
2002
+ GetOnePrompt2ImageUrl$outboundSchema.parse(getOnePrompt2ImageUrl),
2003
+ );
2004
+ }
2005
+ export function getOnePrompt2ImageUrlFromJSON(
2006
+ jsonString: string,
2007
+ ): SafeParseResult<GetOnePrompt2ImageUrl, SDKValidationError> {
2008
+ return safeParse(
2009
+ jsonString,
2010
+ (x) => GetOnePrompt2ImageUrl$inboundSchema.parse(JSON.parse(x)),
2011
+ `Failed to parse 'GetOnePrompt2ImageUrl' from JSON`,
2012
+ );
2013
+ }
2014
+
2015
+ /** @internal */
2016
+ export const GetOnePrompt22$inboundSchema: z.ZodType<
2017
+ GetOnePrompt22,
2018
+ z.ZodTypeDef,
2019
+ unknown
2020
+ > = z.object({
2021
+ type: z.literal("image_url"),
2022
+ image_url: z.lazy(() => GetOnePrompt2ImageUrl$inboundSchema),
2023
+ }).transform((v) => {
2024
+ return remap$(v, {
2025
+ "image_url": "imageUrl",
2026
+ });
2027
+ });
2028
+ /** @internal */
2029
+ export type GetOnePrompt22$Outbound = {
2030
+ type: "image_url";
2031
+ image_url: GetOnePrompt2ImageUrl$Outbound;
2032
+ };
2033
+
2034
+ /** @internal */
2035
+ export const GetOnePrompt22$outboundSchema: z.ZodType<
2036
+ GetOnePrompt22$Outbound,
2037
+ z.ZodTypeDef,
2038
+ GetOnePrompt22
2039
+ > = z.object({
2040
+ type: z.literal("image_url"),
2041
+ imageUrl: z.lazy(() => GetOnePrompt2ImageUrl$outboundSchema),
2042
+ }).transform((v) => {
2043
+ return remap$(v, {
2044
+ imageUrl: "image_url",
2045
+ });
2046
+ });
2047
+
2048
+ export function getOnePrompt22ToJSON(getOnePrompt22: GetOnePrompt22): string {
2049
+ return JSON.stringify(GetOnePrompt22$outboundSchema.parse(getOnePrompt22));
2050
+ }
2051
+ export function getOnePrompt22FromJSON(
2052
+ jsonString: string,
2053
+ ): SafeParseResult<GetOnePrompt22, SDKValidationError> {
2054
+ return safeParse(
2055
+ jsonString,
2056
+ (x) => GetOnePrompt22$inboundSchema.parse(JSON.parse(x)),
2057
+ `Failed to parse 'GetOnePrompt22' from JSON`,
2058
+ );
2059
+ }
2060
+
2061
+ /** @internal */
2062
+ export const GetOnePrompt21$inboundSchema: z.ZodType<
2063
+ GetOnePrompt21,
2064
+ z.ZodTypeDef,
2065
+ unknown
2066
+ > = z.object({
2067
+ type: z.literal("text"),
2068
+ text: z.string(),
2069
+ });
2070
+ /** @internal */
2071
+ export type GetOnePrompt21$Outbound = {
2072
+ type: "text";
2073
+ text: string;
2074
+ };
2075
+
2076
+ /** @internal */
2077
+ export const GetOnePrompt21$outboundSchema: z.ZodType<
2078
+ GetOnePrompt21$Outbound,
2079
+ z.ZodTypeDef,
2080
+ GetOnePrompt21
2081
+ > = z.object({
2082
+ type: z.literal("text"),
2083
+ text: z.string(),
2084
+ });
2085
+
2086
+ export function getOnePrompt21ToJSON(getOnePrompt21: GetOnePrompt21): string {
2087
+ return JSON.stringify(GetOnePrompt21$outboundSchema.parse(getOnePrompt21));
2088
+ }
2089
+ export function getOnePrompt21FromJSON(
2090
+ jsonString: string,
2091
+ ): SafeParseResult<GetOnePrompt21, SDKValidationError> {
2092
+ return safeParse(
2093
+ jsonString,
2094
+ (x) => GetOnePrompt21$inboundSchema.parse(JSON.parse(x)),
2095
+ `Failed to parse 'GetOnePrompt21' from JSON`,
2096
+ );
2097
+ }
2098
+
2099
+ /** @internal */
2100
+ export const GetOnePromptContent2$inboundSchema: z.ZodType<
2101
+ GetOnePromptContent2,
2102
+ z.ZodTypeDef,
2103
+ unknown
2104
+ > = z.union([
2105
+ z.lazy(() => GetOnePrompt21$inboundSchema),
2106
+ z.lazy(() => GetOnePrompt22$inboundSchema),
2107
+ z.lazy(() => GetOnePrompt23$inboundSchema),
2108
+ ]);
2109
+ /** @internal */
2110
+ export type GetOnePromptContent2$Outbound =
2111
+ | GetOnePrompt21$Outbound
2112
+ | GetOnePrompt22$Outbound
2113
+ | GetOnePrompt23$Outbound;
2114
+
2115
+ /** @internal */
2116
+ export const GetOnePromptContent2$outboundSchema: z.ZodType<
2117
+ GetOnePromptContent2$Outbound,
2118
+ z.ZodTypeDef,
2119
+ GetOnePromptContent2
2120
+ > = z.union([
2121
+ z.lazy(() => GetOnePrompt21$outboundSchema),
2122
+ z.lazy(() => GetOnePrompt22$outboundSchema),
2123
+ z.lazy(() => GetOnePrompt23$outboundSchema),
2124
+ ]);
2125
+
2126
+ export function getOnePromptContent2ToJSON(
2127
+ getOnePromptContent2: GetOnePromptContent2,
2128
+ ): string {
2129
+ return JSON.stringify(
2130
+ GetOnePromptContent2$outboundSchema.parse(getOnePromptContent2),
2131
+ );
2132
+ }
2133
+ export function getOnePromptContent2FromJSON(
2134
+ jsonString: string,
2135
+ ): SafeParseResult<GetOnePromptContent2, SDKValidationError> {
2136
+ return safeParse(
2137
+ jsonString,
2138
+ (x) => GetOnePromptContent2$inboundSchema.parse(JSON.parse(x)),
2139
+ `Failed to parse 'GetOnePromptContent2' from JSON`,
2140
+ );
2141
+ }
2142
+
2143
+ /** @internal */
2144
+ export const GetOnePromptContent$inboundSchema: z.ZodType<
2145
+ GetOnePromptContent,
2146
+ z.ZodTypeDef,
2147
+ unknown
2148
+ > = z.union([
2149
+ z.string(),
2150
+ z.array(z.union([
2151
+ z.lazy(() => GetOnePrompt21$inboundSchema),
2152
+ z.lazy(() => GetOnePrompt22$inboundSchema),
2153
+ z.lazy(() => GetOnePrompt23$inboundSchema),
2154
+ ])),
2155
+ ]);
2156
+ /** @internal */
2157
+ export type GetOnePromptContent$Outbound =
2158
+ | string
2159
+ | Array<
2160
+ GetOnePrompt21$Outbound | GetOnePrompt22$Outbound | GetOnePrompt23$Outbound
2161
+ >;
2162
+
2163
+ /** @internal */
2164
+ export const GetOnePromptContent$outboundSchema: z.ZodType<
2165
+ GetOnePromptContent$Outbound,
2166
+ z.ZodTypeDef,
2167
+ GetOnePromptContent
2168
+ > = z.union([
2169
+ z.string(),
2170
+ z.array(z.union([
2171
+ z.lazy(() => GetOnePrompt21$outboundSchema),
2172
+ z.lazy(() => GetOnePrompt22$outboundSchema),
2173
+ z.lazy(() => GetOnePrompt23$outboundSchema),
2174
+ ])),
2175
+ ]);
2176
+
2177
+ export function getOnePromptContentToJSON(
2178
+ getOnePromptContent: GetOnePromptContent,
2179
+ ): string {
2180
+ return JSON.stringify(
2181
+ GetOnePromptContent$outboundSchema.parse(getOnePromptContent),
2182
+ );
2183
+ }
2184
+ export function getOnePromptContentFromJSON(
2185
+ jsonString: string,
2186
+ ): SafeParseResult<GetOnePromptContent, SDKValidationError> {
2187
+ return safeParse(
2188
+ jsonString,
2189
+ (x) => GetOnePromptContent$inboundSchema.parse(JSON.parse(x)),
2190
+ `Failed to parse 'GetOnePromptContent' from JSON`,
2191
+ );
2192
+ }
2193
+
2194
+ /** @internal */
2195
+ export const GetOnePromptPromptsType$inboundSchema: z.ZodNativeEnum<
2196
+ typeof GetOnePromptPromptsType
2197
+ > = z.nativeEnum(GetOnePromptPromptsType);
2198
+ /** @internal */
2199
+ export const GetOnePromptPromptsType$outboundSchema: z.ZodNativeEnum<
2200
+ typeof GetOnePromptPromptsType
2201
+ > = GetOnePromptPromptsType$inboundSchema;
2202
+
2203
+ /** @internal */
2204
+ export const GetOnePromptFunction$inboundSchema: z.ZodType<
2205
+ GetOnePromptFunction,
2206
+ z.ZodTypeDef,
2207
+ unknown
2208
+ > = z.object({
2209
+ name: z.string(),
2210
+ arguments: z.string(),
2211
+ });
2212
+ /** @internal */
2213
+ export type GetOnePromptFunction$Outbound = {
2214
+ name: string;
2215
+ arguments: string;
2216
+ };
2217
+
2218
+ /** @internal */
2219
+ export const GetOnePromptFunction$outboundSchema: z.ZodType<
2220
+ GetOnePromptFunction$Outbound,
2221
+ z.ZodTypeDef,
2222
+ GetOnePromptFunction
2223
+ > = z.object({
2224
+ name: z.string(),
2225
+ arguments: z.string(),
2226
+ });
2227
+
2228
+ export function getOnePromptFunctionToJSON(
2229
+ getOnePromptFunction: GetOnePromptFunction,
2230
+ ): string {
2231
+ return JSON.stringify(
2232
+ GetOnePromptFunction$outboundSchema.parse(getOnePromptFunction),
2233
+ );
2234
+ }
2235
+ export function getOnePromptFunctionFromJSON(
2236
+ jsonString: string,
2237
+ ): SafeParseResult<GetOnePromptFunction, SDKValidationError> {
2238
+ return safeParse(
2239
+ jsonString,
2240
+ (x) => GetOnePromptFunction$inboundSchema.parse(JSON.parse(x)),
2241
+ `Failed to parse 'GetOnePromptFunction' from JSON`,
2242
+ );
2243
+ }
2244
+
2245
+ /** @internal */
2246
+ export const GetOnePromptToolCalls$inboundSchema: z.ZodType<
2247
+ GetOnePromptToolCalls,
2248
+ z.ZodTypeDef,
2249
+ unknown
2250
+ > = z.object({
2251
+ id: z.string().optional(),
2252
+ index: z.number().optional(),
2253
+ type: GetOnePromptPromptsType$inboundSchema,
2254
+ function: z.lazy(() => GetOnePromptFunction$inboundSchema),
2255
+ });
2256
+ /** @internal */
2257
+ export type GetOnePromptToolCalls$Outbound = {
2258
+ id?: string | undefined;
2259
+ index?: number | undefined;
2260
+ type: string;
2261
+ function: GetOnePromptFunction$Outbound;
2262
+ };
2263
+
2264
+ /** @internal */
2265
+ export const GetOnePromptToolCalls$outboundSchema: z.ZodType<
2266
+ GetOnePromptToolCalls$Outbound,
2267
+ z.ZodTypeDef,
2268
+ GetOnePromptToolCalls
2269
+ > = z.object({
2270
+ id: z.string().optional(),
2271
+ index: z.number().optional(),
2272
+ type: GetOnePromptPromptsType$outboundSchema,
2273
+ function: z.lazy(() => GetOnePromptFunction$outboundSchema),
2274
+ });
2275
+
2276
+ export function getOnePromptToolCallsToJSON(
2277
+ getOnePromptToolCalls: GetOnePromptToolCalls,
2278
+ ): string {
2279
+ return JSON.stringify(
2280
+ GetOnePromptToolCalls$outboundSchema.parse(getOnePromptToolCalls),
2281
+ );
2282
+ }
2283
+ export function getOnePromptToolCallsFromJSON(
2284
+ jsonString: string,
2285
+ ): SafeParseResult<GetOnePromptToolCalls, SDKValidationError> {
2286
+ return safeParse(
2287
+ jsonString,
2288
+ (x) => GetOnePromptToolCalls$inboundSchema.parse(JSON.parse(x)),
2289
+ `Failed to parse 'GetOnePromptToolCalls' from JSON`,
2290
+ );
2291
+ }
2292
+
2293
+ /** @internal */
2294
+ export const GetOnePromptMessages$inboundSchema: z.ZodType<
2295
+ GetOnePromptMessages,
2296
+ z.ZodTypeDef,
2297
+ unknown
2298
+ > = z.object({
2299
+ role: GetOnePromptRole$inboundSchema,
2300
+ content: z.nullable(
2301
+ z.union([
2302
+ z.string(),
2303
+ z.array(z.union([
2304
+ z.lazy(() => GetOnePrompt21$inboundSchema),
2305
+ z.lazy(() => GetOnePrompt22$inboundSchema),
2306
+ z.lazy(() => GetOnePrompt23$inboundSchema),
2307
+ ])),
2308
+ ]),
2309
+ ),
2310
+ tool_calls: z.array(z.lazy(() => GetOnePromptToolCalls$inboundSchema))
2311
+ .optional(),
2312
+ tool_call_id: z.nullable(z.string()).optional(),
2313
+ }).transform((v) => {
2314
+ return remap$(v, {
2315
+ "tool_calls": "toolCalls",
2316
+ "tool_call_id": "toolCallId",
2317
+ });
2318
+ });
2319
+ /** @internal */
2320
+ export type GetOnePromptMessages$Outbound = {
2321
+ role: string;
2322
+ content:
2323
+ | string
2324
+ | Array<
2325
+ | GetOnePrompt21$Outbound
2326
+ | GetOnePrompt22$Outbound
2327
+ | GetOnePrompt23$Outbound
2328
+ >
2329
+ | null;
2330
+ tool_calls?: Array<GetOnePromptToolCalls$Outbound> | undefined;
2331
+ tool_call_id?: string | null | undefined;
2332
+ };
2333
+
2334
+ /** @internal */
2335
+ export const GetOnePromptMessages$outboundSchema: z.ZodType<
2336
+ GetOnePromptMessages$Outbound,
2337
+ z.ZodTypeDef,
2338
+ GetOnePromptMessages
2339
+ > = z.object({
2340
+ role: GetOnePromptRole$outboundSchema,
2341
+ content: z.nullable(
2342
+ z.union([
2343
+ z.string(),
2344
+ z.array(z.union([
2345
+ z.lazy(() => GetOnePrompt21$outboundSchema),
2346
+ z.lazy(() => GetOnePrompt22$outboundSchema),
2347
+ z.lazy(() => GetOnePrompt23$outboundSchema),
2348
+ ])),
2349
+ ]),
2350
+ ),
2351
+ toolCalls: z.array(z.lazy(() => GetOnePromptToolCalls$outboundSchema))
2352
+ .optional(),
2353
+ toolCallId: z.nullable(z.string()).optional(),
2354
+ }).transform((v) => {
2355
+ return remap$(v, {
2356
+ toolCalls: "tool_calls",
2357
+ toolCallId: "tool_call_id",
2358
+ });
2359
+ });
2360
+
2361
+ export function getOnePromptMessagesToJSON(
2362
+ getOnePromptMessages: GetOnePromptMessages,
2363
+ ): string {
2364
+ return JSON.stringify(
2365
+ GetOnePromptMessages$outboundSchema.parse(getOnePromptMessages),
2366
+ );
2367
+ }
2368
+ export function getOnePromptMessagesFromJSON(
2369
+ jsonString: string,
2370
+ ): SafeParseResult<GetOnePromptMessages, SDKValidationError> {
2371
+ return safeParse(
2372
+ jsonString,
2373
+ (x) => GetOnePromptMessages$inboundSchema.parse(JSON.parse(x)),
2374
+ `Failed to parse 'GetOnePromptMessages' from JSON`,
2375
+ );
2376
+ }
2377
+
2378
+ /** @internal */
2379
+ export const GetOnePromptPromptConfig$inboundSchema: z.ZodType<
2380
+ GetOnePromptPromptConfig,
2381
+ z.ZodTypeDef,
2382
+ unknown
2383
+ > = z.object({
2384
+ stream: z.boolean().optional(),
2385
+ model: z.nullable(z.string()).optional(),
2386
+ model_db_id: z.nullable(z.string()).optional(),
2387
+ model_type: z.nullable(GetOnePromptModelType$inboundSchema).optional(),
2388
+ model_parameters: z.lazy(() => GetOnePromptModelParameters$inboundSchema)
2389
+ .optional(),
2390
+ provider: z.nullable(GetOnePromptProvider$inboundSchema).optional(),
2391
+ integration_id: z.nullable(z.string()).optional(),
2392
+ version: z.string().optional(),
2393
+ messages: z.array(z.lazy(() => GetOnePromptMessages$inboundSchema)),
2394
+ }).transform((v) => {
2395
+ return remap$(v, {
2396
+ "model_db_id": "modelDbId",
2397
+ "model_type": "modelType",
2398
+ "model_parameters": "modelParameters",
2399
+ "integration_id": "integrationId",
2400
+ });
2401
+ });
2402
+ /** @internal */
2403
+ export type GetOnePromptPromptConfig$Outbound = {
2404
+ stream?: boolean | undefined;
2405
+ model?: string | null | undefined;
2406
+ model_db_id?: string | null | undefined;
2407
+ model_type?: string | null | undefined;
2408
+ model_parameters?: GetOnePromptModelParameters$Outbound | undefined;
2409
+ provider?: string | null | undefined;
2410
+ integration_id?: string | null | undefined;
2411
+ version?: string | undefined;
2412
+ messages: Array<GetOnePromptMessages$Outbound>;
2413
+ };
2414
+
2415
+ /** @internal */
2416
+ export const GetOnePromptPromptConfig$outboundSchema: z.ZodType<
2417
+ GetOnePromptPromptConfig$Outbound,
2418
+ z.ZodTypeDef,
2419
+ GetOnePromptPromptConfig
2420
+ > = z.object({
2421
+ stream: z.boolean().optional(),
2422
+ model: z.nullable(z.string()).optional(),
2423
+ modelDbId: z.nullable(z.string()).optional(),
2424
+ modelType: z.nullable(GetOnePromptModelType$outboundSchema).optional(),
2425
+ modelParameters: z.lazy(() => GetOnePromptModelParameters$outboundSchema)
2426
+ .optional(),
2427
+ provider: z.nullable(GetOnePromptProvider$outboundSchema).optional(),
2428
+ integrationId: z.nullable(z.string()).optional(),
2429
+ version: z.string().optional(),
2430
+ messages: z.array(z.lazy(() => GetOnePromptMessages$outboundSchema)),
2431
+ }).transform((v) => {
2432
+ return remap$(v, {
2433
+ modelDbId: "model_db_id",
2434
+ modelType: "model_type",
2435
+ modelParameters: "model_parameters",
2436
+ integrationId: "integration_id",
2437
+ });
2438
+ });
2439
+
2440
+ export function getOnePromptPromptConfigToJSON(
2441
+ getOnePromptPromptConfig: GetOnePromptPromptConfig,
2442
+ ): string {
2443
+ return JSON.stringify(
2444
+ GetOnePromptPromptConfig$outboundSchema.parse(getOnePromptPromptConfig),
2445
+ );
2446
+ }
2447
+ export function getOnePromptPromptConfigFromJSON(
2448
+ jsonString: string,
2449
+ ): SafeParseResult<GetOnePromptPromptConfig, SDKValidationError> {
2450
+ return safeParse(
2451
+ jsonString,
2452
+ (x) => GetOnePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
2453
+ `Failed to parse 'GetOnePromptPromptConfig' from JSON`,
2454
+ );
2455
+ }
2456
+
2457
+ /** @internal */
2458
+ export const GetOnePromptVoice$inboundSchema: z.ZodNativeEnum<
2459
+ typeof GetOnePromptVoice
2460
+ > = z.nativeEnum(GetOnePromptVoice);
2461
+ /** @internal */
2462
+ export const GetOnePromptVoice$outboundSchema: z.ZodNativeEnum<
2463
+ typeof GetOnePromptVoice
2464
+ > = GetOnePromptVoice$inboundSchema;
2465
+
2466
+ /** @internal */
2467
+ export const GetOnePromptPromptsFormat$inboundSchema: z.ZodNativeEnum<
2468
+ typeof GetOnePromptPromptsFormat
2469
+ > = z.nativeEnum(GetOnePromptPromptsFormat);
2470
+ /** @internal */
2471
+ export const GetOnePromptPromptsFormat$outboundSchema: z.ZodNativeEnum<
2472
+ typeof GetOnePromptPromptsFormat
2473
+ > = GetOnePromptPromptsFormat$inboundSchema;
2474
+
2475
+ /** @internal */
2476
+ export const GetOnePromptAudio$inboundSchema: z.ZodType<
2477
+ GetOnePromptAudio,
2478
+ z.ZodTypeDef,
2479
+ unknown
2480
+ > = z.object({
2481
+ voice: GetOnePromptVoice$inboundSchema,
2482
+ format: GetOnePromptPromptsFormat$inboundSchema,
2483
+ });
2484
+ /** @internal */
2485
+ export type GetOnePromptAudio$Outbound = {
2486
+ voice: string;
2487
+ format: string;
2488
+ };
2489
+
2490
+ /** @internal */
2491
+ export const GetOnePromptAudio$outboundSchema: z.ZodType<
2492
+ GetOnePromptAudio$Outbound,
2493
+ z.ZodTypeDef,
2494
+ GetOnePromptAudio
2495
+ > = z.object({
2496
+ voice: GetOnePromptVoice$outboundSchema,
2497
+ format: GetOnePromptPromptsFormat$outboundSchema,
2498
+ });
2499
+
2500
+ export function getOnePromptAudioToJSON(
2501
+ getOnePromptAudio: GetOnePromptAudio,
2502
+ ): string {
2503
+ return JSON.stringify(
2504
+ GetOnePromptAudio$outboundSchema.parse(getOnePromptAudio),
2505
+ );
2506
+ }
2507
+ export function getOnePromptAudioFromJSON(
2508
+ jsonString: string,
2509
+ ): SafeParseResult<GetOnePromptAudio, SDKValidationError> {
2510
+ return safeParse(
2511
+ jsonString,
2512
+ (x) => GetOnePromptAudio$inboundSchema.parse(JSON.parse(x)),
2513
+ `Failed to parse 'GetOnePromptAudio' from JSON`,
2514
+ );
2515
+ }
2516
+
2517
+ /** @internal */
2518
+ export const GetOnePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
2519
+ GetOnePromptResponseFormatJsonSchema,
2520
+ z.ZodTypeDef,
2521
+ unknown
2522
+ > = z.object({
2523
+ description: z.string().optional(),
2524
+ name: z.string(),
2525
+ schema: z.any().optional(),
2526
+ strict: z.boolean().default(false),
2527
+ });
2528
+ /** @internal */
2529
+ export type GetOnePromptResponseFormatJsonSchema$Outbound = {
2530
+ description?: string | undefined;
2531
+ name: string;
2532
+ schema?: any | undefined;
2533
+ strict: boolean;
2534
+ };
2535
+
2536
+ /** @internal */
2537
+ export const GetOnePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
2538
+ GetOnePromptResponseFormatJsonSchema$Outbound,
2539
+ z.ZodTypeDef,
2540
+ GetOnePromptResponseFormatJsonSchema
2541
+ > = z.object({
2542
+ description: z.string().optional(),
2543
+ name: z.string(),
2544
+ schema: z.any().optional(),
2545
+ strict: z.boolean().default(false),
2546
+ });
2547
+
2548
+ export function getOnePromptResponseFormatJsonSchemaToJSON(
2549
+ getOnePromptResponseFormatJsonSchema: GetOnePromptResponseFormatJsonSchema,
2550
+ ): string {
2551
+ return JSON.stringify(
2552
+ GetOnePromptResponseFormatJsonSchema$outboundSchema.parse(
2553
+ getOnePromptResponseFormatJsonSchema,
2554
+ ),
2555
+ );
2556
+ }
2557
+ export function getOnePromptResponseFormatJsonSchemaFromJSON(
2558
+ jsonString: string,
2559
+ ): SafeParseResult<GetOnePromptResponseFormatJsonSchema, SDKValidationError> {
2560
+ return safeParse(
2561
+ jsonString,
2562
+ (x) =>
2563
+ GetOnePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
2564
+ `Failed to parse 'GetOnePromptResponseFormatJsonSchema' from JSON`,
2565
+ );
2566
+ }
2567
+
2568
+ /** @internal */
2569
+ export const GetOnePromptResponseFormatPromptsJSONSchema$inboundSchema:
2570
+ z.ZodType<
2571
+ GetOnePromptResponseFormatPromptsJSONSchema,
2572
+ z.ZodTypeDef,
2573
+ unknown
2574
+ > = z.object({
2575
+ type: z.literal("json_schema"),
2576
+ json_schema: z.lazy(() =>
2577
+ GetOnePromptResponseFormatJsonSchema$inboundSchema
2578
+ ),
2579
+ }).transform((v) => {
2580
+ return remap$(v, {
2581
+ "json_schema": "jsonSchema",
2582
+ });
2583
+ });
2584
+ /** @internal */
2585
+ export type GetOnePromptResponseFormatPromptsJSONSchema$Outbound = {
2586
+ type: "json_schema";
2587
+ json_schema: GetOnePromptResponseFormatJsonSchema$Outbound;
2588
+ };
2589
+
2590
+ /** @internal */
2591
+ export const GetOnePromptResponseFormatPromptsJSONSchema$outboundSchema:
2592
+ z.ZodType<
2593
+ GetOnePromptResponseFormatPromptsJSONSchema$Outbound,
2594
+ z.ZodTypeDef,
2595
+ GetOnePromptResponseFormatPromptsJSONSchema
2596
+ > = z.object({
2597
+ type: z.literal("json_schema"),
2598
+ jsonSchema: z.lazy(() =>
2599
+ GetOnePromptResponseFormatJsonSchema$outboundSchema
2600
+ ),
2601
+ }).transform((v) => {
2602
+ return remap$(v, {
2603
+ jsonSchema: "json_schema",
2604
+ });
2605
+ });
2606
+
2607
+ export function getOnePromptResponseFormatPromptsJSONSchemaToJSON(
2608
+ getOnePromptResponseFormatPromptsJSONSchema:
2609
+ GetOnePromptResponseFormatPromptsJSONSchema,
2610
+ ): string {
2611
+ return JSON.stringify(
2612
+ GetOnePromptResponseFormatPromptsJSONSchema$outboundSchema.parse(
2613
+ getOnePromptResponseFormatPromptsJSONSchema,
2614
+ ),
2615
+ );
2616
+ }
2617
+ export function getOnePromptResponseFormatPromptsJSONSchemaFromJSON(
716
2618
  jsonString: string,
717
- ): SafeParseResult<GetOnePromptResponseFormat3, SDKValidationError> {
2619
+ ): SafeParseResult<
2620
+ GetOnePromptResponseFormatPromptsJSONSchema,
2621
+ SDKValidationError
2622
+ > {
718
2623
  return safeParse(
719
2624
  jsonString,
720
- (x) => GetOnePromptResponseFormat3$inboundSchema.parse(JSON.parse(x)),
721
- `Failed to parse 'GetOnePromptResponseFormat3' from JSON`,
2625
+ (x) =>
2626
+ GetOnePromptResponseFormatPromptsJSONSchema$inboundSchema.parse(
2627
+ JSON.parse(x),
2628
+ ),
2629
+ `Failed to parse 'GetOnePromptResponseFormatPromptsJSONSchema' from JSON`,
722
2630
  );
723
2631
  }
724
2632
 
725
2633
  /** @internal */
726
- export const GetOnePromptResponseFormatPromptsType$inboundSchema:
727
- z.ZodNativeEnum<typeof GetOnePromptResponseFormatPromptsType> = z.nativeEnum(
728
- GetOnePromptResponseFormatPromptsType,
729
- );
2634
+ export const GetOnePromptResponseFormatJSONObject$inboundSchema: z.ZodType<
2635
+ GetOnePromptResponseFormatJSONObject,
2636
+ z.ZodTypeDef,
2637
+ unknown
2638
+ > = z.object({
2639
+ type: z.literal("json_object"),
2640
+ });
730
2641
  /** @internal */
731
- export const GetOnePromptResponseFormatPromptsType$outboundSchema:
732
- z.ZodNativeEnum<typeof GetOnePromptResponseFormatPromptsType> =
733
- GetOnePromptResponseFormatPromptsType$inboundSchema;
2642
+ export type GetOnePromptResponseFormatJSONObject$Outbound = {
2643
+ type: "json_object";
2644
+ };
734
2645
 
735
2646
  /** @internal */
736
- export const GetOnePromptResponseFormat2$inboundSchema: z.ZodType<
737
- GetOnePromptResponseFormat2,
2647
+ export const GetOnePromptResponseFormatJSONObject$outboundSchema: z.ZodType<
2648
+ GetOnePromptResponseFormatJSONObject$Outbound,
2649
+ z.ZodTypeDef,
2650
+ GetOnePromptResponseFormatJSONObject
2651
+ > = z.object({
2652
+ type: z.literal("json_object"),
2653
+ });
2654
+
2655
+ export function getOnePromptResponseFormatJSONObjectToJSON(
2656
+ getOnePromptResponseFormatJSONObject: GetOnePromptResponseFormatJSONObject,
2657
+ ): string {
2658
+ return JSON.stringify(
2659
+ GetOnePromptResponseFormatJSONObject$outboundSchema.parse(
2660
+ getOnePromptResponseFormatJSONObject,
2661
+ ),
2662
+ );
2663
+ }
2664
+ export function getOnePromptResponseFormatJSONObjectFromJSON(
2665
+ jsonString: string,
2666
+ ): SafeParseResult<GetOnePromptResponseFormatJSONObject, SDKValidationError> {
2667
+ return safeParse(
2668
+ jsonString,
2669
+ (x) =>
2670
+ GetOnePromptResponseFormatJSONObject$inboundSchema.parse(JSON.parse(x)),
2671
+ `Failed to parse 'GetOnePromptResponseFormatJSONObject' from JSON`,
2672
+ );
2673
+ }
2674
+
2675
+ /** @internal */
2676
+ export const GetOnePromptResponseFormatText$inboundSchema: z.ZodType<
2677
+ GetOnePromptResponseFormatText,
738
2678
  z.ZodTypeDef,
739
2679
  unknown
740
2680
  > = z.object({
741
- type: GetOnePromptResponseFormatPromptsType$inboundSchema,
2681
+ type: z.literal("text"),
742
2682
  });
743
2683
  /** @internal */
744
- export type GetOnePromptResponseFormat2$Outbound = {
745
- type: string;
2684
+ export type GetOnePromptResponseFormatText$Outbound = {
2685
+ type: "text";
746
2686
  };
747
2687
 
748
2688
  /** @internal */
749
- export const GetOnePromptResponseFormat2$outboundSchema: z.ZodType<
750
- GetOnePromptResponseFormat2$Outbound,
2689
+ export const GetOnePromptResponseFormatText$outboundSchema: z.ZodType<
2690
+ GetOnePromptResponseFormatText$Outbound,
751
2691
  z.ZodTypeDef,
752
- GetOnePromptResponseFormat2
2692
+ GetOnePromptResponseFormatText
753
2693
  > = z.object({
754
- type: GetOnePromptResponseFormatPromptsType$outboundSchema,
2694
+ type: z.literal("text"),
755
2695
  });
756
2696
 
757
- export function getOnePromptResponseFormat2ToJSON(
758
- getOnePromptResponseFormat2: GetOnePromptResponseFormat2,
2697
+ export function getOnePromptResponseFormatTextToJSON(
2698
+ getOnePromptResponseFormatText: GetOnePromptResponseFormatText,
759
2699
  ): string {
760
2700
  return JSON.stringify(
761
- GetOnePromptResponseFormat2$outboundSchema.parse(
762
- getOnePromptResponseFormat2,
2701
+ GetOnePromptResponseFormatText$outboundSchema.parse(
2702
+ getOnePromptResponseFormatText,
763
2703
  ),
764
2704
  );
765
2705
  }
766
- export function getOnePromptResponseFormat2FromJSON(
2706
+ export function getOnePromptResponseFormatTextFromJSON(
767
2707
  jsonString: string,
768
- ): SafeParseResult<GetOnePromptResponseFormat2, SDKValidationError> {
2708
+ ): SafeParseResult<GetOnePromptResponseFormatText, SDKValidationError> {
769
2709
  return safeParse(
770
2710
  jsonString,
771
- (x) => GetOnePromptResponseFormat2$inboundSchema.parse(JSON.parse(x)),
772
- `Failed to parse 'GetOnePromptResponseFormat2' from JSON`,
2711
+ (x) => GetOnePromptResponseFormatText$inboundSchema.parse(JSON.parse(x)),
2712
+ `Failed to parse 'GetOnePromptResponseFormatText' from JSON`,
2713
+ );
2714
+ }
2715
+
2716
+ /** @internal */
2717
+ export const GetOnePromptResponseFormat$inboundSchema: z.ZodType<
2718
+ GetOnePromptResponseFormat,
2719
+ z.ZodTypeDef,
2720
+ unknown
2721
+ > = z.union([
2722
+ z.lazy(() => GetOnePromptResponseFormatText$inboundSchema),
2723
+ z.lazy(() => GetOnePromptResponseFormatJSONObject$inboundSchema),
2724
+ z.lazy(() => GetOnePromptResponseFormatPromptsJSONSchema$inboundSchema),
2725
+ ]);
2726
+ /** @internal */
2727
+ export type GetOnePromptResponseFormat$Outbound =
2728
+ | GetOnePromptResponseFormatText$Outbound
2729
+ | GetOnePromptResponseFormatJSONObject$Outbound
2730
+ | GetOnePromptResponseFormatPromptsJSONSchema$Outbound;
2731
+
2732
+ /** @internal */
2733
+ export const GetOnePromptResponseFormat$outboundSchema: z.ZodType<
2734
+ GetOnePromptResponseFormat$Outbound,
2735
+ z.ZodTypeDef,
2736
+ GetOnePromptResponseFormat
2737
+ > = z.union([
2738
+ z.lazy(() => GetOnePromptResponseFormatText$outboundSchema),
2739
+ z.lazy(() => GetOnePromptResponseFormatJSONObject$outboundSchema),
2740
+ z.lazy(() => GetOnePromptResponseFormatPromptsJSONSchema$outboundSchema),
2741
+ ]);
2742
+
2743
+ export function getOnePromptResponseFormatToJSON(
2744
+ getOnePromptResponseFormat: GetOnePromptResponseFormat,
2745
+ ): string {
2746
+ return JSON.stringify(
2747
+ GetOnePromptResponseFormat$outboundSchema.parse(getOnePromptResponseFormat),
2748
+ );
2749
+ }
2750
+ export function getOnePromptResponseFormatFromJSON(
2751
+ jsonString: string,
2752
+ ): SafeParseResult<GetOnePromptResponseFormat, SDKValidationError> {
2753
+ return safeParse(
2754
+ jsonString,
2755
+ (x) => GetOnePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
2756
+ `Failed to parse 'GetOnePromptResponseFormat' from JSON`,
773
2757
  );
774
2758
  }
775
2759
 
776
2760
  /** @internal */
777
- export const GetOnePromptResponseFormatType$inboundSchema: z.ZodNativeEnum<
778
- typeof GetOnePromptResponseFormatType
779
- > = z.nativeEnum(GetOnePromptResponseFormatType);
2761
+ export const GetOnePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
2762
+ typeof GetOnePromptReasoningEffort
2763
+ > = z.nativeEnum(GetOnePromptReasoningEffort);
2764
+ /** @internal */
2765
+ export const GetOnePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
2766
+ typeof GetOnePromptReasoningEffort
2767
+ > = GetOnePromptReasoningEffort$inboundSchema;
2768
+
2769
+ /** @internal */
2770
+ export const GetOnePromptStop$inboundSchema: z.ZodType<
2771
+ GetOnePromptStop,
2772
+ z.ZodTypeDef,
2773
+ unknown
2774
+ > = z.union([z.string(), z.array(z.string())]);
780
2775
  /** @internal */
781
- export const GetOnePromptResponseFormatType$outboundSchema: z.ZodNativeEnum<
782
- typeof GetOnePromptResponseFormatType
783
- > = GetOnePromptResponseFormatType$inboundSchema;
2776
+ export type GetOnePromptStop$Outbound = string | Array<string>;
784
2777
 
785
2778
  /** @internal */
786
- export const GetOnePromptResponseFormatJsonSchema$inboundSchema: z.ZodType<
787
- GetOnePromptResponseFormatJsonSchema,
2779
+ export const GetOnePromptStop$outboundSchema: z.ZodType<
2780
+ GetOnePromptStop$Outbound,
2781
+ z.ZodTypeDef,
2782
+ GetOnePromptStop
2783
+ > = z.union([z.string(), z.array(z.string())]);
2784
+
2785
+ export function getOnePromptStopToJSON(
2786
+ getOnePromptStop: GetOnePromptStop,
2787
+ ): string {
2788
+ return JSON.stringify(
2789
+ GetOnePromptStop$outboundSchema.parse(getOnePromptStop),
2790
+ );
2791
+ }
2792
+ export function getOnePromptStopFromJSON(
2793
+ jsonString: string,
2794
+ ): SafeParseResult<GetOnePromptStop, SDKValidationError> {
2795
+ return safeParse(
2796
+ jsonString,
2797
+ (x) => GetOnePromptStop$inboundSchema.parse(JSON.parse(x)),
2798
+ `Failed to parse 'GetOnePromptStop' from JSON`,
2799
+ );
2800
+ }
2801
+
2802
+ /** @internal */
2803
+ export const GetOnePromptStreamOptions$inboundSchema: z.ZodType<
2804
+ GetOnePromptStreamOptions,
2805
+ z.ZodTypeDef,
2806
+ unknown
2807
+ > = z.object({
2808
+ include_usage: z.boolean().optional(),
2809
+ }).transform((v) => {
2810
+ return remap$(v, {
2811
+ "include_usage": "includeUsage",
2812
+ });
2813
+ });
2814
+ /** @internal */
2815
+ export type GetOnePromptStreamOptions$Outbound = {
2816
+ include_usage?: boolean | undefined;
2817
+ };
2818
+
2819
+ /** @internal */
2820
+ export const GetOnePromptStreamOptions$outboundSchema: z.ZodType<
2821
+ GetOnePromptStreamOptions$Outbound,
2822
+ z.ZodTypeDef,
2823
+ GetOnePromptStreamOptions
2824
+ > = z.object({
2825
+ includeUsage: z.boolean().optional(),
2826
+ }).transform((v) => {
2827
+ return remap$(v, {
2828
+ includeUsage: "include_usage",
2829
+ });
2830
+ });
2831
+
2832
+ export function getOnePromptStreamOptionsToJSON(
2833
+ getOnePromptStreamOptions: GetOnePromptStreamOptions,
2834
+ ): string {
2835
+ return JSON.stringify(
2836
+ GetOnePromptStreamOptions$outboundSchema.parse(getOnePromptStreamOptions),
2837
+ );
2838
+ }
2839
+ export function getOnePromptStreamOptionsFromJSON(
2840
+ jsonString: string,
2841
+ ): SafeParseResult<GetOnePromptStreamOptions, SDKValidationError> {
2842
+ return safeParse(
2843
+ jsonString,
2844
+ (x) => GetOnePromptStreamOptions$inboundSchema.parse(JSON.parse(x)),
2845
+ `Failed to parse 'GetOnePromptStreamOptions' from JSON`,
2846
+ );
2847
+ }
2848
+
2849
+ /** @internal */
2850
+ export const GetOnePromptThinking$inboundSchema: z.ZodType<
2851
+ GetOnePromptThinking,
2852
+ z.ZodTypeDef,
2853
+ unknown
2854
+ > = z.union([
2855
+ components.ThinkingConfigDisabledSchema$inboundSchema,
2856
+ components.ThinkingConfigEnabledSchema$inboundSchema,
2857
+ ]);
2858
+ /** @internal */
2859
+ export type GetOnePromptThinking$Outbound =
2860
+ | components.ThinkingConfigDisabledSchema$Outbound
2861
+ | components.ThinkingConfigEnabledSchema$Outbound;
2862
+
2863
+ /** @internal */
2864
+ export const GetOnePromptThinking$outboundSchema: z.ZodType<
2865
+ GetOnePromptThinking$Outbound,
2866
+ z.ZodTypeDef,
2867
+ GetOnePromptThinking
2868
+ > = z.union([
2869
+ components.ThinkingConfigDisabledSchema$outboundSchema,
2870
+ components.ThinkingConfigEnabledSchema$outboundSchema,
2871
+ ]);
2872
+
2873
+ export function getOnePromptThinkingToJSON(
2874
+ getOnePromptThinking: GetOnePromptThinking,
2875
+ ): string {
2876
+ return JSON.stringify(
2877
+ GetOnePromptThinking$outboundSchema.parse(getOnePromptThinking),
2878
+ );
2879
+ }
2880
+ export function getOnePromptThinkingFromJSON(
2881
+ jsonString: string,
2882
+ ): SafeParseResult<GetOnePromptThinking, SDKValidationError> {
2883
+ return safeParse(
2884
+ jsonString,
2885
+ (x) => GetOnePromptThinking$inboundSchema.parse(JSON.parse(x)),
2886
+ `Failed to parse 'GetOnePromptThinking' from JSON`,
2887
+ );
2888
+ }
2889
+
2890
+ /** @internal */
2891
+ export const GetOnePromptToolChoiceType$inboundSchema: z.ZodNativeEnum<
2892
+ typeof GetOnePromptToolChoiceType
2893
+ > = z.nativeEnum(GetOnePromptToolChoiceType);
2894
+ /** @internal */
2895
+ export const GetOnePromptToolChoiceType$outboundSchema: z.ZodNativeEnum<
2896
+ typeof GetOnePromptToolChoiceType
2897
+ > = GetOnePromptToolChoiceType$inboundSchema;
2898
+
2899
+ /** @internal */
2900
+ export const GetOnePromptToolChoiceFunction$inboundSchema: z.ZodType<
2901
+ GetOnePromptToolChoiceFunction,
788
2902
  z.ZodTypeDef,
789
2903
  unknown
790
2904
  > = z.object({
791
2905
  name: z.string(),
792
- description: z.string().optional(),
793
- strict: z.boolean().optional(),
794
- schema: z.record(z.any()),
795
2906
  });
796
2907
  /** @internal */
797
- export type GetOnePromptResponseFormatJsonSchema$Outbound = {
2908
+ export type GetOnePromptToolChoiceFunction$Outbound = {
798
2909
  name: string;
799
- description?: string | undefined;
800
- strict?: boolean | undefined;
801
- schema: { [k: string]: any };
802
2910
  };
803
2911
 
804
2912
  /** @internal */
805
- export const GetOnePromptResponseFormatJsonSchema$outboundSchema: z.ZodType<
806
- GetOnePromptResponseFormatJsonSchema$Outbound,
2913
+ export const GetOnePromptToolChoiceFunction$outboundSchema: z.ZodType<
2914
+ GetOnePromptToolChoiceFunction$Outbound,
807
2915
  z.ZodTypeDef,
808
- GetOnePromptResponseFormatJsonSchema
2916
+ GetOnePromptToolChoiceFunction
809
2917
  > = z.object({
810
2918
  name: z.string(),
811
- description: z.string().optional(),
812
- strict: z.boolean().optional(),
813
- schema: z.record(z.any()),
814
2919
  });
815
2920
 
816
- export function getOnePromptResponseFormatJsonSchemaToJSON(
817
- getOnePromptResponseFormatJsonSchema: GetOnePromptResponseFormatJsonSchema,
2921
+ export function getOnePromptToolChoiceFunctionToJSON(
2922
+ getOnePromptToolChoiceFunction: GetOnePromptToolChoiceFunction,
818
2923
  ): string {
819
2924
  return JSON.stringify(
820
- GetOnePromptResponseFormatJsonSchema$outboundSchema.parse(
821
- getOnePromptResponseFormatJsonSchema,
2925
+ GetOnePromptToolChoiceFunction$outboundSchema.parse(
2926
+ getOnePromptToolChoiceFunction,
822
2927
  ),
823
2928
  );
824
2929
  }
825
- export function getOnePromptResponseFormatJsonSchemaFromJSON(
2930
+ export function getOnePromptToolChoiceFunctionFromJSON(
2931
+ jsonString: string,
2932
+ ): SafeParseResult<GetOnePromptToolChoiceFunction, SDKValidationError> {
2933
+ return safeParse(
2934
+ jsonString,
2935
+ (x) => GetOnePromptToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
2936
+ `Failed to parse 'GetOnePromptToolChoiceFunction' from JSON`,
2937
+ );
2938
+ }
2939
+
2940
+ /** @internal */
2941
+ export const GetOnePromptToolChoice2$inboundSchema: z.ZodType<
2942
+ GetOnePromptToolChoice2,
2943
+ z.ZodTypeDef,
2944
+ unknown
2945
+ > = z.object({
2946
+ type: GetOnePromptToolChoiceType$inboundSchema.optional(),
2947
+ function: z.lazy(() => GetOnePromptToolChoiceFunction$inboundSchema),
2948
+ });
2949
+ /** @internal */
2950
+ export type GetOnePromptToolChoice2$Outbound = {
2951
+ type?: string | undefined;
2952
+ function: GetOnePromptToolChoiceFunction$Outbound;
2953
+ };
2954
+
2955
+ /** @internal */
2956
+ export const GetOnePromptToolChoice2$outboundSchema: z.ZodType<
2957
+ GetOnePromptToolChoice2$Outbound,
2958
+ z.ZodTypeDef,
2959
+ GetOnePromptToolChoice2
2960
+ > = z.object({
2961
+ type: GetOnePromptToolChoiceType$outboundSchema.optional(),
2962
+ function: z.lazy(() => GetOnePromptToolChoiceFunction$outboundSchema),
2963
+ });
2964
+
2965
+ export function getOnePromptToolChoice2ToJSON(
2966
+ getOnePromptToolChoice2: GetOnePromptToolChoice2,
2967
+ ): string {
2968
+ return JSON.stringify(
2969
+ GetOnePromptToolChoice2$outboundSchema.parse(getOnePromptToolChoice2),
2970
+ );
2971
+ }
2972
+ export function getOnePromptToolChoice2FromJSON(
2973
+ jsonString: string,
2974
+ ): SafeParseResult<GetOnePromptToolChoice2, SDKValidationError> {
2975
+ return safeParse(
2976
+ jsonString,
2977
+ (x) => GetOnePromptToolChoice2$inboundSchema.parse(JSON.parse(x)),
2978
+ `Failed to parse 'GetOnePromptToolChoice2' from JSON`,
2979
+ );
2980
+ }
2981
+
2982
+ /** @internal */
2983
+ export const GetOnePromptToolChoice1$inboundSchema: z.ZodNativeEnum<
2984
+ typeof GetOnePromptToolChoice1
2985
+ > = z.nativeEnum(GetOnePromptToolChoice1);
2986
+ /** @internal */
2987
+ export const GetOnePromptToolChoice1$outboundSchema: z.ZodNativeEnum<
2988
+ typeof GetOnePromptToolChoice1
2989
+ > = GetOnePromptToolChoice1$inboundSchema;
2990
+
2991
+ /** @internal */
2992
+ export const GetOnePromptToolChoice$inboundSchema: z.ZodType<
2993
+ GetOnePromptToolChoice,
2994
+ z.ZodTypeDef,
2995
+ unknown
2996
+ > = z.union([
2997
+ z.lazy(() => GetOnePromptToolChoice2$inboundSchema),
2998
+ GetOnePromptToolChoice1$inboundSchema,
2999
+ ]);
3000
+ /** @internal */
3001
+ export type GetOnePromptToolChoice$Outbound =
3002
+ | GetOnePromptToolChoice2$Outbound
3003
+ | string;
3004
+
3005
+ /** @internal */
3006
+ export const GetOnePromptToolChoice$outboundSchema: z.ZodType<
3007
+ GetOnePromptToolChoice$Outbound,
3008
+ z.ZodTypeDef,
3009
+ GetOnePromptToolChoice
3010
+ > = z.union([
3011
+ z.lazy(() => GetOnePromptToolChoice2$outboundSchema),
3012
+ GetOnePromptToolChoice1$outboundSchema,
3013
+ ]);
3014
+
3015
+ export function getOnePromptToolChoiceToJSON(
3016
+ getOnePromptToolChoice: GetOnePromptToolChoice,
3017
+ ): string {
3018
+ return JSON.stringify(
3019
+ GetOnePromptToolChoice$outboundSchema.parse(getOnePromptToolChoice),
3020
+ );
3021
+ }
3022
+ export function getOnePromptToolChoiceFromJSON(
3023
+ jsonString: string,
3024
+ ): SafeParseResult<GetOnePromptToolChoice, SDKValidationError> {
3025
+ return safeParse(
3026
+ jsonString,
3027
+ (x) => GetOnePromptToolChoice$inboundSchema.parse(JSON.parse(x)),
3028
+ `Failed to parse 'GetOnePromptToolChoice' from JSON`,
3029
+ );
3030
+ }
3031
+
3032
+ /** @internal */
3033
+ export const GetOnePromptModalities$inboundSchema: z.ZodNativeEnum<
3034
+ typeof GetOnePromptModalities
3035
+ > = z.nativeEnum(GetOnePromptModalities);
3036
+ /** @internal */
3037
+ export const GetOnePromptModalities$outboundSchema: z.ZodNativeEnum<
3038
+ typeof GetOnePromptModalities
3039
+ > = GetOnePromptModalities$inboundSchema;
3040
+
3041
+ /** @internal */
3042
+ export const GetOnePromptId1$inboundSchema: z.ZodNativeEnum<
3043
+ typeof GetOnePromptId1
3044
+ > = z.nativeEnum(GetOnePromptId1);
3045
+ /** @internal */
3046
+ export const GetOnePromptId1$outboundSchema: z.ZodNativeEnum<
3047
+ typeof GetOnePromptId1
3048
+ > = GetOnePromptId1$inboundSchema;
3049
+
3050
+ /** @internal */
3051
+ export const GetOnePromptId$inboundSchema: z.ZodType<
3052
+ GetOnePromptId,
3053
+ z.ZodTypeDef,
3054
+ unknown
3055
+ > = z.union([GetOnePromptId1$inboundSchema, z.string()]);
3056
+ /** @internal */
3057
+ export type GetOnePromptId$Outbound = string | string;
3058
+
3059
+ /** @internal */
3060
+ export const GetOnePromptId$outboundSchema: z.ZodType<
3061
+ GetOnePromptId$Outbound,
3062
+ z.ZodTypeDef,
3063
+ GetOnePromptId
3064
+ > = z.union([GetOnePromptId1$outboundSchema, z.string()]);
3065
+
3066
+ export function getOnePromptIdToJSON(getOnePromptId: GetOnePromptId): string {
3067
+ return JSON.stringify(GetOnePromptId$outboundSchema.parse(getOnePromptId));
3068
+ }
3069
+ export function getOnePromptIdFromJSON(
826
3070
  jsonString: string,
827
- ): SafeParseResult<GetOnePromptResponseFormatJsonSchema, SDKValidationError> {
3071
+ ): SafeParseResult<GetOnePromptId, SDKValidationError> {
828
3072
  return safeParse(
829
3073
  jsonString,
830
- (x) =>
831
- GetOnePromptResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
832
- `Failed to parse 'GetOnePromptResponseFormatJsonSchema' from JSON`,
3074
+ (x) => GetOnePromptId$inboundSchema.parse(JSON.parse(x)),
3075
+ `Failed to parse 'GetOnePromptId' from JSON`,
833
3076
  );
834
3077
  }
835
3078
 
836
3079
  /** @internal */
837
- export const GetOnePromptResponseFormat1$inboundSchema: z.ZodType<
838
- GetOnePromptResponseFormat1,
3080
+ export const GetOnePromptExecuteOn$inboundSchema: z.ZodNativeEnum<
3081
+ typeof GetOnePromptExecuteOn
3082
+ > = z.nativeEnum(GetOnePromptExecuteOn);
3083
+ /** @internal */
3084
+ export const GetOnePromptExecuteOn$outboundSchema: z.ZodNativeEnum<
3085
+ typeof GetOnePromptExecuteOn
3086
+ > = GetOnePromptExecuteOn$inboundSchema;
3087
+
3088
+ /** @internal */
3089
+ export const GetOnePromptGuardrails$inboundSchema: z.ZodType<
3090
+ GetOnePromptGuardrails,
839
3091
  z.ZodTypeDef,
840
3092
  unknown
841
3093
  > = z.object({
842
- type: GetOnePromptResponseFormatType$inboundSchema,
843
- display_name: z.string().optional(),
844
- json_schema: z.lazy(() => GetOnePromptResponseFormatJsonSchema$inboundSchema),
3094
+ id: z.union([GetOnePromptId1$inboundSchema, z.string()]),
3095
+ execute_on: GetOnePromptExecuteOn$inboundSchema,
845
3096
  }).transform((v) => {
846
3097
  return remap$(v, {
847
- "display_name": "displayName",
848
- "json_schema": "jsonSchema",
3098
+ "execute_on": "executeOn",
849
3099
  });
850
3100
  });
851
3101
  /** @internal */
852
- export type GetOnePromptResponseFormat1$Outbound = {
853
- type: string;
854
- display_name?: string | undefined;
855
- json_schema: GetOnePromptResponseFormatJsonSchema$Outbound;
3102
+ export type GetOnePromptGuardrails$Outbound = {
3103
+ id: string | string;
3104
+ execute_on: string;
856
3105
  };
857
3106
 
858
3107
  /** @internal */
859
- export const GetOnePromptResponseFormat1$outboundSchema: z.ZodType<
860
- GetOnePromptResponseFormat1$Outbound,
3108
+ export const GetOnePromptGuardrails$outboundSchema: z.ZodType<
3109
+ GetOnePromptGuardrails$Outbound,
861
3110
  z.ZodTypeDef,
862
- GetOnePromptResponseFormat1
3111
+ GetOnePromptGuardrails
863
3112
  > = z.object({
864
- type: GetOnePromptResponseFormatType$outboundSchema,
865
- displayName: z.string().optional(),
866
- jsonSchema: z.lazy(() => GetOnePromptResponseFormatJsonSchema$outboundSchema),
3113
+ id: z.union([GetOnePromptId1$outboundSchema, z.string()]),
3114
+ executeOn: GetOnePromptExecuteOn$outboundSchema,
867
3115
  }).transform((v) => {
868
3116
  return remap$(v, {
869
- displayName: "display_name",
870
- jsonSchema: "json_schema",
3117
+ executeOn: "execute_on",
871
3118
  });
872
3119
  });
873
3120
 
874
- export function getOnePromptResponseFormat1ToJSON(
875
- getOnePromptResponseFormat1: GetOnePromptResponseFormat1,
3121
+ export function getOnePromptGuardrailsToJSON(
3122
+ getOnePromptGuardrails: GetOnePromptGuardrails,
876
3123
  ): string {
877
3124
  return JSON.stringify(
878
- GetOnePromptResponseFormat1$outboundSchema.parse(
879
- getOnePromptResponseFormat1,
880
- ),
3125
+ GetOnePromptGuardrails$outboundSchema.parse(getOnePromptGuardrails),
881
3126
  );
882
3127
  }
883
- export function getOnePromptResponseFormat1FromJSON(
3128
+ export function getOnePromptGuardrailsFromJSON(
884
3129
  jsonString: string,
885
- ): SafeParseResult<GetOnePromptResponseFormat1, SDKValidationError> {
3130
+ ): SafeParseResult<GetOnePromptGuardrails, SDKValidationError> {
886
3131
  return safeParse(
887
3132
  jsonString,
888
- (x) => GetOnePromptResponseFormat1$inboundSchema.parse(JSON.parse(x)),
889
- `Failed to parse 'GetOnePromptResponseFormat1' from JSON`,
3133
+ (x) => GetOnePromptGuardrails$inboundSchema.parse(JSON.parse(x)),
3134
+ `Failed to parse 'GetOnePromptGuardrails' from JSON`,
890
3135
  );
891
3136
  }
892
3137
 
893
3138
  /** @internal */
894
- export const GetOnePromptResponseFormat$inboundSchema: z.ZodType<
895
- GetOnePromptResponseFormat,
3139
+ export const GetOnePromptContentPromptsResponse2002$inboundSchema: z.ZodType<
3140
+ GetOnePromptContentPromptsResponse2002,
896
3141
  z.ZodTypeDef,
897
3142
  unknown
898
- > = z.union([
899
- z.lazy(() => GetOnePromptResponseFormat1$inboundSchema),
900
- z.lazy(() => GetOnePromptResponseFormat2$inboundSchema),
901
- z.lazy(() => GetOnePromptResponseFormat3$inboundSchema),
902
- GetOnePromptResponseFormat4$inboundSchema,
903
- GetOnePromptResponseFormat5$inboundSchema,
904
- GetOnePromptResponseFormat6$inboundSchema,
905
- ]);
3143
+ > = components.TextContentPartSchema$inboundSchema;
906
3144
  /** @internal */
907
- export type GetOnePromptResponseFormat$Outbound =
908
- | GetOnePromptResponseFormat1$Outbound
909
- | GetOnePromptResponseFormat2$Outbound
910
- | GetOnePromptResponseFormat3$Outbound
911
- | string
912
- | string
913
- | string;
3145
+ export type GetOnePromptContentPromptsResponse2002$Outbound =
3146
+ components.TextContentPartSchema$Outbound;
914
3147
 
915
3148
  /** @internal */
916
- export const GetOnePromptResponseFormat$outboundSchema: z.ZodType<
917
- GetOnePromptResponseFormat$Outbound,
3149
+ export const GetOnePromptContentPromptsResponse2002$outboundSchema: z.ZodType<
3150
+ GetOnePromptContentPromptsResponse2002$Outbound,
918
3151
  z.ZodTypeDef,
919
- GetOnePromptResponseFormat
920
- > = z.union([
921
- z.lazy(() => GetOnePromptResponseFormat1$outboundSchema),
922
- z.lazy(() => GetOnePromptResponseFormat2$outboundSchema),
923
- z.lazy(() => GetOnePromptResponseFormat3$outboundSchema),
924
- GetOnePromptResponseFormat4$outboundSchema,
925
- GetOnePromptResponseFormat5$outboundSchema,
926
- GetOnePromptResponseFormat6$outboundSchema,
927
- ]);
3152
+ GetOnePromptContentPromptsResponse2002
3153
+ > = components.TextContentPartSchema$outboundSchema;
928
3154
 
929
- export function getOnePromptResponseFormatToJSON(
930
- getOnePromptResponseFormat: GetOnePromptResponseFormat,
3155
+ export function getOnePromptContentPromptsResponse2002ToJSON(
3156
+ getOnePromptContentPromptsResponse2002:
3157
+ GetOnePromptContentPromptsResponse2002,
931
3158
  ): string {
932
3159
  return JSON.stringify(
933
- GetOnePromptResponseFormat$outboundSchema.parse(getOnePromptResponseFormat),
3160
+ GetOnePromptContentPromptsResponse2002$outboundSchema.parse(
3161
+ getOnePromptContentPromptsResponse2002,
3162
+ ),
934
3163
  );
935
3164
  }
936
- export function getOnePromptResponseFormatFromJSON(
3165
+ export function getOnePromptContentPromptsResponse2002FromJSON(
937
3166
  jsonString: string,
938
- ): SafeParseResult<GetOnePromptResponseFormat, SDKValidationError> {
3167
+ ): SafeParseResult<GetOnePromptContentPromptsResponse2002, SDKValidationError> {
939
3168
  return safeParse(
940
3169
  jsonString,
941
- (x) => GetOnePromptResponseFormat$inboundSchema.parse(JSON.parse(x)),
942
- `Failed to parse 'GetOnePromptResponseFormat' from JSON`,
3170
+ (x) =>
3171
+ GetOnePromptContentPromptsResponse2002$inboundSchema.parse(JSON.parse(x)),
3172
+ `Failed to parse 'GetOnePromptContentPromptsResponse2002' from JSON`,
943
3173
  );
944
3174
  }
945
3175
 
946
3176
  /** @internal */
947
- export const GetOnePromptPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
948
- typeof GetOnePromptPhotoRealVersion
949
- > = z.nativeEnum(GetOnePromptPhotoRealVersion);
3177
+ export const GetOnePromptMessagesPromptsResponse200Content$inboundSchema:
3178
+ z.ZodType<
3179
+ GetOnePromptMessagesPromptsResponse200Content,
3180
+ z.ZodTypeDef,
3181
+ unknown
3182
+ > = z.union([
3183
+ z.string(),
3184
+ z.array(components.TextContentPartSchema$inboundSchema),
3185
+ ]);
950
3186
  /** @internal */
951
- export const GetOnePromptPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
952
- typeof GetOnePromptPhotoRealVersion
953
- > = GetOnePromptPhotoRealVersion$inboundSchema;
3187
+ export type GetOnePromptMessagesPromptsResponse200Content$Outbound =
3188
+ | string
3189
+ | Array<components.TextContentPartSchema$Outbound>;
954
3190
 
955
3191
  /** @internal */
956
- export const GetOnePromptEncodingFormat$inboundSchema: z.ZodNativeEnum<
957
- typeof GetOnePromptEncodingFormat
958
- > = z.nativeEnum(GetOnePromptEncodingFormat);
959
- /** @internal */
960
- export const GetOnePromptEncodingFormat$outboundSchema: z.ZodNativeEnum<
961
- typeof GetOnePromptEncodingFormat
962
- > = GetOnePromptEncodingFormat$inboundSchema;
3192
+ export const GetOnePromptMessagesPromptsResponse200Content$outboundSchema:
3193
+ z.ZodType<
3194
+ GetOnePromptMessagesPromptsResponse200Content$Outbound,
3195
+ z.ZodTypeDef,
3196
+ GetOnePromptMessagesPromptsResponse200Content
3197
+ > = z.union([
3198
+ z.string(),
3199
+ z.array(components.TextContentPartSchema$outboundSchema),
3200
+ ]);
3201
+
3202
+ export function getOnePromptMessagesPromptsResponse200ContentToJSON(
3203
+ getOnePromptMessagesPromptsResponse200Content:
3204
+ GetOnePromptMessagesPromptsResponse200Content,
3205
+ ): string {
3206
+ return JSON.stringify(
3207
+ GetOnePromptMessagesPromptsResponse200Content$outboundSchema.parse(
3208
+ getOnePromptMessagesPromptsResponse200Content,
3209
+ ),
3210
+ );
3211
+ }
3212
+ export function getOnePromptMessagesPromptsResponse200ContentFromJSON(
3213
+ jsonString: string,
3214
+ ): SafeParseResult<
3215
+ GetOnePromptMessagesPromptsResponse200Content,
3216
+ SDKValidationError
3217
+ > {
3218
+ return safeParse(
3219
+ jsonString,
3220
+ (x) =>
3221
+ GetOnePromptMessagesPromptsResponse200Content$inboundSchema.parse(
3222
+ JSON.parse(x),
3223
+ ),
3224
+ `Failed to parse 'GetOnePromptMessagesPromptsResponse200Content' from JSON`,
3225
+ );
3226
+ }
963
3227
 
964
3228
  /** @internal */
965
- export const GetOnePromptReasoningEffort$inboundSchema: z.ZodNativeEnum<
966
- typeof GetOnePromptReasoningEffort
967
- > = z.nativeEnum(GetOnePromptReasoningEffort);
3229
+ export const GetOnePromptMessagesPromptsType$inboundSchema: z.ZodNativeEnum<
3230
+ typeof GetOnePromptMessagesPromptsType
3231
+ > = z.nativeEnum(GetOnePromptMessagesPromptsType);
968
3232
  /** @internal */
969
- export const GetOnePromptReasoningEffort$outboundSchema: z.ZodNativeEnum<
970
- typeof GetOnePromptReasoningEffort
971
- > = GetOnePromptReasoningEffort$inboundSchema;
3233
+ export const GetOnePromptMessagesPromptsType$outboundSchema: z.ZodNativeEnum<
3234
+ typeof GetOnePromptMessagesPromptsType
3235
+ > = GetOnePromptMessagesPromptsType$inboundSchema;
972
3236
 
973
3237
  /** @internal */
974
- export const GetOnePromptVerbosity$inboundSchema: z.ZodNativeEnum<
975
- typeof GetOnePromptVerbosity
976
- > = z.nativeEnum(GetOnePromptVerbosity);
3238
+ export const GetOnePromptMessagesTtl$inboundSchema: z.ZodNativeEnum<
3239
+ typeof GetOnePromptMessagesTtl
3240
+ > = z.nativeEnum(GetOnePromptMessagesTtl);
977
3241
  /** @internal */
978
- export const GetOnePromptVerbosity$outboundSchema: z.ZodNativeEnum<
979
- typeof GetOnePromptVerbosity
980
- > = GetOnePromptVerbosity$inboundSchema;
3242
+ export const GetOnePromptMessagesTtl$outboundSchema: z.ZodNativeEnum<
3243
+ typeof GetOnePromptMessagesTtl
3244
+ > = GetOnePromptMessagesTtl$inboundSchema;
981
3245
 
982
3246
  /** @internal */
983
- export const GetOnePromptThinkingLevel$inboundSchema: z.ZodNativeEnum<
984
- typeof GetOnePromptThinkingLevel
985
- > = z.nativeEnum(GetOnePromptThinkingLevel);
3247
+ export const GetOnePromptMessagesCacheControl$inboundSchema: z.ZodType<
3248
+ GetOnePromptMessagesCacheControl,
3249
+ z.ZodTypeDef,
3250
+ unknown
3251
+ > = z.object({
3252
+ type: GetOnePromptMessagesPromptsType$inboundSchema,
3253
+ ttl: GetOnePromptMessagesTtl$inboundSchema.default("5m"),
3254
+ });
986
3255
  /** @internal */
987
- export const GetOnePromptThinkingLevel$outboundSchema: z.ZodNativeEnum<
988
- typeof GetOnePromptThinkingLevel
989
- > = GetOnePromptThinkingLevel$inboundSchema;
3256
+ export type GetOnePromptMessagesCacheControl$Outbound = {
3257
+ type: string;
3258
+ ttl: string;
3259
+ };
990
3260
 
991
3261
  /** @internal */
992
- export const GetOnePromptModelParameters$inboundSchema: z.ZodType<
993
- GetOnePromptModelParameters,
3262
+ export const GetOnePromptMessagesCacheControl$outboundSchema: z.ZodType<
3263
+ GetOnePromptMessagesCacheControl$Outbound,
3264
+ z.ZodTypeDef,
3265
+ GetOnePromptMessagesCacheControl
3266
+ > = z.object({
3267
+ type: GetOnePromptMessagesPromptsType$outboundSchema,
3268
+ ttl: GetOnePromptMessagesTtl$outboundSchema.default("5m"),
3269
+ });
3270
+
3271
+ export function getOnePromptMessagesCacheControlToJSON(
3272
+ getOnePromptMessagesCacheControl: GetOnePromptMessagesCacheControl,
3273
+ ): string {
3274
+ return JSON.stringify(
3275
+ GetOnePromptMessagesCacheControl$outboundSchema.parse(
3276
+ getOnePromptMessagesCacheControl,
3277
+ ),
3278
+ );
3279
+ }
3280
+ export function getOnePromptMessagesCacheControlFromJSON(
3281
+ jsonString: string,
3282
+ ): SafeParseResult<GetOnePromptMessagesCacheControl, SDKValidationError> {
3283
+ return safeParse(
3284
+ jsonString,
3285
+ (x) => GetOnePromptMessagesCacheControl$inboundSchema.parse(JSON.parse(x)),
3286
+ `Failed to parse 'GetOnePromptMessagesCacheControl' from JSON`,
3287
+ );
3288
+ }
3289
+
3290
+ /** @internal */
3291
+ export const GetOnePromptMessagesToolMessage$inboundSchema: z.ZodType<
3292
+ GetOnePromptMessagesToolMessage,
994
3293
  z.ZodTypeDef,
995
3294
  unknown
996
3295
  > = z.object({
997
- temperature: z.number().optional(),
998
- maxTokens: z.number().optional(),
999
- topK: z.number().optional(),
1000
- topP: z.number().optional(),
1001
- frequencyPenalty: z.number().optional(),
1002
- presencePenalty: z.number().optional(),
1003
- numImages: z.number().optional(),
1004
- seed: z.number().optional(),
1005
- format: GetOnePromptFormat$inboundSchema.optional(),
1006
- dimensions: z.string().optional(),
1007
- quality: z.string().optional(),
1008
- style: z.string().optional(),
1009
- responseFormat: z.nullable(
1010
- z.union([
1011
- z.lazy(() => GetOnePromptResponseFormat1$inboundSchema),
1012
- z.lazy(() => GetOnePromptResponseFormat2$inboundSchema),
1013
- z.lazy(() => GetOnePromptResponseFormat3$inboundSchema),
1014
- GetOnePromptResponseFormat4$inboundSchema,
1015
- GetOnePromptResponseFormat5$inboundSchema,
1016
- GetOnePromptResponseFormat6$inboundSchema,
1017
- ]),
1018
- ).optional(),
1019
- photoRealVersion: GetOnePromptPhotoRealVersion$inboundSchema.optional(),
1020
- encoding_format: GetOnePromptEncodingFormat$inboundSchema.optional(),
1021
- reasoningEffort: GetOnePromptReasoningEffort$inboundSchema.optional(),
1022
- budgetTokens: z.number().optional(),
1023
- verbosity: GetOnePromptVerbosity$inboundSchema.optional(),
1024
- thinkingLevel: GetOnePromptThinkingLevel$inboundSchema.optional(),
3296
+ role: z.literal("tool"),
3297
+ content: z.union([
3298
+ z.string(),
3299
+ z.array(components.TextContentPartSchema$inboundSchema),
3300
+ ]),
3301
+ tool_call_id: z.nullable(z.string()),
3302
+ cache_control: z.lazy(() => GetOnePromptMessagesCacheControl$inboundSchema)
3303
+ .optional(),
1025
3304
  }).transform((v) => {
1026
3305
  return remap$(v, {
1027
- "encoding_format": "encodingFormat",
3306
+ "tool_call_id": "toolCallId",
3307
+ "cache_control": "cacheControl",
1028
3308
  });
1029
3309
  });
1030
3310
  /** @internal */
1031
- export type GetOnePromptModelParameters$Outbound = {
1032
- temperature?: number | undefined;
1033
- maxTokens?: number | undefined;
1034
- topK?: number | undefined;
1035
- topP?: number | undefined;
1036
- frequencyPenalty?: number | undefined;
1037
- presencePenalty?: number | undefined;
1038
- numImages?: number | undefined;
1039
- seed?: number | undefined;
1040
- format?: string | undefined;
1041
- dimensions?: string | undefined;
1042
- quality?: string | undefined;
1043
- style?: string | undefined;
1044
- responseFormat?:
1045
- | GetOnePromptResponseFormat1$Outbound
1046
- | GetOnePromptResponseFormat2$Outbound
1047
- | GetOnePromptResponseFormat3$Outbound
1048
- | string
1049
- | string
1050
- | string
1051
- | null
1052
- | undefined;
1053
- photoRealVersion?: string | undefined;
1054
- encoding_format?: string | undefined;
1055
- reasoningEffort?: string | undefined;
1056
- budgetTokens?: number | undefined;
1057
- verbosity?: string | undefined;
1058
- thinkingLevel?: string | undefined;
3311
+ export type GetOnePromptMessagesToolMessage$Outbound = {
3312
+ role: "tool";
3313
+ content: string | Array<components.TextContentPartSchema$Outbound>;
3314
+ tool_call_id: string | null;
3315
+ cache_control?: GetOnePromptMessagesCacheControl$Outbound | undefined;
1059
3316
  };
1060
3317
 
1061
3318
  /** @internal */
1062
- export const GetOnePromptModelParameters$outboundSchema: z.ZodType<
1063
- GetOnePromptModelParameters$Outbound,
3319
+ export const GetOnePromptMessagesToolMessage$outboundSchema: z.ZodType<
3320
+ GetOnePromptMessagesToolMessage$Outbound,
1064
3321
  z.ZodTypeDef,
1065
- GetOnePromptModelParameters
3322
+ GetOnePromptMessagesToolMessage
1066
3323
  > = z.object({
1067
- temperature: z.number().optional(),
1068
- maxTokens: z.number().optional(),
1069
- topK: z.number().optional(),
1070
- topP: z.number().optional(),
1071
- frequencyPenalty: z.number().optional(),
1072
- presencePenalty: z.number().optional(),
1073
- numImages: z.number().optional(),
1074
- seed: z.number().optional(),
1075
- format: GetOnePromptFormat$outboundSchema.optional(),
1076
- dimensions: z.string().optional(),
1077
- quality: z.string().optional(),
1078
- style: z.string().optional(),
1079
- responseFormat: z.nullable(
1080
- z.union([
1081
- z.lazy(() => GetOnePromptResponseFormat1$outboundSchema),
1082
- z.lazy(() => GetOnePromptResponseFormat2$outboundSchema),
1083
- z.lazy(() => GetOnePromptResponseFormat3$outboundSchema),
1084
- GetOnePromptResponseFormat4$outboundSchema,
1085
- GetOnePromptResponseFormat5$outboundSchema,
1086
- GetOnePromptResponseFormat6$outboundSchema,
1087
- ]),
1088
- ).optional(),
1089
- photoRealVersion: GetOnePromptPhotoRealVersion$outboundSchema.optional(),
1090
- encodingFormat: GetOnePromptEncodingFormat$outboundSchema.optional(),
1091
- reasoningEffort: GetOnePromptReasoningEffort$outboundSchema.optional(),
1092
- budgetTokens: z.number().optional(),
1093
- verbosity: GetOnePromptVerbosity$outboundSchema.optional(),
1094
- thinkingLevel: GetOnePromptThinkingLevel$outboundSchema.optional(),
3324
+ role: z.literal("tool"),
3325
+ content: z.union([
3326
+ z.string(),
3327
+ z.array(components.TextContentPartSchema$outboundSchema),
3328
+ ]),
3329
+ toolCallId: z.nullable(z.string()),
3330
+ cacheControl: z.lazy(() => GetOnePromptMessagesCacheControl$outboundSchema)
3331
+ .optional(),
1095
3332
  }).transform((v) => {
1096
3333
  return remap$(v, {
1097
- encodingFormat: "encoding_format",
3334
+ toolCallId: "tool_call_id",
3335
+ cacheControl: "cache_control",
1098
3336
  });
1099
3337
  });
1100
3338
 
1101
- export function getOnePromptModelParametersToJSON(
1102
- getOnePromptModelParameters: GetOnePromptModelParameters,
3339
+ export function getOnePromptMessagesToolMessageToJSON(
3340
+ getOnePromptMessagesToolMessage: GetOnePromptMessagesToolMessage,
3341
+ ): string {
3342
+ return JSON.stringify(
3343
+ GetOnePromptMessagesToolMessage$outboundSchema.parse(
3344
+ getOnePromptMessagesToolMessage,
3345
+ ),
3346
+ );
3347
+ }
3348
+ export function getOnePromptMessagesToolMessageFromJSON(
3349
+ jsonString: string,
3350
+ ): SafeParseResult<GetOnePromptMessagesToolMessage, SDKValidationError> {
3351
+ return safeParse(
3352
+ jsonString,
3353
+ (x) => GetOnePromptMessagesToolMessage$inboundSchema.parse(JSON.parse(x)),
3354
+ `Failed to parse 'GetOnePromptMessagesToolMessage' from JSON`,
3355
+ );
3356
+ }
3357
+
3358
+ /** @internal */
3359
+ export const GetOnePromptContentPromptsResponse2$inboundSchema: z.ZodType<
3360
+ GetOnePromptContentPromptsResponse2,
3361
+ z.ZodTypeDef,
3362
+ unknown
3363
+ > = z.union([
3364
+ components.TextContentPartSchema$inboundSchema.and(
3365
+ z.object({ type: z.literal("text") }),
3366
+ ),
3367
+ components.RefusalPartSchema$inboundSchema,
3368
+ components.ReasoningPartSchema$inboundSchema,
3369
+ components.RedactedReasoningPartSchema$inboundSchema,
3370
+ ]);
3371
+ /** @internal */
3372
+ export type GetOnePromptContentPromptsResponse2$Outbound =
3373
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
3374
+ | components.RefusalPartSchema$Outbound
3375
+ | components.ReasoningPartSchema$Outbound
3376
+ | components.RedactedReasoningPartSchema$Outbound;
3377
+
3378
+ /** @internal */
3379
+ export const GetOnePromptContentPromptsResponse2$outboundSchema: z.ZodType<
3380
+ GetOnePromptContentPromptsResponse2$Outbound,
3381
+ z.ZodTypeDef,
3382
+ GetOnePromptContentPromptsResponse2
3383
+ > = z.union([
3384
+ components.TextContentPartSchema$outboundSchema.and(
3385
+ z.object({ type: z.literal("text") }),
3386
+ ),
3387
+ components.RefusalPartSchema$outboundSchema,
3388
+ components.ReasoningPartSchema$outboundSchema,
3389
+ components.RedactedReasoningPartSchema$outboundSchema,
3390
+ ]);
3391
+
3392
+ export function getOnePromptContentPromptsResponse2ToJSON(
3393
+ getOnePromptContentPromptsResponse2: GetOnePromptContentPromptsResponse2,
1103
3394
  ): string {
1104
3395
  return JSON.stringify(
1105
- GetOnePromptModelParameters$outboundSchema.parse(
1106
- getOnePromptModelParameters,
3396
+ GetOnePromptContentPromptsResponse2$outboundSchema.parse(
3397
+ getOnePromptContentPromptsResponse2,
1107
3398
  ),
1108
3399
  );
1109
3400
  }
1110
- export function getOnePromptModelParametersFromJSON(
3401
+ export function getOnePromptContentPromptsResponse2FromJSON(
1111
3402
  jsonString: string,
1112
- ): SafeParseResult<GetOnePromptModelParameters, SDKValidationError> {
3403
+ ): SafeParseResult<GetOnePromptContentPromptsResponse2, SDKValidationError> {
1113
3404
  return safeParse(
1114
3405
  jsonString,
1115
- (x) => GetOnePromptModelParameters$inboundSchema.parse(JSON.parse(x)),
1116
- `Failed to parse 'GetOnePromptModelParameters' from JSON`,
3406
+ (x) =>
3407
+ GetOnePromptContentPromptsResponse2$inboundSchema.parse(JSON.parse(x)),
3408
+ `Failed to parse 'GetOnePromptContentPromptsResponse2' from JSON`,
1117
3409
  );
1118
3410
  }
1119
3411
 
1120
3412
  /** @internal */
1121
- export const GetOnePromptProvider$inboundSchema: z.ZodNativeEnum<
1122
- typeof GetOnePromptProvider
1123
- > = z.nativeEnum(GetOnePromptProvider);
3413
+ export const GetOnePromptMessagesPromptsResponseContent$inboundSchema:
3414
+ z.ZodType<GetOnePromptMessagesPromptsResponseContent, z.ZodTypeDef, unknown> =
3415
+ z.union([
3416
+ z.string(),
3417
+ z.array(
3418
+ z.union([
3419
+ components.TextContentPartSchema$inboundSchema.and(
3420
+ z.object({ type: z.literal("text") }),
3421
+ ),
3422
+ components.RefusalPartSchema$inboundSchema,
3423
+ components.ReasoningPartSchema$inboundSchema,
3424
+ components.RedactedReasoningPartSchema$inboundSchema,
3425
+ ]),
3426
+ ),
3427
+ ]);
1124
3428
  /** @internal */
1125
- export const GetOnePromptProvider$outboundSchema: z.ZodNativeEnum<
1126
- typeof GetOnePromptProvider
1127
- > = GetOnePromptProvider$inboundSchema;
3429
+ export type GetOnePromptMessagesPromptsResponseContent$Outbound =
3430
+ | string
3431
+ | Array<
3432
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
3433
+ | components.RefusalPartSchema$Outbound
3434
+ | components.ReasoningPartSchema$Outbound
3435
+ | components.RedactedReasoningPartSchema$Outbound
3436
+ >;
1128
3437
 
1129
3438
  /** @internal */
1130
- export const GetOnePromptRole$inboundSchema: z.ZodNativeEnum<
1131
- typeof GetOnePromptRole
1132
- > = z.nativeEnum(GetOnePromptRole);
1133
- /** @internal */
1134
- export const GetOnePromptRole$outboundSchema: z.ZodNativeEnum<
1135
- typeof GetOnePromptRole
1136
- > = GetOnePromptRole$inboundSchema;
3439
+ export const GetOnePromptMessagesPromptsResponseContent$outboundSchema:
3440
+ z.ZodType<
3441
+ GetOnePromptMessagesPromptsResponseContent$Outbound,
3442
+ z.ZodTypeDef,
3443
+ GetOnePromptMessagesPromptsResponseContent
3444
+ > = z.union([
3445
+ z.string(),
3446
+ z.array(
3447
+ z.union([
3448
+ components.TextContentPartSchema$outboundSchema.and(
3449
+ z.object({ type: z.literal("text") }),
3450
+ ),
3451
+ components.RefusalPartSchema$outboundSchema,
3452
+ components.ReasoningPartSchema$outboundSchema,
3453
+ components.RedactedReasoningPartSchema$outboundSchema,
3454
+ ]),
3455
+ ),
3456
+ ]);
3457
+
3458
+ export function getOnePromptMessagesPromptsResponseContentToJSON(
3459
+ getOnePromptMessagesPromptsResponseContent:
3460
+ GetOnePromptMessagesPromptsResponseContent,
3461
+ ): string {
3462
+ return JSON.stringify(
3463
+ GetOnePromptMessagesPromptsResponseContent$outboundSchema.parse(
3464
+ getOnePromptMessagesPromptsResponseContent,
3465
+ ),
3466
+ );
3467
+ }
3468
+ export function getOnePromptMessagesPromptsResponseContentFromJSON(
3469
+ jsonString: string,
3470
+ ): SafeParseResult<
3471
+ GetOnePromptMessagesPromptsResponseContent,
3472
+ SDKValidationError
3473
+ > {
3474
+ return safeParse(
3475
+ jsonString,
3476
+ (x) =>
3477
+ GetOnePromptMessagesPromptsResponseContent$inboundSchema.parse(
3478
+ JSON.parse(x),
3479
+ ),
3480
+ `Failed to parse 'GetOnePromptMessagesPromptsResponseContent' from JSON`,
3481
+ );
3482
+ }
1137
3483
 
1138
3484
  /** @internal */
1139
- export const GetOnePrompt2File$inboundSchema: z.ZodType<
1140
- GetOnePrompt2File,
3485
+ export const GetOnePromptMessagesAudio$inboundSchema: z.ZodType<
3486
+ GetOnePromptMessagesAudio,
1141
3487
  z.ZodTypeDef,
1142
3488
  unknown
1143
3489
  > = z.object({
1144
- file_data: z.string().optional(),
1145
- uri: z.string().optional(),
1146
- mimeType: z.string().optional(),
1147
- filename: z.string().optional(),
1148
- }).transform((v) => {
1149
- return remap$(v, {
1150
- "file_data": "fileData",
1151
- });
3490
+ id: z.string(),
1152
3491
  });
1153
3492
  /** @internal */
1154
- export type GetOnePrompt2File$Outbound = {
1155
- file_data?: string | undefined;
1156
- uri?: string | undefined;
1157
- mimeType?: string | undefined;
1158
- filename?: string | undefined;
3493
+ export type GetOnePromptMessagesAudio$Outbound = {
3494
+ id: string;
1159
3495
  };
1160
3496
 
1161
3497
  /** @internal */
1162
- export const GetOnePrompt2File$outboundSchema: z.ZodType<
1163
- GetOnePrompt2File$Outbound,
3498
+ export const GetOnePromptMessagesAudio$outboundSchema: z.ZodType<
3499
+ GetOnePromptMessagesAudio$Outbound,
1164
3500
  z.ZodTypeDef,
1165
- GetOnePrompt2File
3501
+ GetOnePromptMessagesAudio
1166
3502
  > = z.object({
1167
- fileData: z.string().optional(),
1168
- uri: z.string().optional(),
1169
- mimeType: z.string().optional(),
1170
- filename: z.string().optional(),
1171
- }).transform((v) => {
1172
- return remap$(v, {
1173
- fileData: "file_data",
1174
- });
3503
+ id: z.string(),
1175
3504
  });
1176
3505
 
1177
- export function getOnePrompt2FileToJSON(
1178
- getOnePrompt2File: GetOnePrompt2File,
3506
+ export function getOnePromptMessagesAudioToJSON(
3507
+ getOnePromptMessagesAudio: GetOnePromptMessagesAudio,
1179
3508
  ): string {
1180
3509
  return JSON.stringify(
1181
- GetOnePrompt2File$outboundSchema.parse(getOnePrompt2File),
3510
+ GetOnePromptMessagesAudio$outboundSchema.parse(getOnePromptMessagesAudio),
1182
3511
  );
1183
3512
  }
1184
- export function getOnePrompt2FileFromJSON(
3513
+ export function getOnePromptMessagesAudioFromJSON(
1185
3514
  jsonString: string,
1186
- ): SafeParseResult<GetOnePrompt2File, SDKValidationError> {
3515
+ ): SafeParseResult<GetOnePromptMessagesAudio, SDKValidationError> {
1187
3516
  return safeParse(
1188
3517
  jsonString,
1189
- (x) => GetOnePrompt2File$inboundSchema.parse(JSON.parse(x)),
1190
- `Failed to parse 'GetOnePrompt2File' from JSON`,
3518
+ (x) => GetOnePromptMessagesAudio$inboundSchema.parse(JSON.parse(x)),
3519
+ `Failed to parse 'GetOnePromptMessagesAudio' from JSON`,
1191
3520
  );
1192
3521
  }
1193
3522
 
1194
3523
  /** @internal */
1195
- export const GetOnePrompt23$inboundSchema: z.ZodType<
1196
- GetOnePrompt23,
3524
+ export const GetOnePromptMessagesType$inboundSchema: z.ZodNativeEnum<
3525
+ typeof GetOnePromptMessagesType
3526
+ > = z.nativeEnum(GetOnePromptMessagesType);
3527
+ /** @internal */
3528
+ export const GetOnePromptMessagesType$outboundSchema: z.ZodNativeEnum<
3529
+ typeof GetOnePromptMessagesType
3530
+ > = GetOnePromptMessagesType$inboundSchema;
3531
+
3532
+ /** @internal */
3533
+ export const GetOnePromptMessagesFunction$inboundSchema: z.ZodType<
3534
+ GetOnePromptMessagesFunction,
1197
3535
  z.ZodTypeDef,
1198
3536
  unknown
1199
3537
  > = z.object({
1200
- type: z.literal("file"),
1201
- file: z.lazy(() => GetOnePrompt2File$inboundSchema),
3538
+ name: z.string().optional(),
3539
+ arguments: z.string().optional(),
1202
3540
  });
1203
3541
  /** @internal */
1204
- export type GetOnePrompt23$Outbound = {
1205
- type: "file";
1206
- file: GetOnePrompt2File$Outbound;
3542
+ export type GetOnePromptMessagesFunction$Outbound = {
3543
+ name?: string | undefined;
3544
+ arguments?: string | undefined;
1207
3545
  };
1208
3546
 
1209
3547
  /** @internal */
1210
- export const GetOnePrompt23$outboundSchema: z.ZodType<
1211
- GetOnePrompt23$Outbound,
3548
+ export const GetOnePromptMessagesFunction$outboundSchema: z.ZodType<
3549
+ GetOnePromptMessagesFunction$Outbound,
1212
3550
  z.ZodTypeDef,
1213
- GetOnePrompt23
3551
+ GetOnePromptMessagesFunction
1214
3552
  > = z.object({
1215
- type: z.literal("file"),
1216
- file: z.lazy(() => GetOnePrompt2File$outboundSchema),
3553
+ name: z.string().optional(),
3554
+ arguments: z.string().optional(),
1217
3555
  });
1218
3556
 
1219
- export function getOnePrompt23ToJSON(getOnePrompt23: GetOnePrompt23): string {
1220
- return JSON.stringify(GetOnePrompt23$outboundSchema.parse(getOnePrompt23));
3557
+ export function getOnePromptMessagesFunctionToJSON(
3558
+ getOnePromptMessagesFunction: GetOnePromptMessagesFunction,
3559
+ ): string {
3560
+ return JSON.stringify(
3561
+ GetOnePromptMessagesFunction$outboundSchema.parse(
3562
+ getOnePromptMessagesFunction,
3563
+ ),
3564
+ );
1221
3565
  }
1222
- export function getOnePrompt23FromJSON(
3566
+ export function getOnePromptMessagesFunctionFromJSON(
1223
3567
  jsonString: string,
1224
- ): SafeParseResult<GetOnePrompt23, SDKValidationError> {
3568
+ ): SafeParseResult<GetOnePromptMessagesFunction, SDKValidationError> {
1225
3569
  return safeParse(
1226
3570
  jsonString,
1227
- (x) => GetOnePrompt23$inboundSchema.parse(JSON.parse(x)),
1228
- `Failed to parse 'GetOnePrompt23' from JSON`,
3571
+ (x) => GetOnePromptMessagesFunction$inboundSchema.parse(JSON.parse(x)),
3572
+ `Failed to parse 'GetOnePromptMessagesFunction' from JSON`,
1229
3573
  );
1230
3574
  }
1231
3575
 
1232
3576
  /** @internal */
1233
- export const GetOnePrompt2ImageUrl$inboundSchema: z.ZodType<
1234
- GetOnePrompt2ImageUrl,
3577
+ export const GetOnePromptMessagesToolCalls$inboundSchema: z.ZodType<
3578
+ GetOnePromptMessagesToolCalls,
1235
3579
  z.ZodTypeDef,
1236
3580
  unknown
1237
3581
  > = z.object({
1238
- id: z.string().optional(),
1239
- url: z.string(),
1240
- detail: z.string().optional(),
3582
+ id: z.string(),
3583
+ type: GetOnePromptMessagesType$inboundSchema,
3584
+ function: z.lazy(() => GetOnePromptMessagesFunction$inboundSchema),
3585
+ thought_signature: z.string().optional(),
3586
+ }).transform((v) => {
3587
+ return remap$(v, {
3588
+ "thought_signature": "thoughtSignature",
3589
+ });
1241
3590
  });
1242
3591
  /** @internal */
1243
- export type GetOnePrompt2ImageUrl$Outbound = {
1244
- id?: string | undefined;
1245
- url: string;
1246
- detail?: string | undefined;
3592
+ export type GetOnePromptMessagesToolCalls$Outbound = {
3593
+ id: string;
3594
+ type: string;
3595
+ function: GetOnePromptMessagesFunction$Outbound;
3596
+ thought_signature?: string | undefined;
1247
3597
  };
1248
3598
 
1249
3599
  /** @internal */
1250
- export const GetOnePrompt2ImageUrl$outboundSchema: z.ZodType<
1251
- GetOnePrompt2ImageUrl$Outbound,
3600
+ export const GetOnePromptMessagesToolCalls$outboundSchema: z.ZodType<
3601
+ GetOnePromptMessagesToolCalls$Outbound,
1252
3602
  z.ZodTypeDef,
1253
- GetOnePrompt2ImageUrl
3603
+ GetOnePromptMessagesToolCalls
1254
3604
  > = z.object({
1255
- id: z.string().optional(),
1256
- url: z.string(),
1257
- detail: z.string().optional(),
3605
+ id: z.string(),
3606
+ type: GetOnePromptMessagesType$outboundSchema,
3607
+ function: z.lazy(() => GetOnePromptMessagesFunction$outboundSchema),
3608
+ thoughtSignature: z.string().optional(),
3609
+ }).transform((v) => {
3610
+ return remap$(v, {
3611
+ thoughtSignature: "thought_signature",
3612
+ });
1258
3613
  });
1259
3614
 
1260
- export function getOnePrompt2ImageUrlToJSON(
1261
- getOnePrompt2ImageUrl: GetOnePrompt2ImageUrl,
3615
+ export function getOnePromptMessagesToolCallsToJSON(
3616
+ getOnePromptMessagesToolCalls: GetOnePromptMessagesToolCalls,
1262
3617
  ): string {
1263
3618
  return JSON.stringify(
1264
- GetOnePrompt2ImageUrl$outboundSchema.parse(getOnePrompt2ImageUrl),
3619
+ GetOnePromptMessagesToolCalls$outboundSchema.parse(
3620
+ getOnePromptMessagesToolCalls,
3621
+ ),
1265
3622
  );
1266
3623
  }
1267
- export function getOnePrompt2ImageUrlFromJSON(
3624
+ export function getOnePromptMessagesToolCallsFromJSON(
1268
3625
  jsonString: string,
1269
- ): SafeParseResult<GetOnePrompt2ImageUrl, SDKValidationError> {
3626
+ ): SafeParseResult<GetOnePromptMessagesToolCalls, SDKValidationError> {
1270
3627
  return safeParse(
1271
3628
  jsonString,
1272
- (x) => GetOnePrompt2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1273
- `Failed to parse 'GetOnePrompt2ImageUrl' from JSON`,
3629
+ (x) => GetOnePromptMessagesToolCalls$inboundSchema.parse(JSON.parse(x)),
3630
+ `Failed to parse 'GetOnePromptMessagesToolCalls' from JSON`,
1274
3631
  );
1275
3632
  }
1276
3633
 
1277
3634
  /** @internal */
1278
- export const GetOnePrompt22$inboundSchema: z.ZodType<
1279
- GetOnePrompt22,
3635
+ export const GetOnePromptMessagesAssistantMessage$inboundSchema: z.ZodType<
3636
+ GetOnePromptMessagesAssistantMessage,
1280
3637
  z.ZodTypeDef,
1281
3638
  unknown
1282
3639
  > = z.object({
1283
- type: z.literal("image_url"),
1284
- image_url: z.lazy(() => GetOnePrompt2ImageUrl$inboundSchema),
3640
+ content: z.nullable(
3641
+ z.union([
3642
+ z.string(),
3643
+ z.array(
3644
+ z.union([
3645
+ components.TextContentPartSchema$inboundSchema.and(
3646
+ z.object({ type: z.literal("text") }),
3647
+ ),
3648
+ components.RefusalPartSchema$inboundSchema,
3649
+ components.ReasoningPartSchema$inboundSchema,
3650
+ components.RedactedReasoningPartSchema$inboundSchema,
3651
+ ]),
3652
+ ),
3653
+ ]),
3654
+ ).optional(),
3655
+ refusal: z.nullable(z.string()).optional(),
3656
+ role: z.literal("assistant"),
3657
+ name: z.string().optional(),
3658
+ audio: z.nullable(z.lazy(() => GetOnePromptMessagesAudio$inboundSchema))
3659
+ .optional(),
3660
+ tool_calls: z.array(z.lazy(() => GetOnePromptMessagesToolCalls$inboundSchema))
3661
+ .optional(),
1285
3662
  }).transform((v) => {
1286
3663
  return remap$(v, {
1287
- "image_url": "imageUrl",
3664
+ "tool_calls": "toolCalls",
1288
3665
  });
1289
3666
  });
1290
3667
  /** @internal */
1291
- export type GetOnePrompt22$Outbound = {
1292
- type: "image_url";
1293
- image_url: GetOnePrompt2ImageUrl$Outbound;
3668
+ export type GetOnePromptMessagesAssistantMessage$Outbound = {
3669
+ content?:
3670
+ | string
3671
+ | Array<
3672
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
3673
+ | components.RefusalPartSchema$Outbound
3674
+ | components.ReasoningPartSchema$Outbound
3675
+ | components.RedactedReasoningPartSchema$Outbound
3676
+ >
3677
+ | null
3678
+ | undefined;
3679
+ refusal?: string | null | undefined;
3680
+ role: "assistant";
3681
+ name?: string | undefined;
3682
+ audio?: GetOnePromptMessagesAudio$Outbound | null | undefined;
3683
+ tool_calls?: Array<GetOnePromptMessagesToolCalls$Outbound> | undefined;
1294
3684
  };
1295
3685
 
1296
3686
  /** @internal */
1297
- export const GetOnePrompt22$outboundSchema: z.ZodType<
1298
- GetOnePrompt22$Outbound,
3687
+ export const GetOnePromptMessagesAssistantMessage$outboundSchema: z.ZodType<
3688
+ GetOnePromptMessagesAssistantMessage$Outbound,
1299
3689
  z.ZodTypeDef,
1300
- GetOnePrompt22
3690
+ GetOnePromptMessagesAssistantMessage
1301
3691
  > = z.object({
1302
- type: z.literal("image_url"),
1303
- imageUrl: z.lazy(() => GetOnePrompt2ImageUrl$outboundSchema),
3692
+ content: z.nullable(
3693
+ z.union([
3694
+ z.string(),
3695
+ z.array(
3696
+ z.union([
3697
+ components.TextContentPartSchema$outboundSchema.and(
3698
+ z.object({ type: z.literal("text") }),
3699
+ ),
3700
+ components.RefusalPartSchema$outboundSchema,
3701
+ components.ReasoningPartSchema$outboundSchema,
3702
+ components.RedactedReasoningPartSchema$outboundSchema,
3703
+ ]),
3704
+ ),
3705
+ ]),
3706
+ ).optional(),
3707
+ refusal: z.nullable(z.string()).optional(),
3708
+ role: z.literal("assistant"),
3709
+ name: z.string().optional(),
3710
+ audio: z.nullable(z.lazy(() => GetOnePromptMessagesAudio$outboundSchema))
3711
+ .optional(),
3712
+ toolCalls: z.array(z.lazy(() => GetOnePromptMessagesToolCalls$outboundSchema))
3713
+ .optional(),
1304
3714
  }).transform((v) => {
1305
3715
  return remap$(v, {
1306
- imageUrl: "image_url",
3716
+ toolCalls: "tool_calls",
1307
3717
  });
1308
3718
  });
1309
3719
 
1310
- export function getOnePrompt22ToJSON(getOnePrompt22: GetOnePrompt22): string {
1311
- return JSON.stringify(GetOnePrompt22$outboundSchema.parse(getOnePrompt22));
3720
+ export function getOnePromptMessagesAssistantMessageToJSON(
3721
+ getOnePromptMessagesAssistantMessage: GetOnePromptMessagesAssistantMessage,
3722
+ ): string {
3723
+ return JSON.stringify(
3724
+ GetOnePromptMessagesAssistantMessage$outboundSchema.parse(
3725
+ getOnePromptMessagesAssistantMessage,
3726
+ ),
3727
+ );
1312
3728
  }
1313
- export function getOnePrompt22FromJSON(
3729
+ export function getOnePromptMessagesAssistantMessageFromJSON(
1314
3730
  jsonString: string,
1315
- ): SafeParseResult<GetOnePrompt22, SDKValidationError> {
3731
+ ): SafeParseResult<GetOnePromptMessagesAssistantMessage, SDKValidationError> {
1316
3732
  return safeParse(
1317
3733
  jsonString,
1318
- (x) => GetOnePrompt22$inboundSchema.parse(JSON.parse(x)),
1319
- `Failed to parse 'GetOnePrompt22' from JSON`,
3734
+ (x) =>
3735
+ GetOnePromptMessagesAssistantMessage$inboundSchema.parse(JSON.parse(x)),
3736
+ `Failed to parse 'GetOnePromptMessagesAssistantMessage' from JSON`,
1320
3737
  );
1321
3738
  }
1322
3739
 
1323
3740
  /** @internal */
1324
- export const GetOnePrompt21$inboundSchema: z.ZodType<
1325
- GetOnePrompt21,
3741
+ export const GetOnePrompt2PromptsResponse200ApplicationJSONType$inboundSchema:
3742
+ z.ZodNativeEnum<typeof GetOnePrompt2PromptsResponse200ApplicationJSONType> = z
3743
+ .nativeEnum(GetOnePrompt2PromptsResponse200ApplicationJSONType);
3744
+ /** @internal */
3745
+ export const GetOnePrompt2PromptsResponse200ApplicationJSONType$outboundSchema:
3746
+ z.ZodNativeEnum<typeof GetOnePrompt2PromptsResponse200ApplicationJSONType> =
3747
+ GetOnePrompt2PromptsResponse200ApplicationJSONType$inboundSchema;
3748
+
3749
+ /** @internal */
3750
+ export const GetOnePrompt2Ttl$inboundSchema: z.ZodNativeEnum<
3751
+ typeof GetOnePrompt2Ttl
3752
+ > = z.nativeEnum(GetOnePrompt2Ttl);
3753
+ /** @internal */
3754
+ export const GetOnePrompt2Ttl$outboundSchema: z.ZodNativeEnum<
3755
+ typeof GetOnePrompt2Ttl
3756
+ > = GetOnePrompt2Ttl$inboundSchema;
3757
+
3758
+ /** @internal */
3759
+ export const GetOnePrompt2CacheControl$inboundSchema: z.ZodType<
3760
+ GetOnePrompt2CacheControl,
1326
3761
  z.ZodTypeDef,
1327
3762
  unknown
1328
3763
  > = z.object({
1329
- type: z.literal("text"),
1330
- text: z.string(),
3764
+ type: GetOnePrompt2PromptsResponse200ApplicationJSONType$inboundSchema,
3765
+ ttl: GetOnePrompt2Ttl$inboundSchema.default("5m"),
1331
3766
  });
1332
3767
  /** @internal */
1333
- export type GetOnePrompt21$Outbound = {
1334
- type: "text";
1335
- text: string;
3768
+ export type GetOnePrompt2CacheControl$Outbound = {
3769
+ type: string;
3770
+ ttl: string;
1336
3771
  };
1337
3772
 
1338
3773
  /** @internal */
1339
- export const GetOnePrompt21$outboundSchema: z.ZodType<
1340
- GetOnePrompt21$Outbound,
3774
+ export const GetOnePrompt2CacheControl$outboundSchema: z.ZodType<
3775
+ GetOnePrompt2CacheControl$Outbound,
1341
3776
  z.ZodTypeDef,
1342
- GetOnePrompt21
3777
+ GetOnePrompt2CacheControl
1343
3778
  > = z.object({
1344
- type: z.literal("text"),
1345
- text: z.string(),
3779
+ type: GetOnePrompt2PromptsResponse200ApplicationJSONType$outboundSchema,
3780
+ ttl: GetOnePrompt2Ttl$outboundSchema.default("5m"),
1346
3781
  });
1347
3782
 
1348
- export function getOnePrompt21ToJSON(getOnePrompt21: GetOnePrompt21): string {
1349
- return JSON.stringify(GetOnePrompt21$outboundSchema.parse(getOnePrompt21));
3783
+ export function getOnePrompt2CacheControlToJSON(
3784
+ getOnePrompt2CacheControl: GetOnePrompt2CacheControl,
3785
+ ): string {
3786
+ return JSON.stringify(
3787
+ GetOnePrompt2CacheControl$outboundSchema.parse(getOnePrompt2CacheControl),
3788
+ );
1350
3789
  }
1351
- export function getOnePrompt21FromJSON(
3790
+ export function getOnePrompt2CacheControlFromJSON(
1352
3791
  jsonString: string,
1353
- ): SafeParseResult<GetOnePrompt21, SDKValidationError> {
3792
+ ): SafeParseResult<GetOnePrompt2CacheControl, SDKValidationError> {
1354
3793
  return safeParse(
1355
3794
  jsonString,
1356
- (x) => GetOnePrompt21$inboundSchema.parse(JSON.parse(x)),
1357
- `Failed to parse 'GetOnePrompt21' from JSON`,
3795
+ (x) => GetOnePrompt2CacheControl$inboundSchema.parse(JSON.parse(x)),
3796
+ `Failed to parse 'GetOnePrompt2CacheControl' from JSON`,
1358
3797
  );
1359
3798
  }
1360
3799
 
1361
3800
  /** @internal */
1362
- export const GetOnePromptContent2$inboundSchema: z.ZodType<
1363
- GetOnePromptContent2,
3801
+ export const GetOnePrompt24$inboundSchema: z.ZodType<
3802
+ GetOnePrompt24,
3803
+ z.ZodTypeDef,
3804
+ unknown
3805
+ > = z.object({
3806
+ type: z.literal("file"),
3807
+ cache_control: z.lazy(() => GetOnePrompt2CacheControl$inboundSchema)
3808
+ .optional(),
3809
+ file: components.FileContentPartSchema$inboundSchema,
3810
+ }).transform((v) => {
3811
+ return remap$(v, {
3812
+ "cache_control": "cacheControl",
3813
+ });
3814
+ });
3815
+ /** @internal */
3816
+ export type GetOnePrompt24$Outbound = {
3817
+ type: "file";
3818
+ cache_control?: GetOnePrompt2CacheControl$Outbound | undefined;
3819
+ file: components.FileContentPartSchema$Outbound;
3820
+ };
3821
+
3822
+ /** @internal */
3823
+ export const GetOnePrompt24$outboundSchema: z.ZodType<
3824
+ GetOnePrompt24$Outbound,
3825
+ z.ZodTypeDef,
3826
+ GetOnePrompt24
3827
+ > = z.object({
3828
+ type: z.literal("file"),
3829
+ cacheControl: z.lazy(() => GetOnePrompt2CacheControl$outboundSchema)
3830
+ .optional(),
3831
+ file: components.FileContentPartSchema$outboundSchema,
3832
+ }).transform((v) => {
3833
+ return remap$(v, {
3834
+ cacheControl: "cache_control",
3835
+ });
3836
+ });
3837
+
3838
+ export function getOnePrompt24ToJSON(getOnePrompt24: GetOnePrompt24): string {
3839
+ return JSON.stringify(GetOnePrompt24$outboundSchema.parse(getOnePrompt24));
3840
+ }
3841
+ export function getOnePrompt24FromJSON(
3842
+ jsonString: string,
3843
+ ): SafeParseResult<GetOnePrompt24, SDKValidationError> {
3844
+ return safeParse(
3845
+ jsonString,
3846
+ (x) => GetOnePrompt24$inboundSchema.parse(JSON.parse(x)),
3847
+ `Failed to parse 'GetOnePrompt24' from JSON`,
3848
+ );
3849
+ }
3850
+
3851
+ /** @internal */
3852
+ export const GetOnePromptContentPrompts2$inboundSchema: z.ZodType<
3853
+ GetOnePromptContentPrompts2,
1364
3854
  z.ZodTypeDef,
1365
3855
  unknown
1366
3856
  > = z.union([
1367
- z.lazy(() => GetOnePrompt21$inboundSchema),
1368
- z.lazy(() => GetOnePrompt22$inboundSchema),
1369
- z.lazy(() => GetOnePrompt23$inboundSchema),
3857
+ components.TextContentPartSchema$inboundSchema.and(
3858
+ z.object({ type: z.literal("text") }),
3859
+ ),
3860
+ components.ImageContentPartSchema$inboundSchema,
3861
+ components.AudioContentPartSchema$inboundSchema,
3862
+ z.lazy(() => GetOnePrompt24$inboundSchema),
1370
3863
  ]);
1371
3864
  /** @internal */
1372
- export type GetOnePromptContent2$Outbound =
1373
- | GetOnePrompt21$Outbound
1374
- | GetOnePrompt22$Outbound
1375
- | GetOnePrompt23$Outbound;
3865
+ export type GetOnePromptContentPrompts2$Outbound =
3866
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
3867
+ | components.ImageContentPartSchema$Outbound
3868
+ | components.AudioContentPartSchema$Outbound
3869
+ | GetOnePrompt24$Outbound;
1376
3870
 
1377
3871
  /** @internal */
1378
- export const GetOnePromptContent2$outboundSchema: z.ZodType<
1379
- GetOnePromptContent2$Outbound,
3872
+ export const GetOnePromptContentPrompts2$outboundSchema: z.ZodType<
3873
+ GetOnePromptContentPrompts2$Outbound,
1380
3874
  z.ZodTypeDef,
1381
- GetOnePromptContent2
3875
+ GetOnePromptContentPrompts2
1382
3876
  > = z.union([
1383
- z.lazy(() => GetOnePrompt21$outboundSchema),
1384
- z.lazy(() => GetOnePrompt22$outboundSchema),
1385
- z.lazy(() => GetOnePrompt23$outboundSchema),
3877
+ components.TextContentPartSchema$outboundSchema.and(
3878
+ z.object({ type: z.literal("text") }),
3879
+ ),
3880
+ components.ImageContentPartSchema$outboundSchema,
3881
+ components.AudioContentPartSchema$outboundSchema,
3882
+ z.lazy(() => GetOnePrompt24$outboundSchema),
1386
3883
  ]);
1387
3884
 
1388
- export function getOnePromptContent2ToJSON(
1389
- getOnePromptContent2: GetOnePromptContent2,
3885
+ export function getOnePromptContentPrompts2ToJSON(
3886
+ getOnePromptContentPrompts2: GetOnePromptContentPrompts2,
1390
3887
  ): string {
1391
3888
  return JSON.stringify(
1392
- GetOnePromptContent2$outboundSchema.parse(getOnePromptContent2),
3889
+ GetOnePromptContentPrompts2$outboundSchema.parse(
3890
+ getOnePromptContentPrompts2,
3891
+ ),
1393
3892
  );
1394
3893
  }
1395
- export function getOnePromptContent2FromJSON(
3894
+ export function getOnePromptContentPrompts2FromJSON(
1396
3895
  jsonString: string,
1397
- ): SafeParseResult<GetOnePromptContent2, SDKValidationError> {
3896
+ ): SafeParseResult<GetOnePromptContentPrompts2, SDKValidationError> {
1398
3897
  return safeParse(
1399
3898
  jsonString,
1400
- (x) => GetOnePromptContent2$inboundSchema.parse(JSON.parse(x)),
1401
- `Failed to parse 'GetOnePromptContent2' from JSON`,
3899
+ (x) => GetOnePromptContentPrompts2$inboundSchema.parse(JSON.parse(x)),
3900
+ `Failed to parse 'GetOnePromptContentPrompts2' from JSON`,
1402
3901
  );
1403
3902
  }
1404
3903
 
1405
3904
  /** @internal */
1406
- export const GetOnePromptContent$inboundSchema: z.ZodType<
1407
- GetOnePromptContent,
3905
+ export const GetOnePromptMessagesPromptsContent$inboundSchema: z.ZodType<
3906
+ GetOnePromptMessagesPromptsContent,
1408
3907
  z.ZodTypeDef,
1409
3908
  unknown
1410
3909
  > = z.union([
1411
3910
  z.string(),
1412
- z.array(z.union([
1413
- z.lazy(() => GetOnePrompt21$inboundSchema),
1414
- z.lazy(() => GetOnePrompt22$inboundSchema),
1415
- z.lazy(() => GetOnePrompt23$inboundSchema),
1416
- ])),
3911
+ z.array(
3912
+ z.union([
3913
+ components.TextContentPartSchema$inboundSchema.and(
3914
+ z.object({ type: z.literal("text") }),
3915
+ ),
3916
+ components.ImageContentPartSchema$inboundSchema,
3917
+ components.AudioContentPartSchema$inboundSchema,
3918
+ z.lazy(() => GetOnePrompt24$inboundSchema),
3919
+ ]),
3920
+ ),
1417
3921
  ]);
1418
3922
  /** @internal */
1419
- export type GetOnePromptContent$Outbound =
3923
+ export type GetOnePromptMessagesPromptsContent$Outbound =
1420
3924
  | string
1421
3925
  | Array<
1422
- GetOnePrompt21$Outbound | GetOnePrompt22$Outbound | GetOnePrompt23$Outbound
3926
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
3927
+ | components.ImageContentPartSchema$Outbound
3928
+ | components.AudioContentPartSchema$Outbound
3929
+ | GetOnePrompt24$Outbound
1423
3930
  >;
1424
3931
 
1425
3932
  /** @internal */
1426
- export const GetOnePromptContent$outboundSchema: z.ZodType<
1427
- GetOnePromptContent$Outbound,
3933
+ export const GetOnePromptMessagesPromptsContent$outboundSchema: z.ZodType<
3934
+ GetOnePromptMessagesPromptsContent$Outbound,
1428
3935
  z.ZodTypeDef,
1429
- GetOnePromptContent
3936
+ GetOnePromptMessagesPromptsContent
1430
3937
  > = z.union([
1431
3938
  z.string(),
1432
- z.array(z.union([
1433
- z.lazy(() => GetOnePrompt21$outboundSchema),
1434
- z.lazy(() => GetOnePrompt22$outboundSchema),
1435
- z.lazy(() => GetOnePrompt23$outboundSchema),
1436
- ])),
3939
+ z.array(
3940
+ z.union([
3941
+ components.TextContentPartSchema$outboundSchema.and(
3942
+ z.object({ type: z.literal("text") }),
3943
+ ),
3944
+ components.ImageContentPartSchema$outboundSchema,
3945
+ components.AudioContentPartSchema$outboundSchema,
3946
+ z.lazy(() => GetOnePrompt24$outboundSchema),
3947
+ ]),
3948
+ ),
1437
3949
  ]);
1438
3950
 
1439
- export function getOnePromptContentToJSON(
1440
- getOnePromptContent: GetOnePromptContent,
3951
+ export function getOnePromptMessagesPromptsContentToJSON(
3952
+ getOnePromptMessagesPromptsContent: GetOnePromptMessagesPromptsContent,
1441
3953
  ): string {
1442
3954
  return JSON.stringify(
1443
- GetOnePromptContent$outboundSchema.parse(getOnePromptContent),
3955
+ GetOnePromptMessagesPromptsContent$outboundSchema.parse(
3956
+ getOnePromptMessagesPromptsContent,
3957
+ ),
1444
3958
  );
1445
3959
  }
1446
- export function getOnePromptContentFromJSON(
3960
+ export function getOnePromptMessagesPromptsContentFromJSON(
1447
3961
  jsonString: string,
1448
- ): SafeParseResult<GetOnePromptContent, SDKValidationError> {
3962
+ ): SafeParseResult<GetOnePromptMessagesPromptsContent, SDKValidationError> {
1449
3963
  return safeParse(
1450
3964
  jsonString,
1451
- (x) => GetOnePromptContent$inboundSchema.parse(JSON.parse(x)),
1452
- `Failed to parse 'GetOnePromptContent' from JSON`,
3965
+ (x) =>
3966
+ GetOnePromptMessagesPromptsContent$inboundSchema.parse(JSON.parse(x)),
3967
+ `Failed to parse 'GetOnePromptMessagesPromptsContent' from JSON`,
1453
3968
  );
1454
3969
  }
1455
3970
 
1456
3971
  /** @internal */
1457
- export const GetOnePromptPromptsType$inboundSchema: z.ZodNativeEnum<
1458
- typeof GetOnePromptPromptsType
1459
- > = z.nativeEnum(GetOnePromptPromptsType);
1460
- /** @internal */
1461
- export const GetOnePromptPromptsType$outboundSchema: z.ZodNativeEnum<
1462
- typeof GetOnePromptPromptsType
1463
- > = GetOnePromptPromptsType$inboundSchema;
1464
-
1465
- /** @internal */
1466
- export const GetOnePromptFunction$inboundSchema: z.ZodType<
1467
- GetOnePromptFunction,
3972
+ export const GetOnePromptMessagesUserMessage$inboundSchema: z.ZodType<
3973
+ GetOnePromptMessagesUserMessage,
1468
3974
  z.ZodTypeDef,
1469
3975
  unknown
1470
3976
  > = z.object({
1471
- name: z.string(),
1472
- arguments: z.string(),
3977
+ role: z.literal("user"),
3978
+ name: z.string().optional(),
3979
+ content: z.union([
3980
+ z.string(),
3981
+ z.array(
3982
+ z.union([
3983
+ components.TextContentPartSchema$inboundSchema.and(
3984
+ z.object({ type: z.literal("text") }),
3985
+ ),
3986
+ components.ImageContentPartSchema$inboundSchema,
3987
+ components.AudioContentPartSchema$inboundSchema,
3988
+ z.lazy(() => GetOnePrompt24$inboundSchema),
3989
+ ]),
3990
+ ),
3991
+ ]),
1473
3992
  });
1474
3993
  /** @internal */
1475
- export type GetOnePromptFunction$Outbound = {
1476
- name: string;
1477
- arguments: string;
3994
+ export type GetOnePromptMessagesUserMessage$Outbound = {
3995
+ role: "user";
3996
+ name?: string | undefined;
3997
+ content:
3998
+ | string
3999
+ | Array<
4000
+ | (components.TextContentPartSchema$Outbound & { type: "text" })
4001
+ | components.ImageContentPartSchema$Outbound
4002
+ | components.AudioContentPartSchema$Outbound
4003
+ | GetOnePrompt24$Outbound
4004
+ >;
1478
4005
  };
1479
4006
 
1480
4007
  /** @internal */
1481
- export const GetOnePromptFunction$outboundSchema: z.ZodType<
1482
- GetOnePromptFunction$Outbound,
4008
+ export const GetOnePromptMessagesUserMessage$outboundSchema: z.ZodType<
4009
+ GetOnePromptMessagesUserMessage$Outbound,
1483
4010
  z.ZodTypeDef,
1484
- GetOnePromptFunction
4011
+ GetOnePromptMessagesUserMessage
1485
4012
  > = z.object({
1486
- name: z.string(),
1487
- arguments: z.string(),
4013
+ role: z.literal("user"),
4014
+ name: z.string().optional(),
4015
+ content: z.union([
4016
+ z.string(),
4017
+ z.array(
4018
+ z.union([
4019
+ components.TextContentPartSchema$outboundSchema.and(
4020
+ z.object({ type: z.literal("text") }),
4021
+ ),
4022
+ components.ImageContentPartSchema$outboundSchema,
4023
+ components.AudioContentPartSchema$outboundSchema,
4024
+ z.lazy(() => GetOnePrompt24$outboundSchema),
4025
+ ]),
4026
+ ),
4027
+ ]),
1488
4028
  });
1489
4029
 
1490
- export function getOnePromptFunctionToJSON(
1491
- getOnePromptFunction: GetOnePromptFunction,
4030
+ export function getOnePromptMessagesUserMessageToJSON(
4031
+ getOnePromptMessagesUserMessage: GetOnePromptMessagesUserMessage,
1492
4032
  ): string {
1493
4033
  return JSON.stringify(
1494
- GetOnePromptFunction$outboundSchema.parse(getOnePromptFunction),
4034
+ GetOnePromptMessagesUserMessage$outboundSchema.parse(
4035
+ getOnePromptMessagesUserMessage,
4036
+ ),
1495
4037
  );
1496
4038
  }
1497
- export function getOnePromptFunctionFromJSON(
4039
+ export function getOnePromptMessagesUserMessageFromJSON(
1498
4040
  jsonString: string,
1499
- ): SafeParseResult<GetOnePromptFunction, SDKValidationError> {
4041
+ ): SafeParseResult<GetOnePromptMessagesUserMessage, SDKValidationError> {
1500
4042
  return safeParse(
1501
4043
  jsonString,
1502
- (x) => GetOnePromptFunction$inboundSchema.parse(JSON.parse(x)),
1503
- `Failed to parse 'GetOnePromptFunction' from JSON`,
4044
+ (x) => GetOnePromptMessagesUserMessage$inboundSchema.parse(JSON.parse(x)),
4045
+ `Failed to parse 'GetOnePromptMessagesUserMessage' from JSON`,
1504
4046
  );
1505
4047
  }
1506
4048
 
1507
4049
  /** @internal */
1508
- export const GetOnePromptToolCalls$inboundSchema: z.ZodType<
1509
- GetOnePromptToolCalls,
4050
+ export const GetOnePromptMessagesContent$inboundSchema: z.ZodType<
4051
+ GetOnePromptMessagesContent,
1510
4052
  z.ZodTypeDef,
1511
4053
  unknown
1512
- > = z.object({
1513
- id: z.string().optional(),
1514
- index: z.number().optional(),
1515
- type: GetOnePromptPromptsType$inboundSchema,
1516
- function: z.lazy(() => GetOnePromptFunction$inboundSchema),
1517
- });
4054
+ > = z.union([
4055
+ z.string(),
4056
+ z.array(components.TextContentPartSchema$inboundSchema),
4057
+ ]);
1518
4058
  /** @internal */
1519
- export type GetOnePromptToolCalls$Outbound = {
1520
- id?: string | undefined;
1521
- index?: number | undefined;
1522
- type: string;
1523
- function: GetOnePromptFunction$Outbound;
1524
- };
4059
+ export type GetOnePromptMessagesContent$Outbound =
4060
+ | string
4061
+ | Array<components.TextContentPartSchema$Outbound>;
1525
4062
 
1526
4063
  /** @internal */
1527
- export const GetOnePromptToolCalls$outboundSchema: z.ZodType<
1528
- GetOnePromptToolCalls$Outbound,
4064
+ export const GetOnePromptMessagesContent$outboundSchema: z.ZodType<
4065
+ GetOnePromptMessagesContent$Outbound,
1529
4066
  z.ZodTypeDef,
1530
- GetOnePromptToolCalls
1531
- > = z.object({
1532
- id: z.string().optional(),
1533
- index: z.number().optional(),
1534
- type: GetOnePromptPromptsType$outboundSchema,
1535
- function: z.lazy(() => GetOnePromptFunction$outboundSchema),
1536
- });
4067
+ GetOnePromptMessagesContent
4068
+ > = z.union([
4069
+ z.string(),
4070
+ z.array(components.TextContentPartSchema$outboundSchema),
4071
+ ]);
1537
4072
 
1538
- export function getOnePromptToolCallsToJSON(
1539
- getOnePromptToolCalls: GetOnePromptToolCalls,
4073
+ export function getOnePromptMessagesContentToJSON(
4074
+ getOnePromptMessagesContent: GetOnePromptMessagesContent,
1540
4075
  ): string {
1541
4076
  return JSON.stringify(
1542
- GetOnePromptToolCalls$outboundSchema.parse(getOnePromptToolCalls),
4077
+ GetOnePromptMessagesContent$outboundSchema.parse(
4078
+ getOnePromptMessagesContent,
4079
+ ),
1543
4080
  );
1544
4081
  }
1545
- export function getOnePromptToolCallsFromJSON(
4082
+ export function getOnePromptMessagesContentFromJSON(
1546
4083
  jsonString: string,
1547
- ): SafeParseResult<GetOnePromptToolCalls, SDKValidationError> {
4084
+ ): SafeParseResult<GetOnePromptMessagesContent, SDKValidationError> {
1548
4085
  return safeParse(
1549
4086
  jsonString,
1550
- (x) => GetOnePromptToolCalls$inboundSchema.parse(JSON.parse(x)),
1551
- `Failed to parse 'GetOnePromptToolCalls' from JSON`,
4087
+ (x) => GetOnePromptMessagesContent$inboundSchema.parse(JSON.parse(x)),
4088
+ `Failed to parse 'GetOnePromptMessagesContent' from JSON`,
1552
4089
  );
1553
4090
  }
1554
4091
 
1555
4092
  /** @internal */
1556
- export const GetOnePromptMessages$inboundSchema: z.ZodType<
1557
- GetOnePromptMessages,
4093
+ export const GetOnePromptMessagesSystemMessage$inboundSchema: z.ZodType<
4094
+ GetOnePromptMessagesSystemMessage,
1558
4095
  z.ZodTypeDef,
1559
4096
  unknown
1560
4097
  > = z.object({
1561
- role: GetOnePromptRole$inboundSchema,
1562
- content: z.nullable(
1563
- z.union([
1564
- z.string(),
1565
- z.array(z.union([
1566
- z.lazy(() => GetOnePrompt21$inboundSchema),
1567
- z.lazy(() => GetOnePrompt22$inboundSchema),
1568
- z.lazy(() => GetOnePrompt23$inboundSchema),
1569
- ])),
1570
- ]),
1571
- ),
1572
- tool_calls: z.array(z.lazy(() => GetOnePromptToolCalls$inboundSchema))
1573
- .optional(),
1574
- tool_call_id: z.nullable(z.string()).optional(),
1575
- }).transform((v) => {
1576
- return remap$(v, {
1577
- "tool_calls": "toolCalls",
1578
- "tool_call_id": "toolCallId",
1579
- });
4098
+ role: z.literal("system"),
4099
+ content: z.union([
4100
+ z.string(),
4101
+ z.array(components.TextContentPartSchema$inboundSchema),
4102
+ ]),
4103
+ name: z.string().optional(),
1580
4104
  });
1581
4105
  /** @internal */
1582
- export type GetOnePromptMessages$Outbound = {
1583
- role: string;
1584
- content:
1585
- | string
1586
- | Array<
1587
- | GetOnePrompt21$Outbound
1588
- | GetOnePrompt22$Outbound
1589
- | GetOnePrompt23$Outbound
1590
- >
1591
- | null;
1592
- tool_calls?: Array<GetOnePromptToolCalls$Outbound> | undefined;
1593
- tool_call_id?: string | null | undefined;
4106
+ export type GetOnePromptMessagesSystemMessage$Outbound = {
4107
+ role: "system";
4108
+ content: string | Array<components.TextContentPartSchema$Outbound>;
4109
+ name?: string | undefined;
1594
4110
  };
1595
4111
 
1596
4112
  /** @internal */
1597
- export const GetOnePromptMessages$outboundSchema: z.ZodType<
1598
- GetOnePromptMessages$Outbound,
4113
+ export const GetOnePromptMessagesSystemMessage$outboundSchema: z.ZodType<
4114
+ GetOnePromptMessagesSystemMessage$Outbound,
1599
4115
  z.ZodTypeDef,
1600
- GetOnePromptMessages
4116
+ GetOnePromptMessagesSystemMessage
1601
4117
  > = z.object({
1602
- role: GetOnePromptRole$outboundSchema,
1603
- content: z.nullable(
1604
- z.union([
1605
- z.string(),
1606
- z.array(z.union([
1607
- z.lazy(() => GetOnePrompt21$outboundSchema),
1608
- z.lazy(() => GetOnePrompt22$outboundSchema),
1609
- z.lazy(() => GetOnePrompt23$outboundSchema),
1610
- ])),
1611
- ]),
1612
- ),
1613
- toolCalls: z.array(z.lazy(() => GetOnePromptToolCalls$outboundSchema))
1614
- .optional(),
1615
- toolCallId: z.nullable(z.string()).optional(),
1616
- }).transform((v) => {
1617
- return remap$(v, {
1618
- toolCalls: "tool_calls",
1619
- toolCallId: "tool_call_id",
1620
- });
4118
+ role: z.literal("system"),
4119
+ content: z.union([
4120
+ z.string(),
4121
+ z.array(components.TextContentPartSchema$outboundSchema),
4122
+ ]),
4123
+ name: z.string().optional(),
1621
4124
  });
1622
4125
 
1623
- export function getOnePromptMessagesToJSON(
1624
- getOnePromptMessages: GetOnePromptMessages,
4126
+ export function getOnePromptMessagesSystemMessageToJSON(
4127
+ getOnePromptMessagesSystemMessage: GetOnePromptMessagesSystemMessage,
1625
4128
  ): string {
1626
4129
  return JSON.stringify(
1627
- GetOnePromptMessages$outboundSchema.parse(getOnePromptMessages),
4130
+ GetOnePromptMessagesSystemMessage$outboundSchema.parse(
4131
+ getOnePromptMessagesSystemMessage,
4132
+ ),
1628
4133
  );
1629
4134
  }
1630
- export function getOnePromptMessagesFromJSON(
4135
+ export function getOnePromptMessagesSystemMessageFromJSON(
1631
4136
  jsonString: string,
1632
- ): SafeParseResult<GetOnePromptMessages, SDKValidationError> {
4137
+ ): SafeParseResult<GetOnePromptMessagesSystemMessage, SDKValidationError> {
1633
4138
  return safeParse(
1634
4139
  jsonString,
1635
- (x) => GetOnePromptMessages$inboundSchema.parse(JSON.parse(x)),
1636
- `Failed to parse 'GetOnePromptMessages' from JSON`,
4140
+ (x) => GetOnePromptMessagesSystemMessage$inboundSchema.parse(JSON.parse(x)),
4141
+ `Failed to parse 'GetOnePromptMessagesSystemMessage' from JSON`,
1637
4142
  );
1638
4143
  }
1639
4144
 
1640
4145
  /** @internal */
1641
- export const GetOnePromptPromptConfig$inboundSchema: z.ZodType<
1642
- GetOnePromptPromptConfig,
4146
+ export const GetOnePromptPromptsMessages$inboundSchema: z.ZodType<
4147
+ GetOnePromptPromptsMessages,
4148
+ z.ZodTypeDef,
4149
+ unknown
4150
+ > = z.union([
4151
+ z.lazy(() => GetOnePromptMessagesSystemMessage$inboundSchema),
4152
+ z.lazy(() => GetOnePromptMessagesUserMessage$inboundSchema),
4153
+ z.lazy(() => GetOnePromptMessagesAssistantMessage$inboundSchema),
4154
+ z.lazy(() => GetOnePromptMessagesToolMessage$inboundSchema),
4155
+ ]);
4156
+ /** @internal */
4157
+ export type GetOnePromptPromptsMessages$Outbound =
4158
+ | GetOnePromptMessagesSystemMessage$Outbound
4159
+ | GetOnePromptMessagesUserMessage$Outbound
4160
+ | GetOnePromptMessagesAssistantMessage$Outbound
4161
+ | GetOnePromptMessagesToolMessage$Outbound;
4162
+
4163
+ /** @internal */
4164
+ export const GetOnePromptPromptsMessages$outboundSchema: z.ZodType<
4165
+ GetOnePromptPromptsMessages$Outbound,
4166
+ z.ZodTypeDef,
4167
+ GetOnePromptPromptsMessages
4168
+ > = z.union([
4169
+ z.lazy(() => GetOnePromptMessagesSystemMessage$outboundSchema),
4170
+ z.lazy(() => GetOnePromptMessagesUserMessage$outboundSchema),
4171
+ z.lazy(() => GetOnePromptMessagesAssistantMessage$outboundSchema),
4172
+ z.lazy(() => GetOnePromptMessagesToolMessage$outboundSchema),
4173
+ ]);
4174
+
4175
+ export function getOnePromptPromptsMessagesToJSON(
4176
+ getOnePromptPromptsMessages: GetOnePromptPromptsMessages,
4177
+ ): string {
4178
+ return JSON.stringify(
4179
+ GetOnePromptPromptsMessages$outboundSchema.parse(
4180
+ getOnePromptPromptsMessages,
4181
+ ),
4182
+ );
4183
+ }
4184
+ export function getOnePromptPromptsMessagesFromJSON(
4185
+ jsonString: string,
4186
+ ): SafeParseResult<GetOnePromptPromptsMessages, SDKValidationError> {
4187
+ return safeParse(
4188
+ jsonString,
4189
+ (x) => GetOnePromptPromptsMessages$inboundSchema.parse(JSON.parse(x)),
4190
+ `Failed to parse 'GetOnePromptPromptsMessages' from JSON`,
4191
+ );
4192
+ }
4193
+
4194
+ /** @internal */
4195
+ export const GetOnePromptPromptField$inboundSchema: z.ZodType<
4196
+ GetOnePromptPromptField,
1643
4197
  z.ZodTypeDef,
1644
4198
  unknown
1645
4199
  > = z.object({
1646
- stream: z.boolean().optional(),
1647
- model: z.string().optional(),
1648
- model_db_id: z.nullable(z.string()).optional(),
1649
- model_type: z.nullable(GetOnePromptModelType$inboundSchema).optional(),
1650
- model_parameters: z.lazy(() => GetOnePromptModelParameters$inboundSchema)
4200
+ audio: z.nullable(z.lazy(() => GetOnePromptAudio$inboundSchema)).optional(),
4201
+ frequency_penalty: z.nullable(z.number()).optional(),
4202
+ max_tokens: z.nullable(z.number().int()).optional(),
4203
+ max_completion_tokens: z.nullable(z.number().int()).optional(),
4204
+ logprobs: z.nullable(z.boolean()).optional(),
4205
+ top_logprobs: z.nullable(z.number().int()).optional(),
4206
+ n: z.nullable(z.number().int()).optional(),
4207
+ presence_penalty: z.nullable(z.number()).optional(),
4208
+ response_format: z.union([
4209
+ z.lazy(() => GetOnePromptResponseFormatText$inboundSchema),
4210
+ z.lazy(() => GetOnePromptResponseFormatJSONObject$inboundSchema),
4211
+ z.lazy(() => GetOnePromptResponseFormatPromptsJSONSchema$inboundSchema),
4212
+ ]).optional(),
4213
+ reasoning_effort: GetOnePromptReasoningEffort$inboundSchema.optional(),
4214
+ verbosity: z.string().optional(),
4215
+ seed: z.nullable(z.number()).optional(),
4216
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
4217
+ stream_options: z.nullable(
4218
+ z.lazy(() => GetOnePromptStreamOptions$inboundSchema),
4219
+ ).optional(),
4220
+ thinking: z.union([
4221
+ components.ThinkingConfigDisabledSchema$inboundSchema,
4222
+ components.ThinkingConfigEnabledSchema$inboundSchema,
4223
+ ]).optional(),
4224
+ temperature: z.nullable(z.number()).optional(),
4225
+ top_p: z.nullable(z.number()).optional(),
4226
+ top_k: z.nullable(z.number()).optional(),
4227
+ tool_choice: z.union([
4228
+ z.lazy(() => GetOnePromptToolChoice2$inboundSchema),
4229
+ GetOnePromptToolChoice1$inboundSchema,
4230
+ ]).optional(),
4231
+ parallel_tool_calls: z.boolean().optional(),
4232
+ modalities: z.nullable(z.array(GetOnePromptModalities$inboundSchema))
1651
4233
  .optional(),
1652
- provider: GetOnePromptProvider$inboundSchema.optional(),
1653
- integration_id: z.nullable(z.string()).optional(),
4234
+ guardrails: z.array(z.lazy(() => GetOnePromptGuardrails$inboundSchema))
4235
+ .optional(),
4236
+ messages: z.array(
4237
+ z.union([
4238
+ z.lazy(() => GetOnePromptMessagesSystemMessage$inboundSchema),
4239
+ z.lazy(() => GetOnePromptMessagesUserMessage$inboundSchema),
4240
+ z.lazy(() => GetOnePromptMessagesAssistantMessage$inboundSchema),
4241
+ z.lazy(() => GetOnePromptMessagesToolMessage$inboundSchema),
4242
+ ]),
4243
+ ).optional(),
4244
+ model: z.nullable(z.string()).optional(),
1654
4245
  version: z.string().optional(),
1655
- messages: z.array(z.lazy(() => GetOnePromptMessages$inboundSchema)),
1656
4246
  }).transform((v) => {
1657
4247
  return remap$(v, {
1658
- "model_db_id": "modelDbId",
1659
- "model_type": "modelType",
1660
- "model_parameters": "modelParameters",
1661
- "integration_id": "integrationId",
4248
+ "frequency_penalty": "frequencyPenalty",
4249
+ "max_tokens": "maxTokens",
4250
+ "max_completion_tokens": "maxCompletionTokens",
4251
+ "top_logprobs": "topLogprobs",
4252
+ "presence_penalty": "presencePenalty",
4253
+ "response_format": "responseFormat",
4254
+ "reasoning_effort": "reasoningEffort",
4255
+ "stream_options": "streamOptions",
4256
+ "top_p": "topP",
4257
+ "top_k": "topK",
4258
+ "tool_choice": "toolChoice",
4259
+ "parallel_tool_calls": "parallelToolCalls",
1662
4260
  });
1663
4261
  });
1664
4262
  /** @internal */
1665
- export type GetOnePromptPromptConfig$Outbound = {
1666
- stream?: boolean | undefined;
1667
- model?: string | undefined;
1668
- model_db_id?: string | null | undefined;
1669
- model_type?: string | null | undefined;
1670
- model_parameters?: GetOnePromptModelParameters$Outbound | undefined;
1671
- provider?: string | undefined;
1672
- integration_id?: string | null | undefined;
4263
+ export type GetOnePromptPromptField$Outbound = {
4264
+ audio?: GetOnePromptAudio$Outbound | null | undefined;
4265
+ frequency_penalty?: number | null | undefined;
4266
+ max_tokens?: number | null | undefined;
4267
+ max_completion_tokens?: number | null | undefined;
4268
+ logprobs?: boolean | null | undefined;
4269
+ top_logprobs?: number | null | undefined;
4270
+ n?: number | null | undefined;
4271
+ presence_penalty?: number | null | undefined;
4272
+ response_format?:
4273
+ | GetOnePromptResponseFormatText$Outbound
4274
+ | GetOnePromptResponseFormatJSONObject$Outbound
4275
+ | GetOnePromptResponseFormatPromptsJSONSchema$Outbound
4276
+ | undefined;
4277
+ reasoning_effort?: string | undefined;
4278
+ verbosity?: string | undefined;
4279
+ seed?: number | null | undefined;
4280
+ stop?: string | Array<string> | null | undefined;
4281
+ stream_options?: GetOnePromptStreamOptions$Outbound | null | undefined;
4282
+ thinking?:
4283
+ | components.ThinkingConfigDisabledSchema$Outbound
4284
+ | components.ThinkingConfigEnabledSchema$Outbound
4285
+ | undefined;
4286
+ temperature?: number | null | undefined;
4287
+ top_p?: number | null | undefined;
4288
+ top_k?: number | null | undefined;
4289
+ tool_choice?: GetOnePromptToolChoice2$Outbound | string | undefined;
4290
+ parallel_tool_calls?: boolean | undefined;
4291
+ modalities?: Array<string> | null | undefined;
4292
+ guardrails?: Array<GetOnePromptGuardrails$Outbound> | undefined;
4293
+ messages?:
4294
+ | Array<
4295
+ | GetOnePromptMessagesSystemMessage$Outbound
4296
+ | GetOnePromptMessagesUserMessage$Outbound
4297
+ | GetOnePromptMessagesAssistantMessage$Outbound
4298
+ | GetOnePromptMessagesToolMessage$Outbound
4299
+ >
4300
+ | undefined;
4301
+ model?: string | null | undefined;
1673
4302
  version?: string | undefined;
1674
- messages: Array<GetOnePromptMessages$Outbound>;
1675
4303
  };
1676
4304
 
1677
4305
  /** @internal */
1678
- export const GetOnePromptPromptConfig$outboundSchema: z.ZodType<
1679
- GetOnePromptPromptConfig$Outbound,
4306
+ export const GetOnePromptPromptField$outboundSchema: z.ZodType<
4307
+ GetOnePromptPromptField$Outbound,
1680
4308
  z.ZodTypeDef,
1681
- GetOnePromptPromptConfig
4309
+ GetOnePromptPromptField
1682
4310
  > = z.object({
1683
- stream: z.boolean().optional(),
1684
- model: z.string().optional(),
1685
- modelDbId: z.nullable(z.string()).optional(),
1686
- modelType: z.nullable(GetOnePromptModelType$outboundSchema).optional(),
1687
- modelParameters: z.lazy(() => GetOnePromptModelParameters$outboundSchema)
4311
+ audio: z.nullable(z.lazy(() => GetOnePromptAudio$outboundSchema)).optional(),
4312
+ frequencyPenalty: z.nullable(z.number()).optional(),
4313
+ maxTokens: z.nullable(z.number().int()).optional(),
4314
+ maxCompletionTokens: z.nullable(z.number().int()).optional(),
4315
+ logprobs: z.nullable(z.boolean()).optional(),
4316
+ topLogprobs: z.nullable(z.number().int()).optional(),
4317
+ n: z.nullable(z.number().int()).optional(),
4318
+ presencePenalty: z.nullable(z.number()).optional(),
4319
+ responseFormat: z.union([
4320
+ z.lazy(() => GetOnePromptResponseFormatText$outboundSchema),
4321
+ z.lazy(() => GetOnePromptResponseFormatJSONObject$outboundSchema),
4322
+ z.lazy(() => GetOnePromptResponseFormatPromptsJSONSchema$outboundSchema),
4323
+ ]).optional(),
4324
+ reasoningEffort: GetOnePromptReasoningEffort$outboundSchema.optional(),
4325
+ verbosity: z.string().optional(),
4326
+ seed: z.nullable(z.number()).optional(),
4327
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
4328
+ streamOptions: z.nullable(
4329
+ z.lazy(() => GetOnePromptStreamOptions$outboundSchema),
4330
+ ).optional(),
4331
+ thinking: z.union([
4332
+ components.ThinkingConfigDisabledSchema$outboundSchema,
4333
+ components.ThinkingConfigEnabledSchema$outboundSchema,
4334
+ ]).optional(),
4335
+ temperature: z.nullable(z.number()).optional(),
4336
+ topP: z.nullable(z.number()).optional(),
4337
+ topK: z.nullable(z.number()).optional(),
4338
+ toolChoice: z.union([
4339
+ z.lazy(() => GetOnePromptToolChoice2$outboundSchema),
4340
+ GetOnePromptToolChoice1$outboundSchema,
4341
+ ]).optional(),
4342
+ parallelToolCalls: z.boolean().optional(),
4343
+ modalities: z.nullable(z.array(GetOnePromptModalities$outboundSchema))
1688
4344
  .optional(),
1689
- provider: GetOnePromptProvider$outboundSchema.optional(),
1690
- integrationId: z.nullable(z.string()).optional(),
4345
+ guardrails: z.array(z.lazy(() => GetOnePromptGuardrails$outboundSchema))
4346
+ .optional(),
4347
+ messages: z.array(
4348
+ z.union([
4349
+ z.lazy(() => GetOnePromptMessagesSystemMessage$outboundSchema),
4350
+ z.lazy(() => GetOnePromptMessagesUserMessage$outboundSchema),
4351
+ z.lazy(() => GetOnePromptMessagesAssistantMessage$outboundSchema),
4352
+ z.lazy(() => GetOnePromptMessagesToolMessage$outboundSchema),
4353
+ ]),
4354
+ ).optional(),
4355
+ model: z.nullable(z.string()).optional(),
1691
4356
  version: z.string().optional(),
1692
- messages: z.array(z.lazy(() => GetOnePromptMessages$outboundSchema)),
1693
4357
  }).transform((v) => {
1694
4358
  return remap$(v, {
1695
- modelDbId: "model_db_id",
1696
- modelType: "model_type",
1697
- modelParameters: "model_parameters",
1698
- integrationId: "integration_id",
4359
+ frequencyPenalty: "frequency_penalty",
4360
+ maxTokens: "max_tokens",
4361
+ maxCompletionTokens: "max_completion_tokens",
4362
+ topLogprobs: "top_logprobs",
4363
+ presencePenalty: "presence_penalty",
4364
+ responseFormat: "response_format",
4365
+ reasoningEffort: "reasoning_effort",
4366
+ streamOptions: "stream_options",
4367
+ topP: "top_p",
4368
+ topK: "top_k",
4369
+ toolChoice: "tool_choice",
4370
+ parallelToolCalls: "parallel_tool_calls",
1699
4371
  });
1700
4372
  });
1701
4373
 
1702
- export function getOnePromptPromptConfigToJSON(
1703
- getOnePromptPromptConfig: GetOnePromptPromptConfig,
4374
+ export function getOnePromptPromptFieldToJSON(
4375
+ getOnePromptPromptField: GetOnePromptPromptField,
1704
4376
  ): string {
1705
4377
  return JSON.stringify(
1706
- GetOnePromptPromptConfig$outboundSchema.parse(getOnePromptPromptConfig),
4378
+ GetOnePromptPromptField$outboundSchema.parse(getOnePromptPromptField),
1707
4379
  );
1708
4380
  }
1709
- export function getOnePromptPromptConfigFromJSON(
4381
+ export function getOnePromptPromptFieldFromJSON(
1710
4382
  jsonString: string,
1711
- ): SafeParseResult<GetOnePromptPromptConfig, SDKValidationError> {
4383
+ ): SafeParseResult<GetOnePromptPromptField, SDKValidationError> {
1712
4384
  return safeParse(
1713
4385
  jsonString,
1714
- (x) => GetOnePromptPromptConfig$inboundSchema.parse(JSON.parse(x)),
1715
- `Failed to parse 'GetOnePromptPromptConfig' from JSON`,
4386
+ (x) => GetOnePromptPromptField$inboundSchema.parse(JSON.parse(x)),
4387
+ `Failed to parse 'GetOnePromptPromptField' from JSON`,
1716
4388
  );
1717
4389
  }
1718
4390
 
@@ -1800,7 +4472,9 @@ export const GetOnePromptPrompt$inboundSchema: z.ZodType<
1800
4472
  updated_by_id: z.nullable(z.string()).optional(),
1801
4473
  display_name: z.string(),
1802
4474
  description: z.nullable(z.string()).optional(),
1803
- prompt_config: z.lazy(() => GetOnePromptPromptConfig$inboundSchema),
4475
+ prompt_config: z.lazy(() => GetOnePromptPromptConfig$inboundSchema)
4476
+ .optional(),
4477
+ prompt: z.lazy(() => GetOnePromptPromptField$inboundSchema),
1804
4478
  metadata: z.lazy(() => GetOnePromptMetadata$inboundSchema).optional(),
1805
4479
  }).transform((v) => {
1806
4480
  return remap$(v, {
@@ -1824,7 +4498,8 @@ export type GetOnePromptPrompt$Outbound = {
1824
4498
  updated_by_id?: string | null | undefined;
1825
4499
  display_name: string;
1826
4500
  description?: string | null | undefined;
1827
- prompt_config: GetOnePromptPromptConfig$Outbound;
4501
+ prompt_config?: GetOnePromptPromptConfig$Outbound | undefined;
4502
+ prompt: GetOnePromptPromptField$Outbound;
1828
4503
  metadata?: GetOnePromptMetadata$Outbound | undefined;
1829
4504
  };
1830
4505
 
@@ -1844,7 +4519,9 @@ export const GetOnePromptPrompt$outboundSchema: z.ZodType<
1844
4519
  updatedById: z.nullable(z.string()).optional(),
1845
4520
  displayName: z.string(),
1846
4521
  description: z.nullable(z.string()).optional(),
1847
- promptConfig: z.lazy(() => GetOnePromptPromptConfig$outboundSchema),
4522
+ promptConfig: z.lazy(() => GetOnePromptPromptConfig$outboundSchema)
4523
+ .optional(),
4524
+ prompt: z.lazy(() => GetOnePromptPromptField$outboundSchema),
1848
4525
  metadata: z.lazy(() => GetOnePromptMetadata$outboundSchema).optional(),
1849
4526
  }).transform((v) => {
1850
4527
  return remap$(v, {