@nexeraid/identity-schemas 2.180.0-dev → 2.181.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 (56) hide show
  1. package/dist/{CoinMarketCap.schema-1519ce71.cjs.dev.cjs → CoinMarketCap.schema-32fb1a43.cjs.dev.cjs} +2 -2
  2. package/dist/{CoinMarketCap.schema-7cd41375.esm.mjs → CoinMarketCap.schema-4a237bed.esm.mjs} +2 -2
  3. package/dist/{CoinMarketCap.schema-f97e836f.cjs.prod.cjs → CoinMarketCap.schema-c97ce981.cjs.prod.cjs} +2 -2
  4. package/dist/declarations/src/providers/customers.schema.d.ts +1 -1
  5. package/dist/declarations/src/providers/kyc-sessions.schema.d.ts +1 -1
  6. package/dist/declarations/src/vault/index.d.ts +5 -0
  7. package/dist/declarations/src/vault/index.d.ts.map +1 -1
  8. package/dist/declarations/src/vault/schemas/generated/Transaction.schema.json.d.ts +18 -0
  9. package/dist/declarations/src/vault/schemas/generated/Transaction.type.d.ts +3 -0
  10. package/dist/declarations/src/vault/schemas/generated/Transaction.type.d.ts.map +1 -1
  11. package/dist/declarations/src/vault/vault.schema.d.ts +43 -24
  12. package/dist/declarations/src/vault/vault.schema.d.ts.map +1 -1
  13. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanPassportCredentialSubjectSchema.d.ts +2 -2
  14. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanSelfieCredentialSubjectSchema.d.ts +2 -2
  15. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_IDImageCredentialSubjectSchema.d.ts +2 -2
  16. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_ProofOfResidenceCredentialSubjectSchema.d.ts +2 -2
  17. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_SelfieImageCredentialSubjectSchema.d.ts +2 -2
  18. package/dist/declarations/src/verifiable-credentials/general-vc-typing.schema.d.ts +8 -8
  19. package/dist/declarations/src/verifiable-credentials/generated/ProofOfResidenceCredentialSubjectSchema.d.ts +2 -2
  20. package/dist/declarations/src/verifiable-credentials/generated/SelfieImageCredentialSubjectSchema.d.ts +2 -2
  21. package/dist/declarations/src/verifiable-credentials/vcs.schema.d.ts +28 -28
  22. package/dist/{identity-api.schema-a2d30e14.cjs.dev.cjs → identity-api.schema-421a6fa7.cjs.dev.cjs} +2 -1
  23. package/dist/{identity-api.schema-cdb5ba64.cjs.prod.cjs → identity-api.schema-990a1a31.cjs.prod.cjs} +2 -1
  24. package/dist/{identity-api.schema-a325658d.esm.mjs → identity-api.schema-f46dc9b2.esm.mjs} +2 -1
  25. package/dist/nexeraid-identity-schemas.cjs.dev.cjs +11 -9
  26. package/dist/nexeraid-identity-schemas.cjs.prod.cjs +11 -9
  27. package/dist/nexeraid-identity-schemas.esm.mjs +7 -6
  28. package/dist/package.json +1 -1
  29. package/dist/{tfhe-utilities-9756bc15.cjs.prod.cjs → tfhe-utilities-3d73d81a.cjs.prod.cjs} +2 -2
  30. package/dist/{tfhe-utilities-7cca17c7.cjs.dev.cjs → tfhe-utilities-3f255174.cjs.dev.cjs} +2 -2
  31. package/dist/{tfhe-utilities-21c44569.esm.mjs → tfhe-utilities-4fa4008a.esm.mjs} +2 -2
  32. package/dist/{toArray-e2a36a42.esm.mjs → toArray-6dea95cf.esm.mjs} +1 -1
  33. package/dist/{toArray-1650534c.cjs.prod.cjs → toArray-c2746f52.cjs.prod.cjs} +1 -1
  34. package/dist/{toArray-d9bb813a.cjs.dev.cjs → toArray-e0d27eac.cjs.dev.cjs} +1 -1
  35. package/dist/{vault.schema-38073e10.cjs.dev.cjs → vault.schema-5366ec31.cjs.dev.cjs} +21 -0
  36. package/dist/{vault.schema-58c0147e.cjs.prod.cjs → vault.schema-a8f5d8d1.cjs.prod.cjs} +21 -0
  37. package/dist/{vault.schema-1ee28657.esm.mjs → vault.schema-cfa07d6b.esm.mjs} +21 -0
  38. package/identity/dist/nexeraid-identity-schemas-identity.cjs.dev.cjs +3 -2
  39. package/identity/dist/nexeraid-identity-schemas-identity.cjs.prod.cjs +3 -2
  40. package/identity/dist/nexeraid-identity-schemas-identity.esm.mjs +3 -2
  41. package/package.json +1 -1
  42. package/providers/dist/nexeraid-identity-schemas-providers.cjs.dev.cjs +4 -3
  43. package/providers/dist/nexeraid-identity-schemas-providers.cjs.prod.cjs +4 -3
  44. package/providers/dist/nexeraid-identity-schemas-providers.esm.mjs +4 -3
  45. package/vault/dist/nexeraid-identity-schemas-vault.cjs.dev.cjs +228 -8
  46. package/vault/dist/nexeraid-identity-schemas-vault.cjs.prod.cjs +228 -8
  47. package/vault/dist/nexeraid-identity-schemas-vault.esm.mjs +228 -4
  48. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.dev.cjs +4 -3
  49. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.prod.cjs +4 -3
  50. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.esm.mjs +4 -3
  51. package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.dev.cjs +5 -4
  52. package/webhooks/dist/nexeraid-identity-schemas-webhooks.cjs.prod.cjs +5 -4
  53. package/webhooks/dist/nexeraid-identity-schemas-webhooks.esm.mjs +5 -4
  54. package/dist/zod-utils-1426c50d.esm.mjs +0 -217
  55. package/dist/zod-utils-20d842c2.cjs.prod.cjs +0 -222
  56. package/dist/zod-utils-bed9cada.cjs.dev.cjs +0 -222
