@monei-js/components 1.5.1 → 1.6.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.
@@ -10,6 +10,8 @@ export interface ConfirmPaymentParams {
10
10
  fullscreen?: boolean;
11
11
  language?: string;
12
12
  paymentMethod?: PaymentMethod;
13
+ allowedPaymentMethods?: string[];
14
+ customDomain?: string;
13
15
  customer?: Customer;
14
16
  style?: Style;
15
17
  billingDetails?: BillingDetails;
package/dist/types.d.ts CHANGED
@@ -1,9 +1,22 @@
1
1
  export declare enum NextActionType {
2
2
  CONFIRM = "CONFIRM",
3
3
  FRICTIONLESS_CHALLENGE = "FRICTIONLESS_CHALLENGE",
4
+ BIZUM_CHALLENGE = "BIZUM_CHALLENGE",
4
5
  CHALLENGE = "CHALLENGE",
5
6
  COMPLETE = "COMPLETE"
6
7
  }
8
+ export declare enum CardBrand {
9
+ Visa = "visa",
10
+ Mastercard = "mastercard",
11
+ Amex = "amex",
12
+ Discover = "discover",
13
+ Diners = "diners",
14
+ JCB = "jcb",
15
+ Maestro = "maestro",
16
+ UnionPay = "unionpay",
17
+ Elo = "elo",
18
+ Hipercard = "hipercard"
19
+ }
7
20
  export interface PaymentResult {
8
21
  id: string;
9
22
  status: string;
@@ -48,6 +61,7 @@ export interface PaymentMethod {
48
61
  export declare type GetPaymentMethodsRequest = {
49
62
  accountId?: string;
50
63
  paymentId?: string;
64
+ t?: number;
51
65
  };
52
66
  export declare type GetPaymentMethodsResponse = {
53
67
  paymentMethods: string[];
@@ -56,8 +70,12 @@ export declare type GetPaymentMethodsResponse = {
56
70
  amount?: number;
57
71
  currency?: string;
58
72
  merchantName?: string;
73
+ merchantUrl?: string;
59
74
  countryCode?: string;
60
75
  metadata: {
76
+ card: {
77
+ brands: CardBrand[];
78
+ };
61
79
  paypal?: {
62
80
  clientId: string;
63
81
  merchantId: string;
@@ -70,9 +88,15 @@ export declare type GetPaymentMethodsResponse = {
70
88
  merchantId: string;
71
89
  };
72
90
  clickToPay?: {
73
- cvcRequired?: boolean;
74
- srciDpaId: string;
75
- srcInitiatorId: string;
91
+ tokenSupport: boolean;
92
+ visa: {
93
+ srciDpaId: string;
94
+ srcInitiatorId: string;
95
+ };
96
+ mastercard: {
97
+ srciDpaId: string;
98
+ srcInitiatorId: string;
99
+ };
76
100
  };
77
101
  };
78
102
  };
@@ -98,11 +122,12 @@ export declare type CreateTokenRequest = {
98
122
  token: string;
99
123
  };
100
124
  bizum?: {
101
- numEmail: string;
125
+ phoneNumber: string;
102
126
  keypad?: string;
103
127
  };
104
128
  clickToPay?: {
105
129
  token: string;
130
+ cardBrand: string;
106
131
  };
107
132
  };
108
133
  };
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CSSObject } from '../types/css';
2
2
  import { GetPaymentMethodsResponse } from './types';
3
3
  export declare const transformStyle: (style: CSSObject) => any;
4
- export declare const loadScript: (src: string, dataset?: Record<string, string | undefined> | undefined) => Promise<void>;
4
+ export declare const loadScript: (src: string, nonce?: string | undefined, dataset?: Record<string, string | undefined> | undefined) => Promise<void>;
5
5
  export declare const stringify: (obj: Record<string, any>) => string;
6
6
  export declare const fixLocalstorage: () => Storage;
7
7
  export declare const getClientEnv: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monei-js/components",
3
- "version": "1.5.1",
3
+ "version": "1.6.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",
@@ -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",