@stripe/stripe-js 1.20.2 → 1.21.2
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/pure.esm.js +1 -1
- package/dist/pure.js +1 -1
- package/dist/stripe.esm.js +1 -1
- package/dist/stripe.js +1 -1
- package/package.json +5 -5
- package/src/shared.ts +1 -2
- package/types/api/bank-accounts.d.ts +61 -0
- package/types/api/cards.d.ts +130 -0
- package/types/api/index.d.ts +9 -9
- package/types/api/payment-intents.d.ts +330 -0
- package/types/api/payment-methods.d.ts +349 -0
- package/types/api/setup-intents.d.ts +184 -0
- package/types/api/shared.d.ts +124 -126
- package/types/api/sources.d.ts +1045 -0
- package/types/api/tokens.d.ts +634 -0
- package/types/api/verification-sessions.d.ts +9 -0
- package/types/index.d.ts +14 -12
- package/types/stripe-js/checkout.d.ts +134 -136
- package/types/stripe-js/elements/affirm-message.d.ts +59 -61
- package/types/stripe-js/elements/afterpay-clearpay-message.d.ts +118 -120
- package/types/stripe-js/elements/au-bank-account.d.ts +123 -120
- package/types/stripe-js/elements/base.d.ts +263 -263
- package/types/stripe-js/elements/card-cvc.d.ts +107 -103
- package/types/stripe-js/elements/card-expiry.d.ts +107 -104
- package/types/stripe-js/elements/card-number.d.ts +128 -125
- package/types/stripe-js/elements/card.d.ts +157 -154
- package/types/stripe-js/elements/eps-bank.d.ts +125 -121
- package/types/stripe-js/elements/fpx-bank.d.ts +120 -116
- package/types/stripe-js/elements/iban.d.ts +134 -131
- package/types/stripe-js/elements/ideal-bank.d.ts +125 -121
- package/types/stripe-js/elements/index.d.ts +17 -0
- package/types/stripe-js/elements/link-authentication.d.ts +92 -94
- package/types/stripe-js/elements/p24-bank.d.ts +125 -121
- package/types/stripe-js/elements/payment-request-button.d.ts +127 -127
- package/types/stripe-js/elements/payment.d.ts +190 -169
- package/types/stripe-js/elements/shipping-address.d.ts +123 -125
- package/types/stripe-js/elements-group.d.ts +619 -0
- package/types/stripe-js/index.d.ts +8 -1057
- package/types/stripe-js/payment-intents.d.ts +951 -919
- package/types/stripe-js/payment-request.d.ts +503 -503
- package/types/stripe-js/setup-intents.d.ts +149 -135
- package/types/stripe-js/stripe.d.ts +1070 -0
- package/types/stripe-js/token-and-sources.d.ts +80 -80
- package/types/utils.d.ts +2 -0
- package/types/api/BankAccounts.d.ts +0 -63
- package/types/api/Cards.d.ts +0 -130
- package/types/api/PaymentIntents.d.ts +0 -329
- package/types/api/PaymentMethods.d.ts +0 -349
- package/types/api/SetupIntents.d.ts +0 -184
- package/types/api/Sources.d.ts +0 -1045
- package/types/api/Tokens.d.ts +0 -632
- package/types/api/VerificationSessions.d.ts +0 -11
- package/types/stripe-js/elements.d.ts +0 -525
|
@@ -1,138 +1,136 @@
|
|
|
1
|
-
|
|
1
|
+
import {StripeElementBase, StripeElementChangeEvent} from './base';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
): StripeShippingAddressElement;
|
|
3
|
+
export type StripeShippingAddressElement = StripeElementBase & {
|
|
4
|
+
/**
|
|
5
|
+
* The change event is triggered when the `Element`'s value changes.
|
|
6
|
+
*/
|
|
7
|
+
on(
|
|
8
|
+
eventType: 'change',
|
|
9
|
+
handler: (event: StripeShippingAddressElementChangeEvent) => any
|
|
10
|
+
): StripeShippingAddressElement;
|
|
11
|
+
once(
|
|
12
|
+
eventType: 'change',
|
|
13
|
+
handler: (event: StripeShippingAddressElementChangeEvent) => any
|
|
14
|
+
): StripeShippingAddressElement;
|
|
15
|
+
off(
|
|
16
|
+
eventType: 'change',
|
|
17
|
+
handler?: (event: StripeShippingAddressElementChangeEvent) => any
|
|
18
|
+
): StripeShippingAddressElement;
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Triggered when the element is fully rendered and can accept `element.focus` calls.
|
|
22
|
+
*/
|
|
23
|
+
on(
|
|
24
|
+
eventType: 'ready',
|
|
25
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
26
|
+
): StripeShippingAddressElement;
|
|
27
|
+
once(
|
|
28
|
+
eventType: 'ready',
|
|
29
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
30
|
+
): StripeShippingAddressElement;
|
|
31
|
+
off(
|
|
32
|
+
eventType: 'ready',
|
|
33
|
+
handler?: (event: {elementType: 'shippingAddress'}) => any
|
|
34
|
+
): StripeShippingAddressElement;
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Triggered when the element gains focus.
|
|
38
|
+
*/
|
|
39
|
+
on(
|
|
40
|
+
eventType: 'focus',
|
|
41
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
42
|
+
): StripeShippingAddressElement;
|
|
43
|
+
once(
|
|
44
|
+
eventType: 'focus',
|
|
45
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
46
|
+
): StripeShippingAddressElement;
|
|
47
|
+
off(
|
|
48
|
+
eventType: 'focus',
|
|
49
|
+
handler?: (event: {elementType: 'shippingAddress'}) => any
|
|
50
|
+
): StripeShippingAddressElement;
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Triggered when the element loses focus.
|
|
54
|
+
*/
|
|
55
|
+
on(
|
|
56
|
+
eventType: 'blur',
|
|
57
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
58
|
+
): StripeShippingAddressElement;
|
|
59
|
+
once(
|
|
60
|
+
eventType: 'blur',
|
|
61
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
62
|
+
): StripeShippingAddressElement;
|
|
63
|
+
off(
|
|
64
|
+
eventType: 'blur',
|
|
65
|
+
handler?: (event: {elementType: 'shippingAddress'}) => any
|
|
66
|
+
): StripeShippingAddressElement;
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Triggered when the escape key is pressed within the element.
|
|
70
|
+
*/
|
|
71
|
+
on(
|
|
72
|
+
eventType: 'escape',
|
|
73
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
74
|
+
): StripeShippingAddressElement;
|
|
75
|
+
once(
|
|
76
|
+
eventType: 'escape',
|
|
77
|
+
handler: (event: {elementType: 'shippingAddress'}) => any
|
|
78
|
+
): StripeShippingAddressElement;
|
|
79
|
+
off(
|
|
80
|
+
eventType: 'escape',
|
|
81
|
+
handler?: (event: {elementType: 'shippingAddress'}) => any
|
|
82
|
+
): StripeShippingAddressElement;
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Updates the options the `ShippingAddressElement` was initialized with.
|
|
86
|
+
* Updates are merged into the existing configuration.
|
|
87
|
+
*/
|
|
88
|
+
update(
|
|
89
|
+
options: Partial<StripeShippingAddressElementOptions>
|
|
90
|
+
): StripeShippingAddressElement;
|
|
91
|
+
};
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
export interface StripeShippingAddressElementOptions {
|
|
94
|
+
/**
|
|
95
|
+
* Control which countries are displayed in the shippingAddress Element.
|
|
96
|
+
*/
|
|
97
|
+
allowedCountries?: string[] | null;
|
|
98
|
+
}
|
|
100
99
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
export interface StripeShippingAddressElementChangeEvent
|
|
101
|
+
extends StripeElementChangeEvent {
|
|
102
|
+
/**
|
|
103
|
+
* The type of element that emitted this event.
|
|
104
|
+
*/
|
|
105
|
+
elementType: 'shippingAddress';
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Whether or not the shippingAddress Element is currently empty.
|
|
109
|
+
*/
|
|
110
|
+
empty: boolean;
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Whether or not the shippingAddress Element is complete.
|
|
114
|
+
*/
|
|
115
|
+
complete: boolean;
|
|
117
116
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Whether or not the the shipping address is new.
|
|
119
|
+
*/
|
|
120
|
+
isNewAddress: boolean;
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
122
|
+
/**
|
|
123
|
+
* An object containing the current address.
|
|
124
|
+
*/
|
|
125
|
+
value: {
|
|
126
|
+
name: string;
|
|
127
|
+
addressLine1: string;
|
|
128
|
+
addressLine2: string;
|
|
129
|
+
locality: string;
|
|
130
|
+
administrativeArea: string;
|
|
131
|
+
postalCode: string;
|
|
132
|
+
country: string;
|
|
133
|
+
dependentLocality: string;
|
|
134
|
+
sortingCode: string;
|
|
135
|
+
};
|
|
138
136
|
}
|