@@ -1,6 +1,230 @@
1
- export { fs as AmlResults, fx as DataLinkTypeZodSchema, fv as DataLinkVersionZodSchema, ft as DetectedDuplicates, fI as GenericVaultDataLinkZodSchema, fH as GenericVaultEmbeddedLinkZodSchema, fF as GenericVaultPointerLinkZodSchema, fG as GenericVaultSearchLinkZodSchema, fy as VaultJsonSchemas, fE as VaultMetadataLinkZodSchema, fC as VaultPointerKeyMapZodSchema, fD as VaultQueryMapZodSchema, fA as VaultSchemaIdZodSchema, fB as VaultSchemaPathsZodSchema, fz as VaultZodSchema, fw as allDataLinkTypes, fu as allDataLinkVersions } from '../../dist/vault.schema-1ee28657.esm.mjs';
2
- export { S as Separator, g as generateZodObjectPaths, r as resolvePathOnDataSchema, a as resolvePathOnMapSchema } from '../../dist/zod-utils-1426c50d.esm.mjs';
3
- import 'zod';
1
+ import { createHash } from 'crypto';
2
+ import { fV as _unsupportedIterableToArray, fO as Web3ArgsType, fW as _slicedToArray, fU as _toConsumableArray } from '../../dist/vault.schema-cfa07d6b.esm.mjs';
3
+ export { fs as AmlResults, fx as DataLinkTypeZodSchema, fv as DataLinkVersionZodSchema, ft as DetectedDuplicates, fI as GenericVaultDataLinkZodSchema, fH as GenericVaultEmbeddedLinkZodSchema, fF as GenericVaultPointerLinkZodSchema, fG as GenericVaultSearchLinkZodSchema, fy as VaultJsonSchemas, fE as VaultMetadataLinkZodSchema, fC as VaultPointerKeyMapZodSchema, fD as VaultQueryMapZodSchema, fA as VaultSchemaIdZodSchema, fB as VaultSchemaPathsZodSchema, fz as VaultZodSchema, fw as allDataLinkTypes, fu as allDataLinkVersions } from '../../dist/vault.schema-cfa07d6b.esm.mjs';
4
+ import { _ as _toArray } from '../../dist/toArray-6dea95cf.esm.mjs';
5
+ import { z } from 'zod';
4
6
  import 'nanoid';
5
7
  import 'decimal.js';
