@keetanetwork/anchor 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/certificates.d.ts +9 -6
- package/lib/certificates.d.ts.map +1 -1
- package/lib/certificates.js +213 -16
- package/lib/certificates.js.map +1 -1
- package/lib/utils/asn1.d.ts +0 -13
- package/lib/utils/asn1.d.ts.map +1 -1
- package/lib/utils/asn1.js +0 -1973
- package/lib/utils/asn1.js.map +1 -1
- package/lib/utils/external.d.ts.map +1 -1
- package/lib/utils/external.js +9 -2
- package/lib/utils/external.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/services/asset-movement/common.d.ts +12 -4
- package/services/asset-movement/common.d.ts.map +1 -1
- package/services/asset-movement/common.js +56 -16
- package/services/asset-movement/common.js.map +1 -1
- package/services/kyc/iso20022.generated.js +54 -54
- package/services/kyc/iso20022.generated.js.map +1 -1
- package/services/kyc/utils/generate-kyc-schema.js +34 -6
- package/services/kyc/utils/generate-kyc-schema.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso20022.generated.js","sourceRoot":"","sources":["../../../src/services/kyc/iso20022.generated.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AA2IhD,qDAAqD;AACrD,mCAAmC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC7C,MAAM,EAAE;QACP,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC3F,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAA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,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC9C,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;IACvC,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACzC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC/C,qBAAqB,EAAE,yBAAyB;IAChD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5C,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACrD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1C,YAAY,EAAE,gBAAgB;IAC9B,gBAAgB,EAAE,oBAAoB;IACtC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC/C,UAAU,EAAE,cAAc;IAC1B,wBAAwB,EAAE,cAAc;IACxC,gBAAgB,EAAE,cAAc;IAChC,kBAAkB,EAAE,cAAc;IAClC,sBAAsB,EAAE,cAAc;IACtC,gBAAgB,EAAE,cAAc;IAChC,cAAc,EAAE,cAAc;IAC9B,2BAA2B,EAAE,cAAc;CAClC,CAAC","sourcesContent":["/* eslint-disable */\n/**\n * Generated ISO20022 Type Definitions\n * This file is auto-generated from oids.json.\n */\n\nimport * as ASN1 from '../../lib/utils/asn1.js';\nimport { lib as KeetaNetLib } from '@keetanetwork/keetanet-client';\ntype KeetaNetAccount = InstanceType<typeof KeetaNetLib.Account>;\n\n// ISO20022 Primitive Types\n/** Country code or name */\n/** OID: 1.3.6.1.4.1.62675.1.2.0 */\nexport type Country = string;\n\n/** Country subdivision (state/province) */\n/** OID: 1.3.6.1.4.1.62675.1.2.1 */\nexport type CountrySubDivision = string;\n\n/** Postal code */\n/** OID: 1.3.6.1.4.1.62675.1.2.3 */\nexport type PostalCode = string;\n\n/** Town or city name */\n/** OID: 1.3.6.1.4.1.62675.1.2.4 */\nexport type TownName = string;\n\n/** Building number */\n/** OID: 1.3.6.1.4.1.62675.1.2.5 */\nexport type BuildingNumber = string;\n\n/** Street name */\n/** OID: 1.3.6.1.4.1.62675.1.2.6 */\nexport type StreetName = string;\n\n/** Free-form address lines */\n/** OID: 1.3.6.1.4.1.62675.1.2.7 */\nexport type AddressLines = string[];\n\n/** Sub-department */\n/** OID: 1.3.6.1.4.1.62675.1.2.8 */\nexport type SubDepartment = string;\n\n/** Department */\n/** OID: 1.3.6.1.4.1.62675.1.2.9 */\nexport type Department = string;\n\n/** Purpose of email address */\n/** OID: 1.3.6.1.4.1.62675.1.3.0 */\nexport type EmailAddressPurpose = string;\n\n// ISO20022 Enumeration Types\n/** Name prefix code */\n/** OID: 1.3.6.1.4.1.62675.1.0.0 */\nexport type NamePrefixCode = 'DOCT' | 'MIST' | 'MISS' | 'MIKS' | 'MME';\n\n/** Preferred contact method */\n/** OID: 1.3.6.1.4.1.62675.1.9.0 */\nexport type PreferredContactMethodCode = 'LETT' | 'MAIL' | 'PHON' | 'FAXX' | 'CELL';\n\n/** Person identification scheme name proprietary values */\n/** OID: 1.3.6.1.4.1.62675.1.8.1.1.0 */\nexport type PersonIdentificationSchemeNameProprietary = 'DRLC' | 'CPPT' | 'ARNU' | 'SSN' | 'TXID' | 'VISA' | 'WPPT';\n\n// ISO20022 Choice Types\n/** Address type classification */\n/** OID: 1.3.6.1.4.1.62675.1.2.10 */\nexport type AddressType = string;\n\n/** Organization identification scheme name */\n/** OID: 1.3.6.1.4.1.62675.1.8.0.2 */\nexport type OrganizationIdentificationSchemeNameChoice = string;\n\n/** Person identification scheme name */\n/** OID: 1.3.6.1.4.1.62675.1.8.1.1 */\nexport type PersonIdentificationSchemeNameChoice = string | PersonIdentificationSchemeNameProprietary;\n\n// ISO20022 Sequence Types\n/** Generic organization identification */\n/** OID: 1.3.6.1.4.1.62675.1.8.0.1 */\nexport interface GenericOrganizationIdentification {\n\tid: Id;\n\tschemeName?: OrganizationIdentificationSchemeNameChoice;\n\tissuer?: Issuer;\n}\n\nexport interface OrganizationIdentificationBicChoice {\n\ttag: 0;\n\tname: 'bic';\n\tvalue: string;\n}\n\nexport interface OrganizationIdentificationLeiChoice {\n\ttag: 1;\n\tname: 'lei';\n\tvalue: string;\n}\n\nexport interface OrganizationIdentificationOtherChoice {\n\ttag: 2;\n\tname: 'other';\n\tvalue: GenericOrganizationIdentification[];\n}\nexport type OrganizationIdentificationChoice =\n\t| OrganizationIdentificationBicChoice\n\t| OrganizationIdentificationLeiChoice\n\t| OrganizationIdentificationOtherChoice;\n\nexport type OrganizationIdentification = OrganizationIdentificationChoice[];\n\n\n/** Generic person identification */\n/** OID: 1.3.6.1.4.1.62675.1.8.1.0 */\nexport interface GenericPersonIdentification {\n\tid: Id;\n\tschemeName?: PersonIdentificationSchemeNameChoice;\n\tissuer?: Issuer;\n}\n\nexport interface PersonIdentificationDateAndPlaceOfBirthChoice {\n\ttag: 0;\n\tname: 'dateAndPlaceOfBirth';\n\tvalue: DateAndPlaceOfBirth;\n}\n\nexport interface PersonIdentificationOtherChoice {\n\ttag: 1;\n\tname: 'other';\n\tvalue: GenericPersonIdentification[];\n}\nexport type PersonIdentificationChoice =\n\t| PersonIdentificationDateAndPlaceOfBirthChoice\n\t| PersonIdentificationOtherChoice;\n\nexport type PersonIdentification = PersonIdentificationChoice[];\n\n\n/** Other contact method */\n/** OID: 1.3.6.1.4.1.62675.1.9.1 */\nexport interface OtherContact {\n\tid?: Id;\n\tchannelType: string;\n}\n\n\n// Generated ASN.1 schemas for ISO 20022 choice types\n/** ASN.1 schema for AddressType */\nexport const AddressTypeSchema: ASN1.Schema = {\n\tchoice: [\n\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } }\n\t]\n};\n\n/** ASN.1 schema for OrganizationIdentificationSchemeNameChoice */\nexport const OrganizationIdentificationSchemeNameChoiceSchema: ASN1.Schema = {\n\tchoice: [\n\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } }\n\t]\n};\n\n/** ASN.1 schema for PersonIdentificationSchemeNameChoice */\nexport const PersonIdentificationSchemeNameChoiceSchema: ASN1.Schema = {\n\tchoice: [\n\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } }\n\t]\n};\n\n// Generated ASN.1 schemas for ISO 20022 regular sequence types\n/** ASN.1 schema for GenericOrganizationIdentification */\nexport const GenericOrganizationIdentificationSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['id', 'issuer', 'schemeName'],\n\tcontains: {\n\t\tid: { type: 'string', kind: 'utf8' },\n\t\tissuer: { optional: { type: 'string', kind: 'utf8' } },\n\t\tschemeName: { optional: OrganizationIdentificationSchemeNameChoiceSchema }\n\t}\n};\n\n/** ASN.1 schema for GenericPersonIdentification */\nexport const GenericPersonIdentificationSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['id', 'issuer', 'schemeName'],\n\tcontains: {\n\t\tid: { type: 'string', kind: 'utf8' },\n\t\tissuer: { optional: { type: 'string', kind: 'utf8' } },\n\t\tschemeName: { optional: PersonIdentificationSchemeNameChoiceSchema }\n\t}\n};\n\n/** ASN.1 schema for OtherContact */\nexport const OtherContactSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['channelType', 'id'],\n\tcontains: {\n\t\tchannelType: { type: 'string', kind: 'utf8' },\n\t\tid: { optional: { type: 'string', kind: 'utf8' } }\n\t}\n};\n\n// Generated ASN.1 schemas for ISO 20022 sequence-of-choice types\n/** ASN.1 schema for OrganizationIdentification */\nexport const OrganizationIdentificationSchema: ASN1.Schema = {\n\tsequenceOf: {\n\t\tchoice: [\n\t\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } },\n\t\t\t{ type: 'context', kind: 'explicit', value: 2, contains: GenericOrganizationIdentificationSchema }\n\t\t]\n\t}\n};\n\nexport const OrganizationIdentificationFields = [\n\t'bic',\n\t'lei',\n\t'other'\n] as const;\n\n\n/** ASN.1 schema for PersonIdentification */\nexport const PersonIdentificationSchema: ASN1.Schema = {\n\tsequenceOf: {\n\t\tchoice: [\n\t\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t\t{ type: 'context', kind: 'explicit', value: 1, contains: GenericPersonIdentificationSchema }\n\t\t]\n\t}\n};\n\nexport const PersonIdentificationFields = [\n\t'dateAndPlaceOfBirth',\n\t'other'\n] as const;\n\n\n// Generated ASN.1 schemas for choice-type sensitive attributes\n/** Person's full name */\n/** OID: 1.3.6.1.4.1.62675.1.0 */\nexport type FullName = string;\n\n/** Person's first name */\n/** OID: 1.3.6.1.4.1.62675.1.0.1 */\nexport type FirstName = string;\n\n/** Person's last name */\n/** OID: 1.3.6.1.4.1.62675.1.0.2 */\nexport type LastName = string;\n\n/** Person's middle name */\n/** OID: 1.3.6.1.4.1.62675.1.0.3 */\nexport type MiddleName = string;\n\n/** Date of birth */\n/** OID: 1.3.6.1.4.1.62675.1.1 */\nexport type DateOfBirth = Date;\n\n/** Physical address */\n/** OID: 1.3.6.1.4.1.62675.1.2 */\nexport interface Address {\n\taddressType?: AddressType;\n\tdepartment?: Department;\n\tsubDepartment?: SubDepartment;\n\tstreetName?: StreetName;\n\tbuildingNumber?: BuildingNumber;\n\tpostalCode?: PostalCode;\n\ttownName?: TownName;\n\tcountrySubDivision?: CountrySubDivision;\n\tcountry?: Country;\n\taddressLines?: AddressLines;\n}\n\n/** Email address */\n/** OID: 1.3.6.1.4.1.62675.1.3 */\nexport type Email = string;\n\n/** Phone number */\n/** OID: 1.3.6.1.4.1.62675.1.4 */\nexport type PhoneNumber = string;\n\n/** Date and place of birth information */\n/** OID: 1.3.6.1.4.1.62675.1.5 */\nexport interface DateAndPlaceOfBirth {\n\tbirthDate: BirthDate;\n\tprovinceOfBirth?: CountrySubDivision;\n\tcityOfBirth: TownName;\n\tcountryOfBirth: Country;\n}\n\n/** Job title */\n/** OID: 1.3.6.1.4.1.62675.1.6 */\nexport type JobTitle = string;\n\n/** Job responsibility */\n/** OID: 1.3.6.1.4.1.62675.1.6.1 */\nexport type JobResponsibility = string;\n\n/** Identifier */\n/** OID: 1.3.6.1.4.1.62675.1.7 */\nexport type Id = string;\n\n/** Issuer identifier */\n/** OID: 1.3.6.1.4.1.62675.1.7.1 */\nexport type Issuer = string;\n\n/** Entity type (organization or person) */\n/** OID: 1.3.6.1.4.1.62675.1.8 */\nexport interface EntityType {\n\torganization?: GenericOrganizationIdentification[];\n\tperson?: GenericPersonIdentification[];\n}\n\n/** Contact details */\n/** OID: 1.3.6.1.4.1.62675.1.9 */\nexport interface ContactDetails {\n\tnamePrefix?: NamePrefixCode;\n\tfullName?: FullName;\n\tphoneNumber?: PhoneNumber;\n\tmobileNumber?: PhoneNumber;\n\tfaxNumber?: PhoneNumber;\n\temailAddress?: EmailAddress;\n\temailPurpose?: EmailAddressPurpose;\n\tjobTitle?: JobTitle;\n\tjobResponsibility?: JobResponsibility;\n\tdepartment?: Department;\n\tother?: OtherContact[];\n\tpreferredMethod?: PreferredContactMethodCode;\n}\n\n/** Nationality */\n/** OID: 1.3.6.1.4.1.62675.1.10 */\nexport type Nationality = string;\n\n/** Generic document structure with metadata */\n/** OID: 1.3.6.1.4.1.62675.1.11 */\nexport interface Document {\n\tdocumentNumber: string;\n\tfront?: Reference;\n\tback?: Reference;\n\tselfie?: Reference;\n\tfullName?: string;\n\tfirstName?: string;\n\tlastName?: string;\n\tdob?: Date;\n\tgender?: string;\n\taddress?: Address;\n\texpiresAt?: Date;\n\tissuedAt?: Date;\n\tissuingState?: string;\n\tissuingCountry?: string;\n\trefNumber?: string;\n\tnationality?: string;\n\tcurp?: string;\n\tclaveDeElector?: string;\n\tclassifiedDocumentType?: string;\n\tcurpValidationResponse?: string;\n\tsambaActivityHistoryResponse?: string;\n}\n\n/** Driver's license document */\n/** OID: 1.3.6.1.4.1.62675.1.11.0 */\nexport type DocumentDriversLicense = Document;\n\n/** ID card document */\n/** OID: 1.3.6.1.4.1.62675.1.11.1 */\nexport type DocumentIdCard = Document;\n\n/** Passport document */\n/** OID: 1.3.6.1.4.1.62675.1.11.2 */\nexport type DocumentPassport = Document;\n\n/** Passport card document */\n/** OID: 1.3.6.1.4.1.62675.1.11.3 */\nexport type DocumentPassportCard = Document;\n\n/** Permit document */\n/** OID: 1.3.6.1.4.1.62675.1.11.4 */\nexport type DocumentPermit = Document;\n\n/** Visa document */\n/** OID: 1.3.6.1.4.1.62675.1.11.5 */\nexport type DocumentVisa = Document;\n\n/** Residence document */\n/** OID: 1.3.6.1.4.1.62675.1.11.6 */\nexport type DocumentResidenceDocument = Document;\n\n/** DigestInfo from RFC 3447 */\nexport interface DigestInfo {\n\tdigestAlgorithm: ASN1.ASN1OID;\n\tdigest: Buffer;\n}\n\nexport const DigestInfoSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['digestAlgorithm', 'digest'],\n\tcontains: {\n\t\tdigestAlgorithm: ASN1.ValidateASN1.IsOID,\n\t\tdigest: ASN1.ValidateASN1.IsOctetString\n\t}\n};\n\n/** External reference pointer */\nexport interface ExternalReference {\n\turl: string;\n\tcontentType: string;\n}\n\nexport const ExternalReferenceSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['url', 'contentType'],\n\tcontains: {\n\t\turl: { type: 'string', kind: 'utf8' },\n\t\tcontentType: { type: 'string', kind: 'utf8' }\n\t}\n};\n\n/** Reference */\nexport interface Reference {\n\texternal: ExternalReference;\n\tdigest: DigestInfo;\n\tencryptionAlgorithm: ASN1.ASN1OID;\n\t/**\n\t * TODOC\n\t */\n\t$blob: (principals?: KeetaNetAccount[]) => Promise<Blob>;\n}\n\nexport const ReferenceSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['external', 'digest', 'encryptionAlgorithm'],\n\tcontains: {\n\t\texternal: ExternalReferenceSchema,\n\t\tdigest: DigestInfoSchema,\n\t\tencryptionAlgorithm: ASN1.ValidateASN1.IsOID\n\t}\n};\n\n// Token aliases for sensitive attributes\n/** Alias for DateOfBirth */\nexport type BirthDate = DateOfBirth;\n\n/** Alias for Email */\nexport type EmailAddress = Email;\n\n/** Union type of all sensitive attribute types */\nexport type SensitiveAttributeType =\n\t| FullName\n\t| FirstName\n\t| LastName\n\t| MiddleName\n\t| DateOfBirth\n\t| Address\n\t| Email\n\t| PhoneNumber\n\t| DateAndPlaceOfBirth\n\t| JobTitle\n\t| JobResponsibility\n\t| Id\n\t| Issuer\n\t| EntityType\n\t| ContactDetails\n\t| Nationality\n\t| Document\n\t| DocumentDriversLicense\n\t| DocumentIdCard\n\t| DocumentPassport\n\t| DocumentPassportCard\n\t| DocumentPermit\n\t| DocumentVisa\n\t| DocumentResidenceDocument;\n\n/** Map of attribute name to acceptable input type for CertificateBuilder.setAttribute */\nexport interface CertificateAttributeValueMap {\n\t'fullName': FullName;\n\t'firstName': FirstName;\n\t'lastName': LastName;\n\t'middleName': MiddleName;\n\t'dateOfBirth': DateOfBirth;\n\t'address': Address;\n\t'email': Email;\n\t'phoneNumber': PhoneNumber;\n\t'dateAndPlaceOfBirth': DateAndPlaceOfBirth;\n\t'jobTitle': JobTitle;\n\t'jobResponsibility': JobResponsibility;\n\t'id': Id;\n\t'issuer': Issuer;\n\t'entityType': EntityType;\n\t'contactDetails': ContactDetails;\n\t'nationality': Nationality;\n\t'document': Document;\n\t'documentDriversLicense': DocumentDriversLicense;\n\t'documentIdCard': DocumentIdCard;\n\t'documentPassport': DocumentPassport;\n\t'documentPassportCard': DocumentPassportCard;\n\t'documentPermit': DocumentPermit;\n\t'documentVisa': DocumentVisa;\n\t'documentResidenceDocument': DocumentResidenceDocument;\n}\n\n/** Helper generic to get attribute value type by name */\nexport type CertificateAttributeValue<Name extends keyof CertificateAttributeValueMap> = CertificateAttributeValueMap[Name];\n\nexport const AddressFields = ['addressLines', 'addressType', 'buildingNumber', 'country', 'countrySubDivision', 'department', 'postalCode', 'streetName', 'subDepartment', 'townName'] as const;\nexport const AddressSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['addressLines', 'addressType', 'buildingNumber', 'country', 'countrySubDivision', 'department', 'postalCode', 'streetName', 'subDepartment', 'townName'],\n\tcontains: {\n\t\taddressLines: { optional: { sequenceOf: { type: 'string', kind: 'utf8' } } },\n\t\taddressType: { optional: AddressTypeSchema },\n\t\tbuildingNumber: { optional: { type: 'string', kind: 'utf8' } },\n\t\tcountry: { optional: { type: 'string', kind: 'utf8' } },\n\t\tcountrySubDivision: { optional: { type: 'string', kind: 'utf8' } },\n\t\tdepartment: { optional: { type: 'string', kind: 'utf8' } },\n\t\tpostalCode: { optional: { type: 'string', kind: 'utf8' } },\n\t\tstreetName: { optional: { type: 'string', kind: 'utf8' } },\n\t\tsubDepartment: { optional: { type: 'string', kind: 'utf8' } },\n\t\ttownName: { optional: { type: 'string', kind: 'utf8' } }\n\t}\n};\nexport const DateAndPlaceOfBirthFields = ['birthDate', 'cityOfBirth', 'countryOfBirth', 'provinceOfBirth'] as const;\nexport const DateAndPlaceOfBirthSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['birthDate', 'cityOfBirth', 'countryOfBirth', 'provinceOfBirth'],\n\tcontains: {\n\t\tbirthDate: ASN1.ValidateASN1.IsDate,\n\t\tcityOfBirth: { type: 'string', kind: 'utf8' },\n\t\tcountryOfBirth: { type: 'string', kind: 'utf8' },\n\t\tprovinceOfBirth: { optional: { type: 'string', kind: 'utf8' } }\n\t}\n};\nexport const EntityTypeFields = ['organization', 'person'] as const;\nexport const EntityTypeSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['organization', 'person'],\n\tcontains: {\n\t\torganization: { optional: { sequenceOf: GenericOrganizationIdentificationSchema } },\n\t\tperson: { optional: { sequenceOf: GenericPersonIdentificationSchema } }\n\t}\n};\nexport const ContactDetailsFields = ['department', 'emailAddress', 'emailPurpose', 'faxNumber', 'fullName', 'jobResponsibility', 'jobTitle', 'mobileNumber', 'namePrefix', 'other', 'phoneNumber', 'preferredMethod'] as const;\nexport const ContactDetailsSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['department', 'emailAddress', 'emailPurpose', 'faxNumber', 'fullName', 'jobResponsibility', 'jobTitle', 'mobileNumber', 'namePrefix', 'other', 'phoneNumber', 'preferredMethod'],\n\tcontains: {\n\t\tdepartment: { optional: { type: 'string', kind: 'utf8' } },\n\t\temailAddress: { optional: { type: 'string', kind: 'utf8' } },\n\t\temailPurpose: { optional: { type: 'string', kind: 'utf8' } },\n\t\tfaxNumber: { optional: { type: 'string', kind: 'utf8' } },\n\t\tfullName: { optional: { type: 'string', kind: 'utf8' } },\n\t\tjobResponsibility: { optional: { type: 'string', kind: 'utf8' } },\n\t\tjobTitle: { optional: { type: 'string', kind: 'utf8' } },\n\t\tmobileNumber: { optional: { type: 'string', kind: 'utf8' } },\n\t\tnamePrefix: { optional: { type: 'string', kind: 'utf8' } },\n\t\tother: { optional: { sequenceOf: OtherContactSchema } },\n\t\tphoneNumber: { optional: { type: 'string', kind: 'utf8' } },\n\t\tpreferredMethod: { optional: { type: 'string', kind: 'utf8' } }\n\t}\n};\nexport const DocumentFields = ['documentNumber', 'front', 'back', 'selfie', 'fullName', 'firstName', 'lastName', 'dob', 'gender', 'address', 'expiresAt', 'issuedAt', 'issuingState', 'issuingCountry', 'refNumber', 'nationality', 'curp', 'claveDeElector', 'classifiedDocumentType', 'curpValidationResponse', 'sambaActivityHistoryResponse'] as const;\nexport const DocumentSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['documentNumber', 'front', 'back', 'selfie', 'fullName', 'firstName', 'lastName', 'dob', 'gender', 'address', 'expiresAt', 'issuedAt', 'issuingState', 'issuingCountry', 'refNumber', 'nationality', 'curp', 'claveDeElector', 'classifiedDocumentType', 'curpValidationResponse', 'sambaActivityHistoryResponse'],\n\tcontains: {\n\t\tdocumentNumber: { type: 'string', kind: 'utf8' },\n\t\tfront: { optional: ReferenceSchema },\n\t\tback: { optional: ReferenceSchema },\n\t\tselfie: { optional: ReferenceSchema },\n\t\tfullName: { optional: { type: 'string', kind: 'utf8' } },\n\t\tfirstName: { optional: { type: 'string', kind: 'utf8' } },\n\t\tlastName: { optional: { type: 'string', kind: 'utf8' } },\n\t\tdob: { optional: ASN1.ValidateASN1.IsDate },\n\t\tgender: { optional: { type: 'string', kind: 'utf8' } },\n\t\taddress: { optional: AddressSchema },\n\t\texpiresAt: { optional: ASN1.ValidateASN1.IsDate },\n\t\tissuedAt: { optional: ASN1.ValidateASN1.IsDate },\n\t\tissuingState: { optional: { type: 'string', kind: 'utf8' } },\n\t\tissuingCountry: { optional: { type: 'string', kind: 'utf8' } },\n\t\trefNumber: { optional: { type: 'string', kind: 'utf8' } },\n\t\tnationality: { optional: { type: 'string', kind: 'utf8' } },\n\t\tcurp: { optional: { type: 'string', kind: 'utf8' } },\n\t\tclaveDeElector: { optional: { type: 'string', kind: 'utf8' } },\n\t\tclassifiedDocumentType: { optional: { type: 'string', kind: 'utf8' } },\n\t\tcurpValidationResponse: { optional: { type: 'string', kind: 'utf8' } },\n\t\tsambaActivityHistoryResponse: { optional: { type: 'string', kind: 'utf8' } }\n\t}\n};\nexport const CertificateAttributeOIDDB = {\n\t'fullName': '1.3.6.1.4.1.62675.1.0',\n\t'firstName': '1.3.6.1.4.1.62675.1.0.1',\n\t'lastName': '1.3.6.1.4.1.62675.1.0.2',\n\t'middleName': '1.3.6.1.4.1.62675.1.0.3',\n\t'dateOfBirth': '1.3.6.1.4.1.62675.1.1',\n\t'address': '1.3.6.1.4.1.62675.1.2',\n\t'email': '1.3.6.1.4.1.62675.1.3',\n\t'phoneNumber': '1.3.6.1.4.1.62675.1.4',\n\t'dateAndPlaceOfBirth': '1.3.6.1.4.1.62675.1.5',\n\t'jobTitle': '1.3.6.1.4.1.62675.1.6',\n\t'jobResponsibility': '1.3.6.1.4.1.62675.1.6.1',\n\t'id': '1.3.6.1.4.1.62675.1.7',\n\t'issuer': '1.3.6.1.4.1.62675.1.7.1',\n\t'entityType': '1.3.6.1.4.1.62675.1.8',\n\t'contactDetails': '1.3.6.1.4.1.62675.1.9',\n\t'nationality': '1.3.6.1.4.1.62675.1.10',\n\t'document': '1.3.6.1.4.1.62675.1.11',\n\t'documentDriversLicense': '1.3.6.1.4.1.62675.1.11.0',\n\t'documentIdCard': '1.3.6.1.4.1.62675.1.11.1',\n\t'documentPassport': '1.3.6.1.4.1.62675.1.11.2',\n\t'documentPassportCard': '1.3.6.1.4.1.62675.1.11.3',\n\t'documentPermit': '1.3.6.1.4.1.62675.1.11.4',\n\t'documentVisa': '1.3.6.1.4.1.62675.1.11.5',\n\t'documentResidenceDocument': '1.3.6.1.4.1.62675.1.11.6'\n} as const;\n\nexport const SENSITIVE_CERTIFICATE_ATTRIBUTES = [\n\t'fullName',\n\t'firstName',\n\t'lastName',\n\t'middleName',\n\t'dateOfBirth',\n\t'address',\n\t'email',\n\t'phoneNumber',\n\t'dateAndPlaceOfBirth',\n\t'jobTitle',\n\t'jobResponsibility',\n\t'id',\n\t'issuer',\n\t'entityType',\n\t'contactDetails',\n\t'nationality',\n\t'document',\n\t'documentDriversLicense',\n\t'documentIdCard',\n\t'documentPassport',\n\t'documentPassportCard',\n\t'documentPermit',\n\t'documentVisa',\n\t'documentResidenceDocument'\n] as const;\n\nexport type SensitiveCertificateAttributeNames = typeof SENSITIVE_CERTIFICATE_ATTRIBUTES[number];\n\nexport const SensitiveCertificateAttributeNames = [\n\t'FullName',\n\t'FirstName',\n\t'LastName',\n\t'MiddleName',\n\t'DateOfBirth',\n\t'Address',\n\t'Email',\n\t'PhoneNumber',\n\t'DateAndPlaceOfBirth',\n\t'JobTitle',\n\t'JobResponsibility',\n\t'Id',\n\t'Issuer',\n\t'EntityType',\n\t'ContactDetails',\n\t'Nationality',\n\t'Document',\n\t'DocumentDriversLicense',\n\t'DocumentIdCard',\n\t'DocumentPassport',\n\t'DocumentPassportCard',\n\t'DocumentPermit',\n\t'DocumentVisa',\n\t'DocumentResidenceDocument'\n] as const;\n\nexport const CertificateAttributeFieldNames: { readonly [K in keyof typeof CertificateAttributeOIDDB]?: readonly string[] } = {\n\t'address': AddressFields,\n\t'dateAndPlaceOfBirth': DateAndPlaceOfBirthFields,\n\t'entityType': EntityTypeFields,\n\t'contactDetails': ContactDetailsFields,\n\t'document': DocumentFields\n} as const;\n\nexport const CertificateAttributeSchema: { readonly [K in keyof typeof CertificateAttributeOIDDB]: ASN1.Schema } = {\n\t'fullName': { type: 'string', kind: 'utf8' },\n\t'firstName': { type: 'string', kind: 'utf8' },\n\t'lastName': { type: 'string', kind: 'utf8' },\n\t'middleName': { type: 'string', kind: 'utf8' },\n\t'dateOfBirth': ASN1.ValidateASN1.IsDate,\n\t'address': AddressSchema,\n\t'email': { type: 'string', kind: 'utf8' },\n\t'phoneNumber': { type: 'string', kind: 'utf8' },\n\t'dateAndPlaceOfBirth': DateAndPlaceOfBirthSchema,\n\t'jobTitle': { type: 'string', kind: 'utf8' },\n\t'jobResponsibility': { type: 'string', kind: 'utf8' },\n\t'id': { type: 'string', kind: 'utf8' },\n\t'issuer': { type: 'string', kind: 'utf8' },\n\t'entityType': EntityTypeSchema,\n\t'contactDetails': ContactDetailsSchema,\n\t'nationality': { type: 'string', kind: 'utf8' },\n\t'document': DocumentSchema,\n\t'documentDriversLicense': DocumentSchema,\n\t'documentIdCard': DocumentSchema,\n\t'documentPassport': DocumentSchema,\n\t'documentPassportCard': DocumentSchema,\n\t'documentPermit': DocumentSchema,\n\t'documentVisa': DocumentSchema,\n\t'documentResidenceDocument': DocumentSchema\n} as const;\n"]}
|
|
1
|
+
{"version":3,"file":"iso20022.generated.js","sourceRoot":"","sources":["../../../src/services/kyc/iso20022.generated.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AA2IhD,qDAAqD;AACrD,mCAAmC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC7C,MAAM,EAAE;QACP,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC3F,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;KAC3F;CACD,CAAC;AAEF,kEAAkE;AAClE,MAAM,CAAC,MAAM,gDAAgD,GAAgB;IAC5E,MAAM,EAAE;QACP,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC3F,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;KAC3F;CACD,CAAC;AAEF,4DAA4D;AAC5D,MAAM,C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,EAAE,IAAI,EAAE,MAAM,EAAE;IACzC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC/C,qBAAqB,EAAE,yBAAyB;IAChD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5C,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACrD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC1C,YAAY,EAAE,gBAAgB;IAC9B,gBAAgB,EAAE,oBAAoB;IACtC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC/C,UAAU,EAAE,cAAc;IAC1B,wBAAwB,EAAE,cAAc;IACxC,gBAAgB,EAAE,cAAc;IAChC,kBAAkB,EAAE,cAAc;IAClC,sBAAsB,EAAE,cAAc;IACtC,gBAAgB,EAAE,cAAc;IAChC,cAAc,EAAE,cAAc;IAC9B,2BAA2B,EAAE,cAAc;CAClC,CAAC","sourcesContent":["/* eslint-disable */\n/**\n * Generated ISO20022 Type Definitions\n * This file is auto-generated from oids.json.\n */\n\nimport * as ASN1 from '../../lib/utils/asn1.js';\nimport { lib as KeetaNetLib } from '@keetanetwork/keetanet-client';\ntype KeetaNetAccount = InstanceType<typeof KeetaNetLib.Account>;\n\n// ISO20022 Primitive Types\n/** Country code or name */\n/** OID: 1.3.6.1.4.1.62675.1.2.0 */\nexport type Country = string;\n\n/** Country subdivision (state/province) */\n/** OID: 1.3.6.1.4.1.62675.1.2.1 */\nexport type CountrySubDivision = string;\n\n/** Postal code */\n/** OID: 1.3.6.1.4.1.62675.1.2.3 */\nexport type PostalCode = string;\n\n/** Town or city name */\n/** OID: 1.3.6.1.4.1.62675.1.2.4 */\nexport type TownName = string;\n\n/** Building number */\n/** OID: 1.3.6.1.4.1.62675.1.2.5 */\nexport type BuildingNumber = string;\n\n/** Street name */\n/** OID: 1.3.6.1.4.1.62675.1.2.6 */\nexport type StreetName = string;\n\n/** Free-form address lines */\n/** OID: 1.3.6.1.4.1.62675.1.2.7 */\nexport type AddressLines = string[];\n\n/** Sub-department */\n/** OID: 1.3.6.1.4.1.62675.1.2.8 */\nexport type SubDepartment = string;\n\n/** Department */\n/** OID: 1.3.6.1.4.1.62675.1.2.9 */\nexport type Department = string;\n\n/** Purpose of email address */\n/** OID: 1.3.6.1.4.1.62675.1.3.0 */\nexport type EmailAddressPurpose = string;\n\n// ISO20022 Enumeration Types\n/** Name prefix code */\n/** OID: 1.3.6.1.4.1.62675.1.0.0 */\nexport type NamePrefixCode = 'DOCT' | 'MIST' | 'MISS' | 'MIKS' | 'MME';\n\n/** Preferred contact method */\n/** OID: 1.3.6.1.4.1.62675.1.9.0 */\nexport type PreferredContactMethodCode = 'LETT' | 'MAIL' | 'PHON' | 'FAXX' | 'CELL';\n\n/** Person identification scheme name proprietary values */\n/** OID: 1.3.6.1.4.1.62675.1.8.1.1.0 */\nexport type PersonIdentificationSchemeNameProprietary = 'DRLC' | 'CPPT' | 'ARNU' | 'SSN' | 'TXID' | 'VISA' | 'WPPT';\n\n// ISO20022 Choice Types\n/** Address type classification */\n/** OID: 1.3.6.1.4.1.62675.1.2.10 */\nexport type AddressType = string;\n\n/** Organization identification scheme name */\n/** OID: 1.3.6.1.4.1.62675.1.8.0.2 */\nexport type OrganizationIdentificationSchemeNameChoice = string;\n\n/** Person identification scheme name */\n/** OID: 1.3.6.1.4.1.62675.1.8.1.1 */\nexport type PersonIdentificationSchemeNameChoice = string | PersonIdentificationSchemeNameProprietary;\n\n// ISO20022 Sequence Types\n/** Generic organization identification */\n/** OID: 1.3.6.1.4.1.62675.1.8.0.1 */\nexport interface GenericOrganizationIdentification {\n\tid: Id;\n\tschemeName?: OrganizationIdentificationSchemeNameChoice;\n\tissuer?: Issuer;\n}\n\nexport interface OrganizationIdentificationBicChoice {\n\ttag: 0;\n\tname: 'bic';\n\tvalue: string;\n}\n\nexport interface OrganizationIdentificationLeiChoice {\n\ttag: 1;\n\tname: 'lei';\n\tvalue: string;\n}\n\nexport interface OrganizationIdentificationOtherChoice {\n\ttag: 2;\n\tname: 'other';\n\tvalue: GenericOrganizationIdentification[];\n}\nexport type OrganizationIdentificationChoice =\n\t| OrganizationIdentificationBicChoice\n\t| OrganizationIdentificationLeiChoice\n\t| OrganizationIdentificationOtherChoice;\n\nexport type OrganizationIdentification = OrganizationIdentificationChoice[];\n\n\n/** Generic person identification */\n/** OID: 1.3.6.1.4.1.62675.1.8.1.0 */\nexport interface GenericPersonIdentification {\n\tid: Id;\n\tschemeName?: PersonIdentificationSchemeNameChoice;\n\tissuer?: Issuer;\n}\n\nexport interface PersonIdentificationDateAndPlaceOfBirthChoice {\n\ttag: 0;\n\tname: 'dateAndPlaceOfBirth';\n\tvalue: DateAndPlaceOfBirth;\n}\n\nexport interface PersonIdentificationOtherChoice {\n\ttag: 1;\n\tname: 'other';\n\tvalue: GenericPersonIdentification[];\n}\nexport type PersonIdentificationChoice =\n\t| PersonIdentificationDateAndPlaceOfBirthChoice\n\t| PersonIdentificationOtherChoice;\n\nexport type PersonIdentification = PersonIdentificationChoice[];\n\n\n/** Other contact method */\n/** OID: 1.3.6.1.4.1.62675.1.9.1 */\nexport interface OtherContact {\n\tid?: Id;\n\tchannelType: string;\n}\n\n\n// Generated ASN.1 schemas for ISO 20022 choice types\n/** ASN.1 schema for AddressType */\nexport const AddressTypeSchema: ASN1.Schema = {\n\tchoice: [\n\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } }\n\t]\n};\n\n/** ASN.1 schema for OrganizationIdentificationSchemeNameChoice */\nexport const OrganizationIdentificationSchemeNameChoiceSchema: ASN1.Schema = {\n\tchoice: [\n\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } }\n\t]\n};\n\n/** ASN.1 schema for PersonIdentificationSchemeNameChoice */\nexport const PersonIdentificationSchemeNameChoiceSchema: ASN1.Schema = {\n\tchoice: [\n\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } }\n\t]\n};\n\n// Generated ASN.1 schemas for ISO 20022 regular sequence types\n/** ASN.1 schema for GenericOrganizationIdentification */\nexport const GenericOrganizationIdentificationSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['id', 'issuer', 'schemeName'],\n\tcontains: {\n\t\tid: { type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\tissuer: { optional: { type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } } },\n\t\tschemeName: { optional: OrganizationIdentificationSchemeNameChoiceSchema }\n\t}\n};\n\n/** ASN.1 schema for GenericPersonIdentification */\nexport const GenericPersonIdentificationSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['id', 'issuer', 'schemeName'],\n\tcontains: {\n\t\tid: { type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\tissuer: { optional: { type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } } },\n\t\tschemeName: { optional: PersonIdentificationSchemeNameChoiceSchema }\n\t}\n};\n\n/** ASN.1 schema for OtherContact */\nexport const OtherContactSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['channelType', 'id'],\n\tcontains: {\n\t\tchannelType: { type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\tid: { optional: { type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } } }\n\t}\n};\n\n// Generated ASN.1 schemas for ISO 20022 sequence-of-choice types\n/** ASN.1 schema for OrganizationIdentification */\nexport const OrganizationIdentificationSchema: ASN1.Schema = {\n\tsequenceOf: {\n\t\tchoice: [\n\t\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t\t{ type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } },\n\t\t\t{ type: 'context', kind: 'explicit', value: 2, contains: GenericOrganizationIdentificationSchema }\n\t\t]\n\t}\n};\n\nexport const OrganizationIdentificationFields = [\n\t'bic',\n\t'lei',\n\t'other'\n] as const;\n\n\n/** ASN.1 schema for PersonIdentification */\nexport const PersonIdentificationSchema: ASN1.Schema = {\n\tsequenceOf: {\n\t\tchoice: [\n\t\t\t{ type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\t\t{ type: 'context', kind: 'explicit', value: 1, contains: GenericPersonIdentificationSchema }\n\t\t]\n\t}\n};\n\nexport const PersonIdentificationFields = [\n\t'dateAndPlaceOfBirth',\n\t'other'\n] as const;\n\n\n// Generated ASN.1 schemas for choice-type sensitive attributes\n/** Person's full name */\n/** OID: 1.3.6.1.4.1.62675.1.0 */\nexport type FullName = string;\n\n/** Person's first name */\n/** OID: 1.3.6.1.4.1.62675.1.0.1 */\nexport type FirstName = string;\n\n/** Person's last name */\n/** OID: 1.3.6.1.4.1.62675.1.0.2 */\nexport type LastName = string;\n\n/** Person's middle name */\n/** OID: 1.3.6.1.4.1.62675.1.0.3 */\nexport type MiddleName = string;\n\n/** Date of birth */\n/** OID: 1.3.6.1.4.1.62675.1.1 */\nexport type DateOfBirth = Date;\n\n/** Physical address */\n/** OID: 1.3.6.1.4.1.62675.1.2 */\nexport interface Address {\n\taddressType?: AddressType;\n\tdepartment?: Department;\n\tsubDepartment?: SubDepartment;\n\tstreetName?: StreetName;\n\tbuildingNumber?: BuildingNumber;\n\tpostalCode?: PostalCode;\n\ttownName?: TownName;\n\tcountrySubDivision?: CountrySubDivision;\n\tcountry?: Country;\n\taddressLines?: AddressLines;\n}\n\n/** Email address */\n/** OID: 1.3.6.1.4.1.62675.1.3 */\nexport type Email = string;\n\n/** Phone number */\n/** OID: 1.3.6.1.4.1.62675.1.4 */\nexport type PhoneNumber = string;\n\n/** Date and place of birth information */\n/** OID: 1.3.6.1.4.1.62675.1.5 */\nexport interface DateAndPlaceOfBirth {\n\tbirthDate: BirthDate;\n\tprovinceOfBirth?: CountrySubDivision;\n\tcityOfBirth: TownName;\n\tcountryOfBirth: Country;\n}\n\n/** Job title */\n/** OID: 1.3.6.1.4.1.62675.1.6 */\nexport type JobTitle = string;\n\n/** Job responsibility */\n/** OID: 1.3.6.1.4.1.62675.1.6.1 */\nexport type JobResponsibility = string;\n\n/** Identifier */\n/** OID: 1.3.6.1.4.1.62675.1.7 */\nexport type Id = string;\n\n/** Issuer identifier */\n/** OID: 1.3.6.1.4.1.62675.1.7.1 */\nexport type Issuer = string;\n\n/** Entity type (organization or person) */\n/** OID: 1.3.6.1.4.1.62675.1.8 */\nexport interface EntityType {\n\torganization?: GenericOrganizationIdentification[];\n\tperson?: GenericPersonIdentification[];\n}\n\n/** Contact details */\n/** OID: 1.3.6.1.4.1.62675.1.9 */\nexport interface ContactDetails {\n\tnamePrefix?: NamePrefixCode;\n\tfullName?: FullName;\n\tphoneNumber?: PhoneNumber;\n\tmobileNumber?: PhoneNumber;\n\tfaxNumber?: PhoneNumber;\n\temailAddress?: EmailAddress;\n\temailPurpose?: EmailAddressPurpose;\n\tjobTitle?: JobTitle;\n\tjobResponsibility?: JobResponsibility;\n\tdepartment?: Department;\n\tother?: OtherContact[];\n\tpreferredMethod?: PreferredContactMethodCode;\n}\n\n/** Nationality */\n/** OID: 1.3.6.1.4.1.62675.1.10 */\nexport type Nationality = string;\n\n/** Generic document structure with metadata */\n/** OID: 1.3.6.1.4.1.62675.1.11 */\nexport interface Document {\n\tdocumentNumber: string;\n\tfront?: Reference;\n\tback?: Reference;\n\tselfie?: Reference;\n\tfullName?: string;\n\tfirstName?: string;\n\tlastName?: string;\n\tdob?: Date;\n\tgender?: string;\n\taddress?: Address;\n\texpiresAt?: Date;\n\tissuedAt?: Date;\n\tissuingState?: string;\n\tissuingCountry?: string;\n\trefNumber?: string;\n\tnationality?: string;\n\tcurp?: string;\n\tclaveDeElector?: string;\n\tclassifiedDocumentType?: string;\n\tcurpValidationResponse?: string;\n\tsambaActivityHistoryResponse?: string;\n}\n\n/** Driver's license document */\n/** OID: 1.3.6.1.4.1.62675.1.11.0 */\nexport type DocumentDriversLicense = Document;\n\n/** ID card document */\n/** OID: 1.3.6.1.4.1.62675.1.11.1 */\nexport type DocumentIdCard = Document;\n\n/** Passport document */\n/** OID: 1.3.6.1.4.1.62675.1.11.2 */\nexport type DocumentPassport = Document;\n\n/** Passport card document */\n/** OID: 1.3.6.1.4.1.62675.1.11.3 */\nexport type DocumentPassportCard = Document;\n\n/** Permit document */\n/** OID: 1.3.6.1.4.1.62675.1.11.4 */\nexport type DocumentPermit = Document;\n\n/** Visa document */\n/** OID: 1.3.6.1.4.1.62675.1.11.5 */\nexport type DocumentVisa = Document;\n\n/** Residence document */\n/** OID: 1.3.6.1.4.1.62675.1.11.6 */\nexport type DocumentResidenceDocument = Document;\n\n/** DigestInfo from RFC 3447 */\nexport interface DigestInfo {\n\tdigestAlgorithm: ASN1.ASN1OID;\n\tdigest: Buffer;\n}\n\nexport const DigestInfoSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['digestAlgorithm', 'digest'],\n\tcontains: {\n\t\tdigestAlgorithm: ASN1.ValidateASN1.IsOID,\n\t\tdigest: ASN1.ValidateASN1.IsOctetString\n\t}\n};\n\n/** External reference pointer */\nexport interface ExternalReference {\n\turl: string;\n\tcontentType: string;\n}\n\nexport const ExternalReferenceSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['url', 'contentType'],\n\tcontains: {\n\t\turl: { type: 'string', kind: 'utf8' },\n\t\tcontentType: { type: 'string', kind: 'utf8' }\n\t}\n};\n\n/** Reference */\nexport interface Reference {\n\texternal: ExternalReference;\n\tdigest: DigestInfo;\n\tencryptionAlgorithm: ASN1.ASN1OID;\n\t/**\n\t * TODOC\n\t */\n\t$blob: (principals?: KeetaNetAccount[]) => Promise<Blob>;\n}\n\nexport const ReferenceSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['external', 'digest', 'encryptionAlgorithm'],\n\tcontains: {\n\t\texternal: ExternalReferenceSchema,\n\t\tdigest: DigestInfoSchema,\n\t\tencryptionAlgorithm: ASN1.ValidateASN1.IsOID\n\t}\n};\n\n// Token aliases for sensitive attributes\n/** Alias for DateOfBirth */\nexport type BirthDate = DateOfBirth;\n\n/** Alias for Email */\nexport type EmailAddress = Email;\n\n/** Union type of all sensitive attribute types */\nexport type SensitiveAttributeType =\n\t| FullName\n\t| FirstName\n\t| LastName\n\t| MiddleName\n\t| DateOfBirth\n\t| Address\n\t| Email\n\t| PhoneNumber\n\t| DateAndPlaceOfBirth\n\t| JobTitle\n\t| JobResponsibility\n\t| Id\n\t| Issuer\n\t| EntityType\n\t| ContactDetails\n\t| Nationality\n\t| Document\n\t| DocumentDriversLicense\n\t| DocumentIdCard\n\t| DocumentPassport\n\t| DocumentPassportCard\n\t| DocumentPermit\n\t| DocumentVisa\n\t| DocumentResidenceDocument;\n\n/** Map of attribute name to acceptable input type for CertificateBuilder.setAttribute */\nexport interface CertificateAttributeValueMap {\n\t'fullName': FullName;\n\t'firstName': FirstName;\n\t'lastName': LastName;\n\t'middleName': MiddleName;\n\t'dateOfBirth': DateOfBirth;\n\t'address': Address;\n\t'email': Email;\n\t'phoneNumber': PhoneNumber;\n\t'dateAndPlaceOfBirth': DateAndPlaceOfBirth;\n\t'jobTitle': JobTitle;\n\t'jobResponsibility': JobResponsibility;\n\t'id': Id;\n\t'issuer': Issuer;\n\t'entityType': EntityType;\n\t'contactDetails': ContactDetails;\n\t'nationality': Nationality;\n\t'document': Document;\n\t'documentDriversLicense': DocumentDriversLicense;\n\t'documentIdCard': DocumentIdCard;\n\t'documentPassport': DocumentPassport;\n\t'documentPassportCard': DocumentPassportCard;\n\t'documentPermit': DocumentPermit;\n\t'documentVisa': DocumentVisa;\n\t'documentResidenceDocument': DocumentResidenceDocument;\n}\n\n/** Helper generic to get attribute value type by name */\nexport type CertificateAttributeValue<Name extends keyof CertificateAttributeValueMap> = CertificateAttributeValueMap[Name];\n\nexport const AddressFields = ['addressLines', 'addressType', 'buildingNumber', 'country', 'countrySubDivision', 'department', 'postalCode', 'streetName', 'subDepartment', 'townName'] as const;\nexport const AddressSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['addressLines', 'addressType', 'buildingNumber', 'country', 'countrySubDivision', 'department', 'postalCode', 'streetName', 'subDepartment', 'townName'],\n\tcontains: {\n\t\taddressLines: { optional: { type: 'context', kind: 'explicit', value: 0, contains: { sequenceOf: { type: 'string', kind: 'utf8' } } } },\n\t\taddressType: { optional: AddressTypeSchema },\n\t\tbuildingNumber: { optional: { type: 'context', kind: 'explicit', value: 2, contains: { type: 'string', kind: 'utf8' } } },\n\t\tcountry: { optional: { type: 'context', kind: 'explicit', value: 3, contains: { type: 'string', kind: 'utf8' } } },\n\t\tcountrySubDivision: { optional: { type: 'context', kind: 'explicit', value: 4, contains: { type: 'string', kind: 'utf8' } } },\n\t\tdepartment: { optional: { type: 'context', kind: 'explicit', value: 5, contains: { type: 'string', kind: 'utf8' } } },\n\t\tpostalCode: { optional: { type: 'context', kind: 'explicit', value: 6, contains: { type: 'string', kind: 'utf8' } } },\n\t\tstreetName: { optional: { type: 'context', kind: 'explicit', value: 7, contains: { type: 'string', kind: 'utf8' } } },\n\t\tsubDepartment: { optional: { type: 'context', kind: 'explicit', value: 8, contains: { type: 'string', kind: 'utf8' } } },\n\t\ttownName: { optional: { type: 'context', kind: 'explicit', value: 9, contains: { type: 'string', kind: 'utf8' } } }\n\t}\n};\nexport const DateAndPlaceOfBirthFields = ['birthDate', 'cityOfBirth', 'countryOfBirth', 'provinceOfBirth'] as const;\nexport const DateAndPlaceOfBirthSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['birthDate', 'cityOfBirth', 'countryOfBirth', 'provinceOfBirth'],\n\tcontains: {\n\t\tbirthDate: { type: 'context', kind: 'explicit', value: 0, contains: ASN1.ValidateASN1.IsDate },\n\t\tcityOfBirth: { type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } },\n\t\tcountryOfBirth: { type: 'context', kind: 'explicit', value: 2, contains: { type: 'string', kind: 'utf8' } },\n\t\tprovinceOfBirth: { optional: { type: 'context', kind: 'explicit', value: 3, contains: { type: 'string', kind: 'utf8' } } }\n\t}\n};\nexport const EntityTypeFields = ['organization', 'person'] as const;\nexport const EntityTypeSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['organization', 'person'],\n\tcontains: {\n\t\torganization: { optional: { type: 'context', kind: 'explicit', value: 0, contains: { sequenceOf: GenericOrganizationIdentificationSchema } } },\n\t\tperson: { optional: { type: 'context', kind: 'explicit', value: 1, contains: { sequenceOf: GenericPersonIdentificationSchema } } }\n\t}\n};\nexport const ContactDetailsFields = ['department', 'emailAddress', 'emailPurpose', 'faxNumber', 'fullName', 'jobResponsibility', 'jobTitle', 'mobileNumber', 'namePrefix', 'other', 'phoneNumber', 'preferredMethod'] as const;\nexport const ContactDetailsSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['department', 'emailAddress', 'emailPurpose', 'faxNumber', 'fullName', 'jobResponsibility', 'jobTitle', 'mobileNumber', 'namePrefix', 'other', 'phoneNumber', 'preferredMethod'],\n\tcontains: {\n\t\tdepartment: { optional: { type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } } },\n\t\temailAddress: { optional: { type: 'context', kind: 'explicit', value: 1, contains: { type: 'string', kind: 'utf8' } } },\n\t\temailPurpose: { optional: { type: 'context', kind: 'explicit', value: 2, contains: { type: 'string', kind: 'utf8' } } },\n\t\tfaxNumber: { optional: { type: 'context', kind: 'explicit', value: 3, contains: { type: 'string', kind: 'utf8' } } },\n\t\tfullName: { optional: { type: 'context', kind: 'explicit', value: 4, contains: { type: 'string', kind: 'utf8' } } },\n\t\tjobResponsibility: { optional: { type: 'context', kind: 'explicit', value: 5, contains: { type: 'string', kind: 'utf8' } } },\n\t\tjobTitle: { optional: { type: 'context', kind: 'explicit', value: 6, contains: { type: 'string', kind: 'utf8' } } },\n\t\tmobileNumber: { optional: { type: 'context', kind: 'explicit', value: 7, contains: { type: 'string', kind: 'utf8' } } },\n\t\tnamePrefix: { optional: { type: 'context', kind: 'explicit', value: 8, contains: { type: 'string', kind: 'utf8' } } },\n\t\tother: { optional: { type: 'context', kind: 'explicit', value: 9, contains: { sequenceOf: OtherContactSchema } } },\n\t\tphoneNumber: { optional: { type: 'context', kind: 'explicit', value: 10, contains: { type: 'string', kind: 'utf8' } } },\n\t\tpreferredMethod: { optional: { type: 'context', kind: 'explicit', value: 11, contains: { type: 'string', kind: 'utf8' } } }\n\t}\n};\nexport const DocumentFields = ['documentNumber', 'front', 'back', 'selfie', 'fullName', 'firstName', 'lastName', 'dob', 'gender', 'address', 'expiresAt', 'issuedAt', 'issuingState', 'issuingCountry', 'refNumber', 'nationality', 'curp', 'claveDeElector', 'classifiedDocumentType', 'curpValidationResponse', 'sambaActivityHistoryResponse'] as const;\nexport const DocumentSchema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: ['documentNumber', 'front', 'back', 'selfie', 'fullName', 'firstName', 'lastName', 'dob', 'gender', 'address', 'expiresAt', 'issuedAt', 'issuingState', 'issuingCountry', 'refNumber', 'nationality', 'curp', 'claveDeElector', 'classifiedDocumentType', 'curpValidationResponse', 'sambaActivityHistoryResponse'],\n\tcontains: {\n\t\tdocumentNumber: { type: 'context', kind: 'explicit', value: 0, contains: { type: 'string', kind: 'utf8' } },\n\t\tfront: { optional: { type: 'context', kind: 'explicit', value: 1, contains: ReferenceSchema } },\n\t\tback: { optional: { type: 'context', kind: 'explicit', value: 2, contains: ReferenceSchema } },\n\t\tselfie: { optional: { type: 'context', kind: 'explicit', value: 3, contains: ReferenceSchema } },\n\t\tfullName: { optional: { type: 'context', kind: 'explicit', value: 4, contains: { type: 'string', kind: 'utf8' } } },\n\t\tfirstName: { optional: { type: 'context', kind: 'explicit', value: 5, contains: { type: 'string', kind: 'utf8' } } },\n\t\tlastName: { optional: { type: 'context', kind: 'explicit', value: 6, contains: { type: 'string', kind: 'utf8' } } },\n\t\tdob: { optional: { type: 'context', kind: 'explicit', value: 7, contains: ASN1.ValidateASN1.IsDate } },\n\t\tgender: { optional: { type: 'context', kind: 'explicit', value: 8, contains: { type: 'string', kind: 'utf8' } } },\n\t\taddress: { optional: { type: 'context', kind: 'explicit', value: 9, contains: AddressSchema } },\n\t\texpiresAt: { optional: { type: 'context', kind: 'explicit', value: 10, contains: ASN1.ValidateASN1.IsDate } },\n\t\tissuedAt: { optional: { type: 'context', kind: 'explicit', value: 11, contains: ASN1.ValidateASN1.IsDate } },\n\t\tissuingState: { optional: { type: 'context', kind: 'explicit', value: 12, contains: { type: 'string', kind: 'utf8' } } },\n\t\tissuingCountry: { optional: { type: 'context', kind: 'explicit', value: 13, contains: { type: 'string', kind: 'utf8' } } },\n\t\trefNumber: { optional: { type: 'context', kind: 'explicit', value: 14, contains: { type: 'string', kind: 'utf8' } } },\n\t\tnationality: { optional: { type: 'context', kind: 'explicit', value: 15, contains: { type: 'string', kind: 'utf8' } } },\n\t\tcurp: { optional: { type: 'context', kind: 'explicit', value: 16, contains: { type: 'string', kind: 'utf8' } } },\n\t\tclaveDeElector: { optional: { type: 'context', kind: 'explicit', value: 17, contains: { type: 'string', kind: 'utf8' } } },\n\t\tclassifiedDocumentType: { optional: { type: 'context', kind: 'explicit', value: 18, contains: { type: 'string', kind: 'utf8' } } },\n\t\tcurpValidationResponse: { optional: { type: 'context', kind: 'explicit', value: 19, contains: { type: 'string', kind: 'utf8' } } },\n\t\tsambaActivityHistoryResponse: { optional: { type: 'context', kind: 'explicit', value: 20, contains: { type: 'string', kind: 'utf8' } } }\n\t}\n};\nexport const CertificateAttributeOIDDB = {\n\t'fullName': '1.3.6.1.4.1.62675.1.0',\n\t'firstName': '1.3.6.1.4.1.62675.1.0.1',\n\t'lastName': '1.3.6.1.4.1.62675.1.0.2',\n\t'middleName': '1.3.6.1.4.1.62675.1.0.3',\n\t'dateOfBirth': '1.3.6.1.4.1.62675.1.1',\n\t'address': '1.3.6.1.4.1.62675.1.2',\n\t'email': '1.3.6.1.4.1.62675.1.3',\n\t'phoneNumber': '1.3.6.1.4.1.62675.1.4',\n\t'dateAndPlaceOfBirth': '1.3.6.1.4.1.62675.1.5',\n\t'jobTitle': '1.3.6.1.4.1.62675.1.6',\n\t'jobResponsibility': '1.3.6.1.4.1.62675.1.6.1',\n\t'id': '1.3.6.1.4.1.62675.1.7',\n\t'issuer': '1.3.6.1.4.1.62675.1.7.1',\n\t'entityType': '1.3.6.1.4.1.62675.1.8',\n\t'contactDetails': '1.3.6.1.4.1.62675.1.9',\n\t'nationality': '1.3.6.1.4.1.62675.1.10',\n\t'document': '1.3.6.1.4.1.62675.1.11',\n\t'documentDriversLicense': '1.3.6.1.4.1.62675.1.11.0',\n\t'documentIdCard': '1.3.6.1.4.1.62675.1.11.1',\n\t'documentPassport': '1.3.6.1.4.1.62675.1.11.2',\n\t'documentPassportCard': '1.3.6.1.4.1.62675.1.11.3',\n\t'documentPermit': '1.3.6.1.4.1.62675.1.11.4',\n\t'documentVisa': '1.3.6.1.4.1.62675.1.11.5',\n\t'documentResidenceDocument': '1.3.6.1.4.1.62675.1.11.6'\n} as const;\n\nexport const SENSITIVE_CERTIFICATE_ATTRIBUTES = [\n\t'fullName',\n\t'firstName',\n\t'lastName',\n\t'middleName',\n\t'dateOfBirth',\n\t'address',\n\t'email',\n\t'phoneNumber',\n\t'dateAndPlaceOfBirth',\n\t'jobTitle',\n\t'jobResponsibility',\n\t'id',\n\t'issuer',\n\t'entityType',\n\t'contactDetails',\n\t'nationality',\n\t'document',\n\t'documentDriversLicense',\n\t'documentIdCard',\n\t'documentPassport',\n\t'documentPassportCard',\n\t'documentPermit',\n\t'documentVisa',\n\t'documentResidenceDocument'\n] as const;\n\nexport type SensitiveCertificateAttributeNames = typeof SENSITIVE_CERTIFICATE_ATTRIBUTES[number];\n\nexport const SensitiveCertificateAttributeNames = [\n\t'FullName',\n\t'FirstName',\n\t'LastName',\n\t'MiddleName',\n\t'DateOfBirth',\n\t'Address',\n\t'Email',\n\t'PhoneNumber',\n\t'DateAndPlaceOfBirth',\n\t'JobTitle',\n\t'JobResponsibility',\n\t'Id',\n\t'Issuer',\n\t'EntityType',\n\t'ContactDetails',\n\t'Nationality',\n\t'Document',\n\t'DocumentDriversLicense',\n\t'DocumentIdCard',\n\t'DocumentPassport',\n\t'DocumentPassportCard',\n\t'DocumentPermit',\n\t'DocumentVisa',\n\t'DocumentResidenceDocument'\n] as const;\n\nexport const CertificateAttributeFieldNames: { readonly [K in keyof typeof CertificateAttributeOIDDB]?: readonly string[] } = {\n\t'address': AddressFields,\n\t'dateAndPlaceOfBirth': DateAndPlaceOfBirthFields,\n\t'entityType': EntityTypeFields,\n\t'contactDetails': ContactDetailsFields,\n\t'document': DocumentFields\n} as const;\n\nexport const CertificateAttributeSchema: { readonly [K in keyof typeof CertificateAttributeOIDDB]: ASN1.Schema } = {\n\t'fullName': { type: 'string', kind: 'utf8' },\n\t'firstName': { type: 'string', kind: 'utf8' },\n\t'lastName': { type: 'string', kind: 'utf8' },\n\t'middleName': { type: 'string', kind: 'utf8' },\n\t'dateOfBirth': ASN1.ValidateASN1.IsDate,\n\t'address': AddressSchema,\n\t'email': { type: 'string', kind: 'utf8' },\n\t'phoneNumber': { type: 'string', kind: 'utf8' },\n\t'dateAndPlaceOfBirth': DateAndPlaceOfBirthSchema,\n\t'jobTitle': { type: 'string', kind: 'utf8' },\n\t'jobResponsibility': { type: 'string', kind: 'utf8' },\n\t'id': { type: 'string', kind: 'utf8' },\n\t'issuer': { type: 'string', kind: 'utf8' },\n\t'entityType': EntityTypeSchema,\n\t'contactDetails': ContactDetailsSchema,\n\t'nationality': { type: 'string', kind: 'utf8' },\n\t'document': DocumentSchema,\n\t'documentDriversLicense': DocumentSchema,\n\t'documentIdCard': DocumentSchema,\n\t'documentPassport': DocumentSchema,\n\t'documentPassportCard': DocumentSchema,\n\t'documentPermit': DocumentSchema,\n\t'documentVisa': DocumentSchema,\n\t'documentResidenceDocument': DocumentSchema\n} as const;\n"]}
|
|
@@ -285,6 +285,7 @@ function genSequenceSchema(typeName, fields, config) {
|
|
|
285
285
|
// Resolve to base type to handle aliases
|
|
286
286
|
const baseType = resolveToBaseType(fcfg.type);
|
|
287
287
|
let fieldSchema;
|
|
288
|
+
let isChoiceType = false;
|
|
288
289
|
// Check if field type is GeneralizedTime (date)
|
|
289
290
|
if (baseType === 'GeneralizedTime') {
|
|
290
291
|
fieldSchema = 'ASN1.ValidateASN1.IsDate';
|
|
@@ -306,6 +307,7 @@ function genSequenceSchema(typeName, fields, config) {
|
|
|
306
307
|
const isSensitiveChoice = oidSchema.sensitive_attributes[fieldTypeSnake]?.choices;
|
|
307
308
|
const isExtension = oidSchema.extensions[fieldTypeSnake]?.fields ?? oidSchema.extensions[fieldType]?.fields;
|
|
308
309
|
const hasSchema = isChoice ?? isSequence ?? isSensitiveSequence ?? isSensitiveChoice ?? isExtension;
|
|
310
|
+
isChoiceType = !!(isChoice ?? isSensitiveChoice);
|
|
309
311
|
if (hasSchema) {
|
|
310
312
|
fieldSchema = `${fieldTypePascal}Schema`;
|
|
311
313
|
}
|
|
@@ -326,15 +328,41 @@ function genSequenceSchema(typeName, fields, config) {
|
|
|
326
328
|
fieldSchema = `{ sequenceOf: ${fieldSchema} }`;
|
|
327
329
|
}
|
|
328
330
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
// Store field metadata
|
|
332
|
+
structFields[fname] = {
|
|
333
|
+
schema: fieldSchema,
|
|
334
|
+
optional: fcfg.optional ?? false,
|
|
335
|
+
isChoice: isChoiceType
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
// Check if ANY field is optional - if so, ALL fields need context tags for proper ordering
|
|
339
|
+
const hasAnyOptionalField = fieldOrder.some(function (fname) {
|
|
340
|
+
const fieldInfo = structFields[fname];
|
|
341
|
+
return (fieldInfo?.optional ?? false);
|
|
342
|
+
});
|
|
343
|
+
const containsObject = fieldOrder.map(function (fname, index) {
|
|
344
|
+
const fieldInfo = structFields[fname];
|
|
345
|
+
if (!fieldInfo) {
|
|
346
|
+
throw (new Error(`Field ${fname} not found in structFields`));
|
|
347
|
+
}
|
|
348
|
+
const baseSchema = fieldInfo.schema;
|
|
349
|
+
const isOptional = fieldInfo.optional;
|
|
350
|
+
const isChoiceField = fieldInfo.isChoice;
|
|
351
|
+
if (hasAnyOptionalField && !isChoiceField) {
|
|
352
|
+
const wrappedInContext = `{ type: 'context', kind: 'explicit', value: ${index}, contains: ${baseSchema} }`;
|
|
353
|
+
if (isOptional) {
|
|
354
|
+
return (`\t\t${fname}: { optional: ${wrappedInContext} }`);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
return (`\t\t${fname}: ${wrappedInContext}`);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
else if (isOptional) {
|
|
361
|
+
return (`\t\t${fname}: { optional: ${baseSchema} }`);
|
|
331
362
|
}
|
|
332
363
|
else {
|
|
333
|
-
|
|
364
|
+
return (`\t\t${fname}: ${baseSchema}`);
|
|
334
365
|
}
|
|
335
|
-
}
|
|
336
|
-
const containsObject = fieldOrder.map(function (fname) {
|
|
337
|
-
return (`\t\t${fname}: ${structFields[fname]}`);
|
|
338
366
|
}).join(',\n');
|
|
339
367
|
return (`export const ${typeName}Schema: ASN1.Schema = {\n\ttype: 'struct',\n\tfieldNames: [${fieldOrder.map(f => `'${f}'`).join(', ')}],\n\tcontains: {\n${containsObject}\n\t}\n};`);
|
|
340
368
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-kyc-schema.js","sourceRoot":"","sources":["../../../../src/services/kyc/utils/generate-kyc-schema.ts"],"names":[],"mappings":";;;AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqF/B;;GAEG;AACH,IAAI,SAA4B,CAAC;AAEjC,4BAA4B;AAC5B,SAAS,gBAAgB,CAAC,GAAwB;IACjD,OAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACvB,CAAC;AACD,SAAS,cAAc,CAAC,GAAW;IAClC,OAAM,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAS,IAAI;QACzC,OAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACnB,CAAC;AACD,SAAS,YAAY,CAAC,GAAW;IAChC,OAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAS,IAAI;QACzC,OAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACd,CAAC;AACD,SAAS,WAAW,CAAC,GAAW;IAC/B,OAAM,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,0BAA0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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAAmC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAE/F,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,oBAAoB,EAAE,EAAE,MAAM,CAAC,CAAC;IACjE,EAAE,CAAC,aAAa,CAAC,kBAAkB,EAAE,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC;AAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#! /usr/bin/env ts-node\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as typia from 'typia';\n\ntype oidSchemaContentsAttribute = {\n\t[key: string]: {\n\t\toid: number[];\n\t\ttype?: string;\n\t\ttoken?: string;\n\t\tdescription: string;\n\t\treference: string;\n\t\tfields?: {\n\t\t\t[key: string]: {\n\t\t\t\ttype: string;\n\t\t\t\toptional?: boolean;\n\t\t\t};\n\t\t};\n\t\tchoices?: {\n\t\t\t[key: string]: {\n\t\t\t\ttype: string;\n\t\t\t};\n\t\t};\n\t\tfield_order?: string[];\n\t};\n}\ntype oidSchemaContents = {\n\talgorithms: {\n\t\t[key: string]: number[]\n\t};\n\tsensitive_attributes: oidSchemaContentsAttribute;\n\tplain_attributes: oidSchemaContentsAttribute;\n\tiso20022_types: {\n\t\tprimitives: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\ttype: string;\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t\tenumerations: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\tvalues: string[];\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t\tchoices: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\tchoices: {\n\t\t\t\t\t[key: string]: {\n\t\t\t\t\t\ttype: string;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t\tsequences: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\tfields: {\n\t\t\t\t\t[key: string]: {\n\t\t\t\t\t\ttype: string;\n\t\t\t\t\t\toptional?: boolean;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tfield_order?: string[];\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t};\n\textensions: {\n\t\t[key: string]: {\n\t\t\toid?: number[];\n\t\t\ttype?: string;\n\t\t\tdescription: string;\n\t\t\treference?: string;\n\t\t\tfields?: {\n\t\t\t\t[key: string]: {\n\t\t\t\t\ttype: string;\n\t\t\t\t\toptional?: boolean;\n\t\t\t\t};\n\t\t\t};\n\t\t\tfield_order?: string[];\n\t\t};\n\t};\n};\n/*\n * Populated in `main` function\n */\nlet oidSchema: oidSchemaContents;\n\n// --- Utility Functions ---\nfunction oidArrayToString(oid: (string | number)[]): string {\n\treturn(oid.join('.'));\n}\nfunction toConstantCase(str: string): string {\n\treturn(str.replace(/[A-Z]/g, function(part) {\n\t\treturn(`_${part}`);\n\t}).toUpperCase());\n}\nfunction toPascalCase(str: string): string {\n\treturn(str.split(/[_-]/).map(function(part) {\n\t\treturn(part.charAt(0).toUpperCase() + part.slice(1));\n\t}).join(''));\n}\nfunction toSnakeCase(str: string): string {\n\treturn(str.replace(/([A-Z])/g, '_$1').toLowerCase().replace(/^_/, ''));\n}\n\n// --- Type Resolution ---\nfunction resolveTypeReference(typeName: string): string {\n\tif (typeName.startsWith('SEQUENCE OF ')) {\n\t\treturn(`${resolveTypeReference(typeName.substring('SEQUENCE OF '.length).trim())}[]`);\n\t}\n\tswitch (typeName.trim()) {\n\t\tcase 'UTF8String':\n\t\tcase 'Utf8String':\n\t\t\treturn('string');\n\t\tcase 'GeneralizedTime':\n\t\t\treturn('Date');\n\t\tcase 'ENUMERATED':\n\t\t\treturn('string');\n\t\tcase 'OBJECT IDENTIFIER':\n\t\t\treturn('ASN1.ASN1OID');\n\t\tcase 'OCTET STRING':\n\t\t\treturn('Buffer');\n\t\tdefault:\n\t\t\treturn(toPascalCase(typeName));\n\t}\n}\n\nfunction resolveToBaseType(typeName: string): string {\n\ttypeName = typeName.trim();\n\n\t// Check if it's a primitive type first\n\tif (/^(UTF8String|Utf8String|GeneralizedTime)$/i.test(typeName)) {\n\t\treturn(typeName);\n\t}\n\n\t// Check if it's defined as a sensitive attribute\n\tconst sensitiveAttr = oidSchema.sensitive_attributes[typeName] ?? Object.values(oidSchema.sensitive_attributes).find(function(attr) {\n\t\treturn(attr.token === typeName);\n\t});\n\n\tif (sensitiveAttr && !sensitiveAttr.fields && !sensitiveAttr.choices) {\n\t\tif (sensitiveAttr.type === undefined) {\n\t\t\tthrow(new Error(`Sensitive attribute ${typeName} has no defined type.`));\n\t\t}\n\t\treturn(resolveToBaseType(sensitiveAttr.type));\n\t}\n\n\t// Check if it's an ISO20022 primitive\n\tconst primitive = oidSchema.iso20022_types.primitives[typeName];\n\tif (primitive) {\n\t\treturn(resolveToBaseType(primitive.type));\n\t}\n\n\t// Otherwise return as-is\n\treturn(typeName);\n}\n\nfunction isEnumerationType(typeName: string): boolean {\n\tconst normalized = toSnakeCase(typeName);\n\treturn(Boolean(\n\t\toidSchema.iso20022_types.enumerations[typeName] ??\n\t\toidSchema.iso20022_types.enumerations[normalized]\n\t));\n}\n\nfunction isSequenceOfChoice(config: { fields: { [key: string]: { optional?: boolean }}}): boolean {\n\tconst hasFields = config.fields && Object.keys(config.fields).length > 0;\n\tconst allOptional = hasFields && Object.values(config.fields).every(function(field) {\n\t\treturn(field.optional);\n\t});\n\treturn(allOptional);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction _ignore_getPrimitiveType(type: string): 'string' | 'date' {\n\tif (type === 'UTF8String' || type === 'Utf8String') {\n\t\treturn('string');\n\t}\n\tif (type === 'GeneralizedTime') {\n\t\treturn('date');\n\t}\n\treturn('string');\n}\n\n// --- Output Generators ---\nfunction genHeader(comment: string) {\n\treturn([\n\t\t'/* eslint-disable */',\n\t\t'/**',\n\t\t` * ${comment}`,\n\t\t' * This file is auto-generated from oids.json.',\n\t\t' */',\n\t\t''\n\t].join('\\n'));\n}\n\nfunction genTypeAlias(name: string, type: string, description: string, oid: string): string {\n\treturn(`/** ${description} */\\n/** OID: ${oid} */\\nexport type ${name} = ${type};\\n`);\n}\n\nfunction genEnumType(name: string, values: string[], description: string, oid: string): string {\n\treturn(`/** ${description} */\\n/** OID: ${oid} */\\nexport type ${name} = ${values.map(function(value) {\n\t\treturn(`'${value}'`);\n\t}).join(' | ')};\\n`);\n}\n\nfunction genInterface(name: string, fields: { [key: string]: { type: string; optional?: boolean }}, description: string, oid: string): string {\n\tconst fieldLines = Object.entries(fields).map(function([fieldName, fieldConfig]) {\n\t\treturn(`\\t${fieldName}${fieldConfig.optional ? '?' : ''}: ${resolveTypeReference(fieldConfig.type)};`);\n\t});\n\treturn(`/** ${description} */\\n/** OID: ${oid} */\\nexport interface ${name} {\\n${fieldLines.join('\\n')}\\n}\\n`);\n}\n\n// Generate TypeScript **types** for sequence-of-choice\nfunction genSequenceOfChoiceTypes(name: string, config: { fields: { [key: string]: { type: string; optional?: boolean }}; field_order?: string[] }): string {\n\tconst typeName = toPascalCase(name);\n\tconst fieldOrder = config.field_order ?? Object.keys(config.fields);\n\tconst choiceEntries = fieldOrder.map(function(fieldName): [string, { type: string; optional?: boolean }] {\n\t\tif (!(fieldName in config.fields) || config.fields[fieldName] === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\t\treturn([fieldName, config.fields[fieldName]]);\n\t});\n\tconst choiceTypes = choiceEntries.map(function([fieldName, fieldConfig], index) {\n\t\tif (fieldConfig === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\t\tconst fieldType = resolveTypeReference(fieldConfig.type);\n\t\tconst choiceTypeName = `${typeName}${toPascalCase(fieldName)}Choice`;\n\t\treturn({\n\t\t\tcode: `export interface ${choiceTypeName} {\\n\\ttag: ${index};\\n\\tname: '${fieldName}';\\n\\tvalue: ${fieldType};\\n}\\n`,\n\t\t\tname: choiceTypeName\n\t\t});\n\t});\n\n\tlet out = '';\n\t// Individual choice interfaces\n\tout += choiceTypes.map(function(choiceInfo) {\n\t\treturn(choiceInfo.code);\n\t}).join('\\n');\n\n\t// Union type\n\tout += `export type ${typeName}Choice =\\n\\t| ${choiceTypes.map(function(choiceInfo) {\n\t\treturn(choiceInfo.name);\n\t}).join('\\n\\t| ')};\\n\\n`;\n\n\t// Main type is array of choices\n\tout += `export type ${typeName} = ${typeName}Choice[];\\n\\n`;\n\n\treturn(out);\n}\n\n// Generate ASN.1 **schema** for sequence-of-choice\nfunction genSequenceOfChoiceSchema(name: string, config: { fields: { [key: string]: { type: string; optional?: boolean }}; field_order?: string[] }): string {\n\tconst typeName = toPascalCase(name);\n\tconst fieldOrder = config.field_order ?? Object.keys(config.fields);\n\tconst choiceEntries = fieldOrder.map(function(fieldName): [string, { type: string; optional?: boolean }] {\n\t\tif (!(fieldName in config.fields) || config.fields[fieldName] === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\t\treturn([fieldName, config.fields[fieldName]]);\n\t});\n\n\tlet out = '';\n\n\t// ASN.1 schema\n\tout += `/** ASN.1 schema for ${typeName} */\\n`;\n\tout += `export const ${typeName}Schema: ASN1.Schema = {\\n\\tsequenceOf: {\\n\\t\\tchoice: [\\n`;\n\tout += choiceEntries.map(function([fieldName, fieldConfig], index) {\n\t\tif (fieldConfig === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\n\t\t// Determine the type for this choice\n\t\tlet fieldType = fieldConfig.type.trim();\n\t\tif (fieldType.startsWith('SEQUENCE OF ')) {\n\t\t\tfieldType = fieldType.substring('SEQUENCE OF '.length).trim();\n\t\t}\n\t\tfieldType = fieldType.replace(/\\[\\]$/, '');\n\n\t\tconst fieldTypePascal = toPascalCase(fieldType);\n\t\tconst fieldTypeSnake = toSnakeCase(fieldType);\n\n\t\t// Check if this is a complex type that has a schema\n\t\tconst isChoice = oidSchema.iso20022_types.choices[fieldTypeSnake] ?? oidSchema.iso20022_types.choices[fieldType];\n\t\tconst isSequence = oidSchema.iso20022_types.sequences[fieldTypeSnake] ?? oidSchema.iso20022_types.sequences[fieldType];\n\t\tconst isSensitiveSequence = oidSchema.sensitive_attributes[fieldTypeSnake]?.fields;\n\t\tconst isSensitiveChoice = oidSchema.sensitive_attributes[fieldTypeSnake]?.choices;\n\t\tconst hasSchema = isChoice ?? isSequence ?? isSensitiveSequence ?? isSensitiveChoice;\n\n\t\tlet contains;\n\t\tif (hasSchema) {\n\t\t\tcontains = `${fieldTypePascal}Schema`;\n\t\t} else {\n\t\t\t// Primitive type\n\t\t\tcontains = `{ type: 'string', kind: 'utf8' }`;\n\t\t}\n\n\t\treturn(`\\t\\t\\t{ type: 'context', kind: 'explicit', value: ${index}, contains: ${contains} }`);\n\t}).join(',\\n');\n\tout += `\\n\\t\\t]\\n\\t}\\n};\\n\\n`;\n\n\t// Field names array\n\tout += `export const ${typeName}Fields = [\\n${fieldOrder.map(function(fieldName){\n\t\treturn(`\\t'${fieldName}'`);\n\t}).join(',\\n')}\\n] as const;\\n\\n`;\n\n\treturn(out);\n}\n\nfunction deleteLastCommaIfFoundGenerator(lines: string[]) {\n\treturn(function deleteLastCommaIfFound() {\n\t\tlet lastLine = lines.pop();\n\t\tif (lastLine === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tif (lastLine.endsWith(',')) {\n\t\t\tlastLine = lastLine.slice(0, -1);\n\t\t}\n\t\tlines.push(lastLine);\n\t});\n}\n\n\n// --- Main Generation ---\nfunction generateOidConstants() {\n\tconst lines = [genHeader('Generated OID Constants')];\n\tconst deleteLastCommaIfFound = deleteLastCommaIfFoundGenerator(lines);\n\n\t// Algorithm OID constants\n\tlines.push('// Algorithm OID constants');\n\tfor (const [name, oid] of Object.entries(oidSchema.algorithms)) {\n\t\tlines.push(`export const ${toConstantCase(name.replace(/-/g, '_'))} = '${oidArrayToString(oid)}';`);\n\t}\n\tlines.push('');\n\n\t// Plain attribute OID constants\n\tlines.push('// Plain attribute OID constants');\n\tfor (const [name, config] of Object.entries(oidSchema.plain_attributes)) {\n\t\tlines.push(`/** ${config.description} */`);\n\t\tlines.push(`/** @see ${config.reference} */`);\n\t\tlines.push(`export const ${toConstantCase(name)} = '${oidArrayToString(config.oid)}';`);\n\t}\n\tlines.push('');\n\n\t// Keeta namespace for sensitive attributes\n\tlines.push('// Keeta-specific OID constants');\n\tlines.push('// eslint-disable-next-line @typescript-eslint/no-namespace');\n\tlines.push('export namespace keeta {');\n\tfor (const [name, config] of Object.entries(oidSchema.extensions)) {\n\t\tlines.push(`\\t/** ${config.description} */`);\n\t\tif (config.reference) {\n\t\t\tlines.push(`\\t/** @see ${config.reference} */`);\n\t\t}\n\t\tif (config.oid) {\n\t\t\tlines.push(`\\texport const ${toConstantCase(name)} = '${oidArrayToString(config.oid)}';`);\n\t\t}\n\t}\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t/** ${config.description} */`);\n\t\tlines.push(`\\t/** @see ${config.reference} */`);\n\t\tlines.push(`\\texport const ${toConstantCase(name)} = '${oidArrayToString(config.oid)}';`);\n\t}\n\tlines.push('}');\n\tlines.push('');\n\n\t// Lookup maps\n\tlines.push('// OID to name lookup maps');\n\tlines.push('export const OID_TO_NAME: { [key: string]: string } = {');\n\tfor (const [name, config] of Object.entries({\n\t\t...oidSchema.plain_attributes,\n\t\t...oidSchema.sensitive_attributes\n\t})) {\n\t\tlines.push(`\\t'${oidArrayToString(config.oid)}': '${name}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('};');\n\tlines.push('');\n\tlines.push('export const NAME_TO_OID: { [key: string]: string } = {');\n\tfor (const [name, config] of Object.entries({\n\t\t...oidSchema.plain_attributes,\n\t\t...oidSchema.sensitive_attributes\n\t})) {\n\t\tlines.push(`\\t'${name}': '${oidArrayToString(config.oid)}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('};');\n\tlines.push('');\n\n\treturn(lines.join('\\n'));\n}\n\nfunction genSequenceSchema(typeName: string, fields: { [key: string]: { type: string; optional?: boolean }}, config: { field_order?: string[] }) {\n\tconst fieldOrder = config?.field_order ?? Object.keys(fields);\n\tconst structFields: { [key: string]: string } = {};\n\n\tfor (const fname of fieldOrder) {\n\t\tconst fcfg = fields[fname];\n\t\tif (!fcfg) {continue;}\n\n\t\t// Resolve to base type to handle aliases\n\t\tconst baseType = resolveToBaseType(fcfg.type);\n\n\t\tlet fieldSchema;\n\t\t// Check if field type is GeneralizedTime (date)\n\t\tif (baseType === 'GeneralizedTime') {\n\t\t\tfieldSchema = 'ASN1.ValidateASN1.IsDate';\n\t\t} else {\n\t\t\t// Check if this is a SEQUENCE OF type directly or via type reference\n\t\t\tlet fieldType = baseType.trim();\n\t\t\tconst isSequenceOf = fieldType.startsWith('SEQUENCE OF ');\n\t\t\tif (isSequenceOf) {\n\t\t\t\tfieldType = fieldType.substring('SEQUENCE OF '.length).trim();\n\t\t\t}\n\n\t\t\tfieldType = fieldType.replace(/\\[\\]$/, '');\n\n\t\t\tconst fieldTypePascal = toPascalCase(fieldType);\n\t\t\tconst fieldTypeSnake = toSnakeCase(fieldType);\n\n\t\t\t// Check if this is a COMPLEX type (not a primitive)\n\t\t\tconst isChoice = oidSchema.iso20022_types.choices[fieldTypeSnake] ?? oidSchema.iso20022_types.choices[fieldType];\n\t\t\tconst isSequence = oidSchema.iso20022_types.sequences[fieldTypeSnake] ?? oidSchema.iso20022_types.sequences[fieldType];\n\t\t\tconst isSensitiveSequence = oidSchema.sensitive_attributes[fieldTypeSnake]?.fields;\n\t\t\tconst isSensitiveChoice = oidSchema.sensitive_attributes[fieldTypeSnake]?.choices;\n\t\t\tconst isExtension = oidSchema.extensions[fieldTypeSnake]?.fields ?? oidSchema.extensions[fieldType]?.fields;\n\n\t\t\tconst hasSchema = isChoice ?? isSequence ?? isSensitiveSequence ?? isSensitiveChoice ?? isExtension;\n\n\t\t\tif (hasSchema) {\n\t\t\t\tfieldSchema = `${fieldTypePascal}Schema`;\n\t\t\t} else {\n\t\t\t\t// Primitive type - use inline schema\n\t\t\t\tif (fieldType === 'OBJECT IDENTIFIER') {\n\t\t\t\t\tfieldSchema = `ASN1.ValidateASN1.IsOID`;\n\t\t\t\t} else if (fieldType === 'OCTET STRING') {\n\t\t\t\t\tfieldSchema = `ASN1.ValidateASN1.IsOctetString`;\n\t\t\t\t} else {\n\t\t\t\t\tfieldSchema = `{ type: 'string', kind: 'utf8' }`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Wrap in sequenceOf if this was a SEQUENCE OF type\n\t\t\tif (isSequenceOf) {\n\t\t\t\tfieldSchema = `{ sequenceOf: ${fieldSchema} }`;\n\t\t\t}\n\t\t}\n\n\t\tif (fcfg.optional) {\n\t\t\tstructFields[fname] = `{ optional: ${fieldSchema} }`;\n\t\t} else {\n\t\t\tstructFields[fname] = fieldSchema;\n\t\t}\n\t}\n\n\tconst containsObject = fieldOrder.map(function(fname) {\n\t\treturn(`\\t\\t${fname}: ${structFields[fname]}`);\n\t}).join(',\\n');\n\n\treturn(`export const ${typeName}Schema: ASN1.Schema = {\\n\\ttype: 'struct',\\n\\tfieldNames: [${fieldOrder.map(f => `'${f}'`).join(', ')}],\\n\\tcontains: {\\n${containsObject}\\n\\t}\\n};`);\n}\n\nfunction generateIso20022Types() {\n\tconst lines = [\n\t\tgenHeader('Generated ISO20022 Type Definitions'),\n\t\t\"import * as ASN1 from '../../lib/utils/asn1.js';\",\n\t\t\"import { lib as KeetaNetLib } from '@keetanetwork/keetanet-client';\",\n\t\t'type KeetaNetAccount = InstanceType<typeof KeetaNetLib.Account>;',\n\t\t''\n\t];\n\tconst deleteLastCommaIfFound = deleteLastCommaIfFoundGenerator(lines);\n\n\t// Primitives\n\tlines.push('// ISO20022 Primitive Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.primitives)) {\n\t\tlines.push(genTypeAlias(toPascalCase(name), resolveTypeReference(config.type), config.description, oidArrayToString(config.oid)));\n\t}\n\n\t// Enumerations\n\tlines.push('// ISO20022 Enumeration Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.enumerations)) {\n\t\tlines.push(genEnumType(toPascalCase(name), config.values, config.description, oidArrayToString(config.oid)));\n\t}\n\n\t// Choices\n\tlines.push('// ISO20022 Choice Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.choices)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tconst choices = Object.entries(config.choices ?? {});\n\t\tconst hasComplexTypes = choices.some(function([_ignore_choiceName, choiceConfig]) {\n\t\t\tconst choiceType = choiceConfig.type.trim();\n\t\t\treturn(choiceType !== 'UTF8String' && choiceType !== 'string');\n\t\t});\n\t\tif (hasComplexTypes) {\n\t\t\tconst unionTypes = Array.from(new Set(choices.map(function([_ignore_choiceName, choiceConfig]) {\n\t\t\t\treturn(resolveTypeReference(choiceConfig.type.trim()));\n\t\t\t})));\n\t\t\tlines.push(genTypeAlias(typeName, unionTypes.join(' | '), config.description, oidArrayToString(config.oid)));\n\t\t} else {\n\t\t\tlines.push(genTypeAlias(typeName, 'string', config.description, oidArrayToString(config.oid)));\n\t\t}\n\t}\n\n\t// ISO20022 Sequences and Sequence-of-Choice Types\n\tlines.push('// ISO20022 Sequence Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.sequences)) {\n\t\tif (isSequenceOfChoice(config)) {\n\t\t\tlines.push(genSequenceOfChoiceTypes(name, config));\n\t\t} else {\n\t\t\tlines.push(genInterface(toPascalCase(name), config.fields, config.description, oidArrayToString(config.oid)));\n\t\t}\n\t}\n\tlines.push('');\n\n\t// --- Choice Type Schemas ---\n\tlines.push('// Generated ASN.1 schemas for ISO 20022 choice types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.choices)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tconst choices = Object.entries(config.choices ?? {});\n\n\t\tlines.push(`/** ASN.1 schema for ${typeName} */`);\n\n\t\tif (choices.length === 0) {\n\t\t\t// No choices defined - simple string schema\n\t\t\tlines.push(`export const ${typeName}Schema: ASN1.Schema = { type: 'string', kind: 'utf8' };`);\n\t\t} else {\n\t\t\t// Generate choice schema with context tags to make them differentiable\n\t\t\tconst choiceSchemas = choices.map(function([_ignore_choiceName, choiceConfig], index) {\n\t\t\t\tconst choiceType = choiceConfig.type.trim();\n\t\t\t\tlet containsSchema;\n\n\t\t\t\t// Check if it is a primitive type\n\t\t\t\tif (choiceType === 'UTF8String' || choiceType === 'Utf8String' || choiceType === 'string' || isEnumerationType(choiceType)) {\n\t\t\t\t\tcontainsSchema = `{ type: 'string', kind: 'utf8' }`;\n\t\t\t\t} else {\n\t\t\t\t\t// Complex type - reference its schema\n\t\t\t\t\tconst choiceTypeName = toPascalCase(choiceType);\n\t\t\t\t\tcontainsSchema = `${choiceTypeName}Schema`;\n\t\t\t\t}\n\n\t\t\t\t// Wrap in context tag to make it differentiable\n\t\t\t\treturn(`{ type: 'context', kind: 'explicit', value: ${index}, contains: ${containsSchema} }`);\n\t\t\t});\n\n\t\t\tlines.push(`export const ${typeName}Schema: ASN1.Schema = {`);\n\t\t\tlines.push(`\\tchoice: [`);\n\t\t\tlines.push(`\\t\\t${choiceSchemas.join(',\\n\\t\\t')}`);\n\t\t\tlines.push(`\\t]`);\n\t\t\tlines.push(`};`);\n\t\t}\n\t\tlines.push('');\n\t}\n\n\t// --- Regular Sequence Type Schemas (SECOND - may depend on choice schemas) ---\n\tlines.push('// Generated ASN.1 schemas for ISO 20022 regular sequence types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.sequences)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (config.fields && !isSequenceOfChoice(config)) {\n\t\t\tlines.push(`/** ASN.1 schema for ${typeName} */`);\n\t\t\tlines.push(genSequenceSchema(typeName, config.fields, config));\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// --- Sequence-of-Choice Type Schemas (THIRD - depend on regular sequence schemas) ---\n\tlines.push('// Generated ASN.1 schemas for ISO 20022 sequence-of-choice types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.sequences)) {\n\t\tif (isSequenceOfChoice(config)) {\n\t\t\tlines.push(genSequenceOfChoiceSchema(name, config));\n\t\t}\n\t}\n\n\t// --- Choice-Type Sensitive Attribute Schemas ---\n\tlines.push('// Generated ASN.1 schemas for choice-type sensitive attributes');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (config.choices) {\n\t\t\tconst choiceSchemas = Object.values(config.choices).map(function(choice) {\n\t\t\t\tconst choiceTypeName = toPascalCase(choice.type.trim());\n\t\t\t\treturn(`${choiceTypeName}Schema`);\n\t\t\t});\n\t\t\tlines.push(`/** ASN.1 schema for ${typeName} */`);\n\t\t\tlines.push(`export const ${typeName}Schema: ASN1.Schema = {`);\n\t\t\tlines.push(`\\tchoice: [`);\n\t\t\tlines.push(`\\t\\t${choiceSchemas.join(',\\n\\t\\t')}`);\n\t\t\tlines.push(`\\t]`);\n\t\t\tlines.push(`};`);\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Sensitive Attribute Types\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (!config.fields && !config.choices) {\n\t\t\t// Primitive type\n\t\t\tlet baseType;\n\t\t\tif (config.type === 'UTF8String' || config.type === 'Utf8String') {\n\t\t\t\tbaseType = 'string';\n\t\t\t} else if (config.type === 'GeneralizedTime') {\n\t\t\t\tbaseType = 'Date';\n\t\t\t} else {\n\t\t\t\tif (config.type === undefined) {\n\t\t\t\t\tthrow(new Error(`Sensitive attribute ${name} has no defined type.`));\n\t\t\t\t}\n\t\t\t\tbaseType = toPascalCase(config.type);\n\t\t\t}\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\tlines.push(`export type ${typeName} = ${baseType};`);\n\t\t\tlines.push('');\n\t\t} else if (config.fields) {\n\t\t\t// Sequence type\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\tlines.push(`export interface ${typeName} {`);\n\t\t\tfor (const [fieldName, fieldConfig] of Object.entries(config.fields)) {\n\t\t\t\tconst optional = fieldConfig.optional ? '?' : '';\n\t\t\t\tconst resolvedType = resolveTypeReference(fieldConfig.type);\n\t\t\t\tlines.push(`\\t${fieldName}${optional}: ${resolvedType};`);\n\t\t\t}\n\t\t\tlines.push('}');\n\t\t\tlines.push('');\n\t\t} else if (config.choices) {\n\t\t\t// Choice type\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\tconst hasComplexTypes = Object.values(config.choices).some(function(choice) {\n\t\t\t\tconst choiceType = choice.type.trim();\n\t\t\t\treturn(choiceType !== 'UTF8String' && choiceType !== 'string');\n\t\t\t});\n\t\t\tif (hasComplexTypes) {\n\t\t\t\tconst unionTypes = Object.values(config.choices).map(function(choice) {\n\t\t\t\t\treturn(toPascalCase(choice.type.trim()));\n\t\t\t\t});\n\t\t\t\tlines.push(`export type ${typeName} = ${unionTypes.join(' | ')};`);\n\t\t\t} else {\n\t\t\t\tlines.push(`export type ${typeName} = string;`);\n\t\t\t}\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Extension Types with fields\n\tfor (const [name, config] of Object.entries(oidSchema.extensions)) {\n\t\tif (config.fields) {\n\t\t\tconst typeName = toPascalCase(name);\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tif (config.oid) {\n\t\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\t}\n\t\t\tlines.push(`export interface ${typeName} {`);\n\t\t\tfor (const [fieldName, fieldConfig] of Object.entries(config.fields)) {\n\t\t\t\tconst optional = fieldConfig.optional ? '?' : '';\n\t\t\t\tconst resolvedType = resolveTypeReference(fieldConfig.type);\n\t\t\t\tlines.push(`\\t${fieldName}${optional}: ${resolvedType};`);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * The \"Reference\" type is a special case where we inject\n\t\t\t * some additional attributes when decoding.\n\t\t\t */\n\t\t\tif (typeName === 'Reference') {\n\t\t\t\tlines.push('\\t/**');\n\t\t\t\tlines.push('\\t * TODOC');\n\t\t\t\tlines.push('\\t */');\n\t\t\t\tlines.push('\\t$blob: (principals?: KeetaNetAccount[]) => Promise<Blob>;');\n\t\t\t}\n\t\t\tlines.push('}');\n\t\t\tlines.push('');\n\t\t\t// Schema\n\t\t\tlines.push(genSequenceSchema(typeName, config.fields, config));\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Token aliases for sensitive attributes\n\tlines.push('// Token aliases for sensitive attributes');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tif (config.token && config.token !== toPascalCase(name)) {\n\t\t\tconst typeName = toPascalCase(name);\n\t\t\tconst tokenName = config.token;\n\t\t\tlines.push(`/** Alias for ${typeName} */`);\n\t\t\tlines.push(`export type ${tokenName} = ${typeName};`);\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Union type, value map, helper generic\n\tlines.push('/** Union type of all sensitive attribute types */');\n\tlines.push('export type SensitiveAttributeType =');\n\tlines.push(Object.keys(oidSchema.sensitive_attributes).map(function(name) {\n\t\treturn(`\\t| ${toPascalCase(name)}`);\n\t}).join('\\n') + ';');\n\tlines.push('');\n\tlines.push('/** Map of attribute name to acceptable input type for CertificateBuilder.setAttribute */');\n\tlines.push('export interface CertificateAttributeValueMap {');\n\tfor (const [name] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${name}': ${toPascalCase(name)};`);\n\t}\n\tlines.push('}');\n\tlines.push('');\n\tlines.push('/** Helper generic to get attribute value type by name */');\n\tlines.push('export type CertificateAttributeValue<Name extends keyof CertificateAttributeValueMap> = CertificateAttributeValueMap[Name];');\n\tlines.push('');\n\n\t// Field arrays and schemas for sequence types\n\t// Sort to ensure dependencies are defined before they're used\n\tconst sensitiveAttrEntries = Object.entries(oidSchema.sensitive_attributes);\n\tconst sortedEntries: [string, typeof sensitiveAttrEntries[0][1]][] = [];\n\tconst processed = new Set<string>();\n\n\tfunction hasDependency(config: typeof sensitiveAttrEntries[0][1], depName: string): boolean {\n\t\tif (!config.fields) {return(false);}\n\t\treturn(Object.values(config.fields).some(field => {\n\t\t\tconst fieldType = field.type.trim();\n\t\t\treturn(fieldType === toPascalCase(depName) || fieldType === depName);\n\t\t}));\n\t}\n\n\t// Process entries, dependencies first\n\twhile (sortedEntries.length < sensitiveAttrEntries.length) {\n\t\tfor (const [name, config] of sensitiveAttrEntries) {\n\t\t\tif (processed.has(name)) {continue;}\n\n\t\t\t// Check if all dependencies are processed\n\t\t\tlet allDepsProcessed = true;\n\t\t\tif (config.fields) {\n\t\t\t\tfor (const [otherName] of sensitiveAttrEntries) {\n\t\t\t\t\tif (otherName === name || processed.has(otherName)) {continue;}\n\t\t\t\t\tif (hasDependency(config, otherName)) {\n\t\t\t\t\t\tallDepsProcessed = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (allDepsProcessed) {\n\t\t\t\tsortedEntries.push([name, config]);\n\t\t\t\tprocessed.add(name);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const [name, config] of sortedEntries) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (config.fields) {\n\t\t\tconst fieldOrder = config.field_order ?? Object.keys(config.fields);\n\t\t\tlines.push(`export const ${typeName}Fields = [${fieldOrder.map(function(field) {\n\t\t\t\treturn(`'${field}'`);\n\t\t\t}).join(', ')}] as const;`);\n\t\t\tlines.push(genSequenceSchema(typeName, config.fields, config));\n\t\t}\n\t}\n\n\t// OID DB\n\tlines.push('export const CertificateAttributeOIDDB = {');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${name}': '${oidArrayToString(config.oid)}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('} as const;');\n\tlines.push('');\n\n\t// Sensitive attribute list\n\tlines.push('export const SENSITIVE_CERTIFICATE_ATTRIBUTES = [');\n\tfor (const name of Object.keys(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${name}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('] as const;');\n\tlines.push('');\n\n\tlines.push('export type SensitiveCertificateAttributeNames = typeof SENSITIVE_CERTIFICATE_ATTRIBUTES[number];');\n\tlines.push('');\n\n\t// PascalCase names\n\tlines.push('export const SensitiveCertificateAttributeNames = [');\n\tfor (const name of Object.keys(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${toPascalCase(name)}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('] as const;');\n\tlines.push('');\n\n\t// Field name mapping\n\tlines.push('export const CertificateAttributeFieldNames: { readonly [K in keyof typeof CertificateAttributeOIDDB]?: readonly string[] } = {');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tif (config.fields) {\n\t\t\tconst typeName = toPascalCase(name);\n\t\t\tlines.push(`\\t'${name}': ${typeName}Fields,`);\n\t\t}\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('} as const;');\n\tlines.push('');\n\n\t// Complete schema mapping (ONCE, at the end)\n\tlines.push('export const CertificateAttributeSchema: { readonly [K in keyof typeof CertificateAttributeOIDDB]: ASN1.Schema } = {');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tlet schemaRef;\n\t\tif (config.fields) {\n\t\t\tschemaRef = `${typeName}Schema`;\n\t\t} else if (config.choices) {\n\t\t\tschemaRef = `${typeName}Schema`;\n\t\t} else {\n\t\t\tif (config.type === undefined) {\n\t\t\t\tthrow(new Error(`Sensitive attribute ${name} has no defined type.`));\n\t\t\t}\n\t\t\tconst baseType = resolveToBaseType(config.type);\n\t\t\tconst baseTypeSnake = toSnakeCase(baseType);\n\t\t\tconst isExtensionType = oidSchema.extensions[baseTypeSnake]?.fields ?? oidSchema.extensions[baseType]?.fields;\n\t\t\tconst isSensitiveType = oidSchema.sensitive_attributes[toSnakeCase(baseType)]?.fields ?? oidSchema.sensitive_attributes[baseType]?.fields;\n\n\t\t\tif (isSensitiveType) {\n\t\t\t\tschemaRef = `${baseType}Schema`;\n\t\t\t} else if (isExtensionType) {\n\t\t\t\tschemaRef = `${baseType}Schema`;\n\t\t\t} else if (baseType === 'GeneralizedTime') {\n\t\t\t\tschemaRef = 'ASN1.ValidateASN1.IsDate';\n\t\t\t} else if (baseType === 'OCTET STRING') {\n\t\t\t\tschemaRef = 'ASN1.ValidateASN1.IsOctetString';\n\t\t\t} else if (baseType === 'OBJECT IDENTIFIER') {\n\t\t\t\tschemaRef = 'ASN1.ValidateASN1.IsOID';\n\t\t\t} else {\n\t\t\t\tschemaRef = `{ type: 'string', kind: 'utf8' }`;\n\t\t\t}\n\t\t}\n\t\tlines.push(`\\t'${name}': ${schemaRef},`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('} as const;');\n\tlines.push('');\n\n\treturn(lines.join('\\n'));\n}\n\nfunction parseArgs(argv: string[]): { oidsJSONPath: string; oidsOutputPath: string; iso20022OutputPath: string } {\n\tlet oidsJSONPath: string | undefined = undefined;\n\tlet oidsOutputPath: string | undefined = undefined;\n\tlet iso20022OutputPath: string | undefined = undefined;\n\tfor (const arg of argv) {\n\t\tif (arg.startsWith('--oids-json=')) {\n\t\t\toidsJSONPath = arg.substring('--oids-json='.length);\n\t\t}\n\t\tif (arg.startsWith('--oids-output=')) {\n\t\t\toidsOutputPath = arg.substring('--oids-output='.length);\n\t\t}\n\t\tif (arg.startsWith('--iso20022-output=')) {\n\t\t\tiso20022OutputPath = arg.substring('--iso20022-output='.length);\n\t\t}\n\t}\n\n\tif (oidsJSONPath === undefined) {\n\t\tthrow(new Error('Missing required argument: --oids-json=path/to/oids.json'));\n\t}\n\tif (oidsOutputPath === undefined) {\n\t\tthrow(new Error('Missing required argument: --oids-output=path/to/oids.generated.ts'));\n\t}\n\tif (iso20022OutputPath === undefined) {\n\t\tthrow(new Error('Missing required argument: --iso20022-output=path/to/iso20022.generated.ts'));\n\t}\n\tif (!fs.existsSync(oidsJSONPath)) {\n\t\tthrow(new Error(`OID JSON file not found: ${oidsJSONPath}`));\n\t}\n\treturn({\n\t\toidsJSONPath,\n\t\toidsOutputPath,\n\t\tiso20022OutputPath\n\t});\n}\n\n// --- Main ---\nfunction main(argv: string[]): void {\n\tconst {\n\t\toidsJSONPath,\n\t\toidsOutputPath,\n\t\tiso20022OutputPath\n\t} = parseArgs(argv);\n\n\tfs.mkdirSync(path.dirname(oidsOutputPath), { recursive: true });\n\tfs.mkdirSync(path.dirname(iso20022OutputPath), { recursive: true });\n\n\toidSchema = typia.assert<oidSchemaContents>(JSON.parse(fs.readFileSync(oidsJSONPath, 'utf8')));\n\n\tfs.writeFileSync(oidsOutputPath, generateOidConstants(), 'utf8');\n\tfs.writeFileSync(iso20022OutputPath, generateIso20022Types(), 'utf8');\n}\n\nmain(process.argv.slice(2));\n"]}
|
|
1
|
+
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AAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAE/F,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,oBAAoB,EAAE,EAAE,MAAM,CAAC,CAAC;IACjE,EAAE,CAAC,aAAa,CAAC,kBAAkB,EAAE,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;AACvE,CAAC;AAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["#! /usr/bin/env ts-node\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as typia from 'typia';\n\ntype oidSchemaContentsAttribute = {\n\t[key: string]: {\n\t\toid: number[];\n\t\ttype?: string;\n\t\ttoken?: string;\n\t\tdescription: string;\n\t\treference: string;\n\t\tfields?: {\n\t\t\t[key: string]: {\n\t\t\t\ttype: string;\n\t\t\t\toptional?: boolean;\n\t\t\t};\n\t\t};\n\t\tchoices?: {\n\t\t\t[key: string]: {\n\t\t\t\ttype: string;\n\t\t\t};\n\t\t};\n\t\tfield_order?: string[];\n\t};\n}\ntype oidSchemaContents = {\n\talgorithms: {\n\t\t[key: string]: number[]\n\t};\n\tsensitive_attributes: oidSchemaContentsAttribute;\n\tplain_attributes: oidSchemaContentsAttribute;\n\tiso20022_types: {\n\t\tprimitives: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\ttype: string;\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t\tenumerations: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\tvalues: string[];\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t\tchoices: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\tchoices: {\n\t\t\t\t\t[key: string]: {\n\t\t\t\t\t\ttype: string;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t\tsequences: {\n\t\t\t[key: string]: {\n\t\t\t\toid: number[];\n\t\t\t\tfields: {\n\t\t\t\t\t[key: string]: {\n\t\t\t\t\t\ttype: string;\n\t\t\t\t\t\toptional?: boolean;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tfield_order?: string[];\n\t\t\t\tdescription: string;\n\t\t\t};\n\t\t};\n\t};\n\textensions: {\n\t\t[key: string]: {\n\t\t\toid?: number[];\n\t\t\ttype?: string;\n\t\t\tdescription: string;\n\t\t\treference?: string;\n\t\t\tfields?: {\n\t\t\t\t[key: string]: {\n\t\t\t\t\ttype: string;\n\t\t\t\t\toptional?: boolean;\n\t\t\t\t};\n\t\t\t};\n\t\t\tfield_order?: string[];\n\t\t};\n\t};\n};\n/*\n * Populated in `main` function\n */\nlet oidSchema: oidSchemaContents;\n\n// --- Utility Functions ---\nfunction oidArrayToString(oid: (string | number)[]): string {\n\treturn(oid.join('.'));\n}\nfunction toConstantCase(str: string): string {\n\treturn(str.replace(/[A-Z]/g, function(part) {\n\t\treturn(`_${part}`);\n\t}).toUpperCase());\n}\nfunction toPascalCase(str: string): string {\n\treturn(str.split(/[_-]/).map(function(part) {\n\t\treturn(part.charAt(0).toUpperCase() + part.slice(1));\n\t}).join(''));\n}\nfunction toSnakeCase(str: string): string {\n\treturn(str.replace(/([A-Z])/g, '_$1').toLowerCase().replace(/^_/, ''));\n}\n\n// --- Type Resolution ---\nfunction resolveTypeReference(typeName: string): string {\n\tif (typeName.startsWith('SEQUENCE OF ')) {\n\t\treturn(`${resolveTypeReference(typeName.substring('SEQUENCE OF '.length).trim())}[]`);\n\t}\n\tswitch (typeName.trim()) {\n\t\tcase 'UTF8String':\n\t\tcase 'Utf8String':\n\t\t\treturn('string');\n\t\tcase 'GeneralizedTime':\n\t\t\treturn('Date');\n\t\tcase 'ENUMERATED':\n\t\t\treturn('string');\n\t\tcase 'OBJECT IDENTIFIER':\n\t\t\treturn('ASN1.ASN1OID');\n\t\tcase 'OCTET STRING':\n\t\t\treturn('Buffer');\n\t\tdefault:\n\t\t\treturn(toPascalCase(typeName));\n\t}\n}\n\nfunction resolveToBaseType(typeName: string): string {\n\ttypeName = typeName.trim();\n\n\t// Check if it's a primitive type first\n\tif (/^(UTF8String|Utf8String|GeneralizedTime)$/i.test(typeName)) {\n\t\treturn(typeName);\n\t}\n\n\t// Check if it's defined as a sensitive attribute\n\tconst sensitiveAttr = oidSchema.sensitive_attributes[typeName] ?? Object.values(oidSchema.sensitive_attributes).find(function(attr) {\n\t\treturn(attr.token === typeName);\n\t});\n\n\tif (sensitiveAttr && !sensitiveAttr.fields && !sensitiveAttr.choices) {\n\t\tif (sensitiveAttr.type === undefined) {\n\t\t\tthrow(new Error(`Sensitive attribute ${typeName} has no defined type.`));\n\t\t}\n\t\treturn(resolveToBaseType(sensitiveAttr.type));\n\t}\n\n\t// Check if it's an ISO20022 primitive\n\tconst primitive = oidSchema.iso20022_types.primitives[typeName];\n\tif (primitive) {\n\t\treturn(resolveToBaseType(primitive.type));\n\t}\n\n\t// Otherwise return as-is\n\treturn(typeName);\n}\n\nfunction isEnumerationType(typeName: string): boolean {\n\tconst normalized = toSnakeCase(typeName);\n\treturn(Boolean(\n\t\toidSchema.iso20022_types.enumerations[typeName] ??\n\t\toidSchema.iso20022_types.enumerations[normalized]\n\t));\n}\n\nfunction isSequenceOfChoice(config: { fields: { [key: string]: { optional?: boolean }}}): boolean {\n\tconst hasFields = config.fields && Object.keys(config.fields).length > 0;\n\tconst allOptional = hasFields && Object.values(config.fields).every(function(field) {\n\t\treturn(field.optional);\n\t});\n\treturn(allOptional);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction _ignore_getPrimitiveType(type: string): 'string' | 'date' {\n\tif (type === 'UTF8String' || type === 'Utf8String') {\n\t\treturn('string');\n\t}\n\tif (type === 'GeneralizedTime') {\n\t\treturn('date');\n\t}\n\treturn('string');\n}\n\n// --- Output Generators ---\nfunction genHeader(comment: string) {\n\treturn([\n\t\t'/* eslint-disable */',\n\t\t'/**',\n\t\t` * ${comment}`,\n\t\t' * This file is auto-generated from oids.json.',\n\t\t' */',\n\t\t''\n\t].join('\\n'));\n}\n\nfunction genTypeAlias(name: string, type: string, description: string, oid: string): string {\n\treturn(`/** ${description} */\\n/** OID: ${oid} */\\nexport type ${name} = ${type};\\n`);\n}\n\nfunction genEnumType(name: string, values: string[], description: string, oid: string): string {\n\treturn(`/** ${description} */\\n/** OID: ${oid} */\\nexport type ${name} = ${values.map(function(value) {\n\t\treturn(`'${value}'`);\n\t}).join(' | ')};\\n`);\n}\n\nfunction genInterface(name: string, fields: { [key: string]: { type: string; optional?: boolean }}, description: string, oid: string): string {\n\tconst fieldLines = Object.entries(fields).map(function([fieldName, fieldConfig]) {\n\t\treturn(`\\t${fieldName}${fieldConfig.optional ? '?' : ''}: ${resolveTypeReference(fieldConfig.type)};`);\n\t});\n\treturn(`/** ${description} */\\n/** OID: ${oid} */\\nexport interface ${name} {\\n${fieldLines.join('\\n')}\\n}\\n`);\n}\n\n// Generate TypeScript **types** for sequence-of-choice\nfunction genSequenceOfChoiceTypes(name: string, config: { fields: { [key: string]: { type: string; optional?: boolean }}; field_order?: string[] }): string {\n\tconst typeName = toPascalCase(name);\n\tconst fieldOrder = config.field_order ?? Object.keys(config.fields);\n\tconst choiceEntries = fieldOrder.map(function(fieldName): [string, { type: string; optional?: boolean }] {\n\t\tif (!(fieldName in config.fields) || config.fields[fieldName] === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\t\treturn([fieldName, config.fields[fieldName]]);\n\t});\n\tconst choiceTypes = choiceEntries.map(function([fieldName, fieldConfig], index) {\n\t\tif (fieldConfig === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\t\tconst fieldType = resolveTypeReference(fieldConfig.type);\n\t\tconst choiceTypeName = `${typeName}${toPascalCase(fieldName)}Choice`;\n\t\treturn({\n\t\t\tcode: `export interface ${choiceTypeName} {\\n\\ttag: ${index};\\n\\tname: '${fieldName}';\\n\\tvalue: ${fieldType};\\n}\\n`,\n\t\t\tname: choiceTypeName\n\t\t});\n\t});\n\n\tlet out = '';\n\t// Individual choice interfaces\n\tout += choiceTypes.map(function(choiceInfo) {\n\t\treturn(choiceInfo.code);\n\t}).join('\\n');\n\n\t// Union type\n\tout += `export type ${typeName}Choice =\\n\\t| ${choiceTypes.map(function(choiceInfo) {\n\t\treturn(choiceInfo.name);\n\t}).join('\\n\\t| ')};\\n\\n`;\n\n\t// Main type is array of choices\n\tout += `export type ${typeName} = ${typeName}Choice[];\\n\\n`;\n\n\treturn(out);\n}\n\n// Generate ASN.1 **schema** for sequence-of-choice\nfunction genSequenceOfChoiceSchema(name: string, config: { fields: { [key: string]: { type: string; optional?: boolean }}; field_order?: string[] }): string {\n\tconst typeName = toPascalCase(name);\n\tconst fieldOrder = config.field_order ?? Object.keys(config.fields);\n\tconst choiceEntries = fieldOrder.map(function(fieldName): [string, { type: string; optional?: boolean }] {\n\t\tif (!(fieldName in config.fields) || config.fields[fieldName] === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\t\treturn([fieldName, config.fields[fieldName]]);\n\t});\n\n\tlet out = '';\n\n\t// ASN.1 schema\n\tout += `/** ASN.1 schema for ${typeName} */\\n`;\n\tout += `export const ${typeName}Schema: ASN1.Schema = {\\n\\tsequenceOf: {\\n\\t\\tchoice: [\\n`;\n\tout += choiceEntries.map(function([fieldName, fieldConfig], index) {\n\t\tif (fieldConfig === undefined) {\n\t\t\tthrow(new Error(`Field ${fieldName} not found in sequence of choice ${name}`));\n\t\t}\n\n\t\t// Determine the type for this choice\n\t\tlet fieldType = fieldConfig.type.trim();\n\t\tif (fieldType.startsWith('SEQUENCE OF ')) {\n\t\t\tfieldType = fieldType.substring('SEQUENCE OF '.length).trim();\n\t\t}\n\t\tfieldType = fieldType.replace(/\\[\\]$/, '');\n\n\t\tconst fieldTypePascal = toPascalCase(fieldType);\n\t\tconst fieldTypeSnake = toSnakeCase(fieldType);\n\n\t\t// Check if this is a complex type that has a schema\n\t\tconst isChoice = oidSchema.iso20022_types.choices[fieldTypeSnake] ?? oidSchema.iso20022_types.choices[fieldType];\n\t\tconst isSequence = oidSchema.iso20022_types.sequences[fieldTypeSnake] ?? oidSchema.iso20022_types.sequences[fieldType];\n\t\tconst isSensitiveSequence = oidSchema.sensitive_attributes[fieldTypeSnake]?.fields;\n\t\tconst isSensitiveChoice = oidSchema.sensitive_attributes[fieldTypeSnake]?.choices;\n\t\tconst hasSchema = isChoice ?? isSequence ?? isSensitiveSequence ?? isSensitiveChoice;\n\n\t\tlet contains;\n\t\tif (hasSchema) {\n\t\t\tcontains = `${fieldTypePascal}Schema`;\n\t\t} else {\n\t\t\t// Primitive type\n\t\t\tcontains = `{ type: 'string', kind: 'utf8' }`;\n\t\t}\n\n\t\treturn(`\\t\\t\\t{ type: 'context', kind: 'explicit', value: ${index}, contains: ${contains} }`);\n\t}).join(',\\n');\n\tout += `\\n\\t\\t]\\n\\t}\\n};\\n\\n`;\n\n\t// Field names array\n\tout += `export const ${typeName}Fields = [\\n${fieldOrder.map(function(fieldName){\n\t\treturn(`\\t'${fieldName}'`);\n\t}).join(',\\n')}\\n] as const;\\n\\n`;\n\n\treturn(out);\n}\n\nfunction deleteLastCommaIfFoundGenerator(lines: string[]) {\n\treturn(function deleteLastCommaIfFound() {\n\t\tlet lastLine = lines.pop();\n\t\tif (lastLine === undefined) {\n\t\t\treturn;\n\t\t}\n\t\tif (lastLine.endsWith(',')) {\n\t\t\tlastLine = lastLine.slice(0, -1);\n\t\t}\n\t\tlines.push(lastLine);\n\t});\n}\n\n\n// --- Main Generation ---\nfunction generateOidConstants() {\n\tconst lines = [genHeader('Generated OID Constants')];\n\tconst deleteLastCommaIfFound = deleteLastCommaIfFoundGenerator(lines);\n\n\t// Algorithm OID constants\n\tlines.push('// Algorithm OID constants');\n\tfor (const [name, oid] of Object.entries(oidSchema.algorithms)) {\n\t\tlines.push(`export const ${toConstantCase(name.replace(/-/g, '_'))} = '${oidArrayToString(oid)}';`);\n\t}\n\tlines.push('');\n\n\t// Plain attribute OID constants\n\tlines.push('// Plain attribute OID constants');\n\tfor (const [name, config] of Object.entries(oidSchema.plain_attributes)) {\n\t\tlines.push(`/** ${config.description} */`);\n\t\tlines.push(`/** @see ${config.reference} */`);\n\t\tlines.push(`export const ${toConstantCase(name)} = '${oidArrayToString(config.oid)}';`);\n\t}\n\tlines.push('');\n\n\t// Keeta namespace for sensitive attributes\n\tlines.push('// Keeta-specific OID constants');\n\tlines.push('// eslint-disable-next-line @typescript-eslint/no-namespace');\n\tlines.push('export namespace keeta {');\n\tfor (const [name, config] of Object.entries(oidSchema.extensions)) {\n\t\tlines.push(`\\t/** ${config.description} */`);\n\t\tif (config.reference) {\n\t\t\tlines.push(`\\t/** @see ${config.reference} */`);\n\t\t}\n\t\tif (config.oid) {\n\t\t\tlines.push(`\\texport const ${toConstantCase(name)} = '${oidArrayToString(config.oid)}';`);\n\t\t}\n\t}\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t/** ${config.description} */`);\n\t\tlines.push(`\\t/** @see ${config.reference} */`);\n\t\tlines.push(`\\texport const ${toConstantCase(name)} = '${oidArrayToString(config.oid)}';`);\n\t}\n\tlines.push('}');\n\tlines.push('');\n\n\t// Lookup maps\n\tlines.push('// OID to name lookup maps');\n\tlines.push('export const OID_TO_NAME: { [key: string]: string } = {');\n\tfor (const [name, config] of Object.entries({\n\t\t...oidSchema.plain_attributes,\n\t\t...oidSchema.sensitive_attributes\n\t})) {\n\t\tlines.push(`\\t'${oidArrayToString(config.oid)}': '${name}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('};');\n\tlines.push('');\n\tlines.push('export const NAME_TO_OID: { [key: string]: string } = {');\n\tfor (const [name, config] of Object.entries({\n\t\t...oidSchema.plain_attributes,\n\t\t...oidSchema.sensitive_attributes\n\t})) {\n\t\tlines.push(`\\t'${name}': '${oidArrayToString(config.oid)}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('};');\n\tlines.push('');\n\n\treturn(lines.join('\\n'));\n}\n\nfunction genSequenceSchema(typeName: string, fields: { [key: string]: { type: string; optional?: boolean }}, config: { field_order?: string[] }) {\n\tconst fieldOrder = config?.field_order ?? Object.keys(fields);\n\tconst structFields: { [key: string]: { schema: string; optional: boolean; isChoice: boolean }} = {};\n\n\tfor (const fname of fieldOrder) {\n\t\tconst fcfg = fields[fname];\n\t\tif (!fcfg) {continue;}\n\n\t\t// Resolve to base type to handle aliases\n\t\tconst baseType = resolveToBaseType(fcfg.type);\n\n\t\tlet fieldSchema;\n\t\tlet isChoiceType = false;\n\n\t\t// Check if field type is GeneralizedTime (date)\n\t\tif (baseType === 'GeneralizedTime') {\n\t\t\tfieldSchema = 'ASN1.ValidateASN1.IsDate';\n\t\t} else {\n\t\t\t// Check if this is a SEQUENCE OF type directly or via type reference\n\t\t\tlet fieldType = baseType.trim();\n\t\t\tconst isSequenceOf = fieldType.startsWith('SEQUENCE OF ');\n\t\t\tif (isSequenceOf) {\n\t\t\t\tfieldType = fieldType.substring('SEQUENCE OF '.length).trim();\n\t\t\t}\n\n\t\t\tfieldType = fieldType.replace(/\\[\\]$/, '');\n\n\t\t\tconst fieldTypePascal = toPascalCase(fieldType);\n\t\t\tconst fieldTypeSnake = toSnakeCase(fieldType);\n\n\t\t\t// Check if this is a COMPLEX type (not a primitive)\n\t\t\tconst isChoice = oidSchema.iso20022_types.choices[fieldTypeSnake] ?? oidSchema.iso20022_types.choices[fieldType];\n\t\t\tconst isSequence = oidSchema.iso20022_types.sequences[fieldTypeSnake] ?? oidSchema.iso20022_types.sequences[fieldType];\n\t\t\tconst isSensitiveSequence = oidSchema.sensitive_attributes[fieldTypeSnake]?.fields;\n\t\t\tconst isSensitiveChoice = oidSchema.sensitive_attributes[fieldTypeSnake]?.choices;\n\t\t\tconst isExtension = oidSchema.extensions[fieldTypeSnake]?.fields ?? oidSchema.extensions[fieldType]?.fields;\n\n\t\t\tconst hasSchema = isChoice ?? isSequence ?? isSensitiveSequence ?? isSensitiveChoice ?? isExtension;\n\t\t\tisChoiceType = !!(isChoice ?? isSensitiveChoice);\n\n\t\t\tif (hasSchema) {\n\t\t\t\tfieldSchema = `${fieldTypePascal}Schema`;\n\t\t\t} else {\n\t\t\t\t// Primitive type - use inline schema\n\t\t\t\tif (fieldType === 'OBJECT IDENTIFIER') {\n\t\t\t\t\tfieldSchema = `ASN1.ValidateASN1.IsOID`;\n\t\t\t\t} else if (fieldType === 'OCTET STRING') {\n\t\t\t\t\tfieldSchema = `ASN1.ValidateASN1.IsOctetString`;\n\t\t\t\t} else {\n\t\t\t\t\tfieldSchema = `{ type: 'string', kind: 'utf8' }`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Wrap in sequenceOf if this was a SEQUENCE OF type\n\t\t\tif (isSequenceOf) {\n\t\t\t\tfieldSchema = `{ sequenceOf: ${fieldSchema} }`;\n\t\t\t}\n\t\t}\n\n\t\t// Store field metadata\n\t\tstructFields[fname] = {\n\t\t\tschema: fieldSchema,\n\t\t\toptional: fcfg.optional ?? false,\n\t\t\tisChoice: isChoiceType\n\t\t};\n\t}\n\n\t// Check if ANY field is optional - if so, ALL fields need context tags for proper ordering\n\tconst hasAnyOptionalField = fieldOrder.some(function(fname) {\n\t\tconst fieldInfo = structFields[fname];\n\t\treturn(fieldInfo?.optional ?? false);\n\t});\n\n\tconst containsObject = fieldOrder.map(function(fname, index) {\n\t\tconst fieldInfo = structFields[fname];\n\t\tif (!fieldInfo) {\n\t\t\tthrow(new Error(`Field ${fname} not found in structFields`));\n\t\t}\n\n\t\tconst baseSchema = fieldInfo.schema;\n\t\tconst isOptional = fieldInfo.optional;\n\t\tconst isChoiceField = fieldInfo.isChoice;\n\t\tif (hasAnyOptionalField && !isChoiceField) {\n\t\t\tconst wrappedInContext = `{ type: 'context', kind: 'explicit', value: ${index}, contains: ${baseSchema} }`;\n\t\t\tif (isOptional) {\n\t\t\t\treturn(`\\t\\t${fname}: { optional: ${wrappedInContext} }`);\n\t\t\t} else {\n\t\t\t\treturn(`\\t\\t${fname}: ${wrappedInContext}`);\n\t\t\t}\n\t\t} else if (isOptional) {\n\t\t\treturn(`\\t\\t${fname}: { optional: ${baseSchema} }`);\n\t\t} else {\n\t\t\treturn(`\\t\\t${fname}: ${baseSchema}`);\n\t\t}\n\t}).join(',\\n');\n\n\treturn(`export const ${typeName}Schema: ASN1.Schema = {\\n\\ttype: 'struct',\\n\\tfieldNames: [${fieldOrder.map(f => `'${f}'`).join(', ')}],\\n\\tcontains: {\\n${containsObject}\\n\\t}\\n};`);\n}\n\nfunction generateIso20022Types() {\n\tconst lines = [\n\t\tgenHeader('Generated ISO20022 Type Definitions'),\n\t\t\"import * as ASN1 from '../../lib/utils/asn1.js';\",\n\t\t\"import { lib as KeetaNetLib } from '@keetanetwork/keetanet-client';\",\n\t\t'type KeetaNetAccount = InstanceType<typeof KeetaNetLib.Account>;',\n\t\t''\n\t];\n\tconst deleteLastCommaIfFound = deleteLastCommaIfFoundGenerator(lines);\n\n\t// Primitives\n\tlines.push('// ISO20022 Primitive Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.primitives)) {\n\t\tlines.push(genTypeAlias(toPascalCase(name), resolveTypeReference(config.type), config.description, oidArrayToString(config.oid)));\n\t}\n\n\t// Enumerations\n\tlines.push('// ISO20022 Enumeration Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.enumerations)) {\n\t\tlines.push(genEnumType(toPascalCase(name), config.values, config.description, oidArrayToString(config.oid)));\n\t}\n\n\t// Choices\n\tlines.push('// ISO20022 Choice Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.choices)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tconst choices = Object.entries(config.choices ?? {});\n\t\tconst hasComplexTypes = choices.some(function([_ignore_choiceName, choiceConfig]) {\n\t\t\tconst choiceType = choiceConfig.type.trim();\n\t\t\treturn(choiceType !== 'UTF8String' && choiceType !== 'string');\n\t\t});\n\t\tif (hasComplexTypes) {\n\t\t\tconst unionTypes = Array.from(new Set(choices.map(function([_ignore_choiceName, choiceConfig]) {\n\t\t\t\treturn(resolveTypeReference(choiceConfig.type.trim()));\n\t\t\t})));\n\t\t\tlines.push(genTypeAlias(typeName, unionTypes.join(' | '), config.description, oidArrayToString(config.oid)));\n\t\t} else {\n\t\t\tlines.push(genTypeAlias(typeName, 'string', config.description, oidArrayToString(config.oid)));\n\t\t}\n\t}\n\n\t// ISO20022 Sequences and Sequence-of-Choice Types\n\tlines.push('// ISO20022 Sequence Types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.sequences)) {\n\t\tif (isSequenceOfChoice(config)) {\n\t\t\tlines.push(genSequenceOfChoiceTypes(name, config));\n\t\t} else {\n\t\t\tlines.push(genInterface(toPascalCase(name), config.fields, config.description, oidArrayToString(config.oid)));\n\t\t}\n\t}\n\tlines.push('');\n\n\t// --- Choice Type Schemas ---\n\tlines.push('// Generated ASN.1 schemas for ISO 20022 choice types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.choices)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tconst choices = Object.entries(config.choices ?? {});\n\n\t\tlines.push(`/** ASN.1 schema for ${typeName} */`);\n\n\t\tif (choices.length === 0) {\n\t\t\t// No choices defined - simple string schema\n\t\t\tlines.push(`export const ${typeName}Schema: ASN1.Schema = { type: 'string', kind: 'utf8' };`);\n\t\t} else {\n\t\t\t// Generate choice schema with context tags to make them differentiable\n\t\t\tconst choiceSchemas = choices.map(function([_ignore_choiceName, choiceConfig], index) {\n\t\t\t\tconst choiceType = choiceConfig.type.trim();\n\t\t\t\tlet containsSchema;\n\n\t\t\t\t// Check if it is a primitive type\n\t\t\t\tif (choiceType === 'UTF8String' || choiceType === 'Utf8String' || choiceType === 'string' || isEnumerationType(choiceType)) {\n\t\t\t\t\tcontainsSchema = `{ type: 'string', kind: 'utf8' }`;\n\t\t\t\t} else {\n\t\t\t\t\t// Complex type - reference its schema\n\t\t\t\t\tconst choiceTypeName = toPascalCase(choiceType);\n\t\t\t\t\tcontainsSchema = `${choiceTypeName}Schema`;\n\t\t\t\t}\n\n\t\t\t\t// Wrap in context tag to make it differentiable\n\t\t\t\treturn(`{ type: 'context', kind: 'explicit', value: ${index}, contains: ${containsSchema} }`);\n\t\t\t});\n\n\t\t\tlines.push(`export const ${typeName}Schema: ASN1.Schema = {`);\n\t\t\tlines.push(`\\tchoice: [`);\n\t\t\tlines.push(`\\t\\t${choiceSchemas.join(',\\n\\t\\t')}`);\n\t\t\tlines.push(`\\t]`);\n\t\t\tlines.push(`};`);\n\t\t}\n\t\tlines.push('');\n\t}\n\n\t// --- Regular Sequence Type Schemas (SECOND - may depend on choice schemas) ---\n\tlines.push('// Generated ASN.1 schemas for ISO 20022 regular sequence types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.sequences)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (config.fields && !isSequenceOfChoice(config)) {\n\t\t\tlines.push(`/** ASN.1 schema for ${typeName} */`);\n\t\t\tlines.push(genSequenceSchema(typeName, config.fields, config));\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// --- Sequence-of-Choice Type Schemas (THIRD - depend on regular sequence schemas) ---\n\tlines.push('// Generated ASN.1 schemas for ISO 20022 sequence-of-choice types');\n\tfor (const [name, config] of Object.entries(oidSchema.iso20022_types.sequences)) {\n\t\tif (isSequenceOfChoice(config)) {\n\t\t\tlines.push(genSequenceOfChoiceSchema(name, config));\n\t\t}\n\t}\n\n\t// --- Choice-Type Sensitive Attribute Schemas ---\n\tlines.push('// Generated ASN.1 schemas for choice-type sensitive attributes');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (config.choices) {\n\t\t\tconst choiceSchemas = Object.values(config.choices).map(function(choice) {\n\t\t\t\tconst choiceTypeName = toPascalCase(choice.type.trim());\n\t\t\t\treturn(`${choiceTypeName}Schema`);\n\t\t\t});\n\t\t\tlines.push(`/** ASN.1 schema for ${typeName} */`);\n\t\t\tlines.push(`export const ${typeName}Schema: ASN1.Schema = {`);\n\t\t\tlines.push(`\\tchoice: [`);\n\t\t\tlines.push(`\\t\\t${choiceSchemas.join(',\\n\\t\\t')}`);\n\t\t\tlines.push(`\\t]`);\n\t\t\tlines.push(`};`);\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Sensitive Attribute Types\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (!config.fields && !config.choices) {\n\t\t\t// Primitive type\n\t\t\tlet baseType;\n\t\t\tif (config.type === 'UTF8String' || config.type === 'Utf8String') {\n\t\t\t\tbaseType = 'string';\n\t\t\t} else if (config.type === 'GeneralizedTime') {\n\t\t\t\tbaseType = 'Date';\n\t\t\t} else {\n\t\t\t\tif (config.type === undefined) {\n\t\t\t\t\tthrow(new Error(`Sensitive attribute ${name} has no defined type.`));\n\t\t\t\t}\n\t\t\t\tbaseType = toPascalCase(config.type);\n\t\t\t}\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\tlines.push(`export type ${typeName} = ${baseType};`);\n\t\t\tlines.push('');\n\t\t} else if (config.fields) {\n\t\t\t// Sequence type\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\tlines.push(`export interface ${typeName} {`);\n\t\t\tfor (const [fieldName, fieldConfig] of Object.entries(config.fields)) {\n\t\t\t\tconst optional = fieldConfig.optional ? '?' : '';\n\t\t\t\tconst resolvedType = resolveTypeReference(fieldConfig.type);\n\t\t\t\tlines.push(`\\t${fieldName}${optional}: ${resolvedType};`);\n\t\t\t}\n\t\t\tlines.push('}');\n\t\t\tlines.push('');\n\t\t} else if (config.choices) {\n\t\t\t// Choice type\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\tconst hasComplexTypes = Object.values(config.choices).some(function(choice) {\n\t\t\t\tconst choiceType = choice.type.trim();\n\t\t\t\treturn(choiceType !== 'UTF8String' && choiceType !== 'string');\n\t\t\t});\n\t\t\tif (hasComplexTypes) {\n\t\t\t\tconst unionTypes = Object.values(config.choices).map(function(choice) {\n\t\t\t\t\treturn(toPascalCase(choice.type.trim()));\n\t\t\t\t});\n\t\t\t\tlines.push(`export type ${typeName} = ${unionTypes.join(' | ')};`);\n\t\t\t} else {\n\t\t\t\tlines.push(`export type ${typeName} = string;`);\n\t\t\t}\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Extension Types with fields\n\tfor (const [name, config] of Object.entries(oidSchema.extensions)) {\n\t\tif (config.fields) {\n\t\t\tconst typeName = toPascalCase(name);\n\t\t\tlines.push(`/** ${config.description} */`);\n\t\t\tif (config.oid) {\n\t\t\t\tlines.push(`/** OID: ${oidArrayToString(config.oid)} */`);\n\t\t\t}\n\t\t\tlines.push(`export interface ${typeName} {`);\n\t\t\tfor (const [fieldName, fieldConfig] of Object.entries(config.fields)) {\n\t\t\t\tconst optional = fieldConfig.optional ? '?' : '';\n\t\t\t\tconst resolvedType = resolveTypeReference(fieldConfig.type);\n\t\t\t\tlines.push(`\\t${fieldName}${optional}: ${resolvedType};`);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * The \"Reference\" type is a special case where we inject\n\t\t\t * some additional attributes when decoding.\n\t\t\t */\n\t\t\tif (typeName === 'Reference') {\n\t\t\t\tlines.push('\\t/**');\n\t\t\t\tlines.push('\\t * TODOC');\n\t\t\t\tlines.push('\\t */');\n\t\t\t\tlines.push('\\t$blob: (principals?: KeetaNetAccount[]) => Promise<Blob>;');\n\t\t\t}\n\t\t\tlines.push('}');\n\t\t\tlines.push('');\n\t\t\t// Schema\n\t\t\tlines.push(genSequenceSchema(typeName, config.fields, config));\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Token aliases for sensitive attributes\n\tlines.push('// Token aliases for sensitive attributes');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tif (config.token && config.token !== toPascalCase(name)) {\n\t\t\tconst typeName = toPascalCase(name);\n\t\t\tconst tokenName = config.token;\n\t\t\tlines.push(`/** Alias for ${typeName} */`);\n\t\t\tlines.push(`export type ${tokenName} = ${typeName};`);\n\t\t\tlines.push('');\n\t\t}\n\t}\n\n\t// Union type, value map, helper generic\n\tlines.push('/** Union type of all sensitive attribute types */');\n\tlines.push('export type SensitiveAttributeType =');\n\tlines.push(Object.keys(oidSchema.sensitive_attributes).map(function(name) {\n\t\treturn(`\\t| ${toPascalCase(name)}`);\n\t}).join('\\n') + ';');\n\tlines.push('');\n\tlines.push('/** Map of attribute name to acceptable input type for CertificateBuilder.setAttribute */');\n\tlines.push('export interface CertificateAttributeValueMap {');\n\tfor (const [name] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${name}': ${toPascalCase(name)};`);\n\t}\n\tlines.push('}');\n\tlines.push('');\n\tlines.push('/** Helper generic to get attribute value type by name */');\n\tlines.push('export type CertificateAttributeValue<Name extends keyof CertificateAttributeValueMap> = CertificateAttributeValueMap[Name];');\n\tlines.push('');\n\n\t// Field arrays and schemas for sequence types\n\t// Sort to ensure dependencies are defined before they're used\n\tconst sensitiveAttrEntries = Object.entries(oidSchema.sensitive_attributes);\n\tconst sortedEntries: [string, typeof sensitiveAttrEntries[0][1]][] = [];\n\tconst processed = new Set<string>();\n\n\tfunction hasDependency(config: typeof sensitiveAttrEntries[0][1], depName: string): boolean {\n\t\tif (!config.fields) {return(false);}\n\t\treturn(Object.values(config.fields).some(field => {\n\t\t\tconst fieldType = field.type.trim();\n\t\t\treturn(fieldType === toPascalCase(depName) || fieldType === depName);\n\t\t}));\n\t}\n\n\t// Process entries, dependencies first\n\twhile (sortedEntries.length < sensitiveAttrEntries.length) {\n\t\tfor (const [name, config] of sensitiveAttrEntries) {\n\t\t\tif (processed.has(name)) {continue;}\n\n\t\t\t// Check if all dependencies are processed\n\t\t\tlet allDepsProcessed = true;\n\t\t\tif (config.fields) {\n\t\t\t\tfor (const [otherName] of sensitiveAttrEntries) {\n\t\t\t\t\tif (otherName === name || processed.has(otherName)) {continue;}\n\t\t\t\t\tif (hasDependency(config, otherName)) {\n\t\t\t\t\t\tallDepsProcessed = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (allDepsProcessed) {\n\t\t\t\tsortedEntries.push([name, config]);\n\t\t\t\tprocessed.add(name);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const [name, config] of sortedEntries) {\n\t\tconst typeName = toPascalCase(name);\n\t\tif (config.fields) {\n\t\t\tconst fieldOrder = config.field_order ?? Object.keys(config.fields);\n\t\t\tlines.push(`export const ${typeName}Fields = [${fieldOrder.map(function(field) {\n\t\t\t\treturn(`'${field}'`);\n\t\t\t}).join(', ')}] as const;`);\n\t\t\tlines.push(genSequenceSchema(typeName, config.fields, config));\n\t\t}\n\t}\n\n\t// OID DB\n\tlines.push('export const CertificateAttributeOIDDB = {');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${name}': '${oidArrayToString(config.oid)}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('} as const;');\n\tlines.push('');\n\n\t// Sensitive attribute list\n\tlines.push('export const SENSITIVE_CERTIFICATE_ATTRIBUTES = [');\n\tfor (const name of Object.keys(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${name}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('] as const;');\n\tlines.push('');\n\n\tlines.push('export type SensitiveCertificateAttributeNames = typeof SENSITIVE_CERTIFICATE_ATTRIBUTES[number];');\n\tlines.push('');\n\n\t// PascalCase names\n\tlines.push('export const SensitiveCertificateAttributeNames = [');\n\tfor (const name of Object.keys(oidSchema.sensitive_attributes)) {\n\t\tlines.push(`\\t'${toPascalCase(name)}',`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('] as const;');\n\tlines.push('');\n\n\t// Field name mapping\n\tlines.push('export const CertificateAttributeFieldNames: { readonly [K in keyof typeof CertificateAttributeOIDDB]?: readonly string[] } = {');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tif (config.fields) {\n\t\t\tconst typeName = toPascalCase(name);\n\t\t\tlines.push(`\\t'${name}': ${typeName}Fields,`);\n\t\t}\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('} as const;');\n\tlines.push('');\n\n\t// Complete schema mapping (ONCE, at the end)\n\tlines.push('export const CertificateAttributeSchema: { readonly [K in keyof typeof CertificateAttributeOIDDB]: ASN1.Schema } = {');\n\tfor (const [name, config] of Object.entries(oidSchema.sensitive_attributes)) {\n\t\tconst typeName = toPascalCase(name);\n\t\tlet schemaRef;\n\t\tif (config.fields) {\n\t\t\tschemaRef = `${typeName}Schema`;\n\t\t} else if (config.choices) {\n\t\t\tschemaRef = `${typeName}Schema`;\n\t\t} else {\n\t\t\tif (config.type === undefined) {\n\t\t\t\tthrow(new Error(`Sensitive attribute ${name} has no defined type.`));\n\t\t\t}\n\t\t\tconst baseType = resolveToBaseType(config.type);\n\t\t\tconst baseTypeSnake = toSnakeCase(baseType);\n\t\t\tconst isExtensionType = oidSchema.extensions[baseTypeSnake]?.fields ?? oidSchema.extensions[baseType]?.fields;\n\t\t\tconst isSensitiveType = oidSchema.sensitive_attributes[toSnakeCase(baseType)]?.fields ?? oidSchema.sensitive_attributes[baseType]?.fields;\n\n\t\t\tif (isSensitiveType) {\n\t\t\t\tschemaRef = `${baseType}Schema`;\n\t\t\t} else if (isExtensionType) {\n\t\t\t\tschemaRef = `${baseType}Schema`;\n\t\t\t} else if (baseType === 'GeneralizedTime') {\n\t\t\t\tschemaRef = 'ASN1.ValidateASN1.IsDate';\n\t\t\t} else if (baseType === 'OCTET STRING') {\n\t\t\t\tschemaRef = 'ASN1.ValidateASN1.IsOctetString';\n\t\t\t} else if (baseType === 'OBJECT IDENTIFIER') {\n\t\t\t\tschemaRef = 'ASN1.ValidateASN1.IsOID';\n\t\t\t} else {\n\t\t\t\tschemaRef = `{ type: 'string', kind: 'utf8' }`;\n\t\t\t}\n\t\t}\n\t\tlines.push(`\\t'${name}': ${schemaRef},`);\n\t}\n\tdeleteLastCommaIfFound();\n\tlines.push('} as const;');\n\tlines.push('');\n\n\treturn(lines.join('\\n'));\n}\n\nfunction parseArgs(argv: string[]): { oidsJSONPath: string; oidsOutputPath: string; iso20022OutputPath: string } {\n\tlet oidsJSONPath: string | undefined = undefined;\n\tlet oidsOutputPath: string | undefined = undefined;\n\tlet iso20022OutputPath: string | undefined = undefined;\n\tfor (const arg of argv) {\n\t\tif (arg.startsWith('--oids-json=')) {\n\t\t\toidsJSONPath = arg.substring('--oids-json='.length);\n\t\t}\n\t\tif (arg.startsWith('--oids-output=')) {\n\t\t\toidsOutputPath = arg.substring('--oids-output='.length);\n\t\t}\n\t\tif (arg.startsWith('--iso20022-output=')) {\n\t\t\tiso20022OutputPath = arg.substring('--iso20022-output='.length);\n\t\t}\n\t}\n\n\tif (oidsJSONPath === undefined) {\n\t\tthrow(new Error('Missing required argument: --oids-json=path/to/oids.json'));\n\t}\n\tif (oidsOutputPath === undefined) {\n\t\tthrow(new Error('Missing required argument: --oids-output=path/to/oids.generated.ts'));\n\t}\n\tif (iso20022OutputPath === undefined) {\n\t\tthrow(new Error('Missing required argument: --iso20022-output=path/to/iso20022.generated.ts'));\n\t}\n\tif (!fs.existsSync(oidsJSONPath)) {\n\t\tthrow(new Error(`OID JSON file not found: ${oidsJSONPath}`));\n\t}\n\treturn({\n\t\toidsJSONPath,\n\t\toidsOutputPath,\n\t\tiso20022OutputPath\n\t});\n}\n\n// --- Main ---\nfunction main(argv: string[]): void {\n\tconst {\n\t\toidsJSONPath,\n\t\toidsOutputPath,\n\t\tiso20022OutputPath\n\t} = parseArgs(argv);\n\n\tfs.mkdirSync(path.dirname(oidsOutputPath), { recursive: true });\n\tfs.mkdirSync(path.dirname(iso20022OutputPath), { recursive: true });\n\n\toidSchema = typia.assert<oidSchemaContents>(JSON.parse(fs.readFileSync(oidsJSONPath, 'utf8')));\n\n\tfs.writeFileSync(oidsOutputPath, generateOidConstants(), 'utf8');\n\tfs.writeFileSync(iso20022OutputPath, generateIso20022Types(), 'utf8');\n}\n\nmain(process.argv.slice(2));\n"]}
|