@monei-js/components 1.4.0 → 1.5.2

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/config.d.ts CHANGED
@@ -12,6 +12,9 @@ declare type Config = {
12
12
  cofidisUrl: string;
13
13
  cofidisButtonUrl: string;
14
14
  cofidisWidgetUrl: string;
15
+ cofidisLoanUrl: string;
16
+ cofidisLoanButtonUrl: string;
17
+ cofidisLoanWidgetUrl: string;
15
18
  paypalUrl: string;
16
19
  apiUrl: string;
17
20
  googlePayUrl: string;
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './paymentModal';
5
5
  export * from './paypal';
6
6
  export * from './bizum';
7
7
  export * from './cofidis';
8
+ export * from './cofidisLoan';
8
9
  export * from './googlePay';
9
10
  export * from './paymentRequest';
10
11
  export * from './config';
@@ -11,7 +11,7 @@ export interface PaymentRequestProps {
11
11
  token?: string;
12
12
  error?: string;
13
13
  }) => void;
14
- onBeforeSubmit: () => void;
14
+ onBeforeSubmit?: () => void;
15
15
  onLoad?: (isSupported: boolean) => void;
16
16
  style?: {
17
17
  height?: number;
package/dist/types.d.ts CHANGED
@@ -4,6 +4,18 @@ export declare enum NextActionType {
4
4
  CHALLENGE = "CHALLENGE",
5
5
  COMPLETE = "COMPLETE"
6
6
  }
7
+ export declare enum CardBrand {
8
+ Visa = "visa",
9
+ Mastercard = "mastercard",
10
+ Amex = "amex",
11
+ Discover = "discover",
12
+ Diners = "diners",
13
+ JCB = "jcb",
14
+ Maestro = "maestro",
15
+ UnionPay = "unionpay",
16
+ Elo = "elo",
17
+ Hipercard = "hipercard"
18
+ }
7
19
  export interface PaymentResult {
8
20
  id: string;
9
21
  status: string;
@@ -48,6 +60,7 @@ export interface PaymentMethod {
48
60
  export declare type GetPaymentMethodsRequest = {
49
61
  accountId?: string;
50
62
  paymentId?: string;
63
+ t?: number;
51
64
  };
52
65
  export declare type GetPaymentMethodsResponse = {
53
66
  paymentMethods: string[];
@@ -56,8 +69,12 @@ export declare type GetPaymentMethodsResponse = {
56
69
  amount?: number;
57
70
  currency?: string;
58
71
  merchantName?: string;
72
+ merchantUrl?: string;
59
73
  countryCode?: string;
60
74
  metadata: {
75
+ card: {
76
+ brands: CardBrand[];
77
+ };
61
78
  paypal?: {
62
79
  clientId: string;
63
80
  merchantId: string;
@@ -71,8 +88,14 @@ export declare type GetPaymentMethodsResponse = {
71
88
  };
72
89
  clickToPay?: {
73
90
  cvcRequired?: boolean;
74
- srciDpaId: string;
75
- srcInitiatorId: string;
91
+ visa: {
92
+ srciDpaId: string;
93
+ srcInitiatorId: string;
94
+ };
95
+ mastercard: {
96
+ srciDpaId: string;
97
+ srcInitiatorId: string;
98
+ };
76
99
  };
77
100
  };
78
101
  };
@@ -98,11 +121,12 @@ export declare type CreateTokenRequest = {
98
121
  token: string;
99
122
  };
100
123
  bizum?: {
101
- numEmail: string;
124
+ phoneNumber: string;
102
125
  keypad?: string;
103
126
  };
104
127
  clickToPay?: {
105
128
  token: string;
129
+ cardBrand: string;
106
130
  };
107
131
  };
108
132
  };
@@ -135,8 +159,9 @@ export declare type CreateApplePaySessionRequest = {
135
159
  export declare type CalculateFinancingRequest = {
136
160
  amount: number;
137
161
  accountId: string;
162
+ paymentMethod?: string;
138
163
  };
139
- export declare type CalculateFinancingResponse = {
164
+ export declare type CalculateFinancingResponse = Array<{
140
165
  financingAmount: number;
141
166
  tin: number;
142
167
  interestAmount: number;
@@ -147,4 +172,9 @@ export declare type CalculateFinancingResponse = {
147
172
  legalPhrase: string;
148
173
  capEuros: number;
149
174
  capPercent: number;
175
+ }>;
176
+ export declare type ValidateBizumPhoneRequest = {
177
+ accountId?: string;
178
+ paymentId?: string;
179
+ phoneNumber: string;
150
180
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monei-js/components",
3
- "version": "1.4.0",
3
+ "version": "1.5.2",
4
4
  "author": "MONEI <support@monei.com> (https://monei.com)",
5
5
  "description": "MONEI UI Components enable you to collect sensitive payment information using customizable UI components.",
6
6
  "homepage": "https://monei.com",
@@ -37,7 +37,9 @@
37
37
  },
38
38
  "scripts": {
39
39
  "start": "tsdx watch --format cjs,umd --name monei",
40
+ "start:prod": "STAGE=prod tsdx watch --format cjs,umd --name monei",
40
41
  "build": "tsdx build --format cjs,umd --name monei",
42
+ "build:prod": "STAGE=prod tsdx build --format cjs,umd --name monei",
41
43
  "example": "serve",
42
44
  "test": "tsdx test --passWithNoTests",
43
45
  "lint": "tsdx lint",