@nexeraid/identity-schemas 1.12.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 (97) hide show
  1. package/README.md +26 -0
  2. package/dist/declarations/src/blockchain.schema.d.ts +93 -0
  3. package/dist/declarations/src/blockchain.schema.d.ts.map +1 -0
  4. package/dist/declarations/src/config.schema.d.ts +128 -0
  5. package/dist/declarations/src/config.schema.d.ts.map +1 -0
  6. package/dist/declarations/src/countries.schema.d.ts +11 -0
  7. package/dist/declarations/src/countries.schema.d.ts.map +1 -0
  8. package/dist/declarations/src/credential-storage.schema.d.ts +138 -0
  9. package/dist/declarations/src/credential-storage.schema.d.ts.map +1 -0
  10. package/dist/declarations/src/identity/app-requests.schema.d.ts +4092 -0
  11. package/dist/declarations/src/identity/app-requests.schema.d.ts.map +1 -0
  12. package/dist/declarations/src/identity/challenge-query.schema.d.ts +1109 -0
  13. package/dist/declarations/src/identity/challenge-query.schema.d.ts.map +1 -0
  14. package/dist/declarations/src/identity/execute-scenario.schema.d.ts +135 -0
  15. package/dist/declarations/src/identity/execute-scenario.schema.d.ts.map +1 -0
  16. package/dist/declarations/src/identity/get-started.schema.d.ts +19 -0
  17. package/dist/declarations/src/identity/get-started.schema.d.ts.map +1 -0
  18. package/dist/declarations/src/identity/host-requests.schema.d.ts +2721 -0
  19. package/dist/declarations/src/identity/host-requests.schema.d.ts.map +1 -0
  20. package/dist/declarations/src/identity/index.d.ts +12 -0
  21. package/dist/declarations/src/identity/index.d.ts.map +1 -0
  22. package/dist/declarations/src/identity/kyc.schema.d.ts +2593 -0
  23. package/dist/declarations/src/identity/kyc.schema.d.ts.map +1 -0
  24. package/dist/declarations/src/identity/polygon-id.schema.d.ts +425 -0
  25. package/dist/declarations/src/identity/polygon-id.schema.d.ts.map +1 -0
  26. package/dist/declarations/src/identity/query.schema.d.ts +526 -0
  27. package/dist/declarations/src/identity/query.schema.d.ts.map +1 -0
  28. package/dist/declarations/src/identity/txAuthData.schema.d.ts +62 -0
  29. package/dist/declarations/src/identity/txAuthData.schema.d.ts.map +1 -0
  30. package/dist/declarations/src/identity/txAuthDataTezos.schema.d.ts +56 -0
  31. package/dist/declarations/src/identity/txAuthDataTezos.schema.d.ts.map +1 -0
  32. package/dist/declarations/src/identity/zkps.schema.d.ts +962 -0
  33. package/dist/declarations/src/identity/zkps.schema.d.ts.map +1 -0
  34. package/dist/declarations/src/index.d.ts +5 -0
  35. package/dist/declarations/src/index.d.ts.map +1 -0
  36. package/dist/declarations/src/verifiable-credentials/GenericVerifiableCredentialSchema.d.ts +95 -0
  37. package/dist/declarations/src/verifiable-credentials/GenericVerifiableCredentialSchema.d.ts.map +1 -0
  38. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/ID3CredentialSubjectSchema.d.ts +2839 -0
  39. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/ID3CredentialSubjectSchema.d.ts.map +1 -0
  40. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanCredentialSubjectSchema.d.ts +163 -0
  41. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanCredentialSubjectSchema.d.ts.map +1 -0
  42. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanPassportCredentialSubjectSchema.d.ts +21 -0
  43. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanPassportCredentialSubjectSchema.d.ts.map +1 -0
  44. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanSelfieCredentialSubjectSchema.d.ts +21 -0
  45. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/IDScanSelfieCredentialSubjectSchema.d.ts.map +1 -0
  46. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_AMLScreeningsResultsCredentialSubjectSchema.d.ts +2692 -0
  47. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_AMLScreeningsResultsCredentialSubjectSchema.d.ts.map +1 -0
  48. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_IDImageCredentialSubjectSchema.d.ts +24 -0
  49. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_IDImageCredentialSubjectSchema.d.ts.map +1 -0
  50. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_IDInformationCredentialSubjectSchema.d.ts +258 -0
  51. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_IDInformationCredentialSubjectSchema.d.ts.map +1 -0
  52. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_ProofOfResidenceCredentialSubjectSchema.d.ts +39 -0
  53. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_ProofOfResidenceCredentialSubjectSchema.d.ts.map +1 -0
  54. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_SelfieImageCredentialSubjectSchema.d.ts +21 -0
  55. package/dist/declarations/src/verifiable-credentials/OLD_generated/generated/OLD_SelfieImageCredentialSubjectSchema.d.ts.map +1 -0
  56. package/dist/declarations/src/verifiable-credentials/cleanObject.d.ts +12 -0
  57. package/dist/declarations/src/verifiable-credentials/cleanObject.d.ts.map +1 -0
  58. package/dist/declarations/src/verifiable-credentials/frontend-utilities.schema.d.ts +16 -0
  59. package/dist/declarations/src/verifiable-credentials/frontend-utilities.schema.d.ts.map +1 -0
  60. package/dist/declarations/src/verifiable-credentials/general-vc-typing.schema.d.ts +5978 -0
  61. package/dist/declarations/src/verifiable-credentials/general-vc-typing.schema.d.ts.map +1 -0
  62. package/dist/declarations/src/verifiable-credentials/generated/IDImageCredentialSubjectSchema.d.ts +48 -0
  63. package/dist/declarations/src/verifiable-credentials/generated/IDImageCredentialSubjectSchema.d.ts.map +1 -0
  64. package/dist/declarations/src/verifiable-credentials/generated/IDInformationCredentialSubjectSchema.d.ts +96 -0
  65. package/dist/declarations/src/verifiable-credentials/generated/IDInformationCredentialSubjectSchema.d.ts.map +1 -0
  66. package/dist/declarations/src/verifiable-credentials/generated/ProofOfResidenceCredentialSubjectSchema.d.ts +48 -0
  67. package/dist/declarations/src/verifiable-credentials/generated/ProofOfResidenceCredentialSubjectSchema.d.ts.map +1 -0
  68. package/dist/declarations/src/verifiable-credentials/generated/SelfieImageCredentialSubjectSchema.d.ts +39 -0
  69. package/dist/declarations/src/verifiable-credentials/generated/SelfieImageCredentialSubjectSchema.d.ts.map +1 -0
  70. package/dist/declarations/src/verifiable-credentials/index.d.ts +56 -0
  71. package/dist/declarations/src/verifiable-credentials/index.d.ts.map +1 -0
  72. package/dist/declarations/src/verifiable-credentials/vc-utils.schema.d.ts +8 -0
  73. package/dist/declarations/src/verifiable-credentials/vc-utils.schema.d.ts.map +1 -0
  74. package/dist/declarations/src/verifiable-credentials/vc_json_schema_map.d.ts +127 -0
  75. package/dist/declarations/src/verifiable-credentials/vc_json_schema_map.d.ts.map +1 -0
  76. package/dist/nexeraid-identity-schemas.cjs.d.ts +2 -0
  77. package/dist/nexeraid-identity-schemas.cjs.dev.js +110 -0
  78. package/dist/nexeraid-identity-schemas.cjs.js +7 -0
  79. package/dist/nexeraid-identity-schemas.cjs.prod.js +110 -0
  80. package/dist/nexeraid-identity-schemas.esm.js +40 -0
  81. package/dist/package.json +72 -0
  82. package/dist/txAuthDataTezos.schema-92a60696.cjs.prod.js +2995 -0
  83. package/dist/txAuthDataTezos.schema-a6ddf460.esm.js +2775 -0
  84. package/dist/txAuthDataTezos.schema-ad3b7592.cjs.dev.js +2995 -0
  85. package/identity/dist/nexeraid-identity-schemas-identity.cjs.d.ts +2 -0
  86. package/identity/dist/nexeraid-identity-schemas-identity.cjs.dev.js +141 -0
  87. package/identity/dist/nexeraid-identity-schemas-identity.cjs.js +7 -0
  88. package/identity/dist/nexeraid-identity-schemas-identity.cjs.prod.js +141 -0
  89. package/identity/dist/nexeraid-identity-schemas-identity.esm.js +2 -0
  90. package/identity/package.json +4 -0
  91. package/package.json +71 -0
  92. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.d.ts +2 -0
  93. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.dev.js +2158 -0
  94. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.js +7 -0
  95. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.cjs.prod.js +2158 -0
  96. package/verifiable-credentials/dist/nexeraid-identity-schemas-verifiable-credentials.esm.js +2126 -0
  97. package/verifiable-credentials/package.json +4 -0
