@commet/node 7.8.0 → 7.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 +59 -11
- package/dist/index.d.ts +59 -11
- package/dist/index.js +23 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -394,7 +394,7 @@ var PlansResource = class {
|
|
|
394
394
|
options
|
|
395
395
|
);
|
|
396
396
|
}
|
|
397
|
-
/** Configure a plan's regional pricing for one currency. Sending only currency and exchangeRate derives every regional value (base price, included balance, feature overage, intro offer) from the USD value
|
|
397
|
+
/** Configure a plan's regional pricing for one currency. USD configures the United States variant; exchangeRate acts as its price multiplier. Sending only currency and exchangeRate derives every regional value (base price, included balance, feature overage, intro offer) from the default USD value. Optional per-price and per-feature overrides are stored as manual values. */
|
|
398
398
|
async setRegionalPricing(params, options) {
|
|
399
399
|
const { id, ...rest } = params;
|
|
400
400
|
return this.httpClient.put(`/plans/${id}/regional`, rest, options);
|
|
@@ -436,20 +436,31 @@ var PromoCodesResource = class {
|
|
|
436
436
|
return this.httpClient.get(`/promo-codes/${id}`, void 0, options);
|
|
437
437
|
}
|
|
438
438
|
/**
|
|
439
|
-
* Create a new promo code. Optionally restrict to specific plans.
|
|
439
|
+
* Create a new promo code. Optionally restrict it to specific plans and a billing interval.
|
|
440
440
|
*
|
|
441
441
|
* **100% discounts are not supported.** Percentage codes must be strictly less than 100% (`discountValue` < 10000 basis points). For full waivers, use an introductory offer on the plan instead. At checkout, any code — percentage or fixed amount — that would reduce the total below the currency's minimum charge ($0.50 USD equivalent) is silently dropped.
|
|
442
442
|
*/
|
|
443
443
|
async create(params, options) {
|
|
444
444
|
return this.httpClient.post("/promo-codes", params, options);
|
|
445
445
|
}
|
|
446
|
-
/** Update a promo code's redemption limits, expiration, active status, or plan restrictions. */
|
|
446
|
+
/** Update a promo code's billing interval, redemption limits, expiration, active status, or plan restrictions. */
|
|
447
447
|
async update(params, options) {
|
|
448
448
|
const { id, ...rest } = params;
|
|
449
449
|
return this.httpClient.put(`/promo-codes/${id}`, rest, options);
|
|
450
450
|
}
|
|
451
451
|
};
|
|
452
452
|
|
|
453
|
+
// src/resources/provisioning.ts
|
|
454
|
+
var ProvisioningResource = class {
|
|
455
|
+
constructor(httpClient) {
|
|
456
|
+
this.httpClient = httpClient;
|
|
457
|
+
}
|
|
458
|
+
/** Issue a fresh claim link for an organization that was provisioned headlessly and has not been claimed yet. Any previously issued link stops working. */
|
|
459
|
+
async createClaimLink(options) {
|
|
460
|
+
return this.httpClient.post("/claim-link", {}, options);
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
|
|
453
464
|
// src/resources/quota.ts
|
|
454
465
|
var QuotaResource = class {
|
|
455
466
|
constructor(httpClient) {
|
|
@@ -633,9 +644,9 @@ var TestClockResource = class {
|
|
|
633
644
|
async advance(params, options) {
|
|
634
645
|
return this.httpClient.post("/test-clock", params, options);
|
|
635
646
|
}
|
|
636
|
-
/** Discovers customers due for billing at the org's current (simulated) time and enqueues a billing cycle for each — renewals, expired trials, pending cancellations. Enqueueing is asynchronous. Sandbox only. */
|
|
637
|
-
async processBilling() {
|
|
638
|
-
return this.httpClient.post("/test-clock/process-billing", {});
|
|
647
|
+
/** Discovers customers due for billing at the org's current (simulated) time and enqueues a billing cycle for each — renewals, expired trials, pending cancellations. Also fires any dunning retry whose scheduled time has passed. Enqueueing is asynchronous. Sandbox only. */
|
|
648
|
+
async processBilling(options) {
|
|
649
|
+
return this.httpClient.post("/test-clock/process-billing", {}, options);
|
|
639
650
|
}
|
|
640
651
|
};
|
|
641
652
|
|
|
@@ -681,6 +692,7 @@ var GeneratedResources = class {
|
|
|
681
692
|
this.plans = new PlansResource(http);
|
|
682
693
|
this.portal = new PortalResource(http);
|
|
683
694
|
this.promoCodes = new PromoCodesResource(http);
|
|
695
|
+
this.provisioning = new ProvisioningResource(http);
|
|
684
696
|
this.quota = new QuotaResource(http);
|
|
685
697
|
this.seats = new SeatsResource(http);
|
|
686
698
|
this.subscriptions = new SubscriptionsResource(http);
|
|
@@ -725,6 +737,10 @@ var UsageResource = class {
|
|
|
725
737
|
async check(params, options) {
|
|
726
738
|
return this.httpClient.post("/usage/check", params, options);
|
|
727
739
|
}
|
|
740
|
+
/** Set a metered feature's usage to an exact value for the current period. */
|
|
741
|
+
async set(params, options) {
|
|
742
|
+
return this.httpClient.put("/usage", params, options);
|
|
743
|
+
}
|
|
728
744
|
};
|
|
729
745
|
|
|
730
746
|
// src/resources/webhooks.ts
|
|
@@ -834,7 +850,7 @@ var CommetValidationError = class extends CommetError {
|
|
|
834
850
|
|
|
835
851
|
// src/version.ts
|
|
836
852
|
var API_VERSION = "2026-07-11";
|
|
837
|
-
var SDK_VERSION = "7.
|
|
853
|
+
var SDK_VERSION = "7.10.0";
|
|
838
854
|
|
|
839
855
|
// src/utils/telemetry.ts
|
|
840
856
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|