@openmeter/client 1.0.0-beta-090648562be8 → 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/index.d.ts +1 -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/operations/entitlementAccess.d.ts +3 -2
- package/dist/models/operations/events.d.ts +3 -2
- package/dist/models/schemas.d.ts +4554 -1794
- package/dist/models/schemas.js +572 -70
- package/dist/models/types.d.ts +45 -5
- package/dist/sdk/charges.d.ts +11 -1
- package/dist/sdk/charges.js +13 -1
- package/package.json +1 -1
package/dist/models/types.d.ts
CHANGED
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
* "mesh", "kic", or "\_".
|
|
7
7
|
*/
|
|
8
8
|
export type Labels = Record<string, string>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Determines which page of the metering event list to retrieve. A page holds at
|
|
11
|
+
* most 100 events.
|
|
12
|
+
*/
|
|
13
|
+
export interface ListEventsPage {
|
|
11
14
|
/** The number of items to include per page. */
|
|
12
15
|
size?: number;
|
|
13
16
|
/** Request the next page of data, starting with the item after this parameter. */
|
|
@@ -169,6 +172,15 @@ export interface VersionFilter {
|
|
|
169
172
|
/** Match this version and earlier versions. */
|
|
170
173
|
lte?: number;
|
|
171
174
|
}
|
|
175
|
+
/** Determines which page of the collection to retrieve. */
|
|
176
|
+
export interface CursorPaginationQueryPage {
|
|
177
|
+
/** The number of items to include per page. */
|
|
178
|
+
size?: number;
|
|
179
|
+
/** Request the next page of data, starting with the item after this parameter. */
|
|
180
|
+
after?: string;
|
|
181
|
+
/** Request the previous page of data, starting with the item before this parameter. */
|
|
182
|
+
before?: string;
|
|
183
|
+
}
|
|
172
184
|
/** Free price. */
|
|
173
185
|
export interface PriceFree {
|
|
174
186
|
/** The type of the price. */
|
|
@@ -406,6 +418,18 @@ export interface ProductCatalogValidationError {
|
|
|
406
418
|
/** The path to the field. */
|
|
407
419
|
field: string;
|
|
408
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* Determines which page of the entitlement access query to retrieve. A page holds
|
|
423
|
+
* at most 100 customers.
|
|
424
|
+
*/
|
|
425
|
+
export interface EntitlementAccessQueryPage {
|
|
426
|
+
/** The number of items to include per page. */
|
|
427
|
+
size?: number;
|
|
428
|
+
/** Request the next page of data, starting with the item after this parameter. */
|
|
429
|
+
after?: string;
|
|
430
|
+
/** Request the previous page of data, starting with the item before this parameter. */
|
|
431
|
+
before?: string;
|
|
432
|
+
}
|
|
409
433
|
/** List of customer identifiers to evaluate access for. */
|
|
410
434
|
export interface EntitlementAccessQueryRequestCustomers {
|
|
411
435
|
/**
|
|
@@ -1176,9 +1200,13 @@ export interface QueryFilterNumeric {
|
|
|
1176
1200
|
/** Combines the provided filters with a logical OR. */
|
|
1177
1201
|
or?: QueryFilterNumeric[];
|
|
1178
1202
|
}
|
|
1179
|
-
/**
|
|
1180
|
-
|
|
1181
|
-
|
|
1203
|
+
/**
|
|
1204
|
+
* Cursor pagination for the metering event list, with a smaller page size limit
|
|
1205
|
+
* than the common one.
|
|
1206
|
+
*/
|
|
1207
|
+
export interface ListEventsPagination {
|
|
1208
|
+
/** Determines which page of the collection to retrieve. */
|
|
1209
|
+
page?: ListEventsPage;
|
|
1182
1210
|
}
|
|
1183
1211
|
/** Filter options for listing meters. */
|
|
1184
1212
|
export interface ListMetersParamsFilter {
|
|
@@ -2303,6 +2331,10 @@ export interface VoidCreditGrantRequest {
|
|
|
2303
2331
|
*/
|
|
2304
2332
|
paymentAdjustment: 'none';
|
|
2305
2333
|
}
|
|
2334
|
+
/** Cursor page query. */
|
|
2335
|
+
export interface CursorPaginationQuery {
|
|
2336
|
+
page?: CursorPaginationQueryPage;
|
|
2337
|
+
}
|
|
2306
2338
|
/** The pro-rating configuration of a subscription. */
|
|
2307
2339
|
export interface SubscriptionProRatingConfig {
|
|
2308
2340
|
/** Whether pro-rating is enabled. */
|
|
@@ -2584,6 +2616,14 @@ export interface ListCurrenciesParamsFilter {
|
|
|
2584
2616
|
type?: 'fiat' | 'custom';
|
|
2585
2617
|
code?: StringFieldFilter;
|
|
2586
2618
|
}
|
|
2619
|
+
/**
|
|
2620
|
+
* Cursor pagination for the entitlement access query, with a smaller page size
|
|
2621
|
+
* limit than the common one.
|
|
2622
|
+
*/
|
|
2623
|
+
export interface EntitlementAccessQueryPagination {
|
|
2624
|
+
/** Determines which page of the collection to retrieve. */
|
|
2625
|
+
page?: EntitlementAccessQueryPage;
|
|
2626
|
+
}
|
|
2587
2627
|
/** Query to evaluate feature access for a list of customers. */
|
|
2588
2628
|
export interface EntitlementAccessQueryRequest {
|
|
2589
2629
|
/**
|
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
|
*
|