6
- import '../../dist/toArray-e2a36a42.esm.mjs';
8
+
9
+ // tools to work with object paths in TypeScript
10
+
11
+ var Separator = "/";
12
+
13
+ // recursively get the type of a nested object property
14
+ // TODO: support unions: {a: {b: string } | {c: number}} + "a/b" -> string | undefined
15
+
16
+ function _createForOfIteratorHelper(r, e) {
17
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
18
+ if (!t) {
19
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
20
+ t && (r = t);
21
+ var n = 0,
22
+ F = function () {};
23
+ return {
24
+ s: F,
25
+ n: function () {
26
+ return n >= r.length ? {
27
+ done: !0
28
+ } : {
29
+ done: !1,
30
+ value: r[n++]
31
+ };
32
+ },
33
+ e: function (r) {
34
+ throw r;
35
+ },
36
+ f: F
37
+ };
38
+ }
39
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
40
+ }
41
+ var o,
42
+ a = !0,
43
+ u = !1;
44
+ return {
45
+ s: function () {
46
+ t = t.call(r);
47
+ },
48
+ n: function () {
49
+ var r = t.next();
50
+ return a = r.done, r;
51
+ },
52
+ e: function (r) {
53
+ u = !0, o = r;
54
+ },
55
+ f: function () {
56
+ try {
57
+ a || null == t.return || t.return();
58
+ } finally {
59
+ if (u) throw o;
60
+ }
61
+ }
62
+ };
63
+ }
64
+
65
+ // this lib is too generic to follow the linting rules, a lot of types end up resolved to any
66
+ /* eslint-disable @typescript-eslint/no-explicit-any */
67
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
68
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
69
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
70
+
71
+ var generateZodObjectPaths = function generateZodObjectPaths(schema) {
72
+ function traverse(schema, pathToHere) {
73
+ var paths = [];
74
+ if (schema.shape) {
75
+ for (var _i = 0, _Object$entries = Object.entries(schema.shape); _i < _Object$entries.length; _i++) {
76
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
77
+ key = _Object$entries$_i[0],
78
+ value = _Object$entries$_i[1];
79
+ var newPath = [].concat(_toConsumableArray(pathToHere), [key]);
80
+ var deep = traverse(value, newPath);
81
+ paths = [].concat(_toConsumableArray(paths), [newPath.join(Separator)], _toConsumableArray(deep));
82
+ }
83
+ } else if (schema instanceof z.ZodOptional) {
84
+ var _deep = traverse(schema.unwrap(), pathToHere);
85
+ paths = [].concat(_toConsumableArray(paths), _toConsumableArray(_deep));
86
+ } else if (schema instanceof z.ZodArray) {
87
+ var _deep2 = traverse(schema.element, pathToHere);
88
+ paths = [].concat(_toConsumableArray(paths), _toConsumableArray(_deep2));
89
+ } else if (schema instanceof z.ZodIntersection) {
90
+ // @ts-expect-error -- TODO: fix this
91
+ var deepLeft = traverse(schema._def.left, pathToHere);
92
+ paths = [].concat(_toConsumableArray(paths), _toConsumableArray(deepLeft));
93
+ // @ts-expect-error -- TODO: fix this
94
+ var deepRight = traverse(schema._def.right, pathToHere);
95
+ paths = [].concat(_toConsumableArray(paths), _toConsumableArray(deepRight));
96
+ } else if (schema instanceof z.ZodUnion) {
97
+ var _iterator = _createForOfIteratorHelper(schema.options),
98
+ _step;
99
+ try {
100
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
101
+ var option = _step.value;
102
+ var _deep3 = traverse(option, pathToHere);
103
+ paths = [].concat(_toConsumableArray(paths), _toConsumableArray(_deep3));
104
+ }
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
109
+ }
110
+ } else if (schema instanceof z.ZodType) {
111
+ paths.push(pathToHere.join(Separator));
112
+ }
113
+ return Array.from(new Set(paths));
114
+ }
115
+ return traverse(schema, []);
116
+ };
117
+
118
+ // avoid circular dependency with logger
119
+
120
+ var resolvePathOnDataSchema = function resolvePathOnDataSchema(_ref) {
121
+ var logger = _ref.logger,
122
+ dataSchema = _ref.dataSchema,
123
+ path = _ref.path;
124
+ if (path.startsWith("Web3Transaction/functionArgs/")) {
125
+ return Web3ArgsType;
126
+ }
127
+ function traverse(schema, path) {
128
+ if (path.length === 0) {
129
+ return schema;
130
+ }
131
+ var _path = _toArray(path),
132
+ part = _path[0],
133
+ rest = _path.slice(1);
134
+ if (!part) {
135
+ return null; // unreachable due to previous check
136
+ }
137
+ if (schema.shape) {
138
+ if (!(part in schema.shape)) {
139
+ logger.error({
140
+ msg: "part not found in schema.shape",
141
+ data: {
142
+ path: path,
143
+ dataSchema: dataSchema
144
+ }
145
+ });
146
+ return null;
147
+ }
148
+ return traverse(schema.shape[part], rest);
149
+ } else if (schema instanceof z.ZodOptional) {
150
+ return traverse(schema.unwrap(), path);
151
+ } else if (schema instanceof z.ZodArray) {
152
+ return traverse(schema.element, path);
153
+ } else if (schema instanceof z.ZodIntersection) {
154
+ // @ts-expect-error -- TODO: fix this
155
+ var right = schema._def.right;
156
+ if (!right) {
157
+ logger.error({
158
+ msg: "Intersection has no .right field",
159
+ data: {
160
+ path: path,
161
+ dataSchema: dataSchema
162
+ }
163
+ });
164
+ return null;
165
+ }
166
+ return traverse(right, path);
167
+ } else if (schema instanceof z.ZodUnion) {
168
+ var options = schema.options;
169
+ var _iterator2 = _createForOfIteratorHelper(options),
170
+ _step2;
171
+ try {
172
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
173
+ var option = _step2.value;
174
+ var _result = traverse(option, path);
175
+ if (_result) {
176
+ return _result;
177
+ }
178
+ }
179
+ } catch (err) {
180
+ _iterator2.e(err);
181
+ } finally {
182
+ _iterator2.f();
183
+ }
184
+ }
185
+ return null;
186
+ }
187
+ var parts = path.split(Separator);
188
+ var result = traverse(dataSchema, parts);
189
+ if (!result) {
190
+ logger.error({
191
+ msg: "path not found",
192
+ data: {
193
+ path: path,
194
+ dataSchema: dataSchema
195
+ }
196
+ });
197
+ return null;
198
+ }
199
+ return result;
200
+ };
201
+ var resolvePathOnMapSchema = function resolvePathOnMapSchema(_ref2) {
202
+ var logger = _ref2.logger,
203
+ mapSchema = _ref2.mapSchema,
204
+ path = _ref2.path;
205
+ var rest = path;
206
+ while (rest.length > 0) {
207
+ if (rest in mapSchema.shape) {
208
+ return mapSchema.shape[rest];
209
+ }
210
+ rest = rest.slice(0, rest.lastIndexOf(Separator));
211
+ }
212
+ logger.error({
213
+ msg: "path not found",
214
+ data: {
215
+ path: path
216
+ }
217
+ });
218
+ return null;
219
+ };
220
+
221
+ var computeVaultKey = function computeVaultKey(props) {
222
+ var _props$name, _props$birthYear, _props$address;
223
+ var vaultKeyHash = createHash("sha256");
224
+ vaultKeyHash.update((_props$name = props.name) !== null && _props$name !== void 0 ? _props$name : "");
225
+ vaultKeyHash.update("".concat((_props$birthYear = props.birthYear) !== null && _props$birthYear !== void 0 ? _props$birthYear : 0));
226
+ vaultKeyHash.update((_props$address = props.address) !== null && _props$address !== void 0 ? _props$address : "");
227
+ return vaultKeyHash.digest("hex");
228
+ };
229
+
230
+ export { Separator, computeVaultKey, generateZodObjectPaths, resolvePathOnDataSchema, resolvePathOnMapSchema };
@@ -2,12 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vault_schema = require('../../dist/vault.schema-38073e10.cjs.dev.cjs');
6
- var identityApi_schema = require('../../dist/identity-api.schema-a2d30e14.cjs.dev.cjs');
7
- var tfheUtilities = require('../../dist/tfhe-utilities-7cca17c7.cjs.dev.cjs');
5
+ var vault_schema = require('../../dist/vault.schema-5366ec31.cjs.dev.cjs');
6
+ var identityApi_schema = require('../../dist/identity-api.schema-421a6fa7.cjs.dev.cjs');
7
+ var tfheUtilities = require('../../dist/tfhe-utilities-3f255174.cjs.dev.cjs');
8
8
  require('zod');
