@commet/node 9.2.0 → 9.3.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 +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/docs/api-reference/customers.md +1 -1
- package/docs/api-reference/plans.md +3 -3
- package/docs/api-reference/subscriptions.md +1 -1
- package/docs/documentation/sales/promotional-offers.md +18 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2163,7 +2163,7 @@ interface CreateCustomerCreditParams {
|
|
|
2163
2163
|
id: string;
|
|
2164
2164
|
/** Amount in the currency's smallest unit. */
|
|
2165
2165
|
amount: number;
|
|
2166
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2166
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2167
2167
|
reason: string;
|
|
2168
2168
|
expiresAt?: string | null;
|
|
2169
2169
|
}
|
|
@@ -2768,7 +2768,7 @@ interface UpdatePlanPriceParams {
|
|
|
2768
2768
|
metadata?: Record<string, unknown>;
|
|
2769
2769
|
marketPrices?: Array<{
|
|
2770
2770
|
marketGroupId: string;
|
|
2771
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2771
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2772
2772
|
price: number;
|
|
2773
2773
|
}>;
|
|
2774
2774
|
}
|
|
@@ -2789,7 +2789,7 @@ type AddPlanPriceParams = {
|
|
|
2789
2789
|
/** Public ID of a reusable pricing market group. */
|
|
2790
2790
|
marketGroupId: string;
|
|
2791
2791
|
/** Presentment currency configured for this plan and market. */
|
|
2792
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2792
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2793
2793
|
/** Market price in the currency's minor unit. */
|
|
2794
2794
|
price: number;
|
|
2795
2795
|
}>;
|
|
@@ -2802,14 +2802,14 @@ type AddPlanPriceParams = {
|
|
|
2802
2802
|
/** Public ID of a reusable pricing market group. */
|
|
2803
2803
|
marketGroupId: string;
|
|
2804
2804
|
/** Presentment currency configured for this plan and market. */
|
|
2805
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2805
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2806
2806
|
/** Market price in the currency's minor unit. */
|
|
2807
2807
|
price: number;
|
|
2808
2808
|
}>;
|
|
2809
2809
|
};
|
|
2810
2810
|
interface SetPlanRegionalPricingParams {
|
|
2811
2811
|
id: string;
|
|
2812
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2812
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2813
2813
|
exchangeRate: number;
|
|
2814
2814
|
prices?: Array<{
|
|
2815
2815
|
priceId: string;
|
|
@@ -3256,7 +3256,7 @@ declare class SubscriptionsResource {
|
|
|
3256
3256
|
changePlan(params: ChangePlanParams, options?: RequestOptions): Promise<PlanChange>;
|
|
3257
3257
|
/** Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance. */
|
|
3258
3258
|
purchaseCredits(params: PurchaseCreditsParams, options?: RequestOptions): Promise<CreditGrant>;
|
|
3259
|
-
/** Apply
|
|
3259
|
+
/** Apply a direct Offer to a subscription. On a pending payment checkout it quotes or replaces the checkout discount 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. Offers with a free trial phase cannot be applied after checkout creation. */
|
|
3260
3260
|
applyOffer(params: ApplySubscriptionOfferParams, options?: RequestOptions): Promise<Subscription>;
|
|
3261
3261
|
/** Remove the quoted direct Offer from a subscription's pending payment checkout. The existing checkout URL remains unchanged and returns to its undiscounted price. */
|
|
3262
3262
|
removeOffer(params: RemoveSubscriptionOfferParams, options?: RequestOptions): Promise<Subscription>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2163,7 +2163,7 @@ interface CreateCustomerCreditParams {
|
|
|
2163
2163
|
id: string;
|
|
2164
2164
|
/** Amount in the currency's smallest unit. */
|
|
2165
2165
|
amount: number;
|
|
2166
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2166
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2167
2167
|
reason: string;
|
|
2168
2168
|
expiresAt?: string | null;
|
|
2169
2169
|
}
|
|
@@ -2768,7 +2768,7 @@ interface UpdatePlanPriceParams {
|
|
|
2768
2768
|
metadata?: Record<string, unknown>;
|
|
2769
2769
|
marketPrices?: Array<{
|
|
2770
2770
|
marketGroupId: string;
|
|
2771
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2771
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2772
2772
|
price: number;
|
|
2773
2773
|
}>;
|
|
2774
2774
|
}
|
|
@@ -2789,7 +2789,7 @@ type AddPlanPriceParams = {
|
|
|
2789
2789
|
/** Public ID of a reusable pricing market group. */
|
|
2790
2790
|
marketGroupId: string;
|
|
2791
2791
|
/** Presentment currency configured for this plan and market. */
|
|
2792
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2792
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2793
2793
|
/** Market price in the currency's minor unit. */
|
|
2794
2794
|
price: number;
|
|
2795
2795
|
}>;
|
|
@@ -2802,14 +2802,14 @@ type AddPlanPriceParams = {
|
|
|
2802
2802
|
/** Public ID of a reusable pricing market group. */
|
|
2803
2803
|
marketGroupId: string;
|
|
2804
2804
|
/** Presentment currency configured for this plan and market. */
|
|
2805
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2805
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2806
2806
|
/** Market price in the currency's minor unit. */
|
|
2807
2807
|
price: number;
|
|
2808
2808
|
}>;
|
|
2809
2809
|
};
|
|
2810
2810
|
interface SetPlanRegionalPricingParams {
|
|
2811
2811
|
id: string;
|
|
2812
|
-
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2812
|
+
currency: "usd" | "ars" | "brl" | "clp" | "cop" | "pen" | "uyu" | "pyg" | "bob" | "mxn" | "cad" | "eur" | "gbp" | "jpy" | "cny" | "krw" | "hkd" | "sgd" | "twd" | "inr" | "thb";
|
|
2813
2813
|
exchangeRate: number;
|
|
2814
2814
|
prices?: Array<{
|
|
2815
2815
|
priceId: string;
|
|
@@ -3256,7 +3256,7 @@ declare class SubscriptionsResource {
|
|
|
3256
3256
|
changePlan(params: ChangePlanParams, options?: RequestOptions): Promise<PlanChange>;
|
|
3257
3257
|
/** Purchase a credit pack for a subscription. Charges the customer and adds credits to their balance. */
|
|
3258
3258
|
purchaseCredits(params: PurchaseCreditsParams, options?: RequestOptions): Promise<CreditGrant>;
|
|
3259
|
-
/** Apply
|
|
3259
|
+
/** Apply a direct Offer to a subscription. On a pending payment checkout it quotes or replaces the checkout discount 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. Offers with a free trial phase cannot be applied after checkout creation. */
|
|
3260
3260
|
applyOffer(params: ApplySubscriptionOfferParams, options?: RequestOptions): Promise<Subscription>;
|
|
3261
3261
|
/** Remove the quoted direct Offer from a subscription's pending payment checkout. The existing checkout URL remains unchanged and returns to its undiscounted price. */
|
|
3262
3262
|
removeOffer(params: RemoveSubscriptionOfferParams, options?: RequestOptions): Promise<Subscription>;
|
package/dist/index.js
CHANGED
|
@@ -722,7 +722,7 @@ var SubscriptionsResource = class {
|
|
|
722
722
|
const { id, ...rest } = params;
|
|
723
723
|
return this.httpClient.post(`/subscriptions/${id}/credits`, rest, options);
|
|
724
724
|
}
|
|
725
|
-
/** Apply
|
|
725
|
+
/** Apply a direct Offer to a subscription. On a pending payment checkout it quotes or replaces the checkout discount 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. Offers with a free trial phase cannot be applied after checkout creation. */
|
|
726
726
|
async applyOffer(params, options) {
|
|
727
727
|
const { id, ...rest } = params;
|
|
728
728
|
return this.httpClient.put(`/subscriptions/${id}/offer`, rest, options);
|
|
@@ -1037,7 +1037,7 @@ var CommetValidationError = class extends CommetAPIError {
|
|
|
1037
1037
|
|
|
1038
1038
|
// src/version.ts
|
|
1039
1039
|
var API_VERSION = "2026-07-31";
|
|
1040
|
-
var SDK_VERSION = "9.
|
|
1040
|
+
var SDK_VERSION = "9.3.0";
|
|
1041
1041
|
|
|
1042
1042
|
// src/utils/telemetry.ts
|
|
1043
1043
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|