@openmeter/sdk 1.0.0-beta.220 → 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/events.d.cts +1 -0
- 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 +2532 -1707
- package/dist/cjs/src/zod/index.cjs +1808 -1522
- package/dist/cjs/src/zod/index.d.cts +2352 -2172
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.ed1bfe74.tsbuildinfo → tsconfig.58b58bc1.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.f862b9eb.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/events.d.ts +1 -0
- 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 +2532 -1707
- package/dist/src/zod/index.d.ts +2352 -2172
- package/dist/src/zod/index.js +1791 -1506
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -225,7 +225,7 @@ export declare class Entitlements {
|
|
|
225
225
|
featureId: string;
|
|
226
226
|
currentUsagePeriod?: import("./schemas.js").components["schemas"]["Period"];
|
|
227
227
|
usagePeriod?: import("./schemas.js").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.js").components["schemas"]["Period"];
|
|
242
242
|
usagePeriod?: import("./schemas.js").components["schemas"]["RecurringPeriod"];
|
|
243
|
-
}
|
|
244
|
-
readonly createdAt: Date;
|
|
245
|
-
readonly updatedAt: Date;
|
|
246
|
-
readonly deletedAt?: Date;
|
|
247
|
-
metadata?: import("./schemas.js").components["schemas"]["Metadata"];
|
|
248
|
-
activeFrom: Date;
|
|
249
|
-
activeTo?: Date;
|
|
250
|
-
readonly annotations?: import("./schemas.js").components["schemas"]["Annotations"];
|
|
251
|
-
readonly id: string;
|
|
252
|
-
type: import("./schemas.js").components["schemas"]["EntitlementType"];
|
|
253
|
-
subjectKey: string;
|
|
254
|
-
featureKey: string;
|
|
255
|
-
featureId: string;
|
|
256
|
-
currentUsagePeriod?: import("./schemas.js").components["schemas"]["Period"];
|
|
257
|
-
usagePeriod?: import("./schemas.js").components["schemas"]["RecurringPeriod"];
|
|
258
|
-
} & {
|
|
259
|
-
readonly id: string;
|
|
260
|
-
readonly createdAt: Date;
|
|
261
|
-
readonly updatedAt: Date;
|
|
262
|
-
type: import("./schemas.js").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.js").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.js").components["schemas"]["EntitlementV2"];
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
400: {
|
|
570
|
+
headers: {
|
|
571
|
+
[name: string]: unknown;
|
|
572
|
+
};
|
|
573
|
+
content: {
|
|
574
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["BadRequestProblemResponse"];
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
401: {
|
|
578
|
+
headers: {
|
|
579
|
+
[name: string]: unknown;
|
|
580
|
+
};
|
|
581
|
+
content: {
|
|
582
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["UnauthorizedProblemResponse"];
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
403: {
|
|
586
|
+
headers: {
|
|
587
|
+
[name: string]: unknown;
|
|
588
|
+
};
|
|
589
|
+
content: {
|
|
590
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["ForbiddenProblemResponse"];
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
404: {
|
|
594
|
+
headers: {
|
|
595
|
+
[name: string]: unknown;
|
|
596
|
+
};
|
|
597
|
+
content: {
|
|
598
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["NotFoundProblemResponse"];
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
412: {
|
|
602
|
+
headers: {
|
|
603
|
+
[name: string]: unknown;
|
|
604
|
+
};
|
|
605
|
+
content: {
|
|
606
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["PreconditionFailedProblemResponse"];
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
500: {
|
|
610
|
+
headers: {
|
|
611
|
+
[name: string]: unknown;
|
|
612
|
+
};
|
|
613
|
+
content: {
|
|
614
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["InternalServerErrorProblemResponse"];
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
503: {
|
|
618
|
+
headers: {
|
|
619
|
+
[name: string]: unknown;
|
|
620
|
+
};
|
|
621
|
+
content: {
|
|
622
|
+
"application/problem+json": import("./schemas.js").components["schemas"]["ServiceUnavailableProblemResponse"];
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
default: {
|
|
626
|
+
headers: {
|
|
627
|
+
[name: string]: unknown;
|
|
628
|
+
};
|
|
629
|
+
content: {
|
|
630
|
+
"application/problem+json": import("./schemas.js").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.js").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
|
+
}
|
|
@@ -273,4 +273,93 @@ export class Grants {
|
|
|
273
273
|
return transformResponse(resp);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Entitlements V2
|
|
278
|
+
* @description With Entitlements, you can define and enforce usage limits, implement quota-based pricing, and manage access to features in your application.
|
|
279
|
+
*/
|
|
280
|
+
export class EntitlementsV2 {
|
|
281
|
+
client;
|
|
282
|
+
grants;
|
|
283
|
+
constructor(client) {
|
|
284
|
+
this.client = client;
|
|
285
|
+
this.grants = new GrantsV2(client);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* List all entitlements for all customers and features
|
|
289
|
+
* @description This endpoint is intended for administrative purposes only.
|
|
290
|
+
* To fetch entitlements of a specific customer, use the customer entitlements endpoint.
|
|
291
|
+
* @param options - Request options including query parameters
|
|
292
|
+
* @returns List of entitlements
|
|
293
|
+
*/
|
|
294
|
+
async list(options) {
|
|
295
|
+
const resp = await this.client.GET('/api/v2/entitlements', {
|
|
296
|
+
params: {
|
|
297
|
+
query: options?.query,
|
|
298
|
+
},
|
|
299
|
+
...options,
|
|
300
|
+
});
|
|
301
|
+
return transformResponse(resp);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Get entitlement by ID
|
|
305
|
+
* @param entitlementId - The ID of the entitlement
|
|
306
|
+
* @param options - Request options
|
|
307
|
+
* @returns The entitlement
|
|
308
|
+
*/
|
|
309
|
+
async get(entitlementId, options) {
|
|
310
|
+
const resp = await this.client.GET('/api/v2/entitlements/{entitlementId}', {
|
|
311
|
+
params: {
|
|
312
|
+
path: { entitlementId },
|
|
313
|
+
},
|
|
314
|
+
...options,
|
|
315
|
+
});
|
|
316
|
+
return transformResponse(resp);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Grants
|
|
321
|
+
*/
|
|
322
|
+
export class GrantsV2 {
|
|
323
|
+
client;
|
|
324
|
+
constructor(client) {
|
|
325
|
+
this.client = client;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* List all grants for all customers and entitlements
|
|
329
|
+
* @description This endpoint is intended for administrative purposes only.
|
|
330
|
+
* To fetch grants of a specific entitlement, use the customer entitlements grants endpoint.
|
|
331
|
+
* @param options - Request options including query parameters
|
|
332
|
+
* @returns List of grants
|
|
333
|
+
*/
|
|
334
|
+
async list(options) {
|
|
335
|
+
const resp = await this.client.GET('/api/v2/grants', {
|
|
336
|
+
params: {
|
|
337
|
+
query: options?.query,
|
|
338
|
+
},
|
|
339
|
+
...options,
|
|
340
|
+
});
|
|
341
|
+
return transformResponse(resp);
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Void a grant (legacy method using V1 endpoint)
|
|
345
|
+
* @description Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations.
|
|
346
|
+
* Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed
|
|
347
|
+
* to the grant will remain, but future usage cannot be burnt down from the grant.
|
|
348
|
+
* @param grantId - The ID of the grant
|
|
349
|
+
* @param options - Request options
|
|
350
|
+
* @returns The voided grant
|
|
351
|
+
* @deprecated This method uses the legacy V1 endpoint. Consider using customer-specific grant operations instead.
|
|
352
|
+
*/
|
|
353
|
+
async void(grantId, options) {
|
|
354
|
+
const resp = await this.client.DELETE('/api/v1/grants/{grantId}', {
|
|
355
|
+
params: {
|
|
356
|
+
path: {
|
|
357
|
+
grantId,
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
...options,
|
|
361
|
+
});
|
|
362
|
+
return transformResponse(resp);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
276
365
|
//# sourceMappingURL=entitlements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/client/entitlements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAY9C;;;GAGG;AACH,MAAM,OAAO,YAAY;IAGH;IAFb,MAAM,CAAQ;IAErB,YAAoB,MA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,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE;YACnD,MAAM,EAAE;gBACN,KAAK;aACN;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAC,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,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"entitlements.js","sourceRoot":"","sources":["../../../src/client/entitlements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAY9C;;;GAGG;AACH,MAAM,OAAO,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,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACd,EAAuE,EACvE,OAAwB;Q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CAAC,0BAA0B,EAAE;YAChE,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,OAAO;iBACR;aACF;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF"}
|
|
@@ -23,6 +23,7 @@ export declare class Events {
|
|
|
23
23
|
*/
|
|
24
24
|
list(params?: operations['listEvents']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
25
25
|
event: import("./schemas.js").components["schemas"]["Event"];
|
|
26
|
+
customerId?: string;
|
|
26
27
|
validationError?: string;
|
|
27
28
|
ingestedAt: Date;
|
|
28
29
|
storedAt: Date;
|
|
@@ -4,7 +4,7 @@ import { Apps } from './apps.js';
|
|
|
4
4
|
import { Billing } from './billing.js';
|
|
5
5
|
import { Customers } from './customers.js';
|
|
6
6
|
import { Debug } from './debug.js';
|
|
7
|
-
import { Entitlements } from './entitlements.js';
|
|
7
|
+
import { Entitlements, EntitlementsV2 } from './entitlements.js';
|
|
8
8
|
import { Events } from './events.js';
|
|
9
9
|
import { Features } from './features.js';
|
|
10
10
|
import { Info } from './info.js';
|
|
@@ -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;
|
package/dist/src/client/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Apps } from './apps.js';
|
|
|
4
4
|
import { Billing } from './billing.js';
|
|
5
5
|
import { Customers } from './customers.js';
|
|
6
6
|
import { Debug } from './debug.js';
|
|
7
|
-
import { Entitlements } from './entitlements.js';
|
|
7
|
+
import { Entitlements, EntitlementsV2 } from './entitlements.js';
|
|
8
8
|
import { Events } from './events.js';
|
|
9
9
|
import { Features } from './features.js';
|
|
10
10
|
import { Info } from './info.js';
|
|
@@ -29,6 +29,7 @@ export class OpenMeter {
|
|
|
29
29
|
billing;
|
|
30
30
|
customers;
|
|
31
31
|
debug;
|
|
32
|
+
entitlementsV1;
|
|
32
33
|
entitlements;
|
|
33
34
|
events;
|
|
34
35
|
features;
|
|
@@ -64,7 +65,8 @@ export class OpenMeter {
|
|
|
64
65
|
this.billing = new Billing(this.client);
|
|
65
66
|
this.customers = new Customers(this.client);
|
|
66
67
|
this.debug = new Debug(this.client);
|
|
67
|
-
this.
|
|
68
|
+
this.entitlementsV1 = new Entitlements(this.client);
|
|
69
|
+
this.entitlements = new EntitlementsV2(this.client);
|
|
68
70
|
this.events = new Events(this.client);
|
|
69
71
|
this.features = new Features(this.client);
|
|
70
72
|
this.info = new Info(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,EAAE,EACnB,qBAAqB,GAGtB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,EAAE,EACnB,qBAAqB,GAGtB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACt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