@stripe/stripe-js 3.0.9 → 3.0.10
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.mts +12792 -4
- package/dist/index.d.ts +12792 -4
- package/dist/{index.js → stripe.js} +1 -1
- package/dist/{index.mjs → stripe.mjs} +1 -1
- package/package.json +10 -11
- package/pure/index.d.mts +12771 -1
- package/pure/index.d.ts +12771 -1
- package/pure/index.js +204 -1
- package/pure/index.mjs +200 -1
- package/dist/api/bank-accounts.d.mts +0 -61
- package/dist/api/bank-accounts.d.ts +0 -61
- package/dist/api/cards.d.mts +0 -130
- package/dist/api/cards.d.ts +0 -130
- package/dist/api/financial-connections.d.mts +0 -232
- package/dist/api/financial-connections.d.ts +0 -232
- package/dist/api/index.d.mts +0 -11
- package/dist/api/index.d.ts +0 -11
- package/dist/api/orders.d.mts +0 -122
- package/dist/api/orders.d.ts +0 -122
- package/dist/api/payment-intents.d.mts +0 -330
- package/dist/api/payment-intents.d.ts +0 -330
- package/dist/api/payment-methods.d.mts +0 -452
- package/dist/api/payment-methods.d.ts +0 -452
- package/dist/api/setup-intents.d.mts +0 -184
- package/dist/api/setup-intents.d.ts +0 -184
- package/dist/api/shared.d.mts +0 -125
- package/dist/api/shared.d.ts +0 -125
- package/dist/api/sources.d.mts +0 -1045
- package/dist/api/sources.d.ts +0 -1045
- package/dist/api/tokens.d.mts +0 -639
- package/dist/api/tokens.d.ts +0 -639
- package/dist/api/verification-sessions.d.mts +0 -9
- package/dist/api/verification-sessions.d.ts +0 -9
- package/dist/pure.d.mts +0 -5
- package/dist/pure.d.ts +0 -5
- package/dist/pure.js +0 -204
- package/dist/pure.mjs +0 -200
- package/dist/shared.d.mts +0 -6
- package/dist/shared.d.ts +0 -6
- package/dist/stripe-js/checkout.d.mts +0 -153
- package/dist/stripe-js/checkout.d.ts +0 -153
- package/dist/stripe-js/custom-checkout.d.mts +0 -402
- package/dist/stripe-js/custom-checkout.d.ts +0 -402
- package/dist/stripe-js/elements/address.d.mts +0 -261
- package/dist/stripe-js/elements/address.d.ts +0 -261
- package/dist/stripe-js/elements/affirm-message.d.mts +0 -65
- package/dist/stripe-js/elements/affirm-message.d.ts +0 -65
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.mts +0 -119
- package/dist/stripe-js/elements/afterpay-clearpay-message.d.ts +0 -119
- package/dist/stripe-js/elements/apple-pay.d.mts +0 -156
- package/dist/stripe-js/elements/apple-pay.d.ts +0 -156
- package/dist/stripe-js/elements/au-bank-account.d.mts +0 -138
- package/dist/stripe-js/elements/au-bank-account.d.ts +0 -138
- package/dist/stripe-js/elements/base.d.mts +0 -264
- package/dist/stripe-js/elements/base.d.ts +0 -264
- package/dist/stripe-js/elements/card-cvc.d.mts +0 -119
- package/dist/stripe-js/elements/card-cvc.d.ts +0 -119
- package/dist/stripe-js/elements/card-expiry.d.mts +0 -119
- package/dist/stripe-js/elements/card-expiry.d.ts +0 -119
- package/dist/stripe-js/elements/card-number.d.mts +0 -200
- package/dist/stripe-js/elements/card-number.d.ts +0 -200
- package/dist/stripe-js/elements/card.d.mts +0 -226
- package/dist/stripe-js/elements/card.d.ts +0 -226
- package/dist/stripe-js/elements/cart.d.mts +0 -224
- package/dist/stripe-js/elements/cart.d.ts +0 -224
- package/dist/stripe-js/elements/eps-bank.d.mts +0 -140
- package/dist/stripe-js/elements/eps-bank.d.ts +0 -140
- package/dist/stripe-js/elements/express-checkout.d.mts +0 -446
- package/dist/stripe-js/elements/express-checkout.d.ts +0 -446
- package/dist/stripe-js/elements/fpx-bank.d.mts +0 -134
- package/dist/stripe-js/elements/fpx-bank.d.ts +0 -134
- package/dist/stripe-js/elements/iban.d.mts +0 -135
- package/dist/stripe-js/elements/iban.d.ts +0 -135
- package/dist/stripe-js/elements/ideal-bank.d.mts +0 -140
- package/dist/stripe-js/elements/ideal-bank.d.ts +0 -140
- package/dist/stripe-js/elements/index.d.mts +0 -22
- package/dist/stripe-js/elements/index.d.ts +0 -22
- package/dist/stripe-js/elements/issuing/index.d.mts +0 -5
- package/dist/stripe-js/elements/issuing/index.d.ts +0 -5
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.mts +0 -37
- package/dist/stripe-js/elements/issuing/issuing-card-copy-button.d.ts +0 -37
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.mts +0 -32
- package/dist/stripe-js/elements/issuing/issuing-card-cvc-display.d.ts +0 -32
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.mts +0 -32
- package/dist/stripe-js/elements/issuing/issuing-card-expiry-display.d.ts +0 -32
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.mts +0 -40
- package/dist/stripe-js/elements/issuing/issuing-card-number-display.d.ts +0 -40
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.mts +0 -32
- package/dist/stripe-js/elements/issuing/issuing-card-pin-display.d.ts +0 -32
- package/dist/stripe-js/elements/link-authentication.d.mts +0 -158
- package/dist/stripe-js/elements/link-authentication.d.ts +0 -158
- package/dist/stripe-js/elements/p24-bank.d.mts +0 -140
- package/dist/stripe-js/elements/p24-bank.d.ts +0 -140
- package/dist/stripe-js/elements/payment-method-messaging.d.mts +0 -98
- package/dist/stripe-js/elements/payment-method-messaging.d.ts +0 -98
- package/dist/stripe-js/elements/payment-request-button.d.mts +0 -151
- package/dist/stripe-js/elements/payment-request-button.d.ts +0 -151
- package/dist/stripe-js/elements/payment.d.mts +0 -275
- package/dist/stripe-js/elements/payment.d.ts +0 -275
- package/dist/stripe-js/elements/shipping-address.d.mts +0 -215
- package/dist/stripe-js/elements/shipping-address.d.ts +0 -215
- package/dist/stripe-js/elements-group.d.mts +0 -1129
- package/dist/stripe-js/elements-group.d.ts +0 -1129
- package/dist/stripe-js/embedded-checkout.d.mts +0 -35
- package/dist/stripe-js/embedded-checkout.d.ts +0 -35
- package/dist/stripe-js/ephemeral-keys.d.mts +0 -3
- package/dist/stripe-js/ephemeral-keys.d.ts +0 -3
- package/dist/stripe-js/financial-connections.d.mts +0 -19
- package/dist/stripe-js/financial-connections.d.ts +0 -19
- package/dist/stripe-js/index.d.mts +0 -13
- package/dist/stripe-js/index.d.ts +0 -13
- package/dist/stripe-js/orders.d.mts +0 -9
- package/dist/stripe-js/orders.d.ts +0 -9
- package/dist/stripe-js/payment-intents.d.mts +0 -1470
- package/dist/stripe-js/payment-intents.d.ts +0 -1470
- package/dist/stripe-js/payment-request.d.mts +0 -529
- package/dist/stripe-js/payment-request.d.ts +0 -529
- package/dist/stripe-js/setup-intents.d.mts +0 -250
- package/dist/stripe-js/setup-intents.d.ts +0 -250
- package/dist/stripe-js/stripe.d.mts +0 -1472
- package/dist/stripe-js/stripe.d.ts +0 -1472
- package/dist/stripe-js/token-and-sources.d.mts +0 -110
- package/dist/stripe-js/token-and-sources.d.ts +0 -110
- package/dist/utils.d.mts +0 -2
- package/dist/utils.d.ts +0 -2
- package/lib/index.d.mts +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -2
- package/lib/index.mjs +0 -1
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import {StripeElementBase} from './base';
|
|
2
|
-
import {StripeError} from '../stripe';
|
|
3
|
-
|
|
4
|
-
export type StripeAddressElement = StripeElementBase & {
|
|
5
|
-
/**
|
|
6
|
-
* The change event is triggered when the `Element`'s value changes.
|
|
7
|
-
*/
|
|
8
|
-
on(
|
|
9
|
-
eventType: 'change',
|
|
10
|
-
handler: (event: StripeAddressElementChangeEvent) => any
|
|
11
|
-
): StripeAddressElement;
|
|
12
|
-
once(
|
|
13
|
-
eventType: 'change',
|
|
14
|
-
handler: (event: StripeAddressElementChangeEvent) => any
|
|
15
|
-
): StripeAddressElement;
|
|
16
|
-
off(
|
|
17
|
-
eventType: 'change',
|
|
18
|
-
handler?: (event: StripeAddressElementChangeEvent) => any
|
|
19
|
-
): StripeAddressElement;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
23
|
-
*/
|
|
24
|
-
on(
|
|
25
|
-
eventType: 'ready',
|
|
26
|
-
handler: (event: {elementType: 'address'}) => any
|
|
27
|
-
): StripeAddressElement;
|
|
28
|
-
once(
|
|
29
|
-
eventType: 'ready',
|
|
30
|
-
handler: (event: {elementType: 'address'}) => any
|
|
31
|
-
): StripeAddressElement;
|
|
32
|
-
off(
|
|
33
|
-
eventType: 'ready',
|
|
34
|
-
handler?: (event: {elementType: 'address'}) => any
|
|
35
|
-
): StripeAddressElement;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Triggered when the element gains focus.
|
|
39
|
-
*/
|
|
40
|
-
on(
|
|
41
|
-
eventType: 'focus',
|
|
42
|
-
handler: (event: {elementType: 'address'}) => any
|
|
43
|
-
): StripeAddressElement;
|
|
44
|
-
once(
|
|
45
|
-
eventType: 'focus',
|
|
46
|
-
handler: (event: {elementType: 'address'}) => any
|
|
47
|
-
): StripeAddressElement;
|
|
48
|
-
off(
|
|
49
|
-
eventType: 'focus',
|
|
50
|
-
handler?: (event: {elementType: 'address'}) => any
|
|
51
|
-
): StripeAddressElement;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Triggered when the element loses focus.
|
|
55
|
-
*/
|
|
56
|
-
on(
|
|
57
|
-
eventType: 'blur',
|
|
58
|
-
handler: (event: {elementType: 'address'}) => any
|
|
59
|
-
): StripeAddressElement;
|
|
60
|
-
once(
|
|
61
|
-
eventType: 'blur',
|
|
62
|
-
handler: (event: {elementType: 'address'}) => any
|
|
63
|
-
): StripeAddressElement;
|
|
64
|
-
off(
|
|
65
|
-
eventType: 'blur',
|
|
66
|
-
handler?: (event: {elementType: 'address'}) => any
|
|
67
|
-
): StripeAddressElement;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Triggered when the escape key is pressed within the element.
|
|
71
|
-
*/
|
|
72
|
-
on(
|
|
73
|
-
eventType: 'escape',
|
|
74
|
-
handler: (event: {elementType: 'address'}) => any
|
|
75
|
-
): StripeAddressElement;
|
|
76
|
-
once(
|
|
77
|
-
eventType: 'escape',
|
|
78
|
-
handler: (event: {elementType: 'address'}) => any
|
|
79
|
-
): StripeAddressElement;
|
|
80
|
-
off(
|
|
81
|
-
eventType: 'escape',
|
|
82
|
-
handler?: (event: {elementType: 'address'}) => any
|
|
83
|
-
): StripeAddressElement;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Triggered when the element fails to load.
|
|
87
|
-
*/
|
|
88
|
-
on(
|
|
89
|
-
eventType: 'loaderror',
|
|
90
|
-
handler: (event: {elementType: 'address'; error: StripeError}) => any
|
|
91
|
-
): StripeAddressElement;
|
|
92
|
-
once(
|
|
93
|
-
eventType: 'loaderror',
|
|
94
|
-
handler: (event: {elementType: 'address'; error: StripeError}) => any
|
|
95
|
-
): StripeAddressElement;
|
|
96
|
-
off(
|
|
97
|
-
eventType: 'loaderror',
|
|
98
|
-
handler?: (event: {elementType: 'address'; error: StripeError}) => any
|
|
99
|
-
): StripeAddressElement;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Triggered when the loader UI is mounted to the DOM and ready to be displayed.
|
|
103
|
-
*/
|
|
104
|
-
on(
|
|
105
|
-
eventType: 'loaderstart',
|
|
106
|
-
handler: (event: {elementType: 'address'}) => any
|
|
107
|
-
): StripeAddressElement;
|
|
108
|
-
once(
|
|
109
|
-
eventType: 'loaderstart',
|
|
110
|
-
handler: (event: {elementType: 'address'}) => any
|
|
111
|
-
): StripeAddressElement;
|
|
112
|
-
off(
|
|
113
|
-
eventType: 'loaderstart',
|
|
114
|
-
handler?: (event: {elementType: 'address'}) => any
|
|
115
|
-
): StripeAddressElement;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Updates the options the `AddressElement` was initialized with.
|
|
119
|
-
* Updates are merged into the existing configuration.
|
|
120
|
-
*/
|
|
121
|
-
update(options: Partial<StripeAddressElementOptions>): StripeAddressElement;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Validates and retrieves form values from the `AddressElement`.
|
|
125
|
-
*/
|
|
126
|
-
getValue(): Promise<
|
|
127
|
-
Pick<StripeAddressElementChangeEvent, 'complete' | 'isNewAddress' | 'value'>
|
|
128
|
-
>;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export interface ContactOption {
|
|
132
|
-
name: string;
|
|
133
|
-
phone?: string;
|
|
134
|
-
address: {
|
|
135
|
-
line1: string;
|
|
136
|
-
line2?: string;
|
|
137
|
-
city: string;
|
|
138
|
-
state: string;
|
|
139
|
-
postal_code: string;
|
|
140
|
-
country: string;
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export type AddressMode = 'shipping' | 'billing';
|
|
145
|
-
|
|
146
|
-
export interface StripeAddressElementOptions {
|
|
147
|
-
/**
|
|
148
|
-
* Control which mode the AddressElement will be used for.
|
|
149
|
-
*/
|
|
150
|
-
mode: AddressMode;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* An array of two-letter ISO country codes representing which countries
|
|
154
|
-
* are displayed in the AddressElement.
|
|
155
|
-
*/
|
|
156
|
-
allowedCountries?: string[] | null;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Control autocomplete settings in the AddressElement.
|
|
160
|
-
*/
|
|
161
|
-
autocomplete?:
|
|
162
|
-
| {mode: 'automatic'}
|
|
163
|
-
| {mode: 'disabled'}
|
|
164
|
-
| {mode: 'google_maps_api'; apiKey: string};
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Whether or not AddressElement accepts PO boxes
|
|
168
|
-
*/
|
|
169
|
-
blockPoBox?: boolean;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* An array of saved addresses.
|
|
173
|
-
*/
|
|
174
|
-
contacts?: ContactOption[];
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Default value for AddressElement fields
|
|
178
|
-
*/
|
|
179
|
-
defaultValues?: {
|
|
180
|
-
name?: string | null;
|
|
181
|
-
firstName?: string | null;
|
|
182
|
-
lastName?: string | null;
|
|
183
|
-
address?: {
|
|
184
|
-
line1?: string | null;
|
|
185
|
-
line2?: string | null;
|
|
186
|
-
city?: string | null;
|
|
187
|
-
state?: string | null;
|
|
188
|
-
postal_code?: string | null;
|
|
189
|
-
country: string;
|
|
190
|
-
};
|
|
191
|
-
phone?: string | null;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Control which additional fields to display in the AddressElement.
|
|
196
|
-
*/
|
|
197
|
-
fields?: {
|
|
198
|
-
phone?: 'always' | 'never' | 'auto';
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Specify validation rules for the above additional fields.
|
|
203
|
-
*/
|
|
204
|
-
validation?: {
|
|
205
|
-
phone?: {
|
|
206
|
-
required: 'always' | 'never' | 'auto';
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Specify display options in the AddressElement
|
|
212
|
-
*/
|
|
213
|
-
display?: {
|
|
214
|
-
name?: 'full' | 'split' | 'organization';
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export interface StripeAddressElementChangeEvent {
|
|
219
|
-
/**
|
|
220
|
-
* The type of element that emitted this event.
|
|
221
|
-
*/
|
|
222
|
-
elementType: 'address';
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* The mode of the AddressElement that emitted this event.
|
|
226
|
-
*/
|
|
227
|
-
elementMode: AddressMode;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Whether or not the AddressElement is currently empty.
|
|
231
|
-
*/
|
|
232
|
-
empty: boolean;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Whether or not the AddressElement is complete.
|
|
236
|
-
*/
|
|
237
|
-
complete: boolean;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Whether or not the address is new.
|
|
241
|
-
*/
|
|
242
|
-
isNewAddress: boolean;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* An object containing the current address.
|
|
246
|
-
*/
|
|
247
|
-
value: {
|
|
248
|
-
name: string;
|
|
249
|
-
firstName?: string;
|
|
250
|
-
lastName?: string;
|
|
251
|
-
address: {
|
|
252
|
-
line1: string;
|
|
253
|
-
line2: string | null;
|
|
254
|
-
city: string;
|
|
255
|
-
state: string;
|
|
256
|
-
postal_code: string;
|
|
257
|
-
country: string;
|
|
258
|
-
};
|
|
259
|
-
phone?: string;
|
|
260
|
-
};
|
|
261
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
export type StripeAffirmMessageElement = {
|
|
2
|
-
/**
|
|
3
|
-
* The `element.mount` method attaches your [Element](https://stripe.com/docs/js/element) to the DOM.
|
|
4
|
-
* `element.mount` accepts either a CSS Selector (e.g., `'#affirm-message'`) or a DOM element.
|
|
5
|
-
*/
|
|
6
|
-
mount(domElement: string | HTMLElement): void;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Removes the element from the DOM and destroys it.
|
|
10
|
-
* A destroyed element can not be re-activated or re-mounted to the DOM.
|
|
11
|
-
*/
|
|
12
|
-
destroy(): void;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Unmounts the element from the DOM.
|
|
16
|
-
* Call `element.mount` to re-attach it to the DOM.
|
|
17
|
-
*/
|
|
18
|
-
unmount(): void;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Updates the options the `AffirmMessageElement` was initialized with.
|
|
22
|
-
* Updates are merged into the existing configuration.
|
|
23
|
-
*/
|
|
24
|
-
update(options: Partial<StripeAffirmMessageElementOptions>): void;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Triggered when the element is fully loaded and ready to perform method calls.
|
|
28
|
-
*/
|
|
29
|
-
on(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'affirmMessage'}) => any
|
|
32
|
-
): StripeAffirmMessageElement;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export interface StripeAffirmMessageElementOptions {
|
|
36
|
-
/**
|
|
37
|
-
* The total amount in the smallest currency unit.
|
|
38
|
-
*/
|
|
39
|
-
amount: number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The currency to display.
|
|
43
|
-
*/
|
|
44
|
-
currency: 'USD';
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The affirm logo color.
|
|
48
|
-
*/
|
|
49
|
-
logoColor?: 'primary' | 'black' | 'white';
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The font color of the promotional message.
|
|
53
|
-
*/
|
|
54
|
-
fontColor?: string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The font size of the promotional message.
|
|
58
|
-
*/
|
|
59
|
-
fontSize?: string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* The text alignment of the promotional message.
|
|
63
|
-
*/
|
|
64
|
-
textAlign?: 'start' | 'end' | 'left' | 'right' | 'center' | 'justify';
|
|
65
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
export type StripeAffirmMessageElement = {
|
|
2
|
-
/**
|
|
3
|
-
* The `element.mount` method attaches your [Element](https://stripe.com/docs/js/element) to the DOM.
|
|
4
|
-
* `element.mount` accepts either a CSS Selector (e.g., `'#affirm-message'`) or a DOM element.
|
|
5
|
-
*/
|
|
6
|
-
mount(domElement: string | HTMLElement): void;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Removes the element from the DOM and destroys it.
|
|
10
|
-
* A destroyed element can not be re-activated or re-mounted to the DOM.
|
|
11
|
-
*/
|
|
12
|
-
destroy(): void;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Unmounts the element from the DOM.
|
|
16
|
-
* Call `element.mount` to re-attach it to the DOM.
|
|
17
|
-
*/
|
|
18
|
-
unmount(): void;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Updates the options the `AffirmMessageElement` was initialized with.
|
|
22
|
-
* Updates are merged into the existing configuration.
|
|
23
|
-
*/
|
|
24
|
-
update(options: Partial<StripeAffirmMessageElementOptions>): void;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Triggered when the element is fully loaded and ready to perform method calls.
|
|
28
|
-
*/
|
|
29
|
-
on(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'affirmMessage'}) => any
|
|
32
|
-
): StripeAffirmMessageElement;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export interface StripeAffirmMessageElementOptions {
|
|
36
|
-
/**
|
|
37
|
-
* The total amount in the smallest currency unit.
|
|
38
|
-
*/
|
|
39
|
-
amount: number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The currency to display.
|
|
43
|
-
*/
|
|
44
|
-
currency: 'USD';
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The affirm logo color.
|
|
48
|
-
*/
|
|
49
|
-
logoColor?: 'primary' | 'black' | 'white';
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The font color of the promotional message.
|
|
53
|
-
*/
|
|
54
|
-
fontColor?: string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The font size of the promotional message.
|
|
58
|
-
*/
|
|
59
|
-
fontSize?: string;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* The text alignment of the promotional message.
|
|
63
|
-
*/
|
|
64
|
-
textAlign?: 'start' | 'end' | 'left' | 'right' | 'center' | 'justify';
|
|
65
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export type StripeAfterpayClearpayMessageElement = {
|
|
2
|
-
/**
|
|
3
|
-
* The `element.mount` method attaches your [Element](https://stripe.com/docs/js/element) to the DOM.
|
|
4
|
-
* `element.mount` accepts either a CSS Selector (e.g., `'#afterpay-clearpay-message'`) or a DOM element.
|
|
5
|
-
*/
|
|
6
|
-
mount(domElement: string | HTMLElement): void;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Removes the element from the DOM and destroys it.
|
|
10
|
-
* A destroyed element can not be re-activated or re-mounted to the DOM.
|
|
11
|
-
*/
|
|
12
|
-
destroy(): void;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Unmounts the element from the DOM.
|
|
16
|
-
* Call `element.mount` to re-attach it to the DOM.
|
|
17
|
-
*/
|
|
18
|
-
unmount(): void;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Updates the options the `AfterpayClearpayMessageElement` was initialized with.
|
|
22
|
-
* Updates are merged into the existing configuration.
|
|
23
|
-
*/
|
|
24
|
-
update(options: Partial<StripeAfterpayClearpayMessageElementOptions>): void;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Triggered when the element is fully loaded and ready to perform method calls.
|
|
28
|
-
*/
|
|
29
|
-
on(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'afterpayClearpayMessage'}) => any
|
|
32
|
-
): StripeAfterpayClearpayMessageElement;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export interface StripeAfterpayClearpayMessageElementOptions {
|
|
36
|
-
/**
|
|
37
|
-
* The total amount, divided into 4 installments, in the smallest currency unit.
|
|
38
|
-
*/
|
|
39
|
-
amount: number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The currency to display.
|
|
43
|
-
*/
|
|
44
|
-
currency: 'USD' | 'AUD' | 'CAD' | 'GBP' | 'NZD' | 'EUR';
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The badge color theme, applied when `logoType` is set to badge.
|
|
48
|
-
*/
|
|
49
|
-
badgeTheme?:
|
|
50
|
-
| 'black-on-mint'
|
|
51
|
-
| 'black-on-white'
|
|
52
|
-
| 'mint-on-black'
|
|
53
|
-
| 'white-on-black';
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The leading text for the mesage.
|
|
57
|
-
*/
|
|
58
|
-
introText?: 'In' | 'in' | 'Or' | 'or' | 'Pay' | 'pay' | 'Pay in' | 'pay in';
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Indicates whether an item is eligible for purchase with Afterpay Clearpay.
|
|
62
|
-
*/
|
|
63
|
-
isEligible?: boolean;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Indicates whether an entire cart is eligible for purchase with Afterpay Clearpay.
|
|
67
|
-
*/
|
|
68
|
-
isCartEligible?: boolean;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The lockup color theme, applied when `logoType` is set to lockup.
|
|
72
|
-
*/
|
|
73
|
-
lockupTheme?: 'black' | 'white' | 'mint';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The logo style to display.
|
|
77
|
-
*/
|
|
78
|
-
logoType?: 'badge' | 'lockup';
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The maximum `amount` allowed for a purchase. This should match the limit defined in your Stripe dashboard.
|
|
82
|
-
*/
|
|
83
|
-
max?: number;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The minimum `amount` allowed for a purchase. This should match the limit defined in your Stripe dashboard.
|
|
87
|
-
*/
|
|
88
|
-
min?: number;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The style of modal link to display.
|
|
92
|
-
*/
|
|
93
|
-
modalLinkStyle?: 'circled-info-icon' | 'learn-more-text' | 'more-info-text';
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* The background color for the info modal.
|
|
97
|
-
*/
|
|
98
|
-
modalTheme?: 'mint' | 'white';
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Determines whether 'interest-free' is displayed in the message.
|
|
102
|
-
*/
|
|
103
|
-
showInterestFree?: boolean;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Determines whether 'with' is displayed before the logo.
|
|
107
|
-
*/
|
|
108
|
-
showLowerLimit?: boolean;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Determines whether the lower limit is displayed when `amount` exceeds price limits.
|
|
112
|
-
*/
|
|
113
|
-
showUpperLimit?: boolean;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Determines whether the upper limit is displayed when `amount` exceeds price limits.
|
|
117
|
-
*/
|
|
118
|
-
showWith?: boolean;
|
|
119
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export type StripeAfterpayClearpayMessageElement = {
|
|
2
|
-
/**
|
|
3
|
-
* The `element.mount` method attaches your [Element](https://stripe.com/docs/js/element) to the DOM.
|
|
4
|
-
* `element.mount` accepts either a CSS Selector (e.g., `'#afterpay-clearpay-message'`) or a DOM element.
|
|
5
|
-
*/
|
|
6
|
-
mount(domElement: string | HTMLElement): void;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Removes the element from the DOM and destroys it.
|
|
10
|
-
* A destroyed element can not be re-activated or re-mounted to the DOM.
|
|
11
|
-
*/
|
|
12
|
-
destroy(): void;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Unmounts the element from the DOM.
|
|
16
|
-
* Call `element.mount` to re-attach it to the DOM.
|
|
17
|
-
*/
|
|
18
|
-
unmount(): void;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Updates the options the `AfterpayClearpayMessageElement` was initialized with.
|
|
22
|
-
* Updates are merged into the existing configuration.
|
|
23
|
-
*/
|
|
24
|
-
update(options: Partial<StripeAfterpayClearpayMessageElementOptions>): void;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Triggered when the element is fully loaded and ready to perform method calls.
|
|
28
|
-
*/
|
|
29
|
-
on(
|
|
30
|
-
eventType: 'ready',
|
|
31
|
-
handler: (event: {elementType: 'afterpayClearpayMessage'}) => any
|
|
32
|
-
): StripeAfterpayClearpayMessageElement;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export interface StripeAfterpayClearpayMessageElementOptions {
|
|
36
|
-
/**
|
|
37
|
-
* The total amount, divided into 4 installments, in the smallest currency unit.
|
|
38
|
-
*/
|
|
39
|
-
amount: number;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The currency to display.
|
|
43
|
-
*/
|
|
44
|
-
currency: 'USD' | 'AUD' | 'CAD' | 'GBP' | 'NZD' | 'EUR';
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The badge color theme, applied when `logoType` is set to badge.
|
|
48
|
-
*/
|
|
49
|
-
badgeTheme?:
|
|
50
|
-
| 'black-on-mint'
|
|
51
|
-
| 'black-on-white'
|
|
52
|
-
| 'mint-on-black'
|
|
53
|
-
| 'white-on-black';
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The leading text for the mesage.
|
|
57
|
-
*/
|
|
58
|
-
introText?: 'In' | 'in' | 'Or' | 'or' | 'Pay' | 'pay' | 'Pay in' | 'pay in';
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Indicates whether an item is eligible for purchase with Afterpay Clearpay.
|
|
62
|
-
*/
|
|
63
|
-
isEligible?: boolean;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Indicates whether an entire cart is eligible for purchase with Afterpay Clearpay.
|
|
67
|
-
*/
|
|
68
|
-
isCartEligible?: boolean;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* The lockup color theme, applied when `logoType` is set to lockup.
|
|
72
|
-
*/
|
|
73
|
-
lockupTheme?: 'black' | 'white' | 'mint';
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The logo style to display.
|
|
77
|
-
*/
|
|
78
|
-
logoType?: 'badge' | 'lockup';
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The maximum `amount` allowed for a purchase. This should match the limit defined in your Stripe dashboard.
|
|
82
|
-
*/
|
|
83
|
-
max?: number;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The minimum `amount` allowed for a purchase. This should match the limit defined in your Stripe dashboard.
|
|
87
|
-
*/
|
|
88
|
-
min?: number;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The style of modal link to display.
|
|
92
|
-
*/
|
|
93
|
-
modalLinkStyle?: 'circled-info-icon' | 'learn-more-text' | 'more-info-text';
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* The background color for the info modal.
|
|
97
|
-
*/
|
|
98
|
-
modalTheme?: 'mint' | 'white';
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Determines whether 'interest-free' is displayed in the message.
|
|
102
|
-
*/
|
|
103
|
-
showInterestFree?: boolean;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Determines whether 'with' is displayed before the logo.
|
|
107
|
-
*/
|
|
108
|
-
showLowerLimit?: boolean;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Determines whether the lower limit is displayed when `amount` exceeds price limits.
|
|
112
|
-
*/
|
|
113
|
-
showUpperLimit?: boolean;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Determines whether the upper limit is displayed when `amount` exceeds price limits.
|
|
117
|
-
*/
|
|
118
|
-
showWith?: boolean;
|
|
119
|
-
}
|