@openmeter/client 1.0.0-beta-c2050360536d → 1.0.0-beta-3bb98f61c98f
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 +4 -3
- package/dist/funcs/charges.d.ts +11 -1
- package/dist/funcs/charges.js +45 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/charges.d.ts +9 -1
- package/dist/models/schemas.d.ts +4497 -1785
- package/dist/models/schemas.js +20 -0
- package/dist/sdk/charges.d.ts +11 -1
- package/dist/sdk/charges.js +13 -1
- package/package.json +1 -1
package/dist/models/schemas.js
CHANGED
|
@@ -8802,6 +8802,16 @@ export const snapshotQuantitiesInvoicePathParams = z.object({
|
|
|
8802
8802
|
invoiceId: ulid,
|
|
8803
8803
|
});
|
|
8804
8804
|
export const snapshotQuantitiesInvoiceResponse = invoice;
|
|
8805
|
+
export const getChargePathParams = z.object({
|
|
8806
|
+
chargeId: ulid,
|
|
8807
|
+
});
|
|
8808
|
+
export const getChargeQueryParams = z.object({
|
|
8809
|
+
expand: z
|
|
8810
|
+
.array(chargesExpand)
|
|
8811
|
+
.optional()
|
|
8812
|
+
.describe('Expand related entities, realization details, or real-time usage.'),
|
|
8813
|
+
});
|
|
8814
|
+
export const getChargeResponse = charge;
|
|
8805
8815
|
export const listChargesQueryParams = z.object({
|
|
8806
8816
|
page: z
|
|
8807
8817
|
.object({
|
|
@@ -18248,6 +18258,16 @@ export const snapshotQuantitiesInvoicePathParamsWire = z.object({
|
|
|
18248
18258
|
invoiceId: ulidWire,
|
|
18249
18259
|
});
|
|
18250
18260
|
export const snapshotQuantitiesInvoiceResponseWire = invoiceWire;
|
|
18261
|
+
export const getChargePathParamsWire = z.object({
|
|
18262
|
+
chargeId: ulidWire,
|
|
18263
|
+
});
|
|
18264
|
+
export const getChargeQueryParamsWire = z.object({
|
|
18265
|
+
expand: z
|
|
18266
|
+
.array(chargesExpandWire)
|
|
18267
|
+
.optional()
|
|
18268
|
+
.describe('Expand related entities, realization details, or real-time usage.'),
|
|
18269
|
+
});
|
|
18270
|
+
export const getChargeResponseWire = chargeWire;
|
|
18251
18271
|
export const listChargesQueryParamsWire = z.object({
|
|
18252
18272
|
page: z
|
|
18253
18273
|
.strictObject({
|
package/dist/sdk/charges.d.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { ListChargesRequest, ListChargesResponse } from '../models/operations/charges.js';
|
|
3
|
+
import type { GetChargeRequest, GetChargeResponse, ListChargesRequest, ListChargesResponse } from '../models/operations/charges.js';
|
|
4
4
|
import type { Charge } from '../models/types.js';
|
|
5
5
|
export declare class Charges {
|
|
6
6
|
private readonly _client;
|
|
7
7
|
constructor(_client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Get charge
|
|
10
|
+
*
|
|
11
|
+
* Get a flat fee or usage-based charge by ID.
|
|
12
|
+
*
|
|
13
|
+
* Deleted charges are returned with their status and realization history.
|
|
14
|
+
*
|
|
15
|
+
* GET /openmeter/charges/{chargeId}
|
|
16
|
+
*/
|
|
17
|
+
get(request: GetChargeRequest, options?: RequestOptions): Promise<GetChargeResponse>;
|
|
8
18
|
/**
|
|
9
19
|
* List charges
|
|
10
20
|
*
|
package/dist/sdk/charges.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
2
|
import { unwrap } from '../lib/types.js';
|
|
3
3
|
import { paginatePages } from '../lib/paginate.js';
|
|
4
|
-
import { listCharges } from '../funcs/charges.js';
|
|
4
|
+
import { getCharge, listCharges } from '../funcs/charges.js';
|
|
5
5
|
export class Charges {
|
|
6
6
|
_client;
|
|
7
7
|
constructor(_client) {
|
|
8
8
|
this._client = _client;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Get charge
|
|
12
|
+
*
|
|
13
|
+
* Get a flat fee or usage-based charge by ID.
|
|
14
|
+
*
|
|
15
|
+
* Deleted charges are returned with their status and realization history.
|
|
16
|
+
*
|
|
17
|
+
* GET /openmeter/charges/{chargeId}
|
|
18
|
+
*/
|
|
19
|
+
async get(request, options) {
|
|
20
|
+
return unwrap(await getCharge(this._client, request, options));
|
|
21
|
+
}
|
|
10
22
|
/**
|
|
11
23
|
* List charges
|
|
12
24
|
*
|