card-react-native 0.0.7 → 0.0.8

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.
@@ -1,12 +1,15 @@
1
1
  import type {
2
+ ColorStyle,
2
3
  Direction,
3
4
  Edges,
4
5
  Locale,
5
6
  Scope,
6
- SupportedBrands,
7
- SupportedCards,
7
+ SupportedSchemes,
8
+ SupportedFundSource,
9
+ SupportedPaymentAuthentications,
8
10
  TapCurrencyCode,
9
11
  Theme,
12
+ Purpose,
10
13
  } from './enums';
11
14
 
12
15
  export type Merchant = { id: String };
@@ -19,7 +22,6 @@ export type Contract = {
19
22
  };
20
23
  export type Transaction = {
21
24
  metadata: Object;
22
- reference: String;
23
25
  paymentAgreement: PaymentAgreement;
24
26
  };
25
27
 
@@ -31,17 +33,18 @@ export type InterfaceConfig = {
31
33
  locale: Locale;
32
34
  theme: Theme;
33
35
  edges: Edges;
36
+ loader: boolean;
34
37
  cardDirection: Direction;
35
- colorStyle: 'monochrome' | 'colored';
36
- powered: true;
38
+ colorStyle: ColorStyle;
39
+ powered: boolean;
37
40
  };
38
41
  export type Addons = {
39
42
  loader: boolean;
40
43
  };
41
44
  export type Acceptance = {
42
- supportedSchemes: SupportedBrands[];
43
- supportedFundSource: SupportedCards[];
44
- supportedPaymentAuthentications: ['3DS'] | [];
45
+ supportedSchemes: SupportedSchemes[];
46
+ supportedFundSource: SupportedFundSource[];
47
+ supportedPaymentAuthentications: SupportedPaymentAuthentications[] | [];
45
48
  };
46
49
  export type Contact = {
47
50
  email: String;
@@ -54,11 +57,11 @@ export type Name = {
54
57
  middle: String;
55
58
  };
56
59
  export type Customer = {
57
- id: String;
58
- name: Name[];
59
- nameOnCard: String;
60
- editable: boolean;
61
- contact: Contact;
60
+ id?: String;
61
+ name?: Name[];
62
+ nameOnCard?: String;
63
+ editable?: boolean;
64
+ contact?: Contact;
62
65
  };
63
66
  export type AuthenticationTransactionInvoice = {
64
67
  id: string;
@@ -74,10 +77,12 @@ export type AuthenticationTransaction = {
74
77
  };
75
78
 
76
79
  export type Order = {
77
- id: String;
78
- amount: number;
79
- currency: TapCurrencyCode;
80
- description: String;
80
+ id?: String;
81
+ amount?: number;
82
+ currency?: TapCurrencyCode;
83
+ description?: String;
84
+ reference?: String;
85
+ metadata?: Object;
81
86
  };
82
87
 
83
88
  export type Invoice = {
@@ -87,38 +92,29 @@ export type Invoice = {
87
92
  export type Post = {
88
93
  url: String;
89
94
  };
90
- export type Redirect = {
91
- url: String;
92
- };
95
+
93
96
  export type Features = {
94
- scanner: boolean;
97
+ alternativeCardInputs: {
98
+ cardNFC: boolean;
99
+ cardScanner: boolean;
100
+ };
95
101
  acceptanceBadge: boolean;
96
- nfc: boolean;
97
102
  customerCards: {
98
103
  saveCard: boolean;
99
104
  autoSaveCard: boolean;
100
105
  };
101
106
  };
102
107
  export type Config = {
103
- publicKey: String;
104
- merchant: Merchant;
105
- transaction: Transaction;
108
+ merchant?: Merchant;
106
109
  order: Order;
107
- invoice: Invoice;
108
- post: Post;
109
- operator: { publicKey: String };
110
- purpose:
111
- | 'PAYMENT_TRANSACTION'
112
- | 'RECURRING_TRANSACTION'
113
- | 'INSTALLMENT_TRANSACTION'
114
- | 'ADD_CARD'
115
- | 'CARDHOLDER_VERIFICATION';
116
- fields: Fields;
117
- acceptance: Acceptance;
118
- addons: Addons;
119
- interface: InterfaceConfig;
110
+ invoice?: Invoice;
111
+ post?: Post;
112
+ operator: { publicKey: string };
113
+ purpose?: Purpose;
114
+ fieldsVisibility?: Fields;
115
+ acceptance?: Acceptance;
116
+ interface?: InterfaceConfig;
120
117
  scope: Scope;
121
118
  customer: Customer;
122
- redirect: Redirect;
123
- features: Features;
119
+ features?: Features;
124
120
  };
@@ -1,4 +1,4 @@
1
- export enum SupportedBrands {
1
+ export enum SupportedSchemes {
2
2
  AMEX = 'AMEX',
3
3
  CARTESBANCAIRES = 'CARTESBANCAIRES',
4
4
  DISCOVER = 'DISCOVER',
@@ -19,7 +19,9 @@ export enum SupportedBrands {
19
19
 
20
20
  export enum Scope {
21
21
  Token = 'Token',
22
- Authenticate = 'Authenticate',
22
+ AuthenticatedToken = 'AuthenticatedToken',
23
+ SaveToken = 'SaveToken',
24
+ SaveAuthenticatedToken = 'SaveAuthenticatedToken',
23
25
  }
24
26
 
25
27
  export enum SdkMode {
@@ -32,12 +34,31 @@ export enum Locale {
32
34
  ar = 'ar',
33
35
  }
34
36
 
35
- export enum SupportedCards {
37
+ export enum SupportedFundSource {
36
38
  All = 'All',
37
39
  Debit = 'DEBIT',
38
40
  Credit = 'CREDIT',
39
41
  }
40
42
 
43
+ export enum Purpose {
44
+ Transaction = 'Transaction',
45
+ SaveCard = 'Save Card',
46
+ VerifyCardholder = 'Verify Cardholder',
47
+ OrderTransaction = 'Order Transaction',
48
+ SubscriptionTransaction = 'Subscription Transaction',
49
+ BillingTransaction = 'Billing Transaction',
50
+ InstallmentTransaction = 'Installment Transaction',
51
+ MilestoneTransaction = 'Milestone Transaction',
52
+ MaintainCard = 'Maintain Card',
53
+ }
54
+
55
+ export enum SupportedPaymentAuthentications {
56
+ secured = '3ds',
57
+ }
58
+ export enum ColorStyle {
59
+ monochrome = 'monochrome',
60
+ colored = 'colored',
61
+ }
41
62
  export enum Theme {
42
63
  light = 'light',
43
64
  dark = 'dark',