@whop/sdk 0.0.9 → 0.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/CHANGELOG.md +20 -0
- package/client.d.mts +11 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -5
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/app-builds.d.mts +4 -0
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +4 -0
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payment-tokens.d.mts +157 -0
- package/resources/payment-tokens.d.mts.map +1 -0
- package/resources/payment-tokens.d.ts +157 -0
- package/resources/payment-tokens.d.ts.map +1 -0
- package/resources/payment-tokens.js +34 -0
- package/resources/payment-tokens.js.map +1 -0
- package/resources/payment-tokens.mjs +30 -0
- package/resources/payment-tokens.mjs.map +1 -0
- package/resources/payments.d.mts +255 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +255 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +31 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +31 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/setup-intents.d.mts +359 -0
- package/resources/setup-intents.d.mts.map +1 -0
- package/resources/setup-intents.d.ts +359 -0
- package/resources/setup-intents.d.ts.map +1 -0
- package/resources/setup-intents.js +38 -0
- package/resources/setup-intents.js.map +1 -0
- package/resources/setup-intents.mjs +34 -0
- package/resources/setup-intents.mjs.map +1 -0
- package/resources/shared.d.mts +50 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +50 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +72 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +72 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +47 -1
- package/src/resources/app-builds.ts +5 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/payment-tokens.ts +207 -0
- package/src/resources/payments.ts +306 -0
- package/src/resources/setup-intents.ts +435 -0
- package/src/resources/shared.ts +59 -0
- package/src/resources/webhooks.ts +91 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as PaymentsAPI from './payments';
|
|
5
|
+
import * as Shared from './shared';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
|
|
8
|
+
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class SetupIntents extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a Setup Intent by ID
|
|
14
|
+
*
|
|
15
|
+
* Required permissions:
|
|
16
|
+
*
|
|
17
|
+
* - `payment:setup_intent:read`
|
|
18
|
+
* - `member:basic:read`
|
|
19
|
+
* - `member:email:read`
|
|
20
|
+
*/
|
|
21
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<SetupIntent> {
|
|
22
|
+
return this._client.get(path`/setup_intents/${id}`, options);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Lists Setup Intents
|
|
27
|
+
*
|
|
28
|
+
* Required permissions:
|
|
29
|
+
*
|
|
30
|
+
* - `payment:setup_intent:read`
|
|
31
|
+
* - `member:basic:read`
|
|
32
|
+
* - `member:email:read`
|
|
33
|
+
*/
|
|
34
|
+
list(
|
|
35
|
+
query: SetupIntentListParams,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): PagePromise<SetupIntentListResponsesCursorPage, SetupIntentListResponse> {
|
|
38
|
+
return this._client.getAPIList('/setup_intents', CursorPage<SetupIntentListResponse>, {
|
|
39
|
+
query,
|
|
40
|
+
...options,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type SetupIntentListResponsesCursorPage = CursorPage<SetupIntentListResponse>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
49
|
+
* to add a payment method to their account without making a purchase.
|
|
50
|
+
*/
|
|
51
|
+
export interface SetupIntent {
|
|
52
|
+
/**
|
|
53
|
+
* The setup intent ID
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The checkout configuration associated with the setup intent
|
|
59
|
+
*/
|
|
60
|
+
checkout_configuration: SetupIntent.CheckoutConfiguration | null;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The company of the setup intent
|
|
64
|
+
*/
|
|
65
|
+
company: SetupIntent.Company | null;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The datetime the payment was created
|
|
69
|
+
*/
|
|
70
|
+
created_at: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The error message, if any.
|
|
74
|
+
*/
|
|
75
|
+
error_message: string | null;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The member connected to the setup intent
|
|
79
|
+
*/
|
|
80
|
+
member: SetupIntent.Member | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The metadata associated with the setup intent
|
|
84
|
+
*/
|
|
85
|
+
metadata: { [key: string]: unknown } | null;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The payment token created during the setup, if available.
|
|
89
|
+
*/
|
|
90
|
+
payment_token: SetupIntent.PaymentToken | null;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The status of the setup intent
|
|
94
|
+
*/
|
|
95
|
+
status: SetupIntentStatus;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export namespace SetupIntent {
|
|
99
|
+
/**
|
|
100
|
+
* The checkout configuration associated with the setup intent
|
|
101
|
+
*/
|
|
102
|
+
export interface CheckoutConfiguration {
|
|
103
|
+
/**
|
|
104
|
+
* The ID of the checkout configuration
|
|
105
|
+
*/
|
|
106
|
+
id: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The company of the setup intent
|
|
111
|
+
*/
|
|
112
|
+
export interface Company {
|
|
113
|
+
/**
|
|
114
|
+
* The ID (tag) of the company.
|
|
115
|
+
*/
|
|
116
|
+
id: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The member connected to the setup intent
|
|
121
|
+
*/
|
|
122
|
+
export interface Member {
|
|
123
|
+
/**
|
|
124
|
+
* The ID of the member
|
|
125
|
+
*/
|
|
126
|
+
id: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The user for this member, if any.
|
|
130
|
+
*/
|
|
131
|
+
user: Member.User | null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export namespace Member {
|
|
135
|
+
/**
|
|
136
|
+
* The user for this member, if any.
|
|
137
|
+
*/
|
|
138
|
+
export interface User {
|
|
139
|
+
/**
|
|
140
|
+
* The internal ID of the user account.
|
|
141
|
+
*/
|
|
142
|
+
id: string;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* The digital mailing address of the user.
|
|
146
|
+
*/
|
|
147
|
+
email: string | null;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* The user's full name.
|
|
151
|
+
*/
|
|
152
|
+
name: string | null;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The whop username.
|
|
156
|
+
*/
|
|
157
|
+
username: string;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The payment token created during the setup, if available.
|
|
163
|
+
*/
|
|
164
|
+
export interface PaymentToken {
|
|
165
|
+
/**
|
|
166
|
+
* The ID of the payment token
|
|
167
|
+
*/
|
|
168
|
+
id: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The card data associated with the payment token, if its a debit or credit card
|
|
172
|
+
* token.
|
|
173
|
+
*/
|
|
174
|
+
card: PaymentToken.Card | null;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The date and time the payment token was created
|
|
178
|
+
*/
|
|
179
|
+
created_at: string;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The payment method type of the payment token
|
|
183
|
+
*/
|
|
184
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export namespace PaymentToken {
|
|
188
|
+
/**
|
|
189
|
+
* The card data associated with the payment token, if its a debit or credit card
|
|
190
|
+
* token.
|
|
191
|
+
*/
|
|
192
|
+
export interface Card {
|
|
193
|
+
/**
|
|
194
|
+
* Possible card brands that a payment token can have
|
|
195
|
+
*/
|
|
196
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Card expiration month, like 03 for March.
|
|
200
|
+
*/
|
|
201
|
+
exp_month: number | null;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Card expiration year, like 27 for 2027.
|
|
205
|
+
*/
|
|
206
|
+
exp_year: number | null;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Last four digits of the card.
|
|
210
|
+
*/
|
|
211
|
+
last4: string | null;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The status of the setup intent.
|
|
218
|
+
*/
|
|
219
|
+
export type SetupIntentStatus = 'processing' | 'succeeded' | 'canceled' | 'requires_action';
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
223
|
+
* to add a payment method to their account without making a purchase.
|
|
224
|
+
*/
|
|
225
|
+
export interface SetupIntentListResponse {
|
|
226
|
+
/**
|
|
227
|
+
* The setup intent ID
|
|
228
|
+
*/
|
|
229
|
+
id: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The checkout configuration associated with the setup intent
|
|
233
|
+
*/
|
|
234
|
+
checkout_configuration: SetupIntentListResponse.CheckoutConfiguration | null;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The company of the setup intent
|
|
238
|
+
*/
|
|
239
|
+
company: SetupIntentListResponse.Company | null;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* The datetime the payment was created
|
|
243
|
+
*/
|
|
244
|
+
created_at: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The error message, if any.
|
|
248
|
+
*/
|
|
249
|
+
error_message: string | null;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* The member connected to the setup intent
|
|
253
|
+
*/
|
|
254
|
+
member: SetupIntentListResponse.Member | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* The metadata associated with the setup intent
|
|
258
|
+
*/
|
|
259
|
+
metadata: { [key: string]: unknown } | null;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The payment token created during the setup, if available.
|
|
263
|
+
*/
|
|
264
|
+
payment_token: SetupIntentListResponse.PaymentToken | null;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The status of the setup intent
|
|
268
|
+
*/
|
|
269
|
+
status: SetupIntentStatus;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export namespace SetupIntentListResponse {
|
|
273
|
+
/**
|
|
274
|
+
* The checkout configuration associated with the setup intent
|
|
275
|
+
*/
|
|
276
|
+
export interface CheckoutConfiguration {
|
|
277
|
+
/**
|
|
278
|
+
* The ID of the checkout configuration
|
|
279
|
+
*/
|
|
280
|
+
id: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The company of the setup intent
|
|
285
|
+
*/
|
|
286
|
+
export interface Company {
|
|
287
|
+
/**
|
|
288
|
+
* The ID (tag) of the company.
|
|
289
|
+
*/
|
|
290
|
+
id: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The member connected to the setup intent
|
|
295
|
+
*/
|
|
296
|
+
export interface Member {
|
|
297
|
+
/**
|
|
298
|
+
* The ID of the member
|
|
299
|
+
*/
|
|
300
|
+
id: string;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* The user for this member, if any.
|
|
304
|
+
*/
|
|
305
|
+
user: Member.User | null;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export namespace Member {
|
|
309
|
+
/**
|
|
310
|
+
* The user for this member, if any.
|
|
311
|
+
*/
|
|
312
|
+
export interface User {
|
|
313
|
+
/**
|
|
314
|
+
* The internal ID of the user account.
|
|
315
|
+
*/
|
|
316
|
+
id: string;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The digital mailing address of the user.
|
|
320
|
+
*/
|
|
321
|
+
email: string | null;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The user's full name.
|
|
325
|
+
*/
|
|
326
|
+
name: string | null;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The whop username.
|
|
330
|
+
*/
|
|
331
|
+
username: string;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* The payment token created during the setup, if available.
|
|
337
|
+
*/
|
|
338
|
+
export interface PaymentToken {
|
|
339
|
+
/**
|
|
340
|
+
* The ID of the payment token
|
|
341
|
+
*/
|
|
342
|
+
id: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The card data associated with the payment token, if its a debit or credit card
|
|
346
|
+
* token.
|
|
347
|
+
*/
|
|
348
|
+
card: PaymentToken.Card | null;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The date and time the payment token was created
|
|
352
|
+
*/
|
|
353
|
+
created_at: string;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* The payment method type of the payment token
|
|
357
|
+
*/
|
|
358
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export namespace PaymentToken {
|
|
362
|
+
/**
|
|
363
|
+
* The card data associated with the payment token, if its a debit or credit card
|
|
364
|
+
* token.
|
|
365
|
+
*/
|
|
366
|
+
export interface Card {
|
|
367
|
+
/**
|
|
368
|
+
* Possible card brands that a payment token can have
|
|
369
|
+
*/
|
|
370
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Card expiration month, like 03 for March.
|
|
374
|
+
*/
|
|
375
|
+
exp_month: number | null;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Card expiration year, like 27 for 2027.
|
|
379
|
+
*/
|
|
380
|
+
exp_year: number | null;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Last four digits of the card.
|
|
384
|
+
*/
|
|
385
|
+
last4: string | null;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface SetupIntentListParams extends CursorPageParams {
|
|
391
|
+
/**
|
|
392
|
+
* The ID of the company to list setup intents for
|
|
393
|
+
*/
|
|
394
|
+
company_id: string;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
398
|
+
*/
|
|
399
|
+
before?: string | null;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* The minimum creation date to filter by
|
|
403
|
+
*/
|
|
404
|
+
created_after?: string | null;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The maximum creation date to filter by
|
|
408
|
+
*/
|
|
409
|
+
created_before?: string | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* The direction of the sort.
|
|
413
|
+
*/
|
|
414
|
+
direction?: Shared.Direction | null;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Returns the first _n_ elements from the list.
|
|
418
|
+
*/
|
|
419
|
+
first?: number | null;
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Returns the last _n_ elements from the list.
|
|
423
|
+
*/
|
|
424
|
+
last?: number | null;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
export declare namespace SetupIntents {
|
|
428
|
+
export {
|
|
429
|
+
type SetupIntent as SetupIntent,
|
|
430
|
+
type SetupIntentStatus as SetupIntentStatus,
|
|
431
|
+
type SetupIntentListResponse as SetupIntentListResponse,
|
|
432
|
+
type SetupIntentListResponsesCursorPage as SetupIntentListResponsesCursorPage,
|
|
433
|
+
type SetupIntentListParams as SetupIntentListParams,
|
|
434
|
+
};
|
|
435
|
+
}
|
package/src/resources/shared.ts
CHANGED
|
@@ -2173,6 +2173,11 @@ export interface Payment {
|
|
|
2173
2173
|
*/
|
|
2174
2174
|
payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
|
|
2175
2175
|
|
|
2176
|
+
/**
|
|
2177
|
+
* The payment token used for the payment, if available.
|
|
2178
|
+
*/
|
|
2179
|
+
payment_token: Payment.PaymentToken | null;
|
|
2180
|
+
|
|
2176
2181
|
/**
|
|
2177
2182
|
* The plan attached to this payment.
|
|
2178
2183
|
*/
|
|
@@ -2339,6 +2344,60 @@ export namespace Payment {
|
|
|
2339
2344
|
status: Shared.MembershipStatus;
|
|
2340
2345
|
}
|
|
2341
2346
|
|
|
2347
|
+
/**
|
|
2348
|
+
* The payment token used for the payment, if available.
|
|
2349
|
+
*/
|
|
2350
|
+
export interface PaymentToken {
|
|
2351
|
+
/**
|
|
2352
|
+
* The ID of the payment token
|
|
2353
|
+
*/
|
|
2354
|
+
id: string;
|
|
2355
|
+
|
|
2356
|
+
/**
|
|
2357
|
+
* The card data associated with the payment token, if its a debit or credit card
|
|
2358
|
+
* token.
|
|
2359
|
+
*/
|
|
2360
|
+
card: PaymentToken.Card | null;
|
|
2361
|
+
|
|
2362
|
+
/**
|
|
2363
|
+
* The date and time the payment token was created
|
|
2364
|
+
*/
|
|
2365
|
+
created_at: string;
|
|
2366
|
+
|
|
2367
|
+
/**
|
|
2368
|
+
* The payment method type of the payment token
|
|
2369
|
+
*/
|
|
2370
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
export namespace PaymentToken {
|
|
2374
|
+
/**
|
|
2375
|
+
* The card data associated with the payment token, if its a debit or credit card
|
|
2376
|
+
* token.
|
|
2377
|
+
*/
|
|
2378
|
+
export interface Card {
|
|
2379
|
+
/**
|
|
2380
|
+
* Possible card brands that a payment token can have
|
|
2381
|
+
*/
|
|
2382
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
2383
|
+
|
|
2384
|
+
/**
|
|
2385
|
+
* Card expiration month, like 03 for March.
|
|
2386
|
+
*/
|
|
2387
|
+
exp_month: number | null;
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* Card expiration year, like 27 for 2027.
|
|
2391
|
+
*/
|
|
2392
|
+
exp_year: number | null;
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Last four digits of the card.
|
|
2396
|
+
*/
|
|
2397
|
+
last4: string | null;
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2342
2401
|
/**
|
|
2343
2402
|
* The plan attached to this payment.
|
|
2344
2403
|
*/
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import * as DisputesAPI from './disputes';
|
|
5
5
|
import * as PaymentsAPI from './payments';
|
|
6
6
|
import * as RefundsAPI from './refunds';
|
|
7
|
+
import * as SetupIntentsAPI from './setup-intents';
|
|
7
8
|
import * as Shared from './shared';
|
|
8
9
|
import { Webhook } from 'standardwebhooks';
|
|
9
10
|
|
|
@@ -294,6 +295,90 @@ export interface EntryDeletedWebhookEvent {
|
|
|
294
295
|
type: 'entry.deleted';
|
|
295
296
|
}
|
|
296
297
|
|
|
298
|
+
export interface SetupIntentRequiresActionWebhookEvent {
|
|
299
|
+
/**
|
|
300
|
+
* A unique ID for every single webhook request
|
|
301
|
+
*/
|
|
302
|
+
id: string;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The API version for this webhook
|
|
306
|
+
*/
|
|
307
|
+
api_version: 'v1';
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
311
|
+
* to add a payment method to their account without making a purchase.
|
|
312
|
+
*/
|
|
313
|
+
data: SetupIntentsAPI.SetupIntent;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
317
|
+
*/
|
|
318
|
+
timestamp: string;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The webhook event type
|
|
322
|
+
*/
|
|
323
|
+
type: 'setup_intent.requires_action';
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface SetupIntentSucceededWebhookEvent {
|
|
327
|
+
/**
|
|
328
|
+
* A unique ID for every single webhook request
|
|
329
|
+
*/
|
|
330
|
+
id: string;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* The API version for this webhook
|
|
334
|
+
*/
|
|
335
|
+
api_version: 'v1';
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
339
|
+
* to add a payment method to their account without making a purchase.
|
|
340
|
+
*/
|
|
341
|
+
data: SetupIntentsAPI.SetupIntent;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
345
|
+
*/
|
|
346
|
+
timestamp: string;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* The webhook event type
|
|
350
|
+
*/
|
|
351
|
+
type: 'setup_intent.succeeded';
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface SetupIntentCanceledWebhookEvent {
|
|
355
|
+
/**
|
|
356
|
+
* A unique ID for every single webhook request
|
|
357
|
+
*/
|
|
358
|
+
id: string;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* The API version for this webhook
|
|
362
|
+
*/
|
|
363
|
+
api_version: 'v1';
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* An object representing a setup intent, which is a flow for allowing a customer
|
|
367
|
+
* to add a payment method to their account without making a purchase.
|
|
368
|
+
*/
|
|
369
|
+
data: SetupIntentsAPI.SetupIntent;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* The timestamp in ISO 8601 format that the webhook was sent at on the server
|
|
373
|
+
*/
|
|
374
|
+
timestamp: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The webhook event type
|
|
378
|
+
*/
|
|
379
|
+
type: 'setup_intent.canceled';
|
|
380
|
+
}
|
|
381
|
+
|
|
297
382
|
export interface CourseLessonInteractionCompletedWebhookEvent {
|
|
298
383
|
/**
|
|
299
384
|
* A unique ID for every single webhook request
|
|
@@ -923,6 +1008,9 @@ export type UnwrapWebhookEvent =
|
|
|
923
1008
|
| EntryApprovedWebhookEvent
|
|
924
1009
|
| EntryDeniedWebhookEvent
|
|
925
1010
|
| EntryDeletedWebhookEvent
|
|
1011
|
+
| SetupIntentRequiresActionWebhookEvent
|
|
1012
|
+
| SetupIntentSucceededWebhookEvent
|
|
1013
|
+
| SetupIntentCanceledWebhookEvent
|
|
926
1014
|
| CourseLessonInteractionCompletedWebhookEvent
|
|
927
1015
|
| PaymentSucceededWebhookEvent
|
|
928
1016
|
| PaymentFailedWebhookEvent
|
|
@@ -944,6 +1032,9 @@ export declare namespace Webhooks {
|
|
|
944
1032
|
type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent,
|
|
945
1033
|
type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent,
|
|
946
1034
|
type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent,
|
|
1035
|
+
type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent,
|
|
1036
|
+
type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent,
|
|
1037
|
+
type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent,
|
|
947
1038
|
type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
|
|
948
1039
|
type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent,
|
|
949
1040
|
type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.10'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.10";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.10";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.0.
|
|
1
|
+
export const VERSION = '0.0.10'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
|