@openmeter/client 1.0.0-beta-7280f75db66f → 1.0.0-beta-05de7df7a13f

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
@@ -36,7 +36,9 @@ TypeSpec definitions and ships fully-typed request and response models.
36
36
  - [Defaults](#defaults)
37
37
  - [Internal Operations](#internal-operations)
38
38
  - [Internal Subscriptions](#internal-subscriptions)
39
+ - [Internal Invoices](#internal-invoices)
39
40
  - [Internal Currencies](#internal-currencies)
41
+ - [Internal Governance](#internal-governance)
40
42
  - [Runtime Validation (validate option)](#runtime-validation-validate-option)
41
43
  - [Zod Schemas (./zod export)](#zod-schemas-zod-export)
42
44
  - [Error Handling](#error-handling)
@@ -277,27 +279,28 @@ The full call path, HTTP route, and a short description are listed below.
277
279
 
278
280
  ### Customers
279
281
 
280
- | Method | HTTP | Description |
281
- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
282
- | `client.customers.create` | `POST /openmeter/customers` | Create customer |
283
- | `client.customers.get` | `GET /openmeter/customers/{customerId}` | Get customer |
284
- | `client.customers.list` | `GET /openmeter/customers` | List customers |
285
- | `client.customers.upsert` | `PUT /openmeter/customers/{customerId}` | Upsert customer |
286
- | `client.customers.delete` | `DELETE /openmeter/customers/{customerId}` | Delete customer |
287
- | `client.customers.billing.get` | `GET /openmeter/customers/{customerId}/billing` | Get customer billing data |
288
- | `client.customers.billing.update` | `PUT /openmeter/customers/{customerId}/billing` | Update customer billing data |
289
- | `client.customers.billing.updateAppData` | `PUT /openmeter/customers/{customerId}/billing/app-data` | Update customer billing app data |
290
- | `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. |
291
- | `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. |
292
- | `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. |
293
- | `client.customers.credits.grants.get` | `GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId}` | Get a credit grant. |
294
- | `client.customers.credits.grants.list` | `GET /openmeter/customers/{customerId}/credits/grants` | List credit grants. |
295
- | `client.customers.credits.balance.get` | `GET /openmeter/customers/{customerId}/credits/balance` | Get a credit balance. |
296
- | `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 |
297
- | `client.customers.credits.grants.updateExternalSettlement` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/settlement/external` | Update the payment settlement status of an externally funded credit grant. Use this endpoint to synchronize the payment state of an external payment with the system so that revenue recognition and credit availability work as expected. |
298
- | `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. |
299
- | `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. |
300
- | `client.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
282
+ | Method | HTTP | Description |
283
+ | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
284
+ | `client.customers.create` | `POST /openmeter/customers` | Create customer |
285
+ | `client.customers.get` | `GET /openmeter/customers/{customerId}` | Get customer |
286
+ | `client.customers.list` | `GET /openmeter/customers` | List customers |
287
+ | `client.customers.upsert` | `PUT /openmeter/customers/{customerId}` | Upsert customer |
288
+ | `client.customers.delete` | `DELETE /openmeter/customers/{customerId}` | Delete customer |
289
+ | `client.customers.billing.get` | `GET /openmeter/customers/{customerId}/billing` | Get customer billing data |
290
+ | `client.customers.billing.update` | `PUT /openmeter/customers/{customerId}/billing` | Update customer billing data |
291
+ | `client.customers.billing.updateAppData` | `PUT /openmeter/customers/{customerId}/billing/app-data` | Update customer billing app data |
292
+ | `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. |
293
+ | `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. |
294
+ | `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. |
295
+ | `client.customers.credits.grants.get` | `GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId}` | Get a credit grant. |
296
+ | `client.customers.credits.grants.list` | `GET /openmeter/customers/{customerId}/credits/grants` | List credit grants. |
297
+ | `client.customers.credits.balance.get` | `GET /openmeter/customers/{customerId}/credits/balance` | Get a credit balance. |
298
+ | `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 |
299
+ | `client.customers.credits.grants.void` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void` | Void a credit grant, forfeiting the remaining unused balance. Voiding is a forward-looking, irreversible operation. Credits already consumed by usage remain unaffected — only the remaining balance is forfeited. The grant reads as `voided` status afterwards. Payment state is not adjusted when `payment_adjustment` is `none`, so invoice-backed or externally collected payments may still collect the original amount. Only `active` grants can be voided; voiding a pending, expired, or fully consumed grant returns a conflict. Retrying a successful void is an idempotent success. |
300
+ | `client.customers.credits.grants.updateExternalSettlement` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/settlement/external` | Update the payment settlement status of an externally funded credit grant. Use this endpoint to synchronize the payment state of an external payment with the system so that revenue recognition and credit availability work as expected. |
301
+ | `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. |
302
+ | `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. |
303
+ | `client.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
301
304
 
302
305
  ### Entitlements
303
306
 
@@ -420,6 +423,15 @@ they can change or be removed without notice or semver consideration.
420
423
  | ------------------------------------------- | ------------------------------------------------------- | ----------------------------- |
421
424
  | `client.internal.subscriptions.createAddon` | `POST /openmeter/subscriptions/{subscriptionId}/addons` | Add add-on to a subscription. |
422
425
 
426
+ ### Internal Invoices
427
+
428
+ | Method | HTTP | Description |
429
+ | --------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
430
+ | `client.internal.invoices.list` | `GET /openmeter/billing/invoices` | List billing invoices. Returns a page of invoices. Gathering invoices are never included. Use `filter` to narrow by status, customer, dates, or service period start. Use `sort` to control ordering. |
431
+ | `client.internal.invoices.get` | `GET /openmeter/billing/invoices/{invoiceId}` | Get a billing invoice by ID. Returns the full invoice resource including line items, status details, totals, and workflow configuration snapshot. |
432
+ | `client.internal.invoices.update` | `PUT /openmeter/billing/invoices/{invoiceId}` | Update a billing invoice. Only the mutable fields of the invoice can be edited: description, labels, supplier, customer, workflow settings, and top-level lines. Top-level lines are matched by `id`; lines without an `id` are created, and existing lines omitted from `lines` are deleted. Detailed (child) lines are always computed and cannot be edited directly. Only invoices in draft status can be updated. |
433
+ | `client.internal.invoices.delete` | `DELETE /openmeter/billing/invoices/{invoiceId}` | Delete a billing invoice. Only standard invoices in draft status can be deleted. Deleting an invoice will also delete all associated line items and workflow configuration. |
434
+
423
435
  ### Internal Currencies
424
436
 
425
437
  | Method | HTTP | Description |
@@ -429,6 +441,12 @@ they can change or be removed without notice or semver consideration.
429
441
  | `client.internal.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. |
430
442
  | `client.internal.currencies.createCostBasis` | `POST /openmeter/currencies/custom/{currencyId}/cost-bases` | Create a cost basis for a currency. |
431
443
 
444
+ ### Internal Governance
445
+
446
+ | Method | HTTP | Description |
447
+ | ---------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
448
+ | `client.internal.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._ |
449
+
432
450
  ## Runtime Validation (validate option)
433
451
 
434
452
  `validate` is off by default. The SDK's normal request/response mapping
@@ -1,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type Result, type RequestOptions } from '../lib/types.js';
3
- import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
3
+ import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
4
4
  /**
5
5
  * Create customer
6
6
  *
@@ -126,6 +126,22 @@ export declare function getCustomerCreditBalance(client: Client, req: GetCustome
126
126
  * POST /openmeter/customers/{customerId}/credits/adjustments
127
127
  */
128
128
  export declare function createCreditAdjustment(client: Client, req: CreateCreditAdjustmentRequest, options?: RequestOptions): Promise<Result<CreateCreditAdjustmentResponse>>;
129
+ /**
130
+ * Void credit grant
131
+ *
132
+ * Void a credit grant, forfeiting the remaining unused balance.
133
+ *
134
+ * Voiding is a forward-looking, irreversible operation. Credits already consumed
135
+ * by usage remain unaffected — only the remaining balance is forfeited. The grant
136
+ * reads as `voided` status afterwards. Payment state is not adjusted when
137
+ * `payment_adjustment` is `none`, so invoice-backed or externally collected
138
+ * payments may still collect the original amount. Only `active` grants can be
139
+ * voided; voiding a pending, expired, or fully consumed grant returns a conflict.
140
+ * Retrying a successful void is an idempotent success.
141
+ *
142
+ * POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void
143
+ */
144
+ export declare function voidCreditGrant(client: Client, req: VoidCreditGrantRequest, options?: RequestOptions): Promise<Result<VoidCreditGrantResponse>>;
129
145
  /**
130
146
  * Update credit grant external settlement status
131
147
  *
@@ -441,6 +441,49 @@ export function createCreditAdjustment(client, req, options) {
441
441
  });
442
442
  });
443
443
  }
444
+ /**
445
+ * Void credit grant
446
+ *
447
+ * Void a credit grant, forfeiting the remaining unused balance.
448
+ *
449
+ * Voiding is a forward-looking, irreversible operation. Credits already consumed
450
+ * by usage remain unaffected — only the remaining balance is forfeited. The grant
451
+ * reads as `voided` status afterwards. Payment state is not adjusted when
452
+ * `payment_adjustment` is `none`, so invoice-backed or externally collected
453
+ * payments may still collect the original amount. Only `active` grants can be
454
+ * voided; voiding a pending, expired, or fully consumed grant returns a conflict.
455
+ * Retrying a successful void is an idempotent success.
456
+ *
457
+ * POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void
458
+ */
459
+ export function voidCreditGrant(client, req, options) {
460
+ return request(() => {
461
+ const path = `openmeter/customers/${(() => {
462
+ if (req.customerId === undefined) {
463
+ throw new Error('missing path parameter: customerId');
464
+ }
465
+ return encodeURIComponent(String(req.customerId));
466
+ })()}/credits/grants/${(() => {
467
+ if (req.creditGrantId === undefined) {
468
+ throw new Error('missing path parameter: creditGrantId');
469
+ }
470
+ return encodeURIComponent(String(req.creditGrantId));
471
+ })()}/void`;
472
+ const body = toWire(req.body, schemas.voidCreditGrantBody);
473
+ if (client._options.validate) {
474
+ assertValid(schemas.voidCreditGrantBodyWire, body);
475
+ }
476
+ return http(client)
477
+ .post(path, { ...options, json: body })
478
+ .json()
479
+ .then((data) => {
480
+ if (client._options.validate) {
481
+ assertValid(schemas.voidCreditGrantResponseWire, data);
482
+ }
483
+ return fromWire(data, schemas.voidCreditGrantResponse);
484
+ });
485
+ });
486
+ }
444
487
  /**
445
488
  * Update credit grant external settlement status
446
489
  *
@@ -0,0 +1,18 @@
1
+ import { type Client } from '../core.js';
2
+ import { type Result, type RequestOptions } from '../lib/types.js';
3
+ import type { QueryGovernanceAccessRequest, QueryGovernanceAccessResponse } from '../models/operations/governance.js';
4
+ /**
5
+ * Query governance access
6
+ *
7
+ * Query feature access for a list of customers.
8
+ *
9
+ * The endpoint resolves each provided identifier to a customer and returns the
10
+ * access status for the requested features, plus optional credit balance
11
+ * availability.
12
+ *
13
+ * _Designed to be called on a fixed refresh interval and the query response is
14
+ * intended to be cached._
15
+ *
16
+ * POST /openmeter/governance/query
17
+ */
18
+ export declare function queryGovernanceAccess(client: Client, req: QueryGovernanceAccessRequest, options?: RequestOptions): Promise<Result<QueryGovernanceAccessResponse>>;
@@ -0,0 +1,48 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
+ import { http } from '../core.js';
3
+ import { request } from '../lib/request.js';
4
+ import { toURLSearchParams } from '../lib/encodings.js';
5
+ import { toWire, fromWire, assertValid } from '../lib/wire.js';
6
+ import * as schemas from '../models/schemas.js';
7
+ /**
8
+ * Query governance access
9
+ *
10
+ * Query feature access for a list of customers.
11
+ *
12
+ * The endpoint resolves each provided identifier to a customer and returns the
13
+ * access status for the requested features, plus optional credit balance
14
+ * availability.
15
+ *
16
+ * _Designed to be called on a fixed refresh interval and the query response is
17
+ * intended to be cached._
18
+ *
19
+ * POST /openmeter/governance/query
20
+ */
21
+ export function queryGovernanceAccess(client, req, options) {
22
+ return request(() => {
23
+ const body = toWire(req.body, schemas.queryGovernanceAccessBody);
24
+ if (client._options.validate) {
25
+ assertValid(schemas.queryGovernanceAccessBodyWire, body);
26
+ }
27
+ const query = toWire({
28
+ page: req.page,
29
+ }, schemas.queryGovernanceAccessQueryParams);
30
+ if (client._options.validate) {
31
+ assertValid(schemas.queryGovernanceAccessQueryParamsWire, query);
32
+ }
33
+ const searchParams = toURLSearchParams(query);
34
+ return http(client)
35
+ .post('openmeter/governance/query', {
36
+ ...options,
37
+ searchParams,
38
+ json: body,
39
+ })
40
+ .json()
41
+ .then((data) => {
42
+ if (client._options.validate) {
43
+ assertValid(schemas.queryGovernanceAccessResponseWire, data);
44
+ }
45
+ return fromWire(data, schemas.queryGovernanceAccessResponse);
46
+ });
47
+ });
48
+ }
@@ -5,6 +5,7 @@ export * from './entitlements.js';
5
5
  export * from './subscriptions.js';
6
6
  export * from './apps.js';
7
7
  export * from './billing.js';
8
+ export * from './invoices.js';
8
9
  export * from './tax.js';
9
10
  export * from './currencies.js';
10
11
  export * from './features.js';
@@ -13,3 +14,4 @@ export * from './plans.js';
13
14
  export * from './addons.js';
14
15
  export * from './planAddons.js';
15
16
  export * from './defaults.js';
17
+ export * from './governance.js';
@@ -6,6 +6,7 @@ export * from './entitlements.js';
6
6
  export * from './subscriptions.js';
7
7
  export * from './apps.js';
8
8
  export * from './billing.js';
9
+ export * from './invoices.js';
9
10
  export * from './tax.js';
10
11
  export * from './currencies.js';
11
12
  export * from './features.js';
@@ -14,3 +15,4 @@ export * from './plans.js';
14
15
  export * from './addons.js';
15
16
  export * from './planAddons.js';
16
17
  export * from './defaults.js';
18
+ export * from './governance.js';
@@ -0,0 +1,51 @@
1
+ import { type Client } from '../core.js';
2
+ import { type Result, type RequestOptions } from '../lib/types.js';
3
+ import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse } from '../models/operations/invoices.js';
4
+ /**
5
+ * List billing invoices
6
+ *
7
+ * List billing invoices.
8
+ *
9
+ * Returns a page of invoices. Gathering invoices are never included. Use `filter`
10
+ * to narrow by status, customer, dates, or service period start. Use `sort` to
11
+ * control ordering.
12
+ *
13
+ * GET /openmeter/billing/invoices
14
+ */
15
+ export declare function listInvoices(client: Client, req?: ListInvoicesRequest, options?: RequestOptions): Promise<Result<ListInvoicesResponse>>;
16
+ /**
17
+ * Get a billing invoice
18
+ *
19
+ * Get a billing invoice by ID.
20
+ *
21
+ * Returns the full invoice resource including line items, status details, totals,
22
+ * and workflow configuration snapshot.
23
+ *
24
+ * GET /openmeter/billing/invoices/{invoiceId}
25
+ */
26
+ export declare function getInvoice(client: Client, req: GetInvoiceRequest, options?: RequestOptions): Promise<Result<GetInvoiceResponse>>;
27
+ /**
28
+ * Update a billing invoice
29
+ *
30
+ * Update a billing invoice.
31
+ *
32
+ * Only the mutable fields of the invoice can be edited: description, labels,
33
+ * supplier, customer, workflow settings, and top-level lines. Top-level lines are
34
+ * matched by `id`; lines without an `id` are created, and existing lines omitted
35
+ * from `lines` are deleted. Detailed (child) lines are always computed and cannot
36
+ * be edited directly. Only invoices in draft status can be updated.
37
+ *
38
+ * PUT /openmeter/billing/invoices/{invoiceId}
39
+ */
40
+ export declare function updateInvoice(client: Client, req: UpdateInvoiceRequest, options?: RequestOptions): Promise<Result<UpdateInvoiceResponse>>;
41
+ /**
42
+ * Delete a billing invoice
43
+ *
44
+ * Delete a billing invoice.
45
+ *
46
+ * Only standard invoices in draft status can be deleted. Deleting an invoice will
47
+ * also delete all associated line items and workflow configuration.
48
+ *
49
+ * DELETE /openmeter/billing/invoices/{invoiceId}
50
+ */
51
+ export declare function deleteInvoice(client: Client, req: DeleteInvoiceRequest, options?: RequestOptions): Promise<Result<DeleteInvoiceResponse>>;
@@ -0,0 +1,125 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
+ import { http } from '../core.js';
3
+ import { request } from '../lib/request.js';
4
+ import { toURLSearchParams, encodeSort } from '../lib/encodings.js';
5
+ import { toWire, fromWire, assertValid, toSnakeCase } from '../lib/wire.js';
6
+ import * as schemas from '../models/schemas.js';
7
+ /**
8
+ * List billing invoices
9
+ *
10
+ * List billing invoices.
11
+ *
12
+ * Returns a page of invoices. Gathering invoices are never included. Use `filter`
13
+ * to narrow by status, customer, dates, or service period start. Use `sort` to
14
+ * control ordering.
15
+ *
16
+ * GET /openmeter/billing/invoices
17
+ */
18
+ export function listInvoices(client, req = {}, options) {
19
+ return request(() => {
20
+ const query = toWire({
21
+ page: req.page,
22
+ sort: encodeSort(req.sort, toSnakeCase),
23
+ filter: req.filter,
24
+ }, schemas.listInvoicesQueryParams);
25
+ if (client._options.validate) {
26
+ assertValid(schemas.listInvoicesQueryParamsWire, query);
27
+ }
28
+ const searchParams = toURLSearchParams(query);
29
+ return http(client)
30
+ .get('openmeter/billing/invoices', { ...options, searchParams })
31
+ .json()
32
+ .then((data) => {
33
+ if (client._options.validate) {
34
+ assertValid(schemas.listInvoicesResponseWire, data);
35
+ }
36
+ return fromWire(data, schemas.listInvoicesResponse);
37
+ });
38
+ });
39
+ }
40
+ /**
41
+ * Get a billing invoice
42
+ *
43
+ * Get a billing invoice by ID.
44
+ *
45
+ * Returns the full invoice resource including line items, status details, totals,
46
+ * and workflow configuration snapshot.
47
+ *
48
+ * GET /openmeter/billing/invoices/{invoiceId}
49
+ */
50
+ export function getInvoice(client, req, options) {
51
+ return request(() => {
52
+ const path = `openmeter/billing/invoices/${(() => {
53
+ if (req.invoiceId === undefined) {
54
+ throw new Error('missing path parameter: invoiceId');
55
+ }
56
+ return encodeURIComponent(String(req.invoiceId));
57
+ })()}`;
58
+ return http(client)
59
+ .get(path, options)
60
+ .json()
61
+ .then((data) => {
62
+ if (client._options.validate) {
63
+ assertValid(schemas.getInvoiceResponseWire, data);
64
+ }
65
+ return fromWire(data, schemas.getInvoiceResponse);
66
+ });
67
+ });
68
+ }
69
+ /**
70
+ * Update a billing invoice
71
+ *
72
+ * Update a billing invoice.
73
+ *
74
+ * Only the mutable fields of the invoice can be edited: description, labels,
75
+ * supplier, customer, workflow settings, and top-level lines. Top-level lines are
76
+ * matched by `id`; lines without an `id` are created, and existing lines omitted
77
+ * from `lines` are deleted. Detailed (child) lines are always computed and cannot
78
+ * be edited directly. Only invoices in draft status can be updated.
79
+ *
80
+ * PUT /openmeter/billing/invoices/{invoiceId}
81
+ */
82
+ export function updateInvoice(client, req, options) {
83
+ return request(() => {
84
+ const path = `openmeter/billing/invoices/${(() => {
85
+ if (req.invoiceId === undefined) {
86
+ throw new Error('missing path parameter: invoiceId');
87
+ }
88
+ return encodeURIComponent(String(req.invoiceId));
89
+ })()}`;
90
+ const body = toWire(req.body, schemas.updateInvoiceBody);
91
+ if (client._options.validate) {
92
+ assertValid(schemas.updateInvoiceBodyWire, body);
93
+ }
94
+ return http(client)
95
+ .put(path, { ...options, json: body })
96
+ .json()
97
+ .then((data) => {
98
+ if (client._options.validate) {
99
+ assertValid(schemas.updateInvoiceResponseWire, data);
100
+ }
101
+ return fromWire(data, schemas.updateInvoiceResponse);
102
+ });
103
+ });
104
+ }
105
+ /**
106
+ * Delete a billing invoice
107
+ *
108
+ * Delete a billing invoice.
109
+ *
110
+ * Only standard invoices in draft status can be deleted. Deleting an invoice will
111
+ * also delete all associated line items and workflow configuration.
112
+ *
113
+ * DELETE /openmeter/billing/invoices/{invoiceId}
114
+ */
115
+ export function deleteInvoice(client, req, options) {
116
+ return request(async () => {
117
+ const path = `openmeter/billing/invoices/${(() => {
118
+ if (req.invoiceId === undefined) {
119
+ throw new Error('missing path parameter: invoiceId');
120
+ }
121
+ return encodeURIComponent(String(req.invoiceId));
122
+ })()}`;
123
+ await http(client).delete(path, options);
124
+ });
125
+ }
package/dist/index.d.ts CHANGED
@@ -31,6 +31,7 @@ export type * from './models/operations/entitlements.js';
31
31
  export type * from './models/operations/subscriptions.js';
32
32
  export type * from './models/operations/apps.js';
33
33
  export type * from './models/operations/billing.js';
34
+ export type * from './models/operations/invoices.js';
34
35
  export type * from './models/operations/tax.js';
35
36
  export type * from './models/operations/currencies.js';
36
37
  export type * from './models/operations/features.js';
@@ -39,4 +40,5 @@ export type * from './models/operations/plans.js';
39
40
  export type * from './models/operations/addons.js';
40
41
  export type * from './models/operations/planAddons.js';
41
42
  export type * from './models/operations/defaults.js';
42
- export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, TaxConfigStripe, TaxConfigExternalInvoicing, ChargeFlatFeeDiscounts, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, WorkflowCollectionAlignmentSubscription, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, InvoiceLineExternalReferences, UpdateLabels, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CurrencyFiat, ListCostBasesParamsFilter, CurrencyAmount, PriceFlat, PriceUnit, RateCardDiscounts, Totals, SpendCommitments, InvoiceLineCreditsApplied, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, FeatureManualUnitCost, FeatureLlmUnitCostPricing, LlmCostModelPricing, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateResourceReference, TaxCodeReference, CreditGrantInvoiceReference, BillingCustomerReference, SubscriptionReference, AddonReference, FeatureReference, AppReference, ChargeReference, UpdateResourceReference, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, CreateCreditGrantPurchase, RateCardMeteredEntitlement, RecurringPeriod, CreditGrantPurchase, ListCreditGrantsParamsFilter, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListPlansParamsFilter, SubscriptionCreate, RateCardProrationConfiguration, Subscription, UnitConfig, AppCatalogItem, TaxCodeAppMapping, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, WorkflowInvoicingSettings, InvoiceValidationIssue, InvoiceAvailableActions, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, CurrencyCustom, CreateCurrencyCustomRequest, GovernanceQueryRequest, GovernanceFeatureAccessReason, GovernanceQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, PriceTier, ChargeTotals, UpdatePriceTier, FeatureLlmUnitCost, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, TaxConfig, RateCardTaxConfig, OrganizationDefaultTaxCodes, PlanAddon, ProfileAppReferences, InvoiceWorkflowAppsReferences, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListInvoicesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, WorkflowCollectionAlignmentAnchored, ChargeFlatFeeSystemIntent, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionCancel, SubscriptionChange, InvoiceUsageQuantityDetail, AppStripe, AppSandbox, AppExternalInvoicing, TaxCode, InvoiceWorkflow, InvoiceStatusDetails, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, GovernanceFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreditGrant, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Party, Supplier, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, TaxCodePagePaginatedResponse, InvoiceWorkflowSettings, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, CurrencyPagePaginatedResponse, GovernanceQueryResult, Feature, CreditGrantPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, AppPagePaginatedResponse, ProfileApps, GovernanceQueryResponse, ChargeFlatFee, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, RateCard, InvoiceLineRateCard, UpdateInvoiceLineRateCard, FeaturePagePaginatedResponse, Workflow, ChargeUsageBased, SubscriptionAddonRateCard, PlanPhase, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, SubscriptionAddon, Plan, UpsertPlanRequest, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, ChargePagePaginatedResponse, SubscriptionAddonPagePaginatedResponse, PlanPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, InvoicePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, SubscriptionEditTiming, WorkflowPaymentSettings, InvalidParameter, RateCardEntitlement, Currency, FeatureUnitCost, WorkflowCollectionAlignment, App, Price, CreateChargeRequest, Charge, SortQueryInput, BaseErrorInput, WorkflowPaymentSendInvoiceSettingsInput, InvoiceWorkflowInvoicingSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, CreateCreditGrantPurchaseInput, RateCardMeteredEntitlementInput, CreditGrantPurchaseInput, UnitConfigInput, WorkflowInvoicingSettingsInput, GovernanceQueryRequestInput, IngestedEventInput, SubscriptionCancelInput, InvoiceUsageQuantityDetailInput, InvoiceWorkflowInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantRequestInput, CreditGrantInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreditGrantPagePaginatedResponseInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, RateCardInput, WorkflowInput, SubscriptionAddonRateCardInput, PlanPhaseInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, SubscriptionAddonInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionAddonPagePaginatedResponseInput, PlanPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, InvoicePagePaginatedResponseInput, WorkflowPaymentSettingsInput, RateCardEntitlementInput, } from './models/types.js';
43
+ export type * from './models/operations/governance.js';
44
+ export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, TaxConfigStripe, TaxConfigExternalInvoicing, ChargeFlatFeeDiscounts, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, WorkflowCollectionAlignmentSubscription, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, InvoiceLineExternalReferences, UpdateLabels, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CurrencyFiat, ListCostBasesParamsFilter, CurrencyAmount, PriceFlat, PriceUnit, RateCardDiscounts, Totals, SpendCommitments, InvoiceLineCreditsApplied, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, FeatureManualUnitCost, FeatureLlmUnitCostPricing, LlmCostModelPricing, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateResourceReference, TaxCodeReference, CreditGrantInvoiceReference, BillingCustomerReference, SubscriptionReference, AddonReference, FeatureReference, AppReference, ChargeReference, UpdateResourceReference, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, CreateCreditGrantPurchase, RateCardMeteredEntitlement, RecurringPeriod, CreditGrantPurchase, ListCreditGrantsParamsFilter, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListPlansParamsFilter, SubscriptionCreate, RateCardProrationConfiguration, Subscription, UnitConfig, AppCatalogItem, TaxCodeAppMapping, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, WorkflowInvoicingSettings, InvoiceValidationIssue, InvoiceAvailableActions, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, CurrencyCustom, CreateCurrencyCustomRequest, GovernanceQueryRequest, GovernanceFeatureAccessReason, GovernanceQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, PriceTier, ChargeTotals, UpdatePriceTier, FeatureLlmUnitCost, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, TaxConfig, RateCardTaxConfig, OrganizationDefaultTaxCodes, PlanAddon, ProfileAppReferences, InvoiceWorkflowAppsReferences, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListInvoicesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, WorkflowCollectionAlignmentAnchored, ChargeFlatFeeSystemIntent, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionCancel, SubscriptionChange, InvoiceUsageQuantityDetail, AppStripe, AppSandbox, AppExternalInvoicing, TaxCode, InvoiceWorkflow, InvoiceStatusDetails, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, GovernanceFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreditGrant, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Party, Supplier, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, TaxCodePagePaginatedResponse, InvoiceWorkflowSettings, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, CurrencyPagePaginatedResponse, GovernanceQueryResult, Feature, CreditGrantPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, AppPagePaginatedResponse, ProfileApps, GovernanceQueryResponse, ChargeFlatFee, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, RateCard, InvoiceLineRateCard, UpdateInvoiceLineRateCard, FeaturePagePaginatedResponse, Workflow, ChargeUsageBased, SubscriptionAddonRateCard, PlanPhase, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, SubscriptionAddon, Plan, UpsertPlanRequest, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, ChargePagePaginatedResponse, SubscriptionAddonPagePaginatedResponse, PlanPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, InvoicePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, SubscriptionEditTiming, WorkflowPaymentSettings, UpdateBillingWorkflowPaymentSettings, InvalidParameter, RateCardEntitlement, Currency, FeatureUnitCost, WorkflowCollectionAlignment, App, Price, UpdatePrice, CreateChargeRequest, Charge, InvoiceLine, UpdateInvoiceLine, Invoice, SortQueryInput, BaseErrorInput, WorkflowPaymentSendInvoiceSettingsInput, InvoiceWorkflowInvoicingSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, CreateCreditGrantPurchaseInput, RateCardMeteredEntitlementInput, CreditGrantPurchaseInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, GovernanceQueryRequestInput, IngestedEventInput, SubscriptionCancelInput, InvoiceUsageQuantityDetailInput, InvoiceWorkflowInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantRequestInput, CreditGrantInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreditGrantPagePaginatedResponseInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, RateCardInput, WorkflowInput, SubscriptionAddonRateCardInput, PlanPhaseInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, SubscriptionAddonInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionAddonPagePaginatedResponseInput, PlanPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, InvoicePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, InvoiceLineInput, InvoiceInput, UpdateInvoiceRequestInput, } from './models/types.js';
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0-beta-7280f75db66f";
1
+ export declare const SDK_VERSION = "1.0.0-beta-05de7df7a13f";
@@ -2,4 +2,4 @@
2
2
  // The committed value is a dev placeholder. The publish flow
3
3
  // (`make -C api/spec publish-aip-sdk`) stamps the real release version here
4
4
  // before `pnpm publish`, after `pnpm version` updates package.json.
5
- export const SDK_VERSION = '1.0.0-beta-7280f75db66f';
5
+ export const SDK_VERSION = '1.0.0-beta-05de7df7a13f';
@@ -1,5 +1,5 @@
1
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
2
- import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequest, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody } from '../types.js';
2
+ import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequest, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
3
3
  export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
4
4
  export type CreateCustomerResponse = Customer;
5
5
  export type GetCustomerRequest = {
@@ -106,6 +106,12 @@ export type CreateCreditAdjustmentRequest = AcceptDateStrings<{
106
106
  body: CreateCreditAdjustmentRequestBody;
107
107
  }>;
108
108
  export type CreateCreditAdjustmentResponse = CreditAdjustment;
109
+ export type VoidCreditGrantRequest = AcceptDateStrings<{
110
+ customerId: string;
111
+ creditGrantId: string;
112
+ body: VoidCreditGrantRequestInput;
113
+ }>;
114
+ export type VoidCreditGrantResponse = CreditGrant;
109
115
  export type UpdateCreditGrantExternalSettlementRequest = AcceptDateStrings<{
110
116
  customerId: string;
111
117
  creditGrantId: string;
@@ -0,0 +1,9 @@
1
+ import type { AcceptDateStrings } from '../../lib/wire.js';
2
+ import type { CursorPaginationQueryPage, GovernanceQueryRequestInput, GovernanceQueryResponse } from '../types.js';
3
+ export interface QueryGovernanceAccessQuery {
4
+ page?: CursorPaginationQueryPage;
5
+ }
6
+ export type QueryGovernanceAccessRequest = AcceptDateStrings<{
7
+ body: GovernanceQueryRequestInput;
8
+ } & QueryGovernanceAccessQuery>;
9
+ export type QueryGovernanceAccessResponse = GovernanceQueryResponse;
@@ -0,0 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
+ export {};