orb-billing 4.33.0 → 4.47.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/CHANGELOG.md +188 -0
- package/LICENSE +1 -1
- package/README.md +10 -1
- package/core.d.ts +4 -5
- package/core.d.ts.map +1 -1
- package/core.js +16 -11
- package/core.js.map +1 -1
- package/core.mjs +16 -11
- package/core.mjs.map +1 -1
- package/error.d.ts +30 -36
- package/error.d.ts.map +1 -1
- package/error.js +24 -43
- package/error.js.map +1 -1
- package/error.mjs +24 -43
- package/error.mjs.map +1 -1
- package/index.d.mts +43 -109
- package/index.d.ts +43 -109
- package/index.d.ts.map +1 -1
- package/index.js +71 -33
- package/index.js.map +1 -1
- package/index.mjs +43 -32
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +58 -19
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +19 -37
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +19 -14
- package/resources/alerts.mjs.map +1 -1
- package/resources/coupons/coupons.d.ts +3 -7
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +3 -5
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +3 -5
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/index.d.ts +2 -2
- package/resources/coupons/index.d.ts.map +1 -1
- package/resources/coupons/index.js.map +1 -1
- package/resources/coupons/index.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -2
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js +0 -2
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs +0 -2
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/credit-notes.d.ts +29 -4
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +8 -27
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +8 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +1 -6
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js +1 -27
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs +1 -4
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +1 -5
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +0 -2
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +0 -2
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +15 -31
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +10 -11
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +10 -11
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +3 -3
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +15 -23
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +12 -36
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +12 -13
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +1 -11
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +2 -28
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +2 -5
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +7 -25
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +10 -10
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +10 -10
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +4 -4
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
- package/resources/dimensional-price-groups/index.d.ts +3 -0
- package/resources/dimensional-price-groups/index.d.ts.map +1 -0
- package/resources/dimensional-price-groups/index.js +9 -0
- package/resources/dimensional-price-groups/index.js.map +1 -0
- package/resources/dimensional-price-groups/index.mjs +4 -0
- package/resources/dimensional-price-groups/index.mjs.map +1 -0
- package/resources/events/backfills.d.ts +5 -11
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +5 -29
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +5 -6
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.ts +7 -22
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +7 -7
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +7 -7
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/index.d.ts +3 -3
- package/resources/events/index.d.ts.map +1 -1
- package/resources/events/index.js.map +1 -1
- package/resources/events/index.mjs.map +1 -1
- package/resources/events/volume.d.ts +1 -3
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +0 -2
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +0 -2
- package/resources/events/volume.mjs.map +1 -1
- package/resources/index.d.ts +14 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +8 -7
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -3
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +0 -2
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +0 -2
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +78 -13
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +8 -27
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +8 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +1 -6
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +1 -27
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +1 -4
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +1 -6
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +1 -27
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +1 -4
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -2
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +0 -2
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +0 -2
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/index.d.ts +2 -2
- package/resources/plans/index.d.ts.map +1 -1
- package/resources/plans/index.js.map +1 -1
- package/resources/plans/index.mjs +1 -1
- package/resources/plans/index.mjs.map +1 -1
- package/resources/plans/plans.d.ts +331 -9
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +3 -5
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +3 -5
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +1 -2
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +0 -2
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +0 -2
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/index.d.ts +2 -2
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +3 -3
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +339 -13
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +3 -5
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +3 -5
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +14 -16
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +7629 -191
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +2 -29
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +2 -6
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.ts +1 -2
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js +0 -2
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -2
- package/resources/top-level.mjs.map +1 -1
- package/src/core.ts +23 -19
- package/src/error.ts +82 -125
- package/src/index.ts +334 -130
- package/src/resources/alerts.ts +117 -24
- package/src/resources/coupons/coupons.ts +13 -8
- package/src/resources/coupons/index.ts +2 -2
- package/src/resources/coupons/subscriptions.ts +2 -3
- package/src/resources/credit-notes.ts +45 -5
- package/src/resources/customers/balance-transactions.ts +10 -7
- package/src/resources/customers/costs.ts +7 -6
- package/src/resources/customers/credits/credits.ts +82 -32
- package/src/resources/customers/credits/index.ts +20 -20
- package/src/resources/customers/credits/ledger.ts +32 -26
- package/src/resources/customers/credits/top-ups.ts +16 -12
- package/src/resources/customers/customers.ts +68 -26
- package/src/resources/customers/index.ts +17 -17
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
- package/src/resources/dimensional-price-groups/index.ts +10 -0
- package/src/resources/events/backfills.ts +17 -12
- package/src/resources/events/events.ts +42 -23
- package/src/resources/events/index.ts +15 -15
- package/src/resources/events/volume.ts +2 -4
- package/src/resources/index.ts +113 -67
- package/src/resources/invoice-line-items.ts +5 -4
- package/src/resources/invoices.ts +108 -14
- package/src/resources/items.ts +10 -7
- package/src/resources/metrics.ts +10 -7
- package/src/resources/plans/external-plan-id.ts +2 -3
- package/src/resources/plans/index.ts +9 -2
- package/src/resources/plans/plans.ts +424 -9
- package/src/resources/prices/external-price-id.ts +2 -3
- package/src/resources/prices/index.ts +8 -8
- package/src/resources/prices/prices.ts +471 -15
- package/src/resources/shared.ts +18 -20
- package/src/resources/subscriptions.ts +9231 -400
- package/src/resources/top-level.ts +2 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/index.ts
CHANGED
|
@@ -1,12 +1,150 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Errors from './error';
|
|
4
|
-
import * as Uploads from './uploads';
|
|
5
3
|
import { type Agent } from './_shims/index';
|
|
6
4
|
import * as qs from './internal/qs';
|
|
7
5
|
import * as Core from './core';
|
|
6
|
+
import * as Errors from './error';
|
|
8
7
|
import * as Pagination from './pagination';
|
|
8
|
+
import { type PageParams, PageResponse } from './pagination';
|
|
9
|
+
import * as Uploads from './uploads';
|
|
9
10
|
import * as API from './resources/index';
|
|
11
|
+
import {
|
|
12
|
+
Alert,
|
|
13
|
+
AlertCreateForCustomerParams,
|
|
14
|
+
AlertCreateForExternalCustomerParams,
|
|
15
|
+
AlertCreateForSubscriptionParams,
|
|
16
|
+
AlertDisableParams,
|
|
17
|
+
AlertEnableParams,
|
|
18
|
+
AlertListParams,
|
|
19
|
+
AlertUpdateParams,
|
|
20
|
+
Alerts,
|
|
21
|
+
AlertsPage,
|
|
22
|
+
} from './resources/alerts';
|
|
23
|
+
import {
|
|
24
|
+
CreditNote,
|
|
25
|
+
CreditNoteCreateParams,
|
|
26
|
+
CreditNoteListParams,
|
|
27
|
+
CreditNotes,
|
|
28
|
+
CreditNotesPage,
|
|
29
|
+
} from './resources/credit-notes';
|
|
30
|
+
import {
|
|
31
|
+
InvoiceLineItemCreateParams,
|
|
32
|
+
InvoiceLineItemCreateResponse,
|
|
33
|
+
InvoiceLineItems,
|
|
34
|
+
} from './resources/invoice-line-items';
|
|
35
|
+
import {
|
|
36
|
+
Invoice,
|
|
37
|
+
InvoiceCreateParams,
|
|
38
|
+
InvoiceFetchUpcomingParams,
|
|
39
|
+
InvoiceFetchUpcomingResponse,
|
|
40
|
+
InvoiceIssueParams,
|
|
41
|
+
InvoiceListParams,
|
|
42
|
+
InvoiceMarkPaidParams,
|
|
43
|
+
InvoiceUpdateParams,
|
|
44
|
+
Invoices,
|
|
45
|
+
InvoicesPage,
|
|
46
|
+
} from './resources/invoices';
|
|
47
|
+
import {
|
|
48
|
+
Item,
|
|
49
|
+
ItemCreateParams,
|
|
50
|
+
ItemListParams,
|
|
51
|
+
ItemUpdateParams,
|
|
52
|
+
Items,
|
|
53
|
+
ItemsPage,
|
|
54
|
+
} from './resources/items';
|
|
55
|
+
import {
|
|
56
|
+
BillableMetric,
|
|
57
|
+
BillableMetricsPage,
|
|
58
|
+
MetricCreateParams,
|
|
59
|
+
MetricListParams,
|
|
60
|
+
MetricUpdateParams,
|
|
61
|
+
Metrics,
|
|
62
|
+
} from './resources/metrics';
|
|
63
|
+
import {
|
|
64
|
+
Subscription,
|
|
65
|
+
SubscriptionCancelParams,
|
|
66
|
+
SubscriptionCancelResponse,
|
|
67
|
+
SubscriptionCreateParams,
|
|
68
|
+
SubscriptionCreateResponse,
|
|
69
|
+
SubscriptionFetchCostsParams,
|
|
70
|
+
SubscriptionFetchCostsResponse,
|
|
71
|
+
SubscriptionFetchScheduleParams,
|
|
72
|
+
SubscriptionFetchScheduleResponse,
|
|
73
|
+
SubscriptionFetchScheduleResponsesPage,
|
|
74
|
+
SubscriptionFetchUsageParams,
|
|
75
|
+
SubscriptionListParams,
|
|
76
|
+
SubscriptionPriceIntervalsParams,
|
|
77
|
+
SubscriptionPriceIntervalsResponse,
|
|
78
|
+
SubscriptionSchedulePlanChangeParams,
|
|
79
|
+
SubscriptionSchedulePlanChangeResponse,
|
|
80
|
+
SubscriptionTriggerPhaseParams,
|
|
81
|
+
SubscriptionTriggerPhaseResponse,
|
|
82
|
+
SubscriptionUnscheduleCancellationResponse,
|
|
83
|
+
SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
|
|
84
|
+
SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
|
|
85
|
+
SubscriptionUnschedulePendingPlanChangesResponse,
|
|
86
|
+
SubscriptionUpdateFixedFeeQuantityParams,
|
|
87
|
+
SubscriptionUpdateFixedFeeQuantityResponse,
|
|
88
|
+
SubscriptionUpdateParams,
|
|
89
|
+
SubscriptionUpdateTrialParams,
|
|
90
|
+
SubscriptionUpdateTrialResponse,
|
|
91
|
+
SubscriptionUsage,
|
|
92
|
+
Subscriptions,
|
|
93
|
+
SubscriptionsPage,
|
|
94
|
+
} from './resources/subscriptions';
|
|
95
|
+
import { TopLevel, TopLevelPingResponse } from './resources/top-level';
|
|
96
|
+
import {
|
|
97
|
+
Coupon,
|
|
98
|
+
CouponCreateParams,
|
|
99
|
+
CouponListParams,
|
|
100
|
+
Coupons,
|
|
101
|
+
CouponsPage,
|
|
102
|
+
} from './resources/coupons/coupons';
|
|
103
|
+
import {
|
|
104
|
+
Customer,
|
|
105
|
+
CustomerCreateParams,
|
|
106
|
+
CustomerListParams,
|
|
107
|
+
CustomerUpdateByExternalIDParams,
|
|
108
|
+
CustomerUpdateParams,
|
|
109
|
+
Customers,
|
|
110
|
+
CustomersPage,
|
|
111
|
+
} from './resources/customers/customers';
|
|
112
|
+
import {
|
|
113
|
+
DimensionalPriceGroup,
|
|
114
|
+
DimensionalPriceGroupCreateParams,
|
|
115
|
+
DimensionalPriceGroupListParams,
|
|
116
|
+
DimensionalPriceGroups,
|
|
117
|
+
DimensionalPriceGroupsPage,
|
|
118
|
+
} from './resources/dimensional-price-groups/dimensional-price-groups';
|
|
119
|
+
import {
|
|
120
|
+
EventDeprecateResponse,
|
|
121
|
+
EventIngestParams,
|
|
122
|
+
EventIngestResponse,
|
|
123
|
+
EventSearchParams,
|
|
124
|
+
EventSearchResponse,
|
|
125
|
+
EventUpdateParams,
|
|
126
|
+
EventUpdateResponse,
|
|
127
|
+
Events,
|
|
128
|
+
} from './resources/events/events';
|
|
129
|
+
import {
|
|
130
|
+
Plan,
|
|
131
|
+
PlanCreateParams,
|
|
132
|
+
PlanListParams,
|
|
133
|
+
PlanUpdateParams,
|
|
134
|
+
Plans,
|
|
135
|
+
PlansPage,
|
|
136
|
+
} from './resources/plans/plans';
|
|
137
|
+
import {
|
|
138
|
+
EvaluatePriceGroup,
|
|
139
|
+
Price,
|
|
140
|
+
PriceCreateParams,
|
|
141
|
+
PriceEvaluateParams,
|
|
142
|
+
PriceEvaluateResponse,
|
|
143
|
+
PriceListParams,
|
|
144
|
+
PriceUpdateParams,
|
|
145
|
+
Prices,
|
|
146
|
+
PricesPage,
|
|
147
|
+
} from './resources/prices/prices';
|
|
10
148
|
|
|
11
149
|
export interface ClientOptions {
|
|
12
150
|
/**
|
|
@@ -146,6 +284,7 @@ export class Orb extends Core.APIClient {
|
|
|
146
284
|
subscriptions: API.Subscriptions = new API.Subscriptions(this);
|
|
147
285
|
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
148
286
|
alerts: API.Alerts = new API.Alerts(this);
|
|
287
|
+
dimensionalPriceGroups: API.DimensionalPriceGroups = new API.DimensionalPriceGroups(this);
|
|
149
288
|
|
|
150
289
|
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
|
151
290
|
return this._options.defaultQuery;
|
|
@@ -199,7 +338,198 @@ export class Orb extends Core.APIClient {
|
|
|
199
338
|
static fileFromPath = Uploads.fileFromPath;
|
|
200
339
|
}
|
|
201
340
|
|
|
202
|
-
|
|
341
|
+
Orb.TopLevel = TopLevel;
|
|
342
|
+
Orb.Coupons = Coupons;
|
|
343
|
+
Orb.CouponsPage = CouponsPage;
|
|
344
|
+
Orb.CreditNotes = CreditNotes;
|
|
345
|
+
Orb.CreditNotesPage = CreditNotesPage;
|
|
346
|
+
Orb.Customers = Customers;
|
|
347
|
+
Orb.CustomersPage = CustomersPage;
|
|
348
|
+
Orb.Events = Events;
|
|
349
|
+
Orb.InvoiceLineItems = InvoiceLineItems;
|
|
350
|
+
Orb.Invoices = Invoices;
|
|
351
|
+
Orb.InvoicesPage = InvoicesPage;
|
|
352
|
+
Orb.Items = Items;
|
|
353
|
+
Orb.ItemsPage = ItemsPage;
|
|
354
|
+
Orb.Metrics = Metrics;
|
|
355
|
+
Orb.BillableMetricsPage = BillableMetricsPage;
|
|
356
|
+
Orb.Plans = Plans;
|
|
357
|
+
Orb.PlansPage = PlansPage;
|
|
358
|
+
Orb.Prices = Prices;
|
|
359
|
+
Orb.PricesPage = PricesPage;
|
|
360
|
+
Orb.SubscriptionsPage = SubscriptionsPage;
|
|
361
|
+
Orb.SubscriptionFetchScheduleResponsesPage = SubscriptionFetchScheduleResponsesPage;
|
|
362
|
+
Orb.Alerts = Alerts;
|
|
363
|
+
Orb.AlertsPage = AlertsPage;
|
|
364
|
+
Orb.DimensionalPriceGroupsPage = DimensionalPriceGroupsPage;
|
|
365
|
+
export declare namespace Orb {
|
|
366
|
+
export type RequestOptions = Core.RequestOptions;
|
|
367
|
+
|
|
368
|
+
export import Page = Pagination.Page;
|
|
369
|
+
export { type PageParams as PageParams, type PageResponse as PageResponse };
|
|
370
|
+
|
|
371
|
+
export { TopLevel as TopLevel, type TopLevelPingResponse as TopLevelPingResponse };
|
|
372
|
+
|
|
373
|
+
export {
|
|
374
|
+
Coupons as Coupons,
|
|
375
|
+
type Coupon as Coupon,
|
|
376
|
+
CouponsPage as CouponsPage,
|
|
377
|
+
type CouponCreateParams as CouponCreateParams,
|
|
378
|
+
type CouponListParams as CouponListParams,
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
export {
|
|
382
|
+
CreditNotes as CreditNotes,
|
|
383
|
+
type CreditNote as CreditNote,
|
|
384
|
+
CreditNotesPage as CreditNotesPage,
|
|
385
|
+
type CreditNoteCreateParams as CreditNoteCreateParams,
|
|
386
|
+
type CreditNoteListParams as CreditNoteListParams,
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
export {
|
|
390
|
+
Customers as Customers,
|
|
391
|
+
type Customer as Customer,
|
|
392
|
+
CustomersPage as CustomersPage,
|
|
393
|
+
type CustomerCreateParams as CustomerCreateParams,
|
|
394
|
+
type CustomerUpdateParams as CustomerUpdateParams,
|
|
395
|
+
type CustomerListParams as CustomerListParams,
|
|
396
|
+
type CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams,
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export {
|
|
400
|
+
Events as Events,
|
|
401
|
+
type EventUpdateResponse as EventUpdateResponse,
|
|
402
|
+
type EventDeprecateResponse as EventDeprecateResponse,
|
|
403
|
+
type EventIngestResponse as EventIngestResponse,
|
|
404
|
+
type EventSearchResponse as EventSearchResponse,
|
|
405
|
+
type EventUpdateParams as EventUpdateParams,
|
|
406
|
+
type EventIngestParams as EventIngestParams,
|
|
407
|
+
type EventSearchParams as EventSearchParams,
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export {
|
|
411
|
+
InvoiceLineItems as InvoiceLineItems,
|
|
412
|
+
type InvoiceLineItemCreateResponse as InvoiceLineItemCreateResponse,
|
|
413
|
+
type InvoiceLineItemCreateParams as InvoiceLineItemCreateParams,
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
export {
|
|
417
|
+
Invoices as Invoices,
|
|
418
|
+
type Invoice as Invoice,
|
|
419
|
+
type InvoiceFetchUpcomingResponse as InvoiceFetchUpcomingResponse,
|
|
420
|
+
InvoicesPage as InvoicesPage,
|
|
421
|
+
type InvoiceCreateParams as InvoiceCreateParams,
|
|
422
|
+
type InvoiceUpdateParams as InvoiceUpdateParams,
|
|
423
|
+
type InvoiceListParams as InvoiceListParams,
|
|
424
|
+
type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
|
|
425
|
+
type InvoiceIssueParams as InvoiceIssueParams,
|
|
426
|
+
type InvoiceMarkPaidParams as InvoiceMarkPaidParams,
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
export {
|
|
430
|
+
Items as Items,
|
|
431
|
+
type Item as Item,
|
|
432
|
+
ItemsPage as ItemsPage,
|
|
433
|
+
type ItemCreateParams as ItemCreateParams,
|
|
434
|
+
type ItemUpdateParams as ItemUpdateParams,
|
|
435
|
+
type ItemListParams as ItemListParams,
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
export {
|
|
439
|
+
Metrics as Metrics,
|
|
440
|
+
type BillableMetric as BillableMetric,
|
|
441
|
+
BillableMetricsPage as BillableMetricsPage,
|
|
442
|
+
type MetricCreateParams as MetricCreateParams,
|
|
443
|
+
type MetricUpdateParams as MetricUpdateParams,
|
|
444
|
+
type MetricListParams as MetricListParams,
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export {
|
|
448
|
+
Plans as Plans,
|
|
449
|
+
type Plan as Plan,
|
|
450
|
+
PlansPage as PlansPage,
|
|
451
|
+
type PlanCreateParams as PlanCreateParams,
|
|
452
|
+
type PlanUpdateParams as PlanUpdateParams,
|
|
453
|
+
type PlanListParams as PlanListParams,
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
export {
|
|
457
|
+
Prices as Prices,
|
|
458
|
+
type EvaluatePriceGroup as EvaluatePriceGroup,
|
|
459
|
+
type Price as Price,
|
|
460
|
+
type PriceEvaluateResponse as PriceEvaluateResponse,
|
|
461
|
+
PricesPage as PricesPage,
|
|
462
|
+
type PriceCreateParams as PriceCreateParams,
|
|
463
|
+
type PriceUpdateParams as PriceUpdateParams,
|
|
464
|
+
type PriceListParams as PriceListParams,
|
|
465
|
+
type PriceEvaluateParams as PriceEvaluateParams,
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
export {
|
|
469
|
+
type Subscriptions as Subscriptions,
|
|
470
|
+
type Subscription as Subscription,
|
|
471
|
+
type SubscriptionUsage as SubscriptionUsage,
|
|
472
|
+
type SubscriptionCreateResponse as SubscriptionCreateResponse,
|
|
473
|
+
type SubscriptionCancelResponse as SubscriptionCancelResponse,
|
|
474
|
+
type SubscriptionFetchCostsResponse as SubscriptionFetchCostsResponse,
|
|
475
|
+
type SubscriptionFetchScheduleResponse as SubscriptionFetchScheduleResponse,
|
|
476
|
+
type SubscriptionPriceIntervalsResponse as SubscriptionPriceIntervalsResponse,
|
|
477
|
+
type SubscriptionSchedulePlanChangeResponse as SubscriptionSchedulePlanChangeResponse,
|
|
478
|
+
type SubscriptionTriggerPhaseResponse as SubscriptionTriggerPhaseResponse,
|
|
479
|
+
type SubscriptionUnscheduleCancellationResponse as SubscriptionUnscheduleCancellationResponse,
|
|
480
|
+
type SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse as SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse,
|
|
481
|
+
type SubscriptionUnschedulePendingPlanChangesResponse as SubscriptionUnschedulePendingPlanChangesResponse,
|
|
482
|
+
type SubscriptionUpdateFixedFeeQuantityResponse as SubscriptionUpdateFixedFeeQuantityResponse,
|
|
483
|
+
type SubscriptionUpdateTrialResponse as SubscriptionUpdateTrialResponse,
|
|
484
|
+
SubscriptionsPage as SubscriptionsPage,
|
|
485
|
+
SubscriptionFetchScheduleResponsesPage as SubscriptionFetchScheduleResponsesPage,
|
|
486
|
+
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
487
|
+
type SubscriptionUpdateParams as SubscriptionUpdateParams,
|
|
488
|
+
type SubscriptionListParams as SubscriptionListParams,
|
|
489
|
+
type SubscriptionCancelParams as SubscriptionCancelParams,
|
|
490
|
+
type SubscriptionFetchCostsParams as SubscriptionFetchCostsParams,
|
|
491
|
+
type SubscriptionFetchScheduleParams as SubscriptionFetchScheduleParams,
|
|
492
|
+
type SubscriptionFetchUsageParams as SubscriptionFetchUsageParams,
|
|
493
|
+
type SubscriptionPriceIntervalsParams as SubscriptionPriceIntervalsParams,
|
|
494
|
+
type SubscriptionSchedulePlanChangeParams as SubscriptionSchedulePlanChangeParams,
|
|
495
|
+
type SubscriptionTriggerPhaseParams as SubscriptionTriggerPhaseParams,
|
|
496
|
+
type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams as SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
|
|
497
|
+
type SubscriptionUpdateFixedFeeQuantityParams as SubscriptionUpdateFixedFeeQuantityParams,
|
|
498
|
+
type SubscriptionUpdateTrialParams as SubscriptionUpdateTrialParams,
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
export {
|
|
502
|
+
Alerts as Alerts,
|
|
503
|
+
type Alert as Alert,
|
|
504
|
+
AlertsPage as AlertsPage,
|
|
505
|
+
type AlertUpdateParams as AlertUpdateParams,
|
|
506
|
+
type AlertListParams as AlertListParams,
|
|
507
|
+
type AlertCreateForCustomerParams as AlertCreateForCustomerParams,
|
|
508
|
+
type AlertCreateForExternalCustomerParams as AlertCreateForExternalCustomerParams,
|
|
509
|
+
type AlertCreateForSubscriptionParams as AlertCreateForSubscriptionParams,
|
|
510
|
+
type AlertDisableParams as AlertDisableParams,
|
|
511
|
+
type AlertEnableParams as AlertEnableParams,
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
export {
|
|
515
|
+
type DimensionalPriceGroups as DimensionalPriceGroups,
|
|
516
|
+
type DimensionalPriceGroup as DimensionalPriceGroup,
|
|
517
|
+
DimensionalPriceGroupsPage as DimensionalPriceGroupsPage,
|
|
518
|
+
type DimensionalPriceGroupCreateParams as DimensionalPriceGroupCreateParams,
|
|
519
|
+
type DimensionalPriceGroupListParams as DimensionalPriceGroupListParams,
|
|
520
|
+
};
|
|
521
|
+
|
|
522
|
+
export type AmountDiscount = API.AmountDiscount;
|
|
523
|
+
export type BillingCycleRelativeDate = API.BillingCycleRelativeDate;
|
|
524
|
+
export type Discount = API.Discount;
|
|
525
|
+
export type InvoiceLevelDiscount = API.InvoiceLevelDiscount;
|
|
526
|
+
export type PaginationMetadata = API.PaginationMetadata;
|
|
527
|
+
export type PercentageDiscount = API.PercentageDiscount;
|
|
528
|
+
export type TrialDiscount = API.TrialDiscount;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export { toFile, fileFromPath } from './uploads';
|
|
532
|
+
export {
|
|
203
533
|
OrbError,
|
|
204
534
|
APIError,
|
|
205
535
|
APIConnectionError,
|
|
@@ -225,132 +555,6 @@ export const {
|
|
|
225
555
|
OrbInternalServerError,
|
|
226
556
|
UnprocessableEntityError,
|
|
227
557
|
DuplicateResourceCreation,
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export import toFile = Uploads.toFile;
|
|
231
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
232
|
-
|
|
233
|
-
export namespace Orb {
|
|
234
|
-
export import RequestOptions = Core.RequestOptions;
|
|
235
|
-
|
|
236
|
-
export import Page = Pagination.Page;
|
|
237
|
-
export import PageParams = Pagination.PageParams;
|
|
238
|
-
export import PageResponse = Pagination.PageResponse;
|
|
239
|
-
|
|
240
|
-
export import TopLevel = API.TopLevel;
|
|
241
|
-
export import TopLevelPingResponse = API.TopLevelPingResponse;
|
|
242
|
-
|
|
243
|
-
export import Coupons = API.Coupons;
|
|
244
|
-
export import Coupon = API.Coupon;
|
|
245
|
-
export import CouponsPage = API.CouponsPage;
|
|
246
|
-
export import CouponCreateParams = API.CouponCreateParams;
|
|
247
|
-
export import CouponListParams = API.CouponListParams;
|
|
248
|
-
|
|
249
|
-
export import CreditNotes = API.CreditNotes;
|
|
250
|
-
export import CreditNote = API.CreditNote;
|
|
251
|
-
export import CreditNotesPage = API.CreditNotesPage;
|
|
252
|
-
export import CreditNoteListParams = API.CreditNoteListParams;
|
|
253
|
-
|
|
254
|
-
export import Customers = API.Customers;
|
|
255
|
-
export import Customer = API.Customer;
|
|
256
|
-
export import CustomersPage = API.CustomersPage;
|
|
257
|
-
export import CustomerCreateParams = API.CustomerCreateParams;
|
|
258
|
-
export import CustomerUpdateParams = API.CustomerUpdateParams;
|
|
259
|
-
export import CustomerListParams = API.CustomerListParams;
|
|
260
|
-
export import CustomerUpdateByExternalIDParams = API.CustomerUpdateByExternalIDParams;
|
|
261
|
-
|
|
262
|
-
export import Events = API.Events;
|
|
263
|
-
export import EventUpdateResponse = API.EventUpdateResponse;
|
|
264
|
-
export import EventDeprecateResponse = API.EventDeprecateResponse;
|
|
265
|
-
export import EventIngestResponse = API.EventIngestResponse;
|
|
266
|
-
export import EventSearchResponse = API.EventSearchResponse;
|
|
267
|
-
export import EventUpdateParams = API.EventUpdateParams;
|
|
268
|
-
export import EventIngestParams = API.EventIngestParams;
|
|
269
|
-
export import EventSearchParams = API.EventSearchParams;
|
|
270
|
-
|
|
271
|
-
export import InvoiceLineItems = API.InvoiceLineItems;
|
|
272
|
-
export import InvoiceLineItemCreateResponse = API.InvoiceLineItemCreateResponse;
|
|
273
|
-
export import InvoiceLineItemCreateParams = API.InvoiceLineItemCreateParams;
|
|
274
|
-
|
|
275
|
-
export import Invoices = API.Invoices;
|
|
276
|
-
export import Invoice = API.Invoice;
|
|
277
|
-
export import InvoiceFetchUpcomingResponse = API.InvoiceFetchUpcomingResponse;
|
|
278
|
-
export import InvoicesPage = API.InvoicesPage;
|
|
279
|
-
export import InvoiceCreateParams = API.InvoiceCreateParams;
|
|
280
|
-
export import InvoiceUpdateParams = API.InvoiceUpdateParams;
|
|
281
|
-
export import InvoiceListParams = API.InvoiceListParams;
|
|
282
|
-
export import InvoiceFetchUpcomingParams = API.InvoiceFetchUpcomingParams;
|
|
283
|
-
export import InvoiceIssueParams = API.InvoiceIssueParams;
|
|
284
|
-
export import InvoiceMarkPaidParams = API.InvoiceMarkPaidParams;
|
|
285
|
-
|
|
286
|
-
export import Items = API.Items;
|
|
287
|
-
export import Item = API.Item;
|
|
288
|
-
export import ItemsPage = API.ItemsPage;
|
|
289
|
-
export import ItemCreateParams = API.ItemCreateParams;
|
|
290
|
-
export import ItemUpdateParams = API.ItemUpdateParams;
|
|
291
|
-
export import ItemListParams = API.ItemListParams;
|
|
292
|
-
|
|
293
|
-
export import Metrics = API.Metrics;
|
|
294
|
-
export import BillableMetric = API.BillableMetric;
|
|
295
|
-
export import BillableMetricsPage = API.BillableMetricsPage;
|
|
296
|
-
export import MetricCreateParams = API.MetricCreateParams;
|
|
297
|
-
export import MetricUpdateParams = API.MetricUpdateParams;
|
|
298
|
-
export import MetricListParams = API.MetricListParams;
|
|
299
|
-
|
|
300
|
-
export import Plans = API.Plans;
|
|
301
|
-
export import Plan = API.Plan;
|
|
302
|
-
export import PlansPage = API.PlansPage;
|
|
303
|
-
export import PlanCreateParams = API.PlanCreateParams;
|
|
304
|
-
export import PlanUpdateParams = API.PlanUpdateParams;
|
|
305
|
-
export import PlanListParams = API.PlanListParams;
|
|
306
|
-
|
|
307
|
-
export import Prices = API.Prices;
|
|
308
|
-
export import EvaluatePriceGroup = API.EvaluatePriceGroup;
|
|
309
|
-
export import Price = API.Price;
|
|
310
|
-
export import PriceEvaluateResponse = API.PriceEvaluateResponse;
|
|
311
|
-
export import PricesPage = API.PricesPage;
|
|
312
|
-
export import PriceCreateParams = API.PriceCreateParams;
|
|
313
|
-
export import PriceUpdateParams = API.PriceUpdateParams;
|
|
314
|
-
export import PriceListParams = API.PriceListParams;
|
|
315
|
-
export import PriceEvaluateParams = API.PriceEvaluateParams;
|
|
316
|
-
|
|
317
|
-
export import Subscriptions = API.Subscriptions;
|
|
318
|
-
export import Subscription = API.Subscription;
|
|
319
|
-
export import SubscriptionUsage = API.SubscriptionUsage;
|
|
320
|
-
export import SubscriptionFetchCostsResponse = API.SubscriptionFetchCostsResponse;
|
|
321
|
-
export import SubscriptionFetchScheduleResponse = API.SubscriptionFetchScheduleResponse;
|
|
322
|
-
export import SubscriptionsPage = API.SubscriptionsPage;
|
|
323
|
-
export import SubscriptionFetchScheduleResponsesPage = API.SubscriptionFetchScheduleResponsesPage;
|
|
324
|
-
export import SubscriptionCreateParams = API.SubscriptionCreateParams;
|
|
325
|
-
export import SubscriptionUpdateParams = API.SubscriptionUpdateParams;
|
|
326
|
-
export import SubscriptionListParams = API.SubscriptionListParams;
|
|
327
|
-
export import SubscriptionCancelParams = API.SubscriptionCancelParams;
|
|
328
|
-
export import SubscriptionFetchCostsParams = API.SubscriptionFetchCostsParams;
|
|
329
|
-
export import SubscriptionFetchScheduleParams = API.SubscriptionFetchScheduleParams;
|
|
330
|
-
export import SubscriptionFetchUsageParams = API.SubscriptionFetchUsageParams;
|
|
331
|
-
export import SubscriptionPriceIntervalsParams = API.SubscriptionPriceIntervalsParams;
|
|
332
|
-
export import SubscriptionSchedulePlanChangeParams = API.SubscriptionSchedulePlanChangeParams;
|
|
333
|
-
export import SubscriptionTriggerPhaseParams = API.SubscriptionTriggerPhaseParams;
|
|
334
|
-
export import SubscriptionUnscheduleFixedFeeQuantityUpdatesParams = API.SubscriptionUnscheduleFixedFeeQuantityUpdatesParams;
|
|
335
|
-
export import SubscriptionUpdateFixedFeeQuantityParams = API.SubscriptionUpdateFixedFeeQuantityParams;
|
|
336
|
-
export import SubscriptionUpdateTrialParams = API.SubscriptionUpdateTrialParams;
|
|
337
|
-
|
|
338
|
-
export import Alerts = API.Alerts;
|
|
339
|
-
export import Alert = API.Alert;
|
|
340
|
-
export import AlertsPage = API.AlertsPage;
|
|
341
|
-
export import AlertUpdateParams = API.AlertUpdateParams;
|
|
342
|
-
export import AlertListParams = API.AlertListParams;
|
|
343
|
-
export import AlertCreateForCustomerParams = API.AlertCreateForCustomerParams;
|
|
344
|
-
export import AlertCreateForExternalCustomerParams = API.AlertCreateForExternalCustomerParams;
|
|
345
|
-
export import AlertCreateForSubscriptionParams = API.AlertCreateForSubscriptionParams;
|
|
346
|
-
|
|
347
|
-
export import AmountDiscount = API.AmountDiscount;
|
|
348
|
-
export import BillingCycleRelativeDate = API.BillingCycleRelativeDate;
|
|
349
|
-
export import Discount = API.Discount;
|
|
350
|
-
export import InvoiceLevelDiscount = API.InvoiceLevelDiscount;
|
|
351
|
-
export import PaginationMetadata = API.PaginationMetadata;
|
|
352
|
-
export import PercentageDiscount = API.PercentageDiscount;
|
|
353
|
-
export import TrialDiscount = API.TrialDiscount;
|
|
354
|
-
}
|
|
558
|
+
} from './error';
|
|
355
559
|
|
|
356
560
|
export default Orb;
|
package/src/resources/alerts.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import { isRequestOptions } from '../core';
|
|
5
5
|
import * as Core from '../core';
|
|
6
|
-
import * as AlertsAPI from './alerts';
|
|
7
6
|
import { Page, type PageParams } from '../pagination';
|
|
8
7
|
|
|
9
8
|
export class Alerts extends APIResource {
|
|
@@ -110,17 +109,55 @@ export class Alerts extends APIResource {
|
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
/**
|
|
113
|
-
* This endpoint
|
|
112
|
+
* This endpoint allows you to disable an alert. To disable a plan-level alert for
|
|
113
|
+
* a specific subscription, you must include the `subscription_id`. The
|
|
114
|
+
* `subscription_id` is not required for customer or subscription level alerts.
|
|
114
115
|
*/
|
|
115
|
-
disable(
|
|
116
|
-
|
|
116
|
+
disable(
|
|
117
|
+
alertConfigurationId: string,
|
|
118
|
+
params?: AlertDisableParams,
|
|
119
|
+
options?: Core.RequestOptions,
|
|
120
|
+
): Core.APIPromise<Alert>;
|
|
121
|
+
disable(alertConfigurationId: string, options?: Core.RequestOptions): Core.APIPromise<Alert>;
|
|
122
|
+
disable(
|
|
123
|
+
alertConfigurationId: string,
|
|
124
|
+
params: AlertDisableParams | Core.RequestOptions = {},
|
|
125
|
+
options?: Core.RequestOptions,
|
|
126
|
+
): Core.APIPromise<Alert> {
|
|
127
|
+
if (isRequestOptions(params)) {
|
|
128
|
+
return this.disable(alertConfigurationId, {}, params);
|
|
129
|
+
}
|
|
130
|
+
const { subscription_id } = params;
|
|
131
|
+
return this._client.post(`/alerts/${alertConfigurationId}/disable`, {
|
|
132
|
+
query: { subscription_id },
|
|
133
|
+
...options,
|
|
134
|
+
});
|
|
117
135
|
}
|
|
118
136
|
|
|
119
137
|
/**
|
|
120
|
-
* This endpoint
|
|
138
|
+
* This endpoint allows you to enable an alert. To enable a plan-level alert for a
|
|
139
|
+
* specific subscription, you must include the `subscription_id`. The
|
|
140
|
+
* `subscription_id` is not required for customer or subscription level alerts.
|
|
121
141
|
*/
|
|
122
|
-
enable(
|
|
123
|
-
|
|
142
|
+
enable(
|
|
143
|
+
alertConfigurationId: string,
|
|
144
|
+
params?: AlertEnableParams,
|
|
145
|
+
options?: Core.RequestOptions,
|
|
146
|
+
): Core.APIPromise<Alert>;
|
|
147
|
+
enable(alertConfigurationId: string, options?: Core.RequestOptions): Core.APIPromise<Alert>;
|
|
148
|
+
enable(
|
|
149
|
+
alertConfigurationId: string,
|
|
150
|
+
params: AlertEnableParams | Core.RequestOptions = {},
|
|
151
|
+
options?: Core.RequestOptions,
|
|
152
|
+
): Core.APIPromise<Alert> {
|
|
153
|
+
if (isRequestOptions(params)) {
|
|
154
|
+
return this.enable(alertConfigurationId, {}, params);
|
|
155
|
+
}
|
|
156
|
+
const { subscription_id } = params;
|
|
157
|
+
return this._client.post(`/alerts/${alertConfigurationId}/enable`, {
|
|
158
|
+
query: { subscription_id },
|
|
159
|
+
...options,
|
|
160
|
+
});
|
|
124
161
|
}
|
|
125
162
|
}
|
|
126
163
|
|
|
@@ -133,11 +170,6 @@ export class AlertsPage extends Page<Alert> {}
|
|
|
133
170
|
*
|
|
134
171
|
* Alerts created through the API can be scoped to either customers or
|
|
135
172
|
* subscriptions.
|
|
136
|
-
*
|
|
137
|
-
* | Scope | Monitors | Vaild Alert Types |
|
|
138
|
-
* | ------------ | ------------------------------ | ----------------------------------------------------------------------------------- |
|
|
139
|
-
* | Customer | A customer's credit balance | `credit_balance_depleted`, `credit_balance_recovered`, and `credit_balance_dropped` |
|
|
140
|
-
* | Subscription | A subscription's usage or cost | `usage_exceeded` and `cost_exceeded` |
|
|
141
173
|
*/
|
|
142
174
|
export interface Alert {
|
|
143
175
|
/**
|
|
@@ -158,7 +190,7 @@ export interface Alert {
|
|
|
158
190
|
/**
|
|
159
191
|
* The customer the alert applies to.
|
|
160
192
|
*/
|
|
161
|
-
customer:
|
|
193
|
+
customer: Alert.Customer | null;
|
|
162
194
|
|
|
163
195
|
/**
|
|
164
196
|
* Whether the alert is enabled or disabled.
|
|
@@ -168,17 +200,17 @@ export interface Alert {
|
|
|
168
200
|
/**
|
|
169
201
|
* The metric the alert applies to.
|
|
170
202
|
*/
|
|
171
|
-
metric:
|
|
203
|
+
metric: Alert.Metric | null;
|
|
172
204
|
|
|
173
205
|
/**
|
|
174
206
|
* The plan the alert applies to.
|
|
175
207
|
*/
|
|
176
|
-
plan:
|
|
208
|
+
plan: Alert.Plan | null;
|
|
177
209
|
|
|
178
210
|
/**
|
|
179
211
|
* The subscription the alert applies to.
|
|
180
212
|
*/
|
|
181
|
-
subscription:
|
|
213
|
+
subscription: Alert.Subscription | null;
|
|
182
214
|
|
|
183
215
|
/**
|
|
184
216
|
* The thresholds that define the conditions under which the alert will be
|
|
@@ -198,6 +230,47 @@ export interface Alert {
|
|
|
198
230
|
}
|
|
199
231
|
|
|
200
232
|
export namespace Alert {
|
|
233
|
+
/**
|
|
234
|
+
* The customer the alert applies to.
|
|
235
|
+
*/
|
|
236
|
+
export interface Customer {
|
|
237
|
+
id: string;
|
|
238
|
+
|
|
239
|
+
external_customer_id: string | null;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The metric the alert applies to.
|
|
244
|
+
*/
|
|
245
|
+
export interface Metric {
|
|
246
|
+
id: string;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The plan the alert applies to.
|
|
251
|
+
*/
|
|
252
|
+
export interface Plan {
|
|
253
|
+
id: string | null;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* An optional user-defined ID for this plan resource, used throughout the system
|
|
257
|
+
* as an alias for this Plan. Use this field to identify a plan by an existing
|
|
258
|
+
* identifier in your system.
|
|
259
|
+
*/
|
|
260
|
+
external_plan_id: string | null;
|
|
261
|
+
|
|
262
|
+
name: string | null;
|
|
263
|
+
|
|
264
|
+
plan_version: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The subscription the alert applies to.
|
|
269
|
+
*/
|
|
270
|
+
export interface Subscription {
|
|
271
|
+
id: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
201
274
|
/**
|
|
202
275
|
* Thresholds are used to define the conditions under which an alert will be
|
|
203
276
|
* triggered.
|
|
@@ -370,12 +443,32 @@ export namespace AlertCreateForSubscriptionParams {
|
|
|
370
443
|
}
|
|
371
444
|
}
|
|
372
445
|
|
|
373
|
-
export
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
446
|
+
export interface AlertDisableParams {
|
|
447
|
+
/**
|
|
448
|
+
* Used to update the status of a plan alert scoped to this subscription_id
|
|
449
|
+
*/
|
|
450
|
+
subscription_id?: string | null;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface AlertEnableParams {
|
|
454
|
+
/**
|
|
455
|
+
* Used to update the status of a plan alert scoped to this subscription_id
|
|
456
|
+
*/
|
|
457
|
+
subscription_id?: string | null;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
Alerts.AlertsPage = AlertsPage;
|
|
461
|
+
|
|
462
|
+
export declare namespace Alerts {
|
|
463
|
+
export {
|
|
464
|
+
type Alert as Alert,
|
|
465
|
+
AlertsPage as AlertsPage,
|
|
466
|
+
type AlertUpdateParams as AlertUpdateParams,
|
|
467
|
+
type AlertListParams as AlertListParams,
|
|
468
|
+
type AlertCreateForCustomerParams as AlertCreateForCustomerParams,
|
|
469
|
+
type AlertCreateForExternalCustomerParams as AlertCreateForExternalCustomerParams,
|
|
470
|
+
type AlertCreateForSubscriptionParams as AlertCreateForSubscriptionParams,
|
|
471
|
+
type AlertDisableParams as AlertDisableParams,
|
|
472
|
+
type AlertEnableParams as AlertEnableParams,
|
|
473
|
+
};
|
|
381
474
|
}
|