@moonpay/platform-protocol 1.6.0 → 1.7.0
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/README.md +3 -2
- package/dist/api/customer.cjs +19 -0
- package/dist/api/customer.cjs.map +1 -0
- package/dist/api/customer.d.cts +1254 -0
- package/dist/api/customer.d.ts +1254 -0
- package/dist/api/customer.js +1 -0
- package/dist/api/customer.js.map +1 -0
- package/dist/api/errors.cjs.map +1 -1
- package/dist/api/errors.d.cts +12 -1
- package/dist/api/errors.d.ts +12 -1
- package/dist/api/errors.js.map +1 -1
- package/dist/api/identity.cjs.map +1 -1
- package/dist/api/identity.d.cts +1 -156
- package/dist/api/identity.d.ts +1 -156
- package/dist/api/index.d.cts +1 -569
- package/dist/api/index.d.ts +1 -569
- package/dist/frames/customer-export.cjs +19 -0
- package/dist/frames/customer-export.cjs.map +1 -0
- package/dist/frames/customer-export.d.cts +17 -0
- package/dist/frames/customer-export.d.ts +17 -0
- package/dist/frames/customer-export.js +1 -0
- package/dist/frames/customer-export.js.map +1 -0
- package/dist/sdks/customer-export.cjs +19 -0
- package/dist/sdks/customer-export.cjs.map +1 -0
- package/dist/sdks/customer-export.d.cts +20 -0
- package/dist/sdks/customer-export.d.ts +20 -0
- package/dist/sdks/customer-export.js +1 -0
- package/dist/sdks/customer-export.js.map +1 -0
- package/package.json +33 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/api/errors.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\nexport type CreateIdentityError = DevPlatformApiError;\nexport type GetIdentityError = DevPlatformApiError;\nexport type UpdateIdentityError = DevPlatformApiError;\nexport type VerifyIdentityError = DevPlatformApiError;\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\n/** @deprecated Use the Customer API errors below instead. */\nexport type CreateIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerError} instead. */\nexport type GetIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerKycError} instead. */\nexport type UpdateIdentityError = DevPlatformApiError;\n/** @deprecated No longer needed — Customer API verification has no direct replacement call. */\nexport type VerifyIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerFilesError} instead. */\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n\nexport type GetCustomerError = DevPlatformApiError;\nexport type SubmitCustomerKycError = DevPlatformApiError;\nexport type GetCustomerUploadUrlError = DevPlatformApiError;\nexport type SubmitCustomerFilesError = DevPlatformApiError;\nexport type ExportCustomerError = DevPlatformApiError;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
package/dist/api/errors.d.cts
CHANGED
|
@@ -37,11 +37,22 @@ type GetPaymentMethodsError = DevPlatformApiError;
|
|
|
37
37
|
type GetTransactionsError = DevPlatformApiError;
|
|
38
38
|
type CreateSessionError = DevPlatformApiError;
|
|
39
39
|
type RevokeSessionError = DevPlatformApiError;
|
|
40
|
+
/** @deprecated Use the Customer API errors below instead. */
|
|
40
41
|
type CreateIdentityError = DevPlatformApiError;
|
|
42
|
+
/** @deprecated Use {@link GetCustomerError} instead. */
|
|
41
43
|
type GetIdentityError = DevPlatformApiError;
|
|
44
|
+
/** @deprecated Use {@link SubmitCustomerKycError} instead. */
|
|
42
45
|
type UpdateIdentityError = DevPlatformApiError;
|
|
46
|
+
/** @deprecated No longer needed — Customer API verification has no direct replacement call. */
|
|
43
47
|
type VerifyIdentityError = DevPlatformApiError;
|
|
48
|
+
/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */
|
|
44
49
|
type GetIdentityUploadUrlError = DevPlatformApiError;
|
|
50
|
+
/** @deprecated Use {@link SubmitCustomerFilesError} instead. */
|
|
45
51
|
type SubmitIdentityFilesError = DevPlatformApiError;
|
|
52
|
+
type GetCustomerError = DevPlatformApiError;
|
|
53
|
+
type SubmitCustomerKycError = DevPlatformApiError;
|
|
54
|
+
type GetCustomerUploadUrlError = DevPlatformApiError;
|
|
55
|
+
type SubmitCustomerFilesError = DevPlatformApiError;
|
|
56
|
+
type ExportCustomerError = DevPlatformApiError;
|
|
46
57
|
|
|
47
|
-
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type GetAssetsError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
|
58
|
+
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type ExportCustomerError, type GetAssetsError, type GetCustomerError, type GetCustomerUploadUrlError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitCustomerFilesError, type SubmitCustomerKycError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
package/dist/api/errors.d.ts
CHANGED
|
@@ -37,11 +37,22 @@ type GetPaymentMethodsError = DevPlatformApiError;
|
|
|
37
37
|
type GetTransactionsError = DevPlatformApiError;
|
|
38
38
|
type CreateSessionError = DevPlatformApiError;
|
|
39
39
|
type RevokeSessionError = DevPlatformApiError;
|
|
40
|
+
/** @deprecated Use the Customer API errors below instead. */
|
|
40
41
|
type CreateIdentityError = DevPlatformApiError;
|
|
42
|
+
/** @deprecated Use {@link GetCustomerError} instead. */
|
|
41
43
|
type GetIdentityError = DevPlatformApiError;
|
|
44
|
+
/** @deprecated Use {@link SubmitCustomerKycError} instead. */
|
|
42
45
|
type UpdateIdentityError = DevPlatformApiError;
|
|
46
|
+
/** @deprecated No longer needed — Customer API verification has no direct replacement call. */
|
|
43
47
|
type VerifyIdentityError = DevPlatformApiError;
|
|
48
|
+
/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */
|
|
44
49
|
type GetIdentityUploadUrlError = DevPlatformApiError;
|
|
50
|
+
/** @deprecated Use {@link SubmitCustomerFilesError} instead. */
|
|
45
51
|
type SubmitIdentityFilesError = DevPlatformApiError;
|
|
52
|
+
type GetCustomerError = DevPlatformApiError;
|
|
53
|
+
type SubmitCustomerKycError = DevPlatformApiError;
|
|
54
|
+
type GetCustomerUploadUrlError = DevPlatformApiError;
|
|
55
|
+
type SubmitCustomerFilesError = DevPlatformApiError;
|
|
56
|
+
type ExportCustomerError = DevPlatformApiError;
|
|
46
57
|
|
|
47
|
-
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type GetAssetsError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
|
58
|
+
export { type CreateIdentityError, type CreateSessionError, type DevPlatformApiError, type DevPlatformApiErrorCode, DevPlatformApiErrorCodes, type DevPlatformApiErrorDetail, type ExportCustomerError, type GetAssetsError, type GetCustomerError, type GetCustomerUploadUrlError, type GetIdentityError, type GetIdentityUploadUrlError, type GetPaymentMethodsError, type GetQuoteError, type GetTransactionsError, type RevokeSessionError, type SubmitCustomerFilesError, type SubmitCustomerKycError, type SubmitIdentityFilesError, type UpdateIdentityError, type VerifyIdentityError };
|
package/dist/api/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\nexport type CreateIdentityError = DevPlatformApiError;\nexport type GetIdentityError = DevPlatformApiError;\nexport type UpdateIdentityError = DevPlatformApiError;\nexport type VerifyIdentityError = DevPlatformApiError;\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n"],"mappings":";AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/api/errors.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// API errors\n// ---------------------------------------------------------------------------\n\nexport const DevPlatformApiErrorCodes = {\n unknownError: 'unknown_error',\n unauthorized: 'unauthorized',\n forbidden: 'forbidden',\n notFound: 'not_found',\n invalidRequest: 'invalid_request',\n notImplemented: 'not_implemented',\n tooManyRequests: 'too_many_requests',\n notAllowed: 'not_allowed',\n conflict: 'conflict',\n unprocessableEntity: 'unprocessable_entity',\n sseTimeout: 'sse_timeout',\n sseError: 'sse_error',\n connectionRequired: 'connection_required',\n connectionPending: 'connection_pending',\n connectionUnavailable: 'connection_unavailable',\n serviceUnavailable: 'service_unavailable',\n requirementsIncomplete: 'requirements_incomplete',\n verificationRejected: 'verification_rejected',\n countryMismatch: 'country_mismatch',\n unsupportedCountry: 'unsupported_country',\n} as const;\n\nexport type DevPlatformApiErrorCode =\n (typeof DevPlatformApiErrorCodes)[keyof typeof DevPlatformApiErrorCodes];\n\nexport interface DevPlatformApiErrorDetail {\n field?: string;\n message: string;\n}\n\n/** Shape returned by the MoonPay Platform API on error responses. */\nexport interface DevPlatformApiError {\n code: DevPlatformApiErrorCode;\n message: string;\n errors?: DevPlatformApiErrorDetail[];\n}\n\n// ---------------------------------------------------------------------------\n// API call result errors (all alias DevPlatformApiError)\n// ---------------------------------------------------------------------------\n\nexport type GetQuoteError = DevPlatformApiError;\nexport type GetAssetsError = DevPlatformApiError;\nexport type GetPaymentMethodsError = DevPlatformApiError;\nexport type GetTransactionsError = DevPlatformApiError;\nexport type CreateSessionError = DevPlatformApiError;\nexport type RevokeSessionError = DevPlatformApiError;\n/** @deprecated Use the Customer API errors below instead. */\nexport type CreateIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerError} instead. */\nexport type GetIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerKycError} instead. */\nexport type UpdateIdentityError = DevPlatformApiError;\n/** @deprecated No longer needed — Customer API verification has no direct replacement call. */\nexport type VerifyIdentityError = DevPlatformApiError;\n/** @deprecated Use {@link GetCustomerUploadUrlError} instead. */\nexport type GetIdentityUploadUrlError = DevPlatformApiError;\n/** @deprecated Use {@link SubmitCustomerFilesError} instead. */\nexport type SubmitIdentityFilesError = DevPlatformApiError;\n\nexport type GetCustomerError = DevPlatformApiError;\nexport type SubmitCustomerKycError = DevPlatformApiError;\nexport type GetCustomerUploadUrlError = DevPlatformApiError;\nexport type SubmitCustomerFilesError = DevPlatformApiError;\nexport type ExportCustomerError = DevPlatformApiError;\n"],"mappings":";AAIO,IAAM,2BAA2B;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,wBAAwB;AAAA,EACxB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,oBAAoB;AACtB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/api/identity.ts"],"sourcesContent":["/**\n * Identity API types.\n *\n *
|
|
1
|
+
{"version":3,"sources":["../../src/api/identity.ts"],"sourcesContent":["/**\n * Identity API types.\n *\n * @deprecated The Identity API is deprecated (DEVXP-1454) in favor of the\n * Customer API (`./customer.js`). Re-exported from the generated OpenAPI\n * types — see `./gen/index.js`.\n */\nexport type {\n CapabilityProduct,\n CreateIdentityRequestBody,\n CreateIdentityResidentialAddress,\n Identity,\n IdentityBasicDetailsSubmission,\n IdentityCapability,\n IdentityFileMimeType,\n IdentityFileSide,\n IdentityFileSubmission,\n IdentityFileType,\n IdentityFileUploadUrl,\n IdentityFileUploadUrlHeaders,\n IdentityFileUploadUrlRequestBody,\n IdentityPhoneNumberSubmission,\n IdentityQuestionnaireSubmission,\n IdentityResidentialAddressSubmission,\n IdentityStatus,\n IdentityTaxIdentifierGenericSubmission,\n IdentityTaxIdentifierSchemeSubmission,\n IdentityTaxIdentifierSubmission,\n IdentityVerificationChallenge,\n IdentityVerificationResponse,\n IdentityVerificationStatus,\n RequirementEntry,\n RequirementFieldName,\n RequirementItemStatus,\n Requirements,\n SubmitIdentityFilesRequestBody,\n UpdateIdentityRequestBody,\n} from './gen/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/api/identity.d.cts
CHANGED
|
@@ -1,156 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Identity API types.
|
|
3
|
-
*
|
|
4
|
-
* Sourced from `moonpay-api/packages/dev-platform/modules/identity/main.tsp`.
|
|
5
|
-
* The TypeSpec is marked `@vnext` and is not yet emitted into the public
|
|
6
|
-
* OpenAPI spec, so these types are hand-rolled. Once the spec ships, replace
|
|
7
|
-
* with aliases re-exported from `./gen/` (same pattern as `Quote`, `Identity`,
|
|
8
|
-
* etc. in `api.ts`).
|
|
9
|
-
*/
|
|
10
|
-
/** A platform capability a partner wants the customer to unlock. */
|
|
11
|
-
type CapabilityProduct = 'ramps';
|
|
12
|
-
/** A requested capability scoped to an identity. */
|
|
13
|
-
interface IdentityCapability {
|
|
14
|
-
product: CapabilityProduct;
|
|
15
|
-
}
|
|
16
|
-
/** The state of an identity across the KYC lifecycle. */
|
|
17
|
-
type IdentityStatus = 'created' | 'collecting' | 'verifying' | 'challengeRequired' | 'approved' | 'rejected' | 'manualReview' | 'blocked';
|
|
18
|
-
/** The completion state of a requirement item. */
|
|
19
|
-
type RequirementItemStatus = 'incomplete' | 'complete';
|
|
20
|
-
/** A field a customer must provide to fulfil a requirement. */
|
|
21
|
-
type RequirementFieldName = 'firstName' | 'lastName' | 'dateOfBirth' | 'nationality' | 'street' | 'locality' | 'postalCode' | 'country' | 'administrativeArea' | 'ssn' | 'cpf' | 'tin';
|
|
22
|
-
/** Status of a single requirement group on an identity. */
|
|
23
|
-
interface RequirementEntry {
|
|
24
|
-
status: RequirementItemStatus;
|
|
25
|
-
requiredFields?: RequirementFieldName[];
|
|
26
|
-
}
|
|
27
|
-
/** Outstanding and completed requirements for the identity, keyed by category. */
|
|
28
|
-
interface Requirements {
|
|
29
|
-
basicDetails?: RequirementEntry;
|
|
30
|
-
residentialAddress?: RequirementEntry;
|
|
31
|
-
identityDocuments?: RequirementEntry;
|
|
32
|
-
selfie?: RequirementEntry;
|
|
33
|
-
taxIdentifiers?: RequirementEntry;
|
|
34
|
-
proofOfAddress?: RequirementEntry;
|
|
35
|
-
phoneNumber?: RequirementEntry;
|
|
36
|
-
}
|
|
37
|
-
/** Residential-address fields accepted at identity creation. */
|
|
38
|
-
interface CreateIdentityResidentialAddress {
|
|
39
|
-
/** ISO 3166-1 alpha-3 country code declared by the partner. */
|
|
40
|
-
country: string;
|
|
41
|
-
}
|
|
42
|
-
/** Request body for creating an identity. */
|
|
43
|
-
interface CreateIdentityRequestBody {
|
|
44
|
-
residentialAddress: CreateIdentityResidentialAddress;
|
|
45
|
-
/** Capabilities the partner wants the customer to unlock. Must contain at least one value. */
|
|
46
|
-
capabilities: IdentityCapability[];
|
|
47
|
-
}
|
|
48
|
-
/** Customer's basic personal details. */
|
|
49
|
-
interface IdentityBasicDetailsSubmission {
|
|
50
|
-
firstName?: string;
|
|
51
|
-
lastName?: string;
|
|
52
|
-
nationality?: string;
|
|
53
|
-
/** YYYY-MM-DD. */
|
|
54
|
-
dateOfBirth?: string;
|
|
55
|
-
}
|
|
56
|
-
/** Customer's residential address. */
|
|
57
|
-
interface IdentityResidentialAddressSubmission {
|
|
58
|
-
country?: string;
|
|
59
|
-
administrativeArea?: string;
|
|
60
|
-
locality?: string;
|
|
61
|
-
street?: string;
|
|
62
|
-
subStreet?: string;
|
|
63
|
-
postalCode?: string;
|
|
64
|
-
}
|
|
65
|
-
/** Customer's phone number in E.164 format. */
|
|
66
|
-
interface IdentityPhoneNumberSubmission {
|
|
67
|
-
number: string;
|
|
68
|
-
}
|
|
69
|
-
/** Type of tax identifier the customer is submitting. */
|
|
70
|
-
type IdentityTaxIdentifierType = 'tin' | 'ssn' | 'cpf';
|
|
71
|
-
/** Tax Identification Number — country must be supplied. */
|
|
72
|
-
interface IdentityTaxIdentifierGenericSubmission {
|
|
73
|
-
type: 'tin';
|
|
74
|
-
country: string;
|
|
75
|
-
value: string;
|
|
76
|
-
}
|
|
77
|
-
/** Country-specific tax identifier (SSN/CPF). */
|
|
78
|
-
interface IdentityTaxIdentifierSchemeSubmission {
|
|
79
|
-
type: 'ssn' | 'cpf';
|
|
80
|
-
value: string;
|
|
81
|
-
}
|
|
82
|
-
type IdentityTaxIdentifierSubmission = IdentityTaxIdentifierGenericSubmission | IdentityTaxIdentifierSchemeSubmission;
|
|
83
|
-
/** Request body for updating an identity by submitting one or more requirements. */
|
|
84
|
-
interface UpdateIdentityRequestBody {
|
|
85
|
-
residentialAddress?: IdentityResidentialAddressSubmission;
|
|
86
|
-
basicDetails?: IdentityBasicDetailsSubmission;
|
|
87
|
-
phoneNumber?: IdentityPhoneNumberSubmission;
|
|
88
|
-
taxIdentifiers?: IdentityTaxIdentifierSubmission[];
|
|
89
|
-
}
|
|
90
|
-
/** A MoonPay-hosted challenge a partner must surface to the customer. */
|
|
91
|
-
interface IdentityVerificationChallenge {
|
|
92
|
-
/** Fully-formed challenge URL. */
|
|
93
|
-
url: string;
|
|
94
|
-
/** ISO 8601 expiry. */
|
|
95
|
-
expiresAt: string;
|
|
96
|
-
}
|
|
97
|
-
/** The state of an identity verification request. */
|
|
98
|
-
type IdentityVerificationStatus = 'approved' | 'processing' | 'challengeRequired';
|
|
99
|
-
/** Outcome of `POST /platform/v1/identities/{id}/verifications`. */
|
|
100
|
-
type IdentityVerificationResponse = {
|
|
101
|
-
status: 'approved';
|
|
102
|
-
} | {
|
|
103
|
-
status: 'processing';
|
|
104
|
-
} | {
|
|
105
|
-
status: 'challengeRequired';
|
|
106
|
-
challenge: IdentityVerificationChallenge;
|
|
107
|
-
};
|
|
108
|
-
/** Type of identity-related file the customer is uploading. */
|
|
109
|
-
type IdentityFileType = 'drivingLicence' | 'nationalIdentityCard' | 'passport' | 'residencePermit' | 'selfie' | 'proofOfAddress';
|
|
110
|
-
/** Side of a two-sided identity document. */
|
|
111
|
-
type IdentityFileSide = 'front' | 'back';
|
|
112
|
-
/** MIME type of the file being uploaded. */
|
|
113
|
-
type IdentityFileMimeType = 'image/jpeg' | 'image/png' | 'application/pdf';
|
|
114
|
-
/** Request body for issuing a presigned upload URL. */
|
|
115
|
-
interface IdentityFileUploadUrlRequestBody {
|
|
116
|
-
fileType: IdentityFileType;
|
|
117
|
-
/** Required for two-sided file types (`drivingLicence`, `nationalIdentityCard`, `residencePermit`); omit for single-sided. */
|
|
118
|
-
side?: IdentityFileSide;
|
|
119
|
-
/** Must match the `Content-Type` header used on the subsequent upload request. */
|
|
120
|
-
mimeType: IdentityFileMimeType;
|
|
121
|
-
}
|
|
122
|
-
/** Headers the partner must send when uploading the file to the presigned URL. */
|
|
123
|
-
interface IdentityFileUploadUrlHeaders {
|
|
124
|
-
'Content-Type': string;
|
|
125
|
-
}
|
|
126
|
-
/** Presigned URL the partner uses to upload an identity-related file. */
|
|
127
|
-
interface IdentityFileUploadUrl {
|
|
128
|
-
uploadId: string;
|
|
129
|
-
url: string;
|
|
130
|
-
/** ISO 8601 expiry. */
|
|
131
|
-
expiresAt: string;
|
|
132
|
-
headers: IdentityFileUploadUrlHeaders;
|
|
133
|
-
}
|
|
134
|
-
/** A single uploaded file the partner is confirming for submission. */
|
|
135
|
-
interface IdentityFileSubmission {
|
|
136
|
-
uploadId: string;
|
|
137
|
-
fileType: IdentityFileType;
|
|
138
|
-
side?: IdentityFileSide;
|
|
139
|
-
}
|
|
140
|
-
/** Request body for confirming one or more uploaded identity-related files. */
|
|
141
|
-
interface SubmitIdentityFilesRequestBody {
|
|
142
|
-
files: IdentityFileSubmission[];
|
|
143
|
-
}
|
|
144
|
-
/** A KYC identity. */
|
|
145
|
-
interface Identity {
|
|
146
|
-
id: string;
|
|
147
|
-
status: IdentityStatus;
|
|
148
|
-
capabilities: IdentityCapability[];
|
|
149
|
-
requirements: Requirements;
|
|
150
|
-
/** Present only when `status` is `challengeRequired`. */
|
|
151
|
-
challenge?: IdentityVerificationChallenge;
|
|
152
|
-
createdAt: string;
|
|
153
|
-
updatedAt: string;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type { CapabilityProduct, CreateIdentityRequestBody, CreateIdentityResidentialAddress, Identity, IdentityBasicDetailsSubmission, IdentityCapability, IdentityFileMimeType, IdentityFileSide, IdentityFileSubmission, IdentityFileType, IdentityFileUploadUrl, IdentityFileUploadUrlHeaders, IdentityFileUploadUrlRequestBody, IdentityPhoneNumberSubmission, IdentityResidentialAddressSubmission, IdentityStatus, IdentityTaxIdentifierGenericSubmission, IdentityTaxIdentifierSchemeSubmission, IdentityTaxIdentifierSubmission, IdentityTaxIdentifierType, IdentityVerificationChallenge, IdentityVerificationResponse, IdentityVerificationStatus, RequirementEntry, RequirementFieldName, RequirementItemStatus, Requirements, SubmitIdentityFilesRequestBody, UpdateIdentityRequestBody };
|
|
1
|
+
export { C as CapabilityProduct, a as CreateIdentityRequestBody, b as CreateIdentityResidentialAddress, I as Identity, c as IdentityBasicDetailsSubmission, d as IdentityCapability, e as IdentityFileMimeType, f as IdentityFileSide, g as IdentityFileSubmission, h as IdentityFileType, i as IdentityFileUploadUrl, j as IdentityFileUploadUrlHeaders, k as IdentityFileUploadUrlRequestBody, l as IdentityPhoneNumberSubmission, m as IdentityQuestionnaireSubmission, n as IdentityResidentialAddressSubmission, o as IdentityStatus, p as IdentityTaxIdentifierGenericSubmission, q as IdentityTaxIdentifierSchemeSubmission, r as IdentityTaxIdentifierSubmission, s as IdentityVerificationChallenge, t as IdentityVerificationResponse, u as IdentityVerificationStatus, R as RequirementEntry, v as RequirementFieldName, w as RequirementItemStatus, x as Requirements, S as SubmitIdentityFilesRequestBody, U as UpdateIdentityRequestBody } from './customer.cjs';
|
package/dist/api/identity.d.ts
CHANGED
|
@@ -1,156 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Identity API types.
|
|
3
|
-
*
|
|
4
|
-
* Sourced from `moonpay-api/packages/dev-platform/modules/identity/main.tsp`.
|
|
5
|
-
* The TypeSpec is marked `@vnext` and is not yet emitted into the public
|
|
6
|
-
* OpenAPI spec, so these types are hand-rolled. Once the spec ships, replace
|
|
7
|
-
* with aliases re-exported from `./gen/` (same pattern as `Quote`, `Identity`,
|
|
8
|
-
* etc. in `api.ts`).
|
|
9
|
-
*/
|
|
10
|
-
/** A platform capability a partner wants the customer to unlock. */
|
|
11
|
-
type CapabilityProduct = 'ramps';
|
|
12
|
-
/** A requested capability scoped to an identity. */
|
|
13
|
-
interface IdentityCapability {
|
|
14
|
-
product: CapabilityProduct;
|
|
15
|
-
}
|
|
16
|
-
/** The state of an identity across the KYC lifecycle. */
|
|
17
|
-
type IdentityStatus = 'created' | 'collecting' | 'verifying' | 'challengeRequired' | 'approved' | 'rejected' | 'manualReview' | 'blocked';
|
|
18
|
-
/** The completion state of a requirement item. */
|
|
19
|
-
type RequirementItemStatus = 'incomplete' | 'complete';
|
|
20
|
-
/** A field a customer must provide to fulfil a requirement. */
|
|
21
|
-
type RequirementFieldName = 'firstName' | 'lastName' | 'dateOfBirth' | 'nationality' | 'street' | 'locality' | 'postalCode' | 'country' | 'administrativeArea' | 'ssn' | 'cpf' | 'tin';
|
|
22
|
-
/** Status of a single requirement group on an identity. */
|
|
23
|
-
interface RequirementEntry {
|
|
24
|
-
status: RequirementItemStatus;
|
|
25
|
-
requiredFields?: RequirementFieldName[];
|
|
26
|
-
}
|
|
27
|
-
/** Outstanding and completed requirements for the identity, keyed by category. */
|
|
28
|
-
interface Requirements {
|
|
29
|
-
basicDetails?: RequirementEntry;
|
|
30
|
-
residentialAddress?: RequirementEntry;
|
|
31
|
-
identityDocuments?: RequirementEntry;
|
|
32
|
-
selfie?: RequirementEntry;
|
|
33
|
-
taxIdentifiers?: RequirementEntry;
|
|
34
|
-
proofOfAddress?: RequirementEntry;
|
|
35
|
-
phoneNumber?: RequirementEntry;
|
|
36
|
-
}
|
|
37
|
-
/** Residential-address fields accepted at identity creation. */
|
|
38
|
-
interface CreateIdentityResidentialAddress {
|
|
39
|
-
/** ISO 3166-1 alpha-3 country code declared by the partner. */
|
|
40
|
-
country: string;
|
|
41
|
-
}
|
|
42
|
-
/** Request body for creating an identity. */
|
|
43
|
-
interface CreateIdentityRequestBody {
|
|
44
|
-
residentialAddress: CreateIdentityResidentialAddress;
|
|
45
|
-
/** Capabilities the partner wants the customer to unlock. Must contain at least one value. */
|
|
46
|
-
capabilities: IdentityCapability[];
|
|
47
|
-
}
|
|
48
|
-
/** Customer's basic personal details. */
|
|
49
|
-
interface IdentityBasicDetailsSubmission {
|
|
50
|
-
firstName?: string;
|
|
51
|
-
lastName?: string;
|
|
52
|
-
nationality?: string;
|
|
53
|
-
/** YYYY-MM-DD. */
|
|
54
|
-
dateOfBirth?: string;
|
|
55
|
-
}
|
|
56
|
-
/** Customer's residential address. */
|
|
57
|
-
interface IdentityResidentialAddressSubmission {
|
|
58
|
-
country?: string;
|
|
59
|
-
administrativeArea?: string;
|
|
60
|
-
locality?: string;
|
|
61
|
-
street?: string;
|
|
62
|
-
subStreet?: string;
|
|
63
|
-
postalCode?: string;
|
|
64
|
-
}
|
|
65
|
-
/** Customer's phone number in E.164 format. */
|
|
66
|
-
interface IdentityPhoneNumberSubmission {
|
|
67
|
-
number: string;
|
|
68
|
-
}
|
|
69
|
-
/** Type of tax identifier the customer is submitting. */
|
|
70
|
-
type IdentityTaxIdentifierType = 'tin' | 'ssn' | 'cpf';
|
|
71
|
-
/** Tax Identification Number — country must be supplied. */
|
|
72
|
-
interface IdentityTaxIdentifierGenericSubmission {
|
|
73
|
-
type: 'tin';
|
|
74
|
-
country: string;
|
|
75
|
-
value: string;
|
|
76
|
-
}
|
|
77
|
-
/** Country-specific tax identifier (SSN/CPF). */
|
|
78
|
-
interface IdentityTaxIdentifierSchemeSubmission {
|
|
79
|
-
type: 'ssn' | 'cpf';
|
|
80
|
-
value: string;
|
|
81
|
-
}
|
|
82
|
-
type IdentityTaxIdentifierSubmission = IdentityTaxIdentifierGenericSubmission | IdentityTaxIdentifierSchemeSubmission;
|
|
83
|
-
/** Request body for updating an identity by submitting one or more requirements. */
|
|
84
|
-
interface UpdateIdentityRequestBody {
|
|
85
|
-
residentialAddress?: IdentityResidentialAddressSubmission;
|
|
86
|
-
basicDetails?: IdentityBasicDetailsSubmission;
|
|
87
|
-
phoneNumber?: IdentityPhoneNumberSubmission;
|
|
88
|
-
taxIdentifiers?: IdentityTaxIdentifierSubmission[];
|
|
89
|
-
}
|
|
90
|
-
/** A MoonPay-hosted challenge a partner must surface to the customer. */
|
|
91
|
-
interface IdentityVerificationChallenge {
|
|
92
|
-
/** Fully-formed challenge URL. */
|
|
93
|
-
url: string;
|
|
94
|
-
/** ISO 8601 expiry. */
|
|
95
|
-
expiresAt: string;
|
|
96
|
-
}
|
|
97
|
-
/** The state of an identity verification request. */
|
|
98
|
-
type IdentityVerificationStatus = 'approved' | 'processing' | 'challengeRequired';
|
|
99
|
-
/** Outcome of `POST /platform/v1/identities/{id}/verifications`. */
|
|
100
|
-
type IdentityVerificationResponse = {
|
|
101
|
-
status: 'approved';
|
|
102
|
-
} | {
|
|
103
|
-
status: 'processing';
|
|
104
|
-
} | {
|
|
105
|
-
status: 'challengeRequired';
|
|
106
|
-
challenge: IdentityVerificationChallenge;
|
|
107
|
-
};
|
|
108
|
-
/** Type of identity-related file the customer is uploading. */
|
|
109
|
-
type IdentityFileType = 'drivingLicence' | 'nationalIdentityCard' | 'passport' | 'residencePermit' | 'selfie' | 'proofOfAddress';
|
|
110
|
-
/** Side of a two-sided identity document. */
|
|
111
|
-
type IdentityFileSide = 'front' | 'back';
|
|
112
|
-
/** MIME type of the file being uploaded. */
|
|
113
|
-
type IdentityFileMimeType = 'image/jpeg' | 'image/png' | 'application/pdf';
|
|
114
|
-
/** Request body for issuing a presigned upload URL. */
|
|
115
|
-
interface IdentityFileUploadUrlRequestBody {
|
|
116
|
-
fileType: IdentityFileType;
|
|
117
|
-
/** Required for two-sided file types (`drivingLicence`, `nationalIdentityCard`, `residencePermit`); omit for single-sided. */
|
|
118
|
-
side?: IdentityFileSide;
|
|
119
|
-
/** Must match the `Content-Type` header used on the subsequent upload request. */
|
|
120
|
-
mimeType: IdentityFileMimeType;
|
|
121
|
-
}
|
|
122
|
-
/** Headers the partner must send when uploading the file to the presigned URL. */
|
|
123
|
-
interface IdentityFileUploadUrlHeaders {
|
|
124
|
-
'Content-Type': string;
|
|
125
|
-
}
|
|
126
|
-
/** Presigned URL the partner uses to upload an identity-related file. */
|
|
127
|
-
interface IdentityFileUploadUrl {
|
|
128
|
-
uploadId: string;
|
|
129
|
-
url: string;
|
|
130
|
-
/** ISO 8601 expiry. */
|
|
131
|
-
expiresAt: string;
|
|
132
|
-
headers: IdentityFileUploadUrlHeaders;
|
|
133
|
-
}
|
|
134
|
-
/** A single uploaded file the partner is confirming for submission. */
|
|
135
|
-
interface IdentityFileSubmission {
|
|
136
|
-
uploadId: string;
|
|
137
|
-
fileType: IdentityFileType;
|
|
138
|
-
side?: IdentityFileSide;
|
|
139
|
-
}
|
|
140
|
-
/** Request body for confirming one or more uploaded identity-related files. */
|
|
141
|
-
interface SubmitIdentityFilesRequestBody {
|
|
142
|
-
files: IdentityFileSubmission[];
|
|
143
|
-
}
|
|
144
|
-
/** A KYC identity. */
|
|
145
|
-
interface Identity {
|
|
146
|
-
id: string;
|
|
147
|
-
status: IdentityStatus;
|
|
148
|
-
capabilities: IdentityCapability[];
|
|
149
|
-
requirements: Requirements;
|
|
150
|
-
/** Present only when `status` is `challengeRequired`. */
|
|
151
|
-
challenge?: IdentityVerificationChallenge;
|
|
152
|
-
createdAt: string;
|
|
153
|
-
updatedAt: string;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type { CapabilityProduct, CreateIdentityRequestBody, CreateIdentityResidentialAddress, Identity, IdentityBasicDetailsSubmission, IdentityCapability, IdentityFileMimeType, IdentityFileSide, IdentityFileSubmission, IdentityFileType, IdentityFileUploadUrl, IdentityFileUploadUrlHeaders, IdentityFileUploadUrlRequestBody, IdentityPhoneNumberSubmission, IdentityResidentialAddressSubmission, IdentityStatus, IdentityTaxIdentifierGenericSubmission, IdentityTaxIdentifierSchemeSubmission, IdentityTaxIdentifierSubmission, IdentityTaxIdentifierType, IdentityVerificationChallenge, IdentityVerificationResponse, IdentityVerificationStatus, RequirementEntry, RequirementFieldName, RequirementItemStatus, Requirements, SubmitIdentityFilesRequestBody, UpdateIdentityRequestBody };
|
|
1
|
+
export { C as CapabilityProduct, a as CreateIdentityRequestBody, b as CreateIdentityResidentialAddress, I as Identity, c as IdentityBasicDetailsSubmission, d as IdentityCapability, e as IdentityFileMimeType, f as IdentityFileSide, g as IdentityFileSubmission, h as IdentityFileType, i as IdentityFileUploadUrl, j as IdentityFileUploadUrlHeaders, k as IdentityFileUploadUrlRequestBody, l as IdentityPhoneNumberSubmission, m as IdentityQuestionnaireSubmission, n as IdentityResidentialAddressSubmission, o as IdentityStatus, p as IdentityTaxIdentifierGenericSubmission, q as IdentityTaxIdentifierSchemeSubmission, r as IdentityTaxIdentifierSubmission, s as IdentityVerificationChallenge, t as IdentityVerificationResponse, u as IdentityVerificationStatus, R as RequirementEntry, v as RequirementFieldName, w as RequirementItemStatus, x as Requirements, S as SubmitIdentityFilesRequestBody, U as UpdateIdentityRequestBody } from './customer.js';
|