@monei-js/components 1.2.0 → 1.5.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/config.d.ts CHANGED
@@ -9,11 +9,19 @@ declare type Config = {
9
9
  paymentModalUrl: string;
10
10
  bizumUrl: string;
11
11
  bizumButtonUrl: string;
12
+ cofidisUrl: string;
13
+ cofidisButtonUrl: string;
14
+ cofidisWidgetUrl: string;
15
+ cofidisLoanUrl: string;
16
+ cofidisLoanButtonUrl: string;
17
+ cofidisLoanWidgetUrl: string;
12
18
  paypalUrl: string;
13
19
  apiUrl: string;
14
20
  googlePayUrl: string;
15
21
  paymentRequestUrl: string;
16
22
  secureDomain: string;
23
+ click2PayUrl: string;
24
+ click2PayButtonUrl: string;
17
25
  };
18
26
  export declare const config: Config;
19
27
  export {};
@@ -1 +1 @@
1
- export declare function containerTemplate({ uid, frame, prerenderFrame, doc, props, event, dimensions: { width, height }, }: Record<any, any>): HTMLElement | undefined;
1
+ export declare function containerTemplate({ uid, frame, prerenderFrame, doc, props, event, dimensions: { width, height } }: Record<any, any>): HTMLElement | undefined;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export * from './cardInput';
4
4
  export * from './paymentModal';
5
5
  export * from './paypal';
6
6
  export * from './bizum';
7
+ export * from './cofidis';
8
+ export * from './cofidisLoan';
7
9
  export * from './googlePay';
8
10
  export * from './paymentRequest';
9
11
  export * from './config';
@@ -0,0 +1,4 @@
1
+ export declare enum EVENT {
2
+ BEFORE_CLOSE = "BEFORE_CLOSE"
3
+ }
4
+ export declare function containerTemplate({ uid, frame, prerenderFrame, doc, props, event, dimensions: { width, height } }: Record<any, any>): HTMLElement | undefined;
@@ -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
@@ -52,6 +52,11 @@ export declare type GetPaymentMethodsRequest = {
52
52
  export declare type GetPaymentMethodsResponse = {
53
53
  paymentMethods: string[];
54
54
  livemode: boolean;
55
+ accountId: string;
56
+ amount?: number;
57
+ currency?: string;
58
+ merchantName?: string;
59
+ countryCode?: string;
55
60
  metadata: {
56
61
  paypal?: {
57
62
  clientId: string;
@@ -59,13 +64,15 @@ export declare type GetPaymentMethodsResponse = {
59
64
  };
60
65
  googlePay?: {
61
66
  merchantId: string;
62
- merchantName: string;
63
- countryCode: string;
67
+ cvcRequired?: boolean;
64
68
  };
65
69
  applePay?: {
66
70
  merchantId: string;
67
- merchantName: string;
68
- countryCode: string;
71
+ };
72
+ clickToPay?: {
73
+ cvcRequired?: boolean;
74
+ srciDpaId: string;
75
+ srcInitiatorId: string;
69
76
  };
70
77
  };
71
78
  };
@@ -83,6 +90,7 @@ export declare type CreateTokenRequest = {
83
90
  cvc: string;
84
91
  };
85
92
  paypal?: {};
93
+ cofidis?: {};
86
94
  googlePay?: {
87
95
  token: string;
88
96
  };
@@ -93,6 +101,9 @@ export declare type CreateTokenRequest = {
93
101
  numEmail: string;
94
102
  keypad?: string;
95
103
  };
104
+ clickToPay?: {
105
+ token: string;
106
+ };
96
107
  };
97
108
  };
98
109
  export declare type CreateTokenResponse = {
@@ -121,3 +132,20 @@ export declare type CreateApplePaySessionRequest = {
121
132
  domainName: string;
122
133
  displayName: string;
123
134
  };
135
+ export declare type CalculateFinancingRequest = {
136
+ amount: number;
137
+ accountId: string;
138
+ paymentMethod?: string;
139
+ };
140
+ export declare type CalculateFinancingResponse = {
141
+ financingAmount: number;
142
+ tin: number;
143
+ interestAmount: number;
144
+ tae: number;
145
+ quote: number;
146
+ installments: number;
147
+ totalAmount: number;
148
+ legalPhrase: string;
149
+ capEuros: number;
150
+ capPercent: number;
151
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monei-js/components",
3
- "version": "1.2.0",
3
+ "version": "1.5.0",
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",
@@ -28,7 +28,8 @@
28
28
  "singleQuote": true,
29
29
  "bracketSpacing": false,
30
30
  "jsxBracketSameLine": true,
31
- "printWidth": 100
31
+ "trailingComma": "none",
32
+ "printWidth": 120
32
33
  },
33
34
  "publishConfig": {
34
35
  "access": "public",