@openmeter/client 1.0.0-beta.228 → 1.0.0-beta.229

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 CHANGED
@@ -113,165 +113,165 @@ The full call path, HTTP route, and a short description are listed below.
113
113
 
114
114
  ### Events
115
115
 
116
- | Method | HTTP | Description |
117
- | --- | --- | --- |
118
- | `client.events.list` | `GET /openmeter/events` | List ingested events. |
116
+ | Method | HTTP | Description |
117
+ | ---------------------- | ------------------------ | ---------------------------------------------------------------------------- |
118
+ | `client.events.list` | `GET /openmeter/events` | List ingested events. |
119
119
  | `client.events.ingest` | `POST /openmeter/events` | Ingests an event or batch of events following the CloudEvents specification. |
120
120
 
121
121
  ### Meters
122
122
 
123
- | Method | HTTP | Description |
124
- | --- | --- | --- |
125
- | `client.meters.create` | `POST /openmeter/meters` | Create a meter. |
126
- | `client.meters.get` | `GET /openmeter/meters/{meterId}` | Get a meter by ID. |
127
- | `client.meters.list` | `GET /openmeter/meters` | List meters. |
128
- | `client.meters.update` | `PUT /openmeter/meters/{meterId}` | Update a meter. |
129
- | `client.meters.delete` | `DELETE /openmeter/meters/{meterId}` | Delete a meter. |
130
- | `client.meters.query` | `POST /openmeter/meters/{meterId}/query` | Query a meter for usage. Set `Accept: application/json` (the default) to get a structured JSON response. Set `Accept: text/csv` to download the same data as a CSV file suitable for spreadsheets. The CSV columns, in order, are: `from, to, [subject,] [customer_id, customer_key, customer_name,] <dimensions...>, value` The `subject` column is emitted only when `subject` is in the query's `group_by_dimensions`. The three `customer_*` columns are emitted together only when `customer_id` is in the query's `group_by_dimensions`. |
123
+ | Method | HTTP | Description |
124
+ | ---------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
125
+ | `client.meters.create` | `POST /openmeter/meters` | Create a meter. |
126
+ | `client.meters.get` | `GET /openmeter/meters/{meterId}` | Get a meter by ID. |
127
+ | `client.meters.list` | `GET /openmeter/meters` | List meters. |
128
+ | `client.meters.update` | `PUT /openmeter/meters/{meterId}` | Update a meter. |
129
+ | `client.meters.delete` | `DELETE /openmeter/meters/{meterId}` | Delete a meter. |
130
+ | `client.meters.query` | `POST /openmeter/meters/{meterId}/query` | Query a meter for usage. Set `Accept: application/json` (the default) to get a structured JSON response. Set `Accept: text/csv` to download the same data as a CSV file suitable for spreadsheets. The CSV columns, in order, are: `from, to, [subject,] [customer_id, customer_key, customer_name,] <dimensions...>, value` The `subject` column is emitted only when `subject` is in the query's `group_by_dimensions`. The three `customer_*` columns are emitted together only when `customer_id` is in the query's `group_by_dimensions`. |
131
131
 
132
132
  ### Customers
133
133
 