@@ -0,0 +1,2775 @@
1
+ import { z, ZodOptional, ZodNumber } from 'zod';
2
+
3
+ var ID3CredentialSubjectSchema = z.object({
4
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
5
+ journeyId: z.string().uuid().describe("Journey ID of when credential was generated"),
6
+ amendmentsData: z.object({
7
+ data: z.object({
8
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("The country of citizenship of the credential subject ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
9
+ documentType: z["enum"](["Agents License", "Driving License", "Electoral Card", "Foreigner Identification Card", "Health Card", "Job License", "Membership Identification Card", "Military Identification Card", "National Identification Card", "Passport", "Proof of Age Card", "Travel Permit", "Visa", "Weapons Licence"]).describe("The type of document used to verify the credential subject").optional(),
10
+ firstName: z.string().describe("The first name of the credential subject").optional(),
11
+ lastName: z.string().describe("The last name of the credential subject").optional(),
12
+ gender: z.string().describe("Gender of the credential subject").optional(),
13
+ addressLine1: z.string().describe("Address line 1 of the credential subject").optional(),
14
+ addressLine2: z.string().describe("Address line 2 of the credential subject").optional(),
15
+ birthday: z.string().describe("Birthday of the credential subject").optional(),
16
+ placeOfBirth: z.string().describe("Place of birth of the credential subject").optional(),
17
+ countryOfResidence: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of residence of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
18
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
19
+ city: z.string().describe("City of the credential subject").optional(),
20
+ province: z.string().describe("Province of the credential subject").optional(),
21
+ postalCode: z.string().describe("Postal code of the credential subject").optional(),
22
+ emailAddress: z.string().describe("Email address of the credential subject").optional(),
23
+ phoneNumber: z.string().describe("Phone number of the credential subject").optional(),
24
+ countryOfBirth: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of birth of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
25
+ middleName: z.string().describe("Middle name of the credential subject").optional()
26
+ }).describe("Personal details manually amended by the holder/user during authentication process.").optional(),
27
+ authenticateSPResult: z.object({
28
+ AuthenticationID: z.string().describe("The ID of the authentication request").optional(),
29
+ Timestamp: z.string().datetime().describe("The timestamp of the authentication request").optional(),
30
+ CustomerRef: z.string().describe("The customer reference of the authentication request").optional(),
31
+ ProfileID: z.string().describe("The ID of the profile used for the authentication request").optional(),
32
+ ProfileName: z.string().describe("The name of the profile used for the authentication request").optional(),
33
+ ProfileVersion: z.number()["int"]().describe("The version of the profile used for the authentication request").optional(),
34
+ ProfileRevision: z.number()["int"]().describe("The revision of the profile used for the authentication request").optional(),
35
+ ProfileState: z.string().describe("The state of the profile used for the authentication request").optional(),
36
+ ResultCodes: z.object({
37
+ GlobalItemCheckResultCodes: z.array(z.object({
38
+ Name: z.string().optional(),
39
+ Description: z.string().optional(),
40
+ Comment: z.object({
41
+ GlobalItemCheckResultCode: z.array(z.object({
42
+ Description: z.string().optional(),
43
+ Code: z.number()["int"]().optional()
44
+ })).optional()
45
+ }).optional(),
46
+ Match: z.object({
47
+ GlobalItemCheckResultCode: z.array(z.object({
48
+ Description: z.string().optional(),
49
+ Code: z.number()["int"]().optional()
50
+ })).optional()
51
+ }).optional(),
52
+ Warning: z.object({
53
+ GlobalItemCheckResultCode: z.array(z.object({
54
+ Description: z.string().optional(),
55
+ Code: z.number()["int"]().optional()
56
+ })).optional()
57
+ }).optional(),
58
+ Mismatch: z.object({
59
+ GlobalItemCheckResultCode: z.array(z.object({
60
+ Description: z.string().optional(),
61
+ Code: z.number()["int"]().optional()
62
+ })).optional()
63
+ }).optional(),
64
+ ID: z.number()["int"]().optional(),
65
+ Pass: z.string().optional(),
66
+ Address: z.string().optional(),
67
+ Forename: z.string().optional(),
68
+ Surname: z.string().optional(),
69
+ DOB: z.string().optional(),
70
+ Alert: z.string().optional(),
71
+ SanctionsMatches: z.object({
72
+ GlobalSanctionsMatch: z.array(z.object({
73
+ SanctionID: z.string().optional(),
74
+ Url: z.string().optional(),
75
+ Rank: z.number()["int"]().optional(),
76
+ CaseID: z.string().optional(),
77
+ SearchID: z.string().optional()
78
+ })).optional()
79
+ }).optional()
80
+ })).optional()
81
+ }).describe("The result codes of the authentication request").optional(),
82
+ Score: z.number()["int"]().describe("The score of the authentication request").optional(),
83
+ BandText: z.string().describe("The band text of the authentication request").optional(),
84
+ Country: z.string().describe("Country type of the authentication request").optional(),
85
+ ItemCheckDecisionBands: z.object({
86
+ GlobalItemCheckDecisionBands: z.array(z.object({
87
+ ID: z.number()["int"]().optional(),
88
+ BandScore: z.number()["int"]().optional(),
89
+ BandText: z.string().optional()
90
+ })).optional()
91
+ }).describe("The item check decision bands of the authentication request").optional()
92
+ }).describe("Result of the authentication request").optional(),
93
+ pepIntelligenceResult: z.array(z.object({
94
+ Fullname: z.string().optional(),
95
+ Aliases: z.object({
96
+ elements: z.array(z.string()).optional()
97
+ }).optional(),
98
+ SanctionsAddresses: z.object({
99
+ GlobalSanctionsAddress: z.array(z.object({
100
+ AddressLine: z.string().optional(),
101
+ City: z.string().optional(),
102
+ Country: z.string().describe("Full name of country").optional(),
103
+ Region: z.string().optional()
104
+ })).optional()
105
+ }).optional(),
106
+ SanctionsDates: z.object({
107
+ GlobalSanctionsDate: z.object({
108
+ DateType: z.string().optional(),
109
+ Day: z.number()["int"]().optional(),
110
+ Month: z.number()["int"]().optional(),
111
+ Year: z.number()["int"]().optional()
112
+ }).optional()
113
+ }).optional(),
114
+ IdentityInformation: z.string().optional(),
115
+ SanctionsPositions: z.object({
116
+ GlobalSanctionsPosition: z.array(z.object({
117
+ Position: z.string().optional(),
118
+ Country: z.string().optional()
119
+ })).optional()
120
+ }).optional()
121
+ })).optional(),
122
+ sanctionsEnforcementsResult: z.array(z.object({
123
+ Fullname: z.string().optional(),
124
+ SanctionsBodies: z.object({
125
+ elements: z.array(z.number()["int"]()).optional()
126
+ }).optional(),
127
+ Aliases: z.object({
128
+ elements: z.array(z.string()).optional()
129
+ }).optional(),
130
+ SanctionsAddresses: z.object({
131
+ GlobalSanctionsAddress: z.array(z.object({
132
+ AddressLine: z.string().optional(),
133
+ City: z.string().optional(),
134
+ Country: z.string().describe("Full name of country").optional(),
135
+ Region: z.string().optional()
136
+ })).optional()
137
+ }).optional(),
138
+ SanctionsDates: z.object({
139
+ GlobalSanctionsDate: z.object({
140
+ DateType: z.string().optional(),
141
+ Day: z.number()["int"]().optional(),
142
+ Month: z.number()["int"]().optional(),
143
+ Year: z.number()["int"]().optional()
144
+ }).optional()
145
+ }).optional(),
146
+ IdentityInformation: z.string().optional()
147
+ })).optional()
148
+ }).describe("Details related to the amendments made to the original data."),
149
+ originalData: z.object({
150
+ data: z.object({
151
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("The country of citizenship of the credential subject ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
152
+ documentType: z["enum"](["Agents License", "Driving License", "Electoral Card", "Foreigner Identification Card", "Health Card", "Job License", "Membership Identification Card", "Military Identification Card", "National Identification Card", "Passport", "Proof of Age Card", "Travel Permit", "Visa", "Weapons Licence"]).describe("The type of document used to verify the credential subject").optional(),
153
+ firstName: z.string().describe("The first name of the credential subject").optional(),
154
+ lastName: z.string().describe("The last name of the credential subject").optional(),
155
+ gender: z.string().describe("Gender of the credential subject").optional(),
156
+ addressLine1: z.string().describe("Address line 1 of the credential subject").optional(),
157
+ addressLine2: z.string().describe("Address line 2 of the credential subject").optional(),
158
+ birthday: z.string().describe("Birthday of the credential subject").optional(),
159
+ placeOfBirth: z.string().describe("Place of birth of the credential subject").optional(),
160
+ countryOfResidence: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of residence of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
161
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
162
+ city: z.string().describe("City of the credential subject").optional(),
163
+ province: z.string().describe("Province of the credential subject").optional(),
164
+ postalCode: z.string().describe("Postal code of the credential subject").optional(),
165
+ emailAddress: z.string().describe("Email address of the credential subject").optional(),
166
+ phoneNumber: z.string().describe("Phone number of the credential subject").optional(),
167
+ countryOfBirth: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of birth of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
168
+ middleName: z.string().describe("Middle name of the credential subject").optional()
169
+ }).describe("Unmodified personal details imported directly from document during authentication process.").optional(),
170
+ authenticateSPResult: z.object({
171
+ AuthenticationID: z.string().describe("The ID of the authentication request").optional(),
172
+ Timestamp: z.string().datetime().describe("The date and time of the authentication request").optional(),
173
+ CustomerRef: z.string().describe("The customer reference of the authentication request").optional(),
174
+ ProfileID: z.string().describe("The ID of the profile used for the authentication request").optional(),
175
+ ProfileName: z.string().describe("The name of the profile used for the authentication request").optional(),
176
+ ProfileVersion: z.number()["int"]().describe("The version of the profile used for the authentication request").optional(),
177
+ ProfileRevision: z.number()["int"]().describe("The revision of the profile used for the authentication request").optional(),
178
+ ProfileState: z.string().describe("The state of the profile used for the authentication request").optional(),
179
+ ResultCodes: z.object({
180
+ GlobalItemCheckResultCodes: z.array(z.object({
181
+ Name: z.string().optional(),
182
+ Description: z.string().optional(),
183
+ Comment: z.object({
184
+ GlobalItemCheckResultCode: z.array(z.object({
185
+ Description: z.string().optional(),
186
+ Code: z.number()["int"]().optional()
187
+ })).optional()
188
+ }).optional(),
189
+ Match: z.object({
190
+ GlobalItemCheckResultCode: z.array(z.object({
191
+ Description: z.string().optional(),
192
+ Code: z.number()["int"]().optional()
193
+ })).optional()
194
+ }).optional(),
195
+ Warning: z.object({
196
+ GlobalItemCheckResultCode: z.array(z.object({
197
+ Description: z.string().optional(),
198
+ Code: z.number()["int"]().optional()
199
+ })).optional()
200
+ }).optional(),
201
+ Mismatch: z.object({
202
+ GlobalItemCheckResultCode: z.array(z.object({
203
+ Description: z.string().optional(),
204
+ Code: z.number()["int"]().optional()
205
+ })).optional()
206
+ }).optional(),
207
+ ID: z.number()["int"]().optional(),
208
+ Pass: z.string().optional(),
209
+ Address: z.string().optional(),
210
+ Forename: z.string().optional(),
211
+ Surname: z.string().optional(),
212
+ DOB: z.string().optional(),
213
+ Alert: z.string().optional(),
214
+ SanctionsMatches: z.object({
215
+ GlobalSanctionsMatch: z.array(z.object({
216
+ SanctionID: z.string().optional(),
217
+ Url: z.string().optional(),
218
+ Rank: z.number()["int"]().optional(),
219
+ CaseID: z.string().optional(),
220
+ SearchID: z.string().optional()
221
+ })).optional()
222
+ }).optional()
223
+ })).optional()
224
+ }).describe("The result codes of the authentication request").optional(),
225
+ Score: z.number()["int"]().describe("The score of the authentication request").optional(),
226
+ BandText: z.string().describe("The band text of the authentication request").optional(),
227
+ Country: z.string().describe("The country type of the authentication request").optional()
228
+ }).describe("The result of the Authenticate SP check").optional(),
229
+ pepIntelligenceResult: z.array(z.object({
230
+ Fullname: z.string().optional(),
231
+ Aliases: z.object({
232
+ elements: z.array(z.string()).optional()
233
+ }).optional(),
234
+ SanctionsAddresses: z.object({
235
+ GlobalSanctionsAddress: z.array(z.object({
236
+ AddressLine: z.string().optional(),
237
+ City: z.string().optional(),
238
+ Country: z.string().describe("Full name of country").optional(),
239
+ Region: z.string().optional()
240
+ })).optional()
241
+ }).optional(),
242
+ SanctionsDates: z.object({
243
+ GlobalSanctionsDate: z.object({
244
+ DateType: z.string().optional(),
245
+ Day: z.number()["int"]().optional(),
246
+ Month: z.number()["int"]().optional(),
247
+ Year: z.number()["int"]().optional()
248
+ }).optional()
249
+ }).optional(),
250
+ IdentityInformation: z.string().optional(),
251
+ SanctionsPositions: z.object({
252
+ GlobalSanctionsPosition: z.array(z.object({
253
+ Position: z.string().optional(),
254
+ Country: z.string().optional()
255
+ })).optional()
256
+ }).optional()
257
+ })).describe("The result of the PEP Intelligence check").optional(),
258
+ sanctionsEnforcementsResult: z.array(z.object({
259
+ Fullname: z.string().optional(),
260
+ SanctionsBodies: z.object({
261
+ elements: z.array(z.number()["int"]()).optional()
262
+ }).optional(),
263
+ Aliases: z.object({
264
+ elements: z.array(z.string()).optional()
265
+ }).optional(),
266
+ SanctionsAddresses: z.object({
267
+ GlobalSanctionsAddress: z.array(z.object({
268
+ AddressLine: z.string().optional(),
269
+ City: z.string().optional(),
270
+ Country: z.string().describe("Full name of country").optional(),
271
+ Region: z.string().optional()
272
+ })).optional()
273
+ }).optional(),
274
+ SanctionsDates: z.object({
275
+ GlobalSanctionsDate: z.object({
276
+ DateType: z.string().optional(),
277
+ Day: z.number()["int"]().optional(),
278
+ Month: z.number()["int"]().optional(),
279
+ Year: z.number()["int"]().optional()
280
+ }).optional()
281
+ }).optional(),
282
+ IdentityInformation: z.string().optional()
283
+ })).describe("The result of the Sanctions Enforcements check").optional()
284
+ }).describe("Details related to the original data before any amendments"),
285
+ personalDetails: z.object({
286
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("The country of citizenship of the credential subject ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
287
+ documentType: z["enum"](["Agents License", "Driving License", "Electoral Card", "Foreigner Identification Card", "Health Card", "Job License", "Membership Identification Card", "Military Identification Card", "National Identification Card", "Passport", "Proof of Age Card", "Travel Permit", "Visa", "Weapons Licence"]).describe("The type of document used to verify the credential subject").optional(),
288
+ firstName: z.string().describe("The first name of the credential subject").optional(),
289
+ lastName: z.string().describe("The last name of the credential subject").optional(),
290
+ gender: z.string().describe("Gender of the credential subject").optional(),
291
+ addressLine1: z.string().describe("Address line 1 of the credential subject").optional(),
292
+ addressLine2: z.string().describe("Address line 2 of the credential subject").optional(),
293
+ birthday: z.string().describe("Birthday of the credential subject").optional(),
294
+ placeOfBirth: z.string().describe("Place of birth of the credential subject").optional(),
295
+ countryOfResidence: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of residence of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
296
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
297
+ city: z.string().describe("City of the credential subject").optional(),
298
+ province: z.string().describe("Province of the credential subject").optional(),
299
+ postalCode: z.string().describe("Postal code of the credential subject").optional(),
300
+ emailAddress: z.string().describe("Email address of the credential subject").optional(),
301
+ phoneNumber: z.string().describe("Phone number of the credential subject").optional(),
302
+ countryOfBirth: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of birth of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
303
+ middleName: z.string().describe("Middle name of the credential subject").optional()
304
+ }).describe("Personal details of the credential subject")
305
+ }).describe("Stores the data of the credential");
306
+
307
+ var IDScanCredentialSubjectSchema = z.object({
308
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
309
+ journeyId: z.string().uuid().describe("Journey ID of when credential was generated"),
310
+ highLevelResult: z["enum"](["Refer", "NotAccepted", "Notsupported", "Passed", "Refer", "Undefined"]).describe("High level result of the kyc check").optional(),
311
+ firstName: z.string().describe("First name of the credential subject").optional(),
312
+ middleName: z.string().describe("Middle name of the credential subject").optional(),
313
+ lastName: z.string().describe("Last name of the credential subject").optional(),
314
+ gender: z.string().describe("Gender of the credential subject").optional(),
315
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
316
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Citizenship status of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
317
+ documentCategory: z.string().describe("Category of the document provided by the credential subject").optional(),
318
+ documentName: z.string().describe("Name of the document provided by the credential subject").optional(),
319
+ documentSide: z["enum"](["Front", "Back"]).describe("Side of the document provided by the credential subject").optional(),
320
+ documentType: z["enum"](["Agents License", "Driving License", "Electoral Card", "Foreigner Identification Card", "Health Card", "Job License", "Membership Identification Card", "Military Identification Card", "National Identification Card", "Passport", "Proof of Age Card", "Travel Permit", "Visa", "Weapons Licence"]).describe("Type of the document provided by the credential subject").optional(),
321
+ entryDate: z.string().describe("Entry date associated with the credential").optional(),
322
+ entryTime: z.string().describe("Entry time associated with the credential").optional(),
323
+ fullName: z.string().describe("Full name of the credential subject").optional(),
324
+ addressLine1: z.string().describe("First line of the address of the credential subject").optional(),
325
+ addressLine2: z.string().describe("Second line of the address of the credential subject").optional(),
326
+ birthDate: z.string().describe("Date of birth of the credential subject").optional(),
327
+ birthPlace: z.string().nullable().optional(),
328
+ highLevelResultDetails: z.object({
329
+ documentOverallValidation: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Overall validation status of the document").optional(),
330
+ documentBlockingPolicy: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Blocking policy of the document").optional(),
331
+ documentExpiry: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Expiry status of the document").optional(),
332
+ documentSupport: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Support status of the document").optional(),
333
+ documentValidation: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Validation status of the document").optional(),
334
+ faceMatchValidation: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Validation status of face match").optional(),
335
+ accumulativeLivenessResult: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Result of accumulative liveness check").optional()
336
+ }).describe("Detailed results of the high level KYC check").optional(),
337
+ faceMatchScore: z.string().describe("Score for the face match validation").optional(),
338
+ qualityCheckDetails: z.array(z.object({
339
+ id: z.string().describe("ID of the quality check item").optional(),
340
+ title: z.string().describe("Title of the quality check item").optional(),
341
+ description: z.string().describe("Description of the quality check item").optional(),
342
+ state: z.number()["int"]().describe("State of the quality check item").optional()
343
+ }).describe("Quality check item details")).describe("Details of quality checks performed").optional(),
344
+ validationDetails: z.array(z.object({
345
+ name: z.string().describe("Name of the validation item").optional(),
346
+ description: z.string().describe("Detailed description of the validation item").optional(),
347
+ result: z.number()["int"]().describe("Result code of the validation").optional()
348
+ }).describe("Details of a specific validation item")).describe("Details of the validation performed").optional()
349
+ }).describe("Stores the data of the credential");
350
+
351
+ var IDScanPassportCredentialSubjectSchema = z.object({
352
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
353
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
354
+ base64: z.string().describe("Base64 encoded image of the passport image"),
355
+ name: z.string().describe("Name of the docuemnt (e.g. passport.jpg)"),
356
+ documentType: z.string().describe("Type of the document (e.g. image/jpeg, image/png)")
357
+ }).describe("Stores the data of the credential");
358
+
359
+ var IDScanSelfieCredentialSubjectSchema = z.object({
360
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
361
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
362
+ base64: z.string().describe("Base64 encoded image of the selfie image"),
363
+ name: z.string().describe("Name of the docuemnt (e.g. selfie.jpg)"),
364
+ documentType: z.string().describe("Type of the document (e.g. image/jpeg, image/png)")
365
+ }).describe("Stores the data of the credential");
366
+
367
+ var OLD_IDImageCredentialSubjectSchema = z.object({
368
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
369
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
370
+ base64: z.string().describe("Base64 encoded image of the passport image"),
371
+ name: z.string().describe("Name of the document (e.g. passport.jpg)"),
372
+ documentType: z["enum"](["Agents_License", "Driving_License", "Electoral_Card", "Foreigner_Identification_Card", "Health_Card", "Job_License", "Membership_Identification_Card", "Military_Identification_Card", "National_Identification_Card", "Passport", "Proof_of_Age_Card", "Travel_Permit", "Visa", "Weapons_Licence"]).describe("Type of the document (e.g. passport)"),
373
+ mediaType: z["enum"](["image/jpeg", "image/jpg", "image/png"]).describe("Media type of the document (e.g. image/jpeg, image/png, application/pdf)")
374
+ }).describe("Stores the data of the credential");
375
+
376
+ var OLD_IDInformationCredentialSubjectSchema = z.object({
377
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
378
+ journeyId: z.string().uuid().describe("Journey ID of when credential was generated"),
379
+ highLevelResult: z["enum"](["Refer", "NotAccepted", "Notsupported", "Passed", "Refer", "Undefined"]).describe("High level result of the kyc check").optional(),
380
+ highLevelResultDetails: z.object({
381
+ documentOverallValidation: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Overall validation status of the document").optional(),
382
+ documentBlockingPolicy: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Blocking policy of the document").optional(),
383
+ documentExpiry: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Expiry status of the document").optional(),
384
+ documentSupport: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Support status of the document").optional(),
385
+ documentValidation: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Validation status of the document").optional(),
386
+ faceMatchValidation: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Validation status of face match").optional(),
387
+ accumulativeLivenessResult: z["enum"](["FAILED", "NOTNEEDED", "PASSED", "SKIPPED", "NEEDED"]).describe("Result of accumulative liveness check").optional()
388
+ }).describe("Detailed results of the high level KYC check").optional(),
389
+ faceMatchScore: z.string().describe("Score for the face match validation").optional(),
390
+ qualityCheckDetails: z.array(z.object({
391
+ id: z.string().describe("ID of the quality check item").optional(),
392
+ title: z.string().describe("Title of the quality check item").optional(),
393
+ description: z.string().describe("Description of the quality check item").optional(),
394
+ state: z.number()["int"]().describe("State of the quality check item").optional()
395
+ }).describe("Quality check item details")).describe("Details of quality checks performed").optional(),
396
+ validationDetails: z.array(z.object({
397
+ name: z.string().describe("Name of the validation item").optional(),
398
+ description: z.string().describe("Detailed description of the validation item").optional(),
399
+ result: z.number()["int"]().describe("Result code of the validation").optional()
400
+ }).describe("Details of a specific validation item")).describe("Details of the validation performed").optional(),
401
+ documentCategory: z.string().describe("Category of the document provided by the credential subject").optional(),
402
+ documentName: z.string().describe("Name of the document provided by the credential subject"),
403
+ documentType: z["enum"](["Agents_License", "Driving_License", "Electoral_Card", "Foreigner_Identification_Card", "Health_Card", "Job_License", "Membership_Identification_Card", "Military_Identification_Card", "National_Identification_Card", "Passport", "Proof_of_Age_Card", "Travel_Permit", "Visa", "Weapons_Licence"]).describe("Type of the document provided by the credential subject"),
404
+ entryDate: z.number()["int"]().describe("Entry date associated with the credential"),
405
+ entryTime: z.string().describe("Entry time associated with the credential"),
406
+ originalData: z.object({
407
+ firstName: z.string().describe("First name of the credential subject").optional(),
408
+ middleName: z.string().describe("Middle name of the credential subject").optional(),
409
+ lastName: z.string().describe("Last name of the credential subject").optional(),
410
+ gender: z.string().describe("Gender of the credential subject").optional(),
411
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
412
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Citizenship status of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
413
+ fullName: z.string().describe("Full name of the credential subject").optional(),
414
+ addressLine1: z.string().describe("First line of the address of the credential subject").optional(),
415
+ addressLine2: z.string().describe("Second line of the address of the credential subject").optional(),
416
+ birthDate: z.number()["int"]().describe("Birth Date of the credential subject in integer format of yyyymmdd, example: 20231226 2023 year, 12-December, 26-day").optional(),
417
+ placeOfBirth: z.string().nullable().describe("Place of birth of the credential subject").optional()
418
+ }).describe("Original data extracted by the provider"),
419
+ amendmentsData: z.object({
420
+ firstName: z.string().describe("The first name of the credential subject").optional(),
421
+ middleName: z.string().describe("Middle name of the credential subject").optional(),
422
+ lastName: z.string().describe("The last name of the credential subject").optional(),
423
+ gender: z.string().describe("Gender of the credential subject").optional(),
424
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
425
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Citizenship status of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
426
+ fullName: z.string().describe("Full name of the credential subject").optional(),
427
+ addressLine1: z.string().describe("Address line 1 of the credential subject").optional(),
428
+ addressLine2: z.string().describe("Address line 2 of the credential subject").optional(),
429
+ birthDate: z.number()["int"]().describe("Birth Date of the credential subject in integer format of yyyymmdd, example: 20231226 2023 year, 12-December, 26-day").optional(),
430
+ placeOfBirth: z.string().describe("Place of birth of the credential subject").optional(),
431
+ countryOfBirth: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of birth of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional()
432
+ }).describe("Personal details manually amended by the holder/user during authentication process.")
433
+ }).describe("Stores the data of the credential");
434
+
435
+ var OLD_ProofOfResidenceCredentialSubjectSchema = z.object({
436
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
437
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with").optional(),
438
+ country: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("The country of residence - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
439
+ base64: z.string().describe("Base64 encoded image of the proof of residence").optional(),
440
+ name: z.string().describe("Name of the document (e.g. ProofOfResidence.jpg)").optional(),
441
+ documentType: z["enum"](["Gas_bill", "Internet_bill", "Electricity_bill", "Rent_agreement", "Bank_statement"]).describe("Type of the document (e.g. Gas bill, Internet bill, Electricity bill, Rent agreement, Bank statement)").optional(),
442
+ mediaType: z["enum"](["image/jpeg", "image/jpg", "image/png", "application/pdf"]).describe("Media type of the document (e.g. image/jpeg, image/png, application/pdf)").optional(),
443
+ county: z.string().describe("The county of residence").optional(),
444
+ city: z.string().describe("The city of residence").optional(),
445
+ streetName: z.string().describe("The street name of residence").optional(),
446
+ postalCode: z.string().describe("The postal code of residence").optional()
447
+ }).describe("Stores the data of the credential");
448
+
449
+ var OLD_SelfieImageCredentialSubjectSchema = z.object({
450
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
451
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
452
+ base64: z.string().describe("Base64 encoded image of the selfie image"),
453
+ name: z.string().describe("Name of the docuemnt (e.g. selfie.jpg)"),
454
+ mediaType: z["enum"](["image/jpeg", "image/jpg", "application/pdf", "image/png"]).describe("Media type of the document (e.g. image/jpeg, image/png)")
455
+ }).describe("Stores the data of the credential");
456
+
457
+ var OLD_AMLScreeningsResultsCredentialSubjectSchema = z.object({
458
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
459
+ journeyId: z.string().uuid().describe("Journey ID of when credential was generated"),
460
+ amendmentsData: z.object({
461
+ data: z.object({
462
+ firstName: z.string().describe("The first name of the credential subject").optional(),
463
+ middleName: z.string().describe("Middle name of the credential subject").optional(),
464
+ lastName: z.string().describe("The last name of the credential subject").optional(),
465
+ gender: z.string().describe("Gender of the credential subject").optional(),
466
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
467
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Citizenship status of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
468
+ fullName: z.string().describe("Full name of the credential subject").optional(),
469
+ addressLine1: z.string().describe("Address line 1 of the credential subject").optional(),
470
+ addressLine2: z.string().describe("Address line 2 of the credential subject").optional(),
471
+ birthDate: z.number()["int"]().describe("Birth Date of the credential subject in integer format of yyyymmdd, example: 20231226 2023 year, 12-December, 26-day").optional(),
472
+ placeOfBirth: z.string().describe("Place of birth of the credential subject").optional(),
473
+ countryOfResidence: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of residence of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
474
+ city: z.string().describe("City of the credential subject").optional(),
475
+ province: z.string().describe("Province of the credential subject").optional(),
476
+ postalCode: z.string().describe("Postal code of the credential subject").optional(),
477
+ emailAddress: z.string().email().describe("Email address of the credential subject").optional(),
478
+ phoneNumber: z.string().describe("Phone number of the credential subject").optional(),
479
+ countryOfBirth: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Country of birth of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional()
480
+ }).describe("Personal details manually amended by the holder/user during authentication process.").optional(),
481
+ authenticateSPResult: z.object({
482
+ AuthenticationID: z.string().describe("The ID of the authentication request").optional(),
483
+ Timestamp: z.string().datetime().describe("The timestamp of the authentication request").optional(),
484
+ CustomerRef: z.string().describe("The customer reference of the authentication request").optional(),
485
+ ProfileID: z.string().describe("The ID of the profile used for the authentication request").optional(),
486
+ ProfileName: z.string().describe("The name of the profile used for the authentication request").optional(),
487
+ ProfileVersion: z.number()["int"]().describe("The version of the profile used for the authentication request").optional(),
488
+ ProfileRevision: z.number()["int"]().describe("The revision of the profile used for the authentication request").optional(),
489
+ ProfileState: z.string().describe("The state of the profile used for the authentication request").optional(),
490
+ ResultCodes: z.object({
491
+ GlobalItemCheckResultCodes: z.array(z.object({
492
+ Name: z.string().optional(),
493
+ Description: z.string().optional(),
494
+ Comment: z.object({
495
+ GlobalItemCheckResultCode: z.array(z.object({
496
+ Description: z.string().optional(),
497
+ Code: z.number()["int"]().optional()
498
+ })).optional()
499
+ }).optional(),
500
+ Match: z.object({
501
+ GlobalItemCheckResultCode: z.array(z.object({
502
+ Description: z.string().optional(),
503
+ Code: z.number()["int"]().optional()
504
+ })).optional()
505
+ }).optional(),
506
+ Warning: z.object({
507
+ GlobalItemCheckResultCode: z.array(z.object({
508
+ Description: z.string().optional(),
509
+ Code: z.number()["int"]().optional()
510
+ })).optional()
511
+ }).optional(),
512
+ Mismatch: z.object({
513
+ GlobalItemCheckResultCode: z.array(z.object({
514
+ Description: z.string().optional(),
515
+ Code: z.number()["int"]().optional()
516
+ })).optional()
517
+ }).optional(),
518
+ ID: z.number()["int"]().optional(),
519
+ Pass: z.string().optional(),
520
+ Address: z.string().optional(),
521
+ Forename: z.string().optional(),
522
+ Surname: z.string().optional(),
523
+ DOB: z.string().optional(),
524
+ Alert: z.string().optional(),
525
+ SanctionsMatches: z.object({
526
+ GlobalSanctionsMatch: z.array(z.object({
527
+ SanctionID: z.string().optional(),
528
+ Url: z.string().optional(),
529
+ Rank: z.number()["int"]().optional(),
530
+ CaseID: z.string().optional(),
531
+ SearchID: z.string().optional()
532
+ })).optional()
533
+ }).optional()
534
+ })).optional()
535
+ }).describe("The result codes of the authentication request").optional(),
536
+ Score: z.number()["int"]().describe("The score of the authentication request").optional(),
537
+ BandText: z.string().describe("The band text of the authentication request").optional(),
538
+ Country: z.string().describe("Country type of the authentication request").optional(),
539
+ ItemCheckDecisionBands: z.object({
540
+ GlobalItemCheckDecisionBands: z.array(z.object({
541
+ ID: z.number()["int"]().optional(),
542
+ BandScore: z.number()["int"]().optional(),
543
+ BandText: z.string().optional()
544
+ })).optional()
545
+ }).describe("The item check decision bands of the authentication request").optional()
546
+ }).describe("Result of the authentication request").optional(),
547
+ pepIntelligenceResult: z.array(z.object({
548
+ Fullname: z.string().optional(),
549
+ Aliases: z.object({
550
+ elements: z.array(z.string()).optional()
551
+ }).optional(),
552
+ SanctionsAddresses: z.object({
553
+ GlobalSanctionsAddress: z.array(z.object({
554
+ AddressLine: z.string().optional(),
555
+ City: z.string().optional(),
556
+ Country: z.string().describe("Full name of country").optional(),
557
+ Region: z.string().optional()
558
+ })).optional()
559
+ }).optional(),
560
+ SanctionsDates: z.object({
561
+ GlobalSanctionsDate: z.object({
562
+ DateType: z.string().optional(),
563
+ Day: z.number()["int"]().optional(),
564
+ Month: z.number()["int"]().optional(),
565
+ Year: z.number()["int"]().optional()
566
+ }).optional()
567
+ }).optional(),
568
+ IdentityInformation: z.string().optional(),
569
+ SanctionsPositions: z.object({
570
+ GlobalSanctionsPosition: z.array(z.object({
571
+ Position: z.string().optional(),
572
+ Country: z.string().optional()
573
+ })).optional()
574
+ }).optional()
575
+ })).optional(),
576
+ sanctionsEnforcementsResult: z.array(z.object({
577
+ Fullname: z.string().optional(),
578
+ SanctionsBodies: z.object({
579
+ elements: z.array(z.number()["int"]()).optional()
580
+ }).optional(),
581
+ Aliases: z.object({
582
+ elements: z.array(z.string()).optional()
583
+ }).optional(),
584
+ SanctionsAddresses: z.object({
585
+ GlobalSanctionsAddress: z.array(z.object({
586
+ AddressLine: z.string().optional(),
587
+ City: z.string().optional(),
588
+ Country: z.string().describe("Full name of country").optional(),
589
+ Region: z.string().optional()
590
+ })).optional()
591
+ }).optional(),
592
+ SanctionsDates: z.object({
593
+ GlobalSanctionsDate: z.object({
594
+ DateType: z.string().optional(),
595
+ Day: z.number()["int"]().optional(),
596
+ Month: z.number()["int"]().optional(),
597
+ Year: z.number()["int"]().optional()
598
+ }).optional()
599
+ }).optional(),
600
+ IdentityInformation: z.string().optional()
601
+ })).optional()
602
+ }).describe("Details related to the amendments made to the original data."),
603
+ originalData: z.object({
604
+ data: z.object({
605
+ firstName: z.string().describe("First name of the credential subject").optional(),
606
+ middleName: z.string().describe("Middle name of the credential subject").optional(),
607
+ lastName: z.string().describe("Last name of the credential subject").optional(),
608
+ gender: z.string().describe("Gender of the credential subject").optional(),
609
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
610
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA"]).describe("Citizenship status of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
611
+ fullName: z.string().describe("Full name of the credential subject").optional(),
612
+ addressLine1: z.string().describe("First line of the address of the credential subject").optional(),
613
+ addressLine2: z.string().describe("Second line of the address of the credential subject").optional(),
614
+ birthDate: z.number()["int"]().describe("Birth Date of the credential subject in integer format of yyyymmdd, example: 20231226 2023 year, 12-December, 26-day").optional(),
615
+ placeOfBirth: z.string().nullable().optional()
616
+ }).describe("Unmodified personal details imported directly from document during authentication process.").optional(),
617
+ authenticateSPResult: z.object({
618
+ AuthenticationID: z.string().describe("The ID of the authentication request").optional(),
619
+ Timestamp: z.string().datetime().describe("The date and time of the authentication request").optional(),
620
+ CustomerRef: z.string().describe("The customer reference of the authentication request").optional(),
621
+ ProfileID: z.string().describe("The ID of the profile used for the authentication request").optional(),
622
+ ProfileName: z.string().describe("The name of the profile used for the authentication request").optional(),
623
+ ProfileVersion: z.number()["int"]().describe("The version of the profile used for the authentication request").optional(),
624
+ ProfileRevision: z.number()["int"]().describe("The revision of the profile used for the authentication request").optional(),
625
+ ProfileState: z.string().describe("The state of the profile used for the authentication request").optional(),
626
+ ResultCodes: z.object({
627
+ GlobalItemCheckResultCodes: z.array(z.object({
628
+ Name: z.string().optional(),
629
+ Description: z.string().optional(),
630
+ Comment: z.object({
631
+ GlobalItemCheckResultCode: z.array(z.object({
632
+ Description: z.string().optional(),
633
+ Code: z.number()["int"]().optional()
634
+ })).optional()
635
+ }).optional(),
636
+ Match: z.object({
637
+ GlobalItemCheckResultCode: z.array(z.object({
638
+ Description: z.string().optional(),
639
+ Code: z.number()["int"]().optional()
640
+ })).optional()
641
+ }).optional(),
642
+ Warning: z.object({
643
+ GlobalItemCheckResultCode: z.array(z.object({
644
+ Description: z.string().optional(),
645
+ Code: z.number()["int"]().optional()
646
+ })).optional()
647
+ }).optional(),
648
+ Mismatch: z.object({
649
+ GlobalItemCheckResultCode: z.array(z.object({
650
+ Description: z.string().optional(),
651
+ Code: z.number()["int"]().optional()
652
+ })).optional()
653
+ }).optional(),
654
+ ID: z.number()["int"]().optional(),
655
+ Pass: z.string().optional(),
656
+ Address: z.string().optional(),
657
+ Forename: z.string().optional(),
658
+ Surname: z.string().optional(),
659
+ DOB: z.string().optional(),
660
+ Alert: z.string().optional(),
661
+ SanctionsMatches: z.object({
662
+ GlobalSanctionsMatch: z.array(z.object({
663
+ SanctionID: z.string().optional(),
664
+ Url: z.string().optional(),
665
+ Rank: z.number()["int"]().optional(),
666
+ CaseID: z.string().optional(),
667
+ SearchID: z.string().optional()
668
+ })).optional()
669
+ }).optional()
670
+ })).optional()
671
+ }).describe("The result codes of the authentication request").optional(),
672
+ Score: z.number()["int"]().describe("The score of the authentication request").optional(),
673
+ BandText: z.string().describe("The band text of the authentication request").optional(),
674
+ Country: z.string().describe("The country type of the authentication request").optional()
675
+ }).describe("The result of the Authenticate SP check").optional(),
676
+ pepIntelligenceResult: z.array(z.object({
677
+ Fullname: z.string().optional(),
678
+ Aliases: z.object({
679
+ elements: z.array(z.string()).optional()
680
+ }).optional(),
681
+ SanctionsAddresses: z.object({
682
+ GlobalSanctionsAddress: z.array(z.object({
683
+ AddressLine: z.string().optional(),
684
+ City: z.string().optional(),
685
+ Country: z.string().describe("Full name of country").optional(),
686
+ Region: z.string().optional()
687
+ })).optional()
688
+ }).optional(),
689
+ SanctionsDates: z.object({
690
+ GlobalSanctionsDate: z.object({
691
+ DateType: z.string().optional(),
692
+ Day: z.number()["int"]().optional(),
693
+ Month: z.number()["int"]().optional(),
694
+ Year: z.number()["int"]().optional()
695
+ }).optional()
696
+ }).optional(),
697
+ IdentityInformation: z.string().optional(),
698
+ SanctionsPositions: z.object({
699
+ GlobalSanctionsPosition: z.array(z.object({
700
+ Position: z.string().optional(),
701
+ Country: z.string().optional()
702
+ })).optional()
703
+ }).optional()
704
+ })).describe("The result of the PEP Intelligence check").optional(),
705
+ sanctionsEnforcementsResult: z.array(z.object({
706
+ Fullname: z.string().optional(),
707
+ SanctionsBodies: z.object({
708
+ elements: z.array(z.number()["int"]()).optional()
709
+ }).optional(),
710
+ Aliases: z.object({
711
+ elements: z.array(z.string()).optional()
712
+ }).optional(),
713
+ SanctionsAddresses: z.object({
714
+ GlobalSanctionsAddress: z.array(z.object({
715
+ AddressLine: z.string().optional(),
716
+ City: z.string().optional(),
717
+ Country: z.string().describe("Full name of country").optional(),
718
+ Region: z.string().optional()
719
+ })).optional()
720
+ }).optional(),
721
+ SanctionsDates: z.object({
722
+ GlobalSanctionsDate: z.object({
723
+ DateType: z.string().optional(),
724
+ Day: z.number()["int"]().optional(),
725
+ Month: z.number()["int"]().optional(),
726
+ Year: z.number()["int"]().optional()
727
+ }).optional()
728
+ }).optional(),
729
+ IdentityInformation: z.string().optional()
730
+ })).describe("The result of the Sanctions Enforcements check").optional()
731
+ }).describe("Details related to the original data before any amendments")
732
+ }).describe("Stores the data of the credential");
733
+
734
+ var IDInformationCredentialSubjectSchema = z.object({
735
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
736
+ journeyId: z.string().uuid().describe("Journey ID of when credential was generated"),
737
+ reviewAnswer: z["enum"](["RED", "YELLOW", "GREEN"]).describe("Review result from kyc provider"),
738
+ reviewRejectType: z["enum"](["FINAL", "RETRY"]).describe("Review reject type").optional(),
739
+ reviewRejectLabels: z.array(z["enum"](["FORGERY", "DOCUMENT_TEMPLATE", "LOW_QUALITY", "SPAM", "NOT_DOCUMENT", "SELFIE_MISMATCH", "ID_INVALID", "FOREIGNER", "DUPLICATE", "BAD_AVATAR", "WRONG_USER_REGION", "INCOMPLETE_DOCUMENT", "BLACKLIST", "BLOCKLIST", "UNSATISFACTORY_PHOTOS", "DOCUMENT_PAGE_MISSING", "DOCUMENT_DAMAGED", "REGULATIONS_VIOLATIONS", "INCONSISTENT_PROFILE", "PROBLEMATIC_APPLICANT_DATA", "ADDITIONAL_DOCUMENT_REQUIRED", "AGE_REQUIREMENT_MISMATCH", "EXPERIENCE_REQUIREMENT_MISMATCH", "CRIMINAL", "WRONG_ADDRESS", "GRAPHIC_EDITOR", "DOCUMENT_DEPRIVED", "COMPROMISED_PERSONS", "PEP", "ADVERSE_MEDIA", "FRAUDULENT_PATTERNS", "SANCTIONS", "NOT_ALL_CHECKS_COMPLETED", "FRONT_SIDE_MISSING", "BACK_SIDE_MISSING", "SCREENSHOTS", "BLACK_AND_WHITE", "INCOMPATIBLE_LANGUAGE", "EXPIRATION_DATE", "UNFILLED_ID", "BAD_SELFIE", "BAD_VIDEO_SELFIE", "BAD_FACE_MATCHING", "BAD_PROOF_OF_IDENTITY", "BAD_PROOF_OF_ADDRESS", "BAD_PROOF_OF_PAYMENT", "SELFIE_WITH_PAPER", "FRAUDULENT_LIVENESS", "OTHER", "REQUESTED_DATA_MISMATCH", "OK", "COMPANY_NOT_DEFINED_STRUCTURE", "COMPANY_NOT_DEFINED_BENEFICIARIES", "COMPANY_NOT_VALIDATED_BENEFICIARIES", "COMPANY_NOT_DEFINED_REPRESENTATIVES", "COMPANY_NOT_VALIDATED_REPRESENTATIVES", "APPLICANT_INTERRUPTED_INTERVIEW", "DOCUMENT_MISSING", "UNSUITABLE_ENV", "CONNECTION_INTERRUPTED", "UNSUPPORTED_LANGUAGE", "THIRD_PARTY_INVOLVED", "CHECK_UNAVAILABLE", "INCORRECT_SOCIAL_NUMBER"])).describe("Reject labels").optional(),
740
+ documentType: z["enum"](["ID_CARD", "PASSPORT", "DRIVERS", "RESIDENCE_PERMIT", "UTILITY_BILL", "SELFIE", "VIDEO_SELFIE", "PROFILE_IMAGE", "ID_DOC_PHOTO", "AGREEMENT", "CONTRACT", "DRIVERS_TRANSLATION", "INVESTOR_DOC", "VEHICLE_REGISTRATION_CERTIFICATE", "INCOME_SOURCE", "PAYMENT_METHOD", "BANK_CARD", "COVID_VACCINATION_FORM", "OTHER"]).describe("Type of the document provided by the credential subject"),
741
+ entryDate: z.number()["int"]().describe("Entry date associated with the credential"),
742
+ entryTime: z.string().describe("Entry time associated with the credential"),
743
+ personalData: z.object({
744
+ firstName: z.string().describe("First name of the credential subject").optional(),
745
+ middleName: z.string().describe("Middle name of the credential subject").optional(),
746
+ lastName: z.string().describe("Last name of the credential subject").optional(),
747
+ gender: z.string().describe("Gender of the credential subject").optional(),
748
+ age: z.number()["int"]().gte(0).lte(125).describe("Age of the credential subject").optional(),
749
+ citizenship: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA", "ANT", "XKX"]).describe("Citizenship status of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
750
+ country: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA", "ANT", "XKX"]).describe("Country of the credential subject - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
751
+ fullName: z.string().describe("Full name of the credential subject").optional(),
752
+ birthDate: z.number()["int"]().describe("Birth Date of the credential subject in integer format of yyyymmdd, example: 20231226 2023 year, 12-December, 26-day").optional(),
753
+ countryOfBirth: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA", "ANT", "XKX"]).describe("Country of birth of the credential subject - - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
754
+ stateOfBirth: z.string().describe("State of birth of the credential subject").optional()
755
+ }).describe("Original data extracted by the provider"),
756
+ isSandbox: z["boolean"]().describe("Indicates if the credential was generated in a sandbox environment").optional()
757
+ }).describe("Stores the data of the credential");
758
+
759
+ var IDImageCredentialSubjectSchema = z.object({
760
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
761
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
762
+ base64_front: z.string().describe("Base64 encoded image of the front of the document"),
763
+ base64_back: z.string().describe("Base64 encoded image of the back of the document").optional(),
764
+ name: z.string().describe("Name of the document (e.g. passport.jpg)"),
765
+ documentType: z["enum"](["ID_CARD", "PASSPORT", "DRIVERS", "RESIDENCE_PERMIT", "UTILITY_BILL", "SELFIE", "VIDEO_SELFIE", "PROFILE_IMAGE", "ID_DOC_PHOTO", "AGREEMENT", "CONTRACT", "DRIVERS_TRANSLATION", "INVESTOR_DOC", "VEHICLE_REGISTRATION_CERTIFICATE", "INCOME_SOURCE", "PAYMENT_METHOD", "BANK_CARD", "COVID_VACCINATION_FORM", "OTHER"]).describe("Type of the document (e.g. passport)"),
766
+ entryDate: z.number()["int"]().describe("Entry date associated with the credential"),
767
+ entryTime: z.string().describe("Entry time associated with the credential"),
768
+ mediaType_front: z["enum"](["image/jpeg", "image/jpg", "image/png", "application/pdf"]).describe("Media type of the front of the document (e.g. image/jpeg, image/png, application/pdf)"),
769
+ mediaType_back: z["enum"](["image/jpeg", "image/jpg", "image/png", "application/pdf"]).describe("Media type of the back of the document (e.g. image/jpeg, image/png, application/pdf)").optional(),
770
+ reviewAnswer: z["enum"](["RED", "YELLOW", "GREEN"]).describe("Review answer from kyc provider"),
771
+ reviewRejectType: z["enum"](["FINAL", "RETRY"]).describe("Review reject type").optional(),
772
+ reviewRejectLabels: z.array(z["enum"](["FORGERY", "DOCUMENT_TEMPLATE", "LOW_QUALITY", "SPAM", "NOT_DOCUMENT", "SELFIE_MISMATCH", "ID_INVALID", "FOREIGNER", "DUPLICATE", "BAD_AVATAR", "WRONG_USER_REGION", "INCOMPLETE_DOCUMENT", "BLACKLIST", "BLOCKLIST", "UNSATISFACTORY_PHOTOS", "DOCUMENT_PAGE_MISSING", "DOCUMENT_DAMAGED", "REGULATIONS_VIOLATIONS", "INCONSISTENT_PROFILE", "PROBLEMATIC_APPLICANT_DATA", "ADDITIONAL_DOCUMENT_REQUIRED", "AGE_REQUIREMENT_MISMATCH", "EXPERIENCE_REQUIREMENT_MISMATCH", "CRIMINAL", "WRONG_ADDRESS", "GRAPHIC_EDITOR", "DOCUMENT_DEPRIVED", "COMPROMISED_PERSONS", "PEP", "ADVERSE_MEDIA", "FRAUDULENT_PATTERNS", "SANCTIONS", "NOT_ALL_CHECKS_COMPLETED", "FRONT_SIDE_MISSING", "BACK_SIDE_MISSING", "SCREENSHOTS", "BLACK_AND_WHITE", "INCOMPATIBLE_LANGUAGE", "EXPIRATION_DATE", "UNFILLED_ID", "BAD_SELFIE", "BAD_VIDEO_SELFIE", "BAD_FACE_MATCHING", "BAD_PROOF_OF_IDENTITY", "BAD_PROOF_OF_ADDRESS", "BAD_PROOF_OF_PAYMENT", "SELFIE_WITH_PAPER", "FRAUDULENT_LIVENESS", "OTHER", "REQUESTED_DATA_MISMATCH", "OK", "COMPANY_NOT_DEFINED_STRUCTURE", "COMPANY_NOT_DEFINED_BENEFICIARIES", "COMPANY_NOT_VALIDATED_BENEFICIARIES", "COMPANY_NOT_DEFINED_REPRESENTATIVES", "COMPANY_NOT_VALIDATED_REPRESENTATIVES", "APPLICANT_INTERRUPTED_INTERVIEW", "DOCUMENT_MISSING", "UNSUITABLE_ENV", "CONNECTION_INTERRUPTED", "UNSUPPORTED_LANGUAGE", "THIRD_PARTY_INVOLVED", "CHECK_UNAVAILABLE", "INCORRECT_SOCIAL_NUMBER"])).describe("Reject labels").optional(),
773
+ isSandbox: z["boolean"]().describe("Indicates if the credential was generated in a sandbox environment").optional()
774
+ }).describe("Stores the data of the credential");
775
+
776
+ var SelfieImageCredentialSubjectSchema = z.object({
777
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
778
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
779
+ base64: z.string().describe("Base64 encoded image of the selfie image"),
780
+ name: z.string().describe("Name of the docuemnt (e.g. selfie.jpg)"),
781
+ mediaType: z["enum"](["image/jpeg", "image/jpg", "application/pdf", "image/png"]).describe("Media type of the document (e.g. image/jpeg, image/png)"),
782
+ entryDate: z.number()["int"]().describe("Entry date associated with the credential"),
783
+ entryTime: z.string().describe("Entry time associated with the credential"),
784
+ reviewAnswer: z["enum"](["RED", "YELLOW", "GREEN"]).describe("Review result from kyc provider"),
785
+ reviewRejectType: z["enum"](["FINAL", "RETRY"]).describe("Review reject type").optional(),
786
+ reviewRejectLabels: z.array(z["enum"](["FORGERY", "DOCUMENT_TEMPLATE", "LOW_QUALITY", "SPAM", "NOT_DOCUMENT", "SELFIE_MISMATCH", "ID_INVALID", "FOREIGNER", "DUPLICATE", "BAD_AVATAR", "WRONG_USER_REGION", "INCOMPLETE_DOCUMENT", "BLACKLIST", "BLOCKLIST", "UNSATISFACTORY_PHOTOS", "DOCUMENT_PAGE_MISSING", "DOCUMENT_DAMAGED", "REGULATIONS_VIOLATIONS", "INCONSISTENT_PROFILE", "PROBLEMATIC_APPLICANT_DATA", "ADDITIONAL_DOCUMENT_REQUIRED", "AGE_REQUIREMENT_MISMATCH", "EXPERIENCE_REQUIREMENT_MISMATCH", "CRIMINAL", "WRONG_ADDRESS", "GRAPHIC_EDITOR", "DOCUMENT_DEPRIVED", "COMPROMISED_PERSONS", "PEP", "ADVERSE_MEDIA", "FRAUDULENT_PATTERNS", "SANCTIONS", "NOT_ALL_CHECKS_COMPLETED", "FRONT_SIDE_MISSING", "BACK_SIDE_MISSING", "SCREENSHOTS", "BLACK_AND_WHITE", "INCOMPATIBLE_LANGUAGE", "EXPIRATION_DATE", "UNFILLED_ID", "BAD_SELFIE", "BAD_VIDEO_SELFIE", "BAD_FACE_MATCHING", "BAD_PROOF_OF_IDENTITY", "BAD_PROOF_OF_ADDRESS", "BAD_PROOF_OF_PAYMENT", "SELFIE_WITH_PAPER", "FRAUDULENT_LIVENESS", "OTHER", "REQUESTED_DATA_MISMATCH", "OK", "COMPANY_NOT_DEFINED_STRUCTURE", "COMPANY_NOT_DEFINED_BENEFICIARIES", "COMPANY_NOT_VALIDATED_BENEFICIARIES", "COMPANY_NOT_DEFINED_REPRESENTATIVES", "COMPANY_NOT_VALIDATED_REPRESENTATIVES", "APPLICANT_INTERRUPTED_INTERVIEW", "DOCUMENT_MISSING", "UNSUITABLE_ENV", "CONNECTION_INTERRUPTED", "UNSUPPORTED_LANGUAGE", "THIRD_PARTY_INVOLVED", "CHECK_UNAVAILABLE", "INCORRECT_SOCIAL_NUMBER"])).describe("Reject labels").optional(),
787
+ isSandbox: z["boolean"]().describe("Indicates if the credential was generated in a sandbox environment").optional()
788
+ }).describe("Stores the data of the credential");
789
+
790
+ var ProofOfResidenceCredentialSubjectSchema = z.object({
791
+ id: z.string().url().describe("Stores the DID of the subject that owns the credential"),
792
+ journeyId: z.string().uuid().describe("The ID of the journey that this credential is associated with"),
793
+ country: z["enum"](["AFG", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "CPV", "KHM", "CMR", "CAN", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COD", "COG", "COK", "CRI", "HRV", "CUB", "CUW", "CYP", "CZE", "CIV", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "SWZ", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "MKD", "ROU", "RUS", "RWA", "REU", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "UMI", "USA", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE", "ALA", "ANT", "XKX"]).describe("The country of residence - ISO 3166-1 alpha-3 country code (https://www.iban.com/country-codes)").optional(),
794
+ base64: z.string().describe("Base64 encoded image of the proof of residence").optional(),
795
+ name: z.string().describe("Name of the document (e.g. ProofOfResidence.jpg)").optional(),
796
+ documentType: z["enum"](["Gas_bill", "Internet_bill", "Electricity_bill", "Rent_agreement", "Bank_statement"]).describe("Type of the document (e.g. Gas bill, Internet bill, Electricity bill, Rent agreement, Bank statement)"),
797
+ entryDate: z.number()["int"]().describe("Entry date associated with the credential"),
798
+ entryTime: z.string().describe("Entry time associated with the credential"),
799
+ mediaType: z["enum"](["image/jpeg", "image/jpg", "image/png", "application/pdf"]).describe("Media type of the document (e.g. image/jpeg, image/png, application/pdf)").optional(),
800
+ county: z.string().describe("The county of residence").optional(),
801
+ city: z.string().describe("The city of residence").optional(),
802
+ streetName: z.string().describe("The street name of residence").optional(),
803
+ postalCode: z.string().describe("The postal code of residence").optional(),
804
+ isSandbox: z["boolean"]().describe("Indicates if the credential was generated in a sandbox environment").optional()
805
+ }).describe("Stores the data of the credential");
806
+
807
+ // NB: this is supposed to reproduce W3CCredential used in polygon id js sdk
808
+
809
+ var CredentialStatusTypePID = z["enum"](["SparseMerkleTreeProof", "Iden3ReverseSparseMerkleTreeProof", "Iden3commRevocationStatusV1.0", "Iden3OnchainSparseMerkleTreeProof2023"]);
810
+ var CredentialStatusPID = z.object({
811
+ id: z.string(),
812
+ type: CredentialStatusTypePID,
813
+ revocationNonce: z.number().optional()
814
+ //statusIssuer?: CredentialStatus;
815
+ });
816
+ var CredentialSchemaPID = z.object({
817
+ id: z.string(),
818
+ type: z.string()
819
+ });
820
+ var GenericVerifiableCredentialSchema = z.object({
821
+ id: z.string(),
822
+ "@context": z.array(z.string()).optional(),
823
+ // context: z.array(z.string()),
824
+ type: z.array(z.string()),
825
+ expirationDate: z.string().optional(),
826
+ issuanceDate: z.string().optional(),
827
+ credentialSubject: z.record(z.string(),
828
+ // The old version of the generated API does not handle z.union correctly.
829
+ // Until we either
830
+ // 1. discontinue usage of the old apiClient
831
+ // or
832
+ // 2. remove {nullable: true} from the birthPlace field in the IDInformation schema
833
+ // we need to use z.any() instead.
834
+ //
835
+ // if you do the following test you can see that the old apiClient does not change
836
+ // when you add z.null() to the union below.
837
+ //
838
+ // 1. comment out the z.any() below.
839
+ z.any()
840
+ // 2. uncomment the following lines
841
+ // z.union([
842
+ // z.record(z.string(), z.any()),
843
+ // z.string(),
844
+ // z.number(),
845
+ // z.boolean(),
846
+ // z.null(),
847
+ // z.array(z.any()),
848
+ // ]),
849
+ // 3. run the following command: pnpnm update-api
850
+ // 4. Notice that several generated files are modified.
851
+ // 5. make a temporary branch to throw away later
852
+ // 6. comment out z.null() above
853
+ // 7. run the following command: pnpnm update-api
854
+ // 8. notice that only the new apiClient is modified.
855
+ // modified: packages/clients/api/src/generated/apps/ComplianceService.ts
856
+ // modified: packages/clients/api/src/generated/apps/CustomersService.ts
857
+ // modified: packages/clients/api/src/generated/apps/ScenariosService.ts
858
+ // modified: packages/libs/schemas/src/compliance/vc-schemas/supported-schemas/GenericVerifiableCredentialSchema.ts
859
+ ),
860
+ credentialStatus: CredentialStatusPID,
861
+ issuer: z.string(),
862
+ credentialSchema: CredentialSchemaPID,
863
+ proof: z.any() //object | unknown[];
864
+ });
865
+
866
+ var CredentialSchemas = {
867
+ ProofOfResidence: ProofOfResidenceCredentialSubjectSchema,
868
+ SelfieImage: SelfieImageCredentialSubjectSchema,
869
+ IDImage: IDImageCredentialSubjectSchema,
870
+ IDInformation: IDInformationCredentialSubjectSchema,
871
+ AMLScreeningsResults: OLD_AMLScreeningsResultsCredentialSubjectSchema,
872
+ ID3: ID3CredentialSubjectSchema,
873
+ IDScan: IDScanCredentialSubjectSchema,
874
+ IDScanSelfie: IDScanSelfieCredentialSubjectSchema,
875
+ IDScanPassport: IDScanPassportCredentialSubjectSchema
876
+ };
877
+ var CredentialNames = [{
878
+ value: "AMLScreeningsResults",
879
+ label: "AML screening results"
880
+ }, {
881
+ value: "ProofOfResidence",
882
+ label: "Proof of residence"
883
+ }, {
884
+ value: "SelfieImage",
885
+ label: "Selfie image"
886
+ }, {
887
+ value: "IDImage",
888
+ label: "ID image"
889
+ }, {
890
+ value: "IDInformation",
891
+ label: "ID information"
892
+ }];
893
+ var CredentialTypes = ["AMLScreeningsResults", "ProofOfResidence", "SelfieImage", "IDImage", "IDInformation", "ID3",
894
+ // this is for backwards compatibility
895
+ "IDScan",
896
+ // this is for backwards compatibility
897
+ "IDScanSelfie",
898
+ // this is for backwards compatibility
899
+ "IDScanPassport" // this is for backwards compatibility
900
+ ];
901
+ var NexeraCredentialType = z["enum"](CredentialTypes);
902
+ var getCredentialName = function getCredentialName(value) {
903
+ var _CredentialNames$find;
904
+ return (_CredentialNames$find = CredentialNames.find(function (obj) {
905
+ return obj.value === value;
906
+ })) === null || _CredentialNames$find === void 0 ? void 0 : _CredentialNames$find.label;
907
+ };
908
+ var CredentialType = z.string().transform(function (x) {
909
+ return x.replace("_", "-");
910
+ }) // TODO determine why this is needed
911
+ .pipe(z["enum"](CredentialTypes));
912
+ // Should this be replaced by GenericVerifiableCredentialSchema?
913
+
914
+ var VerifiableCredential = z.object({
915
+ issuer: z.string(),
916
+ type: z.array(z.union([z.string(), CredentialType])),
917
+ credentialSubject: z.record(z.unknown())
918
+ }).catchall(z.any());
919
+ var CredentialMediaType = IDImageCredentialSubjectSchema.shape.mediaType_front;
920
+
921
+ var ISO3CountryCode = IDInformationCredentialSubjectSchema.shape.personalData.shape.citizenship.unwrap();
922
+ var ALPHA_2_COUNTRIES = ["AN", "XK", "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "VG", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "HK", "MO", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VI", "WF", "EH", "YE", "ZM", "ZW"];
923
+ var Alpha2Country = z["enum"](ALPHA_2_COUNTRIES);
924
+ var countryISO3toISO2Mapping = {
925
+ AFG: "AF",
926
+ ALA: "AX",
927
+ ALB: "AL",
928
+ DZA: "DZ",
929
+ ASM: "AS",
930
+ AND: "AD",
931
+ AGO: "AO",
932
+ AIA: "AI",
933
+ ATA: "AQ",
934
+ ATG: "AG",
935
+ ARG: "AR",
936
+ ARM: "AM",
937
+ ABW: "AW",
938
+ AUS: "AU",
939
+ AUT: "AT",
940
+ AZE: "AZ",
941
+ BHS: "BS",
942
+ BHR: "BH",
943
+ BGD: "BD",
944
+ BRB: "BB",
945
+ BLR: "BY",
946
+ BEL: "BE",
947
+ BLZ: "BZ",
948
+ BEN: "BJ",
949
+ BMU: "BM",
950
+ BTN: "BT",
951
+ BOL: "BO",
952
+ BES: "BQ",
953
+ BIH: "BA",
954
+ BWA: "BW",
955
+ BVT: "BV",
956
+ BRA: "BR",
957
+ VGB: "VG",
958
+ IOT: "IO",
959
+ BRN: "BN",
960
+ BGR: "BG",
961
+ BFA: "BF",
962
+ BDI: "BI",
963
+ KHM: "KH",
964
+ CMR: "CM",
965
+ CAN: "CA",
966
+ CPV: "CV",
967
+ CYM: "KY",
968
+ CAF: "CF",
969
+ TCD: "TD",
970
+ CHL: "CL",
971
+ CHN: "CN",
972
+ HKG: "HK",
973
+ MAC: "MO",
974
+ CXR: "CX",
975
+ CCK: "CC",
976
+ COL: "CO",
977
+ COM: "KM",
978
+ COG: "CG",
979
+ COD: "CD",
980
+ COK: "CK",
981
+ CRI: "CR",
982
+ CIV: "CI",
983
+ HRV: "HR",
984
+ CUB: "CU",
985
+ CUW: "CW",
986
+ CYP: "CY",
987
+ CZE: "CZ",
988
+ DNK: "DK",
989
+ DJI: "DJ",
990
+ DMA: "DM",
991
+ DOM: "DO",
992
+ ECU: "EC",
993
+ EGY: "EG",
994
+ SLV: "SV",
995
+ GNQ: "GQ",
996
+ ERI: "ER",
997
+ EST: "EE",
998
+ ETH: "ET",
999
+ FLK: "FK",
1000
+ FRO: "FO",
1001
+ FJI: "FJ",
1002
+ FIN: "FI",
1003
+ FRA: "FR",
1004
+ GUF: "GF",
1005
+ PYF: "PF",
1006
+ ATF: "TF",
1007
+ GAB: "GA",
1008
+ GMB: "GM",
1009
+ GEO: "GE",
1010
+ DEU: "DE",
1011
+ GHA: "GH",
1012
+ GIB: "GI",
1013
+ GRC: "GR",
1014
+ GRL: "GL",
1015
+ GRD: "GD",
1016
+ GLP: "GP",
1017
+ GUM: "GU",
1018
+ GTM: "GT",
1019
+ GGY: "GG",
1020
+ GIN: "GN",
1021
+ GNB: "GW",
1022
+ GUY: "GY",
1023
+ HTI: "HT",
1024
+ HMD: "HM",
1025
+ VAT: "VA",
1026
+ HND: "HN",
1027
+ HUN: "HU",
1028
+ ISL: "IS",
1029
+ IND: "IN",
1030
+ IDN: "ID",
1031
+ IRN: "IR",
1032
+ IRQ: "IQ",
1033
+ IRL: "IE",
1034
+ IMN: "IM",
1035
+ ISR: "IL",
1036
+ ITA: "IT",
1037
+ JAM: "JM",
1038
+ JPN: "JP",
1039
+ JEY: "JE",
1040
+ JOR: "JO",
1041
+ KAZ: "KZ",
1042
+ KEN: "KE",
1043
+ KIR: "KI",
1044
+ PRK: "KP",
1045
+ KOR: "KR",
1046
+ KWT: "KW",
1047
+ KGZ: "KG",
1048
+ LAO: "LA",
1049
+ LVA: "LV",
1050
+ LBN: "LB",
1051
+ LSO: "LS",
1052
+ LBR: "LR",
1053
+ LBY: "LY",
1054
+ LIE: "LI",
1055
+ LTU: "LT",
1056
+ LUX: "LU",
1057
+ MKD: "MK",
1058
+ MDG: "MG",
1059
+ MWI: "MW",
1060
+ MYS: "MY",
1061
+ MDV: "MV",
1062
+ MLI: "ML",
1063
+ MLT: "MT",
1064
+ MHL: "MH",
1065
+ MTQ: "MQ",
1066
+ MRT: "MR",
1067
+ MUS: "MU",
1068
+ MYT: "YT",
1069
+ MEX: "MX",
1070
+ FSM: "FM",
1071
+ MDA: "MD",
1072
+ MCO: "MC",
1073
+ MNG: "MN",
1074
+ MNE: "ME",
1075
+ MSR: "MS",
1076
+ MAR: "MA",
1077
+ MOZ: "MZ",
1078
+ MMR: "MM",
1079
+ NAM: "NA",
1080
+ NRU: "NR",
1081
+ NPL: "NP",
1082
+ NLD: "NL",
1083
+ NCL: "NC",
1084
+ NZL: "NZ",
1085
+ NIC: "NI",
1086
+ NER: "NE",
1087
+ NGA: "NG",
1088
+ NIU: "NU",
1089
+ NFK: "NF",
1090
+ MNP: "MP",
1091
+ NOR: "NO",
1092
+ OMN: "OM",
1093
+ PAK: "PK",
1094
+ PLW: "PW",
1095
+ PSE: "PS",
1096
+ PAN: "PA",
1097
+ PNG: "PG",
1098
+ PRY: "PY",
1099
+ PER: "PE",
1100
+ PHL: "PH",
1101
+ PCN: "PN",
1102
+ POL: "PL",
1103
+ PRT: "PT",
1104
+ PRI: "PR",
1105
+ QAT: "QA",
1106
+ REU: "RE",
1107
+ ROU: "RO",
1108
+ RUS: "RU",
1109
+ RWA: "RW",
1110
+ BLM: "BL",
1111
+ SHN: "SH",
1112
+ KNA: "KN",
1113
+ LCA: "LC",
1114
+ MAF: "MF",
1115
+ SPM: "PM",
1116
+ VCT: "VC",
1117
+ WSM: "WS",
1118
+ SMR: "SM",
1119
+ STP: "ST",
1120
+ SAU: "SA",
1121
+ SEN: "SN",
1122
+ SRB: "RS",
1123
+ SYC: "SC",
1124
+ SLE: "SL",
1125
+ SGP: "SG",
1126
+ SXM: "SX",
1127
+ SVK: "SK",
1128
+ SVN: "SI",
1129
+ SLB: "SB",
1130
+ SOM: "SO",
1131
+ ZAF: "ZA",
1132
+ SGS: "GS",
1133
+ SSD: "SS",
1134
+ ESP: "ES",
1135
+ LKA: "LK",
1136
+ SDN: "SD",
1137
+ SUR: "SR",
1138
+ SJM: "SJ",
1139
+ SWZ: "SZ",
1140
+ SWE: "SE",
1141
+ CHE: "CH",
1142
+ SYR: "SY",
1143
+ TWN: "TW",
1144
+ TJK: "TJ",
1145
+ TZA: "TZ",
1146
+ THA: "TH",
1147
+ TLS: "TL",
1148
+ TGO: "TG",
1149
+ TKL: "TK",
1150
+ TON: "TO",
1151
+ TTO: "TT",
1152
+ TUN: "TN",
1153
+ TUR: "TR",
1154
+ TKM: "TM",
1155
+ TCA: "TC",
1156
+ TUV: "TV",
1157
+ UGA: "UG",
1158
+ UKR: "UA",
1159
+ ARE: "AE",
1160
+ GBR: "GB",
1161
+ USA: "US",
1162
+ UMI: "UM",
1163
+ URY: "UY",
1164
+ UZB: "UZ",
1165
+ VUT: "VU",
1166
+ VEN: "VE",
1167
+ VNM: "VN",
1168
+ VIR: "VI",
1169
+ WLF: "WF",
1170
+ ESH: "EH",
1171
+ YEM: "YE",
1172
+ ZMB: "ZM",
1173
+ ZWE: "ZW",
1174
+ XKX: "XK",
1175
+ ANT: "AN"
1176
+ };
1177
+ var countryISO2toISO3Mapping = {
1178
+ AF: "AFG",
1179
+ AX: "ALA",
1180
+ AL: "ALB",
1181
+ DZ: "DZA",
1182
+ AS: "ASM",
1183
+ AD: "AND",
1184
+ AO: "AGO",
1185
+ AI: "AIA",
1186
+ AQ: "ATA",
1187
+ AG: "ATG",
1188
+ AR: "ARG",
1189
+ AM: "ARM",
1190
+ AW: "ABW",
1191
+ AU: "AUS",
1192
+ AT: "AUT",
1193
+ AZ: "AZE",
1194
+ BS: "BHS",
1195
+ BH: "BHR",
1196
+ BD: "BGD",
1197
+ BB: "BRB",
1198
+ BY: "BLR",
1199
+ BE: "BEL",
1200
+ BZ: "BLZ",
1201
+ BJ: "BEN",
1202
+ BM: "BMU",
1203
+ BT: "BTN",
1204
+ BO: "BOL",
1205
+ BQ: "BES",
1206
+ BA: "BIH",
1207
+ BW: "BWA",
1208
+ BV: "BVT",
1209
+ BR: "BRA",
1210
+ VG: "VGB",
1211
+ IO: "IOT",
1212
+ BN: "BRN",
1213
+ BG: "BGR",
1214
+ BF: "BFA",
1215
+ BI: "BDI",
1216
+ KH: "KHM",
1217
+ CM: "CMR",
1218
+ CA: "CAN",
1219
+ CV: "CPV",
1220
+ KY: "CYM",
1221
+ CF: "CAF",
1222
+ TD: "TCD",
1223
+ CL: "CHL",
1224
+ CN: "CHN",
1225
+ HK: "HKG",
1226
+ MO: "MAC",
1227
+ CX: "CXR",
1228
+ CC: "CCK",
1229
+ CO: "COL",
1230
+ KM: "COM",
1231
+ CG: "COG",
1232
+ CD: "COD",
1233
+ CK: "COK",
1234
+ CR: "CRI",
1235
+ CI: "CIV",
1236
+ HR: "HRV",
1237
+ CU: "CUB",
1238
+ CW: "CUW",
1239
+ CY: "CYP",
1240
+ CZ: "CZE",
1241
+ DK: "DNK",
1242
+ DJ: "DJI",
1243
+ DM: "DMA",
1244
+ DO: "DOM",
1245
+ EC: "ECU",
1246
+ EG: "EGY",
1247
+ SV: "SLV",
1248
+ GQ: "GNQ",
1249
+ ER: "ERI",
1250
+ EE: "EST",
1251
+ ET: "ETH",
1252
+ FK: "FLK",
1253
+ FO: "FRO",
1254
+ FJ: "FJI",
1255
+ FI: "FIN",
1256
+ FR: "FRA",
1257
+ GF: "GUF",
1258
+ PF: "PYF",
1259
+ TF: "ATF",
1260
+ GA: "GAB",
1261
+ GM: "GMB",
1262
+ GE: "GEO",
1263
+ DE: "DEU",
1264
+ GH: "GHA",
1265
+ GI: "GIB",
1266
+ GR: "GRC",
1267
+ GL: "GRL",
1268
+ GD: "GRD",
1269
+ GP: "GLP",
1270
+ GU: "GUM",
1271
+ GT: "GTM",
1272
+ GG: "GGY",
1273
+ GN: "GIN",
1274
+ GW: "GNB",
1275
+ GY: "GUY",
1276
+ HT: "HTI",
1277
+ HM: "HMD",
1278
+ VA: "VAT",
1279
+ HN: "HND",
1280
+ HU: "HUN",
1281
+ IS: "ISL",
1282
+ IN: "IND",
1283
+ ID: "IDN",
1284
+ IR: "IRN",
1285
+ IQ: "IRQ",
1286
+ IE: "IRL",
1287
+ IM: "IMN",
1288
+ IL: "ISR",
1289
+ IT: "ITA",
1290
+ JM: "JAM",
1291
+ JP: "JPN",
1292
+ JE: "JEY",
1293
+ JO: "JOR",
1294
+ KZ: "KAZ",
1295
+ KE: "KEN",
1296
+ KI: "KIR",
1297
+ KP: "PRK",
1298
+ KR: "KOR",
1299
+ KW: "KWT",
1300
+ KG: "KGZ",
1301
+ LA: "LAO",
1302
+ LV: "LVA",
1303
+ LB: "LBN",
1304
+ LS: "LSO",
1305
+ LR: "LBR",
1306
+ LY: "LBY",
1307
+ LI: "LIE",
1308
+ LT: "LTU",
1309
+ LU: "LUX",
1310
+ MK: "MKD",
1311
+ MG: "MDG",
1312
+ MW: "MWI",
1313
+ MY: "MYS",
1314
+ MV: "MDV",
1315
+ ML: "MLI",
1316
+ MT: "MLT",
1317
+ MH: "MHL",
1318
+ MQ: "MTQ",
1319
+ MR: "MRT",
1320
+ MU: "MUS",
1321
+ YT: "MYT",
1322
+ MX: "MEX",
1323
+ FM: "FSM",
1324
+ MD: "MDA",
1325
+ MC: "MCO",
1326
+ MN: "MNG",
1327
+ ME: "MNE",
1328
+ MS: "MSR",
1329
+ MA: "MAR",
1330
+ MZ: "MOZ",
1331
+ MM: "MMR",
1332
+ NA: "NAM",
1333
+ NR: "NRU",
1334
+ NP: "NPL",
1335
+ NL: "NLD",
1336
+ NC: "NCL",
1337
+ NZ: "NZL",
1338
+ NI: "NIC",
1339
+ NE: "NER",
1340
+ NG: "NGA",
1341
+ NU: "NIU",
1342
+ NF: "NFK",
1343
+ MP: "MNP",
1344
+ NO: "NOR",
1345
+ OM: "OMN",
1346
+ PK: "PAK",
1347
+ PW: "PLW",
1348
+ PS: "PSE",
1349
+ PA: "PAN",
1350
+ PG: "PNG",
1351
+ PY: "PRY",
1352
+ PE: "PER",
1353
+ PH: "PHL",
1354
+ PN: "PCN",
1355
+ PL: "POL",
1356
+ PT: "PRT",
1357
+ PR: "PRI",
1358
+ QA: "QAT",
1359
+ RE: "REU",
1360
+ RO: "ROU",
1361
+ RU: "RUS",
1362
+ RW: "RWA",
1363
+ BL: "BLM",
1364
+ SH: "SHN",
1365
+ KN: "KNA",
1366
+ LC: "LCA",
1367
+ MF: "MAF",
1368
+ PM: "SPM",
1369
+ VC: "VCT",
1370
+ WS: "WSM",
1371
+ SM: "SMR",
1372
+ ST: "STP",
1373
+ SA: "SAU",
1374
+ SN: "SEN",
1375
+ RS: "SRB",
1376
+ SC: "SYC",
1377
+ SL: "SLE",
1378
+ SG: "SGP",
1379
+ SX: "SXM",
1380
+ SK: "SVK",
1381
+ SI: "SVN",
1382
+ SB: "SLB",
1383
+ SO: "SOM",
1384
+ ZA: "ZAF",
1385
+ GS: "SGS",
1386
+ SS: "SSD",
1387
+ ES: "ESP",
1388
+ LK: "LKA",
1389
+ SD: "SDN",
1390
+ SR: "SUR",
1391
+ SJ: "SJM",
1392
+ SZ: "SWZ",
1393
+ SE: "SWE",
1394
+ CH: "CHE",
1395
+ SY: "SYR",
1396
+ TW: "TWN",
1397
+ TJ: "TJK",
1398
+ TZ: "TZA",
1399
+ TH: "THA",
1400
+ TL: "TLS",
1401
+ TG: "TGO",
1402
+ TK: "TKL",
1403
+ TO: "TON",
1404
+ TT: "TTO",
1405
+ TN: "TUN",
1406
+ TR: "TUR",
1407
+ TM: "TKM",
1408
+ TC: "TCA",
1409
+ TV: "TUV",
1410
+ UG: "UGA",
1411
+ UA: "UKR",
1412
+ AE: "ARE",
1413
+ GB: "GBR",
1414
+ US: "USA",
1415
+ UM: "UMI",
1416
+ UY: "URY",
1417
+ UZ: "UZB",
1418
+ VU: "VUT",
1419
+ VE: "VEN",
1420
+ VN: "VNM",
1421
+ VI: "VIR",
1422
+ WF: "WLF",
1423
+ EH: "ESH",
1424
+ YE: "YEM",
1425
+ ZM: "ZMB",
1426
+ ZW: "ZWE",
1427
+ XK: "XKX",
1428
+ AN: "ANT"
1429
+ };
1430
+ var isoCountriesNameFromISO2 = {
1431
+ AN: "Netherlands Antiles",
1432
+ XK: "Kosovo",
1433
+ BQ: "Bonaire, Sint Eustatius and Saba ",
1434
+ CW: "Curaçao",
1435
+ KP: "Korea (the Democratic People's Republic of)",
1436
+ SX: "Sint Maarten (Dutch part)",
1437
+ SS: "South Sudan",
1438
+ AF: "Afghanistan",
1439
+ AX: "Aland Islands",
1440
+ AL: "Albania",
1441
+ DZ: "Algeria",
1442
+ AS: "American Samoa",
1443
+ AD: "Andorra",
1444
+ AO: "Angola",
1445
+ AI: "Anguilla",
1446
+ AQ: "Antarctica",
1447
+ AG: "Antigua And Barbuda",
1448
+ AR: "Argentina",
1449
+ AM: "Armenia",
1450
+ AW: "Aruba",
1451
+ AU: "Australia",
1452
+ AT: "Austria",
1453
+ AZ: "Azerbaijan",
1454
+ BS: "Bahamas",
1455
+ BH: "Bahrain",
1456
+ BD: "Bangladesh",
1457
+ BB: "Barbados",
1458
+ BY: "Belarus",
1459
+ BE: "Belgium",
1460
+ BZ: "Belize",
1461
+ BJ: "Benin",
1462
+ BM: "Bermuda",
1463
+ BT: "Bhutan",
1464
+ BO: "Bolivia",
1465
+ BA: "Bosnia And Herzegovina",
1466
+ BW: "Botswana",
1467
+ BV: "Bouvet Island",
1468
+ BR: "Brazil",
1469
+ IO: "British Indian Ocean Territory",
1470
+ BN: "Brunei Darussalam",
1471
+ BG: "Bulgaria",
1472
+ BF: "Burkina Faso",
1473
+ BI: "Burundi",
1474
+ KH: "Cambodia",
1475
+ CM: "Cameroon",
1476
+ CA: "Canada",
1477
+ CV: "Cape Verde",
1478
+ KY: "Cayman Islands",
1479
+ CF: "Central African Republic",
1480
+ TD: "Chad",
1481
+ CL: "Chile",
1482
+ CN: "China",
1483
+ CX: "Christmas Island",
1484
+ CC: "Cocos (Keeling) Islands",
1485
+ CO: "Colombia",
1486
+ KM: "Comoros",
1487
+ CG: "Congo",
1488
+ CD: "Congo, Democratic Republic",
1489
+ CK: "Cook Islands",
1490
+ CR: "Costa Rica",
1491
+ CI: "Cote D'Ivoire",
1492
+ HR: "Croatia",
1493
+ CU: "Cuba",
1494
+ CY: "Cyprus",
1495
+ CZ: "Czech Republic",
1496
+ DK: "Denmark",
1497
+ DJ: "Djibouti",
1498
+ DM: "Dominica",
1499
+ DO: "Dominican Republic",
1500
+ EC: "Ecuador",
1501
+ EG: "Egypt",
1502
+ SV: "El Salvador",
1503
+ GQ: "Equatorial Guinea",
1504
+ ER: "Eritrea",
1505
+ EE: "Estonia",
1506
+ ET: "Ethiopia",
1507
+ FK: "Falkland Islands (Malvinas)",
1508
+ FO: "Faroe Islands",
1509
+ FJ: "Fiji",
1510
+ FI: "Finland",
1511
+ FR: "France",
1512
+ GF: "French Guiana",
1513
+ PF: "French Polynesia",
1514
+ TF: "French Southern Territories",
1515
+ GA: "Gabon",
1516
+ GM: "Gambia",
1517
+ GE: "Georgia",
1518
+ DE: "Germany",
1519
+ GH: "Ghana",
1520
+ GI: "Gibraltar",
1521
+ GR: "Greece",
1522
+ GL: "Greenland",
1523
+ GD: "Grenada",
1524
+ GP: "Guadeloupe",
1525
+ GU: "Guam",
1526
+ GT: "Guatemala",
1527
+ GG: "Guernsey",
1528
+ GN: "Guinea",
1529
+ GW: "Guinea-Bissau",
1530
+ GY: "Guyana",
1531
+ HT: "Haiti",
1532
+ HM: "Heard Island & Mcdonald Islands",
1533
+ VA: "Holy See (Vatican City State)",
1534
+ HN: "Honduras",
1535
+ HK: "Hong Kong",
1536
+ HU: "Hungary",
1537
+ IS: "Iceland",
1538
+ IN: "India",
1539
+ ID: "Indonesia",
1540
+ IR: "Iran, Islamic Republic Of",
1541
+ IQ: "Iraq",
1542
+ IE: "Ireland",
1543
+ IM: "Isle Of Man",
1544
+ IL: "Israel",
1545
+ IT: "Italy",
1546
+ JM: "Jamaica",
1547
+ JP: "Japan",
1548
+ JE: "Jersey",
1549
+ JO: "Jordan",
1550
+ KZ: "Kazakhstan",
1551
+ KE: "Kenya",
1552
+ KI: "Kiribati",
1553
+ KR: "Korea",
1554
+ KW: "Kuwait",
1555
+ KG: "Kyrgyzstan",
1556
+ LA: "Lao People's Democratic Republic",
1557
+ LV: "Latvia",
1558
+ LB: "Lebanon",
1559
+ LS: "Lesotho",
1560
+ LR: "Liberia",
1561
+ LY: "Libyan Arab Jamahiriya",
1562
+ LI: "Liechtenstein",
1563
+ LT: "Lithuania",
1564
+ LU: "Luxembourg",
1565
+ MO: "Macao",
1566
+ MK: "Macedonia",
1567
+ MG: "Madagascar",
1568
+ MW: "Malawi",
1569
+ MY: "Malaysia",
1570
+ MV: "Maldives",
1571
+ ML: "Mali",
1572
+ MT: "Malta",
1573
+ MH: "Marshall Islands",
1574
+ MQ: "Martinique",
1575
+ MR: "Mauritania",
1576
+ MU: "Mauritius",
1577
+ YT: "Mayotte",
1578
+ MX: "Mexico",
1579
+ FM: "Micronesia, Federated States Of",
1580
+ MD: "Moldova",
1581
+ MC: "Monaco",
1582
+ MN: "Mongolia",
1583
+ ME: "Montenegro",
1584
+ MS: "Montserrat",
1585
+ MA: "Morocco",
1586
+ MZ: "Mozambique",
1587
+ MM: "Myanmar",
1588
+ NA: "Namibia",
1589
+ NR: "Nauru",
1590
+ NP: "Nepal",
1591
+ NL: "Netherlands",
1592
+ NC: "New Caledonia",
1593
+ NZ: "New Zealand",
1594
+ NI: "Nicaragua",
1595
+ NE: "Niger",
1596
+ NG: "Nigeria",
1597
+ NU: "Niue",
1598
+ NF: "Norfolk Island",
1599
+ MP: "Northern Mariana Islands",
1600
+ NO: "Norway",
1601
+ OM: "Oman",
1602
+ PK: "Pakistan",
1603
+ PW: "Palau",
1604
+ PS: "Palestinian Territory, Occupied",
1605
+ PA: "Panama",
1606
+ PG: "Papua New Guinea",
1607
+ PY: "Paraguay",
1608
+ PE: "Peru",
1609
+ PH: "Philippines",
1610
+ PN: "Pitcairn",
1611
+ PL: "Poland",
1612
+ PT: "Portugal",
1613
+ PR: "Puerto Rico",
1614
+ QA: "Qatar",
1615
+ RE: "Reunion",
1616
+ RO: "Romania",
1617
+ RU: "Russian Federation",
1618
+ RW: "Rwanda",
1619
+ BL: "Saint Barthelemy",
1620
+ SH: "Saint Helena",
1621
+ KN: "Saint Kitts And Nevis",
1622
+ LC: "Saint Lucia",
1623
+ MF: "Saint Martin",
1624
+ PM: "Saint Pierre And Miquelon",
1625
+ VC: "Saint Vincent And Grenadines",
1626
+ WS: "Samoa",
1627
+ SM: "San Marino",
1628
+ ST: "Sao Tome And Principe",
1629
+ SA: "Saudi Arabia",
1630
+ SN: "Senegal",
1631
+ RS: "Serbia",
1632
+ SC: "Seychelles",
1633
+ SL: "Sierra Leone",
1634
+ SG: "Singapore",
1635
+ SK: "Slovakia",
1636
+ SI: "Slovenia",
1637
+ SB: "Solomon Islands",
1638
+ SO: "Somalia",
1639
+ ZA: "South Africa",
1640
+ GS: "South Georgia And Sandwich Isl.",
1641
+ ES: "Spain",
1642
+ LK: "Sri Lanka",
1643
+ SD: "Sudan",
1644
+ SR: "Suriname",
1645
+ SJ: "Svalbard And Jan Mayen",
1646
+ SZ: "Swaziland",
1647
+ SE: "Sweden",
1648
+ CH: "Switzerland",
1649
+ SY: "Syrian Arab Republic",
1650
+ TW: "Taiwan",
1651
+ TJ: "Tajikistan",
1652
+ TZ: "Tanzania",
1653
+ TH: "Thailand",
1654
+ TL: "Timor-Leste",
1655
+ TG: "Togo",
1656
+ TK: "Tokelau",
1657
+ TO: "Tonga",
1658
+ TT: "Trinidad And Tobago",
1659
+ TN: "Tunisia",
1660
+ TR: "Turkey",
1661
+ TM: "Turkmenistan",
1662
+ TC: "Turks And Caicos Islands",
1663
+ TV: "Tuvalu",
1664
+ UG: "Uganda",
1665
+ UA: "Ukraine",
1666
+ AE: "United Arab Emirates",
1667
+ GB: "United Kingdom",
1668
+ US: "United States",
1669
+ UM: "United States Outlying Islands",
1670
+ UY: "Uruguay",
1671
+ UZ: "Uzbekistan",
1672
+ VU: "Vanuatu",
1673
+ VE: "Venezuela",
1674
+ VN: "Viet Nam",
1675
+ VG: "Virgin Islands, British",
1676
+ VI: "Virgin Islands, U.S.",
1677
+ WF: "Wallis And Futuna",
1678
+ EH: "Western Sahara",
1679
+ YE: "Yemen",
1680
+ ZM: "Zambia",
1681
+ ZW: "Zimbabwe"
1682
+ };
1683
+ function parseISO3CountryCode(code) {
1684
+ return ISO3CountryCode.safeParse(code).success ? ISO3CountryCode.parse(code) : undefined;
1685
+ }
1686
+
1687
+ function _arrayLikeToArray(arr, len) {
1688
+ if (len == null || len > arr.length) len = arr.length;
1689
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1690
+ return arr2;
1691
+ }
1692
+
1693
+ function _arrayWithoutHoles(arr) {
1694
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1695
+ }
1696
+
1697
+ function _iterableToArray(iter) {
1698
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1699
+ }
1700
+
1701
+ function _unsupportedIterableToArray(o, minLen) {
1702
+ if (!o) return;
1703
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1704
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1705
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1706
+ if (n === "Map" || n === "Set") return Array.from(o);
1707
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1708
+ }
1709
+
1710
+ function _nonIterableSpread() {
1711
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1712
+ }
1713
+
1714
+ function _toConsumableArray(arr) {
1715
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1716
+ }
1717
+
1718
+ /**
1719
+ * EIP155
1720
+ */
1721
+ var isValidAddress = function isValidAddress(address) {
1722
+ var regex = /^0x[a-fA-F0-9]{40}$/;
1723
+ return regex.test(address);
1724
+ };
1725
+ var String0x = z.string().refine(function (value) {
1726
+ return value.startsWith("0x");
1727
+ }, {
1728
+ message: "0x string must start with '0x'"
1729
+ }).describe("0x string");
1730
+ var PrivateKey = String0x;
1731
+ var HexadecimalSchema = z.string().refine(function (value) {
1732
+ return /^[0-9a-fA-F]+$/.test(value);
1733
+ }, {
1734
+ message: "Input must be a hexadecimal string"
1735
+ });
1736
+
1737
+ /**
1738
+ * Note: it might be nice to use String0x as the base object instead of z.string(),
1739
+ * but this causes update-api to fail with the following error:
1740
+ * TRPCError: [query.kyc.sumsub.getJourneyData] -
1741
+ * Input parser key: "userAddress" must be ZodString, ZodNumber, ZodBoolean, ZodBigInt or ZodDate
1742
+ */
1743
+ var AddressSchema = z.string().refine(function (value) {
1744
+ // Check if the string starts with '0x' and the rest is a valid hexadecimal string
1745
+ return /^0x[0-9A-Fa-f]*$/.test(value);
1746
+ }, {
1747
+ message: "Value must be a valid hexadecimal string prefixed with 0x"
1748
+ }).transform(function (value) {
1749
+ return value;
1750
+ }).describe("String value that identifies the address of a specific user. Normally tied to an EOA that includes the Smart Wallet.");
1751
+ var TxHash = z.string().refine(function (value) {
1752
+ // Check if the string starts with '0x' and the rest is a valid hexadecimal string
1753
+ return /^0x[0-9A-Fa-f]*$/.test(value);
1754
+ }, {
1755
+ message: "Value must be a valid hexadecimal string prefixed with 0x"
1756
+ }).transform(function (value) {
1757
+ return value;
1758
+ }).describe("Transaction hash");
1759
+ var EIP155Signature = String0x;
1760
+ var FunctionCallData = String0x;
1761
+ var shortAddress = function shortAddress(address) {
1762
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1763
+ return "".concat(address.substring(0, 6), "...").concat(address.substring(address.length - 4));
1764
+ };
1765
+
1766
+ /**
1767
+ * Aptos
1768
+ */
1769
+ var AptosAddress = String0x;
1770
+ var AptosSignature = z.string();
1771
+ /**
1772
+ * Starknet
1773
+ */
1774
+ var StarknetAddress = String0x;
1775
+ var StarknetSignature = String0x;
1776
+ /**
1777
+ * Polkadot
1778
+ */
1779
+ var PolkadotAddress = z.string();
1780
+ var PolkadotSignature = String0x;
1781
+ /**
1782
+ * Cosmos
1783
+ */
1784
+ var CosmosAddress = z.string().refine(function (value) {
1785
+ return value.startsWith("cosmos");
1786
+ }, {
1787
+ message: "Cosmos address must start with 'cosmos'"
1788
+ }).transform(function (value) {
1789
+ return value;
1790
+ }).describe("Cosmos address");
1791
+ var CosmosSignature = HexadecimalSchema;
1792
+ /**
1793
+ * Tezos
1794
+ */
1795
+
1796
+ var TezosImplicitAddress = z.string().refine(function (value) {
1797
+ return value.startsWith("tz");
1798
+ }, {
1799
+ message: "Tezos address (implicit account) must start with 'tz'"
1800
+ }).describe("Tezos address (implicit account)");
1801
+ var TezosContractAddress = z.string().refine(function (value) {
1802
+ return value.startsWith("KT1");
1803
+ }, {
1804
+ message: "Tezos contract address must start with 'KT1'"
1805
+ }).describe("Tezos contract address");
1806
+ var TezosAddress = z.union([TezosImplicitAddress, TezosContractAddress]);
1807
+ var TezosEntrypointName = z.string().refine(function (value) {
1808
+ return value.startsWith("%");
1809
+ }, {
1810
+ message: "Tezos entrypoint name must start with '%'"
1811
+ }).describe("Tezos entrypoint name");
1812
+ var EdSignature = z.string().refine(function (value) {
1813
+ return value.startsWith("edsig");
1814
+ }, {
1815
+ message: "EdSignature must start with 'edsig'"
1816
+ });
1817
+ var SpSignature = z.string().refine(function (value) {
1818
+ return value.startsWith("spsig");
1819
+ }, {
1820
+ message: "SpSignature must start with 'spsig'"
1821
+ });
1822
+ var P2Signature = z.string().refine(function (value) {
1823
+ return value.startsWith("p2sig");
1824
+ }, {
1825
+ message: "P2Signature must start with 'p2sig'"
1826
+ });
1827
+ var TezosSignature = z.union([EdSignature, SpSignature, P2Signature]);
1828
+ /**
1829
+ * Cardano
1830
+ */
1831
+ var CardanoAddress = z.string().refine(function (value) {
1832
+ return value.startsWith("addr");
1833
+ }, {
1834
+ message: "Cardano address must start with 'addr'"
1835
+ }).transform(function (value) {
1836
+ return value;
1837
+ }).describe("Cosmos address");
1838
+ var CardanoSignature = HexadecimalSchema;
1839
+ /**
1840
+ * Chain agnostic schemas
1841
+ */
1842
+ var BlockchainAddress = z.union([AddressSchema, TezosAddress, AptosAddress, PolkadotAddress, StarknetAddress, CosmosAddress, CardanoAddress]);
1843
+ var BlockchainSignature = z.union([EIP155Signature, TezosSignature, AptosSignature, PolkadotSignature, StarknetSignature, CosmosSignature, CardanoSignature]);
1844
+ var BLOCKCHAIN_NAMESPACES = ["tezos", "eip155", "aptos", "polkadot", "starknet", "cosmos", "solana", "cardano"];
1845
+ var BlockchainNamespace = z["enum"](BLOCKCHAIN_NAMESPACES);
1846
+ // Nicer names
1847
+ var BLOCKCHAIN_NAMESPACES_NAMES = {
1848
+ tezos: "Tezos",
1849
+ eip155: "EVM",
1850
+ aptos: "Aptos",
1851
+ polkadot: "Polkadot",
1852
+ starknet: "Starknet",
1853
+ cosmos: "Cosmos",
1854
+ solana: "Solana",
1855
+ cardano: "Cardano"
1856
+ };
1857
+ var DISPLAYED_LOCKCHAIN_NAMESPACES = ["Tezos", "EVM", "Aptos", "Polkadot", "Starknet", "Cosmos", "Solana", "Cardano"];
1858
+ var DisplayedBlockchainNamespace = z["enum"](DISPLAYED_LOCKCHAIN_NAMESPACES);
1859
+ var BLOCKCHAIN_NAME_TO_NAMESPACE = {
1860
+ Tezos: "tezos",
1861
+ EVM: "eip155",
1862
+ Aptos: "aptos",
1863
+ Polkadot: "polkadot",
1864
+ Starknet: "starknet",
1865
+ Cosmos: "cosmos",
1866
+ Solana: "solana",
1867
+ Cardano: "cardano"
1868
+ };
1869
+ var BLOCKCHAIN_NAMESPACE_TO_NAME = {
1870
+ tezos: "Tezos",
1871
+ eip155: "EVM",
1872
+ aptos: "Aptos",
1873
+ polkadot: "Polkadot",
1874
+ starknet: "Starknet",
1875
+ cosmos: "Cosmos",
1876
+ solana: "Solana",
1877
+ cardano: "Cardano"
1878
+ };
1879
+ var coerceBoolean = z["enum"](["0", "1", "true", "false"])["catch"]("false").transform(function (value) {
1880
+ return value == "true" || value == "1";
1881
+ });
1882
+ var ENVS = ["cicd", "local", "test-dev-1", "test-dev-2", "dev", "stage", "prod"];
1883
+ var EnvironmentSchema = z["enum"](ENVS);
1884
+ var UuidString = z.string().uuid();
1885
+ /**
1886
+ * Zod parse without throwing an error if the value is invalid
1887
+ * Rather, it returns a object with optional error and data fields
1888
+ *
1889
+ * @param schema
1890
+ * @param value
1891
+ * @constructor
1892
+ */
1893
+ function ZodParse(schema, value) {
1894
+ var result = schema.safeParse(value);
1895
+ if (result.success) {
1896
+ return {
1897
+ data: result.data,
1898
+ error: undefined
1899
+ };
1900
+ } else {
1901
+ return {
1902
+ error: result.error,
1903
+ data: undefined
1904
+ };
1905
+ }
1906
+ }
1907
+ var shortBlockchainAddress = function shortBlockchainAddress(address) {
1908
+ return "".concat(address.substring(0, 6), "...").concat(address.substring(address.length - 4));
1909
+ };
1910
+
1911
+ function _toPrimitive(t, r) {
1912
+ if ("object" != typeof t || !t) return t;
1913
+ var e = t[Symbol.toPrimitive];
1914
+ if (void 0 !== e) {
1915
+ var i = e.call(t, r || "default");
1916
+ if ("object" != typeof i) return i;
1917
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1918
+ }
1919
+ return ("string" === r ? String : Number)(t);
1920
+ }
1921
+
1922
+ function _toPropertyKey(t) {
1923
+ var i = _toPrimitive(t, "string");
1924
+ return "symbol" == typeof i ? i : i + "";
1925
+ }
1926
+
1927
+ function _defineProperty(obj, key, value) {
1928
+ key = _toPropertyKey(key);
1929
+ if (key in obj) {
1930
+ Object.defineProperty(obj, key, {
1931
+ value: value,
1932
+ enumerable: true,
1933
+ configurable: true,
1934
+ writable: true
1935
+ });
1936
+ } else {
1937
+ obj[key] = value;
1938
+ }
1939
+ return obj;
1940
+ }
1941
+
1942
+ var ScenarioTypes = ["ChallengeQuery", "OnChainZKP", "OffChainZKP"];
1943
+ var ScenarioType = z["enum"](ScenarioTypes);
1944
+ var ScenarioStatuses = ["UpToDate", "NoRulesAdded", "HasNotDeployment"];
1945
+ var ScenarioStatus = z["enum"](ScenarioStatuses);
1946
+ var RuleEngineResponse = z.object({
1947
+ objectType: ScenarioType,
1948
+ objectId: z.string().describe("Object id in the cms (challengeQueryid, onChainZKPid, offChainZKPid)"),
1949
+ // TODO ACTUALLY THIS MIGHT BE JUST THE CHALLENGE_QUERY ID
1950
+ name: z.string(),
1951
+ address: z.string(),
1952
+ result: z.object({
1953
+ result: z.object({
1954
+ is_valid: z["boolean"](),
1955
+ reasons: z.array(z.unknown())
1956
+ }),
1957
+ // TODO maybe start using OpaChallengeQueryResponse
1958
+ executionId: z.string().uuid()
1959
+ }),
1960
+ executionId: z.string(),
1961
+ scenarioId: z.string()
1962
+ });
1963
+ var ScenarioExecutionResponse = z.array(RuleEngineResponse);
1964
+ var RuleResultStatuses = ["valid", "not-valid", "error", "unknown"];
1965
+ var RuleResultStatus = z["enum"](RuleResultStatuses);
1966
+ var RuleResultStatusLabels = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, RuleResultStatus.Enum.valid, "Valid"), RuleResultStatus.Enum["not-valid"], "Not Valid"), RuleResultStatus.Enum.error, "Error"), RuleResultStatus.Enum.unknown, "Unknown");
1967
+
1968
+ // Request
1969
+
1970
+ var MediaType = /*#__PURE__*/function (MediaType) {
1971
+ MediaType["ZKPMessage"] = "application/iden3-zkp-json";
1972
+ MediaType["PlainMessage"] = "application/iden3comm-plain-json";
1973
+ MediaType["SignedMessage"] = "application/iden3comm-signed-json";
1974
+ return MediaType;
1975
+ }({});
1976
+ var MediaTypePID = z.nativeEnum(MediaType);
1977
+ var ZeroKnowledgeProofRequest = z.object({
1978
+ id: z.number(),
1979
+ circuitId: z.string(),
1980
+ optional: z["boolean"]().optional(),
1981
+ query: z.record(z.string(), z.any())
1982
+ });
1983
+ var AuthorizationRequestMessage = z.object({
1984
+ id: z.string(),
1985
+ typ: MediaTypePID,
1986
+ type: z.string(),
1987
+ thid: z.string().optional(),
1988
+ body: z.object({
1989
+ callbackUrl: z.string(),
1990
+ reason: z.string().optional(),
1991
+ did_doc: z.any().optional(),
1992
+ message: z.string().optional(),
1993
+ scope: z.array(ZeroKnowledgeProofRequest)
1994
+ }),
1995
+ from: z.string(),
1996
+ to: z.string().optional()
1997
+ });
1998
+ // Response
1999
+ var ProofData = z.object({
2000
+ pi_a: z.array(z.string()),
2001
+ pi_b: z.array(z.array(z.string())),
2002
+ pi_c: z.array(z.string()),
2003
+ protocol: z.string(),
2004
+ curve: z.string().optional()
2005
+ });
2006
+ var ZeroKnowledgeProofResponse = z.object({
2007
+ id: z.number(),
2008
+ circuitId: z.string(),
2009
+ vp: z.any().optional(),
2010
+ proof: ProofData,
2011
+ pub_signals: z.array(z.string())
2012
+ });
2013
+ var AuthorizationResponseMessage = z.object({
2014
+ id: z.string(),
2015
+ typ: MediaTypePID.optional(),
2016
+ type: z.string(),
2017
+ thid: z.string().optional(),
2018
+ body: z.object({
2019
+ did_doc: z.any().optional(),
2020
+ message: z.string().optional(),
2021
+ scope: z.array(ZeroKnowledgeProofResponse)
2022
+ }),
2023
+ from: z.string().optional(),
2024
+ to: z.string().optional()
2025
+ });
2026
+ // Polygon Wallet
2027
+ var CredentialQrCodeData = z.object({
2028
+ id: z.string(),
2029
+ typ: z.string(),
2030
+ type: z.string(),
2031
+ thid: z.string(),
2032
+ body: z.object({
2033
+ url: z.string(),
2034
+ credentials: z.unknown()
2035
+ }),
2036
+ from: z.string(),
2037
+ to: z.string()
2038
+ });
2039
+ var AuthQrCodeData = z.object({
2040
+ id: z.string(),
2041
+ typ: z.string(),
2042
+ type: z.string(),
2043
+ thid: z.string(),
2044
+ body: z.object({
2045
+ callbackUrl: z.string(),
2046
+ reason: z.string(),
2047
+ scope: z.unknown()
2048
+ }),
2049
+ from: z.string()
2050
+ });
2051
+ var QrCodeLinkWithSchemaType = z.object({
2052
+ qrCodeLink: z.string().nullish(),
2053
+ schemaType: z.string().nullish()
2054
+ }).describe("Polygon ID Verifiable Credential Offer, to be consumed by the Polygon ID Wallet");
2055
+ function parseIden3Message(input) {
2056
+ var prefix = "request_uri=";
2057
+ var startIndex = input.indexOf(prefix);
2058
+ if (startIndex === -1) {
2059
+ throw new Error("Wrong request - request doesn't start with request_uri=");
2060
+ }
2061
+ return z.string().url().parse(input.substring(startIndex + prefix.length));
2062
+ }
2063
+ function parseSessionIdFromUrl(urlString) {
2064
+ var url = new URL(urlString);
2065
+ var params = new URLSearchParams(url.search);
2066
+ var sessionId = params.get("sessionID");
2067
+ if (!sessionId) {
2068
+ throw new Error("No Session Id found in callback url");
2069
+ }
2070
+ return sessionId;
2071
+ }
2072
+
2073
+ function _arrayWithHoles(arr) {
2074
+ if (Array.isArray(arr)) return arr;
2075
+ }
2076
+
2077
+ function _nonIterableRest() {
2078
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2079
+ }
2080
+
2081
+ function _toArray(arr) {
2082
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
2083
+ }
2084
+
2085
+ function zodEnumFromObjKeys(obj) {
2086
+ var _ref = Object.keys(obj),
2087
+ _ref2 = _toArray(_ref),
2088
+ firstKey = _ref2[0],
2089
+ otherKeys = _ref2.slice(1);
2090
+ return z["enum"]([firstKey].concat(_toConsumableArray(otherKeys)));
2091
+ }
2092
+ var AllCredentialAttributes = z.union([zodEnumFromObjKeys(IDInformationCredentialSubjectSchema.shape), zodEnumFromObjKeys(IDImageCredentialSubjectSchema.shape), zodEnumFromObjKeys(SelfieImageCredentialSubjectSchema.shape), zodEnumFromObjKeys(ProofOfResidenceCredentialSubjectSchema.shape)]);
2093
+ var AllCredentialValues = z.union([z["boolean"](), z.string(), z.number(), z.array(z.union([z.string(), z.number()]))]);
2094
+ var Operator = z["enum"](["$noop", "$eq", "$lt", "$lte", "$gt", "$gte", "$in", "$nin", "$ne"]);
2095
+ var ZKPOperator = Operator.exclude(["$lte", "$gte"]);
2096
+ var operatorDisplayMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Operator["enum"].$eq, "="), Operator["enum"].$gt, ">"), Operator["enum"].$lt, "<"), Operator["enum"].$gte, ">="), Operator["enum"].$lte, "<="), Operator["enum"].$ne, "!="), Operator["enum"].$in, "in"), Operator["enum"].$nin, "not in"), Operator["enum"].$noop, "noop");
2097
+ var ARRAY_OPERATORS = [Operator["enum"].$in, Operator["enum"].$nin, Operator["enum"].$eq, Operator["enum"].$ne];
2098
+ var ArrayOperator = z["enum"](ARRAY_OPERATORS);
2099
+ var STRING_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$in, Operator["enum"].$nin];
2100
+ var StringOperator = z["enum"](STRING_OPERATORS);
2101
+ var NUMERIC_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$gt, Operator["enum"].$gte, Operator["enum"].$lt, Operator["enum"].$lte];
2102
+ var NumericOperator = z["enum"](NUMERIC_OPERATORS);
2103
+ var BOOLEAN_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne];
2104
+ var BooleanOperator = z["enum"](BOOLEAN_OPERATORS);
2105
+ var DATE_OPERATORS = [Operator["enum"].$eq, Operator["enum"].$ne, Operator["enum"].$gt, Operator["enum"].$gte, Operator["enum"].$lt, Operator["enum"].$lte];
2106
+ var DateOperator = z["enum"](DATE_OPERATORS);
2107
+ var SUPPORTED_TYPES = ["string", "integer", "boolean", "number", "array", "date"];
2108
+ var SupportedType = z["enum"](SUPPORTED_TYPES);
2109
+ var SupportedTypes = z.object(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_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));
2110
+ var IDInformation = z.object({
2111
+ type: z.literal("IDInformation"),
2112
+ requestId: z.coerce.number().nullish(),
2113
+ attribute: z.union([z.string(), zodEnumFromObjKeys(IDInformationCredentialSubjectSchema.shape)]),
2114
+ value: AllCredentialValues,
2115
+ // TODO play with discriminatedUnion to make it dynamic based on selected attribute (e.g. if attribute age is type number in the schema, then value her shuld be number etc..)
2116
+ operator: Operator
2117
+ });
2118
+ var IDImage = z.object({
2119
+ type: z.literal("IDImage"),
2120
+ requestId: z.coerce.number().nullish(),
2121
+ attribute: z.union([z.string(), zodEnumFromObjKeys(IDImageCredentialSubjectSchema.shape)]),
2122
+ value: AllCredentialValues,
2123
+ // TODO play with discriminatedUnion to make it dynamic based on selected attribute (e.g. if attribute age is type number in the schema, then value her shuld be number etc..)
2124
+ operator: Operator
2125
+ });
2126
+ var SelfieImage = z.object({
2127
+ type: z.literal("SelfieImage"),
2128
+ requestId: z.coerce.number().nullish(),
2129
+ attribute: z.union([z.string(), zodEnumFromObjKeys(SelfieImageCredentialSubjectSchema.shape)]),
2130
+ value: AllCredentialValues,
2131
+ // TODO play with discriminatedUnion to make it dynamic based on selected attribute (e.g. if attribute age is type number in the schema, then value her shuld be number etc..)
2132
+ operator: Operator
2133
+ });
2134
+ var ProofOfResidence = z.object({
2135
+ type: z.literal("ProofOfResidence"),
2136
+ requestId: z.coerce.number().nullish(),
2137
+ attribute: z.union([z.string(), zodEnumFromObjKeys(ProofOfResidenceCredentialSubjectSchema.shape)]),
2138
+ value: AllCredentialValues,
2139
+ // TODO play with discriminatedUnion to make it dynamic based on selected attribute (e.g. if attribute age is type number in the schema, then value her shuld be number etc..)
2140
+ operator: Operator
2141
+ });
2142
+ var QueryConfig = z.discriminatedUnion("type", [IDInformation, IDImage, SelfieImage, ProofOfResidence]);
2143
+ var QueryConfigSimplified = z.object({
2144
+ type: z["enum"](["IDInformation", "SelfieImage", "IDImage", "ProofOfResidence", "AMLScreeningsResults",
2145
+ // backwards compatibility
2146
+
2147
+ "ID3",
2148
+ // this is for backwards compatibility
2149
+ "IDScan",
2150
+ // this is for backwards compatibility
2151
+ "IDScanSelfie",
2152
+ // this is for backwards compatibility
2153
+ "IDScanPassport" // this is for backwards compatibility
2154
+ ]),
2155
+ requestId: z.coerce.number().nullish().describe("Request ID for ZKPs"),
2156
+ attribute: z.string(),
2157
+ value: AllCredentialValues,
2158
+ // TODO play with discriminatedUnion to make it dynamic based on selected attribute (e.g. if attribute age is type number in the schema, then value her shuld be number etc..)
2159
+ operator: Operator
2160
+ });
2161
+ var PartialQueryConfigSimplified = QueryConfigSimplified.partial();
2162
+ var transformQuery = function transformQuery(request) {
2163
+ var schema = CredentialSchemas[request.type];
2164
+ var transformedValue = request.value;
2165
+ var shape = schema.shape[request.attribute];
2166
+ if (shape instanceof ZodOptional) {
2167
+ var wrapped = shape.unwrap();
2168
+ if (wrapped instanceof ZodNumber) {
2169
+ transformedValue = z.coerce.number().parse(request.value);
2170
+ }
2171
+ }
2172
+ return {
2173
+ requestId: request.requestId,
2174
+ type: request.type,
2175
+ attribute: request.attribute,
2176
+ operator: request.operator,
2177
+ value: transformedValue
2178
+ };
2179
+
2180
+ // // Dynamically construct the output object
2181
+ // // in rare cases not doing so can cause mismatch between scenario schema and scenario type
2182
+ // const output: PartialQueryConfigSimplified = {
2183
+ // type: request.type,
2184
+ // attribute: request.attribute,
2185
+ // operator: request.operator,
2186
+ // value: transformedValue,
2187
+ // };
2188
+
2189
+ // if (request.requestId !== undefined) {
2190
+ // output.requestId = request.requestId;
2191
+ // }
2192
+ // return output;
2193
+ };
2194
+ // this is used to parse updateQuery response
2195
+ // value won't be parsed if type is not there, which is fine for now
2196
+ // because we don't use value from update response
2197
+ var transformPartialQuery = function transformPartialQuery(request) {
2198
+ if (!request.type || !request.value) {
2199
+ return request;
2200
+ }
2201
+ var schema = CredentialSchemas[request.type];
2202
+ var transformedValue = request.value;
2203
+ var shape = schema.shape[request.attribute];
2204
+ if (shape instanceof ZodOptional) {
2205
+ var wrapped = shape.unwrap();
2206
+ if (wrapped instanceof ZodNumber) {
2207
+ transformedValue = z.coerce.number().parse(request.value);
2208
+ }
2209
+ }
2210
+ // maybe we should use the same logic as in transformQuery
2211
+ // not seeing any issues yet...
2212
+ return {
2213
+ requestId: request.requestId,
2214
+ type: request.type,
2215
+ attribute: request.attribute,
2216
+ operator: request.operator,
2217
+ value: transformedValue
2218
+ };
2219
+ };
2220
+ var QueryConfigSimplifiedParsed = QueryConfigSimplified.transform(transformQuery);
2221
+ var QueryConfiguration = z.object({
2222
+ id: z.string(),
2223
+ query: QueryConfigSimplifiedParsed
2224
+ });
2225
+ var NonParsedQueryConfiguration = z.object({
2226
+ id: z.string(),
2227
+ query: QueryConfigSimplified
2228
+ });
2229
+ var CreateQueryConfigurationInput = z.object({
2230
+ query: QueryConfigSimplified,
2231
+ scenarioId: z.string()
2232
+ });
2233
+ // Response should be parsed to get right value type
2234
+ var CreateQueryConfigurationResponse = z.object({
2235
+ queryConfiguration: QueryConfigSimplifiedParsed
2236
+ });
2237
+ var UpdateQueryConfigurationInput = z.object({
2238
+ queryConfigurationId: z.string(),
2239
+ scenarioId: z.string(),
2240
+ query: PartialQueryConfigSimplified
2241
+ });
2242
+ // Response should be parsed to get right value type
2243
+ var UpdateQueryConfigurationResponse = z.object({
2244
+ queryConfiguration: PartialQueryConfigSimplified.transform(transformPartialQuery)
2245
+ });
2246
+ var DeleteQueryConfigurationInput = z.object({
2247
+ queryConfigurationId: z.string(),
2248
+ scenarioId: z.string()
2249
+ });
2250
+ var DeleteQueryConfigurationResponse = z.object({
2251
+ queryConfigurationId: z.string()
2252
+ });
2253
+ var QueryCredentialTypes = ["IDInformation", "IDImage", "SelfieImage", "ProofOfResidence"];
2254
+ var QueryCredentialType = z["enum"](QueryCredentialTypes);
2255
+
2256
+ var ScenarioAuthorizationData = z.object({
2257
+ executionId: UuidString,
2258
+ sessionId: UuidString,
2259
+ projectId: z.string(),
2260
+ address: BlockchainAddress,
2261
+ status: z["enum"](["pending", "authorised", "unauthorised"]),
2262
+ scenarioId: z.string(),
2263
+ scenarioName: z.string(),
2264
+ requestMessage: AuthorizationRequestMessage,
2265
+ responseMessage: AuthorizationResponseMessage.nullish(),
2266
+ verificationError: z.string().nullish(),
2267
+ query: QueryConfigSimplified
2268
+ });
2269
+ var SdkVerificationResponseSchema = z.object({
2270
+ customerId: z.string(),
2271
+ scenarioExecutionId: z.string(),
2272
+ status: RuleResultStatus,
2273
+ results: z.array(ScenarioExecutionResponse)
2274
+ });
2275
+ var CloseScreenNotification = z.object({
2276
+ type: z.literal("closeScreen"),
2277
+ identifier: z.string(),
2278
+ data: z.undefined()
2279
+ });
2280
+ var KycCompletionData = z.array(VerifiableCredential);
2281
+ var KycCompletionNotification = z.object({
2282
+ type: z.literal("kycCompletion"),
2283
+ identifier: z.string(),
2284
+ data: KycCompletionData
2285
+ });
2286
+ var RuleEngineScenarioExecutionData = z.object({
2287
+ type: z.literal("RuleEngineScenarioExecution"),
2288
+ data: SdkVerificationResponseSchema
2289
+ });
2290
+ var OffChainScenarioExecutionData = z.object({
2291
+ type: z.literal("OffChainScenarioExecution"),
2292
+ data: z.array(ScenarioAuthorizationData)
2293
+ });
2294
+ var OnChainScenarioExecutionData = z.object({
2295
+ type: z.literal("OnChainScenarioExecution"),
2296
+ data: z.any()
2297
+ });
2298
+ var ScenarioExecutionData = z.union([RuleEngineScenarioExecutionData, OffChainScenarioExecutionData, OnChainScenarioExecutionData]);
2299
+ var ScenarioExecutionNotification = z.object({
2300
+ type: z.literal("scenarioExecution"),
2301
+ identifier: z.string(),
2302
+ data: ScenarioExecutionData
2303
+ });
2304
+ var IsVerifiedNotification = z.object({
2305
+ type: z.literal("isVerifiedNotification"),
2306
+ identifier: z.string(),
2307
+ isVerified: z["boolean"]()
2308
+ });
2309
+ var PolygonIdInitialized = z.object({
2310
+ type: z.literal("polygonIdInitialized"),
2311
+ identifier: z.string(),
2312
+ data: z.string()
2313
+ });
2314
+ var OcvSdkInitialized = z.object({
2315
+ type: z.literal("ocvSdkInitialized"),
2316
+ identifier: z.string()
2317
+ });
2318
+ var StartCompletedNotification = z.object({
2319
+ type: z.literal("startCompletedNotification"),
2320
+ identifier: z.string()
2321
+ });
2322
+ var IdentityNotificationMessage = z.union([CloseScreenNotification, PolygonIdInitialized, OcvSdkInitialized, StartCompletedNotification, KycCompletionNotification, ScenarioExecutionNotification, IsVerifiedNotification]);
2323
+ var InitialDataRequest = z.object({
2324
+ type: z.literal("initialDataRequest"),
2325
+ identifier: z.string()
2326
+ });
2327
+ var SignatureRequest = z.object({
2328
+ type: z.literal("signatureRequest"),
2329
+ identifier: z.string(),
2330
+ data: z.object({
2331
+ message: z.string()
2332
+ })
2333
+ });
2334
+ var TransactionData = z.object({
2335
+ accountAddress: AddressSchema,
2336
+ to: AddressSchema,
2337
+ data: PrivateKey,
2338
+ value: z.string().optional()
2339
+ });
2340
+ var SendTransactionRequest = z.object({
2341
+ type: z.literal("sendTransactionRequest"),
2342
+ identifier: z.string(),
2343
+ data: TransactionData
2344
+ });
2345
+ var IdentityRequestMessage = z.union([InitialDataRequest, SignatureRequest, SendTransactionRequest]);
2346
+ var AVAILABLE_FLOWS = ["VERIFICATION", "MANAGEMENT", "POLYGON_ID", "KYB"];
2347
+ var AvailableFlow = z["enum"](AVAILABLE_FLOWS);
2348
+ var DataAvailableOnStart = z.object({
2349
+ identifier: z.string().optional(),
2350
+ flow: z["enum"](AVAILABLE_FLOWS).optional(),
2351
+ accessToken: z.string(),
2352
+ signingMessage: z.string(),
2353
+ signature: z.string()
2354
+ });
2355
+ var InitialDataResponse = z.object({
2356
+ type: z.literal("onStartKyc"),
2357
+ data: DataAvailableOnStart
2358
+ });
2359
+ var SignatureResponse = z.object({
2360
+ type: z.literal("signature"),
2361
+ data: BlockchainSignature
2362
+ });
2363
+ var TransactionResponse = z.object({
2364
+ type: z.literal("transactionResponse"),
2365
+ data: z.object({
2366
+ txHash: TxHash
2367
+ })
2368
+ });
2369
+ var HostResponseMessage = z.union([InitialDataResponse, SignatureResponse, TransactionResponse]);
2370
+
2371
+ /**
2372
+ * Exported types
2373
+ */
2374
+
2375
+ // these are attributes are marked optional to be better presented by openapi.
2376
+ // this is hopefully fixed in the refined version of the schema
2377
+ var ChallengeQueryOperators = z.object({
2378
+ GREATER_THAN: z.optional(z.number()),
2379
+ LESS_THAN: z.optional(z.number()),
2380
+ EQUAL_TO: z.optional(z.union([z.string(), z.number(), z.array(z.never()), z.array(z.number()), z.array(z.string())])),
2381
+ NOT_EQUAL_TO: z.optional(z.union([z.string(), z.number(), z.array(z.never()), z.array(z.number()), z.array(z.string())])),
2382
+ LESS_THAN_OR_EQUAL_TO: z.optional(z.number()),
2383
+ GREATER_THAN_OR_EQUAL_TO: z.optional(z.number()),
2384
+ IN: z.optional(z.union([z.string(), z.array(z.number()), z.array(z.string())])),
2385
+ NOT_IN: z.optional(z.union([z.string(), z.array(z.number()), z.array(z.string())]))
2386
+ }).refine(function (data) {
2387
+ // make sure tht if an operator is defined, the value is also defined
2388
+ for (var operator in data) {
2389
+ var value = data[operator];
2390
+ if (value === undefined) {
2391
+ return false;
2392
+ }
2393
+ }
2394
+ // make sure that only one operator is defined at a time
2395
+ var operators = Object.keys(data);
2396
+ if (operators.length > 1) {
2397
+ return false;
2398
+ }
2399
+ return true;
2400
+ });
2401
+ var ChallengeQueryOperator = z["enum"](["GREATER_THAN", "LESS_THAN", "EQUAL_TO", "NOT_EQUAL_TO", "LESS_THAN_OR_EQUAL_TO", "GREATER_THAN_OR_EQUAL_TO", "IN", "NOT_IN"]);
2402
+ var OperatorToChallengeQueryOperator = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Operator["enum"].$noop, ChallengeQueryOperator["enum"].EQUAL_TO), Operator["enum"].$eq, ChallengeQueryOperator["enum"].EQUAL_TO), Operator["enum"].$lt, ChallengeQueryOperator["enum"].LESS_THAN), Operator["enum"].$lte, ChallengeQueryOperator["enum"].LESS_THAN_OR_EQUAL_TO), Operator["enum"].$gt, ChallengeQueryOperator["enum"].GREATER_THAN), Operator["enum"].$gte, ChallengeQueryOperator["enum"].GREATER_THAN_OR_EQUAL_TO), Operator["enum"].$in, ChallengeQueryOperator["enum"].IN), Operator["enum"].$nin, ChallengeQueryOperator["enum"].NOT_IN), Operator["enum"].$ne, ChallengeQueryOperator["enum"].NOT_EQUAL_TO);
2403
+ var ChallengeQueryOperatorToOperator = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ChallengeQueryOperator["enum"].EQUAL_TO, Operator["enum"].$eq), ChallengeQueryOperator["enum"].LESS_THAN, Operator["enum"].$lt), ChallengeQueryOperator["enum"].LESS_THAN_OR_EQUAL_TO, Operator["enum"].$lte), ChallengeQueryOperator["enum"].GREATER_THAN, Operator["enum"].$gt), ChallengeQueryOperator["enum"].GREATER_THAN_OR_EQUAL_TO, Operator["enum"].$gte), ChallengeQueryOperator["enum"].IN, Operator["enum"].$in), ChallengeQueryOperator["enum"].NOT_IN, Operator["enum"].$nin), ChallengeQueryOperator["enum"].NOT_EQUAL_TO, Operator["enum"].$ne);
2404
+ var ChallengeQuerySchema = z.object({
2405
+ id: z.string().optional(),
2406
+ query: QueryConfig
2407
+ });
2408
+ var ExecuteChallengeQueryInput = z.object({
2409
+ address: BlockchainAddress,
2410
+ credentials: z.array(GenericVerifiableCredentialSchema).min(1),
2411
+ challengeQuery: QueryConfig
2412
+ });
2413
+ var ExecuteChallengeQueryConfig = z.object({
2414
+ input: ExecuteChallengeQueryInput,
2415
+ executionId: z.string(),
2416
+ cmsObjectId: z.string(),
2417
+ cmsScenarioId: z.string().optional()
2418
+ });
2419
+ var OpaChallengeQueryResponse = z.object({
2420
+ result: z.object({
2421
+ is_valid: z["boolean"](),
2422
+ reasons: z.array(z.string())
2423
+ })
2424
+ });
2425
+ var ExecuteChallengeQueryResponse = OpaChallengeQueryResponse.extend({
2426
+ executionId: z.string()
2427
+ });
2428
+ var OPAChallengeQuery = z.record(ChallengeQueryOperators).refine(function (data) {
2429
+ // we are not validating the dotPath, only the operators
2430
+ for (var dotPath in data) {
2431
+ var operatorsData = data[dotPath];
2432
+ if (operatorsData === undefined) {
2433
+ return false;
2434
+ }
2435
+ // if the operator is not a valid operator, operatorsData will be {}
2436
+ var operators = Object.keys(operatorsData);
2437
+ if (operators.length === 0) {
2438
+ return false;
2439
+ }
2440
+ }
2441
+ return true;
2442
+ }, {
2443
+ message: "Invalid operator found."
2444
+ });
2445
+ var OnChainRuleResult = z.object({
2446
+ result: z.object({
2447
+ is_valid: z["boolean"](),
2448
+ txHash: TxHash,
2449
+ scenarioVerifierAddress: AddressSchema,
2450
+ reasons: z.array(z.string())
2451
+ })
2452
+ });
2453
+ var OffChainZKPRuleResult = z.object({
2454
+ result: z.object({
2455
+ is_valid: z["boolean"](),
2456
+ query: QueryConfigSimplified,
2457
+ reasons: z.array(z.string())
2458
+ })
2459
+ });
2460
+ var SdkVerificationOutput = z.object({
2461
+ customerId: z.string(),
2462
+ scenarioExecutionId: z.string(),
2463
+ status: RuleResultStatus,
2464
+ results: z.array(ScenarioExecutionResponse)
2465
+ });
2466
+
2467
+ var ComplianceImplementationStepsInput = z.object({
2468
+ identityChecks: z["boolean"]().nullish(),
2469
+ configureIdentity: z["boolean"]().nullish(),
2470
+ deployIdentity: z["boolean"]().nullish(),
2471
+ monitorIdentity: z["boolean"]().nullish()
2472
+ });
2473
+
2474
+ var _EVM_BLOCK_TIME, _NEXERA_EVM_CHAIN_NAM, _NEXERA_CHAIN_VALUES;
2475
+ var NEXERA_EVM_CHAINS = /*#__PURE__*/function (NEXERA_EVM_CHAINS) {
2476
+ NEXERA_EVM_CHAINS["ETHEREUM"] = "1";
2477
+ NEXERA_EVM_CHAINS["GOERLI"] = "5";
2478
+ NEXERA_EVM_CHAINS["ARBITRUM"] = "42161";
2479
+ NEXERA_EVM_CHAINS["ARBITRUM_GOERLI"] = "421613";
2480
+ NEXERA_EVM_CHAINS["ARBITRUM_SEPOLIA"] = "421614";
2481
+ NEXERA_EVM_CHAINS["OPTIMISM"] = "10";
2482
+ NEXERA_EVM_CHAINS["OPTIMISM_GOERLI"] = "420";
2483
+ NEXERA_EVM_CHAINS["OPTIMISM_SEPOLIA"] = "11155420";
2484
+ NEXERA_EVM_CHAINS["AVALANCHE"] = "43114";
2485
+ NEXERA_EVM_CHAINS["AVALANCHE_FUJI"] = "43113";
2486
+ NEXERA_EVM_CHAINS["POLYGON"] = "137";
2487
+ NEXERA_EVM_CHAINS["POLYGON_AMOY"] = "80002";
2488
+ NEXERA_EVM_CHAINS["SEPOLIA"] = "11155111";
2489
+ NEXERA_EVM_CHAINS["BASE"] = "8453";
2490
+ NEXERA_EVM_CHAINS["BASE_GOERLI"] = "84531";
2491
+ NEXERA_EVM_CHAINS["BASE_SEPOLIA"] = "84532";
2492
+ NEXERA_EVM_CHAINS["MOONBEAM"] = "1284";
2493
+ NEXERA_EVM_CHAINS["MOONRIVER"] = "1285";
2494
+ NEXERA_EVM_CHAINS["BNB"] = "56";
2495
+ NEXERA_EVM_CHAINS["BNB_TESTNET"] = "97";
2496
+ return NEXERA_EVM_CHAINS;
2497
+ }({});
2498
+ var EVM_BLOCK_TIME = (_EVM_BLOCK_TIME = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_EVM_BLOCK_TIME, NEXERA_EVM_CHAINS.ETHEREUM, 12), NEXERA_EVM_CHAINS.GOERLI, 12), NEXERA_EVM_CHAINS.SEPOLIA, 12), NEXERA_EVM_CHAINS.ARBITRUM, 0.26), NEXERA_EVM_CHAINS.ARBITRUM_GOERLI, 0.26), NEXERA_EVM_CHAINS.ARBITRUM_SEPOLIA, 0.26), NEXERA_EVM_CHAINS.OPTIMISM, 2), NEXERA_EVM_CHAINS.OPTIMISM_GOERLI, 2), NEXERA_EVM_CHAINS.OPTIMISM_SEPOLIA, 2), NEXERA_EVM_CHAINS.AVALANCHE, 3), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_EVM_BLOCK_TIME, NEXERA_EVM_CHAINS.AVALANCHE_FUJI, 3), NEXERA_EVM_CHAINS.POLYGON, 2), NEXERA_EVM_CHAINS.POLYGON_AMOY, 2), NEXERA_EVM_CHAINS.BASE, 2), NEXERA_EVM_CHAINS.BASE_GOERLI, 2), NEXERA_EVM_CHAINS.BASE_SEPOLIA, 2), NEXERA_EVM_CHAINS.BNB, 3), NEXERA_EVM_CHAINS.BNB_TESTNET, 3), NEXERA_EVM_CHAINS.MOONBEAM, 12), NEXERA_EVM_CHAINS.MOONRIVER, 12));
2499
+ var NEXERA_TEZOS_CHAINS = /*#__PURE__*/function (NEXERA_TEZOS_CHAINS) {
2500
+ NEXERA_TEZOS_CHAINS["TEZOS"] = "NetXdQprcVkpaWU";
2501
+ NEXERA_TEZOS_CHAINS["TEZOS_GHOSTNET"] = "NetXnHfVqm9iesp";
2502
+ return NEXERA_TEZOS_CHAINS;
2503
+ }({});
2504
+ var NEXERA_EVM_CHAIN_NAMES = (_NEXERA_EVM_CHAIN_NAM = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_NEXERA_EVM_CHAIN_NAM, NEXERA_EVM_CHAINS.ETHEREUM, "Ethereum Mainnet"), NEXERA_EVM_CHAINS.GOERLI, "Goerli"), NEXERA_EVM_CHAINS.SEPOLIA, "Sepolia"), NEXERA_EVM_CHAINS.POLYGON, "Polygon"), NEXERA_EVM_CHAINS.POLYGON_AMOY, "Polygon Amoy"), NEXERA_EVM_CHAINS.AVALANCHE, "Avalanche"), NEXERA_EVM_CHAINS.AVALANCHE_FUJI, "Avalanche Fuji"), NEXERA_EVM_CHAINS.ARBITRUM, "Arbitrum"), NEXERA_EVM_CHAINS.ARBITRUM_SEPOLIA, "Arbitrum Sepolia"), NEXERA_EVM_CHAINS.BASE, "Base"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_NEXERA_EVM_CHAIN_NAM, NEXERA_EVM_CHAINS.BASE_SEPOLIA, "Base Sepolia"), NEXERA_EVM_CHAINS.BNB, "BSC"), NEXERA_EVM_CHAINS.BNB_TESTNET, "BSC Testnet"), NEXERA_EVM_CHAINS.OPTIMISM, "Optimism"), NEXERA_EVM_CHAINS.OPTIMISM_SEPOLIA, "Optimism Sepolia"), NEXERA_EVM_CHAINS.MOONBEAM, "Moonbeam"), NEXERA_EVM_CHAINS.MOONRIVER, "Moonriver"), NEXERA_TEZOS_CHAINS.TEZOS, "tezos-mainnet"), NEXERA_TEZOS_CHAINS.TEZOS_GHOSTNET, "tezos-ghostnet"));
2505
+ var NEXERA_EVM_CHAIN_NAMES_LIST = Object.values(NEXERA_EVM_CHAIN_NAMES);
2506
+ var NEXERA_CHAIN_VALUES = (_NEXERA_CHAIN_VALUES = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_NEXERA_CHAIN_VALUES, NEXERA_EVM_CHAINS.ETHEREUM, 1), NEXERA_EVM_CHAINS.GOERLI, 5), NEXERA_EVM_CHAINS.POLYGON, 137), NEXERA_EVM_CHAINS.POLYGON_AMOY, 80002), NEXERA_EVM_CHAINS.AVALANCHE, 43114), NEXERA_EVM_CHAINS.AVALANCHE_FUJI, 43113), NEXERA_EVM_CHAINS.ARBITRUM, 42161), NEXERA_EVM_CHAINS.ARBITRUM_GOERLI, 421613), NEXERA_EVM_CHAINS.ARBITRUM_SEPOLIA, 421614), NEXERA_EVM_CHAINS.SEPOLIA, 11155111), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_NEXERA_CHAIN_VALUES, NEXERA_EVM_CHAINS.BASE, 8453), NEXERA_EVM_CHAINS.BASE_GOERLI, 84531), NEXERA_EVM_CHAINS.BASE_SEPOLIA, 84532), NEXERA_EVM_CHAINS.MOONBEAM, 1284), NEXERA_EVM_CHAINS.MOONRIVER, 1285), NEXERA_EVM_CHAINS.OPTIMISM, 10), NEXERA_EVM_CHAINS.OPTIMISM_GOERLI, 69), NEXERA_TEZOS_CHAINS.TEZOS, "NetXdQprcVkpaWU"), NEXERA_TEZOS_CHAINS.TEZOS_GHOSTNET, "NetXnHfVqm9iesp"));
2507
+ var CHAINS_WITHOUT_DEDICATED_NODE_RPC = [NEXERA_EVM_CHAINS.MOONBEAM, NEXERA_EVM_CHAINS.MOONRIVER, NEXERA_EVM_CHAINS.AVALANCHE_FUJI, NEXERA_EVM_CHAINS.BASE_SEPOLIA, NEXERA_EVM_CHAINS.BNB_TESTNET, NEXERA_EVM_CHAINS.OPTIMISM_SEPOLIA, NEXERA_EVM_CHAINS.ARBITRUM_SEPOLIA, NEXERA_EVM_CHAINS.BASE_SEPOLIA, NEXERA_EVM_CHAINS.BASE_SEPOLIA];
2508
+ var ACTIVE_EVM_CHAIN_VALUES = [NEXERA_EVM_CHAINS.ETHEREUM, NEXERA_EVM_CHAINS.POLYGON, NEXERA_EVM_CHAINS.POLYGON_AMOY, NEXERA_EVM_CHAINS.AVALANCHE, NEXERA_EVM_CHAINS.AVALANCHE_FUJI, NEXERA_EVM_CHAINS.ARBITRUM, NEXERA_EVM_CHAINS.ARBITRUM_SEPOLIA, NEXERA_EVM_CHAINS.SEPOLIA, NEXERA_EVM_CHAINS.BASE, NEXERA_EVM_CHAINS.BASE_SEPOLIA, NEXERA_EVM_CHAINS.BNB,
2509
+ // for Bsc
2510
+ NEXERA_EVM_CHAINS.BNB_TESTNET, NEXERA_EVM_CHAINS.MOONBEAM, NEXERA_EVM_CHAINS.MOONRIVER, NEXERA_EVM_CHAINS.OPTIMISM, NEXERA_EVM_CHAINS.OPTIMISM_SEPOLIA];
2511
+ var EvmChainId = z.preprocess(function (val) {
2512
+ return String(val);
2513
+ }, z["enum"](ACTIVE_EVM_CHAIN_VALUES).describe("a numeric value that identifies the chain of the address. There are many sites that retrieve information on chainIDs such as <a href='https://chainlist.org/'>https://chainlist.org</a>."));
2514
+ var POLYGON_NETWORK_NAMES = ["main", "amoy"];
2515
+ var PolygonNetworkNames = z["enum"](POLYGON_NETWORK_NAMES);
2516
+ /////////////////////////////////////////
2517
+ // TEZOS //
2518
+ /////////////////////////////////////////
2519
+
2520
+ var NEXERA_TEZOS_CHAIN_NAMES = _defineProperty(_defineProperty({}, NEXERA_TEZOS_CHAINS.TEZOS, "Tezos Mainnet"), NEXERA_TEZOS_CHAINS.TEZOS_GHOSTNET, "Tezos Ghostnet");
2521
+ var NEXERA_TEZOS_CHAIN_NAMES_LIST = Object.values(NEXERA_TEZOS_CHAIN_NAMES);
2522
+ var NEXERA_TEZOS_CHAIN_VALUES = _defineProperty(_defineProperty({}, NEXERA_TEZOS_CHAINS.TEZOS, "NetXdQprcVkpaWU"), NEXERA_TEZOS_CHAINS.TEZOS_GHOSTNET, "NetXnHfVqm9iesp");
2523
+ var ACTIVE_TEZOS_CHAIN_VALUES = [NEXERA_TEZOS_CHAINS.TEZOS, NEXERA_TEZOS_CHAINS.TEZOS_GHOSTNET];
2524
+ var TezosChainId = z.preprocess(function (val) {
2525
+ return String(val);
2526
+ }, z["enum"](ACTIVE_TEZOS_CHAIN_VALUES).describe("a numeric value that identifies the chain of the address. There are many sites that retrieve information on chainIDs such as <a href='https://chainlist.org/'>https://chainlist.org</a>."));
2527
+ var BlockchainId = z.union([EvmChainId, TezosChainId]);
2528
+
2529
+ var TxAuthInput = z.object({
2530
+ chainId: EvmChainId,
2531
+ contractAbi: z.array(z.record(z.unknown())),
2532
+ contractAddress: AddressSchema,
2533
+ functionName: z.string(),
2534
+ args: z.array(z.unknown()),
2535
+ userAddress: AddressSchema,
2536
+ blockExpiration: z.number()["int"]().optional(),
2537
+ nonce: z.number()["int"]().optional()
2538
+ });
2539
+ var TxSignatureResponse = z.object({
2540
+ signature: EIP155Signature,
2541
+ blockExpiration: z.number()
2542
+ });
2543
+ var GetTxAuthDataSignatureResponse = z.object({
2544
+ payload: z.string().optional().describe("Concatenated signature and block expiration, without 0x prefix"),
2545
+ signature: EIP155Signature.optional(),
2546
+ blockExpiration: z.number().optional(),
2547
+ isAuthorized: z["boolean"](),
2548
+ errorMessage: z.any().optional()
2549
+ });
2550
+
2551
+ var SimplifiedCredential = z.object({
2552
+ id: z.string(),
2553
+ type: z.array(z.string()),
2554
+ issuanceDate: z.string(),
2555
+ journeyId: z.string()
2556
+ });
2557
+ /**
2558
+ * GetCredentialsRequest
2559
+ */
2560
+ var GetCredentialsRequest = z.object({
2561
+ type: z.literal("getCredentials"),
2562
+ data: z.undefined()
2563
+ });
2564
+ /**
2565
+ * GetCredentialsResponse
2566
+ */
2567
+ var GetCredentialsResponse = z.object({
2568
+ type: z.literal("polygonIdCredentials"),
2569
+ credentials: z.array(SimplifiedCredential),
2570
+ identifier: z.string()
2571
+ });
2572
+ /**
2573
+ * PolygonIdRequest
2574
+ */
2575
+ var PolygonIdRequestData = z.union([z.object({
2576
+ type: z.literal("auth"),
2577
+ authRequest: AuthorizationRequestMessage
2578
+ }), z.object({
2579
+ type: z.literal("credentialOffer"),
2580
+ credentialOfferRequest: QrCodeLinkWithSchemaType
2581
+ }), z.object({
2582
+ type: z.literal("zkp"),
2583
+ zkpRequest: ZeroKnowledgeProofRequest
2584
+ })]);
2585
+ var PolygonIdRequest = z.object({
2586
+ type: z.literal("polygonIdRequest"),
2587
+ data: PolygonIdRequestData
2588
+ });
2589
+ /**
2590
+ * PolygonIdResponse
2591
+ */
2592
+ var PolygonIdResponseData = z.union([z.object({
2593
+ type: z.literal("auth"),
2594
+ authResponse: AuthorizationResponseMessage
2595
+ }), z.object({
2596
+ type: z.literal("credentialOffer"),
2597
+ credentialOfferResponse: z.array(GenericVerifiableCredentialSchema)
2598
+ }), z.object({
2599
+ type: z.literal("zkp"),
2600
+ zkpResponse: ZeroKnowledgeProofResponse
2601
+ }), z.object({
2602
+ type: z.literal("close"),
2603
+ screen: z["enum"](["auth", "credentialOffer", "zkp", "getCredentials"]),
2604
+ closeResponse: z.string()
2605
+ })]);
2606
+ var PolygonIdResponse = z.object({
2607
+ type: z.literal("polygonIdResponse"),
2608
+ identifier: z.string(),
2609
+ data: PolygonIdResponseData
2610
+ });
2611
+ /**
2612
+ * StartFlowRequest
2613
+ */
2614
+ var StartFlowRequest = z.union([z.object({
2615
+ type: z.literal("startVerification"),
2616
+ data: z.undefined()
2617
+ }), z.object({
2618
+ type: z.literal("startManagement"),
2619
+ data: z.undefined()
2620
+ }), z.object({
2621
+ type: z.literal("startKYB"),
2622
+ data: z.undefined()
2623
+ })]);
2624
+ /**
2625
+ * IsVerifiedRequest
2626
+ */
2627
+ var IsVerifiedRequest = z.object({
2628
+ type: z.literal("isVerifiedRequest"),
2629
+ data: z.object({
2630
+ userAddress: AddressSchema
2631
+ }),
2632
+ identifier: z.string()
2633
+ });
2634
+ /**
2635
+ * IsVerifiedResponse
2636
+ */
2637
+ var IsVerifiedResponse = z.object({
2638
+ type: z.literal("isVerifiedResponse"),
2639
+ isVerified: z["boolean"](),
2640
+ identifier: z.string()
2641
+ });
2642
+ /**
2643
+ * GetTxAuthSigRequest
2644
+ */
2645
+ var GetTxAuthSigRequest = z.object({
2646
+ type: z.literal("getTxAuthSigRequest"),
2647
+ data: TxAuthInput.omit({
2648
+ userAddress: true
2649
+ }),
2650
+ identifier: z.string()
2651
+ });
2652
+ /**
2653
+ * GetTxAuthSigResponse
2654
+ */
2655
+ var GetTxAuthSigResponse = z.object({
2656
+ type: z.literal("getTxAuthSigResponse"),
2657
+ signatureResponse: GetTxAuthDataSignatureResponse,
2658
+ identifier: z.string()
2659
+ });
2660
+ var HostRequestMessage = z.union([GetCredentialsRequest, PolygonIdRequest, StartFlowRequest, IsVerifiedRequest, GetTxAuthSigRequest]);
2661
+ var IdentityResponseMessage = z.union([GetCredentialsResponse, PolygonIdResponse, IsVerifiedResponse, GetTxAuthSigResponse]);
2662
+
2663
+ var ZKPRequest = z.object({
2664
+ id: z.number(),
2665
+ circuitId: z["enum"](["credentialAtomicQuerySigV2", "credentialAtomicQuerySigV2OnChain"]),
2666
+ optional: z["boolean"]().optional(),
2667
+ query: QueryConfigSimplified
2668
+ });
2669
+ var ZKPRequestFromZKVerifier = z.object({
2670
+ id: z.number(),
2671
+ circuitId: z.string(),
2672
+ optional: z["boolean"]().optional(),
2673
+ query: z.record(z.unknown())
2674
+ });
2675
+ var OffChainZKP = z.object({
2676
+ requestingAuthorizationMessage: z.string().nullish(),
2677
+ zkpRequest: z.array(ZKPRequest).nullish()
2678
+ });
2679
+ var CreateAuthRequestProps = z.object({
2680
+ hostUrl: z.string().url(),
2681
+ sessionId: UuidString,
2682
+ audience: z.string().describe("DID of the verifier"),
2683
+ callbackURL: z.string().describe("URL to which the auth response of the client callback will be sent"),
2684
+ query: z.array(QueryConfigSimplified),
2685
+ onChainVerification: z["boolean"]().optional(),
2686
+ id: z.string().uuid(),
2687
+ thid: z.string().uuid(),
2688
+ message: z.string().describe("Message shown to the user")
2689
+ });
2690
+ var CreateZKProofRequestProps = z.object({
2691
+ requestId: z.number(),
2692
+ query: QueryConfigSimplified,
2693
+ onChainVerification: z["boolean"]().optional()
2694
+ });
2695
+ var AllScenarioExecutionAuthorizationData = z.object({
2696
+ executionId: UuidString,
2697
+ projectId: z.string(),
2698
+ scenarioExecutionIds: z.array(UuidString)
2699
+ });
2700
+ var ProjectAuthorizationData = z.object({
2701
+ sessionId: z.string(),
2702
+ projectId: z.string(),
2703
+ address: z.string(),
2704
+ authorizations: z.map(z.string(), ScenarioAuthorizationData)
2705
+ });
2706
+ var OnChainZKP = z.object({
2707
+ scenarioVerifierAddress: AddressSchema,
2708
+ zkpRequests: z.array(ZKPRequest)
2709
+ });
2710
+ var OnChainZKPFromNexeraID = z.object({
2711
+ scenarioVerifierAddress: AddressSchema,
2712
+ zkpRequests: z.array(ZKPRequestFromZKVerifier)
2713
+ });
2714
+ var OnChainZKPScenarioFromCms = z.object({
2715
+ scenarioVerifierAddress: AddressSchema,
2716
+ zkpRequests: z.array(QueryConfigSimplified)
2717
+ });
2718
+ var OnChainZKPPayload = z.object({
2719
+ requestId: z.bigint(),
2720
+ inputs: z.array(z.bigint()),
2721
+ a: z.tuple([z.bigint(), z.bigint()]),
2722
+ b: z.tuple([z.tuple([z.bigint(), z.bigint()]), z.tuple([z.bigint(), z.bigint()])]),
2723
+ c: z.tuple([z.bigint(), z.bigint()])
2724
+ });
2725
+ var SCENARIO_AUTHORIZATION_STATUSES = ["pending", "authorised", "unauthorised"];
2726
+ var ScenarioAuthorizationStatus = z["enum"](SCENARIO_AUTHORIZATION_STATUSES);
2727
+
2728
+ var HostMessage = z.union([HostRequestMessage, HostResponseMessage]);
2729
+ var IdentityMessage = z.union([IdentityNotificationMessage, IdentityRequestMessage, IdentityResponseMessage]);
2730
+ var RequiredDataRowSchema = z.object({
2731
+ type: CredentialType,
2732
+ requiredAttributes: z.array(z.object({
2733
+ attribute: z.string(),
2734
+ value: z.string(),
2735
+ operator: z.string()
2736
+ }))
2737
+ });
2738
+ var RequiredVerificationData = z.object({
2739
+ ruleEngine: z.object({
2740
+ requiredData: z.array(RequiredDataRowSchema)
2741
+ }),
2742
+ onchainZKP: z.object({
2743
+ requiredData: z.array(RequiredDataRowSchema),
2744
+ conditions: z.array(ZKPRequest)
2745
+ }),
2746
+ offchainZKP: z.object({
2747
+ requiredData: z.array(RequiredDataRowSchema),
2748
+ verifications: z.array(z.object({
2749
+ scenarioVerifierAddress: z.string(),
2750
+ conditions: z.array(ZKPRequest)
2751
+ }))
2752
+ })
2753
+ });
2754
+
2755
+ var TezosTxAuthInput = z.object({
2756
+ chainID: TezosChainId,
2757
+ contractAddress: TezosContractAddress,
2758
+ functionName: TezosEntrypointName,
2759
+ args: z.string(),
2760
+ userAddress: TezosImplicitAddress,
2761
+ blockExpiration: z.number()["int"]().optional(),
2762
+ nonce: z.number()["int"]().optional()
2763
+ });
2764
+ var TezosTxSignatureResponse = z.object({
2765
+ signature: EdSignature,
2766
+ blockExpiration: z.number()
2767
+ });
2768
+ var GetTezosTxAuthDataSignatureResponse = z.object({
2769
+ signature: EdSignature.optional(),
2770
+ blockExpiration: z.number().optional(),
2771
+ isAuthorized: z["boolean"](),
2772
+ errorMessage: z.any().optional()
2773
+ });
2774
+
2775
+ export { ENVS as $, ACTIVE_EVM_CHAIN_VALUES as A, BlockchainId as B, CredentialTypes as C, TezosAddress as D, EVM_BLOCK_TIME as E, FunctionCallData as F, TezosEntrypointName as G, EdSignature as H, SpSignature as I, P2Signature as J, TezosSignature as K, CardanoAddress as L, CardanoSignature as M, NEXERA_EVM_CHAINS as N, BlockchainAddress as O, POLYGON_NETWORK_NAMES as P, BlockchainSignature as Q, BLOCKCHAIN_NAMESPACES as R, StarknetAddress as S, TezosChainId as T, BlockchainNamespace as U, BLOCKCHAIN_NAMESPACES_NAMES as V, DISPLAYED_LOCKCHAIN_NAMESPACES as W, DisplayedBlockchainNamespace as X, BLOCKCHAIN_NAME_TO_NAMESPACE as Y, BLOCKCHAIN_NAMESPACE_TO_NAME as Z, coerceBoolean as _, NEXERA_TEZOS_CHAINS as a, GetCredentialsResponse as a$, EnvironmentSchema as a0, UuidString as a1, ZodParse as a2, shortBlockchainAddress as a3, ISO3CountryCode as a4, ALPHA_2_COUNTRIES as a5, Alpha2Country as a6, countryISO3toISO2Mapping as a7, countryISO2toISO3Mapping as a8, isoCountriesNameFromISO2 as a9, TransactionResponse as aA, HostResponseMessage as aB, ChallengeQueryOperators as aC, ChallengeQueryOperator as aD, OperatorToChallengeQueryOperator as aE, ChallengeQueryOperatorToOperator as aF, ChallengeQuerySchema as aG, ExecuteChallengeQueryInput as aH, ExecuteChallengeQueryConfig as aI, OpaChallengeQueryResponse as aJ, ExecuteChallengeQueryResponse as aK, OPAChallengeQuery as aL, OnChainRuleResult as aM, OffChainZKPRuleResult as aN, SdkVerificationOutput as aO, ScenarioTypes as aP, ScenarioType as aQ, ScenarioStatuses as aR, ScenarioStatus as aS, RuleEngineResponse as aT, ScenarioExecutionResponse as aU, RuleResultStatuses as aV, RuleResultStatus as aW, RuleResultStatusLabels as aX, ComplianceImplementationStepsInput as aY, SimplifiedCredential as aZ, GetCredentialsRequest as a_, parseISO3CountryCode as aa, ScenarioAuthorizationData as ab, SdkVerificationResponseSchema as ac, CloseScreenNotification as ad, KycCompletionData as ae, KycCompletionNotification as af, RuleEngineScenarioExecutionData as ag, OffChainScenarioExecutionData as ah, OnChainScenarioExecutionData as ai, ScenarioExecutionData as aj, ScenarioExecutionNotification as ak, IsVerifiedNotification as al, PolygonIdInitialized as am, OcvSdkInitialized as an, StartCompletedNotification as ao, IdentityNotificationMessage as ap, InitialDataRequest as aq, SignatureRequest as ar, TransactionData as as, SendTransactionRequest as at, IdentityRequestMessage as au, AVAILABLE_FLOWS as av, AvailableFlow as aw, DataAvailableOnStart as ax, InitialDataResponse as ay, SignatureResponse as az, NEXERA_EVM_CHAIN_NAMES as b, TezosTxAuthInput as b$, PolygonIdRequestData as b0, PolygonIdRequest as b1, PolygonIdResponseData as b2, PolygonIdResponse as b3, StartFlowRequest as b4, IsVerifiedRequest as b5, IsVerifiedResponse as b6, GetTxAuthSigRequest as b7, GetTxAuthSigResponse as b8, HostRequestMessage as b9, NUMERIC_OPERATORS as bA, NumericOperator as bB, BOOLEAN_OPERATORS as bC, BooleanOperator as bD, DATE_OPERATORS as bE, DateOperator as bF, SUPPORTED_TYPES as bG, SupportedType as bH, SupportedTypes as bI, IDInformation as bJ, QueryConfig as bK, QueryConfigSimplified as bL, PartialQueryConfigSimplified as bM, QueryConfigSimplifiedParsed as bN, QueryConfiguration as bO, NonParsedQueryConfiguration as bP, CreateQueryConfigurationInput as bQ, CreateQueryConfigurationResponse as bR, UpdateQueryConfigurationInput as bS, UpdateQueryConfigurationResponse as bT, DeleteQueryConfigurationInput as bU, DeleteQueryConfigurationResponse as bV, QueryCredentialTypes as bW, QueryCredentialType as bX, TxAuthInput as bY, TxSignatureResponse as bZ, GetTxAuthDataSignatureResponse as b_, IdentityResponseMessage as ba, HostMessage as bb, IdentityMessage as bc, RequiredDataRowSchema as bd, RequiredVerificationData as be, MediaType as bf, MediaTypePID as bg, ZeroKnowledgeProofRequest as bh, AuthorizationRequestMessage as bi, ProofData as bj, ZeroKnowledgeProofResponse as bk, AuthorizationResponseMessage as bl, CredentialQrCodeData as bm, AuthQrCodeData as bn, QrCodeLinkWithSchemaType as bo, parseIden3Message as bp, parseSessionIdFromUrl as bq, AllCredentialAttributes as br, AllCredentialValues as bs, Operator as bt, ZKPOperator as bu, operatorDisplayMap as bv, ARRAY_OPERATORS as bw, ArrayOperator as bx, STRING_OPERATORS as by, StringOperator as bz, NEXERA_EVM_CHAIN_NAMES_LIST as c, TezosTxSignatureResponse as c0, GetTezosTxAuthDataSignatureResponse as c1, ZKPRequest as c2, ZKPRequestFromZKVerifier as c3, OffChainZKP as c4, CreateAuthRequestProps as c5, CreateZKProofRequestProps as c6, AllScenarioExecutionAuthorizationData as c7, ProjectAuthorizationData as c8, OnChainZKP as c9, CredentialMediaType as cA, OnChainZKPFromNexeraID as ca, OnChainZKPScenarioFromCms as cb, OnChainZKPPayload as cc, SCENARIO_AUTHORIZATION_STATUSES as cd, ScenarioAuthorizationStatus as ce, _toConsumableArray as cf, ID3CredentialSubjectSchema as cg, IDScanCredentialSubjectSchema as ch, IDScanPassportCredentialSubjectSchema as ci, IDScanSelfieCredentialSubjectSchema as cj, OLD_IDImageCredentialSubjectSchema as ck, OLD_IDInformationCredentialSubjectSchema as cl, OLD_ProofOfResidenceCredentialSubjectSchema as cm, OLD_SelfieImageCredentialSubjectSchema as cn, OLD_AMLScreeningsResultsCredentialSubjectSchema as co, IDInformationCredentialSubjectSchema as cp, IDImageCredentialSubjectSchema as cq, SelfieImageCredentialSubjectSchema as cr, ProofOfResidenceCredentialSubjectSchema as cs, GenericVerifiableCredentialSchema as ct, CredentialSchemas as cu, CredentialNames as cv, NexeraCredentialType as cw, getCredentialName as cx, CredentialType as cy, VerifiableCredential as cz, NEXERA_CHAIN_VALUES as d, CHAINS_WITHOUT_DEDICATED_NODE_RPC as e, EvmChainId as f, PolygonNetworkNames as g, NEXERA_TEZOS_CHAIN_NAMES as h, NEXERA_TEZOS_CHAIN_NAMES_LIST as i, NEXERA_TEZOS_CHAIN_VALUES as j, ACTIVE_TEZOS_CHAIN_VALUES as k, isValidAddress as l, PrivateKey as m, AddressSchema as n, TxHash as o, EIP155Signature as p, AptosAddress as q, AptosSignature as r, shortAddress as s, StarknetSignature as t, PolkadotAddress as u, PolkadotSignature as v, CosmosAddress as w, CosmosSignature as x, TezosImplicitAddress as y, TezosContractAddress as z };