@orq-ai/node 4.14.10 → 4.14.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/evaluatorresponsefunction.js +2 -2
  5. package/models/components/evaluatorresponsehttp.js +2 -2
  6. package/models/components/evaluatorresponsejsonschema.js +2 -2
  7. package/models/components/evaluatorresponsellm.js +2 -2
  8. package/models/components/evaluatorresponsepython.js +2 -2
  9. package/models/components/evaluatorresponseragas.js +2 -2
  10. package/models/components/evaluatorresponsetypescript.js +2 -2
  11. package/models/components/reasoningpart.js +1 -1
  12. package/models/operations/createannotationqueue.js +1 -1
  13. package/models/operations/createdataset.js +1 -1
  14. package/models/operations/createdatasetitem.js +5 -5
  15. package/models/operations/createtool.js +4 -4
  16. package/models/operations/getalltools.js +4 -4
  17. package/models/operations/geteval.js +16 -16
  18. package/models/operations/getv2humanevalsets.js +2 -2
  19. package/models/operations/getv2humanevalsetsid.js +2 -2
  20. package/models/operations/listannotationqueues.js +1 -1
  21. package/models/operations/listdatasetdatapoints.js +5 -5
  22. package/models/operations/listdatasets.js +1 -1
  23. package/models/operations/patchv2humanevalsetsid.js +2 -2
  24. package/models/operations/postv2feedbackevaluation.js +4 -4
  25. package/models/operations/postv2humanevalsets.js +2 -2
  26. package/models/operations/retrieveannotationqueue.js +1 -1
  27. package/models/operations/retrievedatapoint.js +5 -5
  28. package/models/operations/retrievedataset.js +1 -1
  29. package/models/operations/retrievetool.js +4 -4
  30. package/models/operations/runagent.js +1 -1
  31. package/models/operations/streamrunagent.js +1 -1
  32. package/models/operations/updateannotationqueue.js +1 -1
  33. package/models/operations/updatedatapoint.js +5 -5
  34. package/models/operations/updatedataset.js +1 -1
  35. package/models/operations/updatetool.js +4 -4
  36. package/package.json +6 -6
  37. package/packages/orq-rc/src/funcs/piiCapabilities.ts +144 -0
  38. package/packages/orq-rc/src/lib/config.ts +2 -2
  39. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +11 -1
  40. package/packages/orq-rc/src/models/components/capabilitiesresponse.ts +96 -0
  41. package/packages/orq-rc/src/models/components/createmcpgatewayrequest.ts +11 -0
  42. package/packages/orq-rc/src/models/components/detectrequest.ts +48 -0
  43. package/packages/orq-rc/src/models/components/entitylist.ts +37 -0
  44. package/packages/orq-rc/src/models/components/guardrailruleplugin.ts +27 -0
  45. package/packages/orq-rc/src/models/components/index.ts +4 -3
  46. package/packages/orq-rc/src/models/components/mcpgateway.ts +9 -0
  47. package/packages/orq-rc/src/models/components/mcpgatewayplugin.ts +83 -0
  48. package/packages/orq-rc/src/models/components/monitorfilter.ts +8 -0
  49. package/packages/orq-rc/src/models/components/piiredactionplugin.ts +143 -0
  50. package/packages/orq-rc/src/models/components/publicplugin.ts +17 -21
  51. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  52. package/packages/orq-rc/src/models/components/redactrequest.ts +52 -0
  53. package/packages/orq-rc/src/models/components/responsehealingplugin.ts +4 -27
  54. package/packages/orq-rc/src/models/components/routingruleplugin.ts +27 -0
  55. package/packages/orq-rc/src/models/components/tracescrubbingplugin.ts +4 -24
  56. package/packages/orq-rc/src/models/components/updatemcpgatewayrequest.ts +11 -0
  57. package/packages/orq-rc/src/models/operations/createagentrequest.ts +85 -87
  58. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +18 -26
  59. package/packages/orq-rc/src/models/operations/createcompletion.ts +3 -51
  60. package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
  61. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +5 -5
  62. package/packages/orq-rc/src/models/operations/createimage.ts +3 -51
  63. package/packages/orq-rc/src/models/operations/createprompt.ts +31 -43
  64. package/packages/orq-rc/src/models/operations/creatererank.ts +3 -51
  65. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  66. package/packages/orq-rc/src/models/operations/getallprompts.ts +13 -17
  67. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  68. package/packages/orq-rc/src/models/operations/getoneprompt.ts +13 -17
  69. package/packages/orq-rc/src/models/operations/getpromptversion.ts +13 -17
  70. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/listagents.ts +37 -35
  73. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +5 -5
  74. package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
  75. package/packages/orq-rc/src/models/operations/listpromptversions.ts +13 -17
  76. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  78. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +37 -35
  80. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +5 -5
  81. package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
  82. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  83. package/packages/orq-rc/src/models/operations/runagent.ts +49 -53
  84. package/packages/orq-rc/src/models/operations/streamrunagent.ts +49 -53
  85. package/packages/orq-rc/src/models/operations/updateagent.ts +85 -87
  86. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +5 -5
  87. package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
  88. package/packages/orq-rc/src/models/operations/updateprompt.ts +31 -43
  89. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  90. package/packages/orq-rc/src/sdk/pii.ts +16 -0
  91. package/src/lib/config.ts +2 -2
  92. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  93. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  94. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  95. package/src/models/components/evaluatorresponsellm.ts +2 -2
  96. package/src/models/components/evaluatorresponsepython.ts +2 -2
  97. package/src/models/components/evaluatorresponseragas.ts +2 -2
  98. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  99. package/src/models/components/reasoningpart.ts +1 -1
  100. package/src/models/operations/createannotationqueue.ts +1 -1
  101. package/src/models/operations/createdataset.ts +1 -1
  102. package/src/models/operations/createdatasetitem.ts +5 -5
  103. package/src/models/operations/createtool.ts +4 -4
  104. package/src/models/operations/getalltools.ts +4 -4
  105. package/src/models/operations/geteval.ts +16 -16
  106. package/src/models/operations/getv2humanevalsets.ts +2 -2
  107. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  108. package/src/models/operations/listannotationqueues.ts +1 -1
  109. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  110. package/src/models/operations/listdatasets.ts +1 -1
  111. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  112. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  113. package/src/models/operations/postv2humanevalsets.ts +2 -2
  114. package/src/models/operations/retrieveannotationqueue.ts +1 -1
  115. package/src/models/operations/retrievedatapoint.ts +5 -5
  116. package/src/models/operations/retrievedataset.ts +1 -1
  117. package/src/models/operations/retrievetool.ts +4 -4
  118. package/src/models/operations/runagent.ts +1 -1
  119. package/src/models/operations/streamrunagent.ts +1 -1
  120. package/src/models/operations/updateannotationqueue.ts +1 -1
  121. package/src/models/operations/updatedatapoint.ts +5 -5
  122. package/src/models/operations/updatedataset.ts +1 -1
  123. package/src/models/operations/updatetool.ts +4 -4
  124. package/packages/orq-rc/src/models/components/piiredactionpluginauto.ts +0 -185
  125. package/packages/orq-rc/src/models/components/piiredactionpluginen.ts +0 -222
  126. package/packages/orq-rc/src/models/components/piiredactionpluginnl.ts +0 -218