134
- | Method | HTTP | Description |
135
- | --- | --- | --- |
136
- | `client.customers.create` | `POST /openmeter/customers` | |
137
- | `client.customers.get` | `GET /openmeter/customers/{customerId}` | |
138
- | `client.customers.list` | `GET /openmeter/customers` | |
139
- | `client.customers.upsert` | `PUT /openmeter/customers/{customerId}` | |
140
- | `client.customers.delete` | `DELETE /openmeter/customers/{customerId}` | |
141
- | `client.customers.billing.get` | `GET /openmeter/customers/{customerId}/billing` | |
142
- | `client.customers.billing.update` | `PUT /openmeter/customers/{customerId}/billing` | |
143
- | `client.customers.billing.updateAppData` | `PUT /openmeter/customers/{customerId}/billing/app-data` | |
134
+ | Method | HTTP | Description |
135
+ | ------------------------------------------------------ | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | `client.customers.create` | `POST /openmeter/customers` | |
137
+ | `client.customers.get` | `GET /openmeter/customers/{customerId}` | |
138
+ | `client.customers.list` | `GET /openmeter/customers` | |
139
+ | `client.customers.upsert` | `PUT /openmeter/customers/{customerId}` | |
140
+ | `client.customers.delete` | `DELETE /openmeter/customers/{customerId}` | |
141
+ | `client.customers.billing.get` | `GET /openmeter/customers/{customerId}/billing` | |
142
+ | `client.customers.billing.update` | `PUT /openmeter/customers/{customerId}/billing` | |
143
+ | `client.customers.billing.updateAppData` | `PUT /openmeter/customers/{customerId}/billing/app-data` | |
144
144
  | `client.customers.billing.createStripeCheckoutSession` | `POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions` | Create a [Stripe Checkout Session](https://docs.stripe.com/payments/checkout) for the customer. Creates a Checkout Session for collecting payment method information from customers. The session operates in "setup" mode, which collects payment details without charging the customer immediately. The collected payment method can be used for future subscription billing. For hosted checkout sessions, redirect customers to the returned URL. For embedded sessions, use the client_secret to initialize Stripe.js in your application. |
145
- | `client.customers.billing.createStripePortalSession` | `POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions` | Create Stripe Customer Portal Session. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer. |
146
- | `client.customers.credits.grants.create` | `POST /openmeter/customers/{customerId}/credits/grants` | Create a new credit grant. A credit grant represents an allocation of prepaid credits to a customer. |
147
- | `client.customers.credits.grants.get` | `GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId}` | Get a credit grant. |
148
- | `client.customers.credits.grants.list` | `GET /openmeter/customers/{customerId}/credits/grants` | List credit grants. |
149
- | `client.customers.credits.balance.get` | `GET /openmeter/customers/{customerId}/credits/balance` | Get a credit balance. |
150
- | `client.customers.credits.adjustments.create` | `POST /openmeter/customers/{customerId}/credits/adjustments` | A credit adjustment can be used to make manual adjustments to a customer's credit balance. Supported use-cases: - Usage correction |
151
- | `client.customers.credits.transactions.list` | `GET /openmeter/customers/{customerId}/credits/transactions` | List credit transactions for a customer. Returns an immutable, chronological record of credit movements: funded credits and consumed credits. Transactions are returned in reverse chronological order by default. |
152
- | `client.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
145
+ | `client.customers.billing.createStripePortalSession` | `POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions` | Create Stripe Customer Portal Session. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer. |
146
+ | `client.customers.credits.grants.create` | `POST /openmeter/customers/{customerId}/credits/grants` | Create a new credit grant. A credit grant represents an allocation of prepaid credits to a customer. |
147
+ | `client.customers.credits.grants.get` | `GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId}` | Get a credit grant. |
148
+ | `client.customers.credits.grants.list` | `GET /openmeter/customers/{customerId}/credits/grants` | List credit grants. |
149
+ | `client.customers.credits.balance.get` | `GET /openmeter/customers/{customerId}/credits/balance` | Get a credit balance. |
150
+ | `client.customers.credits.adjustments.create` | `POST /openmeter/customers/{customerId}/credits/adjustments` | A credit adjustment can be used to make manual adjustments to a customer's credit balance. Supported use-cases: - Usage correction |
151
+ | `client.customers.credits.transactions.list` | `GET /openmeter/customers/{customerId}/credits/transactions` | List credit transactions for a customer. Returns an immutable, chronological record of credit movements: funded credits and consumed credits. Transactions are returned in reverse chronological order by default. |
152
+ | `client.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
153
153
 
154
154
  ### Entitlements
155
155
 
156
- | Method | HTTP | Description |
157
- | --- | --- | --- |
158
- | `client.entitlements.listCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access` | |
156
+ | Method | HTTP | Description |
157
+ | ---------------------------------------- | ---------------------------------------------------------- | ----------- |
158
+ | `client.entitlements.listCustomerAccess` | `GET /openmeter/customers/{customerId}/entitlement-access` | |
159
159
 
160
160
  ### Subscriptions
161
161
 
