@nexeraid/identity-schemas 2.164.0-dev → 2.165.0-dev

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 (33) hide show
  1. package/dist/declarations/src/providers/index.d.ts +1 -0
  2. package/dist/declarations/src/providers/index.d.ts.map +1 -1
  3. package/dist/declarations/src/providers/trm-labs/trm.schema.d.ts +358 -0
  4. package/dist/declarations/src/providers/trm-labs/trm.schema.d.ts.map +1 -0
  5. package/dist/{identity-api.schema-073b77e8.cjs.dev.cjs → identity-api.schema-9a1b028a.cjs.dev.cjs} +446 -446
  6. package/dist/{identity-api.schema-b0cdf833.cjs.prod.cjs → identity-api.schema-a6843fb9.cjs.prod.cjs} +446 -446
  7. package/dist/nexeraid-identity-schemas.cjs.dev.cjs +59 -59
  8. package/dist/nexeraid-identity-schemas.cjs.prod.cjs +59 -59
  9. package/dist/package.json +1 -1
  10. package/dist/{tfhe-utilities-f68d3b85.cjs.prod.cjs → tfhe-utilities-2ff3b3c1.cjs.prod.cjs} +2 -2
  11. package/dist/{tfhe-utilities-7506bbe3.cjs.dev.cjs → tfhe-utilities-5af6eb2a.cjs.dev.cjs} +2 -2
  12. package/dist/{toArray-d4a6f7df.cjs.dev.cjs → toArray-96f8cc3a.cjs.dev.cjs} +1 -1
  13. package/dist/{toArray-19bbf25f.cjs.prod.cjs → toArray-f5e38cce.cjs.prod.cjs} +1 -1
  14. package/dist/{CoinMarketCap.schema-ab71ee5f.cjs.prod.cjs → trm.schema-2ae40855.cjs.prod.cjs} +1276 -1207
  15. package/dist/{CoinMarketCap.schema-0c52a356.cjs.dev.cjs → trm.schema-4556df89.cjs.dev.cjs} +1276 -1207
  16. package/dist/{CoinMarketCap.schema-71fcc409.esm.mjs → trm.schema-d593fe86.esm.mjs} +62 -2
  17. package/dist/{vault.schema-68148c82.cjs.dev.cjs → vault.schema-6368506b.cjs.dev.cjs} +1268 -1268
  18. package/dist/{vault.schema-83220a2a.cjs.prod.cjs → vault.schema-b41992ec.cjs.prod.cjs} +1268 -1268
  19. package/dist/{zod-utils-22ad76a6.cjs.prod.cjs → zod-utils-46b101c1.cjs.prod.cjs} +12 -12
  20. package/dist/{zod-utils-373653ad.cjs.dev.cjs → zod-utils-4e3fa4df.cjs.dev.cjs} +12 -12
  21. package/identity/dist/nexeraid-identity-schemas-identity.cjs.dev.cjs +2 -2
  22. package/identity/dist/nexeraid-identity-schemas-identity.cjs.prod.cjs +2 -2
  23. package/package.json +1 -1
  24. package/providers/dist/nexeraid-identity-schemas-providers.cjs.dev.cjs +294 -289
  25. package/providers/dist/nexeraid-identity-schemas-providers.cjs.prod.cjs +294 -289
  26. package/providers/dist/nexeraid-identity-schemas-providers.esm.mjs +1 -1
  27. package/vault/dist/nexeraid-identity-schemas-vault.cjs.dev.cjs +3 -3
  28. package/vault/dist/nexeraid-identity-schemas-vault.cjs.prod.cjs +3 -3
  29. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.dev.cjs +3 -3
  30. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.prod.cjs +3 -3
  31. package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.dev.cjs +484 -484
  32. package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.prod.cjs +484 -484
  33. package/webhooks/dist/nexeraid-identity-schemas-webhooks.esm.mjs +1 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var zod = require('zod');
4
- var vault_schema = require('./vault.schema-68148c82.cjs.dev.cjs');
3
+ var z = require('zod');
4
+ var vault_schema = require('./vault.schema-6368506b.cjs.dev.cjs');
5
5
 