9
9
  require('nanoid');
10
10
  require('decimal.js');
11
+ require('crypto');
11
12
 
12
13
 
13
14
 
@@ -2,12 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vault_schema = require('../../dist/vault.schema-58c0147e.cjs.prod.cjs');
6
- var identityApi_schema = require('../../dist/identity-api.schema-cdb5ba64.cjs.prod.cjs');
7
- var tfheUtilities = require('../../dist/tfhe-utilities-9756bc15.cjs.prod.cjs');
5
+ var vault_schema = require('../../dist/vault.schema-a8f5d8d1.cjs.prod.cjs');
6
+ var identityApi_schema = require('../../dist/identity-api.schema-990a1a31.cjs.prod.cjs');
7
+ var tfheUtilities = require('../../dist/tfhe-utilities-3d73d81a.cjs.prod.cjs');
8
8
  require('zod');
9
9
  require('nanoid');
10
10
  require('decimal.js');
11
+ require('crypto');
11
12
 
12
13
 
13
14
 
@@ -1,6 +1,7 @@
1
- export { b4 as Alpha2Country, e1 as GenericVerifiableCredentialSchema, e7 as ID3CredentialSchema, dP as ID3CredentialSubjectSchema, e4 as IDImageCredentialSchema, d_ as IDImageCredentialSubjectSchema, e3 as IDInformationCredentialSchema, dZ as IDInformationCredentialSubjectSchema, e2 as IDInformationTfheCredentialSchema, dY as IDInformationTfheCredentialSubjectSchema, e8 as IDScanCredentialSchema, dQ as IDScanCredentialSubjectSchema, e9 as IDScanPassportCredentialSchema, dR as IDScanPassportCredentialSubjectSchema, ea as IDScanSelfieCredentialSchema, dS as IDScanSelfieCredentialSubjectSchema, b2 as ISO3CountryCode, ef as OLD_AMLScreeningsResultsCredentialSchema, dX as OLD_AMLScreeningsResultsCredentialSubjectSchema, eb as OLD_IDImageCredentialSchema, dT as OLD_IDImageCredentialSubjectSchema, ec as OLD_IDInformationCredentialSchema, dU as OLD_IDInformationCredentialSubjectSchema, ed as OLD_ProofOfResidenceCredentialSchema, dV as OLD_ProofOfResidenceCredentialSubjectSchema, ee as OLD_SelfieImageCredentialSchema, dW as OLD_SelfieImageCredentialSubjectSchema, e6 as ProofOfResidenceCredentialSchema, e0 as ProofOfResidenceCredentialSubjectSchema, e5 as SelfieImageCredentialSchema, d$ as SelfieImageCredentialSubjectSchema, b5 as countryISO3toISO2Mapping, b8 as isoCountriesNameFromISO2 } from '../../dist/vault.schema-1ee28657.esm.mjs';
2
- export { c8 as CredentialMediaType, c3 as CredentialNames, c2 as CredentialSchemas, c6 as CredentialType, C as CredentialTypes, c4 as NexeraCredentialType, c7 as VerifiableCredential, c5 as getCredentialName } from '../../dist/identity-api.schema-a325658d.esm.mjs';
3
- export { s as IDInformationTfheCredentialSubjectCONFIG, V as VC_JSON_SCHEMA_MAP, c as cleanObject, a as getAvailableFields, g as getCredentialSchemaLocation, b as getFieldConfig } from '../../dist/tfhe-utilities-21c44569.esm.mjs';
1
+ export { b4 as Alpha2Country, e1 as GenericVerifiableCredentialSchema, e7 as ID3CredentialSchema, dP as ID3CredentialSubjectSchema, e4 as IDImageCredentialSchema, d_ as IDImageCredentialSubjectSchema, e3 as IDInformationCredentialSchema, dZ as IDInformationCredentialSubjectSchema, e2 as IDInformationTfheCredentialSchema, dY as IDInformationTfheCredentialSubjectSchema, e8 as IDScanCredentialSchema, dQ as IDScanCredentialSubjectSchema, e9 as IDScanPassportCredentialSchema, dR as IDScanPassportCredentialSubjectSchema, ea as IDScanSelfieCredentialSchema, dS as IDScanSelfieCredentialSubjectSchema, b2 as ISO3CountryCode, ef as OLD_AMLScreeningsResultsCredentialSchema, dX as OLD_AMLScreeningsResultsCredentialSubjectSchema, eb as OLD_IDImageCredentialSchema, dT as OLD_IDImageCredentialSubjectSchema, ec as OLD_IDInformationCredentialSchema, dU as OLD_IDInformationCredentialSubjectSchema, ed as OLD_ProofOfResidenceCredentialSchema, dV as OLD_ProofOfResidenceCredentialSubjectSchema, ee as OLD_SelfieImageCredentialSchema, dW as OLD_SelfieImageCredentialSubjectSchema, e6 as ProofOfResidenceCredentialSchema, e0 as ProofOfResidenceCredentialSubjectSchema, e5 as SelfieImageCredentialSchema, d$ as SelfieImageCredentialSubjectSchema, b5 as countryISO3toISO2Mapping, b8 as isoCountriesNameFromISO2 } from '../../dist/vault.schema-cfa07d6b.esm.mjs';
2
+ export { c8 as CredentialMediaType, c3 as CredentialNames, c2 as CredentialSchemas, c6 as CredentialType, C as CredentialTypes, c4 as NexeraCredentialType, c7 as VerifiableCredential, c5 as getCredentialName } from '../../dist/identity-api.schema-f46dc9b2.esm.mjs';
3
+ export { s as IDInformationTfheCredentialSubjectCONFIG, V as VC_JSON_SCHEMA_MAP, c as cleanObject, a as getAvailableFields, g as getCredentialSchemaLocation, b as getFieldConfig } from '../../dist/tfhe-utilities-4fa4008a.esm.mjs';
4
4
  import 'zod';
