@commet/node 9.9.0 → 9.10.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/dist/index.d.mts +813 -15
- package/dist/index.d.ts +813 -15
- package/dist/index.js +199 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -6
- package/dist/index.mjs.map +1 -1
- package/docs/ai-onboarding/mcp-server.md +2 -0
- package/docs/api-reference/addons.md +3 -1
- package/docs/api-reference/credit-packs.md +3 -1
- package/docs/api-reference/generated-webhooks.md +2 -2
- package/docs/api-reference/index.md +3 -3
- package/docs/api-reference/plans.md +483 -6
- package/docs/api-reference/subscriptions.md +43 -3
- package/docs/documentation/api-versioning.md +8 -2
- package/docs/documentation/cli.md +4 -0
- package/docs/documentation/customers/customer-portal.md +2 -2
- package/docs/documentation/plans/add-ons.md +14 -3
- package/docs/documentation/plans/consumption-models.md +3 -3
- package/docs/documentation/plans/create-plans.md +5 -1
- package/docs/documentation/plans/credit-packs.md +19 -9
- package/docs/documentation/plans/plan-groups.md +1 -1
- package/docs/documentation/plans/plan-versions.md +265 -0
- package/docs/documentation/sales/regional-prices.md +23 -9
- package/docs/documentation/sales/trial-periods.md +3 -3
- package/docs/documentation/subscriptions/manage-subscriptions.md +50 -13
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +2 -0
- package/docs/errors/addon_has_activations.md +2 -2
- package/docs/errors/addon_unavailable.md +22 -0
- package/docs/errors/credit_pack_unavailable.md +22 -0
- package/docs/errors/index.md +8 -2
- package/docs/errors/missing_regional_price.md +3 -3
- package/docs/errors/plan_experiment_not_found.md +22 -0
- package/docs/errors/plan_version_not_found.md +22 -0
- package/docs/errors/subscribers_do_not_fit.md +22 -0
- package/docs/errors/version_not_newer.md +22 -0
- package/docs/knowledge-base/how-do-free-plans-work-without-payment.md +4 -3
- package/docs/knowledge-base/how-do-trial-periods-work.md +3 -3
- package/docs/knowledge-base/how-does-billing-work.md +26 -28
- package/docs/knowledge-base/how-does-quota-based-billing-work.md +12 -22
- package/docs/knowledge-base/how-does-seat-based-billing-work.md +12 -22
- package/docs/knowledge-base/what-happens-when-a-customer-changes-plans.md +11 -8
- package/docs/knowledge-base/what-happens-when-you-change-your-prices.md +34 -29
- package/docs/knowledge-base/what-invoices-do-customers-receive-and-when.md +1 -1
- package/docs/manifest.json +191 -2
- package/docs/platform-documentation.md +1 -0
- package/docs/schemas.md +107 -0
- package/docs/webhooks/introduction.md +3 -1
- package/docs/webhooks.md +24 -0
- package/docs/webhooks.openapi.json +231 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -168,6 +168,8 @@ interface Addon {
|
|
|
168
168
|
includedUnits: number | null;
|
|
169
169
|
overageRate: number | null;
|
|
170
170
|
creditCost: number | null;
|
|
171
|
+
/** Plans that sell the add-on. */
|
|
172
|
+
planIds: Array<string>;
|
|
171
173
|
object: "addon";
|
|
172
174
|
livemode: boolean;
|
|
173
175
|
}
|
|
@@ -265,6 +267,13 @@ interface CreatedSubscription {
|
|
|
265
267
|
createdAt: string;
|
|
266
268
|
/** @format date-time */
|
|
267
269
|
updatedAt: string;
|
|
270
|
+
/** The plan version whose terms the subscription has now. It keeps paying and receiving everything from this version until it is moved. */
|
|
271
|
+
planVersion: {
|
|
272
|
+
/** Public plan version ID. */
|
|
273
|
+
id: string;
|
|
274
|
+
/** Main versions are 1, 2, 3; an experiment's versions carry its own code, like price-test 2. */
|
|
275
|
+
label: string;
|
|
276
|
+
} | null;
|
|
268
277
|
offerApplications: Array<SubscriptionOfferApplication>;
|
|
269
278
|
pause: {
|
|
270
279
|
status: "scheduled";
|
|
@@ -313,6 +322,8 @@ interface CreditPack {
|
|
|
313
322
|
description: string | null;
|
|
314
323
|
credits: number;
|
|
315
324
|
price: number;
|
|
325
|
+
/** Plans that sell the credit pack. */
|
|
326
|
+
planIds: Array<string>;
|
|
316
327
|
isActive: boolean;
|
|
317
328
|
/** @format date-time */
|
|
318
329
|
createdAt: string;
|
|
@@ -327,6 +338,8 @@ interface CreditPackListItem {
|
|
|
327
338
|
description: string | null;
|
|
328
339
|
credits: number;
|
|
329
340
|
price: number;
|
|
341
|
+
/** Plans that sell the credit pack. */
|
|
342
|
+
planIds: Array<string>;
|
|
330
343
|
currency: string;
|
|
331
344
|
object: "credit_pack";
|
|
332
345
|
livemode: boolean;
|
|
@@ -769,6 +782,12 @@ interface InvoiceListItem {
|
|
|
769
782
|
object: "invoice";
|
|
770
783
|
livemode: boolean;
|
|
771
784
|
}
|
|
785
|
+
interface KeptOnVersion {
|
|
786
|
+
subscriptionId: string;
|
|
787
|
+
keptOnVersion: true;
|
|
788
|
+
object: "kept_on_version";
|
|
789
|
+
livemode: boolean;
|
|
790
|
+
}
|
|
772
791
|
type ManagedBy = "dub" | null;
|
|
773
792
|
interface Market {
|
|
774
793
|
id: string;
|
|
@@ -1003,6 +1022,36 @@ interface Plan {
|
|
|
1003
1022
|
currency: string;
|
|
1004
1023
|
exchangeRate: number;
|
|
1005
1024
|
}>;
|
|
1025
|
+
/** Countries with their own currency or prices in the current version. Buyers from any other country pay the USD prices. */
|
|
1026
|
+
countries: Array<{
|
|
1027
|
+
/** ISO country code. */
|
|
1028
|
+
country: string;
|
|
1029
|
+
/** The currency buyers from the country pay, USD included. */
|
|
1030
|
+
currency: string;
|
|
1031
|
+
prices: Array<{
|
|
1032
|
+
billingInterval: BillingInterval;
|
|
1033
|
+
/** The country's price in the currency's minor unit. */
|
|
1034
|
+
price: number;
|
|
1035
|
+
/** True when set by hand; false when it follows the USD base at the exchange rate. */
|
|
1036
|
+
manual: boolean;
|
|
1037
|
+
}>;
|
|
1038
|
+
/** Every add-on the version sells, priced for the country. */
|
|
1039
|
+
addons: Array<{
|
|
1040
|
+
addonId: string;
|
|
1041
|
+
/** What buyers from the country pay for the add-on, in the currency's minor unit. */
|
|
1042
|
+
price: number;
|
|
1043
|
+
/** True when set by hand; false when it follows the add-on's USD price at the exchange rate. */
|
|
1044
|
+
manual: boolean;
|
|
1045
|
+
}>;
|
|
1046
|
+
/** Every credit pack the version sells, priced for the country. */
|
|
1047
|
+
creditPacks: Array<{
|
|
1048
|
+
creditPackId: string;
|
|
1049
|
+
/** What buyers from the country pay for the pack, in the currency's minor unit. */
|
|
1050
|
+
price: number;
|
|
1051
|
+
/** True when set by hand; false when it follows the pack's USD price at the exchange rate. */
|
|
1052
|
+
manual: boolean;
|
|
1053
|
+
}>;
|
|
1054
|
+
}>;
|
|
1006
1055
|
object: "plan";
|
|
1007
1056
|
livemode: boolean;
|
|
1008
1057
|
}
|
|
@@ -1166,6 +1215,136 @@ type PlanChange = {
|
|
|
1166
1215
|
object: "plan_change";
|
|
1167
1216
|
livemode: boolean;
|
|
1168
1217
|
};
|
|
1218
|
+
interface PlanDraft {
|
|
1219
|
+
/** Public plan draft ID. */
|
|
1220
|
+
id: string;
|
|
1221
|
+
/** The version the draft started from. */
|
|
1222
|
+
fromVersionId: string;
|
|
1223
|
+
/** What the draft changes against the version it started from. */
|
|
1224
|
+
changes: Array<{
|
|
1225
|
+
/** Identifies the change; send it to undo just this change. */
|
|
1226
|
+
key: string;
|
|
1227
|
+
/** Where the change is: Price, Trial, a rules section, Add-ons, or a country. */
|
|
1228
|
+
section: string;
|
|
1229
|
+
/** ISO country code when the change belongs to one country. */
|
|
1230
|
+
country: string | null;
|
|
1231
|
+
/** What changed, such as Monthly price. */
|
|
1232
|
+
label: string;
|
|
1233
|
+
/** The value before, formatted. */
|
|
1234
|
+
before: string | null;
|
|
1235
|
+
/** The value now, formatted. */
|
|
1236
|
+
after: string | null;
|
|
1237
|
+
}>;
|
|
1238
|
+
/** @format date-time */
|
|
1239
|
+
createdAt: string;
|
|
1240
|
+
/** @format date-time */
|
|
1241
|
+
updatedAt: string;
|
|
1242
|
+
object: "plan_draft";
|
|
1243
|
+
livemode: boolean;
|
|
1244
|
+
}
|
|
1245
|
+
interface PlanDraftPublication {
|
|
1246
|
+
preview: boolean;
|
|
1247
|
+
/** The published version. Null for a preview. */
|
|
1248
|
+
version: {
|
|
1249
|
+
/** Public plan version ID. */
|
|
1250
|
+
id: string;
|
|
1251
|
+
/** The plan's versions are numbered 1, 2, 3; an experiment's own versions read with its code, such as price-test 2. */
|
|
1252
|
+
label: string;
|
|
1253
|
+
/** The plan's version number. Null for a version that only belongs to an experiment; an experiment version made current takes the next number. */
|
|
1254
|
+
number: number | null;
|
|
1255
|
+
/** The experiment this version belongs to, if any. */
|
|
1256
|
+
experiment: {
|
|
1257
|
+
/** The experiment's code, as sold with planCode. */
|
|
1258
|
+
code: string;
|
|
1259
|
+
/** Its number within the experiment. */
|
|
1260
|
+
version: number;
|
|
1261
|
+
} | null;
|
|
1262
|
+
/** Whether new buyers get this version. */
|
|
1263
|
+
isCurrent: boolean;
|
|
1264
|
+
/** The version this one was created from. */
|
|
1265
|
+
parentVersionId: string | null;
|
|
1266
|
+
/** Active, trialing, past due and paused subscriptions on it. */
|
|
1267
|
+
subscriptionCount: number;
|
|
1268
|
+
maxPlanCredits: number | null;
|
|
1269
|
+
maxPlanBalance: number | null;
|
|
1270
|
+
prices: Array<{
|
|
1271
|
+
/** Public plan price ID. */
|
|
1272
|
+
id: string;
|
|
1273
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
1274
|
+
price: number;
|
|
1275
|
+
includedCredits: number | null;
|
|
1276
|
+
includedBalance: number | null;
|
|
1277
|
+
regionalPrices: Array<{
|
|
1278
|
+
currency: string;
|
|
1279
|
+
price: number;
|
|
1280
|
+
includedBalance: number | null;
|
|
1281
|
+
}>;
|
|
1282
|
+
}>;
|
|
1283
|
+
/** @format date-time */
|
|
1284
|
+
createdAt: string;
|
|
1285
|
+
} | null;
|
|
1286
|
+
/** The move of subscribers, if any. */
|
|
1287
|
+
moveId: string | null;
|
|
1288
|
+
subscribers: {
|
|
1289
|
+
moving: number;
|
|
1290
|
+
keptOnVersion: number;
|
|
1291
|
+
/** Left on their version because no change makes them fit; they show among the subscribers that need a change. */
|
|
1292
|
+
needsAChange: number;
|
|
1293
|
+
leftOut: Array<{
|
|
1294
|
+
subscriptionId: string;
|
|
1295
|
+
code: string;
|
|
1296
|
+
message: string;
|
|
1297
|
+
}>;
|
|
1298
|
+
} | null;
|
|
1299
|
+
object: "plan_draft_publication";
|
|
1300
|
+
livemode: boolean;
|
|
1301
|
+
}
|
|
1302
|
+
interface PlanExperiment {
|
|
1303
|
+
/** Public plan experiment ID. */
|
|
1304
|
+
id: string;
|
|
1305
|
+
/** The code to sell it with as planCode, such as pro:price-test. It always sells the experiment's latest version while running, and the plan's current version once closed. */
|
|
1306
|
+
code: string;
|
|
1307
|
+
/** running sells its latest version; won became the plan's current version; archived stopped selling. */
|
|
1308
|
+
status: "running" | "won" | "archived";
|
|
1309
|
+
/** The plan's version that was current when it started. */
|
|
1310
|
+
startedFromVersionId: string;
|
|
1311
|
+
/** Its latest version. */
|
|
1312
|
+
latestVersionId: string;
|
|
1313
|
+
/** The version its code sells to new buyers today. */
|
|
1314
|
+
sellsVersionId: string;
|
|
1315
|
+
/** Active, trialing, past due and paused subscriptions on its versions. */
|
|
1316
|
+
subscriptionCount: number;
|
|
1317
|
+
/** @format date-time */
|
|
1318
|
+
createdAt: string;
|
|
1319
|
+
closedAt: string | null;
|
|
1320
|
+
object: "plan_experiment";
|
|
1321
|
+
livemode: boolean;
|
|
1322
|
+
}
|
|
1323
|
+
interface PlanExperimentArchive {
|
|
1324
|
+
experiment: {
|
|
1325
|
+
/** Public plan experiment ID. */
|
|
1326
|
+
id: string;
|
|
1327
|
+
/** The code to sell it with as planCode, such as pro:price-test. It always sells the experiment's latest version while running, and the plan's current version once closed. */
|
|
1328
|
+
code: string;
|
|
1329
|
+
/** running sells its latest version; won became the plan's current version; archived stopped selling. */
|
|
1330
|
+
status: "running" | "won" | "archived";
|
|
1331
|
+
/** The plan's version that was current when it started. */
|
|
1332
|
+
startedFromVersionId: string;
|
|
1333
|
+
/** Its latest version. */
|
|
1334
|
+
latestVersionId: string;
|
|
1335
|
+
/** The version its code sells to new buyers today. */
|
|
1336
|
+
sellsVersionId: string;
|
|
1337
|
+
/** Active, trialing, past due and paused subscriptions on its versions. */
|
|
1338
|
+
subscriptionCount: number;
|
|
1339
|
+
/** @format date-time */
|
|
1340
|
+
createdAt: string;
|
|
1341
|
+
closedAt: string | null;
|
|
1342
|
+
};
|
|
1343
|
+
/** The move of its subscribers, or null when they stay. */
|
|
1344
|
+
moveId: string | null;
|
|
1345
|
+
object: "plan_experiment_archive";
|
|
1346
|
+
livemode: boolean;
|
|
1347
|
+
}
|
|
1169
1348
|
interface PlanFeature {
|
|
1170
1349
|
planId: string;
|
|
1171
1350
|
featureId: string;
|
|
@@ -1247,6 +1426,37 @@ interface PlanGroupDetail {
|
|
|
1247
1426
|
object: "plan_group";
|
|
1248
1427
|
livemode: boolean;
|
|
1249
1428
|
}
|
|
1429
|
+
interface PlanMove {
|
|
1430
|
+
/** Public move ID. Null for a preview, which records nothing. */
|
|
1431
|
+
id: string | null;
|
|
1432
|
+
toVersionId: string;
|
|
1433
|
+
/** The versions its subscribers are moving from. */
|
|
1434
|
+
fromVersionIds: Array<string>;
|
|
1435
|
+
effective: "now" | "period_end";
|
|
1436
|
+
preview: boolean;
|
|
1437
|
+
/** checked is a preview where everyone fits; moving while subscribers wait for their move; completed once every move ran; canceled after it was canceled. */
|
|
1438
|
+
status: "checking" | "blocked" | "checked" | "moving" | "completed" | "canceled";
|
|
1439
|
+
counts: {
|
|
1440
|
+
moving: number;
|
|
1441
|
+
moved: number;
|
|
1442
|
+
needsAChange: number;
|
|
1443
|
+
leftOut: number;
|
|
1444
|
+
canceled: number;
|
|
1445
|
+
keptOnVersion: number;
|
|
1446
|
+
};
|
|
1447
|
+
subscriptions: Array<{
|
|
1448
|
+
subscriptionId: string;
|
|
1449
|
+
/** moving waits for its renewal or is being moved; moved is on the destination; needs_a_change could not move and keeps its version until it is resolved or kept; left_out was not moved because it was not active, trialing or past due, such as a paused subscription (invalid_subscription_status), or because a listed subscription was already on the destination (no_change_requested); canceled was canceled before it moved; kept_on_version was left on its version by the merchant. */
|
|
1450
|
+
status: "moving" | "moved" | "needs_a_change" | "left_out" | "canceled" | "kept_on_version";
|
|
1451
|
+
code: string | null;
|
|
1452
|
+
message: string | null;
|
|
1453
|
+
}>;
|
|
1454
|
+
createdAt: string | null;
|
|
1455
|
+
completedAt: string | null;
|
|
1456
|
+
canceledAt: string | null;
|
|
1457
|
+
object: "plan_move";
|
|
1458
|
+
livemode: boolean;
|
|
1459
|
+
}
|
|
1250
1460
|
interface PlanPrice {
|
|
1251
1461
|
/** Public plan price ID. */
|
|
1252
1462
|
id: string;
|
|
@@ -1301,6 +1511,69 @@ interface PlanRegionalPricingResult {
|
|
|
1301
1511
|
object: "plan_regional_pricing";
|
|
1302
1512
|
livemode: boolean;
|
|
1303
1513
|
}
|
|
1514
|
+
interface PlanVersion {
|
|
1515
|
+
/** Public plan version ID. */
|
|
1516
|
+
id: string;
|
|
1517
|
+
/** The plan's versions are numbered 1, 2, 3; an experiment's own versions read with its code, such as price-test 2. */
|
|
1518
|
+
label: string;
|
|
1519
|
+
/** The plan's version number. Null for a version that only belongs to an experiment; an experiment version made current takes the next number. */
|
|
1520
|
+
number: number | null;
|
|
1521
|
+
/** The experiment this version belongs to, if any. */
|
|
1522
|
+
experiment: {
|
|
1523
|
+
/** The experiment's code, as sold with planCode. */
|
|
1524
|
+
code: string;
|
|
1525
|
+
/** Its number within the experiment. */
|
|
1526
|
+
version: number;
|
|
1527
|
+
} | null;
|
|
1528
|
+
/** Whether new buyers get this version. */
|
|
1529
|
+
isCurrent: boolean;
|
|
1530
|
+
/** The version this one was created from. */
|
|
1531
|
+
parentVersionId: string | null;
|
|
1532
|
+
/** Active, trialing, past due and paused subscriptions on it. */
|
|
1533
|
+
subscriptionCount: number;
|
|
1534
|
+
maxPlanCredits: number | null;
|
|
1535
|
+
maxPlanBalance: number | null;
|
|
1536
|
+
prices: Array<{
|
|
1537
|
+
/** Public plan price ID. */
|
|
1538
|
+
id: string;
|
|
1539
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
1540
|
+
price: number;
|
|
1541
|
+
includedCredits: number | null;
|
|
1542
|
+
includedBalance: number | null;
|
|
1543
|
+
regionalPrices: Array<{
|
|
1544
|
+
currency: string;
|
|
1545
|
+
price: number;
|
|
1546
|
+
includedBalance: number | null;
|
|
1547
|
+
}>;
|
|
1548
|
+
}>;
|
|
1549
|
+
/** @format date-time */
|
|
1550
|
+
createdAt: string;
|
|
1551
|
+
object: "plan_version";
|
|
1552
|
+
livemode: boolean;
|
|
1553
|
+
}
|
|
1554
|
+
interface PlanVersionComparison {
|
|
1555
|
+
/** The version the changes start from. */
|
|
1556
|
+
versionId: string;
|
|
1557
|
+
/** The version they end at. */
|
|
1558
|
+
againstVersionId: string;
|
|
1559
|
+
/** Every term that differs, the plan's first and then each country. */
|
|
1560
|
+
changes: Array<{
|
|
1561
|
+
/** Identifies the change; send it to undo just this change. */
|
|
1562
|
+
key: string;
|
|
1563
|
+
/** Where the change is: Price, Trial, a rules section, Add-ons, or a country. */
|
|
1564
|
+
section: string;
|
|
1565
|
+
/** ISO country code when the change belongs to one country. */
|
|
1566
|
+
country: string | null;
|
|
1567
|
+
/** What changed, such as Monthly price. */
|
|
1568
|
+
label: string;
|
|
1569
|
+
/** The value before, formatted. */
|
|
1570
|
+
before: string | null;
|
|
1571
|
+
/** The value now, formatted. */
|
|
1572
|
+
after: string | null;
|
|
1573
|
+
}>;
|
|
1574
|
+
object: "plan_version_comparison";
|
|
1575
|
+
livemode: boolean;
|
|
1576
|
+
}
|
|
1304
1577
|
interface PortalAccess {
|
|
1305
1578
|
portalUrl: string;
|
|
1306
1579
|
object: "portal_session";
|
|
@@ -1321,6 +1594,11 @@ interface PreviewChange {
|
|
|
1321
1594
|
daysRemaining: number;
|
|
1322
1595
|
totalDays: number;
|
|
1323
1596
|
isUpgrade: boolean;
|
|
1597
|
+
/** Active add-ons that the version the change moves the subscription to does not sell. The change deactivates them when it applies. */
|
|
1598
|
+
deactivatedAddons: Array<{
|
|
1599
|
+
addonId: string;
|
|
1600
|
+
name: string;
|
|
1601
|
+
}>;
|
|
1324
1602
|
offerApplication?: {
|
|
1325
1603
|
id: string;
|
|
1326
1604
|
offerId: string;
|
|
@@ -1525,6 +1803,20 @@ interface SentInvoice {
|
|
|
1525
1803
|
object: "invoice_delivery";
|
|
1526
1804
|
livemode: boolean;
|
|
1527
1805
|
}
|
|
1806
|
+
interface SubscriberNeedingAChange {
|
|
1807
|
+
subscriptionId: string;
|
|
1808
|
+
/** The move it could not complete. */
|
|
1809
|
+
moveId: string;
|
|
1810
|
+
/** The version it stays on. */
|
|
1811
|
+
fromVersionId: string;
|
|
1812
|
+
/** The version it could not move to. */
|
|
1813
|
+
toVersionId: string;
|
|
1814
|
+
/** Why it could not move. */
|
|
1815
|
+
code: string;
|
|
1816
|
+
message: string;
|
|
1817
|
+
object: "subscriber_needing_a_change";
|
|
1818
|
+
livemode: boolean;
|
|
1819
|
+
}
|
|
1528
1820
|
interface Subscription {
|
|
1529
1821
|
id: string;
|
|
1530
1822
|
customerId: string;
|
|
@@ -1573,6 +1865,13 @@ interface Subscription {
|
|
|
1573
1865
|
createdAt: string;
|
|
1574
1866
|
/** @format date-time */
|
|
1575
1867
|
updatedAt: string;
|
|
1868
|
+
/** The plan version whose terms the subscription has now. It keeps paying and receiving everything from this version until it is moved. */
|
|
1869
|
+
planVersion: {
|
|
1870
|
+
/** Public plan version ID. */
|
|
1871
|
+
id: string;
|
|
1872
|
+
/** Main versions are 1, 2, 3; an experiment's versions carry its own code, like price-test 2. */
|
|
1873
|
+
label: string;
|
|
1874
|
+
} | null;
|
|
1576
1875
|
offerApplications: Array<SubscriptionOfferApplication>;
|
|
1577
1876
|
pause: {
|
|
1578
1877
|
status: "scheduled";
|
|
@@ -1591,6 +1890,13 @@ interface Subscription {
|
|
|
1591
1890
|
effectiveAt: string;
|
|
1592
1891
|
resumeAt: string | null;
|
|
1593
1892
|
} | null;
|
|
1893
|
+
/** A move to another version of the plan pending for the next renewal. */
|
|
1894
|
+
scheduledVersionChange: {
|
|
1895
|
+
planVersionId: string;
|
|
1896
|
+
label: string;
|
|
1897
|
+
/** @format date-time */
|
|
1898
|
+
effectiveAt: string;
|
|
1899
|
+
} | null;
|
|
1594
1900
|
planGrant?: {
|
|
1595
1901
|
/** The active Plan Grant ID. */
|
|
1596
1902
|
id: string;
|
|
@@ -1825,6 +2131,13 @@ interface SubscriptionSummary {
|
|
|
1825
2131
|
createdAt: string;
|
|
1826
2132
|
/** @format date-time */
|
|
1827
2133
|
updatedAt: string;
|
|
2134
|
+
/** The plan version whose terms the subscription has now. It keeps paying and receiving everything from this version until it is moved. */
|
|
2135
|
+
planVersion: {
|
|
2136
|
+
/** Public plan version ID. */
|
|
2137
|
+
id: string;
|
|
2138
|
+
/** Main versions are 1, 2, 3; an experiment's versions carry its own code, like price-test 2. */
|
|
2139
|
+
label: string;
|
|
2140
|
+
} | null;
|
|
1828
2141
|
offerApplications: Array<SubscriptionOfferApplication>;
|
|
1829
2142
|
pause: {
|
|
1830
2143
|
status: "scheduled";
|
|
@@ -2314,6 +2627,8 @@ interface UpdateAddonParams {
|
|
|
2314
2627
|
basePrice?: number;
|
|
2315
2628
|
includedUnits?: number;
|
|
2316
2629
|
overageRate?: number;
|
|
2630
|
+
/** Plans that sell the add-on, replacing the current ones. Empty means every plan; omitted keeps them. Removing a plan is rejected with addon_has_activations while a subscription of that plan has the add-on active. */
|
|
2631
|
+
planIds?: Array<string>;
|
|
2317
2632
|
}
|
|
2318
2633
|
interface DeleteAddonParams {
|
|
2319
2634
|
id: string;
|
|
@@ -2327,12 +2642,16 @@ type CreateAddonParams = {
|
|
|
2327
2642
|
description?: string;
|
|
2328
2643
|
basePrice: number;
|
|
2329
2644
|
featureId: string;
|
|
2645
|
+
/** Plans that sell the add-on. Omitted or empty, every plan sells it. Plans created later sell it too. */
|
|
2646
|
+
planIds?: Array<string>;
|
|
2330
2647
|
consumptionModel: "boolean";
|
|
2331
2648
|
} | {
|
|
2332
2649
|
name: string;
|
|
2333
2650
|
description?: string;
|
|
2334
2651
|
basePrice: number;
|
|
2335
2652
|
featureId: string;
|
|
2653
|
+
/** Plans that sell the add-on. Omitted or empty, every plan sells it. Plans created later sell it too. */
|
|
2654
|
+
planIds?: Array<string>;
|
|
2336
2655
|
consumptionModel: "metered";
|
|
2337
2656
|
includedUnits: number;
|
|
2338
2657
|
overageRate: number;
|
|
@@ -2341,6 +2660,8 @@ type CreateAddonParams = {
|
|
|
2341
2660
|
description?: string;
|
|
2342
2661
|
basePrice: number;
|
|
2343
2662
|
featureId: string;
|
|
2663
|
+
/** Plans that sell the add-on. Omitted or empty, every plan sells it. Plans created later sell it too. */
|
|
2664
|
+
planIds?: Array<string>;
|
|
2344
2665
|
consumptionModel: "credits";
|
|
2345
2666
|
creditCost: number;
|
|
2346
2667
|
} | {
|
|
@@ -2348,6 +2669,8 @@ type CreateAddonParams = {
|
|
|
2348
2669
|
description?: string;
|
|
2349
2670
|
basePrice: number;
|
|
2350
2671
|
featureId: string;
|
|
2672
|
+
/** Plans that sell the add-on. Omitted or empty, every plan sells it. Plans created later sell it too. */
|
|
2673
|
+
planIds?: Array<string>;
|
|
2351
2674
|
consumptionModel: "balance";
|
|
2352
2675
|
overageRate: number;
|
|
2353
2676
|
};
|
|
@@ -2363,7 +2686,7 @@ declare class AddonsResource {
|
|
|
2363
2686
|
}>;
|
|
2364
2687
|
/** Retrieve an add-on by its public ID or slug. */
|
|
2365
2688
|
get(params: GetAddonParams, options?: RequestOptions): Promise<Addon>;
|
|
2366
|
-
/** Update an add-on's name, description, or
|
|
2689
|
+
/** Update an add-on's name, description, pricing, or the plans that sell it. */
|
|
2367
2690
|
update(params: UpdateAddonParams, options?: RequestOptions): Promise<Addon>;
|
|
2368
2691
|
/** Soft-delete an add-on. Fails if the add-on has active subscriptions. */
|
|
2369
2692
|
delete(params: DeleteAddonParams, options?: RequestOptions): Promise<DeletedObject>;
|
|
@@ -2433,6 +2756,8 @@ interface UpdateCreditPackParams {
|
|
|
2433
2756
|
credits?: number;
|
|
2434
2757
|
price?: number;
|
|
2435
2758
|
isActive?: boolean;
|
|
2759
|
+
/** Plans that sell the credit pack, replacing the current ones. Empty means every plan; omitted keeps them. */
|
|
2760
|
+
planIds?: Array<string>;
|
|
2436
2761
|
}
|
|
2437
2762
|
interface DeleteCreditPackParams {
|
|
2438
2763
|
id: string;
|
|
@@ -2443,11 +2768,13 @@ interface CreateCreditPackParams {
|
|
|
2443
2768
|
credits: number;
|
|
2444
2769
|
price: number;
|
|
2445
2770
|
isActive?: boolean;
|
|
2771
|
+
/** Plans that sell the credit pack. Omitted or empty, every plan sells it. Plans created later sell it too. */
|
|
2772
|
+
planIds?: Array<string>;
|
|
2446
2773
|
}
|
|
2447
2774
|
declare class CreditPacksResource {
|
|
2448
2775
|
private httpClient;
|
|
2449
2776
|
constructor(httpClient: CommetHTTPClient);
|
|
2450
|
-
/** Update a credit pack's name, description, credits, price, or
|
|
2777
|
+
/** Update a credit pack's name, description, credits, price, active status, or the plans that sell it. */
|
|
2451
2778
|
update(params: UpdateCreditPackParams, options?: RequestOptions): Promise<CreditPack>;
|
|
2452
2779
|
/** Soft-delete a credit pack. */
|
|
2453
2780
|
delete(params: DeleteCreditPackParams, options?: RequestOptions): Promise<DeletedObject>;
|
|
@@ -3021,6 +3348,242 @@ declare class PlanGroupsResource {
|
|
|
3021
3348
|
create(params: CreatePlanGroupParams, options?: RequestOptions): Promise<PlanGroup>;
|
|
3022
3349
|
}
|
|
3023
3350
|
|
|
3351
|
+
type PublishPlanDraftParams = {
|
|
3352
|
+
id: string;
|
|
3353
|
+
draftId: string;
|
|
3354
|
+
/** current sells the draft to every new buyer. */
|
|
3355
|
+
publishAs: "current";
|
|
3356
|
+
/** What happens to subscribers of earlier versions: keep them, move them at their next renewal, or move them now (features and balance change today, the price at renewal). Nobody moves unless every one of them fits or has a change below. */
|
|
3357
|
+
move?: "keep" | "period_end" | "now";
|
|
3358
|
+
/** Per-subscriber changes that make each one fit, applied at its renewal. */
|
|
3359
|
+
changes?: Array<{
|
|
3360
|
+
subscriptionId: string;
|
|
3361
|
+
/** Leave this subscriber on its version. */
|
|
3362
|
+
keepOnVersion?: true;
|
|
3363
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
3364
|
+
/** Lower its seats to the version's limit at renewal. */
|
|
3365
|
+
seatLimit?: true;
|
|
3366
|
+
/** Add-ons it stops paying at renewal. */
|
|
3367
|
+
removeAddonIds?: Array<string>;
|
|
3368
|
+
}>;
|
|
3369
|
+
/** Check everything without publishing. */
|
|
3370
|
+
preview?: boolean;
|
|
3371
|
+
} | {
|
|
3372
|
+
id: string;
|
|
3373
|
+
draftId: string;
|
|
3374
|
+
/** experiment starts an experiment with experimentCode, sold with planCode plan:code. Starting an experiment moves nobody, so it takes no move or changes. */
|
|
3375
|
+
publishAs: "experiment";
|
|
3376
|
+
/** The experiment's own code, after the plan's code. */
|
|
3377
|
+
experimentCode: string;
|
|
3378
|
+
/** Check everything without publishing. */
|
|
3379
|
+
preview?: boolean;
|
|
3380
|
+
} | {
|
|
3381
|
+
id: string;
|
|
3382
|
+
draftId: string;
|
|
3383
|
+
/** experiment_version publishes the next version of the experiment the draft started from. */
|
|
3384
|
+
publishAs: "experiment_version";
|
|
3385
|
+
/** What happens to subscribers of earlier versions: keep them, move them at their next renewal, or move them now (features and balance change today, the price at renewal). Nobody moves unless every one of them fits or has a change below. */
|
|
3386
|
+
move?: "keep" | "period_end" | "now";
|
|
3387
|
+
/** Per-subscriber changes that make each one fit, applied at its renewal. */
|
|
3388
|
+
changes?: Array<{
|
|
3389
|
+
subscriptionId: string;
|
|
3390
|
+
/** Leave this subscriber on its version. */
|
|
3391
|
+
keepOnVersion?: true;
|
|
3392
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
3393
|
+
/** Lower its seats to the version's limit at renewal. */
|
|
3394
|
+
seatLimit?: true;
|
|
3395
|
+
/** Add-ons it stops paying at renewal. */
|
|
3396
|
+
removeAddonIds?: Array<string>;
|
|
3397
|
+
}>;
|
|
3398
|
+
/** Check everything without publishing. */
|
|
3399
|
+
preview?: boolean;
|
|
3400
|
+
};
|
|
3401
|
+
interface GetPlanDraftParams {
|
|
3402
|
+
id: string;
|
|
3403
|
+
draftId: string;
|
|
3404
|
+
}
|
|
3405
|
+
interface UpdatePlanDraftParams {
|
|
3406
|
+
id: string;
|
|
3407
|
+
draftId: string;
|
|
3408
|
+
/** Every interval the draft sells. An interval the draft sold and this list leaves out is removed from the draft. */
|
|
3409
|
+
prices?: Array<{
|
|
3410
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3411
|
+
/** USD price in cents. */
|
|
3412
|
+
price: number;
|
|
3413
|
+
includedCredits?: number | null;
|
|
3414
|
+
includedBalance?: number | null;
|
|
3415
|
+
/** Days of trial on this price. Null removes the trial. */
|
|
3416
|
+
trialDays?: number | null;
|
|
3417
|
+
trialRequiresPaymentMethod?: boolean;
|
|
3418
|
+
/** Show this interval first at checkout and in pricing tables. */
|
|
3419
|
+
isDefault?: boolean;
|
|
3420
|
+
}>;
|
|
3421
|
+
/** Every country with its own currency or prices. A country the draft sold and this list leaves out is removed. A country missing a price blocks publishing. */
|
|
3422
|
+
countries?: Array<{
|
|
3423
|
+
/** ISO country code. */
|
|
3424
|
+
country: string;
|
|
3425
|
+
/** The currency the country pays in, USD included. */
|
|
3426
|
+
currency: string;
|
|
3427
|
+
/** Local units per USD for prices that follow the USD base. USD defaults to 1. */
|
|
3428
|
+
exchangeRate?: number | null;
|
|
3429
|
+
prices: Array<{
|
|
3430
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3431
|
+
/** The price set by hand, in the currency's minor unit. */
|
|
3432
|
+
price: number;
|
|
3433
|
+
/** The balance included each period in this country, in the currency's minor unit. Required when the plan's price includes a balance. */
|
|
3434
|
+
includedBalance?: number;
|
|
3435
|
+
} | {
|
|
3436
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3437
|
+
/** Follow the USD base at the exchange rate. */
|
|
3438
|
+
followBase: true;
|
|
3439
|
+
}>;
|
|
3440
|
+
/** Smallest balance top-up in this country, in the currency's minor unit. Null follows the USD minimum at the exchange rate; left out keeps it. */
|
|
3441
|
+
topUpMinimum?: number | null;
|
|
3442
|
+
/** Most unused plan balance that rolls over in this country. Null follows the USD cap at the exchange rate; left out keeps it. */
|
|
3443
|
+
maxPlanBalance?: number | null;
|
|
3444
|
+
/** Most plan balance spent per limit interval in this country. Null follows the USD limit at the exchange rate; left out keeps it. */
|
|
3445
|
+
planBalanceLimit?: number | null;
|
|
3446
|
+
/** What the country pays for each add-on the draft sells. Left out keeps the country's add-on prices; sent, it replaces them, and add-ons not listed follow the USD price. */
|
|
3447
|
+
addonPrices?: Array<{
|
|
3448
|
+
addonId: string;
|
|
3449
|
+
/** The add-on's price set by hand, in the currency's minor unit. */
|
|
3450
|
+
price: number;
|
|
3451
|
+
} | {
|
|
3452
|
+
addonId: string;
|
|
3453
|
+
/** Follow the add-on's USD price at the exchange rate. */
|
|
3454
|
+
followBase: true;
|
|
3455
|
+
}>;
|
|
3456
|
+
/** What the country pays for each credit pack the draft sells. Left out keeps the country's pack prices; sent, it replaces them, and packs not listed follow the USD price. */
|
|
3457
|
+
creditPackPrices?: Array<{
|
|
3458
|
+
creditPackId: string;
|
|
3459
|
+
/** The pack's price set by hand, in the currency's minor unit. */
|
|
3460
|
+
price: number;
|
|
3461
|
+
} | {
|
|
3462
|
+
creditPackId: string;
|
|
3463
|
+
/** Follow the pack's USD price at the exchange rate. */
|
|
3464
|
+
followBase: true;
|
|
3465
|
+
}>;
|
|
3466
|
+
}>;
|
|
3467
|
+
/** Credit or balance rules; fields left out stay as they are. */
|
|
3468
|
+
rules?: {
|
|
3469
|
+
/** Credits a free plan includes each month. */
|
|
3470
|
+
freeIncludedCredits?: number | null;
|
|
3471
|
+
/** Balance a free plan includes each month, in cents. */
|
|
3472
|
+
freeIncludedBalance?: number | null;
|
|
3473
|
+
unusedPlanCredits?: "expire" | "roll_over";
|
|
3474
|
+
maxPlanCredits?: number | null;
|
|
3475
|
+
planCreditLimit?: number | null;
|
|
3476
|
+
planCreditLimitInterval?: "day" | "week" | null;
|
|
3477
|
+
unusedPlanBalance?: "expire" | "roll_over";
|
|
3478
|
+
maxPlanBalance?: number | null;
|
|
3479
|
+
planBalanceLimit?: number | null;
|
|
3480
|
+
planBalanceLimitInterval?: "day" | "week" | null;
|
|
3481
|
+
blockOnExhaustion?: boolean;
|
|
3482
|
+
purchasesEnabled?: boolean;
|
|
3483
|
+
creditPurchaseUnitPrice?: number | null;
|
|
3484
|
+
creditPurchaseMinimum?: number | null;
|
|
3485
|
+
topUpMinimum?: number | null;
|
|
3486
|
+
};
|
|
3487
|
+
/** Change keys to put back as the version the draft started from had them. */
|
|
3488
|
+
undo?: Array<string>;
|
|
3489
|
+
}
|
|
3490
|
+
interface DeletePlanDraftParams {
|
|
3491
|
+
id: string;
|
|
3492
|
+
draftId: string;
|
|
3493
|
+
}
|
|
3494
|
+
interface ListPlanDraftsParams {
|
|
3495
|
+
id: string;
|
|
3496
|
+
}
|
|
3497
|
+
interface CreatePlanDraftParams {
|
|
3498
|
+
id: string;
|
|
3499
|
+
/** The version to start from: the current version, an experiment's version or an older version. Defaults to the current version. */
|
|
3500
|
+
fromVersionId?: string;
|
|
3501
|
+
}
|
|
3502
|
+
interface ArchivePlanExperimentParams {
|
|
3503
|
+
id: string;
|
|
3504
|
+
code: string;
|
|
3505
|
+
/** What happens to the experiment's subscribers: keep them on its versions, move them to the plan's current version at their next renewal, or move them now. Nobody moves, and the experiment keeps running, unless every one of them fits or has a change. */
|
|
3506
|
+
subscribers?: "keep" | "period_end" | "now";
|
|
3507
|
+
/** Per-subscriber changes that make each one fit, applied at its renewal. */
|
|
3508
|
+
changes?: Array<{
|
|
3509
|
+
subscriptionId: string;
|
|
3510
|
+
/** Leave this subscriber on its version. */
|
|
3511
|
+
keepOnVersion?: true;
|
|
3512
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
3513
|
+
/** Lower its seats to the version's limit at renewal. */
|
|
3514
|
+
seatLimit?: true;
|
|
3515
|
+
/** Add-ons it stops paying at renewal. */
|
|
3516
|
+
removeAddonIds?: Array<string>;
|
|
3517
|
+
}>;
|
|
3518
|
+
/** Check the archive and the move without changing anything. */
|
|
3519
|
+
preview?: boolean;
|
|
3520
|
+
}
|
|
3521
|
+
interface MakePlanExperimentCurrentParams {
|
|
3522
|
+
id: string;
|
|
3523
|
+
code: string;
|
|
3524
|
+
}
|
|
3525
|
+
interface GetPlanExperimentParams {
|
|
3526
|
+
id: string;
|
|
3527
|
+
code: string;
|
|
3528
|
+
}
|
|
3529
|
+
interface CreatePlanExperimentVersionParams {
|
|
3530
|
+
id: string;
|
|
3531
|
+
code: string;
|
|
3532
|
+
prices?: Array<{
|
|
3533
|
+
/** An interval the plan already sells. Prices not listed are copied unchanged from the current version. */
|
|
3534
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3535
|
+
/** USD price in the currency's minor unit (cents). */
|
|
3536
|
+
price: number;
|
|
3537
|
+
includedCredits?: number | null;
|
|
3538
|
+
includedBalance?: number | null;
|
|
3539
|
+
/** Per-currency amounts. A currency the current version does not sell also needs its exchangeRate in currencies; its amounts not listed here are derived from the USD price. */
|
|
3540
|
+
regionalPrices?: Array<{
|
|
3541
|
+
currency: string;
|
|
3542
|
+
price: number;
|
|
3543
|
+
includedBalance?: number | null;
|
|
3544
|
+
}>;
|
|
3545
|
+
}>;
|
|
3546
|
+
/** Currencies the current version does not sell, with the exchange rate (local units per USD) used for the amounts not listed, credit purchases, add-ons and overage. */
|
|
3547
|
+
currencies?: Array<{
|
|
3548
|
+
currency: string;
|
|
3549
|
+
exchangeRate: number;
|
|
3550
|
+
}>;
|
|
3551
|
+
/** Credits plans that roll over unused credits: the most plan credits a subscription can hold. Null removes the cap. */
|
|
3552
|
+
maxPlanCredits?: number | null;
|
|
3553
|
+
/** Balance plans that roll over unused balance: the most plan balance a subscription can hold, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. Null removes the cap. */
|
|
3554
|
+
maxPlanBalance?: number | null;
|
|
3555
|
+
}
|
|
3556
|
+
interface ListPlanExperimentsParams {
|
|
3557
|
+
id: string;
|
|
3558
|
+
}
|
|
3559
|
+
interface CreatePlanExperimentParams {
|
|
3560
|
+
id: string;
|
|
3561
|
+
prices?: Array<{
|
|
3562
|
+
/** An interval the plan already sells. Prices not listed are copied unchanged from the current version. */
|
|
3563
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3564
|
+
/** USD price in the currency's minor unit (cents). */
|
|
3565
|
+
price: number;
|
|
3566
|
+
includedCredits?: number | null;
|
|
3567
|
+
includedBalance?: number | null;
|
|
3568
|
+
/** Per-currency amounts. A currency the current version does not sell also needs its exchangeRate in currencies; its amounts not listed here are derived from the USD price. */
|
|
3569
|
+
regionalPrices?: Array<{
|
|
3570
|
+
currency: string;
|
|
3571
|
+
price: number;
|
|
3572
|
+
includedBalance?: number | null;
|
|
3573
|
+
}>;
|
|
3574
|
+
}>;
|
|
3575
|
+
/** Currencies the current version does not sell, with the exchange rate (local units per USD) used for the amounts not listed, credit purchases, add-ons and overage. */
|
|
3576
|
+
currencies?: Array<{
|
|
3577
|
+
currency: string;
|
|
3578
|
+
exchangeRate: number;
|
|
3579
|
+
}>;
|
|
3580
|
+
/** Credits plans that roll over unused credits: the most plan credits a subscription can hold. Null removes the cap. */
|
|
3581
|
+
maxPlanCredits?: number | null;
|
|
3582
|
+
/** Balance plans that roll over unused balance: the most plan balance a subscription can hold, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. Null removes the cap. */
|
|
3583
|
+
maxPlanBalance?: number | null;
|
|
3584
|
+
/** The experiment's own code: lowercase letters, numbers, hyphens and underscores. It is sold as planCode `<plan code>:<code>` and is never reused in the plan. */
|
|
3585
|
+
code: string;
|
|
3586
|
+
}
|
|
3024
3587
|
interface UpdatePlanFeatureParams {
|
|
3025
3588
|
id: string;
|
|
3026
3589
|
featureId: string;
|
|
@@ -3051,6 +3614,72 @@ interface AddPlanFeatureParams {
|
|
|
3051
3614
|
pricingMode?: "fixed" | "ai_model";
|
|
3052
3615
|
margin?: number | null;
|
|
3053
3616
|
}
|
|
3617
|
+
interface CancelPlanMoveParams {
|
|
3618
|
+
id: string;
|
|
3619
|
+
moveId: string;
|
|
3620
|
+
}
|
|
3621
|
+
interface GetPlanMoveParams {
|
|
3622
|
+
id: string;
|
|
3623
|
+
moveId: string;
|
|
3624
|
+
}
|
|
3625
|
+
interface CancelPlanMoveSubscriptionParams {
|
|
3626
|
+
id: string;
|
|
3627
|
+
moveId: string;
|
|
3628
|
+
subscriptionId: string;
|
|
3629
|
+
}
|
|
3630
|
+
interface ListPlanMovesParams {
|
|
3631
|
+
id: string;
|
|
3632
|
+
}
|
|
3633
|
+
type CreatePlanMoveParams = {
|
|
3634
|
+
id: string;
|
|
3635
|
+
/** Public IDs of the subscriptions to move. */
|
|
3636
|
+
subscriptionIds: Array<string>;
|
|
3637
|
+
/** The version subscribers move to. */
|
|
3638
|
+
toVersionId: string;
|
|
3639
|
+
/** now changes features and the included amount today and the price at renewal; period_end moves each subscriber at its next renewal. */
|
|
3640
|
+
effective: "now" | "period_end";
|
|
3641
|
+
/** Per-subscriber changes that make each one fit, applied at its renewal. */
|
|
3642
|
+
changes?: Array<{
|
|
3643
|
+
subscriptionId: string;
|
|
3644
|
+
/** Leave this subscriber on its version. */
|
|
3645
|
+
keepOnVersion?: true;
|
|
3646
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
3647
|
+
/** Lower its seats to the version's limit at renewal. */
|
|
3648
|
+
seatLimit?: true;
|
|
3649
|
+
/** Add-ons it stops paying at renewal. */
|
|
3650
|
+
removeAddonIds?: Array<string>;
|
|
3651
|
+
}>;
|
|
3652
|
+
/** Check every subscriber without moving anyone. */
|
|
3653
|
+
preview?: boolean;
|
|
3654
|
+
} | {
|
|
3655
|
+
id: string;
|
|
3656
|
+
/** Move every active, trialing and past due subscription on this version of the plan. */
|
|
3657
|
+
fromVersionId: string;
|
|
3658
|
+
/** The version subscribers move to. */
|
|
3659
|
+
toVersionId: string;
|
|
3660
|
+
/** now changes features and the included amount today and the price at renewal; period_end moves each subscriber at its next renewal. */
|
|
3661
|
+
effective: "now" | "period_end";
|
|
3662
|
+
/** Per-subscriber changes that make each one fit, applied at its renewal. */
|
|
3663
|
+
changes?: Array<{
|
|
3664
|
+
subscriptionId: string;
|
|
3665
|
+
/** Leave this subscriber on its version. */
|
|
3666
|
+
keepOnVersion?: true;
|
|
3667
|
+
billingInterval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
3668
|
+
/** Lower its seats to the version's limit at renewal. */
|
|
3669
|
+
seatLimit?: true;
|
|
3670
|
+
/** Add-ons it stops paying at renewal. */
|
|
3671
|
+
removeAddonIds?: Array<string>;
|
|
3672
|
+
}>;
|
|
3673
|
+
/** Check every subscriber without moving anyone. */
|
|
3674
|
+
preview?: boolean;
|
|
3675
|
+
};
|
|
3676
|
+
interface KeepPlanSubscriberOnVersionParams {
|
|
3677
|
+
id: string;
|
|
3678
|
+
subscriptionId: string;
|
|
3679
|
+
}
|
|
3680
|
+
interface ListPlanSubscribersNeedingAChangeParams {
|
|
3681
|
+
id: string;
|
|
3682
|
+
}
|
|
3054
3683
|
interface SetDefaultPlanPriceParams {
|
|
3055
3684
|
id: string;
|
|
3056
3685
|
priceId: string;
|
|
@@ -3146,7 +3775,7 @@ interface UpdatePlanParams {
|
|
|
3146
3775
|
description?: string | null;
|
|
3147
3776
|
metadata?: Record<string, unknown>;
|
|
3148
3777
|
isPublic?: boolean;
|
|
3149
|
-
/** Credits plans only. What happens to unused plan credits at each reset.
|
|
3778
|
+
/** Credits plans only. What happens to unused plan credits at each reset. Changing it publishes a new version of the plan; each subscription stays on its version until moved. */
|
|
3150
3779
|
unusedPlanCredits?: {
|
|
3151
3780
|
type: "expire";
|
|
3152
3781
|
} | {
|
|
@@ -3154,14 +3783,14 @@ interface UpdatePlanParams {
|
|
|
3154
3783
|
/** The most plan credits a subscription holds after a reset, including the credits that reset grants; credits above it expire. At least the included credits of every price. null means no limit other than the largest storable balance, 2,147,483,647 plan credits. */
|
|
3155
3784
|
maxPlanCredits: number | null;
|
|
3156
3785
|
};
|
|
3157
|
-
/** Credits plans only. The most plan credits a subscription spends per day or per week; null removes the limit.
|
|
3786
|
+
/** Credits plans only. The most plan credits a subscription spends per day or per week; null removes the limit. Changing it publishes a new version of the plan; each subscription stays on its version until moved. */
|
|
3158
3787
|
planCreditLimit?: {
|
|
3159
3788
|
/** The most plan credits a subscription spends in one window. */
|
|
3160
3789
|
credits: number;
|
|
3161
3790
|
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
3162
3791
|
interval: "day" | "week";
|
|
3163
3792
|
} | null;
|
|
3164
|
-
/** Balance plans only. What happens to unused plan balance at each reset.
|
|
3793
|
+
/** Balance plans only. What happens to unused plan balance at each reset. Changing it publishes a new version of the plan; each subscription stays on its version until moved. */
|
|
3165
3794
|
unusedPlanBalance?: {
|
|
3166
3795
|
type: "expire";
|
|
3167
3796
|
} | {
|
|
@@ -3169,14 +3798,14 @@ interface UpdatePlanParams {
|
|
|
3169
3798
|
/** The most plan balance a subscription holds after a reset, in USD cents, including the balance that reset grants; balance above it expires. At least the included balance of every price. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. null means no limit other than the largest storable amount, 2,147,483,647 cents. */
|
|
3170
3799
|
maxPlanBalance: number | null;
|
|
3171
3800
|
};
|
|
3172
|
-
/** Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; null removes the limit.
|
|
3801
|
+
/** Balance plans only. The most plan balance a subscription spends per day or per week, in USD cents; null removes the limit. Changing it publishes a new version of the plan; each subscription stays on its version until moved. */
|
|
3173
3802
|
planBalanceLimit?: {
|
|
3174
3803
|
/** The most plan balance a subscription spends in one window, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. */
|
|
3175
3804
|
amount: number;
|
|
3176
3805
|
/** The window length: `day` is 24 hours and `week` is 7 days, starting at the time of day of the subscription's billing anchor. */
|
|
3177
3806
|
interval: "day" | "week";
|
|
3178
3807
|
} | null;
|
|
3179
|
-
/** Credits and balance plans only. false lets usage continue past the plan and purchased amounts and bills the missing amount as overage at the next renewal; a credits plan bills it at the price per credit and needs one. Trials and free plans always stop, so free plans accept only true.
|
|
3808
|
+
/** Credits and balance plans only. false lets usage continue past the plan and purchased amounts and bills the missing amount as overage at the next renewal; a credits plan bills it at the price per credit and needs one. Trials and free plans always stop, so free plans accept only true. Changing it publishes a new version of the plan; each subscription stays on its version until moved. */
|
|
3180
3809
|
blockOnExhaustion?: boolean;
|
|
3181
3810
|
/** Make this plan the default plan of its plan group: customers created with that planGroupId start on it, and a paid plan of the group that ends from the customer portal, a revoked payment authorization or exhausted dunning moves to it instead of canceling. Requires a free plan in a plan group; replaces the group's previous default plan. false unmarks it. */
|
|
3182
3811
|
isDefault?: boolean;
|
|
@@ -3184,6 +3813,46 @@ interface UpdatePlanParams {
|
|
|
3184
3813
|
interface DeletePlanParams {
|
|
3185
3814
|
id: string;
|
|
3186
3815
|
}
|
|
3816
|
+
interface ComparePlanVersionsParams {
|
|
3817
|
+
id: string;
|
|
3818
|
+
versionId: string;
|
|
3819
|
+
against: string;
|
|
3820
|
+
}
|
|
3821
|
+
interface GetPlanVersionParams {
|
|
3822
|
+
id: string;
|
|
3823
|
+
versionId: string;
|
|
3824
|
+
}
|
|
3825
|
+
interface ListPlanVersionsParams {
|
|
3826
|
+
id: string;
|
|
3827
|
+
cursor?: string;
|
|
3828
|
+
limit?: number;
|
|
3829
|
+
}
|
|
3830
|
+
interface CreatePlanVersionParams {
|
|
3831
|
+
id: string;
|
|
3832
|
+
prices?: Array<{
|
|
3833
|
+
/** An interval the plan already sells. Prices not listed are copied unchanged from the current version. */
|
|
3834
|
+
billingInterval: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly" | "one_time";
|
|
3835
|
+
/** USD price in the currency's minor unit (cents). */
|
|
3836
|
+
price: number;
|
|
3837
|
+
includedCredits?: number | null;
|
|
3838
|
+
includedBalance?: number | null;
|
|
3839
|
+
/** Per-currency amounts. A currency the current version does not sell also needs its exchangeRate in currencies; its amounts not listed here are derived from the USD price. */
|
|
3840
|
+
regionalPrices?: Array<{
|
|
3841
|
+
currency: string;
|
|
3842
|
+
price: number;
|
|
3843
|
+
includedBalance?: number | null;
|
|
3844
|
+
}>;
|
|
3845
|
+
}>;
|
|
3846
|
+
/** Currencies the current version does not sell, with the exchange rate (local units per USD) used for the amounts not listed, credit purchases, add-ons and overage. */
|
|
3847
|
+
currencies?: Array<{
|
|
3848
|
+
currency: string;
|
|
3849
|
+
exchangeRate: number;
|
|
3850
|
+
}>;
|
|
3851
|
+
/** Credits plans that roll over unused credits: the most plan credits a subscription can hold. Null removes the cap. */
|
|
3852
|
+
maxPlanCredits?: number | null;
|
|
3853
|
+
/** Balance plans that roll over unused balance: the most plan balance a subscription can hold, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. Null removes the cap. */
|
|
3854
|
+
maxPlanBalance?: number | null;
|
|
3855
|
+
}
|
|
3187
3856
|
interface SetPlanVisibilityParams {
|
|
3188
3857
|
id: string;
|
|
3189
3858
|
isPublic: boolean;
|
|
@@ -3238,12 +3907,70 @@ interface CreatePlanParams {
|
|
|
3238
3907
|
declare class PlansResource {
|
|
3239
3908
|
private httpClient;
|
|
3240
3909
|
constructor(httpClient: CommetHTTPClient);
|
|
3910
|
+
/** Publish a draft as the plan's current version, as a new experiment with its own code, or as the next version of the experiment it started from. A country missing a price, or removing the signup trial of the plan's group from the current version, stops the publication. With move, subscribers of earlier versions move at their renewal or now; if any of them does not fit the new version, nothing is published and the response lists each one with what would make it fit, to send back in changes. Paused subscribers stay where they are. Send preview to check without publishing. */
|
|
3911
|
+
publishDraft(params: PublishPlanDraftParams, options?: RequestOptions): Promise<PlanDraftPublication>;
|
|
3912
|
+
/** Retrieve a draft with the version it started from and what it changes. */
|
|
3913
|
+
getDraft(params: GetPlanDraftParams, options?: RequestOptions): Promise<PlanDraft>;
|
|
3914
|
+
/** Change a draft's prices per interval, trials, the interval shown first, countries with their currency and prices, and credit or balance rules, or undo single changes. Each block sent replaces that block; blocks left out stay as they are. Buyers and subscribers see nothing until the draft is published. */
|
|
3915
|
+
updateDraft(params: UpdatePlanDraftParams, options?: RequestOptions): Promise<PlanDraft>;
|
|
3916
|
+
/** Discard a draft. Nothing it changed was ever sold. */
|
|
3917
|
+
deleteDraft(params: DeletePlanDraftParams, options?: RequestOptions): Promise<DeletedObject>;
|
|
3918
|
+
/** List the plan's open drafts, oldest first, each with the version it started from and what it changes. Drafts sell nothing until published. */
|
|
3919
|
+
listDrafts(params: ListPlanDraftsParams, options?: RequestOptions): Promise<{
|
|
3920
|
+
object: "list";
|
|
3921
|
+
data: Array<PlanDraft>;
|
|
3922
|
+
hasMore: boolean;
|
|
3923
|
+
nextCursor?: string;
|
|
3924
|
+
}>;
|
|
3925
|
+
/** Start a draft from a version of the plan: the current one, an experiment's version or an older one. A plan can have any number of drafts. Edit it, then publish it as the current version, as an experiment or as an experiment's next version; nothing changes for buyers or subscribers until then. */
|
|
3926
|
+
createDraft(params: CreatePlanDraftParams, options?: RequestOptions): Promise<PlanDraft>;
|
|
3927
|
+
/** Stop selling the experiment. Its code sells the plan's current version from then on, so links already shared keep working. Choose what happens to its subscribers: keep them on its versions, or move them to the current version at their renewal or now. If any of them does not fit, nothing changes and the response lists each one with what would make it fit, to send back in changes. */
|
|
3928
|
+
archiveExperiment(params: ArchivePlanExperimentParams, options?: RequestOptions): Promise<PlanExperimentArchive>;
|
|
3929
|
+
/** Make the experiment's latest version the plan's current version, with exactly its content and the next version number. New buyers get it; its subscribers are already on it. The experiment closes, and its code sells the plan's current version from then on. Nobody else moves. */
|
|
3930
|
+
makeExperimentCurrent(params: MakePlanExperimentCurrentParams, options?: RequestOptions): Promise<PlanVersion>;
|
|
3931
|
+
/** Get one experiment of a plan by its own code, with the version it sells and how many subscriptions are on it. */
|
|
3932
|
+
getExperiment(params: GetPlanExperimentParams, options?: RequestOptions): Promise<PlanExperiment>;
|
|
3933
|
+
/** Publish the experiment's next version from its latest version with the changes given. Its code sells the new version from now on; subscribers on its earlier versions stay where they are until moved. */
|
|
3934
|
+
createExperimentVersion(params: CreatePlanExperimentVersionParams, options?: RequestOptions): Promise<PlanVersion>;
|
|
3935
|
+
/** List a plan's experiments, newest first, with the version each one sells and how many subscriptions are on them. */
|
|
3936
|
+
listExperiments(params: ListPlanExperimentsParams, options?: RequestOptions): Promise<{
|
|
3937
|
+
object: "list";
|
|
3938
|
+
data: Array<PlanExperiment>;
|
|
3939
|
+
hasMore: boolean;
|
|
3940
|
+
nextCursor?: string;
|
|
3941
|
+
}>;
|
|
3942
|
+
/** Start an experiment from the plan's current version with the changes given. It is sold only through its code (planCode `<plan code>:<code>`); new buyers of the plan keep getting the current version. */
|
|
3943
|
+
createExperiment(params: CreatePlanExperimentParams, options?: RequestOptions): Promise<PlanExperiment>;
|
|
3241
3944
|
/** Update limits, overage, or enabled status of a feature on a plan. */
|
|
3242
3945
|
updateFeature(params: UpdatePlanFeatureParams, options?: RequestOptions): Promise<PlanFeature>;
|
|
3243
3946
|
/** Detach a feature from a plan. */
|
|
3244
3947
|
removeFeature(params: RemovePlanFeatureParams, options?: RequestOptions): Promise<RemovedPlanFeature>;
|
|
3245
3948
|
/** Attach a feature to a plan with limits, overage, and credits configuration. */
|
|
3246
3949
|
addFeature(params: AddPlanFeatureParams, options?: RequestOptions): Promise<PlanFeature>;
|
|
3950
|
+
/** Cancel a move for every subscriber who has not moved yet. They stay on their version; those already moved stay moved. */
|
|
3951
|
+
cancelMove(params: CancelPlanMoveParams, options?: RequestOptions): Promise<PlanMove>;
|
|
3952
|
+
/** Read a move of subscribers between plan versions with each subscriber's status: moving, moved, needs a change, left out, canceled or kept on its version. */
|
|
3953
|
+
getMove(params: GetPlanMoveParams, options?: RequestOptions): Promise<PlanMove>;
|
|
3954
|
+
/** Cancel a move for one subscriber who has not moved yet. It stays on its version; the rest of the move continues. */
|
|
3955
|
+
cancelMoveSubscription(params: CancelPlanMoveSubscriptionParams, options?: RequestOptions): Promise<PlanMove>;
|
|
3956
|
+
/** List a plan's latest moves of subscribers between versions, newest first, including the change of a single subscription, with how many are moving, moved, need a change, were left out, canceled or kept on their version. */
|
|
3957
|
+
listMoves(params: ListPlanMovesParams, options?: RequestOptions): Promise<{
|
|
3958
|
+
object: "list";
|
|
3959
|
+
data: Array<PlanMove>;
|
|
3960
|
+
hasMore: boolean;
|
|
3961
|
+
nextCursor?: string;
|
|
3962
|
+
}>;
|
|
3963
|
+
/** Move a list of subscriptions, or every subscription of another version, to a newer version of the plan, at their next renewal or now. Nobody moves unless every one of them fits or has a change in changes; otherwise the response lists each one with what would make it fit. Only active, trialing and past due subscriptions move. Paused ones, and listed subscriptions in another status or already on the destination, are left out. Send preview to check without moving anyone. */
|
|
3964
|
+
createMove(params: CreatePlanMoveParams, options?: RequestOptions): Promise<PlanMove>;
|
|
3965
|
+
/** Leave a subscriber that needs a change on its version. It stops appearing among the subscribers that need a change; move it later like any other subscriber. */
|
|
3966
|
+
keepSubscriberOnVersion(params: KeepPlanSubscriberOnVersionParams, options?: RequestOptions): Promise<KeptOnVersion>;
|
|
3967
|
+
/** List the plan's subscribers whose move could not complete, with the version they stay on, the one they could not move to and why. Move them again with a change, or keep them on their version so they leave this list. */
|
|
3968
|
+
listSubscribersNeedingAChange(params: ListPlanSubscribersNeedingAChangeParams, options?: RequestOptions): Promise<{
|
|
3969
|
+
object: "list";
|
|
3970
|
+
data: Array<SubscriberNeedingAChange>;
|
|
3971
|
+
hasMore: boolean;
|
|
3972
|
+
nextCursor?: string;
|
|
3973
|
+
}>;
|
|
3247
3974
|
/** Set a specific price as the default and return the updated plan price. */
|
|
3248
3975
|
setDefaultPrice(params: SetDefaultPlanPriceParams, options?: RequestOptions): Promise<PlanPrice>;
|
|
3249
3976
|
/** Create or update regional currency price overrides for a plan price. */
|
|
@@ -3252,7 +3979,7 @@ declare class PlansResource {
|
|
|
3252
3979
|
deleteRegionalPrices(params: DeleteRegionalPricesParams, options?: RequestOptions): Promise<DeletedPlanRegionalPricing>;
|
|
3253
3980
|
/** Update a base price or market price variant. Removing a base market override is rejected while a variant depends on it. Offer terms are managed through Offers. */
|
|
3254
3981
|
updatePrice(params: UpdatePlanPriceParams, options?: RequestOptions): Promise<PlanPrice>;
|
|
3255
|
-
/** Archive a price for new subscriptions.
|
|
3982
|
+
/** Archive a price for new subscriptions. This publishes a new version of the plan; existing subscriptions that selected the price keep paying it on their version until moved. */
|
|
3256
3983
|
deletePrice(params: DeletePlanPriceParams, options?: RequestOptions): Promise<DeletedObject>;
|
|
3257
3984
|
/** Add a base price or a selectable market price variant. Variants inherit their base price outside the markets they override. Configure introductory and promotional benefits through Offers. */
|
|
3258
3985
|
addPrice(params: AddPlanPriceParams, options?: RequestOptions): Promise<PlanPrice>;
|
|
@@ -3264,6 +3991,19 @@ declare class PlansResource {
|
|
|
3264
3991
|
update(params: UpdatePlanParams, options?: RequestOptions): Promise<Plan>;
|
|
3265
3992
|
/** Soft-delete a plan. */
|
|
3266
3993
|
delete(params: DeletePlanParams, options?: RequestOptions): Promise<DeletedObject>;
|
|
3994
|
+
/** List what changes from one version of a plan to another: prices, trials, features, rules, add-ons, credit packs and countries. */
|
|
3995
|
+
compareVersions(params: ComparePlanVersionsParams, options?: RequestOptions): Promise<PlanVersionComparison>;
|
|
3996
|
+
/** Get one published version of a plan with its prices and how many subscriptions are on it. */
|
|
3997
|
+
getVersion(params: GetPlanVersionParams, options?: RequestOptions): Promise<PlanVersion>;
|
|
3998
|
+
/** List a plan's published versions, newest first, with their prices and how many subscriptions are on each. Versions published before Commet recorded every term are not listed. */
|
|
3999
|
+
listVersions(params: ListPlanVersionsParams, options?: RequestOptions): Promise<{
|
|
4000
|
+
object: "list";
|
|
4001
|
+
data: Array<PlanVersion>;
|
|
4002
|
+
hasMore: boolean;
|
|
4003
|
+
nextCursor?: string;
|
|
4004
|
+
}>;
|
|
4005
|
+
/** Publish a new current version of the plan from its current version, changing prices per interval, included credits or balance, per-currency amounts and the rollover cap. New buyers get it; every subscriber stays on its version until moved. To try changes without selling them to everyone, create an experiment instead. */
|
|
4006
|
+
createVersion(params: CreatePlanVersionParams, options?: RequestOptions): Promise<PlanVersion>;
|
|
3267
4007
|
/** Set a plan's public visibility and return the updated plan. */
|
|
3268
4008
|
setVisibility(params: SetPlanVisibilityParams, options?: RequestOptions): Promise<Plan>;
|
|
3269
4009
|
/** List plans with public price IDs and their automatic introductory offer IDs. */
|
|
@@ -3499,6 +4239,13 @@ type ChangePlanParams = {
|
|
|
3499
4239
|
/** Promo code whose Offer prices the change, validated with the checkout's rules: a code the checkout would refuse returns 400 validation_error with the checkout's reason in details.reason. Cannot be combined with offerId. */
|
|
3500
4240
|
promoCode: string;
|
|
3501
4241
|
};
|
|
4242
|
+
interface ChangeSubscriptionVersionParams {
|
|
4243
|
+
id: string;
|
|
4244
|
+
/** A published version of the subscription's plan. */
|
|
4245
|
+
planVersionId: string;
|
|
4246
|
+
/** now changes features, limits and the included credits or balance at once (the included difference is added to or subtracted from the plan credits or plan balance: an increase first pays any plan-part debt, a decrease never creates new debt, and purchased credits and purchased balance are untouched) and charges the new price from the next renewal. period_end changes everything at the next renewal. There is never a proration charge or refund. */
|
|
4247
|
+
effective: "now" | "period_end";
|
|
4248
|
+
}
|
|
3502
4249
|
type PurchaseCreditsParams = {
|
|
3503
4250
|
id: string;
|
|
3504
4251
|
creditPackId: string;
|
|
@@ -3570,6 +4317,9 @@ interface GetSubscriptionParams {
|
|
|
3570
4317
|
interface RevokeScheduledPlanChangeParams {
|
|
3571
4318
|
id: string;
|
|
3572
4319
|
}
|
|
4320
|
+
interface RevokeScheduledVersionChangeParams {
|
|
4321
|
+
id: string;
|
|
4322
|
+
}
|
|
3573
4323
|
interface UncancelSubscriptionParams {
|
|
3574
4324
|
id: string;
|
|
3575
4325
|
}
|
|
@@ -3579,6 +4329,7 @@ interface GetActiveSubscriptionParams {
|
|
|
3579
4329
|
interface ListSubscriptionsParams {
|
|
3580
4330
|
customerId?: string;
|
|
3581
4331
|
status?: SubscriptionStatus;
|
|
4332
|
+
planVersionId?: string;
|
|
3582
4333
|
}
|
|
3583
4334
|
type CreateSubscriptionParams = {
|
|
3584
4335
|
customerId: string;
|
|
@@ -3598,6 +4349,8 @@ type CreateSubscriptionParams = {
|
|
|
3598
4349
|
prepaidPeriods?: number;
|
|
3599
4350
|
/** Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method. */
|
|
3600
4351
|
cancelAtPeriodEnd?: boolean;
|
|
4352
|
+
/** Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode `<plan code>:<experiment code>`) sells. */
|
|
4353
|
+
planVersionId?: string;
|
|
3601
4354
|
offerId?: never;
|
|
3602
4355
|
promoCode?: string;
|
|
3603
4356
|
/** Trial length in days, replacing the price's trial. A customer who already had this plan, in a trial or paying, gets no trial and goes through the regular checkout. */
|
|
@@ -3622,11 +4375,14 @@ type CreateSubscriptionParams = {
|
|
|
3622
4375
|
prepaidPeriods?: number;
|
|
3623
4376
|
/** Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method. */
|
|
3624
4377
|
cancelAtPeriodEnd?: boolean;
|
|
4378
|
+
/** Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode `<plan code>:<experiment code>`) sells. */
|
|
4379
|
+
planVersionId?: string;
|
|
3625
4380
|
offerId?: never;
|
|
3626
4381
|
promoCode?: string;
|
|
3627
4382
|
/** Trial length in days, replacing the price's trial. A customer who already had this plan, in a trial or paying, gets no trial and goes through the regular checkout. */
|
|
3628
4383
|
customTrialDays?: number;
|
|
3629
4384
|
skipTrial?: boolean;
|
|
4385
|
+
/** The plan code, or an experiment code as `<plan code>:<experiment code>` to sell the version the experiment sells. */
|
|
3630
4386
|
planCode: string;
|
|
3631
4387
|
} | {
|
|
3632
4388
|
customerId: string;
|
|
@@ -3646,6 +4402,8 @@ type CreateSubscriptionParams = {
|
|
|
3646
4402
|
prepaidPeriods?: number;
|
|
3647
4403
|
/** Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method. */
|
|
3648
4404
|
cancelAtPeriodEnd?: boolean;
|
|
4405
|
+
/** Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode `<plan code>:<experiment code>`) sells. */
|
|
4406
|
+
planVersionId?: string;
|
|
3649
4407
|
offerId: string;
|
|
3650
4408
|
promoCode?: never;
|
|
3651
4409
|
/** Trial length in days, replacing the price's trial. A customer who already had this plan, in a trial or paying, gets no trial and goes through the regular checkout. */
|
|
@@ -3670,11 +4428,14 @@ type CreateSubscriptionParams = {
|
|
|
3670
4428
|
prepaidPeriods?: number;
|
|
3671
4429
|
/** Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method. */
|
|
3672
4430
|
cancelAtPeriodEnd?: boolean;
|
|
4431
|
+
/** Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode `<plan code>:<experiment code>`) sells. */
|
|
4432
|
+
planVersionId?: string;
|
|
3673
4433
|
offerId: string;
|
|
3674
4434
|
promoCode?: never;
|
|
3675
4435
|
/** Trial length in days, replacing the price's trial. A customer who already had this plan, in a trial or paying, gets no trial and goes through the regular checkout. */
|
|
3676
4436
|
customTrialDays?: number;
|
|
3677
4437
|
skipTrial?: boolean;
|
|
4438
|
+
/** The plan code, or an experiment code as `<plan code>:<experiment code>` to sell the version the experiment sells. */
|
|
3678
4439
|
planCode: string;
|
|
3679
4440
|
} | {
|
|
3680
4441
|
customerId: string;
|
|
@@ -3694,6 +4455,8 @@ type CreateSubscriptionParams = {
|
|
|
3694
4455
|
prepaidPeriods?: number;
|
|
3695
4456
|
/** Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method. */
|
|
3696
4457
|
cancelAtPeriodEnd?: boolean;
|
|
4458
|
+
/** Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode `<plan code>:<experiment code>`) sells. */
|
|
4459
|
+
planVersionId?: string;
|
|
3697
4460
|
offerId?: never;
|
|
3698
4461
|
/** Public card promotion ID. The offer is shown immediately and remains conditional on card eligibility until checkout confirmation. */
|
|
3699
4462
|
cardPromotionId: string;
|
|
@@ -3719,12 +4482,15 @@ type CreateSubscriptionParams = {
|
|
|
3719
4482
|
prepaidPeriods?: number;
|
|
3720
4483
|
/** Schedules the cancellation from creation so the subscription ends after its last paid period and never renews with any payment method. */
|
|
3721
4484
|
cancelAtPeriodEnd?: boolean;
|
|
4485
|
+
/** Public ID of a published version of the plan, current or not, including an experiment's versions. The subscription is created on that version and stays on it: checkout charges its price and activation grants its credits, add-ons and credit packs. When omitted, the subscription gets the current version, or the version an experiment code (planCode `<plan code>:<experiment code>`) sells. */
|
|
4486
|
+
planVersionId?: string;
|
|
3722
4487
|
offerId?: never;
|
|
3723
4488
|
/** Public card promotion ID. The offer is shown immediately and remains conditional on card eligibility until checkout confirmation. */
|
|
3724
4489
|
cardPromotionId: string;
|
|
3725
4490
|
promoCode?: never;
|
|
3726
4491
|
customTrialDays?: never;
|
|
3727
4492
|
skipTrial?: false;
|
|
4493
|
+
/** The plan code, or an experiment code as `<plan code>:<experiment code>` to sell the version the experiment sells. */
|
|
3728
4494
|
planCode: string;
|
|
3729
4495
|
};
|
|
3730
4496
|
declare class SubscriptionsResource {
|
|
@@ -3732,7 +4498,7 @@ declare class SubscriptionsResource {
|
|
|
3732
4498
|
constructor(httpClient: CommetHTTPClient);
|
|
3733
4499
|
/** Deactivate an add-on from a subscription. */
|
|
3734
4500
|
deactivateAddon(params: DeactivateAddonParams, options?: RequestOptions): Promise<DeletedSubscriptionAddon>;
|
|
3735
|
-
/** Activate an add-on on a subscription. Charges a prorated amount for the current billing period. */
|
|
4501
|
+
/** Activate an add-on on a subscription. Charges a prorated amount for the current billing period. An add-on that the subscription's plan version does not sell is rejected with addon_unavailable. */
|
|
3736
4502
|
activateAddon(params: ActivateAddonParams, options?: RequestOptions): Promise<SubscriptionAddon>;
|
|
3737
4503
|
/** Read whether the subscription tops up automatically with its saved payment method when its available credits or balance reach a threshold, with the top-ups used this period and the last failure. */
|
|
3738
4504
|
getAutoTopUp(params: GetSubscriptionAutoTopUpParams, options?: RequestOptions): Promise<SubscriptionAutoTopUp>;
|
|
@@ -3746,7 +4512,9 @@ declare class SubscriptionsResource {
|
|
|
3746
4512
|
cancel(params: CancelSubscriptionParams, options?: RequestOptions): Promise<Subscription>;
|
|
3747
4513
|
/** Upgrade or change billing interval immediately, optionally applying an Offer by offerId or the Offer of a promoCode. Scheduled changes accept neither offerId nor promoCode. From a free plan, a promoCode opens the checkout with the code applied and counts its use when the checkout is paid; without offerId or promoCode, a destination price whose free trial requires no payment method starts that trial right away without checkout. During a trial without a payment method, an immediate change returns 409 no_payment_method; scheduled changes still apply. */
|
|
3748
4514
|
changePlan(params: ChangePlanParams, options?: RequestOptions): Promise<PlanChange>;
|
|
3749
|
-
/**
|
|
4515
|
+
/** Move a subscription to a newer published version of its plan, now or at the end of the period, without proration; an older version is rejected with version_not_newer, and a subscription on a running experiment moves only to a later version of that experiment. The subscription keeps its currency and its price: a destination that does not sell its currency is rejected with missing_regional_price, and one that does not sell the price it pays with price_not_found. A free version moves only to a free version and a paid one only to a paid one (validation_error). A subscription whose usage does not fit the destination, or with an active add-on the destination does not sell, is not moved either, and the error says why. Each change is recorded as a move of this one subscription in the plan's moves. Repeating the same request changes nothing; a new one replaces the pending move. */
|
|
4516
|
+
changeVersion(params: ChangeSubscriptionVersionParams, options?: RequestOptions): Promise<Subscription>;
|
|
4517
|
+
/** Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum. Charges the saved payment method and adds purchased credits. A credit pack that the subscription's plan version does not sell is rejected with credit_pack_unavailable. */
|
|
3750
4518
|
purchaseCredits(params: PurchaseCreditsParams, options?: RequestOptions): Promise<CreditGrant>;
|
|
3751
4519
|
/** Apply a direct Offer to a subscription. On a pending checkout it quotes or replaces the checkout discount, which starts after the plan price trial when there is one, and the existing checkout URL remains unchanged. On an active subscription it applies the Offer immediately with its discount phases starting at the next billing cycle; the call is rejected while another applied Offer still has active or upcoming discount phases. */
|
|
3752
4520
|
applyOffer(params: ApplySubscriptionOfferParams, options?: RequestOptions): Promise<Subscription>;
|
|
@@ -3774,6 +4542,8 @@ declare class SubscriptionsResource {
|
|
|
3774
4542
|
get(params: GetSubscriptionParams, options?: RequestOptions): Promise<Subscription>;
|
|
3775
4543
|
/** Revoke the plan or interval change scheduled for the end of the period, so the subscription stays on its current plan. Returns the updated subscription. */
|
|
3776
4544
|
revokeScheduledPlanChange(params: RevokeScheduledPlanChangeParams, options?: RequestOptions): Promise<Subscription>;
|
|
4545
|
+
/** Cancel the move to another plan version pending for the next renewal, so the subscription stays on its version, and send subscription.version_change_canceled with reason canceled_by_merchant. A move made now has nothing pending to revoke. With nothing pending it changes nothing. Returns the subscription. */
|
|
4546
|
+
revokeScheduledVersionChange(params: RevokeScheduledVersionChangeParams, options?: RequestOptions): Promise<Subscription>;
|
|
3777
4547
|
/** Revert a scheduled cancellation and return the updated subscription. Only works before cancellation takes effect. */
|
|
3778
4548
|
uncancel(params: UncancelSubscriptionParams, options?: RequestOptions): Promise<Subscription>;
|
|
3779
4549
|
/** Get the active subscription for a customer. Returns null if none. */
|
|
@@ -3923,7 +4693,7 @@ declare class GeneratedResources {
|
|
|
3923
4693
|
protected initResources(http: CommetHTTPClient): void;
|
|
3924
4694
|
}
|
|
3925
4695
|
|
|
3926
|
-
type WebhookEvent = "subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed";
|
|
4696
|
+
type WebhookEvent = "subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.version_changed" | "subscription.version_change_canceled" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed";
|
|
3927
4697
|
/** Fired when a subscription record is created, usually with status pending_payment: the first charge has not been confirmed yet — do NOT grant access here; wait for subscription.activated. A trial whose price requires no payment method is created already trialing, together with trial.started. */
|
|
3928
4698
|
interface SubscriptionCreatedData {
|
|
3929
4699
|
/** The subscription ID. */
|
|
@@ -4197,6 +4967,32 @@ interface SubscriptionPlanChangeRevokedData {
|
|
|
4197
4967
|
/** The previously scheduled billing interval, if the revoked change included one. */
|
|
4198
4968
|
revokedBillingInterval: string | null;
|
|
4199
4969
|
}
|
|
4970
|
+
/** Fired when a subscription moves to another version of its plan: a move applied now or a scheduled move that took effect at renewal. Making an experiment current moves nobody, so it sends none. The plan stays the same; the version's prices and features apply from now on. */
|
|
4971
|
+
interface SubscriptionVersionChangedData {
|
|
4972
|
+
/** The subscription ID. */
|
|
4973
|
+
subscriptionId: string;
|
|
4974
|
+
/** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
|
|
4975
|
+
customerId: string;
|
|
4976
|
+
/** The version the subscription left. */
|
|
4977
|
+
fromVersionId: string;
|
|
4978
|
+
/** The version the subscription is on now. */
|
|
4979
|
+
toVersionId: string;
|
|
4980
|
+
/** The currency the subscription pays in. */
|
|
4981
|
+
currency: string;
|
|
4982
|
+
/** The billing interval the subscription pays. */
|
|
4983
|
+
billingInterval: string;
|
|
4984
|
+
}
|
|
4985
|
+
/** Fired when a scheduled move to another plan version will no longer take effect because the subscription no longer fit the version at its renewal, or because the merchant revoked the scheduled version change or canceled the plan move. A new move that replaces it, a move made now, a plan change or an immediate cancellation sends none. The subscription stays on its version; reason says why. */
|
|
4986
|
+
interface SubscriptionVersionChangeCanceledData {
|
|
4987
|
+
/** The subscription ID. */
|
|
4988
|
+
subscriptionId: string;
|
|
4989
|
+
/** The customer ID. Returns your externalId if you provided one when creating the customer, otherwise returns the Commet publicId. */
|
|
4990
|
+
customerId: string;
|
|
4991
|
+
/** The version the subscription was going to move to. */
|
|
4992
|
+
toVersionId: string;
|
|
4993
|
+
/** Why the move was canceled: canceled_by_merchant, version_change_failed when the move could not be applied at renewal, or the code of what the subscription no longer fits (addon_unavailable, seat_limit_exceeded, price_not_found, missing_regional_price). */
|
|
4994
|
+
reason: string;
|
|
4995
|
+
}
|
|
4200
4996
|
/** Fired when a recurring payment fails on a previously paid subscription and its status becomes past_due. past_due is a grace window, not a cutoff: usage and seats keep working while new purchases are blocked, and dunning retries the charge — use this to notify the customer and recover the payment. */
|
|
4201
4997
|
interface SubscriptionPastDueData {
|
|
4202
4998
|
/** The subscription ID. */
|
|
@@ -5515,7 +6311,7 @@ interface WebhookEventEnvelope<E extends WebhookEvent, D> {
|
|
|
5515
6311
|
apiVersion: string;
|
|
5516
6312
|
data: D;
|
|
5517
6313
|
}
|
|
5518
|
-
type WebhookEventPayload = WebhookEventEnvelope<"subscription.created", SubscriptionCreatedData> | WebhookEventEnvelope<"subscription.activated", SubscriptionActivatedData> | WebhookEventEnvelope<"subscription.reactivated", SubscriptionReactivatedData> | WebhookEventEnvelope<"subscription.pause_scheduled", SubscriptionPauseScheduledData> | WebhookEventEnvelope<"subscription.pause_updated", SubscriptionPauseUpdatedData> | WebhookEventEnvelope<"subscription.pause_revoked", SubscriptionPauseRevokedData> | WebhookEventEnvelope<"subscription.paused", SubscriptionPausedData> | WebhookEventEnvelope<"subscription.resumed", SubscriptionResumedData> | WebhookEventEnvelope<"subscription.resume_failed", SubscriptionResumeFailedData> | WebhookEventEnvelope<"subscription.canceled", SubscriptionCanceledData> | WebhookEventEnvelope<"subscription.updated", SubscriptionUpdatedData> | WebhookEventEnvelope<"subscription.plan_changed", SubscriptionPlanChangedData> | WebhookEventEnvelope<"subscription.cancellation_scheduled", SubscriptionCancellationScheduledData> | WebhookEventEnvelope<"subscription.cancellation_revoked", SubscriptionCancellationRevokedData> | WebhookEventEnvelope<"subscription.plan_change_scheduled", SubscriptionPlanChangeScheduledData> | WebhookEventEnvelope<"subscription.plan_change_revoked", SubscriptionPlanChangeRevokedData> | WebhookEventEnvelope<"subscription.past_due", SubscriptionPastDueData> | WebhookEventEnvelope<"trial.started", TrialStartedData> | WebhookEventEnvelope<"trial.converted", TrialConvertedData> | WebhookEventEnvelope<"trial.expired", TrialExpiredData> | WebhookEventEnvelope<"trial.will_end", TrialWillEndData> | WebhookEventEnvelope<"trial.checkout_ready", TrialCheckoutReadyData> | WebhookEventEnvelope<"checkout.ready", CheckoutReadyData> | WebhookEventEnvelope<"payment.received", PaymentReceivedData> | WebhookEventEnvelope<"payment.failed", PaymentFailedData> | WebhookEventEnvelope<"payment.recovered", PaymentRecoveredData> | WebhookEventEnvelope<"payment.retry_failed", PaymentRetryFailedData> | WebhookEventEnvelope<"payment.refunded", PaymentRefundedData> | WebhookEventEnvelope<"payment.disputed", PaymentDisputedData> | WebhookEventEnvelope<"payment.dispute_resolved", PaymentDisputeResolvedData> | WebhookEventEnvelope<"payment_link.created", PaymentLinkCreatedData> | WebhookEventEnvelope<"payment_link.completed", PaymentLinkCompletedData> | WebhookEventEnvelope<"payment_link.failed", PaymentLinkFailedData> | WebhookEventEnvelope<"payment_link.canceled", PaymentLinkCanceledData> | WebhookEventEnvelope<"invoice.created", InvoiceCreatedData> | WebhookEventEnvelope<"invoice.voided", InvoiceVoidedData> | WebhookEventEnvelope<"invoice.overdue", InvoiceOverdueData> | WebhookEventEnvelope<"invoice.upcoming", InvoiceUpcomingData> | WebhookEventEnvelope<"payment_method.attached", PaymentMethodAttachedData> | WebhookEventEnvelope<"payment_method.updated", PaymentMethodUpdatedData> | WebhookEventEnvelope<"payment_method.detached", PaymentMethodDetachedData> | WebhookEventEnvelope<"customer.created", CustomerCreatedData> | WebhookEventEnvelope<"customer.updated", CustomerUpdatedData> | WebhookEventEnvelope<"customer.state_changed", CustomerStateChangedData> | WebhookEventEnvelope<"plan_grant.created", PlanGrantCreatedData> | WebhookEventEnvelope<"plan_grant.updated", PlanGrantUpdatedData> | WebhookEventEnvelope<"plan_grant.expired", PlanGrantExpiredData> | WebhookEventEnvelope<"plan_grant.revoked", PlanGrantRevokedData> | WebhookEventEnvelope<"credits.granted", CreditsGrantedData> | WebhookEventEnvelope<"credits.purchased", CreditsPurchasedData> | WebhookEventEnvelope<"credits.low", CreditsLowData> | WebhookEventEnvelope<"credits.depleted", CreditsDepletedData> | WebhookEventEnvelope<"credits.expired", CreditsExpiredData> | WebhookEventEnvelope<"balance.granted", BalanceGrantedData> | WebhookEventEnvelope<"balance.topped_up", BalanceToppedUpData> | WebhookEventEnvelope<"balance.low", BalanceLowData> | WebhookEventEnvelope<"balance.depleted", BalanceDepletedData> | WebhookEventEnvelope<"balance.expired", BalanceExpiredData> | WebhookEventEnvelope<"quota.threshold_reached", QuotaThresholdReachedData> | WebhookEventEnvelope<"quota.exceeded", QuotaExceededData> | WebhookEventEnvelope<"seats.updated", SeatsUpdatedData> | WebhookEventEnvelope<"seats.limit_reached", SeatsLimitReachedData> | WebhookEventEnvelope<"addon.activated", AddonActivatedData> | WebhookEventEnvelope<"addon.deactivated", AddonDeactivatedData> | WebhookEventEnvelope<"usage.recorded", UsageRecordedData> | WebhookEventEnvelope<"payout.available", PayoutAvailableData> | WebhookEventEnvelope<"payout.created", PayoutCreatedData> | WebhookEventEnvelope<"payout.paid", PayoutPaidData> | WebhookEventEnvelope<"payout.failed", PayoutFailedData>;
|
|
6314
|
+
type WebhookEventPayload = WebhookEventEnvelope<"subscription.created", SubscriptionCreatedData> | WebhookEventEnvelope<"subscription.activated", SubscriptionActivatedData> | WebhookEventEnvelope<"subscription.reactivated", SubscriptionReactivatedData> | WebhookEventEnvelope<"subscription.pause_scheduled", SubscriptionPauseScheduledData> | WebhookEventEnvelope<"subscription.pause_updated", SubscriptionPauseUpdatedData> | WebhookEventEnvelope<"subscription.pause_revoked", SubscriptionPauseRevokedData> | WebhookEventEnvelope<"subscription.paused", SubscriptionPausedData> | WebhookEventEnvelope<"subscription.resumed", SubscriptionResumedData> | WebhookEventEnvelope<"subscription.resume_failed", SubscriptionResumeFailedData> | WebhookEventEnvelope<"subscription.canceled", SubscriptionCanceledData> | WebhookEventEnvelope<"subscription.updated", SubscriptionUpdatedData> | WebhookEventEnvelope<"subscription.plan_changed", SubscriptionPlanChangedData> | WebhookEventEnvelope<"subscription.cancellation_scheduled", SubscriptionCancellationScheduledData> | WebhookEventEnvelope<"subscription.cancellation_revoked", SubscriptionCancellationRevokedData> | WebhookEventEnvelope<"subscription.plan_change_scheduled", SubscriptionPlanChangeScheduledData> | WebhookEventEnvelope<"subscription.plan_change_revoked", SubscriptionPlanChangeRevokedData> | WebhookEventEnvelope<"subscription.version_changed", SubscriptionVersionChangedData> | WebhookEventEnvelope<"subscription.version_change_canceled", SubscriptionVersionChangeCanceledData> | WebhookEventEnvelope<"subscription.past_due", SubscriptionPastDueData> | WebhookEventEnvelope<"trial.started", TrialStartedData> | WebhookEventEnvelope<"trial.converted", TrialConvertedData> | WebhookEventEnvelope<"trial.expired", TrialExpiredData> | WebhookEventEnvelope<"trial.will_end", TrialWillEndData> | WebhookEventEnvelope<"trial.checkout_ready", TrialCheckoutReadyData> | WebhookEventEnvelope<"checkout.ready", CheckoutReadyData> | WebhookEventEnvelope<"payment.received", PaymentReceivedData> | WebhookEventEnvelope<"payment.failed", PaymentFailedData> | WebhookEventEnvelope<"payment.recovered", PaymentRecoveredData> | WebhookEventEnvelope<"payment.retry_failed", PaymentRetryFailedData> | WebhookEventEnvelope<"payment.refunded", PaymentRefundedData> | WebhookEventEnvelope<"payment.disputed", PaymentDisputedData> | WebhookEventEnvelope<"payment.dispute_resolved", PaymentDisputeResolvedData> | WebhookEventEnvelope<"payment_link.created", PaymentLinkCreatedData> | WebhookEventEnvelope<"payment_link.completed", PaymentLinkCompletedData> | WebhookEventEnvelope<"payment_link.failed", PaymentLinkFailedData> | WebhookEventEnvelope<"payment_link.canceled", PaymentLinkCanceledData> | WebhookEventEnvelope<"invoice.created", InvoiceCreatedData> | WebhookEventEnvelope<"invoice.voided", InvoiceVoidedData> | WebhookEventEnvelope<"invoice.overdue", InvoiceOverdueData> | WebhookEventEnvelope<"invoice.upcoming", InvoiceUpcomingData> | WebhookEventEnvelope<"payment_method.attached", PaymentMethodAttachedData> | WebhookEventEnvelope<"payment_method.updated", PaymentMethodUpdatedData> | WebhookEventEnvelope<"payment_method.detached", PaymentMethodDetachedData> | WebhookEventEnvelope<"customer.created", CustomerCreatedData> | WebhookEventEnvelope<"customer.updated", CustomerUpdatedData> | WebhookEventEnvelope<"customer.state_changed", CustomerStateChangedData> | WebhookEventEnvelope<"plan_grant.created", PlanGrantCreatedData> | WebhookEventEnvelope<"plan_grant.updated", PlanGrantUpdatedData> | WebhookEventEnvelope<"plan_grant.expired", PlanGrantExpiredData> | WebhookEventEnvelope<"plan_grant.revoked", PlanGrantRevokedData> | WebhookEventEnvelope<"credits.granted", CreditsGrantedData> | WebhookEventEnvelope<"credits.purchased", CreditsPurchasedData> | WebhookEventEnvelope<"credits.low", CreditsLowData> | WebhookEventEnvelope<"credits.depleted", CreditsDepletedData> | WebhookEventEnvelope<"credits.expired", CreditsExpiredData> | WebhookEventEnvelope<"balance.granted", BalanceGrantedData> | WebhookEventEnvelope<"balance.topped_up", BalanceToppedUpData> | WebhookEventEnvelope<"balance.low", BalanceLowData> | WebhookEventEnvelope<"balance.depleted", BalanceDepletedData> | WebhookEventEnvelope<"balance.expired", BalanceExpiredData> | WebhookEventEnvelope<"quota.threshold_reached", QuotaThresholdReachedData> | WebhookEventEnvelope<"quota.exceeded", QuotaExceededData> | WebhookEventEnvelope<"seats.updated", SeatsUpdatedData> | WebhookEventEnvelope<"seats.limit_reached", SeatsLimitReachedData> | WebhookEventEnvelope<"addon.activated", AddonActivatedData> | WebhookEventEnvelope<"addon.deactivated", AddonDeactivatedData> | WebhookEventEnvelope<"usage.recorded", UsageRecordedData> | WebhookEventEnvelope<"payout.available", PayoutAvailableData> | WebhookEventEnvelope<"payout.created", PayoutCreatedData> | WebhookEventEnvelope<"payout.paid", PayoutPaidData> | WebhookEventEnvelope<"payout.failed", PayoutFailedData>;
|
|
5519
6315
|
interface WebhookEventDataMap {
|
|
5520
6316
|
"subscription.created": SubscriptionCreatedData;
|
|
5521
6317
|
"subscription.activated": SubscriptionActivatedData;
|
|
@@ -5533,6 +6329,8 @@ interface WebhookEventDataMap {
|
|
|
5533
6329
|
"subscription.cancellation_revoked": SubscriptionCancellationRevokedData;
|
|
5534
6330
|
"subscription.plan_change_scheduled": SubscriptionPlanChangeScheduledData;
|
|
5535
6331
|
"subscription.plan_change_revoked": SubscriptionPlanChangeRevokedData;
|
|
6332
|
+
"subscription.version_changed": SubscriptionVersionChangedData;
|
|
6333
|
+
"subscription.version_change_canceled": SubscriptionVersionChangeCanceledData;
|
|
5536
6334
|
"subscription.past_due": SubscriptionPastDueData;
|
|
5537
6335
|
"trial.started": TrialStartedData;
|
|
5538
6336
|
"trial.converted": TrialConvertedData;
|
|
@@ -5618,7 +6416,7 @@ interface GetWebhookEndpointParams {
|
|
|
5618
6416
|
interface UpdateWebhookEndpointParams {
|
|
5619
6417
|
id: string;
|
|
5620
6418
|
url?: string;
|
|
5621
|
-
events?: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">;
|
|
6419
|
+
events?: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.version_changed" | "subscription.version_change_canceled" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">;
|
|
5622
6420
|
description?: string | null;
|
|
5623
6421
|
isActive?: boolean;
|
|
5624
6422
|
apiVersion?: string;
|
|
@@ -5635,7 +6433,7 @@ interface ListWebhookEndpointsParams {
|
|
|
5635
6433
|
}
|
|
5636
6434
|
interface CreateWebhookEndpointParams {
|
|
5637
6435
|
url: string;
|
|
5638
|
-
events: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">;
|
|
6436
|
+
events: Array<"subscription.created" | "subscription.activated" | "subscription.reactivated" | "subscription.pause_scheduled" | "subscription.pause_updated" | "subscription.pause_revoked" | "subscription.paused" | "subscription.resumed" | "subscription.resume_failed" | "subscription.canceled" | "subscription.updated" | "subscription.plan_changed" | "subscription.cancellation_scheduled" | "subscription.cancellation_revoked" | "subscription.plan_change_scheduled" | "subscription.plan_change_revoked" | "subscription.version_changed" | "subscription.version_change_canceled" | "subscription.past_due" | "trial.started" | "trial.converted" | "trial.expired" | "trial.will_end" | "trial.checkout_ready" | "checkout.ready" | "payment.received" | "payment.failed" | "payment.recovered" | "payment.retry_failed" | "payment.refunded" | "payment.disputed" | "payment.dispute_resolved" | "payment_link.created" | "payment_link.completed" | "payment_link.failed" | "payment_link.canceled" | "invoice.created" | "invoice.voided" | "invoice.overdue" | "invoice.upcoming" | "payment_method.attached" | "payment_method.updated" | "payment_method.detached" | "customer.created" | "customer.updated" | "customer.state_changed" | "plan_grant.created" | "plan_grant.updated" | "plan_grant.expired" | "plan_grant.revoked" | "credits.granted" | "credits.purchased" | "credits.low" | "credits.depleted" | "credits.expired" | "balance.granted" | "balance.topped_up" | "balance.low" | "balance.depleted" | "balance.expired" | "quota.threshold_reached" | "quota.exceeded" | "seats.updated" | "seats.limit_reached" | "addon.activated" | "addon.deactivated" | "usage.recorded" | "payout.available" | "payout.created" | "payout.paid" | "payout.failed">;
|
|
5639
6437
|
description?: string;
|
|
5640
6438
|
apiVersion?: string;
|
|
5641
6439
|
}
|
|
@@ -5673,4 +6471,4 @@ declare function registerIntegration(name: string, version: string): void;
|
|
|
5673
6471
|
declare const API_VERSION = "2026-08-27";
|
|
5674
6472
|
declare const SDK_VERSION: string;
|
|
5675
6473
|
|
|
5676
|
-
export { API_VERSION, type ActivateAddonParams, type ActiveAddon, type AddPayoutBankAccountParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddQuotaParams, type AddSeatsParams, type AddedPlanToGroup, type Addon, type AddonActivatedData, type AddonDeactivatedData, type AdjustBalanceParams, type AdvanceTestClockParams, type ApiErrorDetail, type ApiKey, type ApplySubscriptionOfferParams, type BalanceAdjustment, type BalanceDepletedData, type BalanceExpiredData, type BalanceGrantedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSetSeatsParams, type BusinessTaxId, type CancelPaymentParams, type CancelSubscriptionParams, type ChangePlanParams, type ChargePaymentParams, type CheckUsageAvailabilityParams, type CheckoutReadyData, type ClaimLink, Commet, CommetAPIError, type CommetClientOptions, CommetError, type CommetErrorContext, CommetValidationError, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerCreditParams, type CreateCustomerParams, type CreateFeatureParams, type CreateMarketParams, type CreateOfferParams, type CreatePaymentParams, type CreatePlanGrantParams, type CreatePlanGroupParams, type CreatePlanParams, type CreatePrepaidPeriodsCheckoutParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookEndpointParams, type CreatedApiKey, type CreatedSubscription, type CreatedWebhook, type CreditGrant, type CreditPack, type CreditPackListItem, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerCredit, type CustomerCreditRevocation, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeleteMarketParams, type DeleteOfferParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookEndpointParams, type DeletedObject, type DeletedOffer, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DownloadInvoiceParams, type Feature, type FeatureAccess, type FeatureDef, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetMarketParams, type GetOfferParams, type GetPaymentParams, type GetPlanGroupParams, type GetPlanParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionAutoTopUpParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookEndpointParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceListItem, type InvoiceOverdueData, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomerCreditsParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListOffersParams, type ListPaymentsParams, type ListPlanGrantsParams, type ListPlanGroupsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhookEndpointsParams, type ManagedBy, type Market, type Offer, type PauseSubscriptionParams, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethod, type PaymentMethodAttachedData, type PaymentMethodDetachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentProvider, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type Plan, type PlanChange, type PlanDef, type PlanFeature, type PlanFeatureValue, type PlanGrant, type PlanGrantCreatedData, type PlanGrantExpiredData, type PlanGrantRevokedData, type PlanGrantUpdatedData, type PlanGroup, type PlanGroupDetail, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PortalAccess, type PrepaidPeriodsCheckout, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type Refund, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemoveSubscriptionOfferParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type ResumeSubscriptionParams, type RetryTransactionParams, type RevokeCustomerCreditParams, type RevokePlanGrantParams, type RevokeScheduledPlanChangeParams, type RevokeSubscriptionPauseParams, SDK_VERSION, type SeatBalance, type SeatBalanceCollection, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type SetUsageParams, type SubPaymentMethod, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionAutoTopUp, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionOfferApplication, type SubscriptionOfferApplicationPhase, type SubscriptionPastDueData, type SubscriptionPauseRevokedData, type SubscriptionPauseScheduledData, type SubscriptionPauseUpdatedData, type SubscriptionPausedData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionResume, type SubscriptionResumeFailedData, type SubscriptionResumedData, type SubscriptionStatus, type SubscriptionSummary, type SubscriptionUpdatedData, type TestClock, type TestClockRun, type TestWebhookEndpointParams, type Timezone, type TopupBalanceParams, type TrackUsageParams, type Transaction, type TransactionListItem, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdateMarketParams, type UpdateOfferParams, type UpdatePaymentMethodParams, type UpdatePlanFeatureParams, type UpdatePlanGrantParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateSubscriptionAutoTopUpParams, type UpdateSubscriptionPauseParams, type UpdateWebhookEndpointParams, type UpsertRegionalPricesParams, type UsageAdjustment, type UsageCheck, type UsageEvent, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type Webhook, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookPayload, type WebhookPlanGrantTimelineEvent, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTest, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|
|
6474
|
+
export { API_VERSION, type ActivateAddonParams, type ActiveAddon, type AddPayoutBankAccountParams, type AddPlanFeatureParams, type AddPlanPriceParams, type AddPlanToGroupParams, type AddQuotaParams, type AddSeatsParams, type AddedPlanToGroup, type Addon, type AddonActivatedData, type AddonDeactivatedData, type AdjustBalanceParams, type AdvanceTestClockParams, type ApiErrorDetail, type ApiKey, type ApplySubscriptionOfferParams, type ArchivePlanExperimentParams, type BalanceAdjustment, type BalanceDepletedData, type BalanceExpiredData, type BalanceGrantedData, type BalanceLowData, type BalanceToppedUpData, type BalanceTopup, type BatchCreateCustomersParams, type BillingConfig, type BillingInterval, type BulkSetSeatsParams, type BusinessTaxId, type CancelPaymentParams, type CancelPlanMoveParams, type CancelPlanMoveSubscriptionParams, type CancelSubscriptionParams, type ChangePlanParams, type ChangeSubscriptionVersionParams, type ChargePaymentParams, type CheckUsageAvailabilityParams, type CheckoutReadyData, type ClaimLink, Commet, CommetAPIError, type CommetClientOptions, CommetError, type CommetErrorContext, CommetValidationError, type ComparePlanVersionsParams, type ConsumptionModel, type CreateAddonParams, type CreateAdjustmentInvoiceParams, type CreateApiKeyParams, type CreateCreditPackParams, type CreateCustomerCreditParams, type CreateCustomerParams, type CreateFeatureParams, type CreateMarketParams, type CreateOfferParams, type CreatePaymentParams, type CreatePlanDraftParams, type CreatePlanExperimentParams, type CreatePlanExperimentVersionParams, type CreatePlanGrantParams, type CreatePlanGroupParams, type CreatePlanMoveParams, type CreatePlanParams, type CreatePlanVersionParams, type CreatePrepaidPeriodsCheckoutParams, type CreatePromoCodeParams, type CreateSubscriptionParams, type CreateSubscriptionRecoveryLinkParams, type CreateWebhookEndpointParams, type CreatedApiKey, type CreatedSubscription, type CreatedWebhook, type CreditGrant, type CreditPack, type CreditPackListItem, type CreditsDepletedData, type CreditsExpiredData, type CreditsGrantedData, type CreditsLowData, type CreditsPurchasedData, type Customer, type CustomerBatch, type CustomerCreatedData, type CustomerCredit, type CustomerCreditRevocation, type CustomerStateChangedData, type CustomerUpdatedData, type DeactivateAddonParams, type DeleteAddonParams, type DeleteApiKeyParams, type DeleteCreditPackParams, type DeleteFeatureParams, type DeleteMarketParams, type DeleteOfferParams, type DeletePlanDraftParams, type DeletePlanGroupParams, type DeletePlanParams, type DeletePlanPriceParams, type DeleteRegionalPricesParams, type DeleteWebhookEndpointParams, type DeletedObject, type DeletedOffer, type DeletedPlanRegionalPricing, type DeletedSubscriptionAddon, type DownloadInvoiceParams, type Feature, type FeatureAccess, type FeatureDef, type FeatureType, type GetActiveSubscriptionParams, type GetAddonParams, type GetAllQuotaAllowancesParams, type GetAllSeatBalancesParams, type GetCustomerParams, type GetFeatureAccessParams, type GetFeatureParams, type GetInvoiceParams, type GetMarketParams, type GetOfferParams, type GetPaymentParams, type GetPlanDraftParams, type GetPlanExperimentParams, type GetPlanGroupParams, type GetPlanMoveParams, type GetPlanParams, type GetPlanVersionParams, type GetPromoCodeParams, type GetQuotaAllowanceParams, type GetSeatBalanceParams, type GetSubscriptionAutoTopUpParams, type GetSubscriptionParams, type GetTransactionParams, type GetWebhookEndpointParams, type InferFeatureCodes, type InferPlanCodes, type InferSeatCodes, type InferUsageCodes, type Invoice, type InvoiceCreatedData, type InvoiceDownload, type InvoiceListItem, type InvoiceOverdueData, type InvoiceType, type InvoiceUpcomingData, type InvoiceVoidedData, type KeepPlanSubscriberOnVersionParams, type KeptOnVersion, type ListActiveAddonsParams, type ListAddonsParams, type ListApiKeysParams, type ListCustomerCreditsParams, type ListCustomersParams, type ListFeatureAccessParams, type ListInvoicesParams, type ListOffersParams, type ListPaymentsParams, type ListPlanDraftsParams, type ListPlanExperimentsParams, type ListPlanGrantsParams, type ListPlanGroupsParams, type ListPlanMovesParams, type ListPlanSubscribersNeedingAChangeParams, type ListPlanVersionsParams, type ListPlansParams, type ListPromoCodesParams, type ListSubscriptionsParams, type ListTransactionsParams, type ListWebhookEndpointsParams, type MakePlanExperimentCurrentParams, type ManagedBy, type Market, type Offer, type PauseSubscriptionParams, type Payment, type PaymentDisputeResolvedData, type PaymentDisputedData, type PaymentFailedData, type PaymentLinkCanceledData, type PaymentLinkCompletedData, type PaymentLinkCreatedData, type PaymentLinkFailedData, type PaymentMethod, type PaymentMethodAttachedData, type PaymentMethodDetachedData, type PaymentMethodUpdateCheckout, type PaymentMethodUpdatedData, type PaymentProvider, type PaymentReceivedData, type PaymentRecoveredData, type PaymentRefundedData, type PaymentRetryFailedData, type Payout, type PayoutAvailableData, type PayoutBankAccount, type PayoutCreatedData, type PayoutFailedData, type PayoutPaidData, type Plan, type PlanChange, type PlanDef, type PlanDraft, type PlanDraftPublication, type PlanExperiment, type PlanExperimentArchive, type PlanFeature, type PlanFeatureValue, type PlanGrant, type PlanGrantCreatedData, type PlanGrantExpiredData, type PlanGrantRevokedData, type PlanGrantUpdatedData, type PlanGroup, type PlanGroupDetail, type PlanMove, type PlanPrice, type PlanRegionalPricing, type PlanRegionalPricingResult, type PlanVersion, type PlanVersionComparison, type PortalAccess, type PrepaidPeriodsCheckout, type PreviewChange, type PreviewChangePlanParams, type PriceDef, type PromoCode, type PublishPlanDraftParams, type PurchaseCreditsParams, type QuotaExceededData, type QuotaThresholdReachedData, type ReactivateSubscriptionParams, type ReactivatedSubscription, type RecoveryLink, type Refund, type RefundTransactionParams, type RemovePlanFeatureParams, type RemovePlanFromGroupParams, type RemoveQuotaParams, type RemoveSeatsParams, type RemoveSubscriptionOfferParams, type RemovedPlanFeature, type RemovedPlanFromGroup, type ReorderPlansInGroupParams, type ReorderedPlans, type RequestOptions, type RequestPayoutParams, type RequestPortalAccessParams, type ResolvedFeatureCode, type ResolvedPlanCode, type ResolvedSeatCode, type ResolvedUsageCode, type ResumeSubscriptionParams, type RetryTransactionParams, type RevokeCustomerCreditParams, type RevokePlanGrantParams, type RevokeScheduledPlanChangeParams, type RevokeScheduledVersionChangeParams, type RevokeSubscriptionPauseParams, SDK_VERSION, type SeatBalance, type SeatBalanceCollection, type SeatEvent, type SeatsLimitReachedData, type SeatsUpdatedData, type SendInvoiceParams, type SentInvoice, type SetDefaultPlanPriceParams, type SetPlanRegionalPricingParams, type SetPlanVisibilityParams, type SetQuotaParams, type SetSeatsParams, type SetUsageParams, type SubPaymentMethod, type SubscriberNeedingAChange, type Subscription, type SubscriptionActivatedData, type SubscriptionAddon, type SubscriptionAutoTopUp, type SubscriptionCanceledData, type SubscriptionCancellationRevokedData, type SubscriptionCancellationScheduledData, type SubscriptionCreatedData, type SubscriptionOfferApplication, type SubscriptionOfferApplicationPhase, type SubscriptionPastDueData, type SubscriptionPauseRevokedData, type SubscriptionPauseScheduledData, type SubscriptionPauseUpdatedData, type SubscriptionPausedData, type SubscriptionPlanChangeRevokedData, type SubscriptionPlanChangeScheduledData, type SubscriptionPlanChangedData, type SubscriptionReactivatedData, type SubscriptionResume, type SubscriptionResumeFailedData, type SubscriptionResumedData, type SubscriptionStatus, type SubscriptionSummary, type SubscriptionUpdatedData, type SubscriptionVersionChangeCanceledData, type SubscriptionVersionChangedData, type TestClock, type TestClockRun, type TestWebhookEndpointParams, type Timezone, type TopupBalanceParams, type TrackUsageParams, type Transaction, type TransactionListItem, type TransactionRetry, type TransactionStatus, type TrialCheckoutReadyData, type TrialConvertedData, type TrialExpiredData, type TrialStartedData, type TrialWillEndData, type UncancelSubscriptionParams, type UpdateAddonParams, type UpdateCreditPackParams, type UpdateCustomerParams, type UpdateFeatureParams, type UpdateInvoiceStatusParams, type UpdateMarketParams, type UpdateOfferParams, type UpdatePaymentMethodParams, type UpdatePlanDraftParams, type UpdatePlanFeatureParams, type UpdatePlanGrantParams, type UpdatePlanGroupParams, type UpdatePlanParams, type UpdatePlanPriceParams, type UpdatePromoCodeParams, type UpdateSubscriptionAutoTopUpParams, type UpdateSubscriptionPauseParams, type UpdateWebhookEndpointParams, type UpsertRegionalPricesParams, type UsageAdjustment, type UsageCheck, type UsageEvent, type UsageQuota, type UsageQuotaEvent, type UsageRecordedData, type Webhook, type WebhookAddonRef, type WebhookBalance, type WebhookBankRef, type WebhookCardInfo, type WebhookCreditsBalance, type WebhookData, type WebhookEvent, type WebhookEventDataMap, type WebhookEventEnvelope, type WebhookEventHandler, type WebhookEventPayload, type WebhookPayload, type WebhookPlanGrantTimelineEvent, type WebhookPlanRef, type WebhookSeatSummary, type WebhookTest, Webhooks, createCommet, Commet as default, defineConfig, registerIntegration };
|