@openmeter/sdk 1.0.0-beta.21 → 1.0.0-beta.211
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 +38 -150
- package/dist/cjs/index.cjs +18 -0
- package/dist/cjs/index.d.cts +1 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/src/client/apps.cjs +174 -0
- package/dist/cjs/src/client/apps.d.cts +286 -0
- package/dist/cjs/src/client/apps.js.map +1 -0
- package/dist/cjs/src/client/billing.cjs +309 -0
- package/dist/cjs/src/client/billing.d.cts +502 -0
- package/dist/cjs/src/client/billing.js.map +1 -0
- package/dist/cjs/src/client/common.cjs +47 -0
- package/dist/cjs/src/client/common.d.cts +30 -0
- package/dist/cjs/src/client/common.js.map +1 -0
- package/dist/cjs/src/client/customers.cjs +199 -0
- package/dist/cjs/src/client/customers.d.cts +179 -0
- package/dist/cjs/src/client/customers.js.map +1 -0
- package/dist/cjs/src/client/entitlements.cjs +244 -0
- package/dist/cjs/src/client/entitlements.d.cts +472 -0
- package/dist/cjs/src/client/entitlements.js.map +1 -0
- package/dist/cjs/src/client/events.cjs +66 -0
- package/dist/cjs/src/client/events.d.cts +31 -0
- package/dist/cjs/src/client/events.js.map +1 -0
- package/dist/cjs/src/client/features.cjs +78 -0
- package/dist/cjs/src/client/features.d.cts +78 -0
- package/dist/cjs/src/client/features.js.map +1 -0
- package/dist/cjs/src/client/index.cjs +108 -0
- package/dist/cjs/src/client/index.d.cts +45 -0
- package/dist/cjs/src/client/index.js.map +1 -0
- package/dist/cjs/src/client/meters.cjs +96 -0
- package/dist/cjs/src/client/meters.d.cts +99 -0
- package/dist/cjs/src/client/meters.js.map +1 -0
- package/dist/cjs/src/client/notifications.cjs +249 -0
- package/dist/cjs/src/client/notifications.d.cts +219 -0
- package/dist/cjs/src/client/notifications.js.map +1 -0
- package/dist/cjs/src/client/plans.cjs +127 -0
- package/dist/cjs/src/client/plans.d.cts +142 -0
- package/dist/cjs/src/client/plans.js.map +1 -0
- package/dist/cjs/src/client/portal.cjs +55 -0
- package/dist/cjs/src/client/portal.d.cts +48 -0
- package/dist/cjs/src/client/portal.js.map +1 -0
- package/dist/cjs/src/client/schemas.cjs +3 -0
- package/dist/cjs/src/client/schemas.d.cts +22438 -0
- package/dist/cjs/src/client/schemas.js.map +1 -0
- package/dist/cjs/src/client/subjects.cjs +76 -0
- package/dist/cjs/src/client/subjects.d.cts +70 -0
- package/dist/cjs/src/client/subjects.js.map +1 -0
- package/dist/cjs/src/client/subscriptions.cjs +116 -0
- package/dist/cjs/src/client/subscriptions.d.cts +147 -0
- package/dist/cjs/src/client/subscriptions.js.map +1 -0
- package/dist/cjs/src/client/utils.cjs +69 -0
- package/dist/cjs/src/client/utils.d.cts +12 -0
- package/dist/cjs/src/client/utils.js.map +1 -0
- package/dist/cjs/src/portal/index.cjs +60 -0
- package/dist/cjs/src/portal/index.d.cts +43 -0
- package/dist/cjs/src/portal/index.js.map +1 -0
- package/dist/cjs/src/react/context.cjs +35 -0
- package/dist/cjs/src/react/context.d.cts +9 -0
- package/dist/cjs/src/react/context.js.map +1 -0
- package/dist/cjs/tsconfig.341d9ef4.tsbuildinfo +1 -0
- package/dist/cjs/tsconfig.523d9ac8.tsbuildinfo +1 -0
- package/dist/index.d.ts +1 -14
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -0
- package/dist/src/client/apps.d.ts +286 -0
- package/dist/src/client/apps.js +168 -0
- package/dist/src/client/apps.js.map +1 -0
- package/dist/src/client/billing.d.ts +502 -0
- package/dist/src/client/billing.js +302 -0
- package/dist/src/client/billing.js.map +1 -0
- package/dist/src/client/common.d.ts +30 -0
- package/dist/src/client/common.js +42 -0
- package/dist/src/client/common.js.map +1 -0
- package/dist/src/client/customers.d.ts +179 -0
- package/dist/src/client/customers.js +193 -0
- package/dist/src/client/customers.js.map +1 -0
- package/dist/src/client/entitlements.d.ts +472 -0
- package/dist/src/client/entitlements.js +239 -0
- package/dist/src/client/entitlements.js.map +1 -0
- package/dist/src/client/events.d.ts +31 -0
- package/dist/src/client/events.js +58 -0
- package/dist/src/client/events.js.map +1 -0
- package/dist/src/client/features.d.ts +78 -0
- package/dist/src/client/features.js +74 -0
- package/dist/src/client/features.js.map +1 -0
- package/dist/src/client/index.d.ts +45 -0
- package/dist/src/client/index.js +68 -0
- package/dist/src/client/index.js.map +1 -0
- package/dist/src/client/meters.d.ts +99 -0
- package/dist/src/client/meters.js +92 -0
- package/dist/src/client/meters.js.map +1 -0
- package/dist/src/client/notifications.d.ts +219 -0
- package/dist/src/client/notifications.js +242 -0
- package/dist/src/client/notifications.js.map +1 -0
- package/dist/src/client/plans.d.ts +142 -0
- package/dist/src/client/plans.js +123 -0
- package/dist/src/client/plans.js.map +1 -0
- package/dist/src/client/portal.d.ts +48 -0
- package/dist/src/client/portal.js +51 -0
- package/dist/src/client/portal.js.map +1 -0
- package/dist/src/client/schemas.d.ts +22438 -0
- package/dist/src/client/schemas.js +2 -0
- package/dist/src/client/schemas.js.map +1 -0
- package/dist/src/client/subjects.d.ts +70 -0
- package/dist/src/client/subjects.js +72 -0
- package/dist/src/client/subjects.js.map +1 -0
- package/dist/src/client/subscriptions.d.ts +147 -0
- package/dist/src/client/subscriptions.js +112 -0
- package/dist/src/client/subscriptions.js.map +1 -0
- package/dist/src/client/utils.d.ts +12 -0
- package/dist/src/client/utils.js +63 -0
- package/dist/src/client/utils.js.map +1 -0
- package/dist/src/portal/index.d.ts +43 -0
- package/dist/src/portal/index.js +53 -0
- package/dist/src/portal/index.js.map +1 -0
- package/dist/src/react/context.d.ts +9 -0
- package/dist/src/react/context.js +16 -0
- package/dist/src/react/context.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +75 -35
- package/patches/openapi-typescript.patch +73 -0
- package/dist/clients/client.d.ts +0 -40
- package/dist/clients/client.js +0 -104
- package/dist/clients/event.d.ts +0 -79
- package/dist/clients/event.js +0 -53
- package/dist/clients/meter.d.ts +0 -96
- package/dist/clients/meter.js +0 -64
- package/dist/clients/portal.d.ts +0 -23
- package/dist/clients/portal.js +0 -37
- package/dist/next.d.ts +0 -15
- package/dist/next.js +0 -46
- package/dist/schemas/openapi.d.ts +0 -460
- package/dist/schemas/openapi.js +0 -5
- package/dist/test/agent.d.ts +0 -2
- package/dist/test/agent.js +0 -178
- package/dist/test/mocks.d.ts +0 -12
- package/dist/test/mocks.js +0 -32
- package/index.ts +0 -22
- package/next.ts +0 -76
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerEntitlements = exports.CustomerApps = exports.Customers = void 0;
|
|
4
|
+
const utils_js_1 = require("./utils.cjs");
|
|
5
|
+
/**
|
|
6
|
+
* Customers
|
|
7
|
+
* Manage customer subscription lifecycles and plan assignments.
|
|
8
|
+
*/
|
|
9
|
+
class Customers {
|
|
10
|
+
client;
|
|
11
|
+
apps;
|
|
12
|
+
entitlements;
|
|
13
|
+
constructor(client) {
|
|
14
|
+
this.client = client;
|
|
15
|
+
this.apps = new CustomerApps(client);
|
|
16
|
+
this.entitlements = new CustomerEntitlements(client);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create a customer
|
|
20
|
+
* @param customer - The customer to create
|
|
21
|
+
* @param signal - An optional abort signal
|
|
22
|
+
* @returns The created customer
|
|
23
|
+
*/
|
|
24
|
+
async create(customer, options) {
|
|
25
|
+
const resp = await this.client.POST('/api/v1/customers', {
|
|
26
|
+
body: customer,
|
|
27
|
+
...options,
|
|
28
|
+
});
|
|
29
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get a customer by ID
|
|
33
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
34
|
+
* @param signal - An optional abort signal
|
|
35
|
+
* @returns The customer
|
|
36
|
+
*/
|
|
37
|
+
async get(customerIdOrKey, options) {
|
|
38
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}', {
|
|
39
|
+
params: {
|
|
40
|
+
path: {
|
|
41
|
+
customerIdOrKey,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
...options,
|
|
45
|
+
});
|
|
46
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Update a customer
|
|
50
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
51
|
+
* @param customer - The customer to update
|
|
52
|
+
* @param signal - An optional abort signal
|
|
53
|
+
* @returns The updated customer
|
|
54
|
+
*/
|
|
55
|
+
async update(customerIdOrKey, customer, options) {
|
|
56
|
+
const resp = await this.client.PUT('/api/v1/customers/{customerIdOrKey}', {
|
|
57
|
+
body: customer,
|
|
58
|
+
params: {
|
|
59
|
+
path: {
|
|
60
|
+
customerIdOrKey,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
...options,
|
|
64
|
+
});
|
|
65
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Delete a customer
|
|
69
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
70
|
+
* @param signal - An optional abort signal
|
|
71
|
+
* @returns The deleted customer
|
|
72
|
+
*/
|
|
73
|
+
async delete(customerIdOrKey, options) {
|
|
74
|
+
const resp = await this.client.DELETE('/api/v1/customers/{customerIdOrKey}', {
|
|
75
|
+
params: {
|
|
76
|
+
path: {
|
|
77
|
+
customerIdOrKey,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
...options,
|
|
81
|
+
});
|
|
82
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* List customers
|
|
86
|
+
* @param signal - An optional abort signal
|
|
87
|
+
* @returns The list of customers
|
|
88
|
+
*/
|
|
89
|
+
async list(query, options) {
|
|
90
|
+
const resp = await this.client.GET('/api/v1/customers', {
|
|
91
|
+
params: {
|
|
92
|
+
query,
|
|
93
|
+
},
|
|
94
|
+
...options,
|
|
95
|
+
});
|
|
96
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.Customers = Customers;
|
|
100
|
+
/**
|
|
101
|
+
* Customer Apps
|
|
102
|
+
* Manage customer apps.
|
|
103
|
+
*/
|
|
104
|
+
class CustomerApps {
|
|
105
|
+
client;
|
|
106
|
+
constructor(client) {
|
|
107
|
+
this.client = client;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Upsert customer app data
|
|
111
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
112
|
+
* @param appData - The app data to upsert
|
|
113
|
+
* @param signal - An optional abort signal
|
|
114
|
+
* @returns The upserted app data
|
|
115
|
+
*/
|
|
116
|
+
async upsert(customerIdOrKey, appData, options) {
|
|
117
|
+
const resp = await this.client.PUT('/api/v1/customers/{customerIdOrKey}/apps', {
|
|
118
|
+
body: appData,
|
|
119
|
+
params: {
|
|
120
|
+
path: {
|
|
121
|
+
customerIdOrKey,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
...options,
|
|
125
|
+
});
|
|
126
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* List customer app data
|
|
130
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
131
|
+
* @param query - The query parameters
|
|
132
|
+
* @param signal - An optional abort signal
|
|
133
|
+
* @returns The list of customer app data
|
|
134
|
+
*/
|
|
135
|
+
async list(customerIdOrKey, query, options) {
|
|
136
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}/apps', {
|
|
137
|
+
params: {
|
|
138
|
+
path: { customerIdOrKey },
|
|
139
|
+
query,
|
|
140
|
+
},
|
|
141
|
+
...options,
|
|
142
|
+
});
|
|
143
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Delete customer app data
|
|
147
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
148
|
+
* @param appId - The ID of the app
|
|
149
|
+
* @param signal - An optional abort signal
|
|
150
|
+
* @returns The deleted customer app data
|
|
151
|
+
*/
|
|
152
|
+
async delete(customerIdOrKey, appId, options) {
|
|
153
|
+
const resp = await this.client.DELETE('/api/v1/customers/{customerIdOrKey}/apps/{appId}', {
|
|
154
|
+
params: { path: { appId, customerIdOrKey } },
|
|
155
|
+
...options,
|
|
156
|
+
});
|
|
157
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* List customer subscriptions
|
|
161
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
162
|
+
* @param query - The query parameters
|
|
163
|
+
* @param signal - An optional abort signal
|
|
164
|
+
* @returns The list of customer subscriptions
|
|
165
|
+
*/
|
|
166
|
+
async listSubscriptions(customerIdOrKey, query, options) {
|
|
167
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}/subscriptions', {
|
|
168
|
+
params: { path: { customerIdOrKey }, query },
|
|
169
|
+
...options,
|
|
170
|
+
});
|
|
171
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.CustomerApps = CustomerApps;
|
|
175
|
+
/**
|
|
176
|
+
* Customer Entitlements
|
|
177
|
+
*/
|
|
178
|
+
class CustomerEntitlements {
|
|
179
|
+
client;
|
|
180
|
+
constructor(client) {
|
|
181
|
+
this.client = client;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Get the value of an entitlement for a customer
|
|
185
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
186
|
+
* @param featureKey - The key of the feature
|
|
187
|
+
* @param signal - An optional abort signal
|
|
188
|
+
* @returns The value of the entitlement
|
|
189
|
+
*/
|
|
190
|
+
async value(customerIdOrKey, featureKey, options) {
|
|
191
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/value', {
|
|
192
|
+
params: { path: { customerIdOrKey, featureKey } },
|
|
193
|
+
...options,
|
|
194
|
+
});
|
|
195
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
exports.CustomerEntitlements = CustomerEntitlements;
|
|
199
|
+
//# sourceMappingURL=customers.js.map
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { RequestOptions } from './common.cjs';
|
|
2
|
+
import type { CustomerAppData, CustomerCreate, CustomerReplaceUpdate, operations, paths } from './schemas.cjs';
|
|
3
|
+
import type { Client } from 'openapi-fetch';
|
|
4
|
+
/**
|
|
5
|
+
* Customers
|
|
6
|
+
* Manage customer subscription lifecycles and plan assignments.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Customers {
|
|
9
|
+
private client;
|
|
10
|
+
apps: CustomerApps;
|
|
11
|
+
entitlements: CustomerEntitlements;
|
|
12
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
13
|
+
/**
|
|
14
|
+
* Create a customer
|
|
15
|
+
* @param customer - The customer to create
|
|
16
|
+
* @param signal - An optional abort signal
|
|
17
|
+
* @returns The created customer
|
|
18
|
+
*/
|
|
19
|
+
create(customer: CustomerCreate, options?: RequestOptions): Promise<{
|
|
20
|
+
readonly id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"] | null;
|
|
24
|
+
readonly createdAt: Date;
|
|
25
|
+
readonly updatedAt: Date;
|
|
26
|
+
readonly deletedAt?: Date;
|
|
27
|
+
key?: string;
|
|
28
|
+
usageAttribution: import("./schemas.cjs").components["schemas"]["CustomerUsageAttribution"];
|
|
29
|
+
primaryEmail?: string;
|
|
30
|
+
currency?: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
31
|
+
billingAddress?: import("./schemas.cjs").components["schemas"]["Address"];
|
|
32
|
+
readonly currentSubscriptionId?: string;
|
|
33
|
+
readonly subscriptions?: import("./schemas.cjs").components["schemas"]["Subscription"][];
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Get a customer by ID
|
|
37
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
38
|
+
* @param signal - An optional abort signal
|
|
39
|
+
* @returns The customer
|
|
40
|
+
*/
|
|
41
|
+
get(customerIdOrKey: operations['getCustomer']['parameters']['path']['customerIdOrKey'], options?: RequestOptions): Promise<{
|
|
42
|
+
readonly id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"] | null;
|
|
46
|
+
readonly createdAt: Date;
|
|
47
|
+
readonly updatedAt: Date;
|
|
48
|
+
readonly deletedAt?: Date;
|
|
49
|
+
key?: string;
|
|
50
|
+
usageAttribution: import("./schemas.cjs").components["schemas"]["CustomerUsageAttribution"];
|
|
51
|
+
primaryEmail?: string;
|
|
52
|
+
currency?: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
53
|
+
billingAddress?: import("./schemas.cjs").components["schemas"]["Address"];
|
|
54
|
+
readonly currentSubscriptionId?: string;
|
|
55
|
+
readonly subscriptions?: import("./schemas.cjs").components["schemas"]["Subscription"][];
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Update a customer
|
|
59
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
60
|
+
* @param customer - The customer to update
|
|
61
|
+
* @param signal - An optional abort signal
|
|
62
|
+
* @returns The updated customer
|
|
63
|
+
*/
|
|
64
|
+
update(customerIdOrKey: operations['updateCustomer']['parameters']['path']['customerIdOrKey'], customer: CustomerReplaceUpdate, options?: RequestOptions): Promise<{
|
|
65
|
+
readonly id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"] | null;
|
|
69
|
+
readonly createdAt: Date;
|
|
70
|
+
readonly updatedAt: Date;
|
|
71
|
+
readonly deletedAt?: Date;
|
|
72
|
+
key?: string;
|
|
73
|
+
usageAttribution: import("./schemas.cjs").components["schemas"]["CustomerUsageAttribution"];
|
|
74
|
+
primaryEmail?: string;
|
|
75
|
+
currency?: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
76
|
+
billingAddress?: import("./schemas.cjs").components["schemas"]["Address"];
|
|
77
|
+
readonly currentSubscriptionId?: string;
|
|
78
|
+
readonly subscriptions?: import("./schemas.cjs").components["schemas"]["Subscription"][];
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Delete a customer
|
|
82
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
83
|
+
* @param signal - An optional abort signal
|
|
84
|
+
* @returns The deleted customer
|
|
85
|
+
*/
|
|
86
|
+
delete(customerIdOrKey: operations['deleteCustomer']['parameters']['path']['customerIdOrKey'], options?: RequestOptions): Promise<undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* List customers
|
|
89
|
+
* @param signal - An optional abort signal
|
|
90
|
+
* @returns The list of customers
|
|
91
|
+
*/
|
|
92
|
+
list(query?: operations['listCustomers']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
93
|
+
totalCount: number;
|
|
94
|
+
page: number;
|
|
95
|
+
pageSize: number;
|
|
96
|
+
items: import("./schemas.cjs").components["schemas"]["Customer"][];
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Customer Apps
|
|
101
|
+
* Manage customer apps.
|
|
102
|
+
*/
|
|
103
|
+
export declare class CustomerApps {
|
|
104
|
+
private client;
|
|
105
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
106
|
+
/**
|
|
107
|
+
* Upsert customer app data
|
|
108
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
109
|
+
* @param appData - The app data to upsert
|
|
110
|
+
* @param signal - An optional abort signal
|
|
111
|
+
* @returns The upserted app data
|
|
112
|
+
*/
|
|
113
|
+
upsert(customerIdOrKey: operations['upsertCustomerAppData']['parameters']['path']['customerIdOrKey'], appData: CustomerAppData[], options?: RequestOptions): Promise<({
|
|
114
|
+
id?: string;
|
|
115
|
+
type: "stripe";
|
|
116
|
+
readonly app?: import("./schemas.cjs").components["schemas"]["StripeApp"];
|
|
117
|
+
stripeCustomerId: string;
|
|
118
|
+
stripeDefaultPaymentMethodId?: string;
|
|
119
|
+
} | {
|
|
120
|
+
readonly app?: import("./schemas.cjs").components["schemas"]["SandboxApp"];
|
|
121
|
+
id?: string;
|
|
122
|
+
type: "sandbox";
|
|
123
|
+
})[]>;
|
|
124
|
+
/**
|
|
125
|
+
* List customer app data
|
|
126
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
127
|
+
* @param query - The query parameters
|
|
128
|
+
* @param signal - An optional abort signal
|
|
129
|
+
* @returns The list of customer app data
|
|
130
|
+
*/
|
|
131
|
+
list(customerIdOrKey: operations['listCustomerAppData']['parameters']['path']['customerIdOrKey'], query?: operations['listCustomerAppData']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
132
|
+
totalCount: number;
|
|
133
|
+
page: number;
|
|
134
|
+
pageSize: number;
|
|
135
|
+
items: import("./schemas.cjs").components["schemas"]["CustomerAppData"][];
|
|
136
|
+
}>;
|
|
137
|
+
/**
|
|
138
|
+
* Delete customer app data
|
|
139
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
140
|
+
* @param appId - The ID of the app
|
|
141
|
+
* @param signal - An optional abort signal
|
|
142
|
+
* @returns The deleted customer app data
|
|
143
|
+
*/
|
|
144
|
+
delete(customerIdOrKey: operations['deleteCustomerAppData']['parameters']['path']['customerIdOrKey'], appId: operations['deleteCustomerAppData']['parameters']['path']['appId'], options?: RequestOptions): Promise<undefined>;
|
|
145
|
+
/**
|
|
146
|
+
* List customer subscriptions
|
|
147
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
148
|
+
* @param query - The query parameters
|
|
149
|
+
* @param signal - An optional abort signal
|
|
150
|
+
* @returns The list of customer subscriptions
|
|
151
|
+
*/
|
|
152
|
+
listSubscriptions(customerIdOrKey: operations['listCustomerSubscriptions']['parameters']['path']['customerIdOrKey'], query?: operations['listCustomerSubscriptions']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
153
|
+
totalCount: number;
|
|
154
|
+
page: number;
|
|
155
|
+
pageSize: number;
|
|
156
|
+
items: import("./schemas.cjs").components["schemas"]["Subscription"][];
|
|
157
|
+
}>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Customer Entitlements
|
|
161
|
+
*/
|
|
162
|
+
export declare class CustomerEntitlements {
|
|
163
|
+
private client;
|
|
164
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
165
|
+
/**
|
|
166
|
+
* Get the value of an entitlement for a customer
|
|
167
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
168
|
+
* @param featureKey - The key of the feature
|
|
169
|
+
* @param signal - An optional abort signal
|
|
170
|
+
* @returns The value of the entitlement
|
|
171
|
+
*/
|
|
172
|
+
value(customerIdOrKey: operations['getCustomerEntitlementValue']['parameters']['path']['customerIdOrKey'], featureKey: operations['getCustomerEntitlementValue']['parameters']['path']['featureKey'], options?: RequestOptions): Promise<{
|
|
173
|
+
readonly hasAccess: boolean;
|
|
174
|
+
readonly balance?: number;
|
|
175
|
+
readonly usage?: number;
|
|
176
|
+
readonly overage?: number;
|
|
177
|
+
readonly config?: string;
|
|
178
|
+
}>;
|
|
179
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../../src/client/customers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Grants = exports.Entitlements = void 0;
|
|
4
|
+
const utils_js_1 = require("./utils.cjs");
|
|
5
|
+
/**
|
|
6
|
+
* Entitlements
|
|
7
|
+
* @description With Entitlements, you can define and enforce usage limits, implement quota-based pricing, and manage access to features in your application.
|
|
8
|
+
*/
|
|
9
|
+
class Entitlements {
|
|
10
|
+
client;
|
|
11
|
+
grants;
|
|
12
|
+
constructor(client) {
|
|
13
|
+
this.client = client;
|
|
14
|
+
this.grants = new Grants(client);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create an entitlement
|
|
18
|
+
*
|
|
19
|
+
* - Boolean entitlements define static feature access, e.g. "Can use SSO authentication".
|
|
20
|
+
* - Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config).
|
|
21
|
+
* - Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems. Example: The customer can use 10000 AI tokens during the usage period of the entitlement.
|
|
22
|
+
*
|
|
23
|
+
* A given subject can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.
|
|
24
|
+
*
|
|
25
|
+
* Once an entitlement is created you cannot modify it, only delete it.
|
|
26
|
+
*
|
|
27
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
28
|
+
* @param entitlement - The entitlement to create
|
|
29
|
+
* @param signal - An optional abort signal
|
|
30
|
+
* @returns The created entitlement
|
|
31
|
+
*/
|
|
32
|
+
async create(subjectIdOrKey, entitlement, options) {
|
|
33
|
+
const resp = await this.client.POST('/api/v1/subjects/{subjectIdOrKey}/entitlements', {
|
|
34
|
+
body: entitlement,
|
|
35
|
+
params: {
|
|
36
|
+
path: {
|
|
37
|
+
subjectIdOrKey: subjectIdOrKey,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
...options,
|
|
41
|
+
});
|
|
42
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get an entitlement by ID
|
|
46
|
+
*
|
|
47
|
+
* @param id - The ID of the entitlement
|
|
48
|
+
* @param signal - An optional abort signal
|
|
49
|
+
* @returns The entitlement
|
|
50
|
+
*/
|
|
51
|
+
async get(id, options) {
|
|
52
|
+
const resp = await this.client.GET('/api/v1/entitlements/{entitlementId}', {
|
|
53
|
+
params: {
|
|
54
|
+
path: {
|
|
55
|
+
entitlementId: id,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
...options,
|
|
59
|
+
});
|
|
60
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* List entitlements
|
|
64
|
+
*
|
|
65
|
+
* @param query - The query parameters
|
|
66
|
+
* @param signal - An optional abort signal
|
|
67
|
+
* @returns The entitlements
|
|
68
|
+
*/
|
|
69
|
+
async list(query, options) {
|
|
70
|
+
const resp = await this.client.GET('/api/v1/entitlements', {
|
|
71
|
+
params: {
|
|
72
|
+
query,
|
|
73
|
+
},
|
|
74
|
+
...options,
|
|
75
|
+
});
|
|
76
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Delete an entitlement
|
|
80
|
+
*
|
|
81
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
82
|
+
* @param entitlementId - The ID of the entitlement
|
|
83
|
+
* @param signal - An optional abort signal
|
|
84
|
+
* @returns The deleted entitlement
|
|
85
|
+
*/
|
|
86
|
+
async delete(subjectIdOrKey, entitlementId, options) {
|
|
87
|
+
const resp = await this.client.DELETE('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}', {
|
|
88
|
+
params: {
|
|
89
|
+
path: {
|
|
90
|
+
entitlementId,
|
|
91
|
+
subjectIdOrKey,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
...options,
|
|
95
|
+
});
|
|
96
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the value of an entitlement to check access
|
|
100
|
+
* All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.
|
|
101
|
+
*
|
|
102
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
103
|
+
* @param entitlementIdOrFeatureKey - The ID or feature key of the entitlement
|
|
104
|
+
* @param query - The query parameters
|
|
105
|
+
* @param signal - An optional abort signal
|
|
106
|
+
* @returns The entitlement value
|
|
107
|
+
*/
|
|
108
|
+
async value(subjectIdOrKey, entitlementIdOrFeatureKey, query, options) {
|
|
109
|
+
const resp = await this.client.GET('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value', {
|
|
110
|
+
params: {
|
|
111
|
+
path: {
|
|
112
|
+
entitlementIdOrFeatureKey,
|
|
113
|
+
subjectIdOrKey,
|
|
114
|
+
},
|
|
115
|
+
query,
|
|
116
|
+
},
|
|
117
|
+
...options,
|
|
118
|
+
});
|
|
119
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Get the history of an entitlement
|
|
123
|
+
* Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.
|
|
124
|
+
*
|
|
125
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
126
|
+
* @param entitlementId - The ID of the entitlement
|
|
127
|
+
* @param query - The query parameters
|
|
128
|
+
* @param signal - An optional abort signal
|
|
129
|
+
* @returns The history of the entitlement
|
|
130
|
+
*/
|
|
131
|
+
async history(subjectIdOrKey, entitlementId, query, options) {
|
|
132
|
+
const resp = await this.client.GET('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history', {
|
|
133
|
+
params: {
|
|
134
|
+
path: {
|
|
135
|
+
entitlementId,
|
|
136
|
+
subjectIdOrKey,
|
|
137
|
+
},
|
|
138
|
+
query,
|
|
139
|
+
},
|
|
140
|
+
...options,
|
|
141
|
+
});
|
|
142
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Override an entitlement
|
|
146
|
+
* This is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
|
|
147
|
+
*
|
|
148
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
149
|
+
* @param entitlementIdOrFeatureKey - The ID or feature key of the entitlement
|
|
150
|
+
* @param override - The override to create
|
|
151
|
+
* @param signal - An optional abort signal
|
|
152
|
+
* @returns The overridden entitlement
|
|
153
|
+
*/
|
|
154
|
+
async override(subjectIdOrKey, entitlementIdOrFeatureKey, override, options) {
|
|
155
|
+
const resp = await this.client.PUT('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override', {
|
|
156
|
+
body: override,
|
|
157
|
+
params: {
|
|
158
|
+
path: {
|
|
159
|
+
entitlementIdOrFeatureKey,
|
|
160
|
+
subjectIdOrKey,
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
...options,
|
|
164
|
+
});
|
|
165
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Reset entitlement usage
|
|
169
|
+
* - Reset marks the start of a new usage period for the entitlement and initiates grant rollover. At the start of a period usage is zerod out and grants are rolled over based on their rollover settings. It would typically be synced with the subjects billing period to enforce usage based on their subscription.
|
|
170
|
+
* - Usage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.
|
|
171
|
+
*
|
|
172
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
173
|
+
* @param entitlementId - The ID of the entitlement
|
|
174
|
+
* @param body - The body of the request
|
|
175
|
+
* @param signal - An optional abort signal
|
|
176
|
+
* @returns The reset entitlement
|
|
177
|
+
*/
|
|
178
|
+
async reset(subjectIdOrKey, entitlementId, body, options) {
|
|
179
|
+
const resp = await this.client.POST('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset', {
|
|
180
|
+
body,
|
|
181
|
+
params: {
|
|
182
|
+
path: {
|
|
183
|
+
entitlementId,
|
|
184
|
+
subjectIdOrKey,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
...options,
|
|
188
|
+
});
|
|
189
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.Entitlements = Entitlements;
|
|
193
|
+
class Grants {
|
|
194
|
+
client;
|
|
195
|
+
constructor(client) {
|
|
196
|
+
this.client = client;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
/**
|
|
200
|
+
* Grant usage to a subject for an entitlement
|
|
201
|
+
*
|
|
202
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
203
|
+
* @param entitlementIdOrFeatureKey - The ID or feature key of the entitlement
|
|
204
|
+
* @param grant - The grant to create
|
|
205
|
+
* @param signal - An optional abort signal
|
|
206
|
+
* @returns The created grant
|
|
207
|
+
*/
|
|
208
|
+
async create(subjectIdOrKey, entitlementIdOrFeatureKey, grant, options) {
|
|
209
|
+
const resp = await this.client.POST('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants', {
|
|
210
|
+
body: grant,
|
|
211
|
+
params: {
|
|
212
|
+
path: {
|
|
213
|
+
entitlementIdOrFeatureKey,
|
|
214
|
+
subjectIdOrKey,
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
...options,
|
|
218
|
+
});
|
|
219
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* List grants for an entitlement
|
|
223
|
+
*
|
|
224
|
+
* @param subjectIdOrKey - The ID or key of the subject
|
|
225
|
+
* @param entitlementIdOrFeatureKey - The ID or feature key of the entitlement
|
|
226
|
+
* @param signal - An optional abort signal
|
|
227
|
+
* @returns The grants
|
|
228
|
+
*/
|
|
229
|
+
async list(subjectIdOrKey, entitlementIdOrFeatureKey, query, options) {
|
|
230
|
+
const resp = await this.client.GET('/api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants', {
|
|
231
|
+
params: {
|
|
232
|
+
path: {
|
|
233
|
+
entitlementIdOrFeatureKey,
|
|
234
|
+
subjectIdOrKey,
|
|
235
|
+
},
|
|
236
|
+
query,
|
|
237
|
+
},
|
|
238
|
+
...options,
|
|
239
|
+
});
|
|
240
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.Grants = Grants;
|
|
244
|
+
//# sourceMappingURL=entitlements.js.map
|