5
5
  import 'nanoid';
6
6
  import 'decimal.js';
7
+ import 'crypto';
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var z = require('zod');
6
- var vault_schema = require('../../dist/vault.schema-38073e10.cjs.dev.cjs');
7
- var identityApi_schema = require('../../dist/identity-api.schema-a2d30e14.cjs.dev.cjs');
8
- var CoinMarketCap_schema = require('../../dist/CoinMarketCap.schema-1519ce71.cjs.dev.cjs');
9
- var toArray = require('../../dist/toArray-d9bb813a.cjs.dev.cjs');
6
+ var vault_schema = require('../../dist/vault.schema-5366ec31.cjs.dev.cjs');
7
+ var identityApi_schema = require('../../dist/identity-api.schema-421a6fa7.cjs.dev.cjs');
8
+ var CoinMarketCap_schema = require('../../dist/CoinMarketCap.schema-32fb1a43.cjs.dev.cjs');
9
+ var toArray = require('../../dist/toArray-e0d27eac.cjs.dev.cjs');
10
10
  var zodToJsonSchema = require('zod-to-json-schema');
11
11
  require('nanoid');
12
12
  require('decimal.js');
13
+ require('crypto');
13
14
 
14
15
  // Alert Statuses
15
16
  var AlertStatuses = ["Open", "Under Investigation", "Pending", "Closed", "Escalated"];
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var z = require('zod');
6
- var vault_schema = require('../../dist/vault.schema-58c0147e.cjs.prod.cjs');
7
- var identityApi_schema = require('../../dist/identity-api.schema-cdb5ba64.cjs.prod.cjs');
8
- var CoinMarketCap_schema = require('../../dist/CoinMarketCap.schema-f97e836f.cjs.prod.cjs');
9
- var toArray = require('../../dist/toArray-1650534c.cjs.prod.cjs');
6
+ var vault_schema = require('../../dist/vault.schema-a8f5d8d1.cjs.prod.cjs');
7
+ var identityApi_schema = require('../../dist/identity-api.schema-990a1a31.cjs.prod.cjs');
8
+ var CoinMarketCap_schema = require('../../dist/CoinMarketCap.schema-c97ce981.cjs.prod.cjs');
9
+ var toArray = require('../../dist/toArray-c2746f52.cjs.prod.cjs');
10
10
  var zodToJsonSchema = require('zod-to-json-schema');
