New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for new KYC schema #121
Conversation
src/kyc.ts
Outdated
} | ||
export const kycSchemaSchema = z.nativeEnum(KycSchema, { | ||
description: 'kycSchemaSchema', | ||
}) | ||
|
||
export enum KycDocumentType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the naming convention used in the specification itself; this should be IdentificationDocumentType.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, changed.
src/kyc.ts
Outdated
phoneNumber: z.string(), | ||
email: z.string(), | ||
selfieDocument: z.string(), | ||
identificationDocumentType: z.enum(['IDC', 'PAS', 'DL']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reference the type created above rather than repeating the hardcoded string values here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Changed
similar to #121 but includes more semantics in the zod schemas, in particular: - when the back of the document is required - what the email should look like also more DRY with the existing kyc schema
superceded by #122 |
According to revised spec with the new KYC schema
PersonalDataAndDocumentsDetailed
(https://github.com/fiatconnect/specification/blob/main/fiatconnect-api.md#9312-personaldataanddocumentsdetailed):