@bizzsv/bizz-payment 1.2.4 → 1.3.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/index.d.ts CHANGED
@@ -11,12 +11,14 @@ export declare class BizzPaymentForm {
11
11
  private serverErrorHandler;
12
12
  private orchestrator;
13
13
  private paymentIntent;
14
+ private points;
14
15
  private countryContent;
15
16
  private processPayment;
16
17
  private stateContent;
17
18
  private amountEvaluation;
18
19
  private currentAmount;
19
20
  private currentValues;
21
+ private pointsPaymentContext;
20
22
  constructor(config: PaymentFormConfig);
21
23
  /**
22
24
  * Subscribe to host-side events.
@@ -28,17 +30,23 @@ export declare class BizzPaymentForm {
28
30
  */
29
31
  private applyFixedAmountFromOrderTemplate;
30
32
  private renderForm;
33
+ private notifyCountriesLoadError;
31
34
  private resetForm;
32
35
  private setSubmitLoading;
33
36
  private setToken;
34
37
  private sendAlert;
35
38
  private sendFailureEmitter;
39
+ private processPointsPayment;
40
+ private resetPointsPayButton;
41
+ private handlePointsBalance;
36
42
  private sendReadyEmitter;
37
43
  private sendSizingEmitter;
38
44
  private sendSuccess;
39
45
  destroy(): void;
40
46
  }
41
47
 
48
+ declare type Environment = 'production' | 'sandbox';
49
+
42
50
  declare interface FormCustomHeader {
43
51
  logo?: boolean;
44
52
  description?: boolean;
@@ -52,9 +60,11 @@ export declare interface PaymentFormConfig {
52
60
  i18n?: PaymentFormI18n;
53
61
  branchCode: string;
54
62
  paymentRequestCode?: string;
63
+ paymentOrderCode?: string;
55
64
  description?: string;
56
65
  totalAmount?: number;
57
66
  header?: boolean | FormCustomHeader;
67
+ environment?: Environment;
58
68
  }
59
69
 
60
70
  declare type PaymentFormEventMap = {
@@ -112,12 +122,26 @@ export declare type PaymentFormMessage = {
112
122
  } | {
113
123
  type: 'payment-form:success';
114
124
  paymentIntent: PaymentIntentSuccessResponse;
125
+ } | {
126
+ type: 'payment-form:points-balance';
127
+ balance: PointsBalanceView;
128
+ } | {
129
+ type: 'payment-form:points-pay';
130
+ } | {
131
+ type: 'payment-form:points-pay-reset';
115
132
  } | {
116
133
  type: 'payment-form:states-loaded';
117
134
  states: State[];
118
135
  } | {
119
136
  type: 'payment-form:validate-amount';
120
137
  amount: string;
138
+ } | {
139
+ type: 'payment-form:update-forms';
140
+ forms: {
141
+ default: string;
142
+ points: string;
143
+ installments: string;
144
+ };
121
145
  } | {
122
146
  type: 'payment-form:sizing';
123
147
  width: number;
@@ -164,6 +188,14 @@ declare interface PaymentIntentSuccessResponse {
164
188
  };
165
189
  }
166
190
 
191
+ declare interface PointsBalanceView {
192
+ availableCents: number;
193
+ availablePoints: number;
194
+ currency: string;
195
+ purchaseCents: number;
196
+ purchasePoints: number;
197
+ }
198
+
167
199
  declare type State = {
168
200
  id: string;
169
201
  name: string;