@commet/node 9.1.0 → 9.1.1
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 +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/docs/api-reference/customers.md +7 -7
- package/docs/documentation/choose-a-billing-model.md +2 -2
- package/docs/documentation/subscriptions/manage-subscriptions.md +2 -2
- package/docs/documentation/subscriptions/plan-grants.md +53 -61
- package/docs/documentation/subscriptions/upgrade-and-downgrade-plans.md +3 -1
- package/docs/knowledge-base/how-do-credits-credit-packs-and-customer-credits-differ.md +2 -2
- package/docs/schemas.md +3 -3
- package/docs/webhooks/customer-state-changed.md +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -674,7 +674,7 @@ interface Invoice {
|
|
|
674
674
|
poNumber: string | null;
|
|
675
675
|
reference: string | null;
|
|
676
676
|
lineItems: Array<{
|
|
677
|
-
lineType: "plan_base" | "feature_overage" | "feature_seats" | "feature_quota" | "discount" | "promo_code_discount" | "
|
|
677
|
+
lineType: "plan_base" | "feature_overage" | "feature_seats" | "feature_quota" | "discount" | "promo_code_discount" | "credit" | "balance_overage" | "addon_base" | "one_time";
|
|
678
678
|
featureName: string | null;
|
|
679
679
|
description: string;
|
|
680
680
|
quantity: number;
|
|
@@ -1095,9 +1095,9 @@ interface PlanGrant {
|
|
|
1095
1095
|
id: string;
|
|
1096
1096
|
customerId: string;
|
|
1097
1097
|
subscriptionId: string;
|
|
1098
|
+
basePlanId: string;
|
|
1098
1099
|
planId: string;
|
|
1099
|
-
|
|
1100
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
1100
|
+
planReleaseId: string;
|
|
1101
1101
|
status: "active" | "expired" | "revoked";
|
|
1102
1102
|
duration: "cycles" | "until_date" | "until_revoked";
|
|
1103
1103
|
durationCycles: number | null;
|
|
@@ -2121,23 +2121,23 @@ interface ListPlanGrantsParams {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
type CreatePlanGrantParams = {
|
|
2123
2123
|
id: string;
|
|
2124
|
+
subscriptionId: string;
|
|
2124
2125
|
planId: string;
|
|
2125
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
2126
2126
|
reason: string;
|
|
2127
2127
|
duration: "cycles";
|
|
2128
2128
|
durationCycles: number;
|
|
2129
2129
|
} | {
|
|
2130
2130
|
id: string;
|
|
2131
|
+
subscriptionId: string;
|
|
2131
2132
|
planId: string;
|
|
2132
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
2133
2133
|
reason: string;
|
|
2134
2134
|
duration: "until_date";
|
|
2135
2135
|
/** @format date-time */
|
|
2136
2136
|
expiresAt: string;
|
|
2137
2137
|
} | {
|
|
2138
2138
|
id: string;
|
|
2139
|
+
subscriptionId: string;
|
|
2139
2140
|
planId: string;
|
|
2140
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
2141
2141
|
reason: string;
|
|
2142
2142
|
duration: "until_revoked";
|
|
2143
2143
|
};
|
|
@@ -2220,9 +2220,9 @@ declare class CustomersResource {
|
|
|
2220
2220
|
}>;
|
|
2221
2221
|
/** Grant monetary credit in one currency. Credit is applied FIFO before tax to eligible recurring invoices. */
|
|
2222
2222
|
createCredit(params: CreateCustomerCreditParams, options?: RequestOptions): Promise<CustomerCredit>;
|
|
2223
|
-
/** End
|
|
2223
|
+
/** End expanded access immediately and restore the base plan's limits. The subscription, billing cycle, invoices, and payment state remain unchanged. */
|
|
2224
2224
|
revokePlanGrant(params: RevokePlanGrantParams, options?: RequestOptions): Promise<PlanGrant>;
|
|
2225
|
-
/**
|
|
2225
|
+
/** Keep the overlay for a number of the subscription's existing billing cycles, set an exact deadline, or leave it active until revoked. The billing anchor is never reset. */
|
|
2226
2226
|
updatePlanGrant(params: UpdatePlanGrantParams, options?: RequestOptions): Promise<PlanGrant>;
|
|
2227
2227
|
/** List the independent audit timeline for paid-plan access granted without checkout or payment credentials. */
|
|
2228
2228
|
listPlanGrants(params: ListPlanGrantsParams, options?: RequestOptions): Promise<{
|
|
@@ -2231,7 +2231,7 @@ declare class CustomersResource {
|
|
|
2231
2231
|
hasMore: boolean;
|
|
2232
2232
|
nextCursor?: string;
|
|
2233
2233
|
}>;
|
|
2234
|
-
/**
|
|
2234
|
+
/** Temporarily expand an active subscription's feature access using a higher plan in the same plan group. Billing, prices, periods, invoices, and the base subscription remain unchanged. */
|
|
2235
2235
|
createPlanGrant(params: CreatePlanGrantParams, options?: RequestOptions): Promise<PlanGrant>;
|
|
2236
2236
|
/** Retrieve a customer by their public ID, including subscription status and metadata. */
|
|
2237
2237
|
get(params: GetCustomerParams, options?: RequestOptions): Promise<Customer>;
|
package/dist/index.d.ts
CHANGED
|
@@ -674,7 +674,7 @@ interface Invoice {
|
|
|
674
674
|
poNumber: string | null;
|
|
675
675
|
reference: string | null;
|
|
676
676
|
lineItems: Array<{
|
|
677
|
-
lineType: "plan_base" | "feature_overage" | "feature_seats" | "feature_quota" | "discount" | "promo_code_discount" | "
|
|
677
|
+
lineType: "plan_base" | "feature_overage" | "feature_seats" | "feature_quota" | "discount" | "promo_code_discount" | "credit" | "balance_overage" | "addon_base" | "one_time";
|
|
678
678
|
featureName: string | null;
|
|
679
679
|
description: string;
|
|
680
680
|
quantity: number;
|
|
@@ -1095,9 +1095,9 @@ interface PlanGrant {
|
|
|
1095
1095
|
id: string;
|
|
1096
1096
|
customerId: string;
|
|
1097
1097
|
subscriptionId: string;
|
|
1098
|
+
basePlanId: string;
|
|
1098
1099
|
planId: string;
|
|
1099
|
-
|
|
1100
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
1100
|
+
planReleaseId: string;
|
|
1101
1101
|
status: "active" | "expired" | "revoked";
|
|
1102
1102
|
duration: "cycles" | "until_date" | "until_revoked";
|
|
1103
1103
|
durationCycles: number | null;
|
|
@@ -2121,23 +2121,23 @@ interface ListPlanGrantsParams {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
type CreatePlanGrantParams = {
|
|
2123
2123
|
id: string;
|
|
2124
|
+
subscriptionId: string;
|
|
2124
2125
|
planId: string;
|
|
2125
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
2126
2126
|
reason: string;
|
|
2127
2127
|
duration: "cycles";
|
|
2128
2128
|
durationCycles: number;
|
|
2129
2129
|
} | {
|
|
2130
2130
|
id: string;
|
|
2131
|
+
subscriptionId: string;
|
|
2131
2132
|
planId: string;
|
|
2132
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
2133
2133
|
reason: string;
|
|
2134
2134
|
duration: "until_date";
|
|
2135
2135
|
/** @format date-time */
|
|
2136
2136
|
expiresAt: string;
|
|
2137
2137
|
} | {
|
|
2138
2138
|
id: string;
|
|
2139
|
+
subscriptionId: string;
|
|
2139
2140
|
planId: string;
|
|
2140
|
-
billingInterval: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
2141
2141
|
reason: string;
|
|
2142
2142
|
duration: "until_revoked";
|
|
2143
2143
|
};
|
|
@@ -2220,9 +2220,9 @@ declare class CustomersResource {
|
|
|
2220
2220
|
}>;
|
|
2221
2221
|
/** Grant monetary credit in one currency. Credit is applied FIFO before tax to eligible recurring invoices. */
|
|
2222
2222
|
createCredit(params: CreateCustomerCreditParams, options?: RequestOptions): Promise<CustomerCredit>;
|
|
2223
|
-
/** End
|
|
2223
|
+
/** End expanded access immediately and restore the base plan's limits. The subscription, billing cycle, invoices, and payment state remain unchanged. */
|
|
2224
2224
|
revokePlanGrant(params: RevokePlanGrantParams, options?: RequestOptions): Promise<PlanGrant>;
|
|
2225
|
-
/**
|
|
2225
|
+
/** Keep the overlay for a number of the subscription's existing billing cycles, set an exact deadline, or leave it active until revoked. The billing anchor is never reset. */
|
|
2226
2226
|
updatePlanGrant(params: UpdatePlanGrantParams, options?: RequestOptions): Promise<PlanGrant>;
|
|
2227
2227
|
/** List the independent audit timeline for paid-plan access granted without checkout or payment credentials. */
|
|
2228
2228
|
listPlanGrants(params: ListPlanGrantsParams, options?: RequestOptions): Promise<{
|
|
@@ -2231,7 +2231,7 @@ declare class CustomersResource {
|
|
|
2231
2231
|
hasMore: boolean;
|
|
2232
2232
|
nextCursor?: string;
|
|
2233
2233
|
}>;
|
|
2234
|
-
/**
|
|
2234
|
+
/** Temporarily expand an active subscription's feature access using a higher plan in the same plan group. Billing, prices, periods, invoices, and the base subscription remain unchanged. */
|
|
2235
2235
|
createPlanGrant(params: CreatePlanGrantParams, options?: RequestOptions): Promise<PlanGrant>;
|
|
2236
2236
|
/** Retrieve a customer by their public ID, including subscription status and metadata. */
|
|
2237
2237
|
get(params: GetCustomerParams, options?: RequestOptions): Promise<Customer>;
|
package/dist/index.js
CHANGED
|
@@ -147,7 +147,7 @@ var CustomersResource = class {
|
|
|
147
147
|
const { id, ...rest } = params;
|
|
148
148
|
return this.httpClient.post(`/customers/${id}/credits`, rest, options);
|
|
149
149
|
}
|
|
150
|
-
/** End
|
|
150
|
+
/** End expanded access immediately and restore the base plan's limits. The subscription, billing cycle, invoices, and payment state remain unchanged. */
|
|
151
151
|
async revokePlanGrant(params, options) {
|
|
152
152
|
const { id, grantId, ...rest } = params;
|
|
153
153
|
return this.httpClient.post(
|
|
@@ -156,7 +156,7 @@ var CustomersResource = class {
|
|
|
156
156
|
options
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
|
-
/**
|
|
159
|
+
/** Keep the overlay for a number of the subscription's existing billing cycles, set an exact deadline, or leave it active until revoked. The billing anchor is never reset. */
|
|
160
160
|
async updatePlanGrant(params, options) {
|
|
161
161
|
const { id, grantId, ...rest } = params;
|
|
162
162
|
return this.httpClient.patch(
|
|
@@ -174,7 +174,7 @@ var CustomersResource = class {
|
|
|
174
174
|
options
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
|
-
/**
|
|
177
|
+
/** Temporarily expand an active subscription's feature access using a higher plan in the same plan group. Billing, prices, periods, invoices, and the base subscription remain unchanged. */
|
|
178
178
|
async createPlanGrant(params, options) {
|
|
179
179
|
const { id, ...rest } = params;
|
|
180
180
|
return this.httpClient.post(`/customers/${id}/plan-grants`, 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.1.
|
|
1040
|
+
var SDK_VERSION = "9.1.1";
|
|
1041
1041
|
|
|
1042
1042
|
// src/utils/telemetry.ts
|
|
1043
1043
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|