@@ -2760,7 +2760,7 @@ export const UpdateDatapointEvaluations4$inboundSchema: z.ZodType<
2760
2760
  explanation: z.string().optional(),
2761
2761
  reviewed_by_id: z.string(),
2762
2762
  reviewed_at: z.string().datetime({ offset: true }).default(
2763
- "2026-09-03T21:59:03.620Z",
2763
+ "2026-09-06T12:10:38.914Z",
2764
2764
  ).transform(v => new Date(v)),
2765
2765
  type: z.literal("string_array"),
2766
2766
  values: z.array(z.string()),
@@ -2860,7 +2860,7 @@ export const UpdateDatapointEvaluations3$inboundSchema: z.ZodType<
2860
2860
  explanation: z.string().optional(),
2861
2861
  reviewed_by_id: z.string(),
2862
2862
  reviewed_at: z.string().datetime({ offset: true }).default(
2863
- "2026-09-03T21:59:03.619Z",
2863
+ "2026-09-06T12:10:38.913Z",
2864
2864
  ).transform(v => new Date(v)),
2865
2865
  type: z.literal("boolean"),
2866
2866
  value: z.boolean(),
@@ -2957,7 +2957,7 @@ export const UpdateDatapointEvaluations2$inboundSchema: z.ZodType<
2957
2957
  explanation: z.string().optional(),
