@orq-ai/node 4.17.0-rc.28 → 4.17.0-rc.29
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.
- package/funcs/alertsCreate.d.ts +1 -1
- package/funcs/alertsCreate.js +1 -1
- package/funcs/alertsList.js +1 -0
- package/funcs/alertsList.js.map +1 -1
- package/funcs/alertsUpdate.d.ts +1 -1
- package/funcs/alertsUpdate.js +1 -1
- package/funcs/routerClassifyCreate.d.ts +3 -0
- package/funcs/routerClassifyCreate.d.ts.map +1 -1
- package/funcs/routerClassifyCreate.js +3 -0
- package/funcs/routerClassifyCreate.js.map +1 -1
- package/funcs/routerDecisionsCreate.d.ts +3 -0
- package/funcs/routerDecisionsCreate.d.ts.map +1 -1
- package/funcs/routerDecisionsCreate.js +3 -0
- package/funcs/routerDecisionsCreate.js.map +1 -1
- package/funcs/telemetryListCapabilities.js +2 -0
- package/funcs/telemetryListCapabilities.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/alert.d.ts +3 -1
- package/models/components/alert.d.ts.map +1 -1
- package/models/components/alert.js +2 -0
- package/models/components/alert.js.map +1 -1
- package/models/components/alertquery.d.ts +16 -4
- package/models/components/alertquery.d.ts.map +1 -1
- package/models/components/alertquery.js +5 -0
- package/models/components/alertquery.js.map +1 -1
- package/models/components/alertscope.d.ts +13 -0
- package/models/components/alertscope.d.ts.map +1 -0
- package/models/components/alertscope.js +51 -0
- package/models/components/alertscope.js.map +1 -0
- package/models/components/alerttelemetrysource.d.ts +13 -0
- package/models/components/alerttelemetrysource.d.ts.map +1 -0
- package/models/components/alerttelemetrysource.js +50 -0
- package/models/components/alerttelemetrysource.js.map +1 -0
- package/models/components/alerttrigger.d.ts +8 -0
- package/models/components/alerttrigger.d.ts.map +1 -1
- package/models/components/alerttrigger.js +2 -0
- package/models/components/alerttrigger.js.map +1 -1
- package/models/components/audiocontentpartschema.d.ts +5 -5
- package/models/components/audiocontentpartschema.d.ts.map +1 -1
- package/models/components/audiocontentpartschema.js +6 -7
- package/models/components/audiocontentpartschema.js.map +1 -1
- package/models/components/classifyanswer.d.ts +2 -1
- package/models/components/classifyanswer.d.ts.map +1 -1
- package/models/components/classifyanswer.js +2 -0
- package/models/components/classifyanswer.js.map +1 -1
- package/models/components/classifyasset.d.ts +52 -0
- package/models/components/classifyasset.d.ts.map +1 -0
- package/models/components/classifyasset.js +75 -0
- package/models/components/classifyasset.js.map +1 -0
- package/models/components/classifybox.d.ts +25 -0
- package/models/components/classifybox.d.ts.map +1 -0
- package/models/components/classifybox.js +53 -0
- package/models/components/classifybox.js.map +1 -0
- package/models/components/classifyboxanswer.d.ts +16 -0
- package/models/components/classifyboxanswer.d.ts.map +1 -0
- package/models/components/classifyboxanswer.js +53 -0
- package/models/components/classifyboxanswer.js.map +1 -0
- package/models/components/classifychoiceanswer.d.ts +1 -1
- package/models/components/classifyscoreanswer.d.ts +1 -1
- package/models/components/createalertrequest.d.ts +6 -3
- package/models/components/createalertrequest.d.ts.map +1 -1
- package/models/components/createalertrequest.js +3 -1
- package/models/components/createalertrequest.js.map +1 -1
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/updatealertrequest.d.ts +4 -1
- package/models/components/updatealertrequest.d.ts.map +1 -1
- package/models/components/updatealertrequest.js.map +1 -1
- package/models/operations/alertlist.d.ts +9 -0
- package/models/operations/alertlist.d.ts.map +1 -1
- package/models/operations/alertlist.js +2 -0
- package/models/operations/alertlist.js.map +1 -1
- package/models/operations/createclassify.d.ts +118 -17
- package/models/operations/createclassify.d.ts.map +1 -1
- package/models/operations/createclassify.js +41 -5
- package/models/operations/createclassify.js.map +1 -1
- package/models/operations/createdecisions.d.ts +124 -23
- package/models/operations/createdecisions.d.ts.map +1 -1
- package/models/operations/createdecisions.js +48 -10
- package/models/operations/createdecisions.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listdeploymentversions.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/telemetrylistcapabilities.d.ts +16 -0
- package/models/operations/telemetrylistcapabilities.d.ts.map +1 -1
- package/models/operations/telemetrylistcapabilities.js +8 -0
- package/models/operations/telemetrylistcapabilities.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/sdk/alerts.d.ts +2 -2
- package/sdk/alerts.js +2 -2
- package/sdk/classify.d.ts +3 -0
- package/sdk/classify.d.ts.map +1 -1
- package/sdk/classify.js +3 -0
- package/sdk/classify.js.map +1 -1
- package/sdk/decisions.d.ts +3 -0
- package/sdk/decisions.d.ts.map +1 -1
- package/sdk/decisions.js +3 -0
- package/sdk/decisions.js.map +1 -1
- package/src/funcs/alertsCreate.ts +1 -1
- package/src/funcs/alertsList.ts +1 -0
- package/src/funcs/alertsUpdate.ts +1 -1
- package/src/funcs/routerClassifyCreate.ts +3 -0
- package/src/funcs/routerDecisionsCreate.ts +3 -0
- package/src/funcs/telemetryListCapabilities.ts +2 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/alert.ts +4 -1
- package/src/models/components/alertquery.ts +24 -4
- package/src/models/components/alertscope.ts +20 -0
- package/src/models/components/alerttelemetrysource.ts +22 -0
- package/src/models/components/alerttrigger.ts +9 -0
- package/src/models/components/audiocontentpartschema.ts +13 -9
- package/src/models/components/classifyanswer.ts +6 -0
- package/src/models/components/classifyasset.ts +81 -0
- package/src/models/components/classifybox.ts +49 -0
- package/src/models/components/classifyboxanswer.ts +39 -0
- package/src/models/components/classifychoiceanswer.ts +1 -1
- package/src/models/components/classifyscoreanswer.ts +1 -1
- package/src/models/components/createalertrequest.ts +8 -4
- package/src/models/components/index.ts +5 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/updatealertrequest.ts +4 -1
- package/src/models/operations/alertlist.ts +10 -0
- package/src/models/operations/createclassify.ts +169 -21
- package/src/models/operations/createdecisions.ts +197 -32
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listdeploymentversions.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/telemetrylistcapabilities.ts +24 -0
- package/src/models/operations/updatetool.ts +4 -4
- package/src/sdk/alerts.ts +2 -2
- package/src/sdk/classify.ts +3 -0
- package/src/sdk/decisions.ts +3 -0
|
@@ -9,6 +9,24 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import * as components from "../components/index.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
14
|
+
*/
|
|
15
|
+
export type CreateClassifyQuestionsRouterClassifyInstructions = string | {
|
|
16
|
+
[k: string]: any;
|
|
17
|
+
} | Array<any>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Beta, TypeSafe jev-preview only. Locates one target in an image from assets and returns its bounding box. Always returns a box; pair it with a noul question to check presence.
|
|
21
|
+
*/
|
|
22
|
+
export type BoxQuestion = {
|
|
23
|
+
/**
|
|
24
|
+
* The evaluation prompt for this question. A string, an object or an array.
|
|
25
|
+
*/
|
|
26
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
27
|
+
type: "box";
|
|
28
|
+
};
|
|
29
|
+
|
|
12
30
|
/**
|
|
13
31
|
* The evaluation prompt for this question. A string, an object or an array.
|
|
14
32
|
*/
|
|
@@ -22,9 +40,9 @@ export type CreateClassifyQuestionsInstructions =
|
|
|
22
40
|
*/
|
|
23
41
|
export type ScoreQuestion = {
|
|
24
42
|
/**
|
|
25
|
-
* Ordered level descriptions from lowest to highest. At least two levels.
|
|
43
|
+
* Ordered level descriptions from lowest to highest. At least two levels. Each level can be a string, an object or an array.
|
|
26
44
|
*/
|
|
27
|
-
criteria: Array<
|
|
45
|
+
criteria: Array<any>;
|
|
28
46
|
/**
|
|
29
47
|
* The evaluation prompt for this question. A string, an object or an array.
|
|
30
48
|
*/
|
|
@@ -32,6 +50,11 @@ export type ScoreQuestion = {
|
|
|
32
50
|
type: "score";
|
|
33
51
|
};
|
|
34
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The option description, or null.
|
|
55
|
+
*/
|
|
56
|
+
export type QuestionsCriteria = string | { [k: string]: any } | Array<any>;
|
|
57
|
+
|
|
35
58
|
/**
|
|
36
59
|
* The evaluation prompt for this question. A string, an object or an array.
|
|
37
60
|
*/
|
|
@@ -42,9 +65,9 @@ export type QuestionsInstructions = string | { [k: string]: any } | Array<any>;
|
|
|
42
65
|
*/
|
|
43
66
|
export type ChoiceQuestion = {
|
|
44
67
|
/**
|
|
45
|
-
* Options keyed by name, each mapped to a description or null.
|
|
68
|
+
* Options keyed by name, each mapped to a description or null. A description can be a string, an object or an array.
|
|
46
69
|
*/
|
|
47
|
-
criteria: { [k: string]: string | null };
|
|
70
|
+
criteria: { [k: string]: string | { [k: string]: any } | Array<any> | null };
|
|
48
71
|
/**
|
|
49
72
|
* The evaluation prompt for this question. A string, an object or an array.
|
|
50
73
|
*/
|
|
@@ -52,12 +75,28 @@ export type ChoiceQuestion = {
|
|
|
52
75
|
type: "choice";
|
|
53
76
|
};
|
|
54
77
|
|
|
78
|
+
/**
|
|
79
|
+
* What false means. A string, an object or an array.
|
|
80
|
+
*/
|
|
81
|
+
export type False = string | { [k: string]: any } | Array<any>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* What true means. A string, an object or an array.
|
|
85
|
+
*/
|
|
86
|
+
export type True = string | { [k: string]: any } | Array<any>;
|
|
87
|
+
|
|
55
88
|
/**
|
|
56
89
|
* Optional descriptions of what true and false mean.
|
|
57
90
|
*/
|
|
58
91
|
export type Criteria = {
|
|
59
|
-
|
|
60
|
-
|
|
92
|
+
/**
|
|
93
|
+
* What false means. A string, an object or an array.
|
|
94
|
+
*/
|
|
95
|
+
false?: string | { [k: string]: any } | Array<any> | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* What true means. A string, an object or an array.
|
|
98
|
+
*/
|
|
99
|
+
true?: string | { [k: string]: any } | Array<any> | undefined;
|
|
61
100
|
};
|
|
62
101
|
|
|
63
102
|
/**
|
|
@@ -80,21 +119,29 @@ export type NoulQuestion = {
|
|
|
80
119
|
type: "noul";
|
|
81
120
|
};
|
|
82
121
|
|
|
83
|
-
export type Questions =
|
|
122
|
+
export type Questions =
|
|
123
|
+
| NoulQuestion
|
|
124
|
+
| ChoiceQuestion
|
|
125
|
+
| ScoreQuestion
|
|
126
|
+
| BoxQuestion;
|
|
84
127
|
|
|
85
128
|
/**
|
|
86
|
-
* The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
129
|
+
* The content to evaluate. A string, an object or an array. For TypeSafe models, reference images declared in assets by writing their reference string. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
87
130
|
*/
|
|
88
131
|
export type State = string | { [k: string]: any } | Array<any>;
|
|
89
132
|
|
|
90
133
|
export type CreateClassifyRequestBody = {
|
|
134
|
+
/**
|
|
135
|
+
* Beta, TypeSafe models only. Inline images keyed by a reference string. Write the reference in state, instructions or criteria wherever the image belongs; every asset must be referenced. Required for box questions.
|
|
136
|
+
*/
|
|
137
|
+
assets?: { [k: string]: components.ClassifyAsset } | undefined;
|
|
91
138
|
cache?: components.ClassifyCacheConfig | undefined;
|
|
92
139
|
/**
|
|
93
140
|
* HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.
|
|
94
141
|
*/
|
|
95
142
|
fallbackOnCodes?: Array<number> | null | undefined;
|
|
96
143
|
/**
|
|
97
|
-
* Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks.
|
|
144
|
+
* Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Requests with images in state require native OpenAI image-capable fallbacks; requests with assets or box questions require TypeSafe fallbacks.
|
|
98
145
|
*/
|
|
99
146
|
fallbacks?: Array<components.FallbackConfig> | null | undefined;
|
|
100
147
|
identity?: components.ResponseIdentity | undefined;
|
|
@@ -113,10 +160,12 @@ export type CreateClassifyRequestBody = {
|
|
|
113
160
|
/**
|
|
114
161
|
* Typed questions keyed by an identifier of your choice. Each answer is returned under the same key.
|
|
115
162
|
*/
|
|
116
|
-
questions: {
|
|
163
|
+
questions: {
|
|
164
|
+
[k: string]: NoulQuestion | ChoiceQuestion | ScoreQuestion | BoxQuestion;
|
|
165
|
+
};
|
|
117
166
|
retry?: components.ClassifyRetryConfig | undefined;
|
|
118
167
|
/**
|
|
119
|
-
* The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
168
|
+
* The content to evaluate. A string, an object or an array. For TypeSafe models, reference images declared in assets by writing their reference string. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
|
|
120
169
|
*/
|
|
121
170
|
state: string | { [k: string]: any } | Array<any>;
|
|
122
171
|
timeout?: components.ClassifyTimeoutConfig | undefined;
|
|
@@ -138,6 +187,51 @@ export type CreateClassifyResponseBody = {
|
|
|
138
187
|
usage: components.ClassifyUsage;
|
|
139
188
|
};
|
|
140
189
|
|
|
190
|
+
/** @internal */
|
|
191
|
+
export type CreateClassifyQuestionsRouterClassifyInstructions$Outbound =
|
|
192
|
+
| string
|
|
193
|
+
| { [k: string]: any }
|
|
194
|
+
| Array<any>;
|
|
195
|
+
|
|
196
|
+
/** @internal */
|
|
197
|
+
export const CreateClassifyQuestionsRouterClassifyInstructions$outboundSchema:
|
|
198
|
+
z.ZodType<
|
|
199
|
+
CreateClassifyQuestionsRouterClassifyInstructions$Outbound,
|
|
200
|
+
z.ZodTypeDef,
|
|
201
|
+
CreateClassifyQuestionsRouterClassifyInstructions
|
|
202
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
203
|
+
|
|
204
|
+
export function createClassifyQuestionsRouterClassifyInstructionsToJSON(
|
|
205
|
+
createClassifyQuestionsRouterClassifyInstructions:
|
|
206
|
+
CreateClassifyQuestionsRouterClassifyInstructions,
|
|
207
|
+
): string {
|
|
208
|
+
return JSON.stringify(
|
|
209
|
+
CreateClassifyQuestionsRouterClassifyInstructions$outboundSchema.parse(
|
|
210
|
+
createClassifyQuestionsRouterClassifyInstructions,
|
|
211
|
+
),
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** @internal */
|
|
216
|
+
export type BoxQuestion$Outbound = {
|
|
217
|
+
instructions: string | { [k: string]: any } | Array<any>;
|
|
218
|
+
type: "box";
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/** @internal */
|
|
222
|
+
export const BoxQuestion$outboundSchema: z.ZodType<
|
|
223
|
+
BoxQuestion$Outbound,
|
|
224
|
+
z.ZodTypeDef,
|
|
225
|
+
BoxQuestion
|
|
226
|
+
> = z.object({
|
|
227
|
+
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
228
|
+
type: z.literal("box"),
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
export function boxQuestionToJSON(boxQuestion: BoxQuestion): string {
|
|
232
|
+
return JSON.stringify(BoxQuestion$outboundSchema.parse(boxQuestion));
|
|
233
|
+
}
|
|
234
|
+
|
|
141
235
|
/** @internal */
|
|
142
236
|
export type CreateClassifyQuestionsInstructions$Outbound = string | {
|
|
143
237
|
[k: string]: any;
|
|
@@ -162,7 +256,7 @@ export function createClassifyQuestionsInstructionsToJSON(
|
|
|
162
256
|
|
|
163
257
|
/** @internal */
|
|
164
258
|
export type ScoreQuestion$Outbound = {
|
|
165
|
-
criteria: Array<
|
|
259
|
+
criteria: Array<any>;
|
|
166
260
|
instructions: string | { [k: string]: any } | Array<any>;
|
|
167
261
|
type: "score";
|
|
168
262
|
};
|
|
@@ -173,7 +267,7 @@ export const ScoreQuestion$outboundSchema: z.ZodType<
|
|
|
173
267
|
z.ZodTypeDef,
|
|
174
268
|
ScoreQuestion
|
|
175
269
|
> = z.object({
|
|
176
|
-
criteria: z.array(z.
|
|
270
|
+
criteria: z.array(z.any()),
|
|
177
271
|
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
178
272
|
type: z.literal("score"),
|
|
179
273
|
});
|
|
@@ -182,6 +276,27 @@ export function scoreQuestionToJSON(scoreQuestion: ScoreQuestion): string {
|
|
|
182
276
|
return JSON.stringify(ScoreQuestion$outboundSchema.parse(scoreQuestion));
|
|
183
277
|
}
|
|
184
278
|
|
|
279
|
+
/** @internal */
|
|
280
|
+
export type QuestionsCriteria$Outbound =
|
|
281
|
+
| string
|
|
282
|
+
| { [k: string]: any }
|
|
283
|
+
| Array<any>;
|
|
284
|
+
|
|
285
|
+
/** @internal */
|
|
286
|
+
export const QuestionsCriteria$outboundSchema: z.ZodType<
|
|
287
|
+
QuestionsCriteria$Outbound,
|
|
288
|
+
z.ZodTypeDef,
|
|
289
|
+
QuestionsCriteria
|
|
290
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
291
|
+
|
|
292
|
+
export function questionsCriteriaToJSON(
|
|
293
|
+
questionsCriteria: QuestionsCriteria,
|
|
294
|
+
): string {
|
|
295
|
+
return JSON.stringify(
|
|
296
|
+
QuestionsCriteria$outboundSchema.parse(questionsCriteria),
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
185
300
|
/** @internal */
|
|
186
301
|
export type QuestionsInstructions$Outbound =
|
|
187
302
|
| string
|
|
@@ -205,7 +320,7 @@ export function questionsInstructionsToJSON(
|
|
|
205
320
|
|
|
206
321
|
/** @internal */
|
|
207
322
|
export type ChoiceQuestion$Outbound = {
|
|
208
|
-
criteria: { [k: string]: string | null };
|
|
323
|
+
criteria: { [k: string]: string | { [k: string]: any } | Array<any> | null };
|
|
209
324
|
instructions: string | { [k: string]: any } | Array<any>;
|
|
210
325
|
type: "choice";
|
|
211
326
|
};
|
|
@@ -216,7 +331,9 @@ export const ChoiceQuestion$outboundSchema: z.ZodType<
|
|
|
216
331
|
z.ZodTypeDef,
|
|
217
332
|
ChoiceQuestion
|
|
218
333
|
> = z.object({
|
|
219
|
-
criteria: z.record(
|
|
334
|
+
criteria: z.record(
|
|
335
|
+
z.nullable(z.union([z.string(), z.record(z.any()), z.array(z.any())])),
|
|
336
|
+
),
|
|
220
337
|
instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
221
338
|
type: z.literal("choice"),
|
|
222
339
|
});
|
|
@@ -225,10 +342,35 @@ export function choiceQuestionToJSON(choiceQuestion: ChoiceQuestion): string {
|
|
|
225
342
|
return JSON.stringify(ChoiceQuestion$outboundSchema.parse(choiceQuestion));
|
|
226
343
|
}
|
|
227
344
|
|
|
345
|
+
/** @internal */
|
|
346
|
+
export type False$Outbound = string | { [k: string]: any } | Array<any>;
|
|
347
|
+
|
|
348
|
+
/** @internal */
|
|
349
|
+
export const False$outboundSchema: z.ZodType<
|
|
350
|
+
False$Outbound,
|
|
351
|
+
z.ZodTypeDef,
|
|
352
|
+
False
|
|
353
|
+
> = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
354
|
+
|
|
355
|
+
export function falseToJSON(value: False): string {
|
|
356
|
+
return JSON.stringify(False$outboundSchema.parse(value));
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/** @internal */
|
|
360
|
+
export type True$Outbound = string | { [k: string]: any } | Array<any>;
|
|
361
|
+
|
|
362
|
+
/** @internal */
|
|
363
|
+
export const True$outboundSchema: z.ZodType<True$Outbound, z.ZodTypeDef, True> =
|
|
364
|
+
z.union([z.string(), z.record(z.any()), z.array(z.any())]);
|
|
365
|
+
|
|
366
|
+
export function trueToJSON(value: True): string {
|
|
367
|
+
return JSON.stringify(True$outboundSchema.parse(value));
|
|
368
|
+
}
|
|
369
|
+
|
|
228
370
|
/** @internal */
|
|
229
371
|
export type Criteria$Outbound = {
|
|
230
|
-
false?: string | undefined;
|
|
231
|
-
true?: string | undefined;
|
|
372
|
+
false?: string | { [k: string]: any } | Array<any> | undefined;
|
|
373
|
+
true?: string | { [k: string]: any } | Array<any> | undefined;
|
|
232
374
|
};
|
|
233
375
|
|
|
234
376
|
/** @internal */
|
|
@@ -237,8 +379,8 @@ export const Criteria$outboundSchema: z.ZodType<
|
|
|
237
379
|
z.ZodTypeDef,
|
|
238
380
|
Criteria
|
|
239
381
|
> = z.object({
|
|
240
|
-
false: z.string().optional(),
|
|
241
|
-
true: z.string().optional(),
|
|
382
|
+
false: z.union([z.string(), z.record(z.any()), z.array(z.any())]).optional(),
|
|
383
|
+
true: z.union([z.string(), z.record(z.any()), z.array(z.any())]).optional(),
|
|
242
384
|
});
|
|
243
385
|
|
|
244
386
|
export function criteriaToJSON(criteria: Criteria): string {
|
|
@@ -285,7 +427,8 @@ export function noulQuestionToJSON(noulQuestion: NoulQuestion): string {
|
|
|
285
427
|
export type Questions$Outbound =
|
|
286
428
|
| NoulQuestion$Outbound
|
|
287
429
|
| ChoiceQuestion$Outbound
|
|
288
|
-
| ScoreQuestion$Outbound
|
|
430
|
+
| ScoreQuestion$Outbound
|
|
431
|
+
| BoxQuestion$Outbound;
|
|
289
432
|
|
|
290
433
|
/** @internal */
|
|
291
434
|
export const Questions$outboundSchema: z.ZodType<
|
|
@@ -296,6 +439,7 @@ export const Questions$outboundSchema: z.ZodType<
|
|
|
296
439
|
z.lazy(() => NoulQuestion$outboundSchema),
|
|
297
440
|
z.lazy(() => ChoiceQuestion$outboundSchema),
|
|
298
441
|
z.lazy(() => ScoreQuestion$outboundSchema),
|
|
442
|
+
z.lazy(() => BoxQuestion$outboundSchema),
|
|
299
443
|
]);
|
|
300
444
|
|
|
301
445
|
export function questionsToJSON(questions: Questions): string {
|
|
@@ -318,6 +462,7 @@ export function stateToJSON(state: State): string {
|
|
|
318
462
|
|
|
319
463
|
/** @internal */
|
|
320
464
|
export type CreateClassifyRequestBody$Outbound = {
|
|
465
|
+
assets?: { [k: string]: components.ClassifyAsset$Outbound } | undefined;
|
|
321
466
|
cache?: components.ClassifyCacheConfig$Outbound | undefined;
|
|
322
467
|
fallback_on_codes?: Array<number> | null | undefined;
|
|
323
468
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
@@ -329,7 +474,8 @@ export type CreateClassifyRequestBody$Outbound = {
|
|
|
329
474
|
[k: string]:
|
|
330
475
|
| NoulQuestion$Outbound
|
|
331
476
|
| ChoiceQuestion$Outbound
|
|
332
|
-
| ScoreQuestion$Outbound
|
|
477
|
+
| ScoreQuestion$Outbound
|
|
478
|
+
| BoxQuestion$Outbound;
|
|
333
479
|
};
|
|
334
480
|
retry?: components.ClassifyRetryConfig$Outbound | undefined;
|
|
335
481
|
state: string | { [k: string]: any } | Array<any>;
|
|
@@ -342,6 +488,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
342
488
|
z.ZodTypeDef,
|
|
343
489
|
CreateClassifyRequestBody
|
|
344
490
|
> = z.object({
|
|
491
|
+
assets: z.record(components.ClassifyAsset$outboundSchema).optional(),
|
|
345
492
|
cache: components.ClassifyCacheConfig$outboundSchema.optional(),
|
|
346
493
|
fallbackOnCodes: z.nullable(z.array(z.number().int())).optional(),
|
|
347
494
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
@@ -355,6 +502,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
355
502
|
z.lazy(() => NoulQuestion$outboundSchema),
|
|
356
503
|
z.lazy(() => ChoiceQuestion$outboundSchema),
|
|
357
504
|
z.lazy(() => ScoreQuestion$outboundSchema),
|
|
505
|
+
z.lazy(() => BoxQuestion$outboundSchema),
|
|
358
506
|
]),
|
|
359
507
|
),
|
|
360
508
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|