@commet/node 6.0.0 → 7.0.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/README.md +5 -5
- package/dist/index.d.mts +32 -11
- package/dist/index.d.ts +32 -11
- package/dist/index.js +28 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var AddonsResource = class {
|
|
|
5
5
|
}
|
|
6
6
|
/** List all active add-ons for a customer's subscription. */
|
|
7
7
|
async listActive(params, options) {
|
|
8
|
-
return this.httpClient.get("/addons
|
|
8
|
+
return this.httpClient.get("/active-addons", params, options);
|
|
9
9
|
}
|
|
10
10
|
/** List all add-ons with cursor-based pagination. */
|
|
11
11
|
async list(params, options) {
|
|
@@ -106,29 +106,45 @@ var CustomersResource = class {
|
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
// src/resources/
|
|
110
|
-
var
|
|
109
|
+
// src/resources/feature-access.ts
|
|
110
|
+
var FeatureAccessResource = class {
|
|
111
111
|
constructor(httpClient) {
|
|
112
112
|
this.httpClient = httpClient;
|
|
113
113
|
}
|
|
114
|
-
/** List all features for a customer's active subscription. */
|
|
114
|
+
/** List all features for a customer's active subscription, scoped by the customerId query parameter. */
|
|
115
115
|
async list(params, options) {
|
|
116
|
-
return this.httpClient.get("/
|
|
116
|
+
return this.httpClient.get("/feature-access", params, options);
|
|
117
117
|
}
|
|
118
|
-
/** Get feature access details. Use action=canUse to check if customer can consume one more unit. */
|
|
118
|
+
/** Get feature access details for a customer. Use action=canUse to check if the customer can consume one more unit. */
|
|
119
119
|
async get(params, options) {
|
|
120
120
|
const { code, ...rest } = params;
|
|
121
|
-
return this.httpClient.get(`/
|
|
121
|
+
return this.httpClient.get(`/feature-access/${code}`, rest, options);
|
|
122
122
|
}
|
|
123
|
-
/** Get feature access details. Use action=canUse to check if customer can consume one more unit. */
|
|
123
|
+
/** Get feature access details for a customer. Use action=canUse to check if the customer can consume one more unit. */
|
|
124
124
|
async canUse(params, options) {
|
|
125
125
|
const { code, ...rest } = params;
|
|
126
126
|
return this.httpClient.get(
|
|
127
|
-
`/
|
|
127
|
+
`/feature-access/${code}`,
|
|
128
128
|
{ ...rest, action: "canUse" },
|
|
129
129
|
options
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
// src/resources/features.ts
|
|
135
|
+
var FeaturesResource = class {
|
|
136
|
+
constructor(httpClient) {
|
|
137
|
+
this.httpClient = httpClient;
|
|
138
|
+
}
|
|
139
|
+
/** List every feature defined in the organization. This is the organization's feature catalog (definitions), not a customer's feature access. */
|
|
140
|
+
async list() {
|
|
141
|
+
return this.httpClient.get("/features");
|
|
142
|
+
}
|
|
143
|
+
/** Get a single feature definition by code from the organization's feature catalog. */
|
|
144
|
+
async get(params, options) {
|
|
145
|
+
const { code } = params;
|
|
146
|
+
return this.httpClient.get(`/features/${code}`, void 0, options);
|
|
147
|
+
}
|
|
132
148
|
/** Create a new feature. Code must be lowercase alphanumeric with underscores. */
|
|
133
149
|
async create(params, options) {
|
|
134
150
|
return this.httpClient.post("/features/manage", params, options);
|
|
@@ -600,6 +616,7 @@ var GeneratedResources = class {
|
|
|
600
616
|
this.apiKeys = new ApiKeysResource(http);
|
|
601
617
|
this.creditPacks = new CreditPacksResource(http);
|
|
602
618
|
this.customers = new CustomersResource(http);
|
|
619
|
+
this.featureAccess = new FeatureAccessResource(http);
|
|
603
620
|
this.features = new FeaturesResource(http);
|
|
604
621
|
this.invoices = new InvoicesResource(http);
|
|
605
622
|
this.payouts = new PayoutsResource(http);
|
|
@@ -746,8 +763,8 @@ var CommetValidationError = class extends CommetError {
|
|
|
746
763
|
};
|
|
747
764
|
|
|
748
765
|
// src/version.ts
|
|
749
|
-
var API_VERSION = "2026-06-
|
|
750
|
-
var SDK_VERSION = "
|
|
766
|
+
var API_VERSION = "2026-06-10";
|
|
767
|
+
var SDK_VERSION = "7.0.0";
|
|
751
768
|
|
|
752
769
|
// src/utils/telemetry.ts
|
|
753
770
|
var registeredIntegrations = /* @__PURE__ */ new Set();
|