@motopays/pay-form 2.4.0 → 2.5.0-rc.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/index.d.ts CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { CreditCardTypeCardBrandId } from 'credit-card-type/dist/types';
4
4
 
5
- export type TAmountType = "gross-without-gst" | "net" | "gross";
6
5
  export type TOrderType = "regular" | "free-trial" | "gems";
7
6
  export type TPaymentInitiator = "customer" | "merchant";
8
7
  export type TButtonStateUntilFilled = "enabled" | "disabled" | "hidden-enabled";
@@ -15,11 +14,14 @@ export interface IUserPreferenceCheckbox extends ITextContainer {
15
14
  name: string;
16
15
  defaultValue?: boolean;
17
16
  }
17
+ export type TCheckboxShape = "circle" | "square";
18
18
  export interface IUserPreferencesSettings extends ITextContainer {
19
19
  checkboxes?: IUserPreferenceCheckbox[];
20
+ shape?: TCheckboxShape;
20
21
  }
21
22
  export interface IChargeTermsSettings extends ITextContainer {
22
23
  checkboxes?: Partial<Record<TLanguageCode, string>>[];
24
+ shape?: TCheckboxShape;
23
25
  }
24
26
  export interface ILink extends ITextContainer {
25
27
  href: string;
@@ -36,7 +38,7 @@ export interface IRequiredFieldsBehavior {
36
38
  markAsInvalidUntilCorrect?: boolean;
37
39
  buttonStateUntilFilled?: TButtonStateUntilFilled;
38
40
  }
39
- export type TComponentType = "available-card-brands" | "card-list" | "requisites" | "phone-number" | "charge-terms" | "pay-button" | "apm-list" | "user-preferences" | "merchant-info" | "protected-by" | "no-methods";
41
+ export type TComponentType = "available-card-brands" | "card-list" | "requisites" | "phone-number" | "charge-terms" | "pay-button" | "apm-list" | "user-preferences" | "merchant-info" | "protected-by" | "no-methods" | "master";
40
42
  export type TSecurityCodeLabel = "CVV" | "CVC" | "CID" | "CVN" | "CVE" | "CVP2";
41
43
  export interface ISecurityCodeLabels extends Record<TSecurityCodeLabel, string> {
42
44
  }
@@ -99,6 +101,10 @@ export interface ILanguage {
99
101
  };
100
102
  };
101
103
  close: string;
104
+ master: {
105
+ selectAll: string;
106
+ };
107
+ confirmPayment: string;
102
108
  }
103
109
  export interface ILanguageSettings {
104
110
  code: TLanguageCode;
@@ -119,6 +125,13 @@ export interface IPaymentFlowSettings {
119
125
  tokenizeCard?: boolean;
120
126
  type?: TPaymentFlow;
121
127
  }
128
+ export interface IMasterSettings extends ITextContainer {
129
+ shape?: TCheckboxShape;
130
+ }
131
+ export interface IGooglePayIntegratorSettings {
132
+ button?: Omit<google.payments.api.ButtonOptions, "onClick" | "allowedPaymentMethods">;
133
+ allowedAuthMethods?: google.payments.api.CardAuthMethod[];
134
+ }
122
135
  export interface ISettings {
123
136
  isCloseButtonVisible?: boolean;
124
137
  isProblemTipsListVisible?: boolean;
@@ -130,6 +143,7 @@ export interface ISettings {
130
143
  urls: IServicesUrls;
131
144
  components?: TComponentType[];
132
145
  resultComponentsStructure?: IResultComponentsStructure;
146
+ master?: IMasterSettings;
133
147
  merchantInfo?: IMerchantInfoSettings;
134
148
  chargeTerms?: IChargeTermsSettings;
135
149
  userPreferences?: IUserPreferencesSettings;
@@ -138,10 +152,12 @@ export interface ISettings {
138
152
  events?: IEvents;
139
153
  apmsCollapse?: boolean;
140
154
  paymentFlow?: IPaymentFlowSettings;
155
+ googlePay?: IGooglePayIntegratorSettings;
141
156
  }
142
157
  export interface ISimple<Value = any> {
143
158
  [key: string]: Value;
144
159
  }
160
+ export type TAmountType = "gross-without-gst" | "net" | "gross";
145
161
  export interface IBillingAddress {
146
162
  addressLine: string;
147
163
  city: string;
@@ -328,7 +344,7 @@ export interface IUserPreferencesAnalytics {
328
344
  name: string;
329
345
  text: string;
330
346
  }
331
- export type TAnalyticsServiceAction = ServiceAction<"init-start"> | ServiceAction<"loading-finish"> | ServiceAction<"card-number-field-focus"> | ServiceAction<"expiration-date-field-focus"> | ServiceAction<"cvv-field-focus"> | ServiceAction<"card-holder-field-focus"> | ServiceAction<"number-field-focus"> | ServiceAction<`charge-term-checkbox${`-${number}`}-focus`, IChargeTermsAnalytics> | ServiceAction<`charge-term-checkbox${`-${number}`}-check`, IChargeTermsAnalytics> | ServiceAction<`charge-term-checkbox${`-${number}`}-uncheck`, IChargeTermsAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-focus`, IUserPreferencesAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-check`, IUserPreferencesAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-uncheck`, IUserPreferencesAnalytics> | ServiceAction<"pay-button-focus"> | ServiceAction<"pay-button-click"> | ServiceAction<`${string}-button-focus`> | ServiceAction<`${string}-button-click`> | ServiceAction<"add-card-button-focus"> | ServiceAction<"add-card-button-click"> | ServiceAction<"card-options-button-click", ICardAnalytics> | ServiceAction<"cards-toggle-button-click", ICardListAnalytics> | ServiceAction<"remove-card-button-click", ICardAnalytics> | ServiceAction<"select-card-button-click", ICardAnalytics> | ServiceAction<"apms-show-button-click", ICardAnalytics>;
347
+ export type TAnalyticsServiceAction = ServiceAction<"init-start"> | ServiceAction<"loading-finish"> | ServiceAction<"card-number-field-focus"> | ServiceAction<"expiration-date-field-focus"> | ServiceAction<"cvv-field-focus"> | ServiceAction<"card-holder-field-focus"> | ServiceAction<"number-field-focus"> | ServiceAction<"master-click"> | ServiceAction<"master-focus"> | ServiceAction<`charge-term-checkbox${`-${number}`}-focus`, IChargeTermsAnalytics> | ServiceAction<`charge-term-checkbox${`-${number}`}-check`, IChargeTermsAnalytics> | ServiceAction<`charge-term-checkbox${`-${number}`}-uncheck`, IChargeTermsAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-focus`, IUserPreferencesAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-check`, IUserPreferencesAnalytics> | ServiceAction<`user-preference-checkbox${`-${number}`}-uncheck`, IUserPreferencesAnalytics> | ServiceAction<"pay-button-focus"> | ServiceAction<"pay-button-click"> | ServiceAction<`${string}-button-focus`> | ServiceAction<`${string}-button-click`> | ServiceAction<"add-card-button-focus"> | ServiceAction<"add-card-button-click"> | ServiceAction<"card-options-button-click", ICardAnalytics> | ServiceAction<"cards-toggle-button-click", ICardListAnalytics> | ServiceAction<"remove-card-button-click", ICardAnalytics> | ServiceAction<"select-card-button-click", ICardAnalytics> | ServiceAction<"apms-show-button-click", ICardAnalytics>;
332
348
  export interface IApmsShowAnalytics {
333
349
  show: boolean;
334
350
  }