UNPKG

@complycube/react-native

Version:

ComplyCube's React Native Mobile SDK library for Identity Verification, KYC, and AML

309 lines (307 loc) 8.89 kB
import countries from './countryCodes'; export default { type: 'object', properties: { clientID: { type: 'string' }, clientToken: { type: 'string' }, language: { type: 'string' }, stages: { type: 'array', items: { type: ['object', 'string'], anyOf: [ { $ref: '#/definitions/intro' }, // {$ref: "#/definitions/stringStage"}, { $ref: '#/definitions/consent' }, { $ref: '#/definitions/documentCapture' }, { $ref: '#/definitions/poaCapture' }, { $ref: '#/definitions/faceCapture' }, { $ref: '#/definitions/outro' }, { $ref: '#/definitions/addressCapture' }, { type: 'string', enum: [ 'intro', 'consent', 'documentCapture', 'poaCapture', 'faceCapture', 'addressCapture', ], }, ], }, }, lookAndFeel: { type: 'object', properties: { popUpBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, popUpTitleColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, primaryButtonBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, primaryButtonTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, primaryButtonBorderColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, primaryButtonPressedBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, secondaryButtonBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, secondaryButtonTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, secondaryButtonBorderColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, secondaryButtonPressedBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, docTypeBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, docTypeBorderColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, blueBigType: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, headerTitle: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, linkButtonTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, // Not android subheaderTitle: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, textItemType: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, textSecondary: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, borderRadius: { type: 'integer', }, // ------------------------------------------- infoPanelBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, infoPanelTitleColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, documentTypeSelectorBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, documentTypeSelectorBorderColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, headingTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, subheadingTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, bodyTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, documentTypeSelectorIconColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, documentTypeSelectorTiteTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, documentTypeSelectorDescriptionTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, infoPanelIconColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, infoPanelDescriptionTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, errorPanelBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, errorPanelIconColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, errorPanelTitleColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, errorPanelDescriptionTextColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, cameraButtonBgColor: { type: 'string', pattern: '^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$', }, uiInterfaceStyle: { type: 'string', enum: ['dark', 'light', 'inherit'], }, }, additionalProperties: false, }, }, definitions: { stringStage: { type: 'string', enum: [ 'intro', 'consent', 'documentCapture', 'poaCapture', 'faceCapture', 'outro', ], }, intro: { type: 'object', properties: { name: { type: 'string', enum: ['intro'] }, heading: { type: 'string' }, message: { type: 'string' }, }, required: ['name'], }, consent: { type: 'object', properties: { name: { type: 'string', enum: ['consent'] }, heading: { type: 'string' }, message: { type: 'string' }, }, required: ['name'], }, documentCapture: { type: 'object', properties: { name: { type: 'string', enum: ['documentCapture'] }, showGuidance: { type: 'boolean' }, useMLAssistance: { type: 'boolean' }, retryLimit: { type: 'integer' }, liveCapture: { type: 'boolean' }, nfcEnabled: { type: 'boolean' }, documentTypes: { type: 'object', properties: { passport: { $ref: '#/definitions/documentType' }, driving_license: { $ref: '#/definitions/documentType' }, national_identity_card: { $ref: '#/definitions/documentType' }, residence_permit: { $ref: '#/definitions/documentType' }, }, }, }, }, poaCapture: { type: 'object', properties: { name: { type: 'string', enum: ['poaCapture'] }, showGuidance: { type: 'boolean' }, useMLAssistance: { type: 'boolean' }, retryLimit: { type: 'integer' }, liveCapture: { type: 'boolean' }, documentTypes: { type: 'object', properties: { bank_statement: { $ref: '#/definitions/documentType' }, utility_bill: { $ref: '#/definitions/documentType' }, }, }, }, }, faceCapture: { type: 'object', properties: { name: { type: 'string', enum: ['faceCapture'] }, mode: { type: 'string', enum: ['photo', 'video'] }, showGuidance: { type: 'boolean' }, useMLAssistance: { type: 'boolean' }, retryLimit: { type: 'integer' }, liveCapture: { type: 'boolean' }, }, }, outro: { type: 'object', properties: { name: { type: 'string', enum: ['outro'] }, heading: { type: 'string' }, message: { type: 'string' }, }, }, addressCapture: { type: 'object', properties: { allowedCountries: { type: 'array', items: { type: 'string', enum: countries, }, }, enableAutoComplete: { type: 'boolean' } }, }, //------------------------- documentType: { type: ['boolean', 'array'], anyOf: [ { type: 'boolean' }, { type: 'array', items: { type: 'string', enum: countries, }, }, ], }, }, required: ['clientID', 'clientToken'], };