stripe 16.13.0-beta.1 → 17.1.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.
- package/CHANGELOG.md +139 -849
- package/README.md +4 -3
- package/VERSION +1 -1
- package/cjs/Error.js +31 -4
- package/cjs/RequestSender.js +114 -74
- package/cjs/StripeResource.js +8 -3
- package/cjs/apiVersion.js +2 -3
- package/cjs/autoPagination.js +51 -7
- package/cjs/crypto/CryptoProvider.js +6 -0
- package/cjs/crypto/NodeCryptoProvider.js +7 -0
- package/cjs/crypto/SubtleCryptoProvider.js +4 -0
- package/cjs/resources/{Capital/FinancingSummary.js → Billing/CreditBalanceSummary.js} +3 -3
- package/cjs/resources/{FinancialConnections/Institutions.js → Billing/CreditBalanceTransactions.js} +4 -4
- package/cjs/resources/Billing/CreditGrants.js +30 -0
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/Invoices.js +0 -17
- package/cjs/resources/PaymentIntents.js +0 -4
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/Terminal/Readers.js +0 -12
- package/cjs/resources/V2/Billing/MeterEventAdjustments.js +12 -0
- package/cjs/resources/V2/Billing/MeterEventSession.js +12 -0
- package/cjs/resources/V2/Billing/MeterEventStream.js +13 -0
- package/cjs/resources/V2/Billing/MeterEvents.js +9 -0
- package/cjs/resources/V2/Billing.js +18 -0
- package/cjs/resources/V2/Core/Events.js +14 -0
- package/cjs/resources/V2/Core.js +12 -0
- package/cjs/resources/V2.js +14 -0
- package/cjs/resources.js +18 -42
- package/cjs/stripe.core.js +20 -8
- package/cjs/utils.js +41 -10
- package/esm/Error.js +27 -2
- package/esm/RequestSender.js +115 -75
- package/esm/StripeResource.js +9 -4
- package/esm/apiVersion.js +1 -2
- package/esm/autoPagination.js +52 -8
- package/esm/crypto/CryptoProvider.js +6 -0
- package/esm/crypto/NodeCryptoProvider.js +7 -0
- package/esm/crypto/SubtleCryptoProvider.js +4 -0
- package/esm/resources/{Capital/FinancingSummary.js → Billing/CreditBalanceSummary.js} +2 -2
- package/esm/resources/{FinancialConnections/Institutions.js → Billing/CreditBalanceTransactions.js} +3 -3
- package/esm/resources/Billing/CreditGrants.js +27 -0
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/Invoices.js +0 -17
- package/esm/resources/PaymentIntents.js +0 -4
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Terminal/Readers.js +0 -12
- package/esm/resources/V2/Billing/MeterEventAdjustments.js +9 -0
- package/esm/resources/V2/Billing/MeterEventSession.js +9 -0
- package/esm/resources/V2/Billing/MeterEventStream.js +10 -0
- package/esm/resources/V2/Billing/MeterEvents.js +6 -0
- package/esm/resources/V2/Billing.js +15 -0
- package/esm/resources/V2/Core/Events.js +11 -0
- package/esm/resources/V2/Core.js +9 -0
- package/esm/resources/V2.js +11 -0
- package/esm/resources.js +7 -29
- package/esm/stripe.core.js +21 -9
- package/esm/utils.js +38 -9
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +0 -45
- package/types/AccountSessionsResource.d.ts +0 -288
- package/types/Accounts.d.ts +1 -113
- package/types/AccountsResource.d.ts +0 -270
- package/types/Billing/Alerts.d.ts +17 -13
- package/types/Billing/AlertsResource.d.ts +18 -21
- package/types/Billing/CreditBalanceSummary.d.ts +94 -0
- package/types/Billing/CreditBalanceSummaryResource.d.ts +64 -0
- package/types/Billing/CreditBalanceTransactions.d.ts +159 -0
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +54 -0
- package/types/Billing/CreditGrants.d.ts +124 -0
- package/types/Billing/CreditGrantsResource.d.ts +219 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +2 -2
- package/types/Capabilities.d.ts +1 -1
- package/types/Charges.d.ts +0 -71
- package/types/ChargesResource.d.ts +0 -1294
- package/types/Checkout/Sessions.d.ts +4 -296
- package/types/Checkout/SessionsResource.d.ts +6 -352
- package/types/ConfirmationTokens.d.ts +0 -67
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNoteLineItems.d.ts +30 -0
- package/types/CreditNotes.d.ts +27 -18
- package/types/CreditNotesResource.d.ts +0 -51
- package/types/Customers.d.ts +2 -3
- package/types/CustomersResource.d.ts +0 -3
- package/types/Disputes.d.ts +0 -152
- package/types/DisputesResource.d.ts +0 -120
- package/types/Errors.d.ts +32 -2
- package/types/EventTypes.d.ts +2 -545
- package/types/Events.d.ts +0 -90
- package/types/FinancialConnections/Accounts.d.ts +1 -29
- package/types/FinancialConnections/AccountsResource.d.ts +3 -35
- package/types/FinancialConnections/Sessions.d.ts +1 -49
- package/types/FinancialConnections/SessionsResource.d.ts +1 -38
- package/types/InvoiceItems.d.ts +0 -5
- package/types/InvoiceItemsResource.d.ts +0 -98
- package/types/InvoiceLineItems.d.ts +29 -20
- package/types/Invoices.d.ts +25 -108
- package/types/InvoicesResource.d.ts +1835 -5493
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -2
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -7
- package/types/Mandates.d.ts +0 -77
- package/types/PaymentIntents.d.ts +1 -503
- package/types/PaymentIntentsResource.d.ts +3464 -7064
- package/types/PaymentLinks.d.ts +0 -3
- package/types/PaymentLinksResource.d.ts +0 -6
- package/types/PaymentMethodConfigurations.d.ts +0 -36
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -50
- package/types/PaymentMethods.d.ts +0 -67
- package/types/PaymentMethodsResource.d.ts +0 -88
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +28 -37
- package/types/PromotionCodes.d.ts +1 -1
- package/types/PromotionCodesResource.d.ts +3 -1
- package/types/Quotes.d.ts +1 -596
- package/types/QuotesResource.d.ts +199 -2531
- package/types/SetupAttempts.d.ts +0 -10
- package/types/SetupIntents.d.ts +1 -111
- package/types/SetupIntentsResource.d.ts +3 -522
- package/types/Sources.d.ts +0 -23
- package/types/SubscriptionItems.d.ts +0 -21
- package/types/SubscriptionItemsResource.d.ts +0 -109
- package/types/SubscriptionSchedules.d.ts +0 -200
- package/types/SubscriptionSchedulesResource.d.ts +13 -1231
- package/types/Subscriptions.d.ts +1 -82
- package/types/SubscriptionsResource.d.ts +5 -350
- package/types/Tax/Settings.d.ts +1 -1
- package/types/Terminal/Readers.d.ts +0 -278
- package/types/Terminal/ReadersResource.d.ts +13 -212
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -63
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/ThinEvent.d.ts +36 -0
- package/types/Treasury/FinancialAccounts.d.ts +0 -5
- package/types/Treasury/FinancialAccountsResource.d.ts +0 -10
- package/types/Treasury/OutboundTransfers.d.ts +0 -26
- package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
- package/types/Treasury/ReceivedCredits.d.ts +5 -27
- package/types/Treasury/ReceivedDebits.d.ts +0 -31
- package/types/V2/Billing/MeterEventAdjustments.d.ts +65 -0
- package/types/V2/Billing/MeterEventAdjustmentsResource.d.ts +47 -0
- package/types/V2/Billing/MeterEventSessionResource.d.ts +26 -0
- package/types/V2/Billing/MeterEventSessions.d.ts +45 -0
- package/types/V2/Billing/MeterEventStreamResource.d.ts +62 -0
- package/types/V2/Billing/MeterEvents.d.ts +54 -0
- package/types/V2/Billing/MeterEventsResource.d.ts +52 -0
- package/types/V2/BillingResource.d.ts +14 -0
- package/types/V2/Core/EventsResource.d.ts +57 -0
- package/types/V2/CoreResource.d.ts +11 -0
- package/types/V2/EventTypes.d.ts +214 -0
- package/types/V2/Events.d.ts +75 -0
- package/types/V2Resource.d.ts +10 -0
- package/types/WebhookEndpointsResource.d.ts +2 -65
- package/types/index.d.ts +67 -53
- package/types/lib.d.ts +1 -6
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/Capital/FinancingOffers.js +0 -21
- package/cjs/resources/Capital/FinancingTransactions.js +0 -17
- package/cjs/resources/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/Tax/Associations.js +0 -9
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/Capital/FinancingOffers.js +0 -18
- package/esm/resources/Capital/FinancingTransactions.js +0 -14
- package/esm/resources/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/Tax/Associations.js +0 -6
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/Billing/MeterErrorReports.d.ts +0 -106
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -93
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/GiftCards/Cards.d.ts +0 -118
- package/types/GiftCards/CardsResource.d.ts +0 -159
- package/types/GiftCards/Transactions.d.ts +0 -129
- package/types/GiftCards/TransactionsResource.d.ts +0 -201
- package/types/InvoicePayments.d.ts +0 -138
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -103
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1084
- package/types/OrdersResource.d.ts +0 -2765
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1548
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
- package/types/Tax/Associations.d.ts +0 -126
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -133
- package/types/Tax/FormsResource.d.ts +0 -90
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace V2 {
|
|
6
|
+
class BillingResource {
|
|
7
|
+
meterEventSession: Stripe.V2.Billing.MeterEventSessionResource;
|
|
8
|
+
meterEventAdjustments: Stripe.V2.Billing.MeterEventAdjustmentsResource;
|
|
9
|
+
meterEventStream: Stripe.V2.Billing.MeterEventStreamResource;
|
|
10
|
+
meterEvents: Stripe.V2.Billing.MeterEventsResource;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
/// <reference path='../EventTypes.d.ts' />
|
|
4
|
+
|
|
5
|
+
declare module 'stripe' {
|
|
6
|
+
namespace Stripe {
|
|
7
|
+
namespace V2 {
|
|
8
|
+
namespace Core {
|
|
9
|
+
interface EventRetrieveParams {}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
namespace Core {
|
|
13
|
+
interface EventListParams {
|
|
14
|
+
/**
|
|
15
|
+
* Primary object ID used to retrieve related events.
|
|
16
|
+
*/
|
|
17
|
+
object_id: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The page size.
|
|
21
|
+
*/
|
|
22
|
+
limit?: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The requested page number.
|
|
26
|
+
*/
|
|
27
|
+
page?: string;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
namespace Core {
|
|
32
|
+
class EventsResource {
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the details of an event.
|
|
35
|
+
*/
|
|
36
|
+
retrieve(
|
|
37
|
+
id: string,
|
|
38
|
+
params?: EventRetrieveParams,
|
|
39
|
+
options?: RequestOptions
|
|
40
|
+
): Promise<Stripe.Response<Stripe.V2.Event>>;
|
|
41
|
+
retrieve(
|
|
42
|
+
id: string,
|
|
43
|
+
options?: RequestOptions
|
|
44
|
+
): Promise<Stripe.Response<Stripe.V2.Event>>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* List events, going back up to 30 days.
|
|
48
|
+
*/
|
|
49
|
+
list(
|
|
50
|
+
params: EventListParams,
|
|
51
|
+
options?: RequestOptions
|
|
52
|
+
): ApiListPromise<Stripe.V2.Event>;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe.V2 {
|
|
5
|
+
export type Event =
|
|
6
|
+
| Stripe.Events.V1BillingMeterErrorReportTriggeredEvent
|
|
7
|
+
| Stripe.Events.V1BillingMeterNoMeterFoundEvent;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
namespace Stripe.Events {
|
|
11
|
+
/**
|
|
12
|
+
* This event occurs when there are invalid async usage events for a given meter.
|
|
13
|
+
*/
|
|
14
|
+
export interface V1BillingMeterErrorReportTriggeredEvent
|
|
15
|
+
extends V2.EventBase {
|
|
16
|
+
type: 'v1.billing.meter.error_report_triggered';
|
|
17
|
+
// Retrieves data specific to this event.
|
|
18
|
+
data: V1BillingMeterErrorReportTriggeredEvent.Data;
|
|
19
|
+
// Retrieves the object associated with the event.
|
|
20
|
+
related_object: Event.RelatedObject;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
namespace V1BillingMeterErrorReportTriggeredEvent {
|
|
24
|
+
export interface Data {
|
|
25
|
+
/**
|
|
26
|
+
* Extra field included in the event's `data` when fetched from /v2/events.
|
|
27
|
+
*/
|
|
28
|
+
developer_message_summary: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This contains information about why meter error happens.
|
|
32
|
+
*/
|
|
33
|
+
reason: Data.Reason;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The end of the window that is encapsulated by this summary.
|
|
37
|
+
*/
|
|
38
|
+
validation_end: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The start of the window that is encapsulated by this summary.
|
|
42
|
+
*/
|
|
43
|
+
validation_start: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
namespace Data {
|
|
47
|
+
export interface Reason {
|
|
48
|
+
/**
|
|
49
|
+
* The total error count within this window.
|
|
50
|
+
*/
|
|
51
|
+
error_count: number;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The error details.
|
|
55
|
+
*/
|
|
56
|
+
error_types: Array<Reason.ErrorType>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
namespace Reason {
|
|
60
|
+
export interface ErrorType {
|
|
61
|
+
/**
|
|
62
|
+
* Open Enum.
|
|
63
|
+
*/
|
|
64
|
+
code: ErrorType.Code;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The number of errors of this type.
|
|
68
|
+
*/
|
|
69
|
+
error_count: number;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* A list of sample errors of this type.
|
|
73
|
+
*/
|
|
74
|
+
sample_errors: Array<ErrorType.SampleError>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
namespace ErrorType {
|
|
78
|
+
export type Code =
|
|
79
|
+
| 'archived_meter'
|
|
80
|
+
| 'meter_event_customer_not_found'
|
|
81
|
+
| 'meter_event_dimension_count_too_high'
|
|
82
|
+
| 'meter_event_invalid_value'
|
|
83
|
+
| 'meter_event_no_customer_defined'
|
|
84
|
+
| 'missing_dimension_payload_keys'
|
|
85
|
+
| 'no_meter'
|
|
86
|
+
| 'timestamp_in_future'
|
|
87
|
+
| 'timestamp_too_far_in_past';
|
|
88
|
+
|
|
89
|
+
export interface SampleError {
|
|
90
|
+
/**
|
|
91
|
+
* The error message.
|
|
92
|
+
*/
|
|
93
|
+
error_message: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The request causes the error.
|
|
97
|
+
*/
|
|
98
|
+
request: SampleError.Request;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
namespace SampleError {
|
|
102
|
+
export interface Request {
|
|
103
|
+
/**
|
|
104
|
+
* The request idempotency key.
|
|
105
|
+
*/
|
|
106
|
+
identifier: string;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* This event occurs when async usage events have missing or invalid meter ids.
|
|
116
|
+
*/
|
|
117
|
+
export interface V1BillingMeterNoMeterFoundEvent extends V2.EventBase {
|
|
118
|
+
type: 'v1.billing.meter.no_meter_found';
|
|
119
|
+
// Retrieves data specific to this event.
|
|
120
|
+
data: V1BillingMeterNoMeterFoundEvent.Data;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
namespace V1BillingMeterNoMeterFoundEvent {
|
|
124
|
+
export interface Data {
|
|
125
|
+
/**
|
|
126
|
+
* Extra field included in the event's `data` when fetched from /v2/events.
|
|
127
|
+
*/
|
|
128
|
+
developer_message_summary: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* This contains information about why meter error happens.
|
|
132
|
+
*/
|
|
133
|
+
reason: Data.Reason;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The end of the window that is encapsulated by this summary.
|
|
137
|
+
*/
|
|
138
|
+
validation_end: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The start of the window that is encapsulated by this summary.
|
|
142
|
+
*/
|
|
143
|
+
validation_start: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
namespace Data {
|
|
147
|
+
export interface Reason {
|
|
148
|
+
/**
|
|
149
|
+
* The total error count within this window.
|
|
150
|
+
*/
|
|
151
|
+
error_count: number;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The error details.
|
|
155
|
+
*/
|
|
156
|
+
error_types: Array<Reason.ErrorType>;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
namespace Reason {
|
|
160
|
+
export interface ErrorType {
|
|
161
|
+
/**
|
|
162
|
+
* Open Enum.
|
|
163
|
+
*/
|
|
164
|
+
code: ErrorType.Code;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The number of errors of this type.
|
|
168
|
+
*/
|
|
169
|
+
error_count: number;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* A list of sample errors of this type.
|
|
173
|
+
*/
|
|
174
|
+
sample_errors: Array<ErrorType.SampleError>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
namespace ErrorType {
|
|
178
|
+
export type Code =
|
|
179
|
+
| 'archived_meter'
|
|
180
|
+
| 'meter_event_customer_not_found'
|
|
181
|
+
| 'meter_event_dimension_count_too_high'
|
|
182
|
+
| 'meter_event_invalid_value'
|
|
183
|
+
| 'meter_event_no_customer_defined'
|
|
184
|
+
| 'missing_dimension_payload_keys'
|
|
185
|
+
| 'no_meter'
|
|
186
|
+
| 'timestamp_in_future'
|
|
187
|
+
| 'timestamp_too_far_in_past';
|
|
188
|
+
|
|
189
|
+
export interface SampleError {
|
|
190
|
+
/**
|
|
191
|
+
* The error message.
|
|
192
|
+
*/
|
|
193
|
+
error_message: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The request causes the error.
|
|
197
|
+
*/
|
|
198
|
+
request: SampleError.Request;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
namespace SampleError {
|
|
202
|
+
export interface Request {
|
|
203
|
+
/**
|
|
204
|
+
* The request idempotency key.
|
|
205
|
+
*/
|
|
206
|
+
identifier: string;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec
|
|
2
|
+
|
|
3
|
+
declare module 'stripe' {
|
|
4
|
+
namespace Stripe {
|
|
5
|
+
namespace V2 {
|
|
6
|
+
namespace Event {
|
|
7
|
+
interface Reason {
|
|
8
|
+
/**
|
|
9
|
+
* Event reason type.
|
|
10
|
+
*/
|
|
11
|
+
type: 'request';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Information on the API request that instigated the event.
|
|
15
|
+
*/
|
|
16
|
+
request: Reason.Request | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
namespace Reason {
|
|
20
|
+
interface Request {
|
|
21
|
+
/**
|
|
22
|
+
* ID of the API request that caused the event.
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The idempotency key transmitted during the request.
|
|
28
|
+
*/
|
|
29
|
+
idempotency_key: string;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The Event object.
|
|
36
|
+
*/
|
|
37
|
+
interface EventBase {
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for the event.
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* String representing the object's type. Objects of the same type share the same value of the object field.
|
|
45
|
+
*/
|
|
46
|
+
object: 'v2.core.event';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Authentication context needed to fetch the event or related object.
|
|
50
|
+
*/
|
|
51
|
+
context: string | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Time at which the object was created.
|
|
55
|
+
*/
|
|
56
|
+
created: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
60
|
+
*/
|
|
61
|
+
livemode: boolean;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Reason for the event.
|
|
65
|
+
*/
|
|
66
|
+
reason: Event.Reason | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The type of the event.
|
|
70
|
+
*/
|
|
71
|
+
type: string;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -142,7 +142,8 @@ declare module 'stripe' {
|
|
|
142
142
|
| '2023-08-16'
|
|
143
143
|
| '2023-10-16'
|
|
144
144
|
| '2024-04-10'
|
|
145
|
-
| '2024-06-20'
|
|
145
|
+
| '2024-06-20'
|
|
146
|
+
| '2024-09-30.acacia';
|
|
146
147
|
|
|
147
148
|
type EnabledEvent =
|
|
148
149
|
| '*'
|
|
@@ -152,27 +153,15 @@ declare module 'stripe' {
|
|
|
152
153
|
| 'account.external_account.deleted'
|
|
153
154
|
| 'account.external_account.updated'
|
|
154
155
|
| 'account.updated'
|
|
155
|
-
| 'account_notice.created'
|
|
156
|
-
| 'account_notice.updated'
|
|
157
156
|
| 'application_fee.created'
|
|
158
157
|
| 'application_fee.refund.updated'
|
|
159
158
|
| 'application_fee.refunded'
|
|
160
159
|
| 'balance.available'
|
|
161
160
|
| 'billing.alert.triggered'
|
|
162
|
-
| 'billing.meter_error_report.triggered'
|
|
163
161
|
| 'billing_portal.configuration.created'
|
|
164
162
|
| 'billing_portal.configuration.updated'
|
|
165
163
|
| 'billing_portal.session.created'
|
|
166
164
|
| 'capability.updated'
|
|
167
|
-
| 'capital.financing_offer.accepted'
|
|
168
|
-
| 'capital.financing_offer.canceled'
|
|
169
|
-
| 'capital.financing_offer.created'
|
|
170
|
-
| 'capital.financing_offer.expired'
|
|
171
|
-
| 'capital.financing_offer.fully_repaid'
|
|
172
|
-
| 'capital.financing_offer.paid_out'
|
|
173
|
-
| 'capital.financing_offer.rejected'
|
|
174
|
-
| 'capital.financing_offer.replacement_created'
|
|
175
|
-
| 'capital.financing_transaction.created'
|
|
176
165
|
| 'cash_balance.funds_available'
|
|
177
166
|
| 'charge.captured'
|
|
178
167
|
| 'charge.dispute.closed'
|
|
@@ -213,15 +202,11 @@ declare module 'stripe' {
|
|
|
213
202
|
| 'customer.source.deleted'
|
|
214
203
|
| 'customer.source.expiring'
|
|
215
204
|
| 'customer.source.updated'
|
|
216
|
-
| 'customer.subscription.collection_paused'
|
|
217
|
-
| 'customer.subscription.collection_resumed'
|
|
218
205
|
| 'customer.subscription.created'
|
|
219
|
-
| 'customer.subscription.custom_event'
|
|
220
206
|
| 'customer.subscription.deleted'
|
|
221
207
|
| 'customer.subscription.paused'
|
|
222
208
|
| 'customer.subscription.pending_update_applied'
|
|
223
209
|
| 'customer.subscription.pending_update_expired'
|
|
224
|
-
| 'customer.subscription.price_migration_failed'
|
|
225
210
|
| 'customer.subscription.resumed'
|
|
226
211
|
| 'customer.subscription.trial_will_end'
|
|
227
212
|
| 'customer.subscription.updated'
|
|
@@ -237,10 +222,8 @@ declare module 'stripe' {
|
|
|
237
222
|
| 'financial_connections.account.disconnected'
|
|
238
223
|
| 'financial_connections.account.reactivated'
|
|
239
224
|
| 'financial_connections.account.refreshed_balance'
|
|
240
|
-
| 'financial_connections.account.refreshed_inferred_balances'
|
|
241
225
|
| 'financial_connections.account.refreshed_ownership'
|
|
242
226
|
| 'financial_connections.account.refreshed_transactions'
|
|
243
|
-
| 'financial_connections.session.updated'
|
|
244
227
|
| 'identity.verification_session.canceled'
|
|
245
228
|
| 'identity.verification_session.created'
|
|
246
229
|
| 'identity.verification_session.processing'
|
|
@@ -254,7 +237,6 @@ declare module 'stripe' {
|
|
|
254
237
|
| 'invoice.marked_uncollectible'
|
|
255
238
|
| 'invoice.overdue'
|
|
256
239
|
| 'invoice.paid'
|
|
257
|
-
| 'invoice.payment.overpaid'
|
|
258
240
|
| 'invoice.payment_action_required'
|
|
259
241
|
| 'invoice.payment_failed'
|
|
260
242
|
| 'invoice.payment_succeeded'
|
|
@@ -278,14 +260,10 @@ declare module 'stripe' {
|
|
|
278
260
|
| 'issuing_dispute.funds_rescinded'
|
|
279
261
|
| 'issuing_dispute.submitted'
|
|
280
262
|
| 'issuing_dispute.updated'
|
|
281
|
-
| 'issuing_dispute_settlement_detail.created'
|
|
282
|
-
| 'issuing_dispute_settlement_detail.updated'
|
|
283
263
|
| 'issuing_personalization_design.activated'
|
|
284
264
|
| 'issuing_personalization_design.deactivated'
|
|
285
265
|
| 'issuing_personalization_design.rejected'
|
|
286
266
|
| 'issuing_personalization_design.updated'
|
|
287
|
-
| 'issuing_settlement.created'
|
|
288
|
-
| 'issuing_settlement.updated'
|
|
289
267
|
| 'issuing_token.created'
|
|
290
268
|
| 'issuing_token.updated'
|
|
291
269
|
| 'issuing_transaction.created'
|
|
@@ -325,16 +303,10 @@ declare module 'stripe' {
|
|
|
325
303
|
| 'product.updated'
|
|
326
304
|
| 'promotion_code.created'
|
|
327
305
|
| 'promotion_code.updated'
|
|
328
|
-
| 'quote.accept_failed'
|
|
329
306
|
| 'quote.accepted'
|
|
330
|
-
| 'quote.accepting'
|
|
331
307
|
| 'quote.canceled'
|
|
332
308
|
| 'quote.created'
|
|
333
|
-
| 'quote.draft'
|
|
334
309
|
| 'quote.finalized'
|
|
335
|
-
| 'quote.reestimate_failed'
|
|
336
|
-
| 'quote.reestimated'
|
|
337
|
-
| 'quote.stale'
|
|
338
310
|
| 'radar.early_fraud_warning.created'
|
|
339
311
|
| 'radar.early_fraud_warning.updated'
|
|
340
312
|
| 'refund.created'
|
|
@@ -362,16 +334,13 @@ declare module 'stripe' {
|
|
|
362
334
|
| 'subscription_schedule.completed'
|
|
363
335
|
| 'subscription_schedule.created'
|
|
364
336
|
| 'subscription_schedule.expiring'
|
|
365
|
-
| 'subscription_schedule.price_migration_failed'
|
|
366
337
|
| 'subscription_schedule.released'
|
|
367
338
|
| 'subscription_schedule.updated'
|
|
368
|
-
| 'tax.form.updated'
|
|
369
339
|
| 'tax.settings.updated'
|
|
370
340
|
| 'tax_rate.created'
|
|
371
341
|
| 'tax_rate.updated'
|
|
372
342
|
| 'terminal.reader.action_failed'
|
|
373
343
|
| 'terminal.reader.action_succeeded'
|
|
374
|
-
| 'terminal.reader.action_updated'
|
|
375
344
|
| 'test_helpers.test_clock.advancing'
|
|
376
345
|
| 'test_helpers.test_clock.created'
|
|
377
346
|
| 'test_helpers.test_clock.deleted'
|
|
@@ -465,27 +434,15 @@ declare module 'stripe' {
|
|
|
465
434
|
| 'account.external_account.deleted'
|
|
466
435
|
| 'account.external_account.updated'
|
|
467
436
|
| 'account.updated'
|
|
468
|
-
| 'account_notice.created'
|
|
469
|
-
| 'account_notice.updated'
|
|
470
437
|
| 'application_fee.created'
|
|
471
438
|
| 'application_fee.refund.updated'
|
|
472
439
|
| 'application_fee.refunded'
|
|
473
440
|
| 'balance.available'
|
|
474
441
|
| 'billing.alert.triggered'
|
|
475
|
-
| 'billing.meter_error_report.triggered'
|
|
476
442
|
| 'billing_portal.configuration.created'
|
|
477
443
|
| 'billing_portal.configuration.updated'
|
|
478
444
|
| 'billing_portal.session.created'
|
|
479
445
|
| 'capability.updated'
|
|
480
|
-
| 'capital.financing_offer.accepted'
|
|
481
|
-
| 'capital.financing_offer.canceled'
|
|
482
|
-
| 'capital.financing_offer.created'
|
|
483
|
-
| 'capital.financing_offer.expired'
|
|
484
|
-
| 'capital.financing_offer.fully_repaid'
|
|
485
|
-
| 'capital.financing_offer.paid_out'
|
|
486
|
-
| 'capital.financing_offer.rejected'
|
|
487
|
-
| 'capital.financing_offer.replacement_created'
|
|
488
|
-
| 'capital.financing_transaction.created'
|
|
489
446
|
| 'cash_balance.funds_available'
|
|
490
447
|
| 'charge.captured'
|
|
491
448
|
| 'charge.dispute.closed'
|
|
@@ -526,15 +483,11 @@ declare module 'stripe' {
|
|
|
526
483
|
| 'customer.source.deleted'
|
|
527
484
|
| 'customer.source.expiring'
|
|
528
485
|
| 'customer.source.updated'
|
|
529
|
-
| 'customer.subscription.collection_paused'
|
|
530
|
-
| 'customer.subscription.collection_resumed'
|
|
531
486
|
| 'customer.subscription.created'
|
|
532
|
-
| 'customer.subscription.custom_event'
|
|
533
487
|
| 'customer.subscription.deleted'
|
|
534
488
|
| 'customer.subscription.paused'
|
|
535
489
|
| 'customer.subscription.pending_update_applied'
|
|
536
490
|
| 'customer.subscription.pending_update_expired'
|
|
537
|
-
| 'customer.subscription.price_migration_failed'
|
|
538
491
|
| 'customer.subscription.resumed'
|
|
539
492
|
| 'customer.subscription.trial_will_end'
|
|
540
493
|
| 'customer.subscription.updated'
|
|
@@ -550,10 +503,8 @@ declare module 'stripe' {
|
|
|
550
503
|
| 'financial_connections.account.disconnected'
|
|
551
504
|
| 'financial_connections.account.reactivated'
|
|
552
505
|
| 'financial_connections.account.refreshed_balance'
|
|
553
|
-
| 'financial_connections.account.refreshed_inferred_balances'
|
|
554
506
|
| 'financial_connections.account.refreshed_ownership'
|
|
555
507
|
| 'financial_connections.account.refreshed_transactions'
|
|
556
|
-
| 'financial_connections.session.updated'
|
|
557
508
|
| 'identity.verification_session.canceled'
|
|
558
509
|
| 'identity.verification_session.created'
|
|
559
510
|
| 'identity.verification_session.processing'
|
|
@@ -567,7 +518,6 @@ declare module 'stripe' {
|
|
|
567
518
|
| 'invoice.marked_uncollectible'
|
|
568
519
|
| 'invoice.overdue'
|
|
569
520
|
| 'invoice.paid'
|
|
570
|
-
| 'invoice.payment.overpaid'
|
|
571
521
|
| 'invoice.payment_action_required'
|
|
572
522
|
| 'invoice.payment_failed'
|
|
573
523
|
| 'invoice.payment_succeeded'
|
|
@@ -591,14 +541,10 @@ declare module 'stripe' {
|
|
|
591
541
|
| 'issuing_dispute.funds_rescinded'
|
|
592
542
|
| 'issuing_dispute.submitted'
|
|
593
543
|
| 'issuing_dispute.updated'
|
|
594
|
-
| 'issuing_dispute_settlement_detail.created'
|
|
595
|
-
| 'issuing_dispute_settlement_detail.updated'
|
|
596
544
|
| 'issuing_personalization_design.activated'
|
|
597
545
|
| 'issuing_personalization_design.deactivated'
|
|
598
546
|
| 'issuing_personalization_design.rejected'
|
|
599
547
|
| 'issuing_personalization_design.updated'
|
|
600
|
-
| 'issuing_settlement.created'
|
|
601
|
-
| 'issuing_settlement.updated'
|
|
602
548
|
| 'issuing_token.created'
|
|
603
549
|
| 'issuing_token.updated'
|
|
604
550
|
| 'issuing_transaction.created'
|
|
@@ -638,16 +584,10 @@ declare module 'stripe' {
|
|
|
638
584
|
| 'product.updated'
|
|
639
585
|
| 'promotion_code.created'
|
|
640
586
|
| 'promotion_code.updated'
|
|
641
|
-
| 'quote.accept_failed'
|
|
642
587
|
| 'quote.accepted'
|
|
643
|
-
| 'quote.accepting'
|
|
644
588
|
| 'quote.canceled'
|
|
645
589
|
| 'quote.created'
|
|
646
|
-
| 'quote.draft'
|
|
647
590
|
| 'quote.finalized'
|
|
648
|
-
| 'quote.reestimate_failed'
|
|
649
|
-
| 'quote.reestimated'
|
|
650
|
-
| 'quote.stale'
|
|
651
591
|
| 'radar.early_fraud_warning.created'
|
|
652
592
|
| 'radar.early_fraud_warning.updated'
|
|
653
593
|
| 'refund.created'
|
|
@@ -675,16 +615,13 @@ declare module 'stripe' {
|
|
|
675
615
|
| 'subscription_schedule.completed'
|
|
676
616
|
| 'subscription_schedule.created'
|
|
677
617
|
| 'subscription_schedule.expiring'
|
|
678
|
-
| 'subscription_schedule.price_migration_failed'
|
|
679
618
|
| 'subscription_schedule.released'
|
|
680
619
|
| 'subscription_schedule.updated'
|
|
681
|
-
| 'tax.form.updated'
|
|
682
620
|
| 'tax.settings.updated'
|
|
683
621
|
| 'tax_rate.created'
|
|
684
622
|
| 'tax_rate.updated'
|
|
685
623
|
| 'terminal.reader.action_failed'
|
|
686
624
|
| 'terminal.reader.action_succeeded'
|
|
687
|
-
| 'terminal.reader.action_updated'
|
|
688
625
|
| 'test_helpers.test_clock.advancing'
|
|
689
626
|
| 'test_helpers.test_clock.created'
|
|
690
627
|
| 'test_helpers.test_clock.deleted'
|