@orq-ai/node 4.11.0-rc.52 → 4.11.0-rc.54
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/knowledgeList.js +1 -0
- package/funcs/knowledgeList.js.map +1 -1
- package/funcs/memoryStoresList.js +1 -0
- package/funcs/memoryStoresList.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/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/guardrailrule.d.ts +2 -0
- package/models/components/guardrailrule.d.ts.map +1 -1
- package/models/components/guardrailrule.js +2 -0
- package/models/components/guardrailrule.js.map +1 -1
- package/models/components/index.d.ts +13 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +13 -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/piiredactionplugin.d.ts +14 -0
- package/models/components/piiredactionplugin.d.ts.map +1 -0
- package/models/components/piiredactionplugin.js +59 -0
- package/models/components/piiredactionplugin.js.map +1 -0
- 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 +146 -0
- package/models/components/piiredactionpluginen.d.ts.map +1 -0
- package/models/components/piiredactionpluginen.js +168 -0
- package/models/components/piiredactionpluginen.js.map +1 -0
- package/models/components/piiredactionpluginnl.d.ts +138 -0
- package/models/components/piiredactionpluginnl.d.ts.map +1 -0
- package/models/components/piiredactionpluginnl.js +159 -0
- package/models/components/piiredactionpluginnl.js.map +1 -0
- package/models/components/plugin.d.ts +11 -0
- package/models/components/plugin.d.ts.map +1 -0
- package/models/components/plugin.js +57 -0
- package/models/components/plugin.js.map +1 -0
- package/models/components/publicpiiredactionplugin.d.ts +79 -0
- package/models/components/publicpiiredactionplugin.d.ts.map +1 -0
- package/models/components/publicpiiredactionplugin.js +86 -0
- package/models/components/publicpiiredactionplugin.js.map +1 -0
- 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 +38 -0
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +65 -5
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +11 -0
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +18 -3
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createcompletion.d.ts +11 -0
- package/models/operations/createcompletion.d.ts.map +1 -1
- package/models/operations/createcompletion.js +18 -3
- 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 +11 -0
- package/models/operations/createimage.d.ts.map +1 -1
- package/models/operations/createimage.js +16 -1
- package/models/operations/createimage.js.map +1 -1
- package/models/operations/createprompt.d.ts +27 -8
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +42 -12
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/creatererank.d.ts +11 -0
- package/models/operations/creatererank.d.ts.map +1 -1
- package/models/operations/creatererank.js +16 -1
- package/models/operations/creatererank.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +5 -0
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +1 -0
- package/models/operations/createrouterresponse.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/getallmemorystores.d.ts +5 -0
- package/models/operations/getallmemorystores.d.ts.map +1 -1
- package/models/operations/getallmemorystores.js +2 -0
- package/models/operations/getallmemorystores.js.map +1 -1
- package/models/operations/getallprompts.d.ts +8 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +16 -1
- 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 +8 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +17 -2
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +8 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +17 -2
- 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/guardrailrulecreate.d.ts +1 -0
- package/models/operations/guardrailrulecreate.d.ts.map +1 -1
- package/models/operations/guardrailrulecreate.js +1 -0
- package/models/operations/guardrailrulecreate.js.map +1 -1
- package/models/operations/guardrailruleget.d.ts +1 -0
- package/models/operations/guardrailruleget.d.ts.map +1 -1
- package/models/operations/guardrailruleget.js +1 -0
- package/models/operations/guardrailruleget.js.map +1 -1
- package/models/operations/guardrailruleupdate.d.ts +1 -0
- package/models/operations/guardrailruleupdate.d.ts.map +1 -1
- package/models/operations/guardrailruleupdate.js +1 -0
- package/models/operations/guardrailruleupdate.js.map +1 -1
- 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 +16 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +32 -2
- 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/listknowledgebases.d.ts +5 -0
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +2 -0
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +8 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +17 -2
- 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 +16 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +32 -2
- 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 +22 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +34 -4
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +22 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +34 -4
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +38 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +65 -5
- 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 +19 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +33 -3
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +7 -7
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/src/funcs/knowledgeList.ts +1 -0
- package/src/funcs/memoryStoresList.ts +1 -0
- 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/guardrailrule.ts +3 -0
- package/src/models/components/index.ts +13 -0
- package/src/models/components/invokedeploymentrequest.ts +119 -95
- package/src/models/components/modelsconfig.ts +11 -10
- package/src/models/components/piiredactionplugin.ts +44 -0
- package/src/models/components/piiredactionpluginauto.ts +186 -0
- package/src/models/components/piiredactionpluginen.ts +223 -0
- package/src/models/components/piiredactionpluginnl.ts +219 -0
- package/src/models/components/plugin.ts +37 -0
- package/src/models/components/publicpiiredactionplugin.ts +127 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/textcontentpartschema.ts +23 -19
- package/src/models/operations/createagentrequest.ts +199 -0
- package/src/models/operations/createchatcompletion.ts +56 -0
- package/src/models/operations/createcompletion.ts +54 -0
- 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 +54 -0
- package/src/models/operations/createprompt.ts +115 -22
- package/src/models/operations/creatererank.ts +54 -0
- package/src/models/operations/createrouterresponse.ts +11 -0
- package/src/models/operations/createtool.ts +22 -24
- package/src/models/operations/deploymentgetconfig.ts +16 -18
- package/src/models/operations/getallmemorystores.ts +7 -0
- package/src/models/operations/getallprompts.ts +43 -0
- package/src/models/operations/getalltools.ts +47 -53
- package/src/models/operations/getevals.ts +29 -3214
- package/src/models/operations/getoneprompt.ts +43 -0
- package/src/models/operations/getpromptversion.ts +43 -0
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/guardrailrulecreate.ts +2 -0
- package/src/models/operations/guardrailruleget.ts +2 -0
- package/src/models/operations/guardrailruleupdate.ts +2 -0
- package/src/models/operations/invokeeval.ts +18 -18
- package/src/models/operations/listagents.ts +93 -0
- 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/listknowledgebases.ts +7 -0
- package/src/models/operations/listpromptversions.ts +43 -0
- 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 +93 -0
- 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 +115 -1
- package/src/models/operations/streamrunagent.ts +116 -1
- package/src/models/operations/updateagent.ts +205 -0
- 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 +97 -0
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +2 -2
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
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 PIIRedactionPluginEnId = {
|
|
16
|
+
PiiRedaction: "pii_redaction",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
20
|
+
*/
|
|
21
|
+
export type PIIRedactionPluginEnId = ClosedEnum<typeof PIIRedactionPluginEnId>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
25
|
+
*/
|
|
26
|
+
export const PIIRedactionPluginEnOnFailure = {
|
|
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 PIIRedactionPluginEnOnFailure = ClosedEnum<
|
|
34
|
+
typeof PIIRedactionPluginEnOnFailure
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Detector language.
|
|
39
|
+
*/
|
|
40
|
+
export const Language = {
|
|
41
|
+
En: "en",
|
|
42
|
+
} as const;
|
|
43
|
+
/**
|
|
44
|
+
* Detector language.
|
|
45
|
+
*/
|
|
46
|
+
export type Language = ClosedEnum<typeof Language>;
|
|
47
|
+
|
|
48
|
+
export const PIIRedactionPluginEnEntities = {
|
|
49
|
+
Age: "AGE",
|
|
50
|
+
ApiKey: "API_KEY",
|
|
51
|
+
BankRouting: "BANK_ROUTING",
|
|
52
|
+
Bic: "BIC",
|
|
53
|
+
BiometricId: "BIOMETRIC_ID",
|
|
54
|
+
BloodType: "BLOOD_TYPE",
|
|
55
|
+
Bsn: "BSN",
|
|
56
|
+
CreditCard: "CREDIT_CARD",
|
|
57
|
+
Crypto: "CRYPTO",
|
|
58
|
+
DateTime: "DATE_TIME",
|
|
59
|
+
DeviceId: "DEVICE_ID",
|
|
60
|
+
EducationLevel: "EDUCATION_LEVEL",
|
|
61
|
+
Email: "EMAIL",
|
|
62
|
+
EmailAddress: "EMAIL_ADDRESS",
|
|
63
|
+
EmploymentStatus: "EMPLOYMENT_STATUS",
|
|
64
|
+
Gender: "GENDER",
|
|
65
|
+
HealthPlanId: "HEALTH_PLAN_ID",
|
|
66
|
+
HttpCookie: "HTTP_COOKIE",
|
|
67
|
+
IbanCode: "IBAN_CODE",
|
|
68
|
+
Id: "ID",
|
|
69
|
+
IdCard: "ID_CARD",
|
|
70
|
+
Imei: "IMEI",
|
|
71
|
+
IpAddress: "IP_ADDRESS",
|
|
72
|
+
Jobtitle: "JOBTITLE",
|
|
73
|
+
Jwt: "JWT",
|
|
74
|
+
KvkNumber: "KVK_NUMBER",
|
|
75
|
+
Language: "LANGUAGE",
|
|
76
|
+
LicenseNumber: "LICENSE_NUMBER",
|
|
77
|
+
LicensePlate: "LICENSE_PLATE",
|
|
78
|
+
Location: "LOCATION",
|
|
79
|
+
MacAddress: "MAC_ADDRESS",
|
|
80
|
+
MedicalLicense: "MEDICAL_LICENSE",
|
|
81
|
+
MedicalRecord: "MEDICAL_RECORD",
|
|
82
|
+
Nrp: "NRP",
|
|
83
|
+
Organization: "ORGANIZATION",
|
|
84
|
+
Passport: "PASSPORT",
|
|
85
|
+
Password: "PASSWORD",
|
|
86
|
+
Person: "PERSON",
|
|
87
|
+
PhoneNumber: "PHONE_NUMBER",
|
|
88
|
+
Pin: "PIN",
|
|
89
|
+
PoliticalView: "POLITICAL_VIEW",
|
|
90
|
+
RaceEthnicity: "RACE_ETHNICITY",
|
|
91
|
+
ReligiousBelief: "RELIGIOUS_BELIEF",
|
|
92
|
+
Sexuality: "SEXUALITY",
|
|
93
|
+
TaxId: "TAX_ID",
|
|
94
|
+
Title: "TITLE",
|
|
95
|
+
UkNhs: "UK_NHS",
|
|
96
|
+
Url: "URL",
|
|
97
|
+
UsBankNumber: "US_BANK_NUMBER",
|
|
98
|
+
UsDriverLicense: "US_DRIVER_LICENSE",
|
|
99
|
+
UsItin: "US_ITIN",
|
|
100
|
+
UsPassport: "US_PASSPORT",
|
|
101
|
+
UsSsn: "US_SSN",
|
|
102
|
+
Uuid: "UUID",
|
|
103
|
+
VehicleId: "VEHICLE_ID",
|
|
104
|
+
} as const;
|
|
105
|
+
export type PIIRedactionPluginEnEntities = ClosedEnum<
|
|
106
|
+
typeof PIIRedactionPluginEnEntities
|
|
107
|
+
>;
|
|
108
|
+
|
|
109
|
+
export type PIIRedactionPluginEn = {
|
|
110
|
+
/**
|
|
111
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
112
|
+
*/
|
|
113
|
+
id: PIIRedactionPluginEnId;
|
|
114
|
+
/**
|
|
115
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
116
|
+
*/
|
|
117
|
+
onFailure?: PIIRedactionPluginEnOnFailure | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Detector confidence cutoff in [0,1].
|
|
120
|
+
*/
|
|
121
|
+
threshold?: number | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Detector language.
|
|
124
|
+
*/
|
|
125
|
+
language: Language;
|
|
126
|
+
/**
|
|
127
|
+
* English entity types to redact. Omit to redact every type detected for the language.
|
|
128
|
+
*/
|
|
129
|
+
entities?: Array<PIIRedactionPluginEnEntities> | undefined;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const PIIRedactionPluginEnId$inboundSchema: z.ZodNativeEnum<
|
|
134
|
+
typeof PIIRedactionPluginEnId
|
|
135
|
+
> = z.nativeEnum(PIIRedactionPluginEnId);
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const PIIRedactionPluginEnId$outboundSchema: z.ZodNativeEnum<
|
|
138
|
+
typeof PIIRedactionPluginEnId
|
|
139
|
+
> = PIIRedactionPluginEnId$inboundSchema;
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const PIIRedactionPluginEnOnFailure$inboundSchema: z.ZodNativeEnum<
|
|
143
|
+
typeof PIIRedactionPluginEnOnFailure
|
|
144
|
+
> = z.nativeEnum(PIIRedactionPluginEnOnFailure);
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const PIIRedactionPluginEnOnFailure$outboundSchema: z.ZodNativeEnum<
|
|
147
|
+
typeof PIIRedactionPluginEnOnFailure
|
|
148
|
+
> = PIIRedactionPluginEnOnFailure$inboundSchema;
|
|
149
|
+
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
|
|
152
|
+
.nativeEnum(Language);
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
|
|
155
|
+
Language$inboundSchema;
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const PIIRedactionPluginEnEntities$inboundSchema: z.ZodNativeEnum<
|
|
159
|
+
typeof PIIRedactionPluginEnEntities
|
|
160
|
+
> = z.nativeEnum(PIIRedactionPluginEnEntities);
|
|
161
|
+
/** @internal */
|
|
162
|
+
export const PIIRedactionPluginEnEntities$outboundSchema: z.ZodNativeEnum<
|
|
163
|
+
typeof PIIRedactionPluginEnEntities
|
|
164
|
+
> = PIIRedactionPluginEnEntities$inboundSchema;
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const PIIRedactionPluginEn$inboundSchema: z.ZodType<
|
|
168
|
+
PIIRedactionPluginEn,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
unknown
|
|
171
|
+
> = z.object({
|
|
172
|
+
id: PIIRedactionPluginEnId$inboundSchema,
|
|
173
|
+
on_failure: PIIRedactionPluginEnOnFailure$inboundSchema.optional(),
|
|
174
|
+
threshold: z.number().optional(),
|
|
175
|
+
language: Language$inboundSchema,
|
|
176
|
+
entities: z.array(PIIRedactionPluginEnEntities$inboundSchema).optional(),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
"on_failure": "onFailure",
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
/** @internal */
|
|
183
|
+
export type PIIRedactionPluginEn$Outbound = {
|
|
184
|
+
id: string;
|
|
185
|
+
on_failure?: string | undefined;
|
|
186
|
+
threshold?: number | undefined;
|
|
187
|
+
language: string;
|
|
188
|
+
entities?: Array<string> | undefined;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const PIIRedactionPluginEn$outboundSchema: z.ZodType<
|
|
193
|
+
PIIRedactionPluginEn$Outbound,
|
|
194
|
+
z.ZodTypeDef,
|
|
195
|
+
PIIRedactionPluginEn
|
|
196
|
+
> = z.object({
|
|
197
|
+
id: PIIRedactionPluginEnId$outboundSchema,
|
|
198
|
+
onFailure: PIIRedactionPluginEnOnFailure$outboundSchema.optional(),
|
|
199
|
+
threshold: z.number().optional(),
|
|
200
|
+
language: Language$outboundSchema,
|
|
201
|
+
entities: z.array(PIIRedactionPluginEnEntities$outboundSchema).optional(),
|
|
202
|
+
}).transform((v) => {
|
|
203
|
+
return remap$(v, {
|
|
204
|
+
onFailure: "on_failure",
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
export function piiRedactionPluginEnToJSON(
|
|
209
|
+
piiRedactionPluginEn: PIIRedactionPluginEn,
|
|
210
|
+
): string {
|
|
211
|
+
return JSON.stringify(
|
|
212
|
+
PIIRedactionPluginEn$outboundSchema.parse(piiRedactionPluginEn),
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
export function piiRedactionPluginEnFromJSON(
|
|
216
|
+
jsonString: string,
|
|
217
|
+
): SafeParseResult<PIIRedactionPluginEn, SDKValidationError> {
|
|
218
|
+
return safeParse(
|
|
219
|
+
jsonString,
|
|
220
|
+
(x) => PIIRedactionPluginEn$inboundSchema.parse(JSON.parse(x)),
|
|
221
|
+
`Failed to parse 'PIIRedactionPluginEn' from JSON`,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
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 PIIRedactionPluginNlId = {
|
|
16
|
+
PiiRedaction: "pii_redaction",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
20
|
+
*/
|
|
21
|
+
export type PIIRedactionPluginNlId = ClosedEnum<typeof PIIRedactionPluginNlId>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
25
|
+
*/
|
|
26
|
+
export const PIIRedactionPluginNlOnFailure = {
|
|
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 PIIRedactionPluginNlOnFailure = ClosedEnum<
|
|
34
|
+
typeof PIIRedactionPluginNlOnFailure
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Detector language.
|
|
39
|
+
*/
|
|
40
|
+
export const PIIRedactionPluginNlLanguage = {
|
|
41
|
+
Nl: "nl",
|
|
42
|
+
} as const;
|
|
43
|
+
/**
|
|
44
|
+
* Detector language.
|
|
45
|
+
*/
|
|
46
|
+
export type PIIRedactionPluginNlLanguage = ClosedEnum<
|
|
47
|
+
typeof PIIRedactionPluginNlLanguage
|
|
48
|
+
>;
|
|
49
|
+
|
|
50
|
+
export const PIIRedactionPluginNlEntities = {
|
|
51
|
+
Age: "AGE",
|
|
52
|
+
ApiKey: "API_KEY",
|
|
53
|
+
BankRouting: "BANK_ROUTING",
|
|
54
|
+
Bic: "BIC",
|
|
55
|
+
BiometricId: "BIOMETRIC_ID",
|
|
56
|
+
BloodType: "BLOOD_TYPE",
|
|
57
|
+
Bsn: "BSN",
|
|
58
|
+
CreditCard: "CREDIT_CARD",
|
|
59
|
+
Crypto: "CRYPTO",
|
|
60
|
+
DateTime: "DATE_TIME",
|
|
61
|
+
DeviceId: "DEVICE_ID",
|
|
62
|
+
EducationLevel: "EDUCATION_LEVEL",
|
|
63
|
+
Email: "EMAIL",
|
|
64
|
+
EmailAddress: "EMAIL_ADDRESS",
|
|
65
|
+
EmploymentStatus: "EMPLOYMENT_STATUS",
|
|
66
|
+
Gender: "GENDER",
|
|
67
|
+
HealthPlanId: "HEALTH_PLAN_ID",
|
|
68
|
+
HttpCookie: "HTTP_COOKIE",
|
|
69
|
+
IbanCode: "IBAN_CODE",
|
|
70
|
+
Id: "ID",
|
|
71
|
+
IdCard: "ID_CARD",
|
|
72
|
+
Imei: "IMEI",
|
|
73
|
+
IpAddress: "IP_ADDRESS",
|
|
74
|
+
KvkNumber: "KVK_NUMBER",
|
|
75
|
+
Language: "LANGUAGE",
|
|
76
|
+
LicenseNumber: "LICENSE_NUMBER",
|
|
77
|
+
LicensePlate: "LICENSE_PLATE",
|
|
78
|
+
Location: "LOCATION",
|
|
79
|
+
MacAddress: "MAC_ADDRESS",
|
|
80
|
+
MedicalRecord: "MEDICAL_RECORD",
|
|
81
|
+
Nrp: "NRP",
|
|
82
|
+
Organization: "ORGANIZATION",
|
|
83
|
+
Passport: "PASSPORT",
|
|
84
|
+
Password: "PASSWORD",
|
|
85
|
+
Person: "PERSON",
|
|
86
|
+
PhoneNumber: "PHONE_NUMBER",
|
|
87
|
+
Pin: "PIN",
|
|
88
|
+
PoliticalView: "POLITICAL_VIEW",
|
|
89
|
+
RaceEthnicity: "RACE_ETHNICITY",
|
|
90
|
+
ReligiousBelief: "RELIGIOUS_BELIEF",
|
|
91
|
+
Sexuality: "SEXUALITY",
|
|
92
|
+
TaxId: "TAX_ID",
|
|
93
|
+
Title: "TITLE",
|
|
94
|
+
Url: "URL",
|
|
95
|
+
UsDriverLicense: "US_DRIVER_LICENSE",
|
|
96
|
+
UsSsn: "US_SSN",
|
|
97
|
+
VehicleId: "VEHICLE_ID",
|
|
98
|
+
} as const;
|
|
99
|
+
export type PIIRedactionPluginNlEntities = ClosedEnum<
|
|
100
|
+
typeof PIIRedactionPluginNlEntities
|
|
101
|
+
>;
|
|
102
|
+
|
|
103
|
+
export type PIIRedactionPluginNl = {
|
|
104
|
+
/**
|
|
105
|
+
* Plugin discriminator. Must be `pii_redaction`.
|
|
106
|
+
*/
|
|
107
|
+
id: PIIRedactionPluginNlId;
|
|
108
|
+
/**
|
|
109
|
+
* Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
|
|
110
|
+
*/
|
|
111
|
+
onFailure?: PIIRedactionPluginNlOnFailure | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Detector confidence cutoff in [0,1].
|
|
114
|
+
*/
|
|
115
|
+
threshold?: number | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Detector language.
|
|
118
|
+
*/
|
|
119
|
+
language: PIIRedactionPluginNlLanguage;
|
|
120
|
+
/**
|
|
121
|
+
* Dutch entity types to redact. Omit to redact every type detected for the language.
|
|
122
|
+
*/
|
|
123
|
+
entities?: Array<PIIRedactionPluginNlEntities> | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const PIIRedactionPluginNlId$inboundSchema: z.ZodNativeEnum<
|
|
128
|
+
typeof PIIRedactionPluginNlId
|
|
129
|
+
> = z.nativeEnum(PIIRedactionPluginNlId);
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const PIIRedactionPluginNlId$outboundSchema: z.ZodNativeEnum<
|
|
132
|
+
typeof PIIRedactionPluginNlId
|
|
133
|
+
> = PIIRedactionPluginNlId$inboundSchema;
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export const PIIRedactionPluginNlOnFailure$inboundSchema: z.ZodNativeEnum<
|
|
137
|
+
typeof PIIRedactionPluginNlOnFailure
|
|
138
|
+
> = z.nativeEnum(PIIRedactionPluginNlOnFailure);
|
|
139
|
+
/** @internal */
|
|
140
|
+
export const PIIRedactionPluginNlOnFailure$outboundSchema: z.ZodNativeEnum<
|
|
141
|
+
typeof PIIRedactionPluginNlOnFailure
|
|
142
|
+
> = PIIRedactionPluginNlOnFailure$inboundSchema;
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const PIIRedactionPluginNlLanguage$inboundSchema: z.ZodNativeEnum<
|
|
146
|
+
typeof PIIRedactionPluginNlLanguage
|
|
147
|
+
> = z.nativeEnum(PIIRedactionPluginNlLanguage);
|
|
148
|
+
/** @internal */
|
|
149
|
+
export const PIIRedactionPluginNlLanguage$outboundSchema: z.ZodNativeEnum<
|
|
150
|
+
typeof PIIRedactionPluginNlLanguage
|
|
151
|
+
> = PIIRedactionPluginNlLanguage$inboundSchema;
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const PIIRedactionPluginNlEntities$inboundSchema: z.ZodNativeEnum<
|
|
155
|
+
typeof PIIRedactionPluginNlEntities
|
|
156
|
+
> = z.nativeEnum(PIIRedactionPluginNlEntities);
|
|
157
|
+
/** @internal */
|
|
158
|
+
export const PIIRedactionPluginNlEntities$outboundSchema: z.ZodNativeEnum<
|
|
159
|
+
typeof PIIRedactionPluginNlEntities
|
|
160
|
+
> = PIIRedactionPluginNlEntities$inboundSchema;
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const PIIRedactionPluginNl$inboundSchema: z.ZodType<
|
|
164
|
+
PIIRedactionPluginNl,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
unknown
|
|
167
|
+
> = z.object({
|
|
168
|
+
id: PIIRedactionPluginNlId$inboundSchema,
|
|
169
|
+
on_failure: PIIRedactionPluginNlOnFailure$inboundSchema.optional(),
|
|
170
|
+
threshold: z.number().optional(),
|
|
171
|
+
language: PIIRedactionPluginNlLanguage$inboundSchema,
|
|
172
|
+
entities: z.array(PIIRedactionPluginNlEntities$inboundSchema).optional(),
|
|
173
|
+
}).transform((v) => {
|
|
174
|
+
return remap$(v, {
|
|
175
|
+
"on_failure": "onFailure",
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
/** @internal */
|
|
179
|
+
export type PIIRedactionPluginNl$Outbound = {
|
|
180
|
+
id: string;
|
|
181
|
+
on_failure?: string | undefined;
|
|
182
|
+
threshold?: number | undefined;
|
|
183
|
+
language: string;
|
|
184
|
+
entities?: Array<string> | undefined;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/** @internal */
|
|
188
|
+
export const PIIRedactionPluginNl$outboundSchema: z.ZodType<
|
|
189
|
+
PIIRedactionPluginNl$Outbound,
|
|
190
|
+
z.ZodTypeDef,
|
|
191
|
+
PIIRedactionPluginNl
|
|
192
|
+
> = z.object({
|
|
193
|
+
id: PIIRedactionPluginNlId$outboundSchema,
|
|
194
|
+
onFailure: PIIRedactionPluginNlOnFailure$outboundSchema.optional(),
|
|
195
|
+
threshold: z.number().optional(),
|
|
196
|
+
language: PIIRedactionPluginNlLanguage$outboundSchema,
|
|
197
|
+
entities: z.array(PIIRedactionPluginNlEntities$outboundSchema).optional(),
|
|
198
|
+
}).transform((v) => {
|
|
199
|
+
return remap$(v, {
|
|
200
|
+
onFailure: "on_failure",
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export function piiRedactionPluginNlToJSON(
|
|
205
|
+
piiRedactionPluginNl: PIIRedactionPluginNl,
|
|
206
|
+
): string {
|
|
207
|
+
return JSON.stringify(
|
|
208
|
+
PIIRedactionPluginNl$outboundSchema.parse(piiRedactionPluginNl),
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
export function piiRedactionPluginNlFromJSON(
|
|
212
|
+
jsonString: string,
|
|
213
|
+
): SafeParseResult<PIIRedactionPluginNl, SDKValidationError> {
|
|
214
|
+
return safeParse(
|
|
215
|
+
jsonString,
|
|
216
|
+
(x) => PIIRedactionPluginNl$inboundSchema.parse(JSON.parse(x)),
|
|
217
|
+
`Failed to parse 'PIIRedactionPluginNl' from JSON`,
|
|
218
|
+
);
|
|
219
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
PIIRedactionPlugin,
|
|
12
|
+
PIIRedactionPlugin$inboundSchema,
|
|
13
|
+
} from "./piiredactionplugin.js";
|
|
14
|
+
|
|
15
|
+
export type Plugin = {
|
|
16
|
+
ofPIIRedaction: PIIRedactionPlugin;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Plugin$inboundSchema: z.ZodType<Plugin, z.ZodTypeDef, unknown> = z
|
|
21
|
+
.object({
|
|
22
|
+
OfPIIRedaction: PIIRedactionPlugin$inboundSchema,
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
"OfPIIRedaction": "ofPIIRedaction",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function pluginFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<Plugin, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => Plugin$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'Plugin' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|