@openmeter/client 1.0.0-beta.232 → 1.0.0-beta.233
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 +76 -45
- package/dist/funcs/apps.js +7 -2
- package/dist/funcs/billing.js +7 -2
- package/dist/funcs/charges.d.ts +14 -0
- package/dist/funcs/charges.js +42 -0
- package/dist/funcs/{governance.d.ts → entitlementAccess.d.ts} +4 -4
- package/dist/funcs/{governance.js → entitlementAccess.js} +10 -10
- package/dist/funcs/entitlements.d.ts +9 -1
- package/dist/funcs/entitlements.js +50 -1
- package/dist/funcs/index.d.ts +2 -1
- package/dist/funcs/index.js +2 -1
- package/dist/funcs/planAddons.js +7 -2
- package/dist/funcs/subscriptions.d.ts +60 -1
- package/dist/funcs/subscriptions.js +204 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/lib/wire.js +62 -6
- package/dist/models/operations/apps.d.ts +17 -1
- package/dist/models/operations/billing.d.ts +19 -1
- package/dist/models/operations/charges.d.ts +54 -0
- package/dist/models/operations/customers.d.ts +19 -5
- package/dist/models/operations/entitlementAccess.d.ts +9 -0
- package/dist/models/operations/entitlementAccess.js +2 -0
- package/dist/models/operations/entitlements.d.ts +18 -1
- package/dist/models/operations/planAddons.d.ts +14 -1
- package/dist/models/operations/subscriptions.d.ts +27 -3
- package/dist/models/schemas.d.ts +46830 -22570
- package/dist/models/schemas.js +3175 -1508
- package/dist/models/types.d.ts +4115 -1896
- package/dist/sdk/apps.d.ts +1 -62
- package/dist/sdk/apps.js +1 -76
- package/dist/sdk/customers.d.ts +2 -56
- package/dist/sdk/customers.js +1 -67
- package/dist/sdk/entitlements.d.ts +9 -1
- package/dist/sdk/entitlements.js +11 -1
- package/dist/sdk/internal.d.ts +183 -22
- package/dist/sdk/internal.js +231 -26
- package/dist/sdk/invoices.d.ts +112 -0
- package/dist/sdk/invoices.js +115 -0
- package/dist/sdk/planAddons.d.ts +1 -20
- package/dist/sdk/planAddons.js +1 -24
- package/dist/sdk/sdk.d.ts +3 -0
- package/dist/sdk/sdk.js +5 -0
- package/dist/sdk/subscriptions.d.ts +20 -1
- package/dist/sdk/subscriptions.js +24 -1
- package/package.json +1 -1
- package/dist/models/operations/governance.d.ts +0 -9
- /package/dist/models/operations/{governance.js → charges.js} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { CursorPaginationQueryPage, EntitlementAccessQueryRequestInput, EntitlementAccessQueryResponse } from '../types.js';
|
|
3
|
+
export interface QueryEntitlementAccessQuery {
|
|
4
|
+
page?: CursorPaginationQueryPage;
|
|
5
|
+
}
|
|
6
|
+
export type QueryEntitlementAccessRequest = AcceptDateStrings<{
|
|
7
|
+
body: EntitlementAccessQueryRequestInput;
|
|
8
|
+
} & QueryEntitlementAccessQuery>;
|
|
9
|
+
export type QueryEntitlementAccessResponse = EntitlementAccessQueryResponse;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { EntitlementAccessResult, ListCustomerEntitlementAccessResponseData } from '../types.js';
|
|
2
3
|
export type ListCustomerEntitlementAccessRequest = {
|
|
3
4
|
customerId: string;
|
|
4
5
|
};
|
|
5
6
|
export type ListCustomerEntitlementAccessResponse = ListCustomerEntitlementAccessResponseData;
|
|
7
|
+
export interface GetCustomerEntitlementAccessQuery {
|
|
8
|
+
/**
|
|
9
|
+
* Expand computed fields.
|
|
10
|
+
*
|
|
11
|
+
* Supported values are:
|
|
12
|
+
*
|
|
13
|
+
* - `value`: Expand the balance details of a metered entitlement; it sets the
|
|
14
|
+
* `value` field.
|
|
15
|
+
*/
|
|
16
|
+
expand?: 'value'[];
|
|
17
|
+
}
|
|
18
|
+
export type GetCustomerEntitlementAccessRequest = AcceptDateStrings<GetCustomerEntitlementAccessQuery & {
|
|
19
|
+
customerId: string;
|
|
20
|
+
featureKey: string;
|
|
21
|
+
}>;
|
|
22
|
+
export type GetCustomerEntitlementAccessResponse = EntitlementAccessResult;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { CreatePlanAddonRequest as CreatePlanAddonRequestBody, PlanAddon, PlanAddonPagePaginatedResponse, UpsertPlanAddonRequest } from '../types.js';
|
|
2
|
+
import type { CreatePlanAddonRequest as CreatePlanAddonRequestBody, ListPlanAddonsParamsFilter, PlanAddon, PlanAddonPagePaginatedResponse, SortQueryInput, UpsertPlanAddonRequest } from '../types.js';
|
|
3
3
|
export interface ListPlanAddonsQuery {
|
|
4
4
|
/** Determines which page of the collection to retrieve. */
|
|
5
5
|
page?: {
|
|
6
6
|
size?: number;
|
|
7
7
|
number?: number;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Sort plan add-ons returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `id` (default)
|
|
13
|
+
* - `created_at`
|
|
14
|
+
* - `updated_at`
|
|
15
|
+
*
|
|
16
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
17
|
+
* suffix is used to specify a descending order.
|
|
18
|
+
*/
|
|
19
|
+
sort?: SortQueryInput;
|
|
20
|
+
/** Filter plan add-ons returned in the response. */
|
|
21
|
+
filter?: ListPlanAddonsParamsFilter;
|
|
9
22
|
}
|
|
10
23
|
export type ListPlanAddonsRequest = AcceptDateStrings<ListPlanAddonsQuery & {
|
|
11
24
|
planId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput,
|
|
3
|
-
export type CreateSubscriptionRequest = AcceptDateStrings<
|
|
2
|
+
import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionAddonUpdate, SubscriptionCancelInput, SubscriptionChangeInput, SubscriptionChangeResponse, SubscriptionCreateInput, SubscriptionEditInput, SubscriptionMigrateInput, SubscriptionMigrateResponse, SubscriptionPagePaginatedResponse } from '../types.js';
|
|
3
|
+
export type CreateSubscriptionRequest = AcceptDateStrings<SubscriptionCreateInput>;
|
|
4
4
|
export type CreateSubscriptionResponse = Subscription;
|
|
5
5
|
export interface ListSubscriptionsQuery {
|
|
6
6
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -37,11 +37,29 @@ export type UnscheduleCancelationRequest = {
|
|
|
37
37
|
subscriptionId: string;
|
|
38
38
|
};
|
|
39
39
|
export type UnscheduleCancelationResponse = Subscription;
|
|
40
|
+
export type UnscheduleSubscriptionRequest = {
|
|
41
|
+
subscriptionId: string;
|
|
42
|
+
};
|
|
43
|
+
export type UnscheduleSubscriptionResponse = void;
|
|
44
|
+
export type RestoreSubscriptionRequest = {
|
|
45
|
+
subscriptionId: string;
|
|
46
|
+
};
|
|
47
|
+
export type RestoreSubscriptionResponse = Subscription;
|
|
40
48
|
export type ChangeSubscriptionRequest = AcceptDateStrings<{
|
|
41
49
|
subscriptionId: string;
|
|
42
|
-
body:
|
|
50
|
+
body: SubscriptionChangeInput;
|
|
43
51
|
}>;
|
|
44
52
|
export type ChangeSubscriptionResponse = SubscriptionChangeResponse;
|
|
53
|
+
export type MigrateSubscriptionRequest = AcceptDateStrings<{
|
|
54
|
+
subscriptionId: string;
|
|
55
|
+
body: SubscriptionMigrateInput;
|
|
56
|
+
}>;
|
|
57
|
+
export type MigrateSubscriptionResponse = SubscriptionMigrateResponse;
|
|
58
|
+
export type EditSubscriptionRequest = AcceptDateStrings<{
|
|
59
|
+
subscriptionId: string;
|
|
60
|
+
body: SubscriptionEditInput;
|
|
61
|
+
}>;
|
|
62
|
+
export type EditSubscriptionResponse = Subscription;
|
|
45
63
|
export type CreateSubscriptionAddonRequest = AcceptDateStrings<{
|
|
46
64
|
subscriptionId: string;
|
|
47
65
|
body: CreateSubscriptionAddonRequestBody;
|
|
@@ -75,3 +93,9 @@ export type GetSubscriptionAddonRequest = {
|
|
|
75
93
|
subscriptionAddonId: string;
|
|
76
94
|
};
|
|
77
95
|
export type GetSubscriptionAddonResponse = SubscriptionAddon;
|
|
96
|
+
export type UpdateSubscriptionAddonRequest = AcceptDateStrings<{
|
|
97
|
+
subscriptionId: string;
|
|
98
|
+
subscriptionAddonId: string;
|
|
99
|
+
body: SubscriptionAddonUpdate;
|
|
100
|
+
}>;
|
|
101
|
+
export type UpdateSubscriptionAddonResponse = SubscriptionAddon;
|