@commet/node 9.11.0 → 9.12.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 +53 -34
- package/dist/index.d.ts +53 -34
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/docs/api-reference/features.md +1 -1
- package/docs/api-reference/subscriptions.md +8 -5
- package/docs/documentation/error-handling.md +11 -0
- package/docs/documentation/plans/add-ons.md +2 -0
- package/docs/documentation/plans/balance-and-top-ups.md +2 -0
- package/docs/documentation/plans/consumption-models.md +9 -1
- package/docs/documentation/plans/credit-packs.md +24 -6
- package/docs/documentation/sales/promotional-offers.md +1 -1
- package/docs/documentation/subscriptions/plan-grants.md +22 -6
- package/docs/knowledge-base/how-do-discounts-work.md +19 -1
- package/docs/schemas.md +11 -5
- package/docs/webhooks.md +14 -14
- package/docs/webhooks.openapi.json +63 -37
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -188,7 +188,7 @@ var FeaturesResource = class {
|
|
|
188
188
|
const { code, ...rest } = params;
|
|
189
189
|
return this.httpClient.patch(`/features/${code}`, rest, options);
|
|
190
190
|
}
|
|
191
|
-
/** Delete a feature. Fails
|
|
191
|
+
/** Delete a feature. Fails while a plan's current version, a running experiment or a draft includes it, or while it has an active add-on. Subscribers whose plan version includes it keep it, and its code can be used by a new feature right away. */
|
|
192
192
|
async delete(params, options) {
|
|
193
193
|
const { code } = params;
|
|
194
194
|
return this.httpClient.delete(`/features/${code}`, void 0, options);
|
|
@@ -812,7 +812,7 @@ var SubscriptionsResource = class {
|
|
|
812
812
|
options
|
|
813
813
|
);
|
|
814
814
|
}
|
|
815
|
-
/** Activate an add-on on a subscription. Creates the activation invoice and charges a prorated amount for the current billing period; the add-on is active once the payment is confirmed. Rejected with 409 while the add-on is active or an activation of it is still processing. An add-on that the subscription's plan version does not sell is rejected with addon_unavailable. */
|
|
815
|
+
/** Activate an add-on on a subscription. Creates the activation invoice and charges a prorated amount for the current billing period; the add-on is active once the payment is confirmed. Without a saved payment method, send successUrl to receive a checkout that charges the activation and saves the method. Rejected with 409 while the add-on is active or an activation of it is still processing. An add-on that the subscription's plan version does not sell is rejected with addon_unavailable. */
|
|
816
816
|
async activateAddon(params, options) {
|
|
817
817
|
const { id, ...rest } = params;
|
|
818
818
|
return this.httpClient.post(`/subscriptions/${id}/addons`, rest, options);
|
|
@@ -844,7 +844,7 @@ var SubscriptionsResource = class {
|
|
|
844
844
|
options
|
|
845
845
|
);
|
|
846
846
|
}
|
|
847
|
-
/** Top up a balance subscription. Creates the top-up invoice and charges the customer's payment method for the amount plus tax. Once the payment is confirmed, adds the amount to the subscription's purchased balance (after paying back any overage owed on the plan balance), marks the invoice paid and emits `balance.topped_up`. Purchased balance is spent after the plan balance and is kept until the subscription ends. Rejected with 400 when the subscription is not on a balance plan, its plan has top-ups turned off, or the amount is below the effective minimum: the plan's minimum top-up in the subscription currency, raised to the currency's minimum charge. */
|
|
847
|
+
/** Top up a balance subscription. Creates the top-up invoice and charges the customer's payment method for the amount plus tax. Once the payment is confirmed, adds the amount to the subscription's purchased balance (after paying back any overage owed on the plan balance), marks the invoice paid and emits `balance.topped_up`. Purchased balance is spent after the plan balance and is kept until the subscription ends. Without a saved payment method, send successUrl to receive a checkout that charges the top-up and saves the method. Rejected with 400 when the subscription is not on a balance plan, its plan has top-ups turned off, or the amount is below the effective minimum: the plan's minimum top-up in the subscription currency, raised to the currency's minimum charge. */
|
|
848
848
|
async topupBalance(params, options) {
|
|
849
849
|
const { id, ...rest } = params;
|
|
850
850
|
return this.httpClient.post(
|
|
@@ -876,7 +876,7 @@ var SubscriptionsResource = class {
|
|
|
876
876
|
options
|
|
877
877
|
);
|
|
878
878
|
}
|
|
879
|
-
/** Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum. Creates the purchase invoice, charges the saved payment method and adds the purchased credits once the payment is confirmed. A credit pack that the subscription's plan version does not sell is rejected with credit_pack_unavailable. */
|
|
879
|
+
/** Purchase a fixed credit pack or choose a whole credit quantity at the subscription plan price and minimum. Creates the purchase invoice, charges the saved payment method and adds the purchased credits once the payment is confirmed. Without a saved payment method, send successUrl to receive a checkout that charges the purchase and saves the method. A credit pack that the subscription's plan version does not sell is rejected with credit_pack_unavailable. */
|
|
880
880
|
async purchaseCredits(params, options) {
|
|
881
881
|
const { id, ...rest } = params;
|
|
882
882
|
return this.httpClient.post(`/subscriptions/${id}/credits`, rest, options);
|
|
@@ -941,7 +941,7 @@ var SubscriptionsResource = class {
|
|
|
941
941
|
options
|
|
942
942
|
);
|
|
943
943
|
}
|
|
944
|
-
/** Reactivates a subscription. A past_due subscription retries its outstanding renewal charge (recovering to active on success). A canceled subscription generates a fresh invoice, charges the saved card, and resets the billing period. On a successful charge the subscription becomes active; a declined charge returns an error with a recoveryUrl in the error details that can be sent to the customer to update their card. A canceled subscription may apply an Offer by offerId; past-due recovery cannot. */
|
|
944
|
+
/** Reactivates a subscription. A past_due subscription retries its outstanding renewal charge (recovering to active on success). A canceled subscription generates a fresh invoice, charges the saved card, and resets the billing period; when that invoice totals zero, for example under an Offer, it is marked paid without a charge and the subscription becomes active at once, still requiring a saved payment method. On a successful charge the subscription becomes active; a declined charge returns an error with a recoveryUrl in the error details that can be sent to the customer to update their card. A canceled subscription may apply an Offer by offerId; past-due recovery cannot. */
|
|
945
945
|
async reactivate(params, options) {
|
|
946
946
|
const { id, ...rest } = params;
|
|
947
947
|
return this.httpClient.post(
|
|
@@ -1247,7 +1247,7 @@ var CommetValidationError = class extends CommetAPIError {
|
|
|
1247
1247
|
|
|
1248
1248
|
// src/version.ts
|
|
1249
1249
|
var API_VERSION = "2026-08-27";
|
|
1250
|
-
var SDK_VERSION = "9.
|
|
1250
|
+
var SDK_VERSION = "9.12.0";
|
|
1251
1251
|
|
|
1252
1252
|
// src/utils/telemetry.ts
|
|
1253
1253
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|