162
- | Method | HTTP | Description |
163
- | --- | --- | --- |
164
- | `client.subscriptions.create` | `POST /openmeter/subscriptions` | |
165
- | `client.subscriptions.list` | `GET /openmeter/subscriptions` | |
166
- | `client.subscriptions.get` | `GET /openmeter/subscriptions/{subscriptionId}` | |
167
- | `client.subscriptions.cancel` | `POST /openmeter/subscriptions/{subscriptionId}/cancel` | Cancels the subscription. Will result in a scheduling conflict if there are other subscriptions scheduled to start after the cancelation time. |
168
- | `client.subscriptions.unscheduleCancelation` | `POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation` | Unschedules the subscription cancelation. |
169
- | `client.subscriptions.change` | `POST /openmeter/subscriptions/{subscriptionId}/change` | Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes. |
170
- | `client.subscriptions.listAddons` | `GET /openmeter/subscriptions/{subscriptionId}/addons` | List the addons of a subscription. |
171
- | `client.subscriptions.getAddon` | `GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Get an add-on association for a subscription. |
162
+ | Method | HTTP | Description |
163
+ | -------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
164
+ | `client.subscriptions.create` | `POST /openmeter/subscriptions` | |
165
+ | `client.subscriptions.list` | `GET /openmeter/subscriptions` | |
166
+ | `client.subscriptions.get` | `GET /openmeter/subscriptions/{subscriptionId}` | |
167
+ | `client.subscriptions.cancel` | `POST /openmeter/subscriptions/{subscriptionId}/cancel` | Cancels the subscription. Will result in a scheduling conflict if there are other subscriptions scheduled to start after the cancelation time. |
168
+ | `client.subscriptions.unscheduleCancelation` | `POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation` | Unschedules the subscription cancelation. |
169
+ | `client.subscriptions.change` | `POST /openmeter/subscriptions/{subscriptionId}/change` | Closes a running subscription and starts a new one according to the specification. Can be used for upgrades, downgrades, and plan changes. |
170
+ | `client.subscriptions.listAddons` | `GET /openmeter/subscriptions/{subscriptionId}/addons` | List the addons of a subscription. |
171
+ | `client.subscriptions.getAddon` | `GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}` | Get an add-on association for a subscription. |
172
172
 
173
173
  ### Apps
174
174
 
175
- | Method | HTTP | Description |
176
- | --- | --- | --- |
177
- | `client.apps.list` | `GET /openmeter/apps` | List installed apps. |
178
- | `client.apps.get` | `GET /openmeter/apps/{appId}` | Get an installed app. |
175
+ | Method | HTTP | Description |
176
+ | ------------------ | ----------------------------- | --------------------- |
177
+ | `client.apps.list` | `GET /openmeter/apps` | List installed apps. |
178
+ | `client.apps.get` | `GET /openmeter/apps/{appId}` | Get an installed app. |
179
179
 
180
180
  ### Billing
181
181
 
182
- | Method | HTTP | Description |
183
- | --- | --- | --- |
184
- | `client.billing.listProfiles` | `GET /openmeter/profiles` | List billing profiles. |
185
- | `client.billing.createProfile` | `POST /openmeter/profiles` | Create a new billing profile. Billing profiles contain the settings for billing and controls invoice generation. An organization can have multiple billing profiles defined. A billing profile is linked to a specific app. This association is established during the billing profile's creation and remains immutable. |
186
- | `client.billing.getProfile` | `GET /openmeter/profiles/{id}` | Get a billing profile. |
187
- | `client.billing.updateProfile` | `PUT /openmeter/profiles/{id}` | Update a billing profile. |
188
- | `client.billing.deleteProfile` | `DELETE /openmeter/profiles/{id}` | Delete a billing profile. Only such billing profiles can be deleted that are: - not the default profile - not pinned to any customer using customer overrides - only have finalized invoices |
182
+ | Method | HTTP | Description |
183
+ | ------------------------------ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
184
+ | `client.billing.listProfiles` | `GET /openmeter/profiles` | List billing profiles. |
185
+ | `client.billing.createProfile` | `POST /openmeter/profiles` | Create a new billing profile. Billing profiles contain the settings for billing and controls invoice generation. An organization can have multiple billing profiles defined. A billing profile is linked to a specific app. This association is established during the billing profile's creation and remains immutable. |
186
+ | `client.billing.getProfile` | `GET /openmeter/profiles/{id}` | Get a billing profile. |
187
+ | `client.billing.updateProfile` | `PUT /openmeter/profiles/{id}` | Update a billing profile. |
188
+ | `client.billing.deleteProfile` | `DELETE /openmeter/profiles/{id}` | Delete a billing profile. Only such billing profiles can be deleted that are: - not the default profile - not pinned to any customer using customer overrides - only have finalized invoices |
189
189
 
190
190
  ### Tax
191
191
 
192
- | Method | HTTP | Description |
193
- | --- | --- | --- |
194
- | `client.tax.createCode` | `POST /openmeter/tax-codes` | |
195
- | `client.tax.getCode` | `GET /openmeter/tax-codes/{taxCodeId}` | |
196
- | `client.tax.listCodes` | `GET /openmeter/tax-codes` | |
197
- | `client.tax.upsertCode` | `PUT /openmeter/tax-codes/{taxCodeId}` | |
198
- | `client.tax.deleteCode` | `DELETE /openmeter/tax-codes/{taxCodeId}` | |
192
+ | Method | HTTP | Description |
193
+ | ----------------------- | ----------------------------------------- | ----------- |
194
+ | `client.tax.createCode` | `POST /openmeter/tax-codes` | |
195
+ | `client.tax.getCode` | `GET /openmeter/tax-codes/{taxCodeId}` | |
196
+ | `client.tax.listCodes` | `GET /openmeter/tax-codes` | |
197
+ | `client.tax.upsertCode` | `PUT /openmeter/tax-codes/{taxCodeId}` | |
198
+ | `client.tax.deleteCode` | `DELETE /openmeter/tax-codes/{taxCodeId}` | |
199
199
 
200
200
  ### Currencies
201
201
 
202
- | Method | HTTP | Description |
203
- | --- | --- | --- |
204
- | `client.currencies.list` | `GET /openmeter/currencies` | List currencies supported by the billing system. |
205
- | `client.currencies.createCustomCurrency` | `POST /openmeter/currencies/custom` | Create a custom currency. This operation allows defining your own custom currency for billing purposes. |
206
- | `client.currencies.listCostBases` | `GET /openmeter/currencies/custom/{currencyId}/cost-bases` | List cost bases for a currency. For custom currencies, there can be multiple cost bases with different `effective_from` dates. |
207
- | `client.currencies.createCostBasis` | `POST /openmeter/currencies/custom/{currencyId}/cost-bases` | Create a cost basis for a currency. |
202
+ | Method | HTTP | Description |
203
+ | ---------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
204
+ | `client.currencies.list` | `GET /openmeter/currencies` | List currencies supported by the billing system. |
205
+ | `client.currencies.createCustomCurrency` | `POST /openmeter/currencies/custom` | Create a custom currency. This operation allows defining your own custom currency for billing purposes. |
206
+ | `client.currencies.listCostBases` | `GET /openmeter/currencies/custom/{currencyId}/cost-bases` | List cost bases for a currency. For custom currencies, there can be multiple cost bases with different `effective_from` dates. |
207
+ | `client.currencies.createCostBasis` | `POST /openmeter/currencies/custom/{currencyId}/cost-bases` | Create a cost basis for a currency. |
208
208
 
209
209
  ### Features
210
210
 
211
- | Method | HTTP | Description |
212
- | --- | --- | --- |
213
- | `client.features.list` | `GET /openmeter/features` | List all features. |
214
- | `client.features.create` | `POST /openmeter/features` | Create a feature. |
215
- | `client.features.get` | `GET /openmeter/features/{featureId}` | Get a feature by id. |
216
- | `client.features.update` | `PATCH /openmeter/features/{featureId}` | Update a feature by id. Currently only the unit_cost field can be updated. |
217
- | `client.features.delete` | `DELETE /openmeter/features/{featureId}` | Delete a feature by id. |
218
- | `client.features.queryCost` | `POST /openmeter/features/{featureId}/cost/query` | Query the cost of a feature. |
211
+ | Method | HTTP | Description |
212
+ | --------------------------- | ------------------------------------------------- | -------------------------------------------------------------------------- |
213
+ | `client.features.list` | `GET /openmeter/features` | List all features. |
214
+ | `client.features.create` | `POST /openmeter/features` | Create a feature. |
215
+ | `client.features.get` | `GET /openmeter/features/{featureId}` | Get a feature by id. |
216
+ | `client.features.update` | `PATCH /openmeter/features/{featureId}` | Update a feature by id. Currently only the unit_cost field can be updated. |
217
+ | `client.features.delete` | `DELETE /openmeter/features/{featureId}` | Delete a feature by id. |
218
+ | `client.features.queryCost` | `POST /openmeter/features/{featureId}/cost/query` | Query the cost of a feature. |
219
219
 
220
220
  ### LLMCost
221
221
 
222
- | Method | HTTP | Description |
223
- | --- | --- | --- |
224
- | `client.llmCost.listPrices` | `GET /openmeter/llm-cost/prices` | List global LLM cost prices. Returns prices with overrides applied if any. |
225
- | `client.llmCost.getPrice` | `GET /openmeter/llm-cost/prices/{priceId}` | Get a specific LLM cost price by ID. Returns the price with overrides applied if any. |
226
- | `client.llmCost.listOverrides` | `GET /openmeter/llm-cost/overrides` | List per-namespace price overrides. |
227
- | `client.llmCost.createOverride` | `POST /openmeter/llm-cost/overrides` | Create a per-namespace price override. |
228
- | `client.llmCost.deleteOverride` | `DELETE /openmeter/llm-cost/overrides/{priceId}` | Delete a per-namespace price override. |
222
+ | Method | HTTP | Description |
223
+ | ------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- |
224
+ | `client.llmCost.listPrices` | `GET /openmeter/llm-cost/prices` | List global LLM cost prices. Returns prices with overrides applied if any. |
225
+ | `client.llmCost.getPrice` | `GET /openmeter/llm-cost/prices/{priceId}` | Get a specific LLM cost price by ID. Returns the price with overrides applied if any. |
226
+ | `client.llmCost.listOverrides` | `GET /openmeter/llm-cost/overrides` | List per-namespace price overrides. |
227
+ | `client.llmCost.createOverride` | `POST /openmeter/llm-cost/overrides` | Create a per-namespace price override. |
228
+ | `client.llmCost.deleteOverride` | `DELETE /openmeter/llm-cost/overrides/{priceId}` | Delete a per-namespace price override. |
229
229
 
230
230
  ### Plans
231
231
 
232
- | Method | HTTP | Description |
233
- | --- | --- | --- |
234
- | `client.plans.list` | `GET /openmeter/plans` | List all plans. |
235
- | `client.plans.create` | `POST /openmeter/plans` | Create a new plan. |
236
- | `client.plans.update` | `PUT /openmeter/plans/{planId}` | Update a plan by id. |
237
- | `client.plans.get` | `GET /openmeter/plans/{planId}` | Get a plan by id. |
238
- | `client.plans.delete` | `DELETE /openmeter/plans/{planId}` | Delete a plan by id. |
232
+ | Method | HTTP | Description |
233
+ | ---------------------- | ---------------------------------------- | ----------------------- |
234
+ | `client.plans.list` | `GET /openmeter/plans` | List all plans. |
235
+ | `client.plans.create` | `POST /openmeter/plans` | Create a new plan. |
236
+ | `client.plans.update` | `PUT /openmeter/plans/{planId}` | Update a plan by id. |
237
+ | `client.plans.get` | `GET /openmeter/plans/{planId}` | Get a plan by id. |
238
+ | `client.plans.delete` | `DELETE /openmeter/plans/{planId}` | Delete a plan by id. |
239
239
  | `client.plans.archive` | `POST /openmeter/plans/{planId}/archive` | Archive a plan version. |
240
240
  | `client.plans.publish` | `POST /openmeter/plans/{planId}/publish` | Publish a plan version. |
241
241
 
242
242
  ### Addons
243
243
 
244
- | Method | HTTP | Description |
245
- | --- | --- | --- |
246
- | `client.addons.list` | `GET /openmeter/addons` | List all add-ons. |
247
- | `client.addons.create` | `POST /openmeter/addons` | Create a new add-on. |
248
- | `client.addons.update` | `PUT /openmeter/addons/{addonId}` | Update an add-on by id. |
249
- | `client.addons.get` | `GET /openmeter/addons/{addonId}` | Get add-on by id. |
250
- | `client.addons.delete` | `DELETE /openmeter/addons/{addonId}` | Soft delete add-on by id. |
244
+ | Method | HTTP | Description |
245
+ | ----------------------- | ------------------------------------------ | -------------------------- |
246
+ | `client.addons.list` | `GET /openmeter/addons` | List all add-ons. |
247
+ | `client.addons.create` | `POST /openmeter/addons` | Create a new add-on. |
248
+ | `client.addons.update` | `PUT /openmeter/addons/{addonId}` | Update an add-on by id. |
249
+ | `client.addons.get` | `GET /openmeter/addons/{addonId}` | Get add-on by id. |
250
+ | `client.addons.delete` | `DELETE /openmeter/addons/{addonId}` | Soft delete add-on by id. |
251
251
  | `client.addons.archive` | `POST /openmeter/addons/{addonId}/archive` | Archive an add-on version. |
252
252
  | `client.addons.publish` | `POST /openmeter/addons/{addonId}/publish` | Publish an add-on version. |
253
253
 
254
254
  ### PlanAddons
255
255
 
256
- | Method | HTTP | Description |
257
- | --- | --- | --- |
258
- | `client.planAddons.list` | `GET /openmeter/plans/{planId}/addons` | List add-ons associated with a plan. |
259
- | `client.planAddons.create` | `POST /openmeter/plans/{planId}/addons` | Add an add-on to a plan. |
260
- | `client.planAddons.get` | `GET /openmeter/plans/{planId}/addons/{planAddonId}` | Get an add-on association for a plan. |
261
- | `client.planAddons.update` | `PUT /openmeter/plans/{planId}/addons/{planAddonId}` | Update an add-on association for a plan. |
262
- | `client.planAddons.delete` | `DELETE /openmeter/plans/{planId}/addons/{planAddonId}` | Remove an add-on from a plan. |
256
+ | Method | HTTP | Description |
257
+ | -------------------------- | ------------------------------------------------------- | ---------------------------------------- |
258
+ | `client.planAddons.list` | `GET /openmeter/plans/{planId}/addons` | List add-ons associated with a plan. |
259
+ | `client.planAddons.create` | `POST /openmeter/plans/{planId}/addons` | Add an add-on to a plan. |
260
+ | `client.planAddons.get` | `GET /openmeter/plans/{planId}/addons/{planAddonId}` | Get an add-on association for a plan. |
261
+ | `client.planAddons.update` | `PUT /openmeter/plans/{planId}/addons/{planAddonId}` | Update an add-on association for a plan. |
262
+ | `client.planAddons.delete` | `DELETE /openmeter/plans/{planId}/addons/{planAddonId}` | Remove an add-on from a plan. |
263
263
 
264
264
  ### Defaults
265
265
 
266
- | Method | HTTP | Description |
267
- | --- | --- | --- |
268
- | `client.defaults.getOrganizationTaxCodes` | `GET /openmeter/defaults/tax-codes` | |
269
- | `client.defaults.updateOrganizationTaxCodes` | `PUT /openmeter/defaults/tax-codes` | |
266
+ | Method | HTTP | Description |
267
+ | -------------------------------------------- | ----------------------------------- | ----------- |
268
+ | `client.defaults.getOrganizationTaxCodes` | `GET /openmeter/defaults/tax-codes` | |
269
+ | `client.defaults.updateOrganizationTaxCodes` | `PUT /openmeter/defaults/tax-codes` | |
270
270
 
271
271
  ### Governance
272
272
 
273
- | Method | HTTP | Description |
274
- | --- | --- | --- |
273
+ | Method | HTTP | Description |
274
+ | ------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
275
275
  | `client.governance.queryAccess` | `POST /openmeter/governance/query` | Query feature access for a list of customers. The endpoint resolves each provided identifier to a customer and returns the access status for the requested features, plus optional credit balance availability. _Designed to be called on a fixed refresh interval and the query response is intended to be cached._ |
276
276
 
277
277
  ## Error Handling
@@ -17,33 +17,37 @@ export function createAddon(client, req, options) {
17
17
  .json());
18
18
  }
19
19
  export function updateAddon(client, req, options) {
20
- const path = encodePath('openmeter/addons/{addonId}', { addonId: req.addonId });
20
+ const path = encodePath('openmeter/addons/{addonId}', {
21
+ addonId: req.addonId,
22
+ });
21
23
  return request(() => http(client)
22
24
  .put(path, { ...options, json: req.body })
23
25
  .json());
24
26
  }
25
27
  export function getAddon(client, req, options) {
26
- const path = encodePath('openmeter/addons/{addonId}', { addonId: req.addonId });
27
- return request(() => http(client)
28
- .get(path, options)
29
- .json());
28
+ const path = encodePath('openmeter/addons/{addonId}', {
29
+ addonId: req.addonId,
30
+ });
31
+ return request(() => http(client).get(path, options).json());
30
32
  }
31
33
  export function deleteAddon(client, req, options) {
32
- const path = encodePath('openmeter/addons/{addonId}', { addonId: req.addonId });
34
+ const path = encodePath('openmeter/addons/{addonId}', {
35
+ addonId: req.addonId,
36
+ });
33
37
  return request(async () => {
34
38
  await http(client).delete(path, options);
35
39
  });
36
40
  }
37
41
  export function archiveAddon(client, req, options) {
38
- const path = encodePath('openmeter/addons/{addonId}/archive', { addonId: req.addonId });
39
- return request(() => http(client)
40
- .post(path, options)
41
- .json());
42
+ const path = encodePath('openmeter/addons/{addonId}/archive', {
43
+ addonId: req.addonId,
44
+ });
45
+ return request(() => http(client).post(path, options).json());
42
46
  }
43
47
  export function publishAddon(client, req, options) {
44
- const path = encodePath('openmeter/addons/{addonId}/publish', { addonId: req.addonId });
45
- return request(() => http(client)
46
- .post(path, options)
47
- .json());
48
+ const path = encodePath('openmeter/addons/{addonId}/publish', {
49
+ addonId: req.addonId,
50
+ });
51
+ return request(() => http(client).post(path, options).json());
48
52
  }
49
53
  //# sourceMappingURL=addons.js.map
@@ -11,8 +11,6 @@ export function listApps(client, req = {}, options) {
11
11
  }
12
12
  export function getApp(client, req, options) {
13
13
  const path = encodePath('openmeter/apps/{appId}', { appId: req.appId });
14
- return request(() => http(client)
15
- .get(path, options)
16
- .json());
14
+ return request(() => http(client).get(path, options).json());
17
15
  }
18
16
  //# sourceMappingURL=apps.js.map
@@ -16,9 +16,7 @@ export function createBillingProfile(client, req, options) {
16
16
  }
17
17
  export function getBillingProfile(client, req, options) {
18
18
  const path = encodePath('openmeter/profiles/{id}', { id: req.id });
19
- return request(() => http(client)
20
- .get(path, options)
21
- .json());
19
+ return request(() => http(client).get(path, options).json());
22
20
  }
23
21
  export function updateBillingProfile(client, req, options) {
24
22
  const path = encodePath('openmeter/profiles/{id}', { id: req.id });
@@ -7,10 +7,10 @@ export function createCustomer(client, req, options) {
7
7
  .json());
8
8
  }
9
9
  export function getCustomer(client, req, options) {
10
- const path = encodePath('openmeter/customers/{customerId}', { customerId: req.customerId });
11
- return request(() => http(client)
12
- .get(path, options)
13
- .json());
10
+ const path = encodePath('openmeter/customers/{customerId}', {
11
+ customerId: req.customerId,
12
+ });
13
+ return request(() => http(client).get(path, options).json());
14
14
  }
15
15
  export function listCustomers(client, req = {}, options) {
16
16
  const searchParams = toURLSearchParams({
@@ -23,31 +23,39 @@ export function listCustomers(client, req = {}, options) {
23
23
  .json());
24
24
  }
25
25
  export function upsertCustomer(client, req, options) {
26
- const path = encodePath('openmeter/customers/{customerId}', { customerId: req.customerId });
26
+ const path = encodePath('openmeter/customers/{customerId}', {
27
+ customerId: req.customerId,
28
+ });
27
29
  return request(() => http(client)
28
30
  .put(path, { ...options, json: req.body })
29
31
  .json());
30
32
  }
31
33
  export function deleteCustomer(client, req, options) {
32
- const path = encodePath('openmeter/customers/{customerId}', { customerId: req.customerId });
34
+ const path = encodePath('openmeter/customers/{customerId}', {
35
+ customerId: req.customerId,
36
+ });
33
37
  return request(async () => {
34
38
  await http(client).delete(path, options);
35
39
  });
36
40
  }
37
41
  export function getCustomerBilling(client, req, options) {
38
- const path = encodePath('openmeter/customers/{customerId}/billing', { customerId: req.customerId });
39
- return request(() => http(client)
40
- .get(path, options)
41
- .json());
42
+ const path = encodePath('openmeter/customers/{customerId}/billing', {
43
+ customerId: req.customerId,
44
+ });
45
+ return request(() => http(client).get(path, options).json());
42
46
  }
43
47
  export function updateCustomerBilling(client, req, options) {
44
- const path = encodePath('openmeter/customers/{customerId}/billing', { customerId: req.customerId });
48
+ const path = encodePath('openmeter/customers/{customerId}/billing', {
49
+ customerId: req.customerId,
50
+ });
45
51
  return request(() => http(client)
46
52
  .put(path, { ...options, json: req.body })
47
53
  .json());
48
54
  }
49
55
  export function updateCustomerBillingAppData(client, req, options) {
50
- const path = encodePath('openmeter/customers/{customerId}/billing/app-data', { customerId: req.customerId });
56
+ const path = encodePath('openmeter/customers/{customerId}/billing/app-data', {
57
+ customerId: req.customerId,
58
+ });
51
59
  return request(() => http(client)
52
60
  .put(path, { ...options, json: req.body })
53
61
  .json());
@@ -65,23 +73,25 @@ export function createCustomerStripePortalSession(client, req, options) {
65
73
  .json());
66
74
  }
67
75
  export function createCreditGrant(client, req, options) {
68
- const path = encodePath('openmeter/customers/{customerId}/credits/grants', { customerId: req.customerId });
76
+ const path = encodePath('openmeter/customers/{customerId}/credits/grants', {
77
+ customerId: req.customerId,
78
+ });
69
79
  return request(() => http(client)
70
80
  .post(path, { ...options, json: req.body })
71
81
  .json());
72
82
  }
73
83
  export function getCreditGrant(client, req, options) {
74
84
  const path = encodePath('openmeter/customers/{customerId}/credits/grants/{creditGrantId}', { customerId: req.customerId, creditGrantId: req.creditGrantId });
75
- return request(() => http(client)
76
- .get(path, options)
77
- .json());
85
+ return request(() => http(client).get(path, options).json());
78
86
  }
79
87
  export function listCreditGrants(client, req, options) {
80
88
  const searchParams = toURLSearchParams({
81
89
  page: req.page,
82
90
  filter: req.filter,
83
91
  });
84
- const path = encodePath('openmeter/customers/{customerId}/credits/grants', { customerId: req.customerId });
92
+ const path = encodePath('openmeter/customers/{customerId}/credits/grants', {
93
+ customerId: req.customerId,
94
+ });
85
95
  return request(() => http(client)
86
96
  .get(path, { ...options, searchParams })
87
97
  .json());
@@ -91,7 +101,9 @@ export function getCustomerCreditBalance(client, req, options) {
91
101
  timestamp: req.timestamp,
92
102
  filter: req.filter,
93
103
  });
94
- const path = encodePath('openmeter/customers/{customerId}/credits/balance', { customerId: req.customerId });
104
+ const path = encodePath('openmeter/customers/{customerId}/credits/balance', {
105
+ customerId: req.customerId,
106
+ });
95
107
  return request(() => http(client)
96
108
  .get(path, { ...options, searchParams })
97
109
  .json());
@@ -119,7 +131,9 @@ export function listCustomerCharges(client, req, options) {
119
131
  filter: req.filter,
120
132
  expand: req.expand,
121
133
  });
122
- const path = encodePath('openmeter/customers/{customerId}/charges', { customerId: req.customerId });
134
+ const path = encodePath('openmeter/customers/{customerId}/charges', {
135
+ customerId: req.customerId,
136
+ });
123
137
  return request(() => http(client)
124
138
  .get(path, { ...options, searchParams })
125
139
  .json());
@@ -17,25 +17,31 @@ export function createFeature(client, req, options) {
17
17
  .json());
18
18
  }
19
19
  export function getFeature(client, req, options) {
20
- const path = encodePath('openmeter/features/{featureId}', { featureId: req.featureId });
21
- return request(() => http(client)
22
- .get(path, options)
23
- .json());
20
+ const path = encodePath('openmeter/features/{featureId}', {
21
+ featureId: req.featureId,
22
+ });
23
+ return request(() => http(client).get(path, options).json());
24
24
  }
25
25
  export function updateFeature(client, req, options) {
26
- const path = encodePath('openmeter/features/{featureId}', { featureId: req.featureId });
26
+ const path = encodePath('openmeter/features/{featureId}', {
27
+ featureId: req.featureId,
28
+ });
27
29
  return request(() => http(client)
28
30
  .patch(path, { ...options, json: req.body })
29
31
  .json());
30
32
  }
31
33
  export function deleteFeature(client, req, options) {
32
- const path = encodePath('openmeter/features/{featureId}', { featureId: req.featureId });
34
+ const path = encodePath('openmeter/features/{featureId}', {
35
+ featureId: req.featureId,
36
+ });
33
37
  return request(async () => {
34
38
  await http(client).delete(path, options);
35
39
  });
36
40
  }
37
41
  export function queryFeatureCost(client, req, options) {
38
- const path = encodePath('openmeter/features/{featureId}/cost/query', { featureId: req.featureId });
42
+ const path = encodePath('openmeter/features/{featureId}/cost/query', {
43
+ featureId: req.featureId,
44
+ });
39
45
  return request(() => http(client)
40
46
  .post(path, { ...options, json: req.body })
41
47
  .json());
@@ -6,7 +6,11 @@ export function queryGovernanceAccess(client, req, options) {
6
6
  page: req.page,
7
7
  });
8
8
  return request(() => http(client)
9
- .post('openmeter/governance/query', { ...options, searchParams, json: req.body })
9
+ .post('openmeter/governance/query', {
10
+ ...options,
11
+ searchParams,
12
+ json: req.body,
13
+ })
10
14
  .json());
11
15
  }
12
16
  //# sourceMappingURL=governance.js.map
@@ -12,10 +12,10 @@ export function listLlmCostPrices(client, req = {}, options) {
12
12
  .json());
13
13
  }
14
14
  export function getLlmCostPrice(client, req, options) {
15
- const path = encodePath('openmeter/llm-cost/prices/{priceId}', { priceId: req.priceId });
16
- return request(() => http(client)
17
- .get(path, options)
18
- .json());
15
+ const path = encodePath('openmeter/llm-cost/prices/{priceId}', {
16
+ priceId: req.priceId,
17
+ });
18
+ return request(() => http(client).get(path, options).json());
19
19
  }
20
20
  export function listLlmCostOverrides(client, req = {}, options) {
21
21
  const searchParams = toURLSearchParams({
@@ -32,7 +32,9 @@ export function createLlmCostOverride(client, req, options) {
32
32
  .json());
33
33
  }
34
34
  export function deleteLlmCostOverride(client, req, options) {
35
- const path = encodePath('openmeter/llm-cost/overrides/{priceId}', { priceId: req.priceId });
35
+ const path = encodePath('openmeter/llm-cost/overrides/{priceId}', {
36
+ priceId: req.priceId,
37
+ });
36
38
  return request(async () => {
37
39
  await http(client).delete(path, options);
38
40
  });