@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
package/dist/sdk/sdk.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Meters } from './meters.js';
|
|
|
5
5
|
import { Customers } from './customers.js';
|
|
6
6
|
import { Entitlements } from './entitlements.js';
|
|
7
7
|
import { Subscriptions } from './subscriptions.js';
|
|
8
|
+
import { Apps } from './apps.js';
|
|
8
9
|
import { Billing } from './billing.js';
|
|
9
10
|
import { Tax } from './tax.js';
|
|
10
11
|
import { Features } from './features.js';
|
|
@@ -35,6 +36,10 @@ export class OpenMeter extends Client {
|
|
|
35
36
|
get subscriptions() {
|
|
36
37
|
return (this._subscriptions ??= new Subscriptions(this));
|
|
37
38
|
}
|
|
39
|
+
_apps;
|
|
40
|
+
get apps() {
|
|
41
|
+
return (this._apps ??= new Apps(this));
|
|
42
|
+
}
|
|
38
43
|
_billing;
|
|
39
44
|
get billing() {
|
|
40
45
|
return (this._billing ??= new Billing(this));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
3
|
+
import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
4
4
|
import type { Subscription, SubscriptionAddon } from '../models/types.js';
|
|
5
5
|
export declare class Subscriptions {
|
|
6
6
|
private readonly _client;
|
|
@@ -57,6 +57,25 @@ export declare class Subscriptions {
|
|
|
57
57
|
* POST /openmeter/subscriptions/{subscriptionId}/change
|
|
58
58
|
*/
|
|
59
59
|
change(request: ChangeSubscriptionRequest, options?: RequestOptions): Promise<ChangeSubscriptionResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* Edit subscription
|
|
62
|
+
*
|
|
63
|
+
* Edits a running subscription by applying an ordered batch of customizations
|
|
64
|
+
* (adding or removing items, adding, removing, or stretching phases, or
|
|
65
|
+
* unscheduling a pending edit). The changes may take effect immediately or at the
|
|
66
|
+
* next billing cycle. Subscriptions that have add-ons cannot be edited.
|
|
67
|
+
*
|
|
68
|
+
* POST /openmeter/subscriptions/{subscriptionId}/edit
|
|
69
|
+
*/
|
|
70
|
+
edit(request: EditSubscriptionRequest, options?: RequestOptions): Promise<EditSubscriptionResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Create a new subscription add-on
|
|
73
|
+
*
|
|
74
|
+
* Add add-on to a subscription.
|
|
75
|
+
*
|
|
76
|
+
* POST /openmeter/subscriptions/{subscriptionId}/addons
|
|
77
|
+
*/
|
|
78
|
+
createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise<CreateSubscriptionAddonResponse>;
|
|
60
79
|
/**
|
|
61
80
|
* List subscription addons
|
|
62
81
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
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 { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, changeSubscription, listSubscriptionAddons, getSubscriptionAddon, } from '../funcs/subscriptions.js';
|
|
4
|
+
import { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, changeSubscription, editSubscription, createSubscriptionAddon, listSubscriptionAddons, getSubscriptionAddon, } from '../funcs/subscriptions.js';
|
|
5
5
|
export class Subscriptions {
|
|
6
6
|
_client;
|
|
7
7
|
constructor(_client) {
|
|
@@ -73,6 +73,29 @@ export class Subscriptions {
|
|
|
73
73
|
async change(request, options) {
|
|
74
74
|
return unwrap(await changeSubscription(this._client, request, options));
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Edit subscription
|
|
78
|
+
*
|
|
79
|
+
* Edits a running subscription by applying an ordered batch of customizations
|
|
80
|
+
* (adding or removing items, adding, removing, or stretching phases, or
|
|
81
|
+
* unscheduling a pending edit). The changes may take effect immediately or at the
|
|
82
|
+
* next billing cycle. Subscriptions that have add-ons cannot be edited.
|
|
83
|
+
*
|
|
84
|
+
* POST /openmeter/subscriptions/{subscriptionId}/edit
|
|
85
|
+
*/
|
|
86
|
+
async edit(request, options) {
|
|
87
|
+
return unwrap(await editSubscription(this._client, request, options));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create a new subscription add-on
|
|
91
|
+
*
|
|
92
|
+
* Add add-on to a subscription.
|
|
93
|
+
*
|
|
94
|
+
* POST /openmeter/subscriptions/{subscriptionId}/addons
|
|
95
|
+
*/
|
|
96
|
+
async createAddon(request, options) {
|
|
97
|
+
return unwrap(await createSubscriptionAddon(this._client, request, options));
|
|
98
|
+
}
|
|
76
99
|
/**
|
|
77
100
|
* List subscription addons
|
|
78
101
|
*
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
File without changes
|