@orq-ai/node 4.11.0-rc.53 → 4.11.0-rc.55
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/createskillrequest.d.ts +6 -6
- package/models/components/createskillrequest.d.ts.map +1 -1
- package/models/components/createskillrequest.js +6 -7
- package/models/components/createskillrequest.js.map +1 -1
- package/models/components/evaluatorresponsefunction.d.ts +270 -0
- package/models/components/evaluatorresponsefunction.d.ts.map +1 -0
- package/models/components/evaluatorresponsefunction.js +491 -0
- package/models/components/evaluatorresponsefunction.js.map +1 -0
- package/models/components/evaluatorresponsehttp.d.ts +76 -0
- package/models/components/evaluatorresponsehttp.d.ts.map +1 -0
- package/models/components/evaluatorresponsehttp.js +146 -0
- package/models/components/evaluatorresponsehttp.js.map +1 -0
- package/models/components/evaluatorresponsejsonschema.d.ts +62 -0
- package/models/components/evaluatorresponsejsonschema.d.ts.map +1 -0
- package/models/components/evaluatorresponsejsonschema.js +135 -0
- package/models/components/evaluatorresponsejsonschema.js.map +1 -0
- package/models/components/evaluatorresponsellm.d.ts +140 -0
- package/models/components/evaluatorresponsellm.d.ts.map +1 -0
- package/models/components/evaluatorresponsellm.js +250 -0
- package/models/components/evaluatorresponsellm.js.map +1 -0
- package/models/components/evaluatorresponsepython.d.ts +62 -0
- package/models/components/evaluatorresponsepython.d.ts.map +1 -0
- package/models/components/evaluatorresponsepython.js +136 -0
- package/models/components/evaluatorresponsepython.js.map +1 -0
- package/models/components/evaluatorresponseragas.d.ts +80 -0
- package/models/components/evaluatorresponseragas.d.ts.map +1 -0
- package/models/components/evaluatorresponseragas.js +155 -0
- package/models/components/evaluatorresponseragas.js.map +1 -0
- package/models/components/evaluatorresponsetypescript.d.ts +62 -0
- package/models/components/evaluatorresponsetypescript.d.ts.map +1 -0
- package/models/components/evaluatorresponsetypescript.js +136 -0
- package/models/components/evaluatorresponsetypescript.js.map +1 -0
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +36 -36
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +33 -34
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/modelsconfig.d.ts +5 -5
- package/models/components/modelsconfig.d.ts.map +1 -1
- package/models/components/modelsconfig.js +6 -6
- package/models/components/modelsconfig.js.map +1 -1
- package/models/components/piiredactionpluginauto.d.ts +127 -0
- package/models/components/piiredactionpluginauto.d.ts.map +1 -0
- package/models/components/piiredactionpluginauto.js +157 -0
- package/models/components/piiredactionpluginauto.js.map +1 -0
- package/models/components/piiredactionpluginen.d.ts +31 -17
- package/models/components/piiredactionpluginen.d.ts.map +1 -1
- package/models/components/piiredactionpluginen.js +29 -20
- package/models/components/piiredactionpluginen.js.map +1 -1
- package/models/components/piiredactionpluginnl.d.ts +16 -2
- package/models/components/piiredactionpluginnl.d.ts.map +1 -1
- package/models/components/piiredactionpluginnl.js +13 -3
- package/models/components/piiredactionpluginnl.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/textcontentpartschema.d.ts +10 -10
- package/models/components/textcontentpartschema.d.ts.map +1 -1
- package/models/components/textcontentpartschema.js +11 -11
- package/models/components/textcontentpartschema.js.map +1 -1
- package/models/operations/createagentrequest.d.ts +12 -12
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +8 -0
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +4 -4
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +2 -0
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createcompletion.d.ts +4 -4
- package/models/operations/createcompletion.d.ts.map +1 -1
- package/models/operations/createcompletion.js +2 -0
- package/models/operations/createcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.d.ts +22 -852
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +30 -1341
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createimage.d.ts +4 -4
- package/models/operations/createimage.d.ts.map +1 -1
- package/models/operations/createimage.js +2 -0
- package/models/operations/createimage.js.map +1 -1
- package/models/operations/createprompt.d.ts +14 -14
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +14 -10
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/creatererank.d.ts +4 -4
- package/models/operations/creatererank.d.ts.map +1 -1
- package/models/operations/creatererank.js +2 -0
- package/models/operations/creatererank.js.map +1 -1
- package/models/operations/createtool.d.ts +8 -8
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +16 -16
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +8 -8
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +10 -10
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/getallprompts.d.ts +2 -2
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +2 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.d.ts +20 -20
- package/models/operations/getalltools.d.ts.map +1 -1
- package/models/operations/getalltools.js +28 -26
- package/models/operations/getalltools.js.map +1 -1
- package/models/operations/getevals.d.ts +3 -833
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +16 -1314
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +2 -2
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +2 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +2 -2
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +2 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/invokeeval.d.ts +7 -7
- package/models/operations/invokeeval.d.ts.map +1 -1
- package/models/operations/invokeeval.js +11 -11
- package/models/operations/invokeeval.js.map +1 -1
- package/models/operations/listagents.d.ts +4 -4
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +4 -0
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listpromptversions.d.ts +2 -2
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +2 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveagentrequest.d.ts +4 -4
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +4 -0
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +8 -8
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +5 -1
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +8 -8
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +5 -1
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +12 -12
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +8 -0
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.d.ts +2 -832
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +9 -1304
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updateprompt.d.ts +6 -6
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +4 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/createskillrequest.ts +27 -20
- package/src/models/components/evaluatorresponsefunction.ts +1107 -0
- package/src/models/components/evaluatorresponsehttp.ts +247 -0
- package/src/models/components/evaluatorresponsejsonschema.ts +214 -0
- package/src/models/components/evaluatorresponsellm.ts +442 -0
- package/src/models/components/evaluatorresponsepython.ts +234 -0
- package/src/models/components/evaluatorresponseragas.ts +257 -0
- package/src/models/components/evaluatorresponsetypescript.ts +247 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/invokedeploymentrequest.ts +119 -95
- package/src/models/components/modelsconfig.ts +11 -10
- package/src/models/components/piiredactionpluginauto.ts +186 -0
- package/src/models/components/piiredactionpluginen.ts +59 -29
- package/src/models/components/piiredactionpluginnl.ts +26 -4
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/textcontentpartschema.ts +23 -19
- package/src/models/operations/createagentrequest.ts +42 -10
- package/src/models/operations/createchatcompletion.ts +12 -3
- package/src/models/operations/createcompletion.ts +12 -3
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +673 -3909
- package/src/models/operations/createimage.ts +12 -3
- package/src/models/operations/createprompt.ts +39 -27
- package/src/models/operations/creatererank.ts +12 -3
- package/src/models/operations/createtool.ts +22 -24
- package/src/models/operations/deploymentgetconfig.ts +16 -18
- package/src/models/operations/getallprompts.ts +9 -2
- package/src/models/operations/getalltools.ts +47 -53
- package/src/models/operations/getevals.ts +29 -3214
- package/src/models/operations/getoneprompt.ts +9 -2
- package/src/models/operations/getpromptversion.ts +9 -2
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/invokeeval.ts +18 -18
- package/src/models/operations/listagents.ts +18 -4
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listpromptversions.ts +9 -2
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +18 -4
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +25 -7
- package/src/models/operations/streamrunagent.ts +25 -7
- package/src/models/operations/updateagent.ts +42 -10
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +306 -3524
- package/src/models/operations/updateprompt.ts +21 -5
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +2 -2
|
@@ -46,7 +46,8 @@ import {
|
|
|
46
46
|
TextContentPartSchema$outboundSchema,
|
|
47
47
|
} from "./textcontentpartschema.js";
|
|
48
48
|
|
|
49
|
-
export type
|
|
49
|
+
export type InvokeDeploymentRequestContentPrefixMessages2 =
|
|
50
|
+
TextContentPartSchema;
|
|
50
51
|
|
|
51
52
|
/**
|
|
52
53
|
* The contents of the tool message.
|
|
@@ -128,7 +129,7 @@ export type ToolMessage = {
|
|
|
128
129
|
cacheControl?: PrefixMessagesCacheControl | undefined;
|
|
129
130
|
};
|
|
130
131
|
|
|
131
|
-
export type
|
|
132
|
+
export type InvokeDeploymentRequestContent2 =
|
|
132
133
|
| (TextContentPartSchema & { type: "text" })
|
|
133
134
|
| RefusalPartSchema
|
|
134
135
|
| ReasoningPartSchema
|
|
@@ -287,7 +288,7 @@ export type TwoCacheControl = {
|
|
|
287
288
|
ttl?: TwoTtl | undefined;
|
|
288
289
|
};
|
|
289
290
|
|
|
290
|
-
export type
|
|
291
|
+
export type Two4 = {
|
|
291
292
|
/**
|
|
292
293
|
* The type of the content part. Always `file`.
|
|
293
294
|
*/
|
|
@@ -299,11 +300,11 @@ export type Four = {
|
|
|
299
300
|
file: FileContentPartSchema;
|
|
300
301
|
};
|
|
301
302
|
|
|
302
|
-
export type
|
|
303
|
+
export type Content2 =
|
|
303
304
|
| (TextContentPartSchema & { type: "text" })
|
|
304
305
|
| ImageContentPartSchema
|
|
305
306
|
| AudioContentPartSchema
|
|
306
|
-
|
|
|
307
|
+
| Two4;
|
|
307
308
|
|
|
308
309
|
/**
|
|
309
310
|
* The contents of the user message.
|
|
@@ -314,7 +315,7 @@ export type InvokeDeploymentRequestPrefixMessagesContent =
|
|
|
314
315
|
| (TextContentPartSchema & { type: "text" })
|
|
315
316
|
| ImageContentPartSchema
|
|
316
317
|
| AudioContentPartSchema
|
|
317
|
-
|
|
|
318
|
+
| Two4
|
|
318
319
|
>;
|
|
319
320
|
|
|
320
321
|
export type UserMessage = {
|
|
@@ -335,7 +336,7 @@ export type UserMessage = {
|
|
|
335
336
|
| (TextContentPartSchema & { type: "text" })
|
|
336
337
|
| ImageContentPartSchema
|
|
337
338
|
| AudioContentPartSchema
|
|
338
|
-
|
|
|
339
|
+
| Two4
|
|
339
340
|
>;
|
|
340
341
|
};
|
|
341
342
|
|
|
@@ -632,7 +633,7 @@ export type InvokeDeploymentRequest2CacheControl = {
|
|
|
632
633
|
ttl?: InvokeDeploymentRequest2Ttl | undefined;
|
|
633
634
|
};
|
|
634
635
|
|
|
635
|
-
export type
|
|
636
|
+
export type InvokeDeploymentRequest24 = {
|
|
636
637
|
/**
|
|
637
638
|
* The type of the content part. Always `file`.
|
|
638
639
|
*/
|
|
@@ -648,7 +649,7 @@ export type InvokeDeploymentRequestContentMessages2 =
|
|
|
648
649
|
| (TextContentPartSchema & { type: "text" })
|
|
649
650
|
| ImageContentPartSchema
|
|
650
651
|
| AudioContentPartSchema
|
|
651
|
-
|
|
|
652
|
+
| InvokeDeploymentRequest24;
|
|
652
653
|
|
|
653
654
|
/**
|
|
654
655
|
* The contents of the user message.
|
|
@@ -659,7 +660,7 @@ export type InvokeDeploymentRequestMessages3Content =
|
|
|
659
660
|
| (TextContentPartSchema & { type: "text" })
|
|
660
661
|
| ImageContentPartSchema
|
|
661
662
|
| AudioContentPartSchema
|
|
662
|
-
|
|
|
663
|
+
| InvokeDeploymentRequest24
|
|
663
664
|
>;
|
|
664
665
|
|
|
665
666
|
export type MessagesUserMessage = {
|
|
@@ -680,7 +681,7 @@ export type MessagesUserMessage = {
|
|
|
680
681
|
| (TextContentPartSchema & { type: "text" })
|
|
681
682
|
| ImageContentPartSchema
|
|
682
683
|
| AudioContentPartSchema
|
|
683
|
-
|
|
|
684
|
+
| InvokeDeploymentRequest24
|
|
684
685
|
>;
|
|
685
686
|
};
|
|
686
687
|
|
|
@@ -1066,7 +1067,16 @@ export type OneEq = {
|
|
|
1066
1067
|
eq: string | number | boolean;
|
|
1067
1068
|
};
|
|
1068
1069
|
|
|
1069
|
-
export type
|
|
1070
|
+
export type KnowledgeFilter1 =
|
|
1071
|
+
| OneEq
|
|
1072
|
+
| OneNe
|
|
1073
|
+
| Gt
|
|
1074
|
+
| Gte
|
|
1075
|
+
| Lt
|
|
1076
|
+
| Lte
|
|
1077
|
+
| OneIn
|
|
1078
|
+
| OneNin
|
|
1079
|
+
| Exists;
|
|
1070
1080
|
|
|
1071
1081
|
/**
|
|
1072
1082
|
* A filter to apply to the knowledge base chunk metadata when using knowledge bases in the deployment.
|
|
@@ -1150,22 +1160,24 @@ export type InvokeDeploymentRequest = {
|
|
|
1150
1160
|
};
|
|
1151
1161
|
|
|
1152
1162
|
/** @internal */
|
|
1153
|
-
export type
|
|
1163
|
+
export type InvokeDeploymentRequestContentPrefixMessages2$Outbound =
|
|
1154
1164
|
TextContentPartSchema$Outbound;
|
|
1155
1165
|
|
|
1156
1166
|
/** @internal */
|
|
1157
|
-
export const
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1167
|
+
export const InvokeDeploymentRequestContentPrefixMessages2$outboundSchema:
|
|
1168
|
+
z.ZodType<
|
|
1169
|
+
InvokeDeploymentRequestContentPrefixMessages2$Outbound,
|
|
1170
|
+
z.ZodTypeDef,
|
|
1171
|
+
InvokeDeploymentRequestContentPrefixMessages2
|
|
1172
|
+
> = TextContentPartSchema$outboundSchema;
|
|
1162
1173
|
|
|
1163
|
-
export function
|
|
1164
|
-
|
|
1174
|
+
export function invokeDeploymentRequestContentPrefixMessages2ToJSON(
|
|
1175
|
+
invokeDeploymentRequestContentPrefixMessages2:
|
|
1176
|
+
InvokeDeploymentRequestContentPrefixMessages2,
|
|
1165
1177
|
): string {
|
|
1166
1178
|
return JSON.stringify(
|
|
1167
|
-
|
|
1168
|
-
|
|
1179
|
+
InvokeDeploymentRequestContentPrefixMessages2$outboundSchema.parse(
|
|
1180
|
+
invokeDeploymentRequestContentPrefixMessages2,
|
|
1169
1181
|
),
|
|
1170
1182
|
);
|
|
1171
1183
|
}
|
|
@@ -1259,17 +1271,17 @@ export function toolMessageToJSON(toolMessage: ToolMessage): string {
|
|
|
1259
1271
|
}
|
|
1260
1272
|
|
|
1261
1273
|
/** @internal */
|
|
1262
|
-
export type
|
|
1274
|
+
export type InvokeDeploymentRequestContent2$Outbound =
|
|
1263
1275
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
1264
1276
|
| RefusalPartSchema$Outbound
|
|
1265
1277
|
| ReasoningPartSchema$Outbound
|
|
1266
1278
|
| RedactedReasoningPartSchema$Outbound;
|
|
1267
1279
|
|
|
1268
1280
|
/** @internal */
|
|
1269
|
-
export const
|
|
1270
|
-
|
|
1281
|
+
export const InvokeDeploymentRequestContent2$outboundSchema: z.ZodType<
|
|
1282
|
+
InvokeDeploymentRequestContent2$Outbound,
|
|
1271
1283
|
z.ZodTypeDef,
|
|
1272
|
-
|
|
1284
|
+
InvokeDeploymentRequestContent2
|
|
1273
1285
|
> = z.union([
|
|
1274
1286
|
TextContentPartSchema$outboundSchema.and(
|
|
1275
1287
|
z.object({ type: z.literal("text") }),
|
|
@@ -1279,8 +1291,14 @@ export const Content2$outboundSchema: z.ZodType<
|
|
|
1279
1291
|
RedactedReasoningPartSchema$outboundSchema,
|
|
1280
1292
|
]);
|
|
1281
1293
|
|
|
1282
|
-
export function
|
|
1283
|
-
|
|
1294
|
+
export function invokeDeploymentRequestContent2ToJSON(
|
|
1295
|
+
invokeDeploymentRequestContent2: InvokeDeploymentRequestContent2,
|
|
1296
|
+
): string {
|
|
1297
|
+
return JSON.stringify(
|
|
1298
|
+
InvokeDeploymentRequestContent2$outboundSchema.parse(
|
|
1299
|
+
invokeDeploymentRequestContent2,
|
|
1300
|
+
),
|
|
1301
|
+
);
|
|
1284
1302
|
}
|
|
1285
1303
|
|
|
1286
1304
|
/** @internal */
|
|
@@ -1490,14 +1508,14 @@ export function twoCacheControlToJSON(
|
|
|
1490
1508
|
}
|
|
1491
1509
|
|
|
1492
1510
|
/** @internal */
|
|
1493
|
-
export type
|
|
1511
|
+
export type Two4$Outbound = {
|
|
1494
1512
|
type: "file";
|
|
1495
1513
|
cache_control?: TwoCacheControl$Outbound | undefined;
|
|
1496
1514
|
file: FileContentPartSchema$Outbound;
|
|
1497
1515
|
};
|
|
1498
1516
|
|
|
1499
1517
|
/** @internal */
|
|
1500
|
-
export const
|
|
1518
|
+
export const Two4$outboundSchema: z.ZodType<Two4$Outbound, z.ZodTypeDef, Two4> =
|
|
1501
1519
|
z.object({
|
|
1502
1520
|
type: z.literal("file"),
|
|
1503
1521
|
cacheControl: z.lazy(() => TwoCacheControl$outboundSchema).optional(),
|
|
@@ -1508,41 +1526,33 @@ export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
|
|
|
1508
1526
|
});
|
|
1509
1527
|
});
|
|
1510
1528
|
|
|
1511
|
-
export function
|
|
1512
|
-
return JSON.stringify(
|
|
1529
|
+
export function two4ToJSON(two4: Two4): string {
|
|
1530
|
+
return JSON.stringify(Two4$outboundSchema.parse(two4));
|
|
1513
1531
|
}
|
|
1514
1532
|
|
|
1515
1533
|
/** @internal */
|
|
1516
|
-
export type
|
|
1534
|
+
export type Content2$Outbound =
|
|
1517
1535
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
1518
1536
|
| ImageContentPartSchema$Outbound
|
|
1519
1537
|
| AudioContentPartSchema$Outbound
|
|
1520
|
-
|
|
|
1538
|
+
| Two4$Outbound;
|
|
1521
1539
|
|
|
1522
1540
|
/** @internal */
|
|
1523
|
-
export const
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
]);
|
|
1541
|
+
export const Content2$outboundSchema: z.ZodType<
|
|
1542
|
+
Content2$Outbound,
|
|
1543
|
+
z.ZodTypeDef,
|
|
1544
|
+
Content2
|
|
1545
|
+
> = z.union([
|
|
1546
|
+
TextContentPartSchema$outboundSchema.and(
|
|
1547
|
+
z.object({ type: z.literal("text") }),
|
|
1548
|
+
),
|
|
1549
|
+
ImageContentPartSchema$outboundSchema,
|
|
1550
|
+
AudioContentPartSchema$outboundSchema,
|
|
1551
|
+
z.lazy(() => Two4$outboundSchema),
|
|
1552
|
+
]);
|
|
1536
1553
|
|
|
1537
|
-
export function
|
|
1538
|
-
|
|
1539
|
-
InvokeDeploymentRequestContentPrefixMessages2,
|
|
1540
|
-
): string {
|
|
1541
|
-
return JSON.stringify(
|
|
1542
|
-
InvokeDeploymentRequestContentPrefixMessages2$outboundSchema.parse(
|
|
1543
|
-
invokeDeploymentRequestContentPrefixMessages2,
|
|
1544
|
-
),
|
|
1545
|
-
);
|
|
1554
|
+
export function content2ToJSON(content2: Content2): string {
|
|
1555
|
+
return JSON.stringify(Content2$outboundSchema.parse(content2));
|
|
1546
1556
|
}
|
|
1547
1557
|
|
|
1548
1558
|
/** @internal */
|
|
@@ -1552,7 +1562,7 @@ export type InvokeDeploymentRequestPrefixMessagesContent$Outbound =
|
|
|
1552
1562
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
1553
1563
|
| ImageContentPartSchema$Outbound
|
|
1554
1564
|
| AudioContentPartSchema$Outbound
|
|
1555
|
-
|
|
|
1565
|
+
| Two4$Outbound
|
|
1556
1566
|
>;
|
|
1557
1567
|
|
|
1558
1568
|
/** @internal */
|
|
@@ -1570,7 +1580,7 @@ export const InvokeDeploymentRequestPrefixMessagesContent$outboundSchema:
|
|
|
1570
1580
|
),
|
|
1571
1581
|
ImageContentPartSchema$outboundSchema,
|
|
1572
1582
|
AudioContentPartSchema$outboundSchema,
|
|
1573
|
-
z.lazy(() =>
|
|
1583
|
+
z.lazy(() => Two4$outboundSchema),
|
|
1574
1584
|
]),
|
|
1575
1585
|
),
|
|
1576
1586
|
]);
|
|
@@ -1596,7 +1606,7 @@ export type UserMessage$Outbound = {
|
|
|
1596
1606
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
1597
1607
|
| ImageContentPartSchema$Outbound
|
|
1598
1608
|
| AudioContentPartSchema$Outbound
|
|
1599
|
-
|
|
|
1609
|
+
| Two4$Outbound
|
|
1600
1610
|
>;
|
|
1601
1611
|
};
|
|
1602
1612
|
|
|
@@ -1617,7 +1627,7 @@ export const UserMessage$outboundSchema: z.ZodType<
|
|
|
1617
1627
|
),
|
|
1618
1628
|
ImageContentPartSchema$outboundSchema,
|
|
1619
1629
|
AudioContentPartSchema$outboundSchema,
|
|
1620
|
-
z.lazy(() =>
|
|
1630
|
+
z.lazy(() => Two4$outboundSchema),
|
|
1621
1631
|
]),
|
|
1622
1632
|
),
|
|
1623
1633
|
]),
|
|
@@ -2093,28 +2103,35 @@ export function invokeDeploymentRequest2CacheControlToJSON(
|
|
|
2093
2103
|
}
|
|
2094
2104
|
|
|
2095
2105
|
/** @internal */
|
|
2096
|
-
export type
|
|
2106
|
+
export type InvokeDeploymentRequest24$Outbound = {
|
|
2097
2107
|
type: "file";
|
|
2098
2108
|
cache_control?: InvokeDeploymentRequest2CacheControl$Outbound | undefined;
|
|
2099
2109
|
file: FileContentPartSchema$Outbound;
|
|
2100
2110
|
};
|
|
2101
2111
|
|
|
2102
2112
|
/** @internal */
|
|
2103
|
-
export const
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2113
|
+
export const InvokeDeploymentRequest24$outboundSchema: z.ZodType<
|
|
2114
|
+
InvokeDeploymentRequest24$Outbound,
|
|
2115
|
+
z.ZodTypeDef,
|
|
2116
|
+
InvokeDeploymentRequest24
|
|
2117
|
+
> = z.object({
|
|
2118
|
+
type: z.literal("file"),
|
|
2119
|
+
cacheControl: z.lazy(() =>
|
|
2120
|
+
InvokeDeploymentRequest2CacheControl$outboundSchema
|
|
2121
|
+
).optional(),
|
|
2122
|
+
file: FileContentPartSchema$outboundSchema,
|
|
2123
|
+
}).transform((v) => {
|
|
2124
|
+
return remap$(v, {
|
|
2125
|
+
cacheControl: "cache_control",
|
|
2114
2126
|
});
|
|
2127
|
+
});
|
|
2115
2128
|
|
|
2116
|
-
export function
|
|
2117
|
-
|
|
2129
|
+
export function invokeDeploymentRequest24ToJSON(
|
|
2130
|
+
invokeDeploymentRequest24: InvokeDeploymentRequest24,
|
|
2131
|
+
): string {
|
|
2132
|
+
return JSON.stringify(
|
|
2133
|
+
InvokeDeploymentRequest24$outboundSchema.parse(invokeDeploymentRequest24),
|
|
2134
|
+
);
|
|
2118
2135
|
}
|
|
2119
2136
|
|
|
2120
2137
|
/** @internal */
|
|
@@ -2122,7 +2139,7 @@ export type InvokeDeploymentRequestContentMessages2$Outbound =
|
|
|
2122
2139
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
2123
2140
|
| ImageContentPartSchema$Outbound
|
|
2124
2141
|
| AudioContentPartSchema$Outbound
|
|
2125
|
-
|
|
|
2142
|
+
| InvokeDeploymentRequest24$Outbound;
|
|
2126
2143
|
|
|
2127
2144
|
/** @internal */
|
|
2128
2145
|
export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
|
|
@@ -2135,7 +2152,7 @@ export const InvokeDeploymentRequestContentMessages2$outboundSchema: z.ZodType<
|
|
|
2135
2152
|
),
|
|
2136
2153
|
ImageContentPartSchema$outboundSchema,
|
|
2137
2154
|
AudioContentPartSchema$outboundSchema,
|
|
2138
|
-
z.lazy(() =>
|
|
2155
|
+
z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
|
|
2139
2156
|
]);
|
|
2140
2157
|
|
|
2141
2158
|
export function invokeDeploymentRequestContentMessages2ToJSON(
|
|
@@ -2156,7 +2173,7 @@ export type InvokeDeploymentRequestMessages3Content$Outbound =
|
|
|
2156
2173
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
2157
2174
|
| ImageContentPartSchema$Outbound
|
|
2158
2175
|
| AudioContentPartSchema$Outbound
|
|
2159
|
-
|
|
|
2176
|
+
| InvokeDeploymentRequest24$Outbound
|
|
2160
2177
|
>;
|
|
2161
2178
|
|
|
2162
2179
|
/** @internal */
|
|
@@ -2173,7 +2190,7 @@ export const InvokeDeploymentRequestMessages3Content$outboundSchema: z.ZodType<
|
|
|
2173
2190
|
),
|
|
2174
2191
|
ImageContentPartSchema$outboundSchema,
|
|
2175
2192
|
AudioContentPartSchema$outboundSchema,
|
|
2176
|
-
z.lazy(() =>
|
|
2193
|
+
z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
|
|
2177
2194
|
]),
|
|
2178
2195
|
),
|
|
2179
2196
|
]);
|
|
@@ -2199,7 +2216,7 @@ export type MessagesUserMessage$Outbound = {
|
|
|
2199
2216
|
| (TextContentPartSchema$Outbound & { type: "text" })
|
|
2200
2217
|
| ImageContentPartSchema$Outbound
|
|
2201
2218
|
| AudioContentPartSchema$Outbound
|
|
2202
|
-
|
|
|
2219
|
+
| InvokeDeploymentRequest24$Outbound
|
|
2203
2220
|
>;
|
|
2204
2221
|
};
|
|
2205
2222
|
|
|
@@ -2220,7 +2237,7 @@ export const MessagesUserMessage$outboundSchema: z.ZodType<
|
|
|
2220
2237
|
),
|
|
2221
2238
|
ImageContentPartSchema$outboundSchema,
|
|
2222
2239
|
AudioContentPartSchema$outboundSchema,
|
|
2223
|
-
z.lazy(() =>
|
|
2240
|
+
z.lazy(() => InvokeDeploymentRequest24$outboundSchema),
|
|
2224
2241
|
]),
|
|
2225
2242
|
),
|
|
2226
2243
|
]),
|
|
@@ -3277,7 +3294,7 @@ export function oneEqToJSON(oneEq: OneEq): string {
|
|
|
3277
3294
|
}
|
|
3278
3295
|
|
|
3279
3296
|
/** @internal */
|
|
3280
|
-
export type
|
|
3297
|
+
export type KnowledgeFilter1$Outbound =
|
|
3281
3298
|
| OneEq$Outbound
|
|
3282
3299
|
| OneNe$Outbound
|
|
3283
3300
|
| Gt$Outbound
|
|
@@ -3289,21 +3306,28 @@ export type One$Outbound =
|
|
|
3289
3306
|
| Exists$Outbound;
|
|
3290
3307
|
|
|
3291
3308
|
/** @internal */
|
|
3292
|
-
export const
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3309
|
+
export const KnowledgeFilter1$outboundSchema: z.ZodType<
|
|
3310
|
+
KnowledgeFilter1$Outbound,
|
|
3311
|
+
z.ZodTypeDef,
|
|
3312
|
+
KnowledgeFilter1
|
|
3313
|
+
> = z.union([
|
|
3314
|
+
z.lazy(() => OneEq$outboundSchema),
|
|
3315
|
+
z.lazy(() => OneNe$outboundSchema),
|
|
3316
|
+
z.lazy(() => Gt$outboundSchema),
|
|
3317
|
+
z.lazy(() => Gte$outboundSchema),
|
|
3318
|
+
z.lazy(() => Lt$outboundSchema),
|
|
3319
|
+
z.lazy(() => Lte$outboundSchema),
|
|
3320
|
+
z.lazy(() => OneIn$outboundSchema),
|
|
3321
|
+
z.lazy(() => OneNin$outboundSchema),
|
|
3322
|
+
z.lazy(() => Exists$outboundSchema),
|
|
3323
|
+
]);
|
|
3304
3324
|
|
|
3305
|
-
export function
|
|
3306
|
-
|
|
3325
|
+
export function knowledgeFilter1ToJSON(
|
|
3326
|
+
knowledgeFilter1: KnowledgeFilter1,
|
|
3327
|
+
): string {
|
|
3328
|
+
return JSON.stringify(
|
|
3329
|
+
KnowledgeFilter1$outboundSchema.parse(knowledgeFilter1),
|
|
3330
|
+
);
|
|
3307
3331
|
}
|
|
3308
3332
|
|
|
3309
3333
|
/** @internal */
|
|
@@ -14,25 +14,26 @@ import {
|
|
|
14
14
|
ModelRef$outboundSchema,
|
|
15
15
|
} from "./modelref.js";
|
|
16
16
|
|
|
17
|
-
export const
|
|
17
|
+
export const ModelsConfigMode = {
|
|
18
18
|
Fallback: "fallback",
|
|
19
19
|
Weighted: "weighted",
|
|
20
20
|
RoundRobin: "round_robin",
|
|
21
21
|
} as const;
|
|
22
|
-
export type
|
|
22
|
+
export type ModelsConfigMode = ClosedEnum<typeof ModelsConfigMode>;
|
|
23
23
|
|
|
24
24
|
export type ModelsConfig = {
|
|
25
|
-
mode:
|
|
25
|
+
mode: ModelsConfigMode;
|
|
26
26
|
models: Array<ModelRef> | null;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/** @internal */
|
|
30
|
-
export const
|
|
31
|
-
|
|
32
|
-
);
|
|
30
|
+
export const ModelsConfigMode$inboundSchema: z.ZodNativeEnum<
|
|
31
|
+
typeof ModelsConfigMode
|
|
32
|
+
> = z.nativeEnum(ModelsConfigMode);
|
|
33
33
|
/** @internal */
|
|
34
|
-
export const
|
|
35
|
-
|
|
34
|
+
export const ModelsConfigMode$outboundSchema: z.ZodNativeEnum<
|
|
35
|
+
typeof ModelsConfigMode
|
|
36
|
+
> = ModelsConfigMode$inboundSchema;
|
|
36
37
|
|
|
37
38
|
/** @internal */
|
|
38
39
|
export const ModelsConfig$inboundSchema: z.ZodType<
|
|
@@ -40,7 +41,7 @@ export const ModelsConfig$inboundSchema: z.ZodType<
|
|
|
40
41
|
z.ZodTypeDef,
|
|
41
42
|
unknown
|
|
42
43
|
> = z.object({
|
|
43
|
-
mode:
|
|
44
|
+
mode: ModelsConfigMode$inboundSchema,
|
|
44
45
|
models: z.nullable(z.array(ModelRef$inboundSchema)),
|
|
45
46
|
});
|
|
46
47
|
/** @internal */
|
|
@@ -55,7 +56,7 @@ export const ModelsConfig$outboundSchema: z.ZodType<
|
|
|
55
56
|
z.ZodTypeDef,
|
|
56
57
|
ModelsConfig
|
|
57
58
|
> = z.object({
|
|
58
|
-
mode:
|
|
59
|
+
mode: ModelsConfigMode$outboundSchema,
|
|
59
60
|
models: z.nullable(z.array(ModelRef$outboundSchema)),
|
|
60
61
|
});
|
|
61
62
|
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
14
|
+
*/
|
|
15
|
+
export const Id = {
|
|
16
|
+
PiiRedaction: "pii_redaction",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
20
|
+
*/
|
|
21
|
+
export type Id = ClosedEnum<typeof Id>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
25
|
+
*/
|
|
26
|
+
export const OnFailure = {
|
|
27
|
+
Block: "block",
|
|
28
|
+
Passthrough: "passthrough",
|
|
29
|
+
} as const;
|
|
30
|
+
/**
|
|
31
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
32
|
+
*/
|
|
33
|
+
export type OnFailure = ClosedEnum<typeof OnFailure>;
|
|
34
|
+
|
|
35
|
+
export const Entities = {
|
|
36
|
+
Age: "AGE",
|
|
37
|
+
ApiKey: "API_KEY",
|
|
38
|
+
BankRouting: "BANK_ROUTING",
|
|
39
|
+
Bic: "BIC",
|
|
40
|
+
BiometricId: "BIOMETRIC_ID",
|
|
41
|
+
BloodType: "BLOOD_TYPE",
|
|
42
|
+
Bsn: "BSN",
|
|
43
|
+
CreditCard: "CREDIT_CARD",
|
|
44
|
+
Crypto: "CRYPTO",
|
|
45
|
+
DateTime: "DATE_TIME",
|
|
46
|
+
DeviceId: "DEVICE_ID",
|
|
47
|
+
EducationLevel: "EDUCATION_LEVEL",
|
|
48
|
+
Email: "EMAIL",
|
|
49
|
+
EmailAddress: "EMAIL_ADDRESS",
|
|
50
|
+
EmploymentStatus: "EMPLOYMENT_STATUS",
|
|
51
|
+
Gender: "GENDER",
|
|
52
|
+
HealthPlanId: "HEALTH_PLAN_ID",
|
|
53
|
+
HttpCookie: "HTTP_COOKIE",
|
|
54
|
+
IbanCode: "IBAN_CODE",
|
|
55
|
+
Id: "ID",
|
|
56
|
+
IdCard: "ID_CARD",
|
|
57
|
+
Imei: "IMEI",
|
|
58
|
+
IpAddress: "IP_ADDRESS",
|
|
59
|
+
Jobtitle: "JOBTITLE",
|
|
60
|
+
Jwt: "JWT",
|
|
61
|
+
KvkNumber: "KVK_NUMBER",
|
|
62
|
+
Language: "LANGUAGE",
|
|
63
|
+
LicenseNumber: "LICENSE_NUMBER",
|
|
64
|
+
LicensePlate: "LICENSE_PLATE",
|
|
65
|
+
Location: "LOCATION",
|
|
66
|
+
MacAddress: "MAC_ADDRESS",
|
|
67
|
+
MedicalLicense: "MEDICAL_LICENSE",
|
|
68
|
+
MedicalRecord: "MEDICAL_RECORD",
|
|
69
|
+
Nrp: "NRP",
|
|
70
|
+
Organization: "ORGANIZATION",
|
|
71
|
+
Passport: "PASSPORT",
|
|
72
|
+
Password: "PASSWORD",
|
|
73
|
+
Person: "PERSON",
|
|
74
|
+
PhoneNumber: "PHONE_NUMBER",
|
|
75
|
+
Pin: "PIN",
|
|
76
|
+
PoliticalView: "POLITICAL_VIEW",
|
|
77
|
+
RaceEthnicity: "RACE_ETHNICITY",
|
|
78
|
+
ReligiousBelief: "RELIGIOUS_BELIEF",
|
|
79
|
+
Sexuality: "SEXUALITY",
|
|
80
|
+
TaxId: "TAX_ID",
|
|
81
|
+
Title: "TITLE",
|
|
82
|
+
UkNhs: "UK_NHS",
|
|
83
|
+
Url: "URL",
|
|
84
|
+
UsBankNumber: "US_BANK_NUMBER",
|
|
85
|
+
UsDriverLicense: "US_DRIVER_LICENSE",
|
|
86
|
+
UsItin: "US_ITIN",
|
|
87
|
+
UsPassport: "US_PASSPORT",
|
|
88
|
+
UsSsn: "US_SSN",
|
|
89
|
+
Uuid: "UUID",
|
|
90
|
+
VehicleId: "VEHICLE_ID",
|
|
91
|
+
} as const;
|
|
92
|
+
export type Entities = ClosedEnum<typeof Entities>;
|
|
93
|
+
|
|
94
|
+
export type PIIRedactionPluginAuto = {
|
|
95
|
+
/**
|
|
96
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
97
|
+
*/
|
|
98
|
+
id: Id;
|
|
99
|
+
/**
|
|
100
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
101
|
+
*/
|
|
102
|
+
onFailure?: OnFailure | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Detector confidence cutoff in [0,1].
|
|
105
|
+
*/
|
|
106
|
+
threshold?: number | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Entity types to redact when no detector language is configured. Omit to redact every detected type.
|
|
109
|
+
*/
|
|
110
|
+
entities?: Array<Entities> | undefined;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const Id$inboundSchema: z.ZodNativeEnum<typeof Id> = z.nativeEnum(Id);
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const Id$outboundSchema: z.ZodNativeEnum<typeof Id> = Id$inboundSchema;
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const OnFailure$inboundSchema: z.ZodNativeEnum<typeof OnFailure> = z
|
|
120
|
+
.nativeEnum(OnFailure);
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const OnFailure$outboundSchema: z.ZodNativeEnum<typeof OnFailure> =
|
|
123
|
+
OnFailure$inboundSchema;
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const Entities$inboundSchema: z.ZodNativeEnum<typeof Entities> = z
|
|
127
|
+
.nativeEnum(Entities);
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const Entities$outboundSchema: z.ZodNativeEnum<typeof Entities> =
|
|
130
|
+
Entities$inboundSchema;
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const PIIRedactionPluginAuto$inboundSchema: z.ZodType<
|
|
134
|
+
PIIRedactionPluginAuto,
|
|
135
|
+
z.ZodTypeDef,
|
|
136
|
+
unknown
|
|
137
|
+
> = z.object({
|
|
138
|
+
id: Id$inboundSchema,
|
|
139
|
+
on_failure: OnFailure$inboundSchema.optional(),
|
|
140
|
+
threshold: z.number().optional(),
|
|
141
|
+
entities: z.array(Entities$inboundSchema).optional(),
|
|
142
|
+
}).transform((v) => {
|
|
143
|
+
return remap$(v, {
|
|
144
|
+
"on_failure": "onFailure",
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
/** @internal */
|
|
148
|
+
export type PIIRedactionPluginAuto$Outbound = {
|
|
149
|
+
id: string;
|
|
150
|
+
on_failure?: string | undefined;
|
|
151
|
+
threshold?: number | undefined;
|
|
152
|
+
entities?: Array<string> | undefined;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const PIIRedactionPluginAuto$outboundSchema: z.ZodType<
|
|
157
|
+
PIIRedactionPluginAuto$Outbound,
|
|
158
|
+
z.ZodTypeDef,
|
|
159
|
+
PIIRedactionPluginAuto
|
|
160
|
+
> = z.object({
|
|
161
|
+
id: Id$outboundSchema,
|
|
162
|
+
onFailure: OnFailure$outboundSchema.optional(),
|
|
163
|
+
threshold: z.number().optional(),
|
|
164
|
+
entities: z.array(Entities$outboundSchema).optional(),
|
|
165
|
+
}).transform((v) => {
|
|
166
|
+
return remap$(v, {
|
|
167
|
+
onFailure: "on_failure",
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
export function piiRedactionPluginAutoToJSON(
|
|
172
|
+
piiRedactionPluginAuto: PIIRedactionPluginAuto,
|
|
173
|
+
): string {
|
|
174
|
+
return JSON.stringify(
|
|
175
|
+
PIIRedactionPluginAuto$outboundSchema.parse(piiRedactionPluginAuto),
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
export function piiRedactionPluginAutoFromJSON(
|
|
179
|
+
jsonString: string,
|
|
180
|
+
): SafeParseResult<PIIRedactionPluginAuto, SDKValidationError> {
|
|
181
|
+
return safeParse(
|
|
182
|
+
jsonString,
|
|
183
|
+
(x) => PIIRedactionPluginAuto$inboundSchema.parse(JSON.parse(x)),
|
|
184
|
+
`Failed to parse 'PIIRedactionPluginAuto' from JSON`,
|
|
185
|
+
);
|
|
186
|
+
}
|