2958
2958
  reviewed_by_id: z.string(),
2959
2959
  reviewed_at: z.string().datetime({ offset: true }).default(
2960
- "2026-09-03T21:59:03.619Z",
2960
+ "2026-09-06T12:10:38.913Z",
2961
2961
  ).transform(v => new Date(v)),
2962
2962
  type: z.literal("number"),
2963
2963
  value: z.number(),
@@ -3046,7 +3046,7 @@ export const UpdateDatapointEvaluations1$inboundSchema: z.ZodType<
3046
3046
  explanation: z.string().optional(),
3047
3047
  reviewed_by_id: z.string(),
3048
3048
  reviewed_at: z.string().datetime({ offset: true }).default(
3049
- "2026-09-03T21:59:03.618Z",
3049
+ "2026-09-06T12:10:38.912Z",
3050
3050
  ).transform(v => new Date(v)),
3051
3051
  type: z.literal("string"),
3052
3052
  value: z.string(),
@@ -3131,7 +3131,7 @@ export const UpdateDatapointResponseBody$inboundSchema: z.ZodType<
3131
3131
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
3132
3132
  .optional(),
3133
3133
  updated: z.string().datetime({ offset: true }).default(
3134
- "2026-09-03T21:58:55.511Z",
3134
+ "2026-09-06T12:10:30.672Z",
3135
3135
  ).transform(v => new Date(v)),
