Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

nunolleite
Copy link
Contributor

According to revised spec with the new KYC schema PersonalDataAndDocumentsDetailed(https://github.com/fiatconnect/specification/blob/main/fiatconnect-api.md#9312-personaldataanddocumentsdetailed):

  • Added new kyc schema
  • Added new document type enum

src/kyc.ts Outdated
}
export const kycSchemaSchema = z.nativeEnum(KycSchema, {
description: 'kycSchemaSchema',
})

export enum KycDocumentType {
Copy link
Contributor

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.

Copy link
Contributor Author

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']),
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Changed

cajubelt added a commit that referenced this pull request Feb 3, 2023
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
@cajubelt
Copy link
Contributor

cajubelt commented Feb 3, 2023

superceded by #122

@cajubelt cajubelt closed this Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants