@openmeter/sdk 1.0.0-beta.221 → 1.0.0-beta.222
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/customers.cjs +188 -2
- package/dist/cjs/src/client/customers.d.cts +363 -1
- package/dist/cjs/src/client/customers.js.map +1 -1
- package/dist/cjs/src/client/entitlements.cjs +92 -1
- package/dist/cjs/src/client/entitlements.d.cts +139 -28
- package/dist/cjs/src/client/entitlements.js.map +1 -1
- package/dist/cjs/src/client/index.cjs +3 -1
- package/dist/cjs/src/client/index.d.cts +3 -2
- package/dist/cjs/src/client/index.js.map +1 -1
- package/dist/cjs/src/client/schemas.d.cts +2505 -1708
- package/dist/cjs/src/zod/index.cjs +1905 -1639
- package/dist/cjs/src/zod/index.d.cts +1761 -1585
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.0bedc47d.tsbuildinfo → tsconfig.58b58bc1.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.c449a50f.tsbuildinfo → tsconfig.7bcc7f9f.tsbuildinfo} +1 -1
- package/dist/src/client/customers.d.ts +363 -1
- package/dist/src/client/customers.js +186 -1
- package/dist/src/client/customers.js.map +1 -1
- package/dist/src/client/entitlements.d.ts +139 -28
- package/dist/src/client/entitlements.js +89 -0
- package/dist/src/client/entitlements.js.map +1 -1
- package/dist/src/client/index.d.ts +3 -2
- package/dist/src/client/index.js +4 -2
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/schemas.d.ts +2505 -1708
- package/dist/src/zod/index.d.ts +1761 -1585
- package/dist/src/zod/index.js +1888 -1623
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Grants = exports.Entitlements = void 0;
|
|
3
|
+
exports.GrantsV2 = exports.EntitlementsV2 = exports.Grants = exports.Entitlements = void 0;
|
|
4
4
|
const utils_js_1 = require("./utils.cjs");
|
|
5
5
|
/**
|
|
6
6
|
* Entitlements
|
|
@@ -278,4 +278,95 @@ class Grants {
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
exports.Grants = Grants;
|
|
281
|
+
/**
|
|
282
|
+
* Entitlements V2
|
|
283
|
+
* @description With Entitlements, you can define and enforce usage limits, implement quota-based pricing, and manage access to features in your application.
|
|
284
|
+
*/
|
|
285
|
+
class EntitlementsV2 {
|
|
286
|
+
client;
|
|
287
|
+
grants;
|
|
288
|
+
constructor(client) {
|
|
289
|
+
this.client = client;
|
|
290
|
+
this.grants = new GrantsV2(client);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* List all entitlements for all customers and features
|
|
294
|
+
* @description This endpoint is intended for administrative purposes only.
|
|
295
|
+
* To fetch entitlements of a specific customer, use the customer entitlements endpoint.
|
|
296
|
+
* @param options - Request options including query parameters
|
|
297
|
+
* @returns List of entitlements
|
|
298
|
+
*/
|
|
299
|
+
async list(options) {
|
|
300
|
+
const resp = await this.client.GET('/api/v2/entitlements', {
|
|
301
|
+
params: {
|
|
302
|
+
query: options?.query,
|
|
303
|
+
},
|
|
304
|
+
...options,
|
|
305
|
+
});
|
|
306
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Get entitlement by ID
|
|
310
|
+
* @param entitlementId - The ID of the entitlement
|
|
311
|
+
* @param options - Request options
|
|
312
|
+
* @returns The entitlement
|
|
313
|
+
*/
|
|
314
|
+
async get(entitlementId, options) {
|
|
315
|
+
const resp = await this.client.GET('/api/v2/entitlements/{entitlementId}', {
|
|
316
|
+
params: {
|
|
317
|
+
path: { entitlementId },
|
|
318
|
+
},
|
|
319
|
+
...options,
|
|
320
|
+
});
|
|
321
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
exports.EntitlementsV2 = EntitlementsV2;
|
|
325
|
+
/**
|
|
326
|
+
* Grants
|
|
327
|
+
*/
|
|
328
|
+
class GrantsV2 {
|
|
329
|
+
client;
|
|
330
|
+
constructor(client) {
|
|
331
|
+
this.client = client;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* List all grants for all customers and entitlements
|
|
335
|
+
* @description This endpoint is intended for administrative purposes only.
|
|
336
|
+
* To fetch grants of a specific entitlement, use the customer entitlements grants endpoint.
|
|
337
|
+
* @param options - Request options including query parameters
|
|
338
|
+
* @returns List of grants
|
|
339
|
+
*/
|
|
340
|
+
async list(options) {
|
|
341
|
+
const resp = await this.client.GET('/api/v2/grants', {
|
|
342
|
+
params: {
|
|
343
|
+
query: options?.query,
|
|
344
|
+
},
|
|
345
|
+
...options,
|
|
346
|
+
});
|
|
347
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Void a grant (legacy method using V1 endpoint)
|
|
351
|
+
* @description Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations.
|
|
352
|
+
* Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed
|
|
353
|
+
* to the grant will remain, but future usage cannot be burnt down from the grant.
|
|
354
|
+
* @param grantId - The ID of the grant
|
|
355
|
+
* @param options - Request options
|
|
356
|
+
* @returns The voided grant
|
|
357
|
+
* @deprecated This method uses the legacy V1 endpoint. Consider using customer-specific grant operations instead.
|
|
358
|
+
*/
|
|
359
|
+
async void(grantId, options) {
|
|
360
|
+
const resp = await this.client.DELETE('/api/v1/grants/{grantId}', {
|
|
361
|
+
params: {
|
|
362
|
+
path: {
|
|
363
|
+
grantId,
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
...options,
|
|
367
|
+
});
|
|
368
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
exports.GrantsV2 = GrantsV2;
|
|
281
372
|
//# sourceMappingURL=entitlements.js.map
|
|
@@ -225,7 +225,7 @@ export declare class Entitlements {
|
|
|
225
225
|
featureId: string;
|
|
226
226
|
currentUsagePeriod?: import("./schemas.cjs").components["schemas"]["Period"];
|
|
227
227
|
usagePeriod?: import("./schemas.cjs").components["schemas"]["RecurringPeriod"];
|
|
228
|
-
} |
|
|
228
|
+
} | {
|
|
229
229
|
type: "boolean";
|
|
230
230
|
readonly createdAt: Date;
|
|
231
231
|
readonly updatedAt: Date;
|
|
@@ -240,33 +240,7 @@ export declare class Entitlements {
|
|
|
240
240
|
featureId: string;
|
|
241
241
|
currentUsagePeriod?: import("./schemas.cjs").components["schemas"]["Period"];
|
|
242
242
|
usagePeriod?: import("./schemas.cjs").components["schemas"]["RecurringPeriod"];
|
|
243
|
-
}
|
|
244
|
-
readonly createdAt: Date;
|
|
245
|
-
readonly updatedAt: Date;
|
|
246
|
-
readonly deletedAt?: Date;
|
|
247
|
-
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"];
|
|
248
|
-
activeFrom: Date;
|
|
249
|
-
activeTo?: Date;
|
|
250
|
-
readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"];
|
|
251
|
-
readonly id: string;
|
|
252
|
-
type: import("./schemas.cjs").components["schemas"]["EntitlementType"];
|
|
253
|
-
subjectKey: string;
|
|
254
|
-
featureKey: string;
|
|
255
|
-
featureId: string;
|
|
256
|
-
currentUsagePeriod?: import("./schemas.cjs").components["schemas"]["Period"];
|
|
257
|
-
usagePeriod?: import("./schemas.cjs").components["schemas"]["RecurringPeriod"];
|
|
258
|
-
} & {
|
|
259
|
-
readonly id: string;
|
|
260
|
-
readonly createdAt: Date;
|
|
261
|
-
readonly updatedAt: Date;
|
|
262
|
-
type: import("./schemas.cjs").components["schemas"]["EntitlementType"];
|
|
263
|
-
activeFrom: Date;
|
|
264
|
-
subjectKey: string;
|
|
265
|
-
featureKey: string;
|
|
266
|
-
featureId: string;
|
|
267
|
-
} & {
|
|
268
|
-
type: "boolean";
|
|
269
|
-
}))[]>;
|
|
243
|
+
})[]>;
|
|
270
244
|
/**
|
|
271
245
|
* Delete an entitlement
|
|
272
246
|
*
|
|
@@ -554,3 +528,140 @@ export declare class Grants {
|
|
|
554
528
|
*/
|
|
555
529
|
void(grantId: operations['voidGrant']['parameters']['path']['grantId'], options?: RequestOptions): Promise<undefined>;
|
|
556
530
|
}
|
|
531
|
+
/**
|
|
532
|
+
* Entitlements V2
|
|
533
|
+
* @description With Entitlements, you can define and enforce usage limits, implement quota-based pricing, and manage access to features in your application.
|
|
534
|
+
*/
|
|
535
|
+
export declare class EntitlementsV2 {
|
|
536
|
+
private client;
|
|
537
|
+
grants: GrantsV2;
|
|
538
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
539
|
+
/**
|
|
540
|
+
* List all entitlements for all customers and features
|
|
541
|
+
* @description This endpoint is intended for administrative purposes only.
|
|
542
|
+
* To fetch entitlements of a specific customer, use the customer entitlements endpoint.
|
|
543
|
+
* @param options - Request options including query parameters
|
|
544
|
+
* @returns List of entitlements
|
|
545
|
+
*/
|
|
546
|
+
list(options?: RequestOptions & {
|
|
547
|
+
query?: operations['listEntitlementsV2']['parameters']['query'];
|
|
548
|
+
}): Promise<{
|
|
549
|
+
totalCount: number;
|
|
550
|
+
page: number;
|
|
551
|
+
pageSize: number;
|
|
552
|
+
items: import("./schemas.cjs").components["schemas"]["EntitlementV2"][];
|
|
553
|
+
}>;
|
|
554
|
+
/**
|
|
555
|
+
* Get entitlement by ID
|
|
556
|
+
* @param entitlementId - The ID of the entitlement
|
|
557
|
+
* @param options - Request options
|
|
558
|
+
* @returns The entitlement
|
|
559
|
+
*/
|
|
560
|
+
get(entitlementId: operations['getEntitlementByIdV2']['parameters']['path']['entitlementId'], options?: RequestOptions): Promise<import("openapi-typescript-helpers").SuccessResponse<{
|
|
561
|
+
200: {
|
|
562
|
+
headers: {
|
|
563
|
+
[name: string]: unknown;
|
|
564
|
+
};
|
|
565
|
+
content: {
|
|
566
|
+
"application/json": import("./schemas.cjs").components["schemas"]["EntitlementV2"];
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
400: {
|
|
570
|
+
headers: {
|
|
571
|
+
[name: string]: unknown;
|
|
572
|
+
};
|
|
573
|
+
content: {
|
|
574
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["BadRequestProblemResponse"];
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
401: {
|
|
578
|
+
headers: {
|
|
579
|
+
[name: string]: unknown;
|
|
580
|
+
};
|
|
581
|
+
content: {
|
|
582
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["UnauthorizedProblemResponse"];
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
403: {
|
|
586
|
+
headers: {
|
|
587
|
+
[name: string]: unknown;
|
|
588
|
+
};
|
|
589
|
+
content: {
|
|
590
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["ForbiddenProblemResponse"];
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
404: {
|
|
594
|
+
headers: {
|
|
595
|
+
[name: string]: unknown;
|
|
596
|
+
};
|
|
597
|
+
content: {
|
|
598
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["NotFoundProblemResponse"];
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
412: {
|
|
602
|
+
headers: {
|
|
603
|
+
[name: string]: unknown;
|
|
604
|
+
};
|
|
605
|
+
content: {
|
|
606
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["PreconditionFailedProblemResponse"];
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
500: {
|
|
610
|
+
headers: {
|
|
611
|
+
[name: string]: unknown;
|
|
612
|
+
};
|
|
613
|
+
content: {
|
|
614
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["InternalServerErrorProblemResponse"];
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
503: {
|
|
618
|
+
headers: {
|
|
619
|
+
[name: string]: unknown;
|
|
620
|
+
};
|
|
621
|
+
content: {
|
|
622
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["ServiceUnavailableProblemResponse"];
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
default: {
|
|
626
|
+
headers: {
|
|
627
|
+
[name: string]: unknown;
|
|
628
|
+
};
|
|
629
|
+
content: {
|
|
630
|
+
"application/problem+json": import("./schemas.cjs").components["schemas"]["UnexpectedProblemResponse"];
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
}, `${string}/${string}`>>;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Grants
|
|
637
|
+
*/
|
|
638
|
+
export declare class GrantsV2 {
|
|
639
|
+
private client;
|
|
640
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
641
|
+
/**
|
|
642
|
+
* List all grants for all customers and entitlements
|
|
643
|
+
* @description This endpoint is intended for administrative purposes only.
|
|
644
|
+
* To fetch grants of a specific entitlement, use the customer entitlements grants endpoint.
|
|
645
|
+
* @param options - Request options including query parameters
|
|
646
|
+
* @returns List of grants
|
|
647
|
+
*/
|
|
648
|
+
list(options?: RequestOptions & {
|
|
649
|
+
query?: operations['listGrantsV2']['parameters']['query'];
|
|
650
|
+
}): Promise<{
|
|
651
|
+
totalCount: number;
|
|
652
|
+
page: number;
|
|
653
|
+
pageSize: number;
|
|
654
|
+
items: import("./schemas.cjs").components["schemas"]["EntitlementGrant"][];
|
|
655
|
+
}>;
|
|
656
|
+
/**
|
|
657
|
+
* Void a grant (legacy method using V1 endpoint)
|
|
658
|
+
* @description Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations.
|
|
659
|
+
* Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed
|
|
660
|
+
* to the grant will remain, but future usage cannot be burnt down from the grant.
|
|
661
|
+
* @param grantId - The ID of the grant
|
|
662
|
+
* @param options - Request options
|
|
663
|
+
* @returns The voided grant
|
|
664
|
+
* @deprecated This method uses the legacy V1 endpoint. Consider using customer-specific grant operations instead.
|
|
665
|
+
*/
|
|
666
|
+
void(grantId: operations['voidGrant']['parameters']['path']['grantId'], options?: RequestOptions): Promise<undefined>;
|
|
667
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../../src/client/entitlements.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAY9C;;;GAGG;AACH,MAAa,YAAY;IAGH;IAFb,MAAM,CAAQ;IAErB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,KAAK,CAAC,MAAM,CACjB,cAAuF,EACvF,WAAoC,EACpC,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CACjC,gDAAgD,EAChD;YACE,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,cAAc,EAAE,cAAc;iBAC/B;aACF;YACD,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACd,EAAuE,EACvE,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sCAAsC,EAAE;YACzE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,aAAa,EAAE,EAAE;iBAClB;aACF;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,IAAI,CACf,KAGC,EACD,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,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f,cAA2F,EAC3F,yBAAiH,EACjH,KAAkE,EAClE,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAChC,mFAAmF,EACnF;YACE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,yBAAyB;oBACzB,cAAc;iBACf;gBACD,KAAK;aACN;YACD,GAAG,OAAO;SACX,CACF,CAAA;QAED,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,OAAO,CAClB,KAAuD,EACvD,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE;YACnD,MAAM,EAAE;gBACN,KAAK;aACN;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,IAAI,CACf,OAAiE,EACjE,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,0BAA0B,EAAE;YAChE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,OAAO;iBACR;aACF;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AAjHD,wBAiHC"}
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../../src/client/entitlements.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAY9C;;;GAGG;AACH,MAAa,YAAY;IAGH;IAFb,MAAM,CAAQ;IAErB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;IAED;;;;;;;;;;;;;;;OA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;AAED;;GAEG;AACH,MAAa,QAAQ;IACC;IAApB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;IAAG,CAAC;IAEpE;;;;;;OAMG;IACI,KAAK,CAAC,IAAI,CACf,OAEC;QAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE;YACnD,MAAM,EAAE;gBACN,KAAK,EAAE,OAAO,EAAE,KAAK;aACtB;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,IAAI,CACf,OAAiE,EACjE,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,0BAA0B,EAAE;YAChE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,OAAO;iBACR;aACF;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AAlDD,4BAkDC"}
|
|
@@ -68,6 +68,7 @@ class OpenMeter {
|
|
|
68
68
|
billing;
|
|
69
69
|
customers;
|
|
70
70
|
debug;
|
|
71
|
+
entitlementsV1;
|
|
71
72
|
entitlements;
|
|
72
73
|
events;
|
|
73
74
|
features;
|
|
@@ -103,7 +104,8 @@ class OpenMeter {
|
|
|
103
104
|
this.billing = new billing_js_1.Billing(this.client);
|
|
104
105
|
this.customers = new customers_js_1.Customers(this.client);
|
|
105
106
|
this.debug = new debug_js_1.Debug(this.client);
|
|
106
|
-
this.
|
|
107
|
+
this.entitlementsV1 = new entitlements_js_1.Entitlements(this.client);
|
|
108
|
+
this.entitlements = new entitlements_js_1.EntitlementsV2(this.client);
|
|
107
109
|
this.events = new events_js_1.Events(this.client);
|
|
108
110
|
this.features = new features_js_1.Features(this.client);
|
|
109
111
|
this.info = new info_js_1.Info(this.client);
|
|
@@ -4,7 +4,7 @@ import { Apps } from './apps.cjs';
|
|
|
4
4
|
import { Billing } from './billing.cjs';
|
|
5
5
|
import { Customers } from './customers.cjs';
|
|
6
6
|
import { Debug } from './debug.cjs';
|
|
7
|
-
import { Entitlements } from './entitlements.cjs';
|
|
7
|
+
import { Entitlements, EntitlementsV2 } from './entitlements.cjs';
|
|
8
8
|
import { Events } from './events.cjs';
|
|
9
9
|
import { Features } from './features.cjs';
|
|
10
10
|
import { Info } from './info.cjs';
|
|
@@ -38,7 +38,8 @@ export declare class OpenMeter {
|
|
|
38
38
|
billing: Billing;
|
|
39
39
|
customers: Customers;
|
|
40
40
|
debug: Debug;
|
|
41
|
-
|
|
41
|
+
entitlementsV1: Entitlements;
|
|
42
|
+
entitlements: EntitlementsV2;
|
|
42
43
|
events: Events;
|
|
43
44
|
features: Features;
|
|
44
45
|
info: Info;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAIsB;AACtB,2CAAoC;AACpC,uCAAgC;AAChC,6CAAsC;AACtC,iDAA0C;AAC1C,yCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAIsB;AACtB,2CAAoC;AACpC,uCAAgC;AAChC,6CAAsC;AACtC,iDAA0C;AAC1C,yCAAkC;AAClC,uDAAgE;AAChE,2CAAoC;AACpC,+CAAwC;AACxC,uCAAgC;AAChC,2CAAoC;AACpC,yDAAkD;AAClD,yCAAkC;AAClC,2CAAoC;AACpC,+CAAwC;AACxC,qEAA6D;AAC7D,yDAAkD;AAClD,yCAAwC;AAGxC,+CAA4B;AAC5B,8CAA2B;AAmB3B;;GAEG;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