@alma/widgets 4.3.7 → 4.4.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.
@@ -1,3 +1,3 @@
1
- import { ApiConfig, ConfigPlan, EligibilityPlan, statusResponse } from '../types';
2
- declare const useFetchEligibility: (purchaseAmount: number, { domain, merchantId }: ApiConfig, plans?: ConfigPlan[], customerBillingCountry?: string, customerShippingCountry?: string, merchantCoversAllFees?: boolean) => [EligibilityPlan[], statusResponse];
1
+ import { ApiConfig, ConfigPlan, EligibilityPlanToDisplay, statusResponse } from '../types';
2
+ declare const useFetchEligibility: (purchaseAmount: number, { domain, merchantId }: ApiConfig, plans?: ConfigPlan[], customerBillingCountry?: string, customerShippingCountry?: string, merchantCoversAllFees?: boolean) => [EligibilityPlanToDisplay[], statusResponse];
3
3
  export default useFetchEligibility;
@@ -19,7 +19,7 @@ declare const _default: {
19
19
  "credit-features.credit-cost-display": "{creditCost} (TAEG {taegPercentage})",
20
20
  "credit-features.information": "Verifique a sua capacidade de reembolso antes de assumir um compromisso.",
21
21
  "credit-features.information.title": "O crédito é um compromisso e deve ser reembolsado.",
22
- "credit-features.legal-text": "{totalWithoutFirstInstallment} {taegPercentage} {installmeentsCountWithoutFirst} Empréstimo de a uma taxa de juro fixa de durante um período de meses. {firstInstallmentAmount} {productPriceWithoutCreditCost}Para além de um depósito de , isto permitir-lhe-á financiar uma compra de . Sujeito a análise e aceitação pela Alma. Prazo legal de retratação de 14 dias. Simulação apresentada pela Alma, inscrita na Conservatória do Registo Comercial e das Sociedades de Nanterre sob o número 839 100 575, sociedade de pagamento e de financiamento aprovada pela ACPR sob o número 17408 (número CIB / código bancário).",
22
+ "credit-features.legal-text": "Empréstimo de {totalWithoutFirstInstallment} a uma taxa de juro fixa de {taegPercentage} durante um período de {installmeentsCountWithoutFirst} meses. Para além de um depósito de {firstInstallmentAmount}, isto permitir-lhe-á financiar uma compra de {productPriceWithoutCreditCost}. Sujeito a análise e aceitação pela Alma. Prazo legal de retratação de 14 dias. Simulação apresentada pela Alma, inscrita na Conservatória do Registo Comercial e das Sociedades de Nanterre sob o número 839 100 575, sociedade de pagamento e de financiamento aprovada pela ACPR sob o número 17408 (número CIB / código bancário).",
23
23
  "credit-features.total-credit-cost": "Incluindo comissões de crédito",
24
24
  "eligibility-modal.bullet-1": "Seleccionar <strong>Alma - Pay Now</strong> no final da compra.",
25
25
  "eligibility-modal.bullet-2": "Siga as instruções e valide o seu pagamento em <strong>2 minutos.</strong>",
@@ -74,6 +74,95 @@ export declare const mockEligibilityPaymentPlanWithIneligiblePlan: ({
74
74
  customer_total_cost_bps?: undefined;
75
75
  payment_plan?: undefined;
76
76
  })[];
77
+ export declare const mockEligibilityWithHiddenPlan: ({
78
+ customer_fee: number;
79
+ customer_interest: number;
80
+ customer_total_cost_amount: number;
81
+ customer_total_cost_bps: number;
82
+ deferred_days: number;
83
+ deferred_months: number;
84
+ eligible: boolean;
85
+ installments_count: number;
86
+ payment_plan: {
87
+ customer_fee: number;
88
+ customer_interest: number;
89
+ due_date: number;
90
+ purchase_amount: number;
91
+ total_amount: number;
92
+ }[];
93
+ purchase_amount: number;
94
+ constraints?: undefined;
95
+ reasons?: undefined;
96
+ } | {
97
+ constraints: {
98
+ purchase_amount: {
99
+ maximum: number;
100
+ minimum: number;
101
+ };
102
+ };
103
+ deferred_days: number;
104
+ deferred_months: number;
105
+ eligible: boolean;
106
+ installments_count: number;
107
+ purchase_amount: number;
108
+ reasons: {
109
+ purchase_amount: string;
110
+ };
111
+ customer_fee?: undefined;
112
+ customer_interest?: undefined;
113
+ customer_total_cost_amount?: undefined;
114
+ customer_total_cost_bps?: undefined;
115
+ payment_plan?: undefined;
116
+ } | {
117
+ deferred_days: number;
118
+ deferred_months: number;
119
+ eligible: boolean;
120
+ installments_count: number;
121
+ purchase_amount: number;
122
+ reasons: {
123
+ installments_count: string;
124
+ };
125
+ })[];
126
+ export declare const mockEligibilityWithGrayedOutPlan: ({
127
+ customer_fee: number;
128
+ customer_interest: number;
129
+ customer_total_cost_amount: number;
130
+ customer_total_cost_bps: number;
131
+ deferred_days: number;
132
+ deferred_months: number;
133
+ eligible: boolean;
134
+ installments_count: number;
135
+ payment_plan: {
136
+ customer_fee: number;
137
+ customer_interest: number;
138
+ due_date: number;
139
+ purchase_amount: number;
140
+ total_amount: number;
141
+ }[];
142
+ purchase_amount: number;
143
+ constraints?: undefined;
144
+ reasons?: undefined;
145
+ } | {
146
+ constraints: {
147
+ purchase_amount: {
148
+ maximum: number;
149
+ minimum: number;
150
+ };
151
+ };
152
+ deferred_days: number;
153
+ deferred_months: number;
154
+ eligible: boolean;
155
+ installments_count: number;
156
+ purchase_amount: number;
157
+ reasons: {
158
+ purchase_amount: string;
159
+ };
160
+ customer_fee?: undefined;
161
+ customer_interest?: undefined;
162
+ customer_total_cost_amount?: undefined;
163
+ customer_total_cost_bps?: undefined;
164
+ payment_plan?: undefined;
165
+ })[];
77
166
  export declare const mockPlansWithoutDeferred: EligibilityPlan[];
78
167
  export declare const mockPayNowPlan: EligibilityPlan[];
79
168
  export declare const configPlans: ConfigPlan[];
@@ -53,6 +53,7 @@ export type ErrorResponse = {
53
53
  export type EligibilityPlanToDisplay = EligibilityPlan & {
54
54
  minAmount?: number;
55
55
  maxAmount?: number;
56
+ hidden?: boolean;
56
57
  };
57
58
  export declare enum Locale {
58
59
  en = "en",