3136
3136
  }).transform((v) => {
3137
3137
  return remap$(v, {
@@ -182,7 +182,7 @@ export const UpdateDatasetResponseBody$inboundSchema: z.ZodType<
182
182
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
183
183
  .optional(),
184
184
  updated: z.string().datetime({ offset: true }).default(
185
- "2026-09-03T21:58:55.511Z",
185
+ "2026-09-06T12:10:30.672Z",
186
186
  ).transform(v => new Date(v)),
187
187
  }).transform((v) => {
188
188
  return remap$(v, {
@@ -1764,7 +1764,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1764
1764
  z.ZodTypeDef,
1765
1765
  unknown
1766
1766
  > = z.object({
1767
- _id: z.string().default("tool_01M1MMGNMEDNF6WT8X0M5QWQAE"),
1767
+ _id: z.string().default("tool_01M1VA1DCE5E2DA3HJBJJGED3C"),
1768
1768
  path: z.string(),
1769
1769
  key: z.string(),
1770
1770
  display_name: z.string().optional(),
@@ -1959,7 +1959,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
1959
1959
  z.ZodTypeDef,
1960
1960
  unknown
1961
1961
  > = z.object({
1962
- _id: z.string().default("tool_01M1MMGNMAGCJBCBFDR6BYVR3N"),
1962
+ _id: z.string().default("tool_01M1VA1DCC9XB21MR2DWBKRRYR"),
1963
1963
  path: z.string(),
1964
1964
  key: z.string(),
1965
1965
  display_name: z.string().optional(),
@@ -2054,7 +2054,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
2054
2054
  z.ZodTypeDef,
2055
2055
  unknown
2056
2056
  > = z.object({
2057
- _id: z.string().default("tool_01M1MMGNM9P92DT2FAZMT73BX4"),
2057
+ _id: z.string().default("tool_01M1VA1DCCNN21B9JWN3A2EARP"),
2058
2058
  path: z.string(),
2059
2059
  key: z.string(),
2060
2060
  display_name: z.string().optional(),
@@ -2157,7 +2157,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
2157
2157
  z.ZodTypeDef,
2158
2158
  unknown
2159
2159
  > = z.object({
2160
- _id: z.string().default("tool_01M1MMGNM8JVAC2MDXTW7PXEWT"),
2160
+ _id: z.string().default("tool_01M1VA1DC81YE138BZAJRMHGHF"),
2161
2161
  path: z.string(),
2162
2162
  key: z.string(),
2163
2163
  display_name: z.string().optional(),
@@ -1,185 +0,0 @@
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
- EmailAddress: "EMAIL_ADDRESS",
49
- EmploymentStatus: "EMPLOYMENT_STATUS",
50
- Gender: "GENDER",
51
- HealthPlanId: "HEALTH_PLAN_ID",
52
- HttpCookie: "HTTP_COOKIE",
53
- IbanCode: "IBAN_CODE",
54
- Id: "ID",
55
- IdCard: "ID_CARD",
56
- Imei: "IMEI",
57
- IpAddress: "IP_ADDRESS",
58
- Jobtitle: "JOBTITLE",
59
- Jwt: "JWT",
60
- KvkNumber: "KVK_NUMBER",
61
- Language: "LANGUAGE",
62
- LicenseNumber: "LICENSE_NUMBER",
63
- LicensePlate: "LICENSE_PLATE",
64
- Location: "LOCATION",
65
- MacAddress: "MAC_ADDRESS",
66
- MedicalLicense: "MEDICAL_LICENSE",
67
- MedicalRecord: "MEDICAL_RECORD",
68
- Nrp: "NRP",
69
- Organization: "ORGANIZATION",
70
- Passport: "PASSPORT",
71
- Password: "PASSWORD",
72
- Person: "PERSON",
73
- PhoneNumber: "PHONE_NUMBER",
74
- Pin: "PIN",
75
- PoliticalView: "POLITICAL_VIEW",
76
- RaceEthnicity: "RACE_ETHNICITY",
77
- ReligiousBelief: "RELIGIOUS_BELIEF",
78
- Sexuality: "SEXUALITY",
79
- TaxId: "TAX_ID",
80
- Title: "TITLE",
81
- UkNhs: "UK_NHS",
82
- Url: "URL",
83
- UsBankNumber: "US_BANK_NUMBER",
84
- UsDriverLicense: "US_DRIVER_LICENSE",
85
- UsItin: "US_ITIN",
86
- UsPassport: "US_PASSPORT",
87
- UsSsn: "US_SSN",
88
- Uuid: "UUID",
89
- VehicleId: "VEHICLE_ID",
90
- } as const;
91
- export type Entities = ClosedEnum<typeof Entities>;
92
-
93
- export type PIIRedactionPluginAuto = {
94
- /**
95
- * Plugin discriminator. Must be `pii_redaction`.
96
- */
97
- id: Id;
98
- /**
99
- * Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
100
- */
101
- onFailure?: OnFailure | undefined;
102
- /**
103
- * Detector confidence cutoff in [0,1].
104
- */
105
- threshold?: number | undefined;
106
- /**
107
- * Entity types to redact when no detector language is configured. Omit to redact every detected type.
108
- */
109
- entities?: Array<Entities> | undefined;
110
- };
111
-
112
- /** @internal */
113
- export const Id$inboundSchema: z.ZodNativeEnum<typeof Id> = z.nativeEnum(Id);
114
- /** @internal */
115
- export const Id$outboundSchema: z.ZodNativeEnum<typeof Id> = Id$inboundSchema;
116
-
117
- /** @internal */
118
- export const OnFailure$inboundSchema: z.ZodNativeEnum<typeof OnFailure> = z
119
- .nativeEnum(OnFailure);
120
- /** @internal */
121
- export const OnFailure$outboundSchema: z.ZodNativeEnum<typeof OnFailure> =
122
- OnFailure$inboundSchema;
123
-
124
- /** @internal */
125
- export const Entities$inboundSchema: z.ZodNativeEnum<typeof Entities> = z
126
- .nativeEnum(Entities);
127
- /** @internal */
128
- export const Entities$outboundSchema: z.ZodNativeEnum<typeof Entities> =
129
- Entities$inboundSchema;
130
-
131
- /** @internal */
132
- export const PIIRedactionPluginAuto$inboundSchema: z.ZodType<
133
- PIIRedactionPluginAuto,
134
- z.ZodTypeDef,
135
- unknown
136
- > = z.object({
137
- id: Id$inboundSchema,
138
- on_failure: OnFailure$inboundSchema.optional(),
139
- threshold: z.number().optional(),
140
- entities: z.array(Entities$inboundSchema).optional(),
141
- }).transform((v) => {
142
- return remap$(v, {
143
- "on_failure": "onFailure",
144
- });
145
- });
146
- /** @internal */
147
- export type PIIRedactionPluginAuto$Outbound = {
148
- id: string;
149
- on_failure?: string | undefined;
150
- threshold?: number | undefined;
151
- entities?: Array<string> | undefined;
152
- };
153
-
154
- /** @internal */
155
- export const PIIRedactionPluginAuto$outboundSchema: z.ZodType<
156
- PIIRedactionPluginAuto$Outbound,
157
- z.ZodTypeDef,
158
- PIIRedactionPluginAuto
159
- > = z.object({
160
- id: Id$outboundSchema,
161
- onFailure: OnFailure$outboundSchema.optional(),
162
- threshold: z.number().optional(),
163
- entities: z.array(Entities$outboundSchema).optional(),
164
- }).transform((v) => {
165
- return remap$(v, {
166
- onFailure: "on_failure",
167
- });
168
- });
169
-
170
- export function piiRedactionPluginAutoToJSON(
171
- piiRedactionPluginAuto: PIIRedactionPluginAuto,
172
- ): string {
173
- return JSON.stringify(
174
- PIIRedactionPluginAuto$outboundSchema.parse(piiRedactionPluginAuto),
175
- );
176
- }
177
- export function piiRedactionPluginAutoFromJSON(
178
- jsonString: string,
179
- ): SafeParseResult<PIIRedactionPluginAuto, SDKValidationError> {
180
- return safeParse(
181
- jsonString,
182
- (x) => PIIRedactionPluginAuto$inboundSchema.parse(JSON.parse(x)),
183
- `Failed to parse 'PIIRedactionPluginAuto' from JSON`,
184
- );
185
- }
@@ -1,222 +0,0 @@
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
- EmailAddress: "EMAIL_ADDRESS",
62
- EmploymentStatus: "EMPLOYMENT_STATUS",
63
- Gender: "GENDER",
64
- HealthPlanId: "HEALTH_PLAN_ID",
65
- HttpCookie: "HTTP_COOKIE",
66
- IbanCode: "IBAN_CODE",
67
- Id: "ID",
68
- IdCard: "ID_CARD",
69
- Imei: "IMEI",
70
- IpAddress: "IP_ADDRESS",
71
- Jobtitle: "JOBTITLE",
72
- Jwt: "JWT",
73
- KvkNumber: "KVK_NUMBER",
74
- Language: "LANGUAGE",
75
- LicenseNumber: "LICENSE_NUMBER",
76
- LicensePlate: "LICENSE_PLATE",
77
- Location: "LOCATION",
78
- MacAddress: "MAC_ADDRESS",
79
- MedicalLicense: "MEDICAL_LICENSE",
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
- UkNhs: "UK_NHS",
95
- Url: "URL",
96
- UsBankNumber: "US_BANK_NUMBER",
97
- UsDriverLicense: "US_DRIVER_LICENSE",
98
- UsItin: "US_ITIN",
99
- UsPassport: "US_PASSPORT",
100
- UsSsn: "US_SSN",
101
- Uuid: "UUID",
102
- VehicleId: "VEHICLE_ID",
103
- } as const;
104
- export type PIIRedactionPluginEnEntities = ClosedEnum<
105
- typeof PIIRedactionPluginEnEntities
106
- >;
107
-
108
- export type PIIRedactionPluginEn = {
109
- /**
110
- * Plugin discriminator. Must be `pii_redaction`.
111
- */
112
- id: PIIRedactionPluginEnId;
113
- /**
114
- * Behavior when redaction is unavailable. `block` (default) fails the request; `passthrough` sends the original text.
115
- */
116
- onFailure?: PIIRedactionPluginEnOnFailure | undefined;
117
- /**
118
- * Detector confidence cutoff in [0,1].
119
- */
120
- threshold?: number | undefined;
121
- /**
122
- * Detector language.
123
- */
124
- language: Language;
125
- /**
126
- * English entity types to redact. Omit to redact every type detected for the language.
127
- */
128
- entities?: Array<PIIRedactionPluginEnEntities> | undefined;
129
- };
130
-
131
- /** @internal */
132
- export const PIIRedactionPluginEnId$inboundSchema: z.ZodNativeEnum<
133
- typeof PIIRedactionPluginEnId
134
- > = z.nativeEnum(PIIRedactionPluginEnId);
135
- /** @internal */
136
- export const PIIRedactionPluginEnId$outboundSchema: z.ZodNativeEnum<
137
- typeof PIIRedactionPluginEnId
138
- > = PIIRedactionPluginEnId$inboundSchema;
139
-
140
- /** @internal */
141
- export const PIIRedactionPluginEnOnFailure$inboundSchema: z.ZodNativeEnum<
142
- typeof PIIRedactionPluginEnOnFailure
143
- > = z.nativeEnum(PIIRedactionPluginEnOnFailure);
144
- /** @internal */
145
- export const PIIRedactionPluginEnOnFailure$outboundSchema: z.ZodNativeEnum<
146
- typeof PIIRedactionPluginEnOnFailure
147
- > = PIIRedactionPluginEnOnFailure$inboundSchema;
148
-
149
- /** @internal */
150
- export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
151
- .nativeEnum(Language);
152
- /** @internal */
153
- export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
154
- Language$inboundSchema;
155
-
156
- /** @internal */
157
- export const PIIRedactionPluginEnEntities$inboundSchema: z.ZodNativeEnum<
158
- typeof PIIRedactionPluginEnEntities
159
- > = z.nativeEnum(PIIRedactionPluginEnEntities);
160
- /** @internal */
161
- export const PIIRedactionPluginEnEntities$outboundSchema: z.ZodNativeEnum<
162
- typeof PIIRedactionPluginEnEntities
163
- > = PIIRedactionPluginEnEntities$inboundSchema;
164
-
165
- /** @internal */
166
- export const PIIRedactionPluginEn$inboundSchema: z.ZodType<
167
- PIIRedactionPluginEn,
168
- z.ZodTypeDef,
169
- unknown
170
- > = z.object({
171
- id: PIIRedactionPluginEnId$inboundSchema,
172
- on_failure: PIIRedactionPluginEnOnFailure$inboundSchema.optional(),
173
- threshold: z.number().optional(),
174
- language: Language$inboundSchema,
175
- entities: z.array(PIIRedactionPluginEnEntities$inboundSchema).optional(),
176
- }).transform((v) => {
177
- return remap$(v, {
178
- "on_failure": "onFailure",
179
- });
180
- });
181
- /** @internal */
182
- export type PIIRedactionPluginEn$Outbound = {
183
- id: string;
184
- on_failure?: string | undefined;
185
- threshold?: number | undefined;
186
- language: string;
187
- entities?: Array<string> | undefined;
188
- };
189
-
190
- /** @internal */
191
- export const PIIRedactionPluginEn$outboundSchema: z.ZodType<
192
- PIIRedactionPluginEn$Outbound,
193
- z.ZodTypeDef,
194
- PIIRedactionPluginEn
195
- > = z.object({
196
- id: PIIRedactionPluginEnId$outboundSchema,
197
- onFailure: PIIRedactionPluginEnOnFailure$outboundSchema.optional(),
198
- threshold: z.number().optional(),
199
- language: Language$outboundSchema,
200
- entities: z.array(PIIRedactionPluginEnEntities$outboundSchema).optional(),
201
- }).transform((v) => {
202
- return remap$(v, {
203
- onFailure: "on_failure",
204
- });
205
- });
206
-
207
- export function piiRedactionPluginEnToJSON(
208
- piiRedactionPluginEn: PIIRedactionPluginEn,
209
- ): string {
210
- return JSON.stringify(
211
- PIIRedactionPluginEn$outboundSchema.parse(piiRedactionPluginEn),
212
- );
213
- }
214
- export function piiRedactionPluginEnFromJSON(
215
- jsonString: string,
216
- ): SafeParseResult<PIIRedactionPluginEn, SDKValidationError> {
217
- return safeParse(
218
- jsonString,
219
- (x) => PIIRedactionPluginEn$inboundSchema.parse(JSON.parse(x)),
220
- `Failed to parse 'PIIRedactionPluginEn' from JSON`,
221
- );
222
- }