Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / payments / index.ts
blob9b9b915f2e544dadf1040c169d9cf112d6794f1f
1 export { getPaymentMethodStatus, queryPaymentMethodStatus } from './core/api';
2 export { DEFAULT_TAX_BILLING_ADDRESS, type BillingAddress, type BillingAddressProperty } from './core/billing-address';
3 export { getErrors, isExpired, type CardModel } from './core/cardDetails';
4 export {
5     ADDON_NAMES,
6     AddonKey,
7     AddonLimit,
8     Autopay,
9     CURRENCIES,
10     CurrencySymbols,
11     DEFAULT_CURRENCY,
12     DOMAIN_ADDON_PREFIX,
13     FREE_SUBSCRIPTION,
14     INVOICE_STATE,
15     INVOICE_TYPE,
16     IP_ADDON_PREFIX,
17     MAX_ADDRESS_ADDON,
18     MAX_BITCOIN_AMOUNT,
19     MAX_CREDIT_AMOUNT,
20     MAX_DOMAIN_PLUS_ADDON,
21     MAX_DOMAIN_PRO_ADDON,
22     MAX_IPS_ADDON,
23     MAX_MEMBER_ADDON,
24     MAX_MEMBER_SCRIBE_ADDON,
25     MAX_MEMBER_VPN_B2B_ADDON,
26     MAX_PAYPAL_AMOUNT,
27     MAX_VPN_ADDON,
28     MEMBER_ADDON_PREFIX,
29     MIN_BITCOIN_AMOUNT,
30     MIN_CREDIT_AMOUNT,
31     MIN_PAYPAL_AMOUNT_CHARGEBEE,
32     MIN_PAYPAL_AMOUNT_INHOUSE,
33     MethodStorage,
34     PAYMENT_METHOD_TYPES,
35     PAYMENT_TOKEN_STATUS,
36     PLANS,
37     PLAN_NAMES,
38     PLAN_SERVICES,
39     PLAN_TYPES,
40     SCRIBE_ADDON_PREFIX,
41     TransactionState,
42     TransactionType,
43     UNPAID_STATE,
44 } from './core/constants';
45 export {
46     convertPaymentIntentData,
47     type PaymentVerificator,
48     type PaymentVerificatorV5,
49     type PaymentVerificatorV5Params,
50 } from './core/createPaymentToken';
51 export {
52     ensureTokenChargeable,
53     ensureTokenChargeableV5,
54     type EnsureTokenChargeableInputs,
55     type EnsureTokenChargeableTranslations,
56 } from './core/ensureTokenChargeable';
57 export {
58     NEW_BATCH_CURRENCIES_FEATURE_FLAG,
59     extendStatus,
60     getAvailableCurrencies,
61     getCurrencyRate,
62     getFallbackCurrency,
63     getPreferredCurrency,
64     isChargebeePaymentMethod,
65     isCreditNoteInvoice,
66     isCurrencyConversionInvoice,
67     isMainCurrency,
68     isRegionalCurrency,
69     isRegularInvoice,
70     isSignupFlow,
71     mainCurrencies,
72     type GetPreferredCurrencyParams,
73 } from './core/helpers';
74 export type {
75     AmountAndCurrency,
76     AvailablePaymentMethod,
77     CardPayment,
78     ChargeablePaymentParameters,
79     ChargeablePaymentToken,
80     ChargeableV5PaymentParameters,
81     ChargeableV5PaymentToken,
82     ChargebeeFetchedPaymentToken,
83     ChargebeeIframeEvents,
84     ChargebeeIframeHandles,
85     ChargebeeKillSwitch,
86     ChargebeeKillSwitchData,
87     CheckWithAutomaticOptions,
88     Currency,
89     ExistingPayment,
90     ExistingPaymentMethod,
91     ExtendedTokenPayment,
92     ForceEnableChargebee,
93     FreeSubscription,
94     InitializeCreditCardOptions,
95     Invoice,
96     InvoiceResponse,
97     LatestSubscription,
98     MaxKeys,
99     MultiCheckOptions,
100     MultiCheckSubscriptionData,
101     NonChargeablePaymentToken,
102     NonChargeableV5PaymentToken,
103     PayPalDetails,
104     PaymentMethodCardDetails,
105     PaymentMethodFlows,
106     PaymentMethodPaypal,
107     PaymentMethodSepa,
108     PaymentMethodStatus,
109     PaymentMethodStatusExtended,
110     PaymentMethodType,
111     PaymentTokenResult,
112     PaymentsApi,
113     PaypalPayment,
114     PlainPaymentMethodType,
115     PlanIDs,
116     RemoveEventListener,
117     RequestOptions,
118     SavedCardDetails,
119     SavedPaymentMethod,
120     SavedPaymentMethodExternal,
121     SavedPaymentMethodInternal,
122     SepaDetails,
123     TokenPayment,
124     TokenPaymentMethod,
125     Transaction,
126     TransactionResponse,
127     V5PaymentToken,
128     WrappedCardPayment,
129     WrappedCryptoPayment,
130     WrappedPaypalPayment,
131 } from './core/interface';
132 export { PaymentMethods, initializePaymentMethods } from './core/methods';
133 export {
134     CardPaymentProcessor,
135     InvalidCardDataError,
136     type CardPaymentProcessorState,
137 } from './core/payment-processors/cardPayment';
138 export {
139     ChargebeeCardPaymentProcessor,
140     type ChargebeeCardPaymentProcessorState,
141 } from './core/payment-processors/chargebeeCardPayment';
142 export {
143     ChargebeePaypalPaymentProcessor,
144     type ChargebeePaypalModalHandles,
145 } from './core/payment-processors/chargebeePaypalPayment';
146 export { PaymentProcessor } from './core/payment-processors/paymentProcessor';
147 export { PaypalPaymentProcessor } from './core/payment-processors/paypalPayment';
148 export { SavedChargebeePaymentProcessor } from './core/payment-processors/savedChargebeePayment';
149 export { SavedPaymentProcessor } from './core/payment-processors/savedPayment';
150 export { extractIBAN } from './core/sepa';
151 export {
152     getScribeAddonNameByPlan,
153     getSubscriptionPlanTitle as getSubscriptionPlanTitleAndName,
154 } from './core/subscription/helpers';
155 export type { FullPlansMap } from './core/subscription/interface';
156 export {
157     getAvailableCycles,
158     getPlanByName,
159     getPlansMap,
160     hasCycle,
161     planToPlanIDs,
162 } from './core/subscription/plans-map-wrapper';
163 export { SelectedPlan } from './core/subscription/selected-plan';
164 export {
165     displayTransactionState,
166     displayTransactionType,
167     getTransactionStateTitle,
168     getTransactionTypeTitle,
169 } from './core/transactions';
170 export {
171     isCardPayment,
172     isCheckWithAutomaticOptions,
173     isExistingPaymentMethod,
174     isFreeSubscription,
175     isPaymentMethodStatusExtended,
176     isPaypalDetails,
177     isPaypalPayment,
178     isSavedCardDetails,
179     isSavedPaymentMethodExternal,
180     isSavedPaymentMethodInternal,
181     isSavedPaymentMethodSepa,
182     isSepaDetails,
183     isStringPLAN,
184     isTokenPayment,
185     isTokenPaymentMethod,
186     isTransaction,
187     isV5PaymentToken,
188     isWrappedPaymentsVersion,
189     methodMatches,
190 } from './core/type-guards';
191 export {
192     canUseChargebee,
193     isOnSessionMigration,
194     isSplittedUser,
195     onSessionMigrationChargebeeStatus,
196     onSessionMigrationPaymentsVersion,
197     paymentMethodPaymentsVersion,
198     toV5PaymentToken,
199     v5PaymentTokenToLegacyPaymentToken,
200 } from './core/utils';