@notabene/javascript-sdk 2.11.0-next.2 → 2.12.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/dist/cjs/notabene.cjs +1 -1
- package/dist/cjs/notabene.d.ts +46 -9
- package/dist/cjs/package.json +1 -1
- package/dist/esm/notabene.d.ts +46 -9
- package/dist/esm/notabene.js +191 -188
- package/dist/esm/package.json +1 -1
- package/dist/notabene.d.ts +46 -9
- package/dist/notabene.js +191 -188
- package/package.json +1 -1
- package/src/notabene.ts +6 -0
- package/src/types.ts +44 -12
- package/src/utils/connections.ts +2 -0
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.12.0",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
package/src/notabene.ts
CHANGED
|
@@ -66,8 +66,11 @@ import type {
|
|
|
66
66
|
import {
|
|
67
67
|
AgentType,
|
|
68
68
|
CMType,
|
|
69
|
+
CodeVerificationStatus,
|
|
69
70
|
ErrorIdentifierCode,
|
|
70
71
|
HMType,
|
|
72
|
+
IdentityVerificationMethod,
|
|
73
|
+
OAuthProvider,
|
|
71
74
|
PersonType,
|
|
72
75
|
ProofStatus,
|
|
73
76
|
ProofTypes,
|
|
@@ -92,9 +95,12 @@ export {
|
|
|
92
95
|
export {
|
|
93
96
|
AgentType,
|
|
94
97
|
CMType,
|
|
98
|
+
CodeVerificationStatus,
|
|
95
99
|
decodeFragmentToObject,
|
|
96
100
|
ErrorIdentifierCode,
|
|
97
101
|
HMType,
|
|
102
|
+
IdentityVerificationMethod,
|
|
103
|
+
OAuthProvider,
|
|
98
104
|
PersonType,
|
|
99
105
|
ProofStatus,
|
|
100
106
|
ProofTypes,
|
package/src/types.ts
CHANGED
|
@@ -561,6 +561,7 @@ export interface ComponentRequest {
|
|
|
561
561
|
* @public
|
|
562
562
|
*/
|
|
563
563
|
export interface Transaction extends ComponentRequest {
|
|
564
|
+
transactionId?: string;
|
|
564
565
|
agent: Agent;
|
|
565
566
|
counterparty: Counterparty;
|
|
566
567
|
asset: TransactionAsset;
|
|
@@ -582,14 +583,6 @@ export interface Refreshable {
|
|
|
582
583
|
refreshSource?: RefreshSource;
|
|
583
584
|
}
|
|
584
585
|
|
|
585
|
-
/**
|
|
586
|
-
* Extended transaction interface for deposits
|
|
587
|
-
* @public
|
|
588
|
-
*/
|
|
589
|
-
export interface DepositTransaction extends Transaction {
|
|
590
|
-
transactionId?: string; // Optional transactionId of a Notabene transaction. Will be returned with the payload to assist updating the Transaction
|
|
591
|
-
}
|
|
592
|
-
|
|
593
586
|
/**
|
|
594
587
|
* An object representing a withdrawal transaction
|
|
595
588
|
* @public
|
|
@@ -603,10 +596,7 @@ export interface Withdrawal
|
|
|
603
596
|
* An object representing a deposit transaction
|
|
604
597
|
* @public
|
|
605
598
|
*/
|
|
606
|
-
export interface Deposit
|
|
607
|
-
extends OriginatorFields,
|
|
608
|
-
DepositTransaction,
|
|
609
|
-
Refreshable {}
|
|
599
|
+
export interface Deposit extends OriginatorFields, Transaction, Refreshable {}
|
|
610
600
|
|
|
611
601
|
/**
|
|
612
602
|
* An object representing a request for a deposit
|
|
@@ -793,6 +783,47 @@ export type VASPOptions = {
|
|
|
793
783
|
searchable?: VASPSearchControl[]; // If array left empty all VASPs will be searchable
|
|
794
784
|
};
|
|
795
785
|
|
|
786
|
+
/**
|
|
787
|
+
* Available methods for identity verification
|
|
788
|
+
* @public
|
|
789
|
+
*/
|
|
790
|
+
export enum IdentityVerificationMethod {
|
|
791
|
+
SMS = 'sms',
|
|
792
|
+
EMAIL = 'email',
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
/**
|
|
796
|
+
* Status of a code verification
|
|
797
|
+
* @public
|
|
798
|
+
*/
|
|
799
|
+
export enum CodeVerificationStatus {
|
|
800
|
+
PENDING = 'pending',
|
|
801
|
+
APPROVED = 'approved',
|
|
802
|
+
FAILED = 'failed',
|
|
803
|
+
EXPIRED = 'expired',
|
|
804
|
+
MAX_ATTEMPTS_REACHED = 'max_attempts_reached',
|
|
805
|
+
UNREACHABLE = 'unreachable',
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Supported OAuth providers for authentication
|
|
810
|
+
* @public
|
|
811
|
+
*/
|
|
812
|
+
export enum OAuthProvider {
|
|
813
|
+
COINBASE = 'coinbase',
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* Configuration options for identity verification
|
|
818
|
+
* @public
|
|
819
|
+
*/
|
|
820
|
+
export type IdentityVerificationConfig = {
|
|
821
|
+
/** The required verification method. If not specified, none will be used */
|
|
822
|
+
requiredMethod?: IdentityVerificationMethod;
|
|
823
|
+
/** OAuth provider(s) to use for authentication. Can be a single provider or array of providers */
|
|
824
|
+
oAuth?: OAuthProvider[] | OAuthProvider;
|
|
825
|
+
};
|
|
826
|
+
|
|
796
827
|
/**
|
|
797
828
|
* Counterparty Assist Configuration options for recipient selection
|
|
798
829
|
*
|
|
@@ -805,6 +836,7 @@ export type CounterpartyAssistConfig =
|
|
|
805
836
|
| boolean
|
|
806
837
|
| {
|
|
807
838
|
counterpartyTypes: PersonType[];
|
|
839
|
+
identityVerification?: IdentityVerificationConfig;
|
|
808
840
|
};
|
|
809
841
|
|
|
810
842
|
/**
|
package/src/utils/connections.ts
CHANGED
|
@@ -15,6 +15,8 @@ export interface ConnectionData<T extends ComponentRequest> {
|
|
|
15
15
|
readonly authToken?: string;
|
|
16
16
|
readonly txOptions?: TransactionOptions;
|
|
17
17
|
readonly result?: TransactionResponse<T>;
|
|
18
|
+
readonly phoneNumber?: string;
|
|
19
|
+
readonly email?: string;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export interface ConnectionMetadata {
|