11
11
  require('nanoid');
12
12
  require('decimal.js');
13
+ require('crypto');
13
14
 
14
15
  // Alert Statuses
15
16
  var AlertStatuses = ["Open", "Under Investigation", "Pending", "Closed", "Escalated"];
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
- import { aW as UuidString, dJ as ExternalCustomerId, dH as WorkflowId, be as RiskScoreType, bg as CustomerType, bm as CustomerOnboardingLevel, bo as CustomerStatus, b2 as ISO3CountryCode, at as BlockchainAddress, e1 as GenericVerifiableCredentialSchema, fK as WalletScreeningData, eq as TransactionTypes, ew as TransactionReviewStatuses, fU as _toConsumableArray, aV as EnvironmentSchema } from '../../dist/vault.schema-1ee28657.esm.mjs';
3
- import { Y as RuleResultStatus } from '../../dist/identity-api.schema-a325658d.esm.mjs';
4
- import { M as MergedProviders, I as IpQualityServiceAnalysisResponse, C as ComplyAdvantageSearchResponse, a as ComplyAdvantageSearchErrorResponse, b as ComplyAdvantageSearchSuccessResponse } from '../../dist/CoinMarketCap.schema-7cd41375.esm.mjs';
5
- import { _ as _toArray } from '../../dist/toArray-e2a36a42.esm.mjs';
2
+ import { aW as UuidString, dJ as ExternalCustomerId, dH as WorkflowId, be as RiskScoreType, bg as CustomerType, bm as CustomerOnboardingLevel, bo as CustomerStatus, b2 as ISO3CountryCode, at as BlockchainAddress, e1 as GenericVerifiableCredentialSchema, fK as WalletScreeningData, eq as TransactionTypes, ew as TransactionReviewStatuses, fU as _toConsumableArray, aV as EnvironmentSchema } from '../../dist/vault.schema-cfa07d6b.esm.mjs';
3
+ import { Y as RuleResultStatus } from '../../dist/identity-api.schema-f46dc9b2.esm.mjs';
4
+ import { M as MergedProviders, I as IpQualityServiceAnalysisResponse, C as ComplyAdvantageSearchResponse, a as ComplyAdvantageSearchErrorResponse, b as ComplyAdvantageSearchSuccessResponse } from '../../dist/CoinMarketCap.schema-4a237bed.esm.mjs';
5
+ import { _ as _toArray } from '../../dist/toArray-6dea95cf.esm.mjs';
6
6
  import { zodToJsonSchema } from 'zod-to-json-schema';
