@monei-js/components 1.3.0 → 1.5.1

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/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CreateApplePaySessionRequest, CreatePaymentRequest, CreateTokenRequest, CreateTokenResponse, GetPaymentMethodsRequest, GetPaymentMethodsResponse, PaymentResult, SendPaymentReceiptRequest } from './types';
1
+ import { CalculateFinancingRequest, CalculateFinancingResponse, CreateApplePaySessionRequest, CreatePaymentRequest, CreateTokenRequest, CreateTokenResponse, GetPaymentMethodsRequest, GetPaymentMethodsResponse, PaymentResult, SendPaymentReceiptRequest, ValidateBizumPhoneRequest } from './types';
2
2
  import { ConfirmPaymentParams } from './paymentModal';
3
3
  export declare const getPaymentMethods: ({ accountId, paymentId }: GetPaymentMethodsRequest) => Promise<GetPaymentMethodsResponse>;
4
4
  export declare const createToken: ({ paymentMethod, paymentId, sessionId, amount, currency, accountId }: CreateTokenRequest) => Promise<CreateTokenResponse>;
@@ -7,3 +7,7 @@ export declare const confirmPayment: ({ paymentId, ...body }: ConfirmPaymentPara
7
7
  export declare const createPayment: ({ signature, ...body }: CreatePaymentRequest) => Promise<PaymentResult>;
8
8
  export declare const sendPaymentReceipt: ({ paymentId, customerEmail, signature, language }: SendPaymentReceiptRequest) => Promise<PaymentResult>;
9
9
  export declare const createApplePaySession: (body: CreateApplePaySessionRequest) => Promise<any>;
10
+ export declare const calculateFinancing: (req: CalculateFinancingRequest) => Promise<CalculateFinancingResponse>;
11
+ export declare const validateBizumPhone: (req: ValidateBizumPhoneRequest) => Promise<{
12
+ isValid: boolean;
13
+ }>;
@@ -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;
@@ -0,0 +1,6 @@
1
+ import { CofidisProps } from './types';
2
+ import { MoneiComponent } from '../../types/component';
3
+ export * from './types';
4
+ export * from './modal';
5
+ export * from './widget';
6
+ export declare const Cofidis: MoneiComponent<CofidisProps>;
@@ -0,0 +1,3 @@
1
+ import { CofidisModalProps } from './types';
2
+ import { MoneiComponent } from '../../types/component';
3
+ export declare const CofidisModal: MoneiComponent<CofidisModalProps>;
@@ -0,0 +1,44 @@
1
+ import { CSSObject } from '../../types/css';
2
+ export interface CofidisProps {
3
+ paymentId?: string;
4
+ language?: string;
5
+ hint?: boolean;
6
+ onError?: (error: any) => void;
7
+ onProps?: (cb: (props: CofidisProps) => void) => Promise<void>;
8
+ onLoad?: (isSupported: boolean) => void;
9
+ onOpen?: () => void;
10
+ onSubmit: (data: {
11
+ token?: string;
12
+ error?: string;
13
+ redirectUrl?: string;
14
+ }) => void;
15
+ fullscreen?: boolean;
16
+ style?: {
17
+ height?: number;
18
+ };
19
+ }
20
+ export interface CofidisModalProps extends CofidisProps {
21
+ isOpen?: boolean;
22
+ amount: number;
23
+ currency: string;
24
+ accountId: string;
25
+ onError: (error: any) => void;
26
+ }
27
+ export interface CofidisWidgetProps {
28
+ amount?: number;
29
+ amountInt?: number;
30
+ accountId: string;
31
+ language?: string;
32
+ showLogo?: boolean;
33
+ style?: {
34
+ base?: CSSObject;
35
+ link?: CSSObject;
36
+ amount?: CSSObject;
37
+ label?: CSSObject;
38
+ terms?: CSSObject;
39
+ logo?: CSSObject;
40
+ content?: CSSObject;
41
+ };
42
+ onError?: (error: any) => void;
43
+ onLoad?: () => void;
44
+ }
@@ -0,0 +1,3 @@
1
+ import { CofidisWidgetProps } from './types';
2
+ import { MoneiComponent } from '../../types/component';
3
+ export declare const CofidisWidget: MoneiComponent<CofidisWidgetProps>;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import { CofidisLoanProps } from './types';
2
+ import { MoneiComponent } from '../../types/component';
3
+ export * from './types';
4
+ export * from './modal';
5
+ export * from './widget';
6
+ export declare const CofidisLoan: MoneiComponent<CofidisLoanProps>;
7
+ export declare const CofidisPay: MoneiComponent<CofidisLoanProps>;
@@ -0,0 +1,4 @@
1
+ import { CofidisLoanModalProps } from './types';
2
+ import { MoneiComponent } from '../../types/component';
3
+ export declare const CofidisLoanModal: MoneiComponent<CofidisLoanModalProps>;
4
+ export declare const CofidisPayModal: MoneiComponent<CofidisLoanModalProps>;
@@ -0,0 +1,44 @@
1
+ import { CSSObject } from '../../types/css';
2
+ export interface CofidisLoanProps {
3
+ paymentId?: string;
4
+ language?: string;
5
+ hint?: boolean;
6
+ onError?: (error: any) => void;
7
+ onProps?: (cb: (props: CofidisLoanProps) => void) => Promise<void>;
8
+ onLoad?: (isSupported: boolean) => void;
9
+ onOpen?: () => void;
10
+ onSubmit: (data: {
11
+ token?: string;
12
+ error?: string;
13
+ redirectUrl?: string;
14
+ }) => void;
15
+ fullscreen?: boolean;
16
+ style?: {
17
+ height?: number;
18
+ };
19
+ }
20
+ export interface CofidisLoanModalProps extends CofidisLoanProps {
21
+ isOpen?: boolean;
22
+ amount: number;
23
+ currency: string;
24
+ accountId: string;
25
+ onError: (error: any) => void;
26
+ }
27
+ export interface CofidisLoanWidgetProps {
28
+ amount?: number;
29
+ amountInt?: number;
30
+ accountId: string;
31
+ language?: string;
32
+ showLogo?: boolean;
33
+ style?: {
34
+ base?: CSSObject;
35
+ link?: CSSObject;
36
+ amount?: CSSObject;
37
+ label?: CSSObject;
38
+ terms?: CSSObject;
39
+ logo?: CSSObject;
40
+ content?: CSSObject;
41
+ };
42
+ onError?: (error: any) => void;
43
+ onLoad?: () => void;
44
+ }
@@ -0,0 +1,4 @@
1
+ import { CofidisLoanWidgetProps } from './types';
2
+ import { MoneiComponent } from '../../types/component';
3
+ export declare const CofidisLoanWidget: MoneiComponent<CofidisLoanWidgetProps>;
4
+ export declare const CofidisPayWidget: MoneiComponent<CofidisLoanWidgetProps>;