@openmeter/sdk 1.0.0-beta.204 → 1.0.0-beta.206
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/dist/cjs/src/client/billing.d.cts +8 -16
- package/dist/cjs/src/client/customers.cjs +38 -31
- package/dist/cjs/src/client/customers.d.cts +22 -15
- package/dist/cjs/src/client/customers.js.map +1 -1
- package/dist/cjs/src/client/entitlements.d.cts +7 -1
- package/dist/cjs/src/client/portal.js.map +1 -1
- package/dist/cjs/src/client/schemas.d.cts +2197 -603
- package/dist/cjs/tsconfig.0b6649c3.tsbuildinfo +1 -0
- package/dist/cjs/tsconfig.57049e40.tsbuildinfo +1 -0
- package/dist/src/client/billing.d.ts +8 -16
- package/dist/src/client/customers.d.ts +22 -15
- package/dist/src/client/customers.js +38 -31
- package/dist/src/client/customers.js.map +1 -1
- package/dist/src/client/entitlements.d.ts +7 -1
- package/dist/src/client/portal.js.map +1 -1
- package/dist/src/client/schemas.d.ts +2197 -603
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -21
- package/dist/cjs/tsconfig.128cd867.tsbuildinfo +0 -1
- package/dist/cjs/tsconfig.48bd919c.tsbuildinfo +0 -1
|
@@ -27,15 +27,15 @@ export class Customers {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Get a customer by ID
|
|
30
|
-
* @param
|
|
30
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
31
31
|
* @param signal - An optional abort signal
|
|
32
32
|
* @returns The customer
|
|
33
33
|
*/
|
|
34
|
-
async get(
|
|
35
|
-
const resp = await this.client.GET('/api/v1/customers/{
|
|
34
|
+
async get(customerIdOrKey, options) {
|
|
35
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}', {
|
|
36
36
|
params: {
|
|
37
37
|
path: {
|
|
38
|
-
|
|
38
|
+
customerIdOrKey,
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
...options,
|
|
@@ -44,17 +44,17 @@ export class Customers {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* Update a customer
|
|
47
|
-
* @param
|
|
47
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
48
48
|
* @param customer - The customer to update
|
|
49
49
|
* @param signal - An optional abort signal
|
|
50
50
|
* @returns The updated customer
|
|
51
51
|
*/
|
|
52
|
-
async update(
|
|
53
|
-
const resp = await this.client.PUT('/api/v1/customers/{
|
|
52
|
+
async update(customerIdOrKey, customer, options) {
|
|
53
|
+
const resp = await this.client.PUT('/api/v1/customers/{customerIdOrKey}', {
|
|
54
54
|
body: customer,
|
|
55
55
|
params: {
|
|
56
56
|
path: {
|
|
57
|
-
|
|
57
|
+
customerIdOrKey,
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
...options,
|
|
@@ -63,15 +63,15 @@ export class Customers {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Delete a customer
|
|
66
|
-
* @param
|
|
66
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
67
67
|
* @param signal - An optional abort signal
|
|
68
68
|
* @returns The deleted customer
|
|
69
69
|
*/
|
|
70
|
-
async delete(
|
|
71
|
-
const resp = await this.client.DELETE('/api/v1/customers/{
|
|
70
|
+
async delete(customerIdOrKey, options) {
|
|
71
|
+
const resp = await this.client.DELETE('/api/v1/customers/{customerIdOrKey}', {
|
|
72
72
|
params: {
|
|
73
73
|
path: {
|
|
74
|
-
|
|
74
|
+
customerIdOrKey,
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
...options,
|
|
@@ -104,17 +104,17 @@ export class CustomerApps {
|
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Upsert customer app data
|
|
107
|
-
* @param
|
|
107
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
108
108
|
* @param appData - The app data to upsert
|
|
109
109
|
* @param signal - An optional abort signal
|
|
110
110
|
* @returns The upserted app data
|
|
111
111
|
*/
|
|
112
|
-
async upsert(
|
|
113
|
-
const resp = await this.client.PUT('/api/v1/customers/{
|
|
112
|
+
async upsert(customerIdOrKey, appData, options) {
|
|
113
|
+
const resp = await this.client.PUT('/api/v1/customers/{customerIdOrKey}/apps', {
|
|
114
114
|
body: appData,
|
|
115
115
|
params: {
|
|
116
116
|
path: {
|
|
117
|
-
|
|
117
|
+
customerIdOrKey,
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
120
|
...options,
|
|
@@ -123,15 +123,15 @@ export class CustomerApps {
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* List customer app data
|
|
126
|
-
* @param
|
|
126
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
127
127
|
* @param query - The query parameters
|
|
128
128
|
* @param signal - An optional abort signal
|
|
129
129
|
* @returns The list of customer app data
|
|
130
130
|
*/
|
|
131
|
-
async list(
|
|
132
|
-
const resp = await this.client.GET('/api/v1/customers/{
|
|
131
|
+
async list(customerIdOrKey, query, options) {
|
|
132
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}/apps', {
|
|
133
133
|
params: {
|
|
134
|
-
path: {
|
|
134
|
+
path: { customerIdOrKey },
|
|
135
135
|
query,
|
|
136
136
|
},
|
|
137
137
|
...options,
|
|
@@ -140,21 +140,28 @@ export class CustomerApps {
|
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
142
|
* Delete customer app data
|
|
143
|
-
* @param
|
|
143
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
144
144
|
* @param appId - The ID of the app
|
|
145
145
|
* @param signal - An optional abort signal
|
|
146
146
|
* @returns The deleted customer app data
|
|
147
147
|
*/
|
|
148
|
-
async delete(
|
|
149
|
-
const resp = await this.client.DELETE('/api/v1/customers/{
|
|
150
|
-
params: { path: { appId,
|
|
148
|
+
async delete(customerIdOrKey, appId, options) {
|
|
149
|
+
const resp = await this.client.DELETE('/api/v1/customers/{customerIdOrKey}/apps/{appId}', {
|
|
150
|
+
params: { path: { appId, customerIdOrKey } },
|
|
151
151
|
...options,
|
|
152
152
|
});
|
|
153
153
|
return transformResponse(resp);
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
/**
|
|
156
|
+
* List customer subscriptions
|
|
157
|
+
* @param customerIdOrKey - The ID or key of the customer
|
|
158
|
+
* @param query - The query parameters
|
|
159
|
+
* @param signal - An optional abort signal
|
|
160
|
+
* @returns The list of customer subscriptions
|
|
161
|
+
*/
|
|
162
|
+
async listSubscriptions(customerIdOrKey, query, options) {
|
|
163
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}/subscriptions', {
|
|
164
|
+
params: { path: { customerIdOrKey }, query },
|
|
158
165
|
...options,
|
|
159
166
|
});
|
|
160
167
|
return transformResponse(resp);
|
|
@@ -170,14 +177,14 @@ export class CustomerEntitlements {
|
|
|
170
177
|
}
|
|
171
178
|
/**
|
|
172
179
|
* Get the value of an entitlement for a customer
|
|
173
|
-
* @param
|
|
180
|
+
* @param customerIdOrKey - The ID or Key of the customer
|
|
174
181
|
* @param featureKey - The key of the feature
|
|
175
182
|
* @param signal - An optional abort signal
|
|
176
183
|
* @returns The value of the entitlement
|
|
177
184
|
*/
|
|
178
|
-
async value(
|
|
179
|
-
const resp = await this.client.GET('/api/v1/customers/{
|
|
180
|
-
params: { path: {
|
|
185
|
+
async value(customerIdOrKey, featureKey, options) {
|
|
186
|
+
const resp = await this.client.GET('/api/v1/customers/{customerIdOrKey}/entitlements/{featureKey}/value', {
|
|
187
|
+
params: { path: { customerIdOrKey, featureKey } },
|
|
181
188
|
...options,
|
|
182
189
|
});
|
|
183
190
|
return transformResponse(resp);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../../src/client/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAW9C;;;GAGG;AACH,MAAM,OAAO,SAA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,IAAI,EAAE,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE;YAC5C,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,oBAAoB;IACX;IAApB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;IAAG,CAAC;IAEpE;;;;;;OAMG;IACI,KAAK,CAAC,KAAK,CAChB,eAAmG,EACnG,UAAyF,EACzF,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAChC,qEAAqE,EACrE;YACE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE;YACjD,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF"}
|
|
@@ -200,6 +200,7 @@ export declare class Entitlements {
|
|
|
200
200
|
metadata?: import("./schemas.js").components["schemas"]["Metadata"];
|
|
201
201
|
activeFrom: Date;
|
|
202
202
|
activeTo?: Date;
|
|
203
|
+
readonly annotations?: import("./schemas.js").components["schemas"]["Annotations"];
|
|
203
204
|
readonly id: string;
|
|
204
205
|
subjectKey: string;
|
|
205
206
|
featureKey: string;
|
|
@@ -217,6 +218,7 @@ export declare class Entitlements {
|
|
|
217
218
|
metadata?: import("./schemas.js").components["schemas"]["Metadata"];
|
|
218
219
|
activeFrom: Date;
|
|
219
220
|
activeTo?: Date;
|
|
221
|
+
readonly annotations?: import("./schemas.js").components["schemas"]["Annotations"];
|
|
220
222
|
readonly id: string;
|
|
221
223
|
subjectKey: string;
|
|
222
224
|
featureKey: string;
|
|
@@ -231,6 +233,7 @@ export declare class Entitlements {
|
|
|
231
233
|
metadata?: import("./schemas.js").components["schemas"]["Metadata"];
|
|
232
234
|
activeFrom: Date;
|
|
233
235
|
activeTo?: Date;
|
|
236
|
+
readonly annotations?: import("./schemas.js").components["schemas"]["Annotations"];
|
|
234
237
|
readonly id: string;
|
|
235
238
|
subjectKey: string;
|
|
236
239
|
featureKey: string;
|
|
@@ -244,6 +247,7 @@ export declare class Entitlements {
|
|
|
244
247
|
metadata?: import("./schemas.js").components["schemas"]["Metadata"];
|
|
245
248
|
activeFrom: Date;
|
|
246
249
|
activeTo?: Date;
|
|
250
|
+
readonly annotations?: import("./schemas.js").components["schemas"]["Annotations"];
|
|
247
251
|
readonly id: string;
|
|
248
252
|
type: import("./schemas.js").components["schemas"]["EntitlementType"];
|
|
249
253
|
subjectKey: string;
|
|
@@ -252,14 +256,16 @@ export declare class Entitlements {
|
|
|
252
256
|
currentUsagePeriod?: import("./schemas.js").components["schemas"]["Period"];
|
|
253
257
|
usagePeriod?: import("./schemas.js").components["schemas"]["RecurringPeriod"];
|
|
254
258
|
} & {
|
|
259
|
+
readonly id: string;
|
|
255
260
|
readonly createdAt: Date;
|
|
256
261
|
readonly updatedAt: Date;
|
|
257
262
|
type: import("./schemas.js").components["schemas"]["EntitlementType"];
|
|
258
|
-
readonly id: string;
|
|
259
263
|
activeFrom: Date;
|
|
260
264
|
subjectKey: string;
|
|
261
265
|
featureKey: string;
|
|
262
266
|
featureId: string;
|
|
267
|
+
} & {
|
|
268
|
+
type: "boolean";
|
|
263
269
|
}))[]>;
|
|
264
270
|
/**
|
|
265
271
|
* Delete an entitlement
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../../../src/client/portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAK9C;;;GAGG;AACH,MAAM,OAAO,MAAM;IACG;IAApB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;
|
|
1
|
+
{"version":3,"file":"portal.js","sourceRoot":"","sources":["../../../src/client/portal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAK9C;;;GAGG;AACH,MAAM,OAAO,MAAM;IACG;IAApB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;IAAG,CAAC;IAEpE;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAC,IAAiB,EAAE,OAAwB;QAC7D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE;YAC3D,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CACf,KAA6D,EAC7D,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,EAAE;YAC1D,MAAM,EAAE,EAAE,KAAK,EAAE;YACjB,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,UAAU,CACrB,IAAwF,EACxF,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE;YACtE,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF"}
|