6
6
  var CredentialSchemas = {
7
7
  ProofOfResidence: vault_schema.ProofOfResidenceCredentialSubjectSchema,
@@ -42,24 +42,24 @@ var CredentialTypes = ["AMLScreeningsResults", "ProofOfResidence", "SelfieImage"
42
42
  // this is for backwards compatibility
43
43
  "IDScanPassport" // this is for backwards compatibility
44
44
  ];
45
- var NexeraCredentialType = zod.z["enum"](CredentialTypes);
45
+ var NexeraCredentialType = z.z["enum"](CredentialTypes);
46
46
  var getCredentialName = function getCredentialName(value) {
47
47
  var _CredentialNames$find;
48
48
  return (_CredentialNames$find = CredentialNames.find(function (obj) {
49
49
  return obj.value === value;
50
50
  })) === null || _CredentialNames$find === void 0 ? void 0 : _CredentialNames$find.label;
51
51
  };
52
- var CredentialType = zod.z.string().transform(function (x) {
52
+ var CredentialType = z.z.string().transform(function (x) {
53
53
  return x.replace("_", "-");
54
54
  }) // TODO determine why this is needed
55
- .pipe(zod.z["enum"](CredentialTypes));
55
+ .pipe(z.z["enum"](CredentialTypes));
56
56
  // Should this be replaced by GenericVerifiableCredentialSchema?
57
57
 
58
- var VerifiableCredential = zod.z.object({
59
- issuer: zod.z.string(),
60
- type: zod.z.array(zod.z.union([zod.z.string(), CredentialType])),
61
- credentialSubject: zod.z.record(zod.z.unknown())
62
- }).catchall(zod.z.any());
58
+ var VerifiableCredential = z.z.object({
59
+ issuer: z.z.string(),
60
+ type: z.z.array(z.z.union([z.z.string(), CredentialType])),
61
+ credentialSubject: z.z.record(z.z.unknown())
62
+ }).catchall(z.z.any());
63
63
  var CredentialMediaType = vault_schema.IDImageCredentialSubjectSchema.shape.mediaType_front;
64
64
 
65
65
  // Request
@@ -70,14 +70,14 @@ var MediaType = /*#__PURE__*/function (MediaType) {
70
70
  MediaType["SignedMessage"] = "application/iden3comm-signed-json";
71
71
  return MediaType;
72
72
  }({});
73
- var MediaTypePID = zod.z.nativeEnum(MediaType);
73
+ var MediaTypePID = z.z.nativeEnum(MediaType);
74
74
  var CIRCUIT_IDS = ["authV2", "stateTransition", "credentialAtomicQueryMTPV2", "credentialAtomicQueryMTPV2OnChain", "credentialAtomicQuerySigV2", "credentialAtomicQuerySigV2OnChain", "credentialAtomicQueryV3-beta.1", "credentialAtomicQueryV3OnChain-beta.1", "linkedMultiQuery10-beta.1"];
75
- var CircuitId = zod.z["enum"](CIRCUIT_IDS);
76
- var ZeroKnowledgeProofRequest = zod.z.object({
77
- id: zod.z.number().or(zod.z.string()),
78
- circuitId: zod.z.string(),
79
- optional: zod.z["boolean"]().optional(),
80
- query: zod.z.record(zod.z.string(), zod.z.any())
75
+ var CircuitId = z.z["enum"](CIRCUIT_IDS);
76
+ var ZeroKnowledgeProofRequest = z.z.object({
77
+ id: z.z.number().or(z.z.string()),
78
+ circuitId: z.z.string(),
79
+ optional: z.z["boolean"]().optional(),
80
+ query: z.z.record(z.z.string(), z.z.any())
81
81
  });
82
82
  var AUTHORIZATION_REQUEST_MESSAGE_TYPES = {
83
83
  AUTHORIZATION_REQUEST_MESSAGE_TYPE: "https://iden3-communication.io/authorization/1.0/request",
@@ -102,78 +102,78 @@ var AUTHORIZATION_REQUEST_MESSAGE_TYPES = {
102
102
  PAYMENT_MESSAGE_TYPE: "https://iden3-communication.io/credentials/0.1/payment"
103
103
  };
104
104
  var AuthorizationRequestMessageTypes = ["https://iden3-communication.io/authorization/1.0/request", "https://iden3-communication.io/authorization/1.0/response", "https://iden3-communication.io/credentials/1.0/issuance-request", "https://iden3-communication.io/credentials/1.0/fetch-request", "https://iden3-communication.io/credentials/1.0/offer", "https://iden3-communication.io/credentials/1.0/issuance-response", "https://iden3-communication.io/credentials/1.0/refresh", "https://iden3-communication.io/devices/1.0/registration", "https://iden3-communication.io/messages/1.0/fetch", "https://iden3-communication.io/proofs/1.0/request", "https://iden3-communication.io/proofs/1.0/response", "https://iden3-communication.io/revocation/1.0/request-status", "https://iden3-communication.io/revocation/1.0/status", "https://iden3-communication.io/proofs/1.0/contract-invoke-request", "https://iden3-communication.io/proofs/1.0/contract-invoke-response", "https://iden3-communication.io/credentials/1.0/onchain-offer", "https://iden3-communication.io/credentials/0.1/proposal-request", "https://iden3-communication.io/credentials/0.1/proposal", "https://iden3-communication.io/credentials/0.1/payment-request", "https://iden3-communication.io/credentials/0.1/payment"];
105
- var AuthorizationRequestMessageType = zod.z["enum"](AuthorizationRequestMessageTypes);
106
- var AuthorizationRequestMessage = zod.z.object({
107
- id: zod.z.string(),
105
+ var AuthorizationRequestMessageType = z.z["enum"](AuthorizationRequestMessageTypes);
106
+ var AuthorizationRequestMessage = z.z.object({
107
+ id: z.z.string(),
108
108
  typ: MediaTypePID.optional(),
109
109
  type: AuthorizationRequestMessageType,
110
- thid: zod.z.string().optional(),
111
- body: zod.z.object({
112
- callbackUrl: zod.z.string(),
113
- reason: zod.z.string().optional(),
114
- did_doc: zod.z.any().optional(),
115
- message: zod.z.string().optional(),
116
- scope: zod.z.array(ZeroKnowledgeProofRequest)
110
+ thid: z.z.string().optional(),
111
+ body: z.z.object({
112
+ callbackUrl: z.z.string(),
113
+ reason: z.z.string().optional(),
114
+ did_doc: z.z.any().optional(),
115
+ message: z.z.string().optional(),
116
+ scope: z.z.array(ZeroKnowledgeProofRequest)
117
117
  }),
118
- from: zod.z.string(),
119
- to: zod.z.string().optional()
118
+ from: z.z.string(),
119
+ to: z.z.string().optional()
120
120
  });
121
121
  // Response
122
- var ProofData = zod.z.object({
123
- pi_a: zod.z.array(zod.z.string()),
124
- pi_b: zod.z.array(zod.z.array(zod.z.string())),
125
- pi_c: zod.z.array(zod.z.string()),
126
- protocol: zod.z.string(),
127
- curve: zod.z.string().optional()
128
- });
129
- var ZeroKnowledgeProofResponse = zod.z.object({
130
- id: zod.z.number(),
131
- circuitId: zod.z.string(),
132
- vp: zod.z.any().optional(),
122
+ var ProofData = z.z.object({
123
+ pi_a: z.z.array(z.z.string()),
124
+ pi_b: z.z.array(z.z.array(z.z.string())),
125
+ pi_c: z.z.array(z.z.string()),
126
+ protocol: z.z.string(),
127
+ curve: z.z.string().optional()
128
+ });
129
+ var ZeroKnowledgeProofResponse = z.z.object({
130
+ id: z.z.number(),
131
+ circuitId: z.z.string(),
132
+ vp: z.z.any().optional(),
133
133
  proof: ProofData,
134
- pub_signals: zod.z.array(zod.z.string())
134
+ pub_signals: z.z.array(z.z.string())
135
135
  });
136
- var AuthorizationResponseMessage = zod.z.object({
137
- id: zod.z.string(),
136
+ var AuthorizationResponseMessage = z.z.object({
137
+ id: z.z.string(),
138
138
  typ: MediaTypePID.optional(),
139
- type: zod.z.string(),
140
- thid: zod.z.string().optional(),
141
- body: zod.z.object({
142
- did_doc: zod.z.any().optional(),
143
- message: zod.z.string().optional(),
144
- scope: zod.z.array(ZeroKnowledgeProofResponse)
139
+ type: z.z.string(),
140
+ thid: z.z.string().optional(),
141
+ body: z.z.object({
142
+ did_doc: z.z.any().optional(),
143
+ message: z.z.string().optional(),
144
+ scope: z.z.array(ZeroKnowledgeProofResponse)
145
145
  }),
146
- from: zod.z.string().optional(),
147
- to: zod.z.string().optional()
146
+ from: z.z.string().optional(),
147
+ to: z.z.string().optional()
148
148
  });
149
149
  // Polygon Wallet
150
- var CredentialQrCodeData = zod.z.object({
151
- id: zod.z.string(),
152
- typ: zod.z.string(),
153
- type: zod.z.string(),
154
- thid: zod.z.string(),
155
- body: zod.z.object({
156
- url: zod.z.string(),
157
- credentials: zod.z.unknown()
150
+ var CredentialQrCodeData = z.z.object({
151
+ id: z.z.string(),
152
+ typ: z.z.string(),
153
+ type: z.z.string(),
154
+ thid: z.z.string(),
155
+ body: z.z.object({
156
+ url: z.z.string(),
157
+ credentials: z.z.unknown()
158
158
  }),
159
- from: zod.z.string(),
160
- to: zod.z.string()
161
- });
162
- var AuthQrCodeData = zod.z.object({
163
- id: zod.z.string(),
164
- typ: zod.z.string(),
165
- type: zod.z.string(),
166
- thid: zod.z.string(),
167
- body: zod.z.object({
168
- callbackUrl: zod.z.string(),
169
- reason: zod.z.string(),
170
- scope: zod.z.unknown()
159
+ from: z.z.string(),
160
+ to: z.z.string()
161
+ });
162
+ var AuthQrCodeData = z.z.object({
163
+ id: z.z.string(),
164
+ typ: z.z.string(),
165
+ type: z.z.string(),
166
+ thid: z.z.string(),
167
+ body: z.z.object({
168
+ callbackUrl: z.z.string(),
169
+ reason: z.z.string(),
170
+ scope: z.z.unknown()
171
171
  }),
172
- from: zod.z.string()
172
+ from: z.z.string()
173
173
  });
174
- var QrCodeLinkWithSchemaType = zod.z.object({
175
- qrCodeLink: zod.z.string().nullish(),
176
- schemaType: zod.z.string().nullish()
174
+ var QrCodeLinkWithSchemaType = z.z.object({
175
+ qrCodeLink: z.z.string().nullish(),
176
+ schemaType: z.z.string().nullish()
177
177
  }).describe("Polygon ID Verifiable Credential Offer, to be consumed by the Polygon ID Wallet");
178
178
  function parseIden3Message(input) {
179
179
  var prefix = "request_uri=";
@@ -181,7 +181,7 @@ function parseIden3Message(input) {
181
181
  if (startIndex === -1) {
182
182
  throw new Error("Wrong request - request doesn't start with request_uri=");
183
183
  }
184
- return zod.z.string().url().parse(input.substring(startIndex + prefix.length));
184
+ return z.z.string().url().parse(input.substring(startIndex + prefix.length));
185
185
  }
186
186
  function parseSessionIdFromUrl(urlString) {
187
187
  var url = new URL(urlString);
@@ -195,7 +195,7 @@ function parseSessionIdFromUrl(urlString) {
195
195
 
196
196
  var _operatorDisplayMap;
197
197
  var QUERY_LOGIC_OPERATOR = ["AND", "OR"];
198
- var QueryLogicOperator = zod.z["enum"](QUERY_LOGIC_OPERATOR);
198
+ var QueryLogicOperator = z.z["enum"](QUERY_LOGIC_OPERATOR);
199
199
  var OPERATORS = ["$noop",
200
200
  // noop can be used in zkps as proof of credential issuance https://docs.privado.id/docs/verifier/verification-library/zk-query-language#exists---operator-11
201
201
  "$eq",
@@ -222,42 +222,42 @@ var OPERATORS = ["$noop",
222
222
  // has
223
223
  "$nhas" // has not
224
224
  ];
225
- var Operator = zod.z["enum"](OPERATORS);
226
- var ZKPOperator = zod.z["enum"](OPERATORS).exclude(["$lte", "$gte", "$has", "$nhas"]);
225
+ var Operator = z.z["enum"](OPERATORS);
226
+ var ZKPOperator = z.z["enum"](OPERATORS).exclude(["$lte", "$gte", "$has", "$nhas"]);
227
227
  var operatorDisplayMap = (_operatorDisplayMap = {}, vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(_operatorDisplayMap, Operator["enum"].$eq, "is"), Operator["enum"].$ne, "is not"), Operator["enum"].$gt, "is greater than"), Operator["enum"].$lt, "is lower than"), Operator["enum"].$gte, "is greater than or equal to"), Operator["enum"].$lte, "is lower than or equal to"), Operator["enum"].$in, "is one of"), Operator["enum"].$nin, "is not one of"), Operator["enum"].$has, "has"), Operator["enum"].$nhas, "has not"), vault_schema._defineProperty(vault_schema._defineProperty(_operatorDisplayMap, Operator["enum"].$noop, "noop"), Operator["enum"].$exists, "exists"));
228
228
  var ARRAY_OPERATORS = [Operator["enum"].$has, Operator["enum"].$nhas];
229
- var ArrayOperator = zod.z["enum"](ARRAY_OPERATORS);
229
+ var ArrayOperator = z.z["enum"](ARRAY_OPERATORS);
230
230
  var STRING_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$in, Operator["enum"].$nin];
231
- var StringOperator = zod.z["enum"](STRING_OPERATORS);
231
+ var StringOperator = z.z["enum"](STRING_OPERATORS);
232
232
  var NUMERIC_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$gt, Operator["enum"].$gte, Operator["enum"].$lt, Operator["enum"].$lte
233
233
  //Operator.enum.$between,
234
234
  //Operator.enum.$nonbetween,
235
235
  ];
236
- var NumericOperator = zod.z["enum"](NUMERIC_OPERATORS);
236
+ var NumericOperator = z.z["enum"](NUMERIC_OPERATORS);
237
237
  var BOOLEAN_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne];
238
- var BooleanOperator = zod.z["enum"](BOOLEAN_OPERATORS);
238
+ var BooleanOperator = z.z["enum"](BOOLEAN_OPERATORS);
239
239
  var DATE_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$gt, Operator["enum"].$gte, Operator["enum"].$lt, Operator["enum"].$lte
240
240
  //Operator.enum.$between,
241
241
  //Operator.enum.$nonbetween,
242
242
  ];
243
- var DateOperator = zod.z["enum"](DATE_OPERATORS);
243
+ var DateOperator = z.z["enum"](DATE_OPERATORS);
244
244
  var SUPPORTED_TYPES = ["string", "integer", "boolean", "number", "array", "date", "decimal"];
245
- var SupportedType = zod.z["enum"](SUPPORTED_TYPES);
246
- var SupportedTypes = zod.z.object(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, SupportedType["enum"].string, StringOperator), SupportedType["enum"].integer, NumericOperator), SupportedType["enum"]["boolean"], BooleanOperator), SupportedType["enum"].number, NumericOperator), SupportedType["enum"].array, ArrayOperator), SupportedType["enum"].date, DateOperator), SupportedType["enum"].decimal, NumericOperator));
247
- var IDInformationTfhe = zod.z.object({
248
- type: zod.z.literal("IDInformationTfhe"),
249
- requestId: zod.z.coerce.number().nullish(),
250
- attribute: zod.z.string(),
251
- secondaryAttribute: zod.z.string().nullish(),
252
- value: zod.z.string(),
245
+ var SupportedType = z.z["enum"](SUPPORTED_TYPES);
246
+ var SupportedTypes = z.z.object(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, SupportedType["enum"].string, StringOperator), SupportedType["enum"].integer, NumericOperator), SupportedType["enum"]["boolean"], BooleanOperator), SupportedType["enum"].number, NumericOperator), SupportedType["enum"].array, ArrayOperator), SupportedType["enum"].date, DateOperator), SupportedType["enum"].decimal, NumericOperator));
247
+ var IDInformationTfhe = z.z.object({
248
+ type: z.z.literal("IDInformationTfhe"),
249
+ requestId: z.z.coerce.number().nullish(),
250
+ attribute: z.z.string(),
251
+ secondaryAttribute: z.z.string().nullish(),
252
+ value: z.z.string(),
253
253
  operator: Operator
254
254
  });
255
- var AllCredentialValues = zod.z.union([zod.z["boolean"](), zod.z.string(), zod.z.number(), zod.z.array(zod.z.string()), zod.z.array(zod.z.number())]);
256
- var QueriesOptions = zod.z.array(zod.z.object({
257
- title: zod.z.string(),
255
+ var AllCredentialValues = z.z.union([z.z["boolean"](), z.z.string(), z.z.number(), z.z.array(z.z.string()), z.z.array(z.z.number())]);
256
+ var QueriesOptions = z.z.array(z.z.object({
257
+ title: z.z.string(),
258
258
  link: vault_schema.VaultMetadataLinkZodSchema
259
259
  }));
260
- var QueryType = zod.z["enum"](["IDInformation", "IDInformationTfhe", "SelfieImage", "IDImage", "ProofOfResidence", "AMLScreeningsResults",
260
+ var QueryType = z.z["enum"](["IDInformation", "IDInformationTfhe", "SelfieImage", "IDImage", "ProofOfResidence", "AMLScreeningsResults",
261
261
  // backwards compatibility
262
262
  "ID3",
263
263
  // this is for backwards compatibility
@@ -267,20 +267,20 @@ var QueryType = zod.z["enum"](["IDInformation", "IDInformationTfhe", "SelfieImag
267
267
  // this is for backwards compatibility
268
268
  "IDScanPassport" // this is for backwards compatibility
269
269
  ]);
270
- var QueryConfigTfhe = zod.z.object({
271
- type: zod.z.literal("IDInformationTfhe"),
272
- requestId: zod.z.coerce.number().nullish(),
273
- attribute: zod.z.string(),
274
- secondaryAttribute: zod.z.string().nullish(),
275
- value: zod.z.string(),
270
+ var QueryConfigTfhe = z.z.object({
271
+ type: z.z.literal("IDInformationTfhe"),
272
+ requestId: z.z.coerce.number().nullish(),
273
+ attribute: z.z.string(),
274
+ secondaryAttribute: z.z.string().nullish(),
275
+ value: z.z.string(),
276
276
  operator: Operator
277
277
  });
278
- var QueryConfigSimplified = zod.z.object({
278
+ var QueryConfigSimplified = z.z.object({
279
279
  queryId: vault_schema.QueryId.describe("Unique ID for the query").optional(),
280
280
  // TODO: this should not be optional?
281
281
  id: vault_schema.QueryId.describe("Unique ID for the query").optional(),
282
282
  // TODO: this should not be optional?
283
- requestId: zod.z.coerce.number().nullish().describe("Request ID for ZKPs"),
283
+ requestId: z.z.coerce.number().nullish().describe("Request ID for ZKPs"),
284
284
  attribute: vault_schema.VaultMetadataLinkZodSchema,
285
285
  secondaryAttribute: vault_schema.VaultMetadataLinkZodSchema.nullish(),
286
286
  value: AllCredentialValues.nullish(),
@@ -289,34 +289,34 @@ var QueryConfigSimplified = zod.z.object({
289
289
  // TODO: Make the operator type dynamic based on the attribute type
290
290
  datasetColumnId: vault_schema.DatasetColumnId.nullish()
291
291
  });
292
- var QueryGroupConfigSimplified = zod.z.object({
292
+ var QueryGroupConfigSimplified = z.z.object({
293
293
  id: vault_schema.QueryGroupId.describe("Unique ID for the query group").optional(),
294
294
  operator: QueryLogicOperator,
295
- queries: zod.z.array(QueryConfigSimplified)
295
+ queries: z.z.array(QueryConfigSimplified)
296
296
  });
297
297
  var RuleResultQueryConfig = QueryConfigSimplified.extend({
298
- attribute: zod.z.union([zod.z.string(), vault_schema.VaultMetadataLinkZodSchema]),
298
+ attribute: z.z.union([z.z.string(), vault_schema.VaultMetadataLinkZodSchema]),
299
299
  // string for backwards compatibility
300
- secondaryAttribute: zod.z.union([zod.z.string(), vault_schema.VaultMetadataLinkZodSchema]).nullish(),
300
+ secondaryAttribute: z.z.union([z.z.string(), vault_schema.VaultMetadataLinkZodSchema]).nullish(),
301
301
  // string for backwards compatibility
302
302
  type: QueryType.nullish() // Backwards compatibility
303
303
  });
304
304
  var PartialQueryConfigSimplified = QueryConfigSimplified.partial();
305
- var OLD_ChallengeQuerySchema = zod.z.object({
306
- id: zod.z.string().optional(),
305
+ var OLD_ChallengeQuerySchema = z.z.object({
306
+ id: z.z.string().optional(),
307
307
  query: QueryConfigSimplified
308
308
  });
309
309
  var QueryCredentialTypes = ["IDInformation", "IDInformationTfhe", "IDImage", "SelfieImage", "ProofOfResidence"];
310
- var QueryCredentialType = zod.z["enum"](QueryCredentialTypes);
311
- var ChallengeQuerySchema = zod.z.object({
312
- id: zod.z.string().optional(),
310
+ var QueryCredentialType = z.z["enum"](QueryCredentialTypes);
311
+ var ChallengeQuerySchema = z.z.object({
312
+ id: z.z.string().optional(),
313
313
  query: QueryConfigSimplified
314
314
  });
315
315
  var OLD_CHALLENGE_QUERY_OPERATORS = ["GREATER_THAN", "LESS_THAN", "EQUAL_TO", "NOT_EQUAL_TO", "LESS_THAN_OR_EQUAL_TO", "GREATER_THAN_OR_EQUAL_TO", "IN", "NOT_IN",
316
316
  //"BETWEEN",
317
317
  //"NOT_BETWEEN",
318
318
  "EXISTS"];
319
- var OLD_ChallengeQueryOperator = zod.z["enum"](OLD_CHALLENGE_QUERY_OPERATORS);
319
+ var OLD_ChallengeQueryOperator = z.z["enum"](OLD_CHALLENGE_QUERY_OPERATORS);
320
320
  var OperatorMappings = {
321
321
  toChallenge: vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, Operator["enum"].$noop, OLD_ChallengeQueryOperator["enum"].EQUAL_TO), Operator["enum"].$eq, OLD_ChallengeQueryOperator["enum"].EQUAL_TO), Operator["enum"].$lt, OLD_ChallengeQueryOperator["enum"].LESS_THAN), Operator["enum"].$lte, OLD_ChallengeQueryOperator["enum"].LESS_THAN_OR_EQUAL_TO), Operator["enum"].$gt, OLD_ChallengeQueryOperator["enum"].GREATER_THAN), Operator["enum"].$gte, OLD_ChallengeQueryOperator["enum"].GREATER_THAN_OR_EQUAL_TO), Operator["enum"].$in, OLD_ChallengeQueryOperator["enum"].IN), Operator["enum"].$nin, OLD_ChallengeQueryOperator["enum"].NOT_IN), Operator["enum"].$ne, OLD_ChallengeQueryOperator["enum"].NOT_EQUAL_TO), Operator["enum"].$exists, OLD_ChallengeQueryOperator["enum"].EXISTS),
322
322
  fromChallenge: vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, OLD_ChallengeQueryOperator["enum"].EQUAL_TO, Operator["enum"].$eq), OLD_ChallengeQueryOperator["enum"].LESS_THAN, Operator["enum"].$lt), OLD_ChallengeQueryOperator["enum"].LESS_THAN_OR_EQUAL_TO, Operator["enum"].$lte), OLD_ChallengeQueryOperator["enum"].GREATER_THAN, Operator["enum"].$gt), OLD_ChallengeQueryOperator["enum"].GREATER_THAN_OR_EQUAL_TO, Operator["enum"].$gte), OLD_ChallengeQueryOperator["enum"].IN, Operator["enum"].$in), OLD_ChallengeQueryOperator["enum"].NOT_IN, Operator["enum"].$nin), OLD_ChallengeQueryOperator["enum"].NOT_EQUAL_TO, Operator["enum"].$ne), OLD_ChallengeQueryOperator["enum"].EXISTS, Operator["enum"].$exists)
@@ -326,7 +326,7 @@ var OLD_ChallengeQueryOperatorToOperator = OperatorMappings.fromChallenge;
326
326
 
327
327
  // FIXME: Remove this once we migrate to the vault metadata
328
328
  var OLD_QueryCredentialTypes = ["IDInformation", "IDImage", "SelfieImage", "ProofOfResidence", "AMLScreeningsResults", "ID3", "IDScan", "IDScanSelfie", "IDScanPassport"];
329
- var OLD_QueryCredentialType = zod.z["enum"](OLD_QueryCredentialTypes);
329
+ var OLD_QueryCredentialType = z.z["enum"](OLD_QueryCredentialTypes);
330
330
  /**
331
331
  * @deprecated Use vault client and services instead
332
332
  *
@@ -394,97 +394,97 @@ function oldCredentialPathToDataLink(path, credentialType) {
394
394
  }
395
395
 
396
396
  var SCENARIO_ACTION_TYPES = ["SET_CUSTOMER_RISK_LEVEL", "SET_CUSTOMER_STATUS", "SET_ALERT_RISK_LEVEL", "SET_TRANSACTION_RISK_LEVEL", "SET_TRANSACTION_STATUS", "ASSIGN_COMPLIANCE_OFFICER", "CREATE_ALERT", "ASSIGN_TAG", "BLOCK_ON_CHAIN_TRANSACTION"];
397
- var ActionType = zod.z["enum"](SCENARIO_ACTION_TYPES);
397
+ var ActionType = z.z["enum"](SCENARIO_ACTION_TYPES);
398
398
  var ACTION_TRIGGERS = ["ON_TRUE", "ON_FALSE", "ALWAYS"];
399
- var ActionTrigger = zod.z["enum"](ACTION_TRIGGERS);
399
+ var ActionTrigger = z.z["enum"](ACTION_TRIGGERS);
400
400
  var ACTION_STATUSES = ["ENABLED", "DISABLED"];
401
- var ActionStatus = zod.z["enum"](ACTION_STATUSES);
402
- var ActionValue = zod.z.string();
401
+ var ActionStatus = z.z["enum"](ACTION_STATUSES);
402
+ var ActionValue = z.z.string();
403
403
  var ScenarioTypes = ["PrivacyPreservingMonitoring", "IndividualMonitoring", "TransactionMonitoring", "TFHE",
404
404
  // TODO integrate TFHE verification
405
405
  "BlockchainPolicies"];
406
- var ScenarioType = zod.z["enum"](ScenarioTypes);
406
+ var ScenarioType = z.z["enum"](ScenarioTypes);
407
407
  var ScenarioModes = ["INTERNAL", "EXTERNAL"];
408
- var ScenarioMode = zod.z["enum"](ScenarioModes);
408
+ var ScenarioMode = z.z["enum"](ScenarioModes);
409
409
  var ScenarioStatuses = ["enabled", "disabled"];
410
- var ScenarioStatus = zod.z["enum"](ScenarioStatuses);
411
- var ScenarioSchema = zod.z.object({
412
- title: zod.z.string(),
413
- link: zod.z.object({
414
- version: zod.z.string(),
415
- schema: zod.z.string(),
416
- path: zod.z.string()
410
+ var ScenarioStatus = z.z["enum"](ScenarioStatuses);
411
+ var ScenarioSchema = z.z.object({
412
+ title: z.z.string(),
413
+ link: z.z.object({
414
+ version: z.z.string(),
415
+ schema: z.z.string(),
416
+ path: z.z.string()
417
417
  }),
418
- status: zod.z["enum"]([ScenarioStatus.Enum.enabled, ScenarioStatus.Enum.disabled]).optional()
418
+ status: z.z["enum"]([ScenarioStatus.Enum.enabled, ScenarioStatus.Enum.disabled]).optional()
419
419
  });
420
420
  var BackwardsCompatibleScenarioTypes = ["PrivacyPreservingMonitoring", "IndividualMonitoring", "TransactionMonitoring", "TFHE", "OffChainZKP",
421
421
  // Backwards compatible
422
422
  "ChallengeQuery",
423
423
  // Backwards compatible
424
424
  "BlockchainPolicies"];
425
- var BackwardsCompatibleScenarioType = zod.z["enum"](BackwardsCompatibleScenarioTypes);
426
- var BaseQueryResponse = zod.z.object({
427
- result: zod.z.object({
428
- is_valid: zod.z["boolean"](),
429
- reasons: zod.z.array(zod.z.string())
425
+ var BackwardsCompatibleScenarioType = z.z["enum"](BackwardsCompatibleScenarioTypes);
426
+ var BaseQueryResponse = z.z.object({
427
+ result: z.z.object({
428
+ is_valid: z.z["boolean"](),
429
+ reasons: z.z.array(z.z.string())
430
430
  })
431
431
  });
432
432
  var OffChainZKPRuleResult = BaseQueryResponse.extend({
433
- result: zod.z.object({
434
- is_valid: zod.z["boolean"](),
433
+ result: z.z.object({
434
+ is_valid: z.z["boolean"](),
435
435
  query: QueryConfigSimplified,
436
- reasons: zod.z.array(zod.z.string())
436
+ reasons: z.z.array(z.z.string())
437
437
  })
438
438
  });
439
439
  var ExecuteQueryResponse = BaseQueryResponse.extend({
440
440
  executionId: vault_schema.UuidString
441
441
  });
442
- var RuleEngineResponse = zod.z.object({
442
+ var RuleEngineResponse = z.z.object({
443
443
  objectType: BackwardsCompatibleScenarioType,
444
- objectId: zod.z.string().describe("Object id in the cms (challengeQueryid, offChainZKPid)"),
445
- name: zod.z.string(),
444
+ objectId: z.z.string().describe("Object id in the cms (challengeQueryid, offChainZKPid)"),
445
+ name: z.z.string(),
446
446
  address: vault_schema.BlockchainAddress.nullish(),
447
447
  result: ExecuteQueryResponse,
448
448
  executionId: vault_schema.UuidString,
449
- scenarioId: zod.z.string()
449
+ scenarioId: z.z.string()
450
450
  });
451
- var ScenarioExecutionResponse = zod.z.array(RuleEngineResponse);
451
+ var ScenarioExecutionResponse = z.z.array(RuleEngineResponse);
452
452
  var RuleResultStatuses = ["valid", "not-valid", "skipped", "error", "unknown"];
453
- var RuleResultStatus = zod.z["enum"](RuleResultStatuses);
453
+ var RuleResultStatus = z.z["enum"](RuleResultStatuses);
454
454
  var RuleResultStatusLabels = vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty(vault_schema._defineProperty({}, RuleResultStatus.Enum.valid, "Valid"), RuleResultStatus.Enum["not-valid"], "Not Valid"), RuleResultStatus.Enum.skipped, "Skipped"), RuleResultStatus.Enum.error, "Error"), RuleResultStatus.Enum.unknown, "Unknown");
455
- var SdkVerificationOutput = zod.z.object({
456
- customerId: zod.z.string().optional(),
455
+ var SdkVerificationOutput = z.z.object({
456
+ customerId: z.z.string().optional(),
457
457
  // for v1
458
- scenarioExecutionId: zod.z.string().optional(),
458
+ scenarioExecutionId: z.z.string().optional(),
459
459
  // for v1
460
460
  status: RuleResultStatus.optional(),
461
461
  // for v1
462
- results: zod.z.array(ScenarioExecutionResponse).optional() // for v1,
462
+ results: z.z.array(ScenarioExecutionResponse).optional() // for v1,
463
463
  });
464
464
  var VerificationSessionStatuses = ["IN_PROGRESS", "COMPLETED", "NOT_STARTED"];
465
- var VerificationSessionStatus = zod.z["enum"](VerificationSessionStatuses);
466
- var VerificationOutput = zod.z.object({
465
+ var VerificationSessionStatus = z.z["enum"](VerificationSessionStatuses);
466
+ var VerificationOutput = z.z.object({
467
467
  id: vault_schema.UuidString.nullable(),
468
468
  verificationResult: SdkVerificationOutput.nullable(),
469
469
  status: VerificationSessionStatus
470
470
  });
471
- var Action = zod.z.object({
471
+ var Action = z.z.object({
472
472
  type: ActionType,
473
473
  trigger: ActionTrigger,
474
474
  status: ActionStatus,
475
475
  value: ActionValue
476
476
  });
477
- var SimplifiedScenario = zod.z.object({
477
+ var SimplifiedScenario = z.z.object({
478
478
  id: vault_schema.ScenarioId,
479
- name: zod.z.string(),
480
- description: zod.z.string().nullish(),
481
- queries: zod.z.array(QueryConfigSimplified),
482
- queryGroups: zod.z.array(QueryGroupConfigSimplified),
483
- actions: zod.z.array(Action),
479
+ name: z.z.string(),
480
+ description: z.z.string().nullish(),
481
+ queries: z.z.array(QueryConfigSimplified),
482
+ queryGroups: z.z.array(QueryGroupConfigSimplified),
483
+ actions: z.z.array(Action),
484
484
  type: ScenarioType,
485
485
  mode: ScenarioMode,
486
486
  workspaceId: vault_schema.WorkspaceId,
487
- vcsIncluded: zod.z.array(CredentialType).nullish()
487
+ vcsIncluded: z.z.array(CredentialType).nullish()
488
488
  });
489
489
 
490
490
  // creating this because SmartContractDeployment has an issue with EvmAddress
@@ -494,7 +494,7 @@ var AbbreviatedWorkflowScenario = SimplifiedScenario.omit({
494
494
  vcsIncluded: true,
495
495
  queries: true
496
496
  }).extend({
497
- queries: zod.z.array(QueryConfigSimplified)
497
+ queries: z.z.array(QueryConfigSimplified)
498
498
  });
499
499
  var TemplateScenario = SimplifiedScenario.omit({
500
500
  workspaceId: true
@@ -502,478 +502,478 @@ var TemplateScenario = SimplifiedScenario.omit({
502
502
  var CreateTemplateScenario = TemplateScenario.omit({
503
503
  id: true
504
504
  }).extend({
505
- entityType: zod.z["enum"](["individual", "company", "transaction"]).optional()
505
+ entityType: z.z["enum"](["individual", "company", "transaction"]).optional()
506
506
  });
507
507
 
508
- var ScenarioAuthorizationData = zod.z.object({
508
+ var ScenarioAuthorizationData = z.z.object({
509
509
  executionId: vault_schema.UuidString,
510
510
  sessionId: vault_schema.UuidString,
511
- projectId: zod.z.string(),
511
+ projectId: z.z.string(),
512
512
  address: vault_schema.BlockchainAddress.nullish(),
513
- status: zod.z["enum"](["pending", "authorised", "unauthorised"]),
514
- scenarioId: zod.z.string(),
515
- scenarioName: zod.z.string(),
513
+ status: z.z["enum"](["pending", "authorised", "unauthorised"]),
514
+ scenarioId: z.z.string(),
515
+ scenarioName: z.z.string(),
516
516
  requestMessage: AuthorizationRequestMessage,
517
517
  responseMessage: AuthorizationResponseMessage.nullish(),
518
- verificationError: zod.z.string().nullish(),
518
+ verificationError: z.z.string().nullish(),
519
519
  query: QueryConfigSimplified.array(),
520
520
  workflowSessionId: vault_schema.UuidString.optional()
521
521
  });
522
522
  // v1 sdk
523
523
  var SdkVerificationResponseSchema = SdkVerificationOutput;
524
- var CloseScreenNotification = zod.z.object({
525
- type: zod.z.literal("closeScreen"),
526
- identifier: zod.z.string(),
527
- data: zod.z.undefined()
528
- });
529
- var KycCompletionData = zod.z.array(VerifiableCredential);
530
- var KycCompletionNotification = zod.z.object({
531
- type: zod.z.literal("kycCompletion"),
532
- identifier: zod.z.string(),
524
+ var CloseScreenNotification = z.z.object({
525
+ type: z.z.literal("closeScreen"),
526
+ identifier: z.z.string(),
527
+ data: z.z.undefined()
528
+ });
529
+ var KycCompletionData = z.z.array(VerifiableCredential);
530
+ var KycCompletionNotification = z.z.object({
531
+ type: z.z.literal("kycCompletion"),
532
+ identifier: z.z.string(),
533
533
  data: KycCompletionData
534
534
  });
535
- var RuleEngineScenarioExecutionData = zod.z.object({
536
- type: zod.z.literal("RuleEngineScenarioExecution"),
535
+ var RuleEngineScenarioExecutionData = z.z.object({
536
+ type: z.z.literal("RuleEngineScenarioExecution"),
537
537
  data: SdkVerificationResponseSchema
538
538
  });
539
- var OffChainScenarioExecutionData = zod.z.object({
540
- type: zod.z.literal("OffChainScenarioExecution"),
541
- data: zod.z.array(ScenarioAuthorizationData)
539
+ var OffChainScenarioExecutionData = z.z.object({
540
+ type: z.z.literal("OffChainScenarioExecution"),
541
+ data: z.z.array(ScenarioAuthorizationData)
542
542
  });
543
- var OnChainScenarioExecutionData = zod.z.object({
544
- type: zod.z.literal("OnChainScenarioExecution"),
545
- data: zod.z.any()
543
+ var OnChainScenarioExecutionData = z.z.object({
544
+ type: z.z.literal("OnChainScenarioExecution"),
545
+ data: z.z.any()
546
546
  });
547
- var ScenarioExecutionData = zod.z.union([RuleEngineScenarioExecutionData, OffChainScenarioExecutionData, OnChainScenarioExecutionData]);
548
- var ScenarioExecutionNotification = zod.z.object({
549
- type: zod.z.literal("scenarioExecution"),
550
- identifier: zod.z.string(),
547
+ var ScenarioExecutionData = z.z.union([RuleEngineScenarioExecutionData, OffChainScenarioExecutionData, OnChainScenarioExecutionData]);
548
+ var ScenarioExecutionNotification = z.z.object({
549
+ type: z.z.literal("scenarioExecution"),
550
+ identifier: z.z.string(),
551
551
  data: ScenarioExecutionData
552
552
  });
553
- var IsVerifiedNotification = zod.z.object({
554
- type: zod.z.literal("isVerifiedNotification"),
555
- identifier: zod.z.string(),
556
- isVerified: zod.z["boolean"]()
557
- });
558
- var PolygonIdInitialized = zod.z.object({
559
- type: zod.z.literal("polygonIdInitialized"),
560
- identifier: zod.z.string(),
561
- data: zod.z.string()
562
- });
563
- var OcvSdkInitialized = zod.z.object({
564
- type: zod.z.literal("ocvSdkInitialized"),
565
- identifier: zod.z.string()
566
- });
567
- var StartCompletedNotification = zod.z.object({
568
- type: zod.z.literal("startCompletedNotification"),
569
- identifier: zod.z.string()
570
- });
571
- var IdentityNotificationMessage = zod.z.union([CloseScreenNotification, PolygonIdInitialized, OcvSdkInitialized, StartCompletedNotification, KycCompletionNotification, ScenarioExecutionNotification, IsVerifiedNotification]);
572
- var InitialDataRequest = zod.z.object({
573
- type: zod.z.literal("initialDataRequest"),
574
- identifier: zod.z.string()
575
- });
576
- var SignatureRequest = zod.z.object({
577
- type: zod.z.literal("signatureRequest"),
578
- identifier: zod.z.string(),
579
- data: zod.z.object({
580
- message: zod.z.string()
553
+ var IsVerifiedNotification = z.z.object({
554
+ type: z.z.literal("isVerifiedNotification"),
555
+ identifier: z.z.string(),
556
+ isVerified: z.z["boolean"]()
557
+ });
558
+ var PolygonIdInitialized = z.z.object({
559
+ type: z.z.literal("polygonIdInitialized"),
560
+ identifier: z.z.string(),
561
+ data: z.z.string()
562
+ });
563
+ var OcvSdkInitialized = z.z.object({
564
+ type: z.z.literal("ocvSdkInitialized"),
565
+ identifier: z.z.string()
566
+ });
567
+ var StartCompletedNotification = z.z.object({
568
+ type: z.z.literal("startCompletedNotification"),
569
+ identifier: z.z.string()
570
+ });
571
+ var IdentityNotificationMessage = z.z.union([CloseScreenNotification, PolygonIdInitialized, OcvSdkInitialized, StartCompletedNotification, KycCompletionNotification, ScenarioExecutionNotification, IsVerifiedNotification]);
572
+ var InitialDataRequest = z.z.object({
573
+ type: z.z.literal("initialDataRequest"),
574
+ identifier: z.z.string()
575
+ });
576
+ var SignatureRequest = z.z.object({
577
+ type: z.z.literal("signatureRequest"),
578
+ identifier: z.z.string(),
579
+ data: z.z.object({
580
+ message: z.z.string()
581
581
  })
582
582
  });
583
- var TransactionData = zod.z.object({
583
+ var TransactionData = z.z.object({
584
584
  accountAddress: vault_schema.BlockchainAddress,
585
585
  to: vault_schema.BlockchainAddress,
586
586
  data: vault_schema.String0x,
587
- value: zod.z.string().optional()
587
+ value: z.z.string().optional()
588
588
  });
589
- var SendTransactionRequest = zod.z.object({
590
- type: zod.z.literal("sendTransactionRequest"),
591
- identifier: zod.z.string(),
589
+ var SendTransactionRequest = z.z.object({
590
+ type: z.z.literal("sendTransactionRequest"),
591
+ identifier: z.z.string(),
592
592
  data: TransactionData
593
593
  });
594
- var IdentityRequestMessage = zod.z.union([InitialDataRequest, SignatureRequest, SendTransactionRequest]);
594
+ var IdentityRequestMessage = z.z.union([InitialDataRequest, SignatureRequest, SendTransactionRequest]);
595
595
  var AVAILABLE_FLOWS = ["VERIFICATION", "MANAGEMENT", "POLYGON_ID", "KYB"];
596
- var AvailableFlow = zod.z["enum"](AVAILABLE_FLOWS);
597
- var DataAvailableOnStart = zod.z.object({
598
- identifier: zod.z.string().optional(),
599
- flow: zod.z["enum"](AVAILABLE_FLOWS).optional(),
600
- accessToken: zod.z.string(),
601
- signingMessage: zod.z.string(),
602
- signature: zod.z.string()
603
- });
604
- var InitialDataResponse = zod.z.object({
605
- type: zod.z.literal("onStartKyc"),
596
+ var AvailableFlow = z.z["enum"](AVAILABLE_FLOWS);
597
+ var DataAvailableOnStart = z.z.object({
598
+ identifier: z.z.string().optional(),
599
+ flow: z.z["enum"](AVAILABLE_FLOWS).optional(),
600
+ accessToken: z.z.string(),
601
+ signingMessage: z.z.string(),
602
+ signature: z.z.string()
603
+ });
604
+ var InitialDataResponse = z.z.object({
605
+ type: z.z.literal("onStartKyc"),
606
606
  data: DataAvailableOnStart
607
607
  });
608
- var SignatureResponse = zod.z.object({
609
- type: zod.z.literal("signature"),
608
+ var SignatureResponse = z.z.object({
609
+ type: z.z.literal("signature"),
610
610
  data: vault_schema.BlockchainSignature
611
611
  });
612
- var TransactionResponse = zod.z.object({
613
- type: zod.z.literal("transactionResponse"),
614
- data: zod.z.object({
612
+ var TransactionResponse = z.z.object({
613
+ type: z.z.literal("transactionResponse"),
614
+ data: z.z.object({
615
615
  txHash: vault_schema.TxHash
616
616
  })
617
617
  });
618
- var HostResponseMessage = zod.z.union([InitialDataResponse, SignatureResponse, TransactionResponse]);
618
+ var HostResponseMessage = z.z.union([InitialDataResponse, SignatureResponse, TransactionResponse]);
619
619
 
620
620
  /**
621
621
  * Exported types
622
622
  */
623
623
 
624
- var ComplianceImplementationStepsInput = zod.z.object({
625
- identityChecks: zod.z["boolean"]().nullish(),
626
- configureIdentity: zod.z["boolean"]().nullish(),
627
- deployIdentity: zod.z["boolean"]().nullish(),
628
- monitorIdentity: zod.z["boolean"]().nullish()
624
+ var ComplianceImplementationStepsInput = z.z.object({
625
+ identityChecks: z.z["boolean"]().nullish(),
626
+ configureIdentity: z.z["boolean"]().nullish(),
627
+ deployIdentity: z.z["boolean"]().nullish(),
628
+ monitorIdentity: z.z["boolean"]().nullish()
629
629
  });
630
630
 
631
631
  /////////////
632
632
  // EIP-155 //
633
633
  /////////////
634
634
 
635
- var TxAuthInput = zod.z.object({
635
+ var TxAuthInput = z.z.object({
636
636
  workflowId: vault_schema.WorkflowId.optional(),
637
637
  chainId: vault_schema.EvmChainId,
638
- contractAbi: zod.z.array(zod.z.record(zod.z.unknown())),
638
+ contractAbi: z.z.array(z.z.record(z.z.unknown())),
639
639
  contractAddress: vault_schema.EvmAddress,
640
- functionName: zod.z.string(),
641
- args: zod.z.array(zod.z.unknown()),
640
+ functionName: z.z.string(),
641
+ args: z.z.array(z.z.unknown()),
642
642
  userAddress: vault_schema.EvmAddress,
643
- blockExpiration: zod.z.number()["int"]().optional(),
644
- nonce: zod.z.number()["int"]().optional()
643
+ blockExpiration: z.z.number()["int"]().optional(),
644
+ nonce: z.z.number()["int"]().optional()
645
645
  });
646
646
  // the api endpoint can source the userAddress from the session if it's not provided
647
647
  var ApiTxAuthInput = TxAuthInput.extend({
648
648
  userAddress: vault_schema.EvmAddress.optional()
649
649
  });
650
- var TxSignatureResponse = zod.z.object({
650
+ var TxSignatureResponse = z.z.object({
651
651
  signature: vault_schema.EIP155Signature,
652
- blockExpiration: zod.z.number()
652
+ blockExpiration: z.z.number()
653
653
  });
654
- var GetTxAuthDataSignatureSuccessResponse = zod.z.object({
655
- isAuthorized: zod.z.literal(true),
654
+ var GetTxAuthDataSignatureSuccessResponse = z.z.object({
655
+ isAuthorized: z.z.literal(true),
656
656
  signature: vault_schema.EIP155Signature,
657
- payload: zod.z.string(),
658
- blockExpiration: zod.z.number()
657
+ payload: z.z.string(),
658
+ blockExpiration: z.z.number()
659
659
  });
660
- var GetTxAuthDataSignatureFailureResponse = zod.z.object({
661
- isAuthorized: zod.z.literal(false),
662
- errorMessage: zod.z.string()
660
+ var GetTxAuthDataSignatureFailureResponse = z.z.object({
661
+ isAuthorized: z.z.literal(false),
662
+ errorMessage: z.z.string()
663
663
  });
664
- var GetTxAuthDataSignatureResponse = zod.z.union([GetTxAuthDataSignatureSuccessResponse, GetTxAuthDataSignatureFailureResponse]);
664
+ var GetTxAuthDataSignatureResponse = z.z.union([GetTxAuthDataSignatureSuccessResponse, GetTxAuthDataSignatureFailureResponse]);
665
665
  /////////////
666
666
  // Tezos //
667
667
  /////////////
668
668
 
669
- var TezosTxAuthInput = zod.z.object({
669
+ var TezosTxAuthInput = z.z.object({
670
670
  workflowId: vault_schema.WorkflowId.optional(),
671
671
  chainID: vault_schema.TezosChainId,
672
672
  contractAddress: vault_schema.TezosContractAddress,
673
673
  functionName: vault_schema.TezosEntrypointName,
674
- args: zod.z.string(),
674
+ args: z.z.string(),
675
675
  userAddress: vault_schema.TezosImplicitAddress,
676
- blockExpiration: zod.z.number()["int"]().optional(),
677
- nonce: zod.z.number()["int"]().optional()
676
+ blockExpiration: z.z.number()["int"]().optional(),
677
+ nonce: z.z.number()["int"]().optional()
678
678
  });
679
679
  // the api endpoint can source the userAddress from the session if it's not provided
680
680
  var ApiTezosTxAuthInput = TezosTxAuthInput.extend({
681
681
  userAddress: vault_schema.TezosImplicitAddress.optional()
682
682
  });
683
- var TezosTxSignatureResponse = zod.z.object({
683
+ var TezosTxSignatureResponse = z.z.object({
684
684
  signature: vault_schema.EdSignature,
685
- blockExpiration: zod.z.number()
685
+ blockExpiration: z.z.number()
686
686
  });
687
- var GetTezosTxAuthDataSignatureResponse = zod.z.union([zod.z.object({
688
- isAuthorized: zod.z.literal(true),
687
+ var GetTezosTxAuthDataSignatureResponse = z.z.union([z.z.object({
688
+ isAuthorized: z.z.literal(true),
689
689
  signature: vault_schema.EdSignature,
690
- blockExpiration: zod.z.number()
691
- }), zod.z.object({
692
- isAuthorized: zod.z.literal(false),
693
- errorMessage: zod.z.any()
690
+ blockExpiration: z.z.number()
691
+ }), z.z.object({
692
+ isAuthorized: z.z.literal(false),
693
+ errorMessage: z.z.any()
694
694
  })]);
695
695
  /////////////
696
696
  // General //
697
697
  /////////////
698
698
 
699
- var ExtendedTxAuthInput = TxAuthInput.and(zod.z.object({
700
- namespace: zod.z.literal(vault_schema.BlockchainNamespace.Enum.eip155),
699
+ var ExtendedTxAuthInput = TxAuthInput.and(z.z.object({
700
+ namespace: z.z.literal(vault_schema.BlockchainNamespace.Enum.eip155),
701
701
  userAddress: vault_schema.EvmAddress
702
702
  }));
703
- var ExtendedTezosTxAuthInput = TezosTxAuthInput.and(zod.z.object({
704
- namespace: zod.z.literal(vault_schema.BlockchainNamespace.Enum.tezos),
703
+ var ExtendedTezosTxAuthInput = TezosTxAuthInput.and(z.z.object({
704
+ namespace: z.z.literal(vault_schema.BlockchainNamespace.Enum.tezos),
705
705
  userAddress: vault_schema.TezosImplicitAddress
706
706
  }));
707
- var ExtendedTxAuthDataSignatureResponse = GetTxAuthDataSignatureResponse.and(zod.z.object({
708
- namespace: zod.z.literal(vault_schema.BlockchainNamespace.Enum.eip155),
707
+ var ExtendedTxAuthDataSignatureResponse = GetTxAuthDataSignatureResponse.and(z.z.object({
708
+ namespace: z.z.literal(vault_schema.BlockchainNamespace.Enum.eip155),
709
709
  userAddress: vault_schema.EvmAddress
710
710
  }));
711
- var ExtendedTezosTxAuthDataSignatureResponse = GetTezosTxAuthDataSignatureResponse.and(zod.z.object({
712
- namespace: zod.z.literal(vault_schema.BlockchainNamespace.Enum.tezos),
711
+ var ExtendedTezosTxAuthDataSignatureResponse = GetTezosTxAuthDataSignatureResponse.and(z.z.object({
712
+ namespace: z.z.literal(vault_schema.BlockchainNamespace.Enum.tezos),
713
713
  userAddress: vault_schema.TezosImplicitAddress
714
714
  }));
715
- var AnyTxAuthDataSignatureResponse = zod.z.union([ExtendedTxAuthDataSignatureResponse, ExtendedTezosTxAuthDataSignatureResponse]);
715
+ var AnyTxAuthDataSignatureResponse = z.z.union([ExtendedTxAuthDataSignatureResponse, ExtendedTezosTxAuthDataSignatureResponse]);
716
716
  /////////////
717
717
  // JS SDK //
718
718
  /////////////
719
719
 
720
- var Eip155TxAuthInputJsSdk = ExtendedTxAuthInput.and(zod.z.object({
720
+ var Eip155TxAuthInputJsSdk = ExtendedTxAuthInput.and(z.z.object({
721
721
  workflowId: vault_schema.WorkflowId
722
722
  }));
723
- var TezosTxAuthInputJsSdk = ExtendedTezosTxAuthInput.and(zod.z.object({
723
+ var TezosTxAuthInputJsSdk = ExtendedTezosTxAuthInput.and(z.z.object({
724
724
  workflowId: vault_schema.WorkflowId
725
725
  }));
726
- var AnyTxAuthInputJsSdk = zod.z.union([Eip155TxAuthInputJsSdk, TezosTxAuthInputJsSdk]);
726
+ var AnyTxAuthInputJsSdk = z.z.union([Eip155TxAuthInputJsSdk, TezosTxAuthInputJsSdk]);
727
727
 
728
- var SimplifiedCredential = zod.z.object({
729
- id: zod.z.string(),
730
- type: zod.z.array(zod.z.string()),
731
- issuanceDate: zod.z.string(),
732
- journeyId: zod.z.string()
728
+ var SimplifiedCredential = z.z.object({
729
+ id: z.z.string(),
730
+ type: z.z.array(z.z.string()),
731
+ issuanceDate: z.z.string(),
732
+ journeyId: z.z.string()
733
733
  });
734
734
  /**
735
735
  * GetCredentialsRequest
736
736
  */
737
- var GetCredentialsRequest = zod.z.object({
738
- type: zod.z.literal("getCredentials"),
739
- data: zod.z.undefined()
737
+ var GetCredentialsRequest = z.z.object({
738
+ type: z.z.literal("getCredentials"),
739
+ data: z.z.undefined()
740
740
  });
741
741
  /**
742
742
  * GetCredentialsResponse
743
743
  */
744
- var GetCredentialsResponse = zod.z.object({
745
- type: zod.z.literal("polygonIdCredentials"),
746
- credentials: zod.z.array(SimplifiedCredential),
747
- identifier: zod.z.string()
744
+ var GetCredentialsResponse = z.z.object({
745
+ type: z.z.literal("polygonIdCredentials"),
746
+ credentials: z.z.array(SimplifiedCredential),
747
+ identifier: z.z.string()
748
748
  });
749
749
  /**
750
750
  * PolygonIdRequest
751
751
  */
752
- var PolygonIdRequestData = zod.z.union([zod.z.object({
753
- type: zod.z.literal("auth"),
752
+ var PolygonIdRequestData = z.z.union([z.z.object({
753
+ type: z.z.literal("auth"),
754
754
  authRequest: AuthorizationRequestMessage
755
- }), zod.z.object({
756
- type: zod.z.literal("credentialOffer"),
755
+ }), z.z.object({
756
+ type: z.z.literal("credentialOffer"),
757
757
  credentialOfferRequest: QrCodeLinkWithSchemaType
758
- }), zod.z.object({
759
- type: zod.z.literal("zkp"),
758
+ }), z.z.object({
759
+ type: z.z.literal("zkp"),
760
760
  zkpRequest: ZeroKnowledgeProofRequest
761
761
  })]);
762
- var PolygonIdRequest = zod.z.object({
763
- type: zod.z.literal("polygonIdRequest"),
762
+ var PolygonIdRequest = z.z.object({
763
+ type: z.z.literal("polygonIdRequest"),
764
764
  data: PolygonIdRequestData
765
765
  });
766
766
  /**
767
767
  * PolygonIdResponse
768
768
  */
769
- var PolygonIdResponseData = zod.z.union([zod.z.object({
770
- type: zod.z.literal("auth"),
769
+ var PolygonIdResponseData = z.z.union([z.z.object({
770
+ type: z.z.literal("auth"),
771
771
  authResponse: AuthorizationResponseMessage
772
- }), zod.z.object({
773
- type: zod.z.literal("credentialOffer"),
774
- credentialOfferResponse: zod.z.array(vault_schema.GenericVerifiableCredentialSchema)
775
- }), zod.z.object({
776
- type: zod.z.literal("zkp"),
772
+ }), z.z.object({
773
+ type: z.z.literal("credentialOffer"),
774
+ credentialOfferResponse: z.z.array(vault_schema.GenericVerifiableCredentialSchema)
775
+ }), z.z.object({
776
+ type: z.z.literal("zkp"),
777
777
  zkpResponse: ZeroKnowledgeProofResponse
778
- }), zod.z.object({
779
- type: zod.z.literal("close"),
780
- screen: zod.z["enum"](["auth", "credentialOffer", "zkp", "getCredentials"]),
781
- closeResponse: zod.z.string()
778
+ }), z.z.object({
779
+ type: z.z.literal("close"),
780
+ screen: z.z["enum"](["auth", "credentialOffer", "zkp", "getCredentials"]),
781
+ closeResponse: z.z.string()
782
782
  })]);
783
- var PolygonIdResponse = zod.z.object({
784
- type: zod.z.literal("polygonIdResponse"),
785
- identifier: zod.z.string(),
783
+ var PolygonIdResponse = z.z.object({
784
+ type: z.z.literal("polygonIdResponse"),
785
+ identifier: z.z.string(),
786
786
  data: PolygonIdResponseData
787
787
  });
788
788
  /**
789
789
  * StartFlowRequest
790
790
  */
791
- var StartFlowRequest = zod.z.union([zod.z.object({
792
- type: zod.z.literal("startVerification"),
793
- data: zod.z.undefined()
794
- }), zod.z.object({
795
- type: zod.z.literal("startManagement"),
796
- data: zod.z.undefined()
797
- }), zod.z.object({
798
- type: zod.z.literal("startKYB"),
799
- data: zod.z.undefined()
791
+ var StartFlowRequest = z.z.union([z.z.object({
792
+ type: z.z.literal("startVerification"),
793
+ data: z.z.undefined()
794
+ }), z.z.object({
795
+ type: z.z.literal("startManagement"),
796
+ data: z.z.undefined()
797
+ }), z.z.object({
798
+ type: z.z.literal("startKYB"),
799
+ data: z.z.undefined()
800
800
  })]);
801
801
  /**
802
802
  * IsVerifiedRequest
803
803
  */
804
- var IsVerifiedRequest = zod.z.object({
805
- type: zod.z.literal("isVerifiedRequest"),
806
- data: zod.z.object({
804
+ var IsVerifiedRequest = z.z.object({
805
+ type: z.z.literal("isVerifiedRequest"),
806
+ data: z.z.object({
807
807
  userAddress: vault_schema.EvmAddress
808
808
  }),
809
- identifier: zod.z.string()
809
+ identifier: z.z.string()
810
810
  });
811
811
  /**
812
812
  * IsVerifiedResponse
813
813
  */
814
- var IsVerifiedResponse = zod.z.object({
815
- type: zod.z.literal("isVerifiedResponse"),
816
- isVerified: zod.z["boolean"](),
817
- identifier: zod.z.string()
814
+ var IsVerifiedResponse = z.z.object({
815
+ type: z.z.literal("isVerifiedResponse"),
816
+ isVerified: z.z["boolean"](),
817
+ identifier: z.z.string()
818
818
  });
819
819
  /**
820
820
  * GetTxAuthSigRequest
821
821
  */
822
- var GetTxAuthSigRequest = zod.z.object({
823
- type: zod.z.literal("getTxAuthSigRequest"),
822
+ var GetTxAuthSigRequest = z.z.object({
823
+ type: z.z.literal("getTxAuthSigRequest"),
824
824
  data: ApiTxAuthInput,
825
- identifier: zod.z.string()
825
+ identifier: z.z.string()
826
826
  });
827
827
  /**
828
828
  * GetTxAuthSigResponse
829
829
  */
830
- var GetTxAuthSigResponse = zod.z.object({
831
- type: zod.z.literal("getTxAuthSigResponse"),
830
+ var GetTxAuthSigResponse = z.z.object({
831
+ type: z.z.literal("getTxAuthSigResponse"),
832
832
  signatureResponse: GetTxAuthDataSignatureResponse,
833
- identifier: zod.z.string()
833
+ identifier: z.z.string()
834
834
  });
835
835
  /**
836
836
  * GetTxAuthSigRequest Tezos
837
837
  */
838
- var GetTxAuthSigRequestTezos = zod.z.object({
839
- type: zod.z.literal("getTxAuthSigRequestTezos"),
838
+ var GetTxAuthSigRequestTezos = z.z.object({
839
+ type: z.z.literal("getTxAuthSigRequestTezos"),
840
840
  data: ApiTezosTxAuthInput,
841
- identifier: zod.z.string()
841
+ identifier: z.z.string()
842
842
  });
843
843
  /**
844
844
  * GetTxAuthSigResponse Tezos
845
845
  */
846
- var GetTxAuthSigResponseTezos = zod.z.object({
847
- type: zod.z.literal("getTezosTxAuthSigResponse"),
846
+ var GetTxAuthSigResponseTezos = z.z.object({
847
+ type: z.z.literal("getTezosTxAuthSigResponse"),
848
848
  signatureResponse: GetTezosTxAuthDataSignatureResponse,
849
- identifier: zod.z.string()
849
+ identifier: z.z.string()
850
850
  });
851
- var HostRequestMessage = zod.z.union([GetCredentialsRequest, PolygonIdRequest, StartFlowRequest, IsVerifiedRequest, GetTxAuthSigRequest, GetTxAuthSigRequestTezos]);
852
- var IdentityResponseMessage = zod.z.union([GetCredentialsResponse, PolygonIdResponse, IsVerifiedResponse, GetTxAuthSigResponse, GetTxAuthSigResponseTezos]);
851
+ var HostRequestMessage = z.z.union([GetCredentialsRequest, PolygonIdRequest, StartFlowRequest, IsVerifiedRequest, GetTxAuthSigRequest, GetTxAuthSigRequestTezos]);
852
+ var IdentityResponseMessage = z.z.union([GetCredentialsResponse, PolygonIdResponse, IsVerifiedResponse, GetTxAuthSigResponse, GetTxAuthSigResponseTezos]);
853
853
 
854
854
  /**
855
855
  * Wallet challenge parameters
856
856
  */
857
857
 
858
- var GenerateWalletChallengeRequest = zod.z.object({
858
+ var GenerateWalletChallengeRequest = z.z.object({
859
859
  address: vault_schema.BlockchainAddress,
860
860
  namespace: vault_schema.SupportedBlockchainNamespaceForSignatureAuth,
861
861
  blockchainId: vault_schema.BlockchainId.optional(),
862
- origin: zod.z.string().url(),
862
+ origin: z.z.string().url(),
863
863
  workflowId: vault_schema.WorkflowId,
864
864
  externalCustomerId: vault_schema.ExternalCustomerId.optional(),
865
865
  additionalInformation: vault_schema.AdditionalCustomerInformationParams.optional()
866
866
  });
867
- var AuthSession = zod.z.object({
867
+ var AuthSession = z.z.object({
868
868
  // JWT token containing user authentication data
869
869
  // Generated by the Identity-api using the IdentityWidgetAccessToken_NEW schema
870
870
  // Used for user identification in the identity-v2-app
871
871
  // We don't want users to rely on the structure of the token so we expose it as a string
872
- token: zod.z.string(),
872
+ token: z.z.string(),
873
873
  // the timestamp at which the session will expire
874
874
  // in seconds since epoch to avoid timezone issues and date parsing errors
875
875
  // this is exposed in case the app needs to store the session so it knows when
876
876
  // the session becomes invalid again
877
877
  // We don't want users to rely on the fact that the token is a JWT, as we
878
878
  // want to change to openId in the future, so we expose the expiration as a number
879
- expiresAt: zod.z.number(),
879
+ expiresAt: z.z.number(),
880
880
  // if an external customer id was provided, it will be returned
881
881
  // when obtaining the auth session to facilitate integration with the user's system
882
882
  externalCustomerId: vault_schema.ExternalCustomerId.optional()
883
883
  });
884
- var AuthSessionData = zod.z.object({
884
+ var AuthSessionData = z.z.object({
885
885
  /**
886
886
  * The unique identifier of the user
887
887
  */
888
- identityId: zod.z.string(),
888
+ identityId: z.z.string(),
889
889
  /**
890
890
  * The unique identifier of the user's session
891
891
  */
892
- customerId: zod.z.string(),
892
+ customerId: z.z.string(),
893
893
  /**
894
894
  * The identifier passed by the user platform
895
895
  */
896
896
  externalCustomerId: vault_schema.ExternalCustomerId.optional()
897
897
  });
898
- var ChallengeResponse = zod.z.object({
899
- challenge: zod.z.string()
898
+ var ChallengeResponse = z.z.object({
899
+ challenge: z.z.string()
900
900
  });
901
901
  ////////////////
902
902
  // SDK messages
903
903
  ////////////////
904
904
 
905
- var AppConfigRequest = zod.z.object({
906
- type: zod.z.literal("appConfig"),
907
- data: zod.z.object({
905
+ var AppConfigRequest = z.z.object({
906
+ type: z.z.literal("appConfig"),
907
+ data: z.z.object({
908
908
  authSession: AuthSession
909
909
  })
910
910
  });
911
- var WalletUpdated = zod.z.object({
912
- type: zod.z.literal("walletUpdated"),
913
- data: zod.z.object({
911
+ var WalletUpdated = z.z.object({
912
+ type: z.z.literal("walletUpdated"),
913
+ data: z.z.object({
914
914
  address: vault_schema.BlockchainAddress
915
915
  })
916
916
  });
917
- var WalletSignResponse = zod.z.object({
918
- type: zod.z.literal("walletSignResponse"),
919
- data: zod.z.object({
920
- message: zod.z.string(),
917
+ var WalletSignResponse = z.z.object({
918
+ type: z.z.literal("walletSignResponse"),
919
+ data: z.z.object({
920
+ message: z.z.string(),
921
921
  signature: vault_schema.BlockchainSignature
922
922
  })
923
923
  });
924
- var TxAuthDataSignatureGatingRequest = zod.z.object({
925
- type: zod.z.literal("txAuthDataSignatureGatingRequest"),
926
- data: zod.z.object({
924
+ var TxAuthDataSignatureGatingRequest = z.z.object({
925
+ type: z.z.literal("txAuthDataSignatureGatingRequest"),
926
+ data: z.z.object({
927
927
  input: AnyTxAuthInputJsSdk
928
928
  })
929
929
  });
930
- var GetCustomerStatusRequest = zod.z.object({
931
- type: zod.z.literal("getCustomerStatusRequest")
930
+ var GetCustomerStatusRequest = z.z.object({
931
+ type: z.z.literal("getCustomerStatusRequest")
932
932
  });
933
- var IdentitySdkMessage = zod.z.union([AppConfigRequest, WalletUpdated, WalletSignResponse, TransactionResponse, TxAuthDataSignatureGatingRequest, GetCustomerStatusRequest]);
934
- var IdentitySdkMessageWithIdentifier = zod.z.intersection(IdentitySdkMessage, zod.z.object({
935
- identifier: zod.z.string()
933
+ var IdentitySdkMessage = z.z.union([AppConfigRequest, WalletUpdated, WalletSignResponse, TransactionResponse, TxAuthDataSignatureGatingRequest, GetCustomerStatusRequest]);
934
+ var IdentitySdkMessageWithIdentifier = z.z.intersection(IdentitySdkMessage, z.z.object({
935
+ identifier: z.z.string()
936
936
  }));
937
937
  ////////////////
938
938
  // App messages
939
939
  ////////////////
940
940
 
941
- var IdentityAppLoadedNotification = zod.z.object({
942
- type: zod.z.literal("identityAppLoaded")
941
+ var IdentityAppLoadedNotification = z.z.object({
942
+ type: z.z.literal("identityAppLoaded")
943
943
  });
944
- var IdentityAppConfiguredNotification = zod.z.object({
945
- type: zod.z.literal("identityAppConfigured"),
946
- data: zod.z.object({
944
+ var IdentityAppConfiguredNotification = z.z.object({
945
+ type: z.z.literal("identityAppConfigured"),
946
+ data: z.z.object({
947
947
  auth: AuthSession
948
948
  })
949
949
  });
950
- var AuthenticationExpiredNotification = zod.z.object({
951
- type: zod.z.literal("authenticationExpired"),
952
- data: zod.z.object({
950
+ var AuthenticationExpiredNotification = z.z.object({
951
+ type: z.z.literal("authenticationExpired"),
952
+ data: z.z.object({
953
953
  authSession: AuthSession
954
954
  })
955
955
  });
956
- var WalletSignRequest = zod.z.object({
957
- type: zod.z.literal("walletSignRequest"),
958
- data: zod.z.object({
959
- message: zod.z.string()
956
+ var WalletSignRequest = z.z.object({
957
+ type: z.z.literal("walletSignRequest"),
958
+ data: z.z.object({
959
+ message: z.z.string()
960
960
  })
961
961
  });
962
- var TxAuthDataSignatureResponse = zod.z.object({
963
- type: zod.z.literal("txAuthDataSignatureResponse"),
962
+ var TxAuthDataSignatureResponse = z.z.object({
963
+ type: z.z.literal("txAuthDataSignatureResponse"),
964
964
  data: AnyTxAuthDataSignatureResponse
965
965
  });
966
- var TxAuthDataSignatureGatingError = zod.z.object({
967
- type: zod.z.literal("txAuthDataSignatureGatingError"),
968
- data: zod.z.object({
969
- error: zod.z.string()
966
+ var TxAuthDataSignatureGatingError = z.z.object({
967
+ type: z.z.literal("txAuthDataSignatureGatingError"),
968
+ data: z.z.object({
969
+ error: z.z.string()
970
970
  })
971
971
  });
972
- var GetCustomerStatusResponse = zod.z.object({
973
- type: zod.z.literal("getCustomerStatusResponse"),
974
- data: zod.z.union([vault_schema.CustomerStatus, zod.z["null"]()])
972
+ var GetCustomerStatusResponse = z.z.object({
973
+ type: z.z.literal("getCustomerStatusResponse"),
974
+ data: z.z.union([vault_schema.CustomerStatus, z.z["null"]()])
975
975
  });
976
- var IdentityAppMessage = zod.z.union([IdentityAppLoadedNotification, IdentityAppConfiguredNotification, AuthenticationExpiredNotification, WalletSignRequest, TxAuthDataSignatureResponse, TxAuthDataSignatureGatingError, GetCustomerStatusResponse,
976
+ var IdentityAppMessage = z.z.union([IdentityAppLoadedNotification, IdentityAppConfiguredNotification, AuthenticationExpiredNotification, WalletSignRequest, TxAuthDataSignatureResponse, TxAuthDataSignatureGatingError, GetCustomerStatusResponse,
977
977
  // `identifier` is a technical detail that should not be exposed to the app
978
978
  KycCompletionNotification.omit({
979
979
  identifier: true
@@ -986,76 +986,76 @@ KycCompletionNotification.omit({
986
986
  }), SendTransactionRequest.omit({
987
987
  identifier: true
988
988
  })]);
989
- var IdentityWallet = zod.z.object({
989
+ var IdentityWallet = z.z.object({
990
990
  address: vault_schema.BlockchainAddress,
991
991
  namespace: vault_schema.SupportedBlockchainNamespaceForSignatureAuth
992
992
  });
993
993
 
994
- var ZKPRequest = zod.z.object({
995
- id: zod.z.number(),
996
- circuitId: zod.z["enum"](["credentialAtomicQuerySigV2", "credentialAtomicQuerySigV2OnChain"]),
997
- optional: zod.z["boolean"]().optional(),
994
+ var ZKPRequest = z.z.object({
995
+ id: z.z.number(),
996
+ circuitId: z.z["enum"](["credentialAtomicQuerySigV2", "credentialAtomicQuerySigV2OnChain"]),
997
+ optional: z.z["boolean"]().optional(),
998
998
  query: QueryConfigSimplified
999
999
  });
1000
- var ZKPRequestFromZKVerifier = zod.z.object({
1001
- id: zod.z.number(),
1002
- circuitId: zod.z.string(),
1003
- optional: zod.z["boolean"]().optional(),
1004
- query: zod.z.record(zod.z.unknown())
1000
+ var ZKPRequestFromZKVerifier = z.z.object({
1001
+ id: z.z.number(),
1002
+ circuitId: z.z.string(),
1003
+ optional: z.z["boolean"]().optional(),
1004
+ query: z.z.record(z.z.unknown())
1005
1005
  });
1006
- var PrivacyPreservingMonitoring = zod.z.object({
1007
- requestingAuthorizationMessage: zod.z.string().nullish(),
1008
- zkpRequest: zod.z.array(ZKPRequest).nullish()
1006
+ var PrivacyPreservingMonitoring = z.z.object({
1007
+ requestingAuthorizationMessage: z.z.string().nullish(),
1008
+ zkpRequest: z.z.array(ZKPRequest).nullish()
1009
1009
  });
1010
- var CreateAuthRequestProps = zod.z.object({
1011
- hostUrl: zod.z.string().url(),
1010
+ var CreateAuthRequestProps = z.z.object({
1011
+ hostUrl: z.z.string().url(),
1012
1012
  sessionId: vault_schema.UuidString,
1013
- audience: zod.z.string().describe("DID of the verifier"),
1014
- callbackURL: zod.z.string().describe("URL to which the auth response of the client callback will be sent"),
1015
- query: zod.z.array(QueryConfigSimplified),
1016
- onChainVerification: zod.z["boolean"]().optional(),
1017
- id: zod.z.string().uuid(),
1018
- thid: zod.z.string().uuid(),
1019
- message: zod.z.string().describe("Message shown to the user")
1020
- });
1021
- var AllScenarioExecutionAuthorizationData = zod.z.object({
1013
+ audience: z.z.string().describe("DID of the verifier"),
1014
+ callbackURL: z.z.string().describe("URL to which the auth response of the client callback will be sent"),
1015
+ query: z.z.array(QueryConfigSimplified),
1016
+ onChainVerification: z.z["boolean"]().optional(),
1017
+ id: z.z.string().uuid(),
1018
+ thid: z.z.string().uuid(),
1019
+ message: z.z.string().describe("Message shown to the user")
1020
+ });
1021
+ var AllScenarioExecutionAuthorizationData = z.z.object({
1022
1022
  executionId: vault_schema.UuidString,
1023
- projectId: zod.z.string(),
1024
- scenarioExecutionIds: zod.z.array(vault_schema.UuidString)
1023
+ projectId: z.z.string(),
1024
+ scenarioExecutionIds: z.z.array(vault_schema.UuidString)
1025
1025
  });
1026
1026
  var SCENARIO_AUTHORIZATION_STATUSES = ["pending", "authorised", "unauthorised"];
1027
- var ScenarioAuthorizationStatus = zod.z["enum"](SCENARIO_AUTHORIZATION_STATUSES);
1027
+ var ScenarioAuthorizationStatus = z.z["enum"](SCENARIO_AUTHORIZATION_STATUSES);
1028
1028
 
1029
- var HostMessage = zod.z.union([HostRequestMessage, HostResponseMessage]);
1030
- var IdentityMessage = zod.z.union([IdentityNotificationMessage, IdentityRequestMessage, IdentityResponseMessage]);
1031
- var RequiredDataRowSchema = zod.z.object({
1029
+ var HostMessage = z.z.union([HostRequestMessage, HostResponseMessage]);
1030
+ var IdentityMessage = z.z.union([IdentityNotificationMessage, IdentityRequestMessage, IdentityResponseMessage]);
1031
+ var RequiredDataRowSchema = z.z.object({
1032
1032
  type: CredentialType,
1033
- requiredAttributes: zod.z.array(zod.z.object({
1034
- attribute: zod.z.string(),
1035
- value: zod.z.string(),
1036
- operator: zod.z.string()
1033
+ requiredAttributes: z.z.array(z.z.object({
1034
+ attribute: z.z.string(),
1035
+ value: z.z.string(),
1036
+ operator: z.z.string()
1037
1037
  }))
1038
1038
  });
1039
- var RequiredVerificationData = zod.z.object({
1040
- ruleEngine: zod.z.object({
1041
- requiredData: zod.z.array(RequiredDataRowSchema)
1039
+ var RequiredVerificationData = z.z.object({
1040
+ ruleEngine: z.z.object({
1041
+ requiredData: z.z.array(RequiredDataRowSchema)
1042
1042
  }),
1043
- PrivacyPreservingMonitoring: zod.z.object({
1044
- requiredData: zod.z.array(RequiredDataRowSchema),
1045
- verifications: zod.z.array(zod.z.object({
1046
- scenarioVerifierAddress: zod.z.string(),
1047
- conditions: zod.z.array(ZKPRequest)
1043
+ PrivacyPreservingMonitoring: z.z.object({
1044
+ requiredData: z.z.array(RequiredDataRowSchema),
1045
+ verifications: z.z.array(z.z.object({
1046
+ scenarioVerifierAddress: z.z.string(),
1047
+ conditions: z.z.array(ZKPRequest)
1048
1048
  }))
1049
1049
  }),
1050
- tfhe: zod.z.object({
1051
- requiredData: zod.z.array(RequiredDataRowSchema),
1052
- verifications: zod.z.array(QueryConfigSimplified)
1050
+ tfhe: z.z.object({
1051
+ requiredData: z.z.array(RequiredDataRowSchema),
1052
+ verifications: z.z.array(QueryConfigSimplified)
1053
1053
  })
1054
1054
  });
1055
1055
 
1056
- var WalletSignatureResponse = zod.z.object({
1056
+ var WalletSignatureResponse = z.z.object({
1057
1057
  // the message we requested the user to sign
1058
- message: zod.z.string(),
1058
+ message: z.z.string(),
1059
1059
  // the signature of the message
1060
1060
  signature: vault_schema.BlockchainSignature,
1061
1061
  // some wallets like Cardano Nami generate a new address for each transaction or signature
@@ -1064,12 +1064,12 @@ var WalletSignatureResponse = zod.z.object({
1064
1064
  // the type of the signer's public key
1065
1065
  // this is optional because some wallets don't provide this information
1066
1066
  // but for other wallets like cosmos kepler, this is required to verify the signature
1067
- signerPublicKeyType: zod.z.string().optional(),
1067
+ signerPublicKeyType: z.z.string().optional(),
1068
1068
  // some wallets like Aptos Petra wrap the message in some text metadata before signing
1069
1069
  // this means the user doesn't sign the message directly, but a message that contains the original message
1070
- signedMessage: zod.z.string()
1070
+ signedMessage: z.z.string()
1071
1071
  });
1072
- var VerifyWalletChallengeRequest = WalletSignatureResponse.and(zod.z.object({
1072
+ var VerifyWalletChallengeRequest = WalletSignatureResponse.and(z.z.object({
1073
1073
  address: vault_schema.BlockchainAddress,
1074
1074
  namespace: vault_schema.SupportedBlockchainNamespaceForSignatureAuth,
1075
1075
  blockchainId: vault_schema.BlockchainId.optional()