Skip to content

Commit

Permalink
feat: update protos (#6)
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Enerio <[email protected]>
Co-authored-by: Kirill Bubochkin <[email protected]>
  • Loading branch information
3 people authored Oct 18, 2024
1 parent a7a854e commit fa1f67b
Show file tree
Hide file tree
Showing 14 changed files with 533 additions and 210 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"tabWidth": 2,
"useTabs": false,
"singleQuote": false,
"printWidth" : 80,
"printWidth" : 120,
"semi": true,
"trailingComma": "es5",
"endOfLine": "lf",
Expand Down
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,37 +91,38 @@ You will receive the following structure, where you can see data and verificatio
{
"value": "[email protected]",
"dataId": "2bf9ad39-b213-4b77-b077-872e93301814",
"verified": true
"status": "APPROVED"
}
],
"phone": [
{
"value": "+12345678",
"dataId": "6d01814f-431d-4ca6-a4c3-c76ef7fc7343",
"verified": false
"status": "UNSPECIFIED"
}
],
"name": [
{
"firstName": "John",
"lastName": "Doe",
"dataId": "2a1b66b2-7bef-4b04-8f13-e7baed9e06eb",
"verified": false
"status": "UNSPECIFIED"
}
],
"birthDate": [
{
"value": "2000-03-29T21:00:00.000Z",
"dataId": "372b9e44-300c-443a-882b-af8cd7ff53d9",
"verified": false
"status": "UNSPECIFIED"
}
],
"document": [
{
"type": "DOCUMENT_TYPE_VOTER_ID",
"number": "1233123",
"countryCode": "NG",
"dataId": "3943bec8-b88d-450d-816b-3faab743ff24",
"verified": false
"status": "UNSPECIFIED"
}
],
"bankInfo": [
Expand All @@ -130,39 +131,40 @@ You will receive the following structure, where you can see data and verificatio
"accountNumber": "accountNumber",
"bankCode": "bankCode",
"dataId": "54727f50-378d-4d14-bada-5f488b751361",
"verified": false
"status": "UNSPECIFIED"
}
],
"selfie": [
{
"value": {
"1": 60,
"2": 115,
"3": 118,
"4": 103,
"5": 32,
"6": 119,
"7": 105,
"8": 100,
"9": 116,
"10": 104,
"11": 61,
"12": 34,
//...
},
"value": {
"1": 60,
"2": 115,
"3": 118,
"4": 103,
"5": 32,
"6": 119
//...
},
"dataId": "372b9e44-300c-443a-882b-a3234142429",
"verified": false
"status": "UNSPECIFIED"
}
],
"custom": {
"kyc": "\"result\""
}
}
```

> [!NOTE]
> - The `verified` flag indicates whether the information has been verified.
> - Its possible to have empty arrays meaning no data is available.
> - The `custom` field contains verification results from external sources like SmileID and etc.
>
> - The `status` field indicates the verification status of each piece of information. Possible statuses are:
> - `UNSPECIFIED`: The default state, not yet processed.
> - `PENDING`: Verification is in progress.
> - `APPROVED`: The information has been verified and approved.
> - `REJECTED`: The information was checked but not approved.
> - `UNVERIFIED`: The information has not been verified.
> - It's possible to have `null` value meaning no data is available.
> - The `custom` field contains verification results from external sources like SmileID or other KYC providers.
### Accepting and Completing the On-Ramp Order

Expand Down
2 changes: 1 addition & 1 deletion dist/generated/google/protobuf/timestamp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.2.3
// protoc-gen-ts_proto v2.2.4
// protoc v5.27.1
// source: google/protobuf/timestamp.proto
/* eslint-disable */
Expand Down
17 changes: 16 additions & 1 deletion dist/generated/protos/data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ export declare enum DocumentType {
}
export declare function documentTypeFromJSON(object: any): DocumentType;
export declare function documentTypeToJSON(object: DocumentType): string;
export declare enum ValidationStatus {
VALIDATION_STATUS_UNSPECIFIED = 0,
VALIDATION_STATUS_PENDING = 1,
VALIDATION_STATUS_APPROVED = 2,
VALIDATION_STATUS_REJECTED = 3,
UNRECOGNIZED = -1
}
export declare function validationStatusFromJSON(object: any): ValidationStatus;
export declare function validationStatusToJSON(object: ValidationStatus): string;
export interface WrappedData {
email?: string | undefined;
name?: Name | undefined;
Expand All @@ -23,16 +32,21 @@ export interface Name {
export interface Document {
type: DocumentType;
number: string;
countryCode: string;
}
export interface BankInfo {
accountNumber: string;
bankCode: string;
bankName: string;
}
export interface WrappedValidation {
hash?: string | undefined;
hash?: HashValidation | undefined;
custom?: CustomValidation | undefined;
}
export interface HashValidation {
hash: string;
status: ValidationStatus;
}
export interface CustomValidation {
type: string;
data: Uint8Array;
Expand All @@ -42,6 +56,7 @@ export declare const Name: MessageFns<Name>;
export declare const Document: MessageFns<Document>;
export declare const BankInfo: MessageFns<BankInfo>;
export declare const WrappedValidation: MessageFns<WrappedValidation>;
export declare const HashValidation: MessageFns<HashValidation>;
export declare const CustomValidation: MessageFns<CustomValidation>;
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
Expand Down
Loading

0 comments on commit fa1f67b

Please sign in to comment.