7
7
  import 'nanoid';
8
8
  import 'decimal.js';
9
+ import 'crypto';
9
10
 
10
11
  // Alert Statuses
11
12
  var AlertStatuses = ["Open", "Under Investigation", "Pending", "Closed", "Escalated"];
@@ -1,217 +0,0 @@
1
- import { _ as _toArray } from './toArray-e2a36a42.esm.mjs';
2
- import { fV as _unsupportedIterableToArray, fO as Web3ArgsType, fW as _slicedToArray, fU as _toConsumableArray } from './vault.schema-1ee28657.esm.mjs';
3
- import { z } from 'zod';
4
-
5
- // tools to work with object paths in TypeScript
6
-
7
- var Separator = "/";
8
-
9
- // recursively get the type of a nested object property
10
- // TODO: support unions: {a: {b: string } | {c: number}} + "a/b" -> string | undefined
11
-
12
- function _createForOfIteratorHelper(r, e) {
13
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
14
- if (!t) {
15
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
16
- t && (r = t);
17
- var n = 0,
18
- F = function () {};
19
- return {
20
- s: F,
21
- n: function () {
22
- return n >= r.length ? {
23
- done: !0
24
- } : {
25
- done: !1,
26
- value: r[n++]
27
- };
28
- },
29
- e: function (r) {
30
- throw r;
31
- },
32
- f: F
33
- };
34
- }
35
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
36
- }
37
- var o,
38
- a = !0,
39
- u = !1;
40
- return {
41
- s: function () {
42
- t = t.call(r);
43
- },
44
- n: function () {
45
- var r = t.next();
46
- return a = r.done, r;
47
- },
48
- e: function (r) {
49
- u = !0, o = r;
50
- },
51
- f: function () {
52
- try {
53
- a || null == t.return || t.return();
54
- } finally {
55
- if (u) throw o;
56
- }
57
- }
58
- };
59
- }
60
-
61
- // this lib is too generic to follow the linting rules, a lot of types end up resolved to any
62
- /* eslint-disable @typescript-eslint/no-explicit-any */
63
- /* eslint-disable @typescript-eslint/no-unsafe-return */
64
- /* eslint-disable @typescript-eslint/no-unsafe-argument */
65
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
66
-
67
- var generateZodObjectPaths = function generateZodObjectPaths(schema) {
68
- function traverse(schema, pathToHere) {
69
- var paths = [];
70
- if (schema.shape) {
71
- for (var _i = 0, _Object$entries = Object.entries(schema.shape); _i < _Object$entries.length; _i++) {
72
- var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
73
- key = _Object$entries$_i[0],
74
- value = _Object$entries$_i[1];
75
- var newPath = [].concat(_toConsumableArray(pathToHere), [key]);
76
- var deep = traverse(value, newPath);
77
- paths = [].concat(_toConsumableArray(paths), [newPath.join(Separator)], _toConsumableArray(deep));
78
- }
79
- } else if (schema instanceof z.ZodOptional) {
80
- var _deep = traverse(schema.unwrap(), pathToHere);
81
- paths = [].concat(_toConsumableArray(paths), _toConsumableArray(_deep));
82
- } else if (schema instanceof z.ZodArray) {
83
- var _deep2 = traverse(schema.element, pathToHere);
84
- paths = [].concat(_toConsumableArray(paths), _toConsumableArray(_deep2));
85
- } else if (schema instanceof z.ZodIntersection) {
86
- // @ts-expect-error -- TODO: fix this
87
- var deepLeft = traverse(schema._def.left, pathToHere);
88
- paths = [].concat(_toConsumableArray(paths), _toConsumableArray(deepLeft));
89
- // @ts-expect-error -- TODO: fix this
90
- var deepRight = traverse(schema._def.right, pathToHere);
91
- paths = [].concat(_toConsumableArray(paths), _toConsumableArray(deepRight));
92
- } else if (schema instanceof z.ZodUnion) {
93
- var _iterator = _createForOfIteratorHelper(schema.options),
94
- _step;
95
- try {
96
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
97
- var option = _step.value;
98
- var _deep3 = traverse(option, pathToHere);
99
- paths = [].concat(_toConsumableArray(paths), _toConsumableArray(_deep3));
100
- }
101
- } catch (err) {
102
- _iterator.e(err);
103
- } finally {
104
- _iterator.f();
105
- }
106
- } else if (schema instanceof z.ZodType) {
107
- paths.push(pathToHere.join(Separator));
108
- }
109
- return Array.from(new Set(paths));
110
- }
111
- return traverse(schema, []);
112
- };
113
-
114
- // avoid circular dependency with logger
115
-
116
- var resolvePathOnDataSchema = function resolvePathOnDataSchema(_ref) {
117
- var logger = _ref.logger,
118
- dataSchema = _ref.dataSchema,
119
- path = _ref.path;
120
- if (path.startsWith("Web3Transaction/functionArgs/")) {
121
- return Web3ArgsType;
122
- }
123
- function traverse(schema, path) {
124
- if (path.length === 0) {
125
- return schema;
126
- }
127
- var _path = _toArray(path),
128
- part = _path[0],
129
- rest = _path.slice(1);
130
- if (!part) {
131
- return null; // unreachable due to previous check
132
- }
133
- if (schema.shape) {
134
- if (!(part in schema.shape)) {
135
- logger.error({
136
- msg: "part not found in schema.shape",
137
- data: {
138
- path: path,
139
- dataSchema: dataSchema
140
- }
141
- });
142
- return null;
143
- }
144
- return traverse(schema.shape[part], rest);
145
- } else if (schema instanceof z.ZodOptional) {
146
- return traverse(schema.unwrap(), path);
147
- } else if (schema instanceof z.ZodArray) {
148
- return traverse(schema.element, path);
149
- } else if (schema instanceof z.ZodIntersection) {
150
- // @ts-expect-error -- TODO: fix this
151
- var right = schema._def.right;
152
- if (!right) {
153
- logger.error({
154
- msg: "Intersection has no .right field",
155
- data: {
156
- path: path,
157
- dataSchema: dataSchema
158
- }
159
- });
160
- return null;
161
- }
162
- return traverse(right, path);
163
- } else if (schema instanceof z.ZodUnion) {
164
- var options = schema.options;
165
- var _iterator2 = _createForOfIteratorHelper(options),
166
- _step2;
167
- try {
168
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
169
- var option = _step2.value;
170
- var _result = traverse(option, path);
171
- if (_result) {
172
- return _result;
173
- }
174
- }
175
- } catch (err) {
176
- _iterator2.e(err);
177
- } finally {
178
- _iterator2.f();
179
- }
180
- }
181
- return null;
182
- }
183
- var parts = path.split(Separator);
184
- var result = traverse(dataSchema, parts);
185
- if (!result) {
186
- logger.error({
187
- msg: "path not found",
188
- data: {
189
- path: path,
190
- dataSchema: dataSchema
191
- }
192
- });
193
- return null;
194
- }
195
- return result;
196
- };
197
- var resolvePathOnMapSchema = function resolvePathOnMapSchema(_ref2) {
198
- var logger = _ref2.logger,
199
- mapSchema = _ref2.mapSchema,
200
- path = _ref2.path;
201
- var rest = path;
202
- while (rest.length > 0) {
203
- if (rest in mapSchema.shape) {
204
- return mapSchema.shape[rest];
205
- }
206
- rest = rest.slice(0, rest.lastIndexOf(Separator));
207
- }
208
- logger.error({
209
- msg: "path not found",
210
- data: {
211
- path: path
212
- }
213
- });
214
- return null;
215
- };
216
-
217
- export { Separator as S, resolvePathOnMapSchema as a, generateZodObjectPaths as g, resolvePathOnDataSchema as r };