@openmeter/sdk 1.0.0-beta.62 → 1.0.0-beta.64
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/clients/client.cjs +117 -0
- package/dist/cjs/clients/client.d.cts +40 -0
- package/dist/cjs/clients/client.js.map +1 -1
- package/dist/cjs/clients/event.cjs +71 -0
- package/dist/cjs/clients/event.d.cts +79 -0
- package/dist/cjs/clients/event.js.map +1 -1
- package/dist/cjs/clients/meter.cjs +69 -0
- package/dist/cjs/clients/meter.d.cts +75 -0
- package/dist/cjs/clients/meter.js.map +1 -1
- package/dist/cjs/clients/portal.cjs +41 -0
- package/dist/cjs/clients/portal.d.cts +22 -0
- package/dist/cjs/clients/portal.js.map +1 -1
- package/dist/cjs/clients/subject.cjs +60 -0
- package/dist/cjs/clients/subject.d.cts +27 -0
- package/dist/cjs/clients/subject.js.map +1 -1
- package/dist/cjs/{index.js → index.cjs} +12 -9
- package/dist/cjs/index.d.cts +15 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/test/{agent.js → agent.cjs} +8 -8
- package/dist/cjs/test/agent.js.map +1 -1
- package/dist/cjs/test/{mocks.js → mocks.cjs} +1 -1
- package/dist/cjs/test/mocks.d.cts +14 -0
- package/dist/cjs/test/mocks.js.map +1 -1
- package/dist/cjs/tsconfig.95235403.tsbuildinfo +1 -0
- package/dist/{types/clients → clients}/client.d.ts +2 -1
- package/dist/clients/client.js +112 -0
- package/dist/clients/client.js.map +1 -0
- package/dist/{types/clients → clients}/event.d.ts +1 -1
- package/dist/clients/event.js +64 -0
- package/dist/clients/event.js.map +1 -0
- package/dist/clients/meter.js +65 -0
- package/dist/clients/meter.js.map +1 -0
- package/dist/clients/portal.js +37 -0
- package/dist/clients/portal.js.map +1 -0
- package/dist/clients/subject.js +56 -0
- package/dist/clients/subject.js.map +1 -0
- package/dist/{types/index.d.ts → index.d.ts} +1 -1
- package/dist/{esm/index.js → index.js} +7 -5
- package/dist/index.js.map +1 -0
- package/dist/schemas/openapi.d.ts +990 -0
- package/dist/{esm/schemas → schemas}/openapi.js.map +1 -1
- package/dist/test/agent.d.ts +2 -0
- package/dist/{esm/test → test}/agent.js +7 -7
- package/dist/test/agent.js.map +1 -0
- package/dist/{esm/test → test}/mocks.js +4 -4
- package/dist/test/mocks.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +22 -12
- package/dist/cjs/clients/client.js +0 -194
- package/dist/cjs/clients/event.js +0 -137
- package/dist/cjs/clients/meter.js +0 -139
- package/dist/cjs/clients/portal.js +0 -109
- package/dist/cjs/clients/subject.js +0 -141
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist/esm/clients/client.js +0 -191
- package/dist/esm/clients/client.js.map +0 -1
- package/dist/esm/clients/event.js +0 -131
- package/dist/esm/clients/event.js.map +0 -1
- package/dist/esm/clients/meter.js +0 -136
- package/dist/esm/clients/meter.js.map +0 -1
- package/dist/esm/clients/portal.js +0 -106
- package/dist/esm/clients/portal.js.map +0 -1
- package/dist/esm/clients/subject.js +0 -138
- package/dist/esm/clients/subject.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/test/agent.js.map +0 -1
- package/dist/esm/test/mocks.js.map +0 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/index.ts +0 -23
- package/tsconfig.base.json +0 -24
- package/tsconfig.cjs.json +0 -8
- package/tsconfig.esm.json +0 -8
- /package/dist/cjs/schemas/{openapi.js → openapi.cjs} +0 -0
- /package/dist/{types/schemas/openapi.d.ts → cjs/schemas/openapi.d.cts} +0 -0
- /package/dist/{types/test/agent.d.ts → cjs/test/agent.d.cts} +0 -0
- /package/dist/{types/clients → clients}/meter.d.ts +0 -0
- /package/dist/{types/clients → clients}/portal.d.ts +0 -0
- /package/dist/{types/clients → clients}/subject.d.ts +0 -0
- /package/dist/{esm/schemas → schemas}/openapi.js +0 -0
- /package/dist/{types/test → test}/mocks.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subject.js","sourceRoot":"","sources":["../../../clients/subject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subject.js","sourceRoot":"","sources":["../../../clients/subject.ts"],"names":[],"mappings":";;;AACA,2CAAyE;AAIzE,MAAa,aAAc,SAAQ,sBAAU;IAC3C,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAA;IACf,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CACjB,OAA8B,EAC9B,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;YACxB,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC7B,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,GAAG,CAAC,OAAe,EAAE,OAAwB;QACxD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;YACxB,IAAI,EAAE,oBAAoB,OAAO,EAAE;YACnC,MAAM,EAAE,KAAK;YACb,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,IAAI,CAAC,OAAwB;QACxC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;YACxB,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,KAAK;YACb,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,OAAe,EACf,OAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC;YACxB,IAAI,EAAE,oBAAoB,OAAO,EAAE;YACnC,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF;AA/DD,sCA+DC"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OpenMeter = exports.WindowSize = exports.MeterAggregation = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var meter_js_2 = require("./clients/meter.
|
|
4
|
+
const event_js_1 = require("./clients/event.cjs");
|
|
5
|
+
const meter_js_1 = require("./clients/meter.cjs");
|
|
6
|
+
const portal_js_1 = require("./clients/portal.cjs");
|
|
7
|
+
const subject_js_1 = require("./clients/subject.cjs");
|
|
8
|
+
var meter_js_2 = require("./clients/meter.cjs");
|
|
9
9
|
Object.defineProperty(exports, "MeterAggregation", { enumerable: true, get: function () { return meter_js_2.MeterAggregation; } });
|
|
10
10
|
Object.defineProperty(exports, "WindowSize", { enumerable: true, get: function () { return meter_js_2.WindowSize; } });
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
class OpenMeter {
|
|
12
|
+
events;
|
|
13
|
+
meters;
|
|
14
|
+
portal;
|
|
15
|
+
subjects;
|
|
16
|
+
constructor(config) {
|
|
13
17
|
this.events = new event_js_1.EventsClient(config);
|
|
14
18
|
this.meters = new meter_js_1.MetersClient(config);
|
|
15
19
|
this.portal = new portal_js_1.PortalClient(config);
|
|
16
20
|
this.subjects = new subject_js_1.SubjectClient(config);
|
|
17
21
|
}
|
|
18
|
-
|
|
19
|
-
}());
|
|
22
|
+
}
|
|
20
23
|
exports.OpenMeter = OpenMeter;
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OpenMeterConfig } from './clients/client.cjs';
|
|
2
|
+
import { EventsClient } from './clients/event.cjs';
|
|
3
|
+
import { MetersClient } from './clients/meter.cjs';
|
|
4
|
+
import { PortalClient } from './clients/portal.cjs';
|
|
5
|
+
import { SubjectClient } from './clients/subject.cjs';
|
|
6
|
+
export { OpenMeterConfig, RequestOptions } from './clients/client.cjs';
|
|
7
|
+
export { Event, IngestedEvent, CloudEvent } from './clients/event.cjs';
|
|
8
|
+
export { Meter, MeterAggregation, WindowSize } from './clients/meter.cjs';
|
|
9
|
+
export declare class OpenMeter {
|
|
10
|
+
events: EventsClient;
|
|
11
|
+
meters: MetersClient;
|
|
12
|
+
portal: PortalClient;
|
|
13
|
+
subjects: SubjectClient;
|
|
14
|
+
constructor(config: OpenMeterConfig);
|
|
15
|
+
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;AACA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;AACA,iDAAiD;AACjD,iDAAiD;AACjD,mDAAkD;AAClD,qDAAoD;AAIpD,+CAAwE;AAAxD,4GAAA,gBAAgB,OAAA;AAAE,sGAAA,UAAU,OAAA;AAE5C,MAAa,SAAS;IACb,MAAM,CAAc;IACpB,MAAM,CAAc;IACpB,MAAM,CAAc;IACpB,QAAQ,CAAe;IAE9B,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,wBAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,0BAAa,CAAC,MAAM,CAAC,CAAA;IAC3C,CAAC;CACF;AAZD,8BAYC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mockAgent = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const undici_1 = require("undici");
|
|
5
|
+
const mocks_js_1 = require("./mocks.cjs");
|
|
6
6
|
exports.mockAgent = new undici_1.MockAgent();
|
|
7
7
|
exports.mockAgent.disableNetConnect();
|
|
8
|
-
|
|
8
|
+
const client = exports.mockAgent.get('http://127.0.0.1:8888');
|
|
9
9
|
/** Event */
|
|
10
10
|
client
|
|
11
11
|
.intercept({
|
|
@@ -54,7 +54,7 @@ client
|
|
|
54
54
|
.reply(204);
|
|
55
55
|
client
|
|
56
56
|
.intercept({
|
|
57
|
-
path:
|
|
57
|
+
path: `/api/v1/events`,
|
|
58
58
|
method: 'GET',
|
|
59
59
|
headers: {
|
|
60
60
|
Accept: 'application/json',
|
|
@@ -105,7 +105,7 @@ client
|
|
|
105
105
|
});
|
|
106
106
|
client
|
|
107
107
|
.intercept({
|
|
108
|
-
path:
|
|
108
|
+
path: `/api/v1/meters/${mocks_js_1.mockMeter.slug}`,
|
|
109
109
|
method: 'GET',
|
|
110
110
|
headers: {
|
|
111
111
|
Accept: 'application/json',
|
|
@@ -119,7 +119,7 @@ client
|
|
|
119
119
|
/** Meter Query */
|
|
120
120
|
client
|
|
121
121
|
.intercept({
|
|
122
|
-
path:
|
|
122
|
+
path: `/api/v1/meters/${mocks_js_1.mockMeter.slug}/query`,
|
|
123
123
|
query: {},
|
|
124
124
|
method: 'GET',
|
|
125
125
|
headers: {
|
|
@@ -138,7 +138,7 @@ client
|
|
|
138
138
|
});
|
|
139
139
|
client
|
|
140
140
|
.intercept({
|
|
141
|
-
path:
|
|
141
|
+
path: `/api/v1/meters/${mocks_js_1.mockMeter.slug}/query`,
|
|
142
142
|
query: {
|
|
143
143
|
subject: 'user-1',
|
|
144
144
|
groupBy: ['a', 'b'],
|
|
@@ -165,7 +165,7 @@ client
|
|
|
165
165
|
/** Meter Subjects */
|
|
166
166
|
client
|
|
167
167
|
.intercept({
|
|
168
|
-
path:
|
|
168
|
+
path: `/api/v1/meters/${mocks_js_1.mockMeter.slug}/subjects`,
|
|
169
169
|
method: 'GET',
|
|
170
170
|
headers: {
|
|
171
171
|
Accept: 'application/json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../test/agent.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../test/agent.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAClC,yCAA8E;AAEjE,QAAA,SAAS,GAAG,IAAI,kBAAS,EAAE,CAAA;AACxC,iBAAS,CAAC,iBAAiB,EAAE,CAAA;AAE7B,MAAM,MAAM,GAAG,iBAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA;AAErD,YAAY;AACZ,MAAM;KACH,SAAS,CAAC;IACT,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE;QACP,MAAM,EAAE,kBAAkB;QAC1B,cAAc,EAAE,8BAA8B;KAC/C;IACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;QACnB,WAAW,EAAE,KAAK;QAClB,EAAE,EAAE,MAAM;QACV,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,oBAAoB;QAC7B,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;QAC5B,IAAI,EAAE;YACJ,SAAS,EAAE,CAAC;SACb;KACF,CAAC;CACH,CAAC;KACD,KAAK,CAAC,GAAG,CAAC,CAAA;AAEb,eAAe;AACf,MAAM;KACH,SAAS,CAAC;IACT,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,MAAM;IACd,OAAO,EAAE;QACP,MAAM,EAAE,kBAAkB;QAC1B,cAAc,EAAE,oCAAoC;KACrD;IACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;QACnB;YACE,WAAW,EAAE,KAAK;YAClB,EAAE,EAAE,MAAM;YACV,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,oBAAoB;YAC7B,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC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AAE,sBAAW,CAAC,GAAG;YACpB,WAAW,EAAE,sBAAW,CAAC,WAAW;YACpC,QAAQ,EAAE,sBAAW,CAAC,QAAQ;SAC/B,CAAC,CAAC;CACJ,CAAC;KACD,KAAK,CAAC,GAAG,EAAE,CAAC,sBAAW,CAAC,EAAE;IACzB,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;KACnC;CACF,CAAC,CAAA;AAEJ,MAAM;KACH,SAAS,CAAC;IACT,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE;QACP,MAAM,EAAE,kBAAkB;KAC3B;CACF,CAAC;KACD,KAAK,CAAC,GAAG,EAAE,CAAC,sBAAW,CAAC,EAAE;IACzB,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;KACnC;CACF,CAAC,CAAA;AAEJ,MAAM;KACH,SAAS,CAAC;IACT,IAAI,EAAE,6BAA6B;IACnC,MAAM,EAAE,KAAK;IACb,OAAO,EAAE;QACP,MAAM,EAAE,kBAAkB;KAC3B;CACF,CAAC;KACD,KAAK,CAAC,GAAG,EAAE,sBAAW,EAAE;IACvB,OAAO,EAAE;QACP,cAAc,EAAE,kBAAkB;KACnC;CACF,CAAC,CAAA;AAEJ,MAAM;KACH,SAAS,CAAC;IACT,IAAI,EAAE,6BAA6B;IACnC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE;QACP,MAAM,EAAE,kBAAkB;KAC3B;CACF,CAAC;KACD,KAAK,CAAC,GAAG,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mockSubject = exports.mockMeterValue = exports.mockMeter = exports.mockEvent = void 0;
|
|
4
|
-
|
|
4
|
+
const index_js_1 = require("../index.cjs");
|
|
5
5
|
exports.mockEvent = {
|
|
6
6
|
specversion: '1.0',
|
|
7
7
|
id: 'id-1',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Subject } from '../clients/subject.cjs';
|
|
2
|
+
import { Event, Meter } from '../index.cjs';
|
|
3
|
+
export declare const mockEvent: Event;
|
|
4
|
+
export declare const mockMeter: Meter;
|
|
5
|
+
export declare const mockMeterValue: {
|
|
6
|
+
subject: string;
|
|
7
|
+
windowStart: string;
|
|
8
|
+
windowEnd: string;
|
|
9
|
+
value: number;
|
|
10
|
+
groupBy: {
|
|
11
|
+
method: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const mockSubject: Subject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../test/mocks.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../../test/mocks.ts"],"names":[],"mappings":";;;AACA,0CAAsD;AAEzC,QAAA,SAAS,GAAU;IAC9B,WAAW,EAAE,KAAK;IAClB,EAAE,EAAE,MAAM;IACV,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,oBAAoB;IAC7B,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;IAC5B,IAAI,EAAE;QACJ,SAAS,EAAE,CAAC;KACb;CACF,CAAA;AAEY,QAAA,SAAS,GAAU;IAC9B,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,qBAAU,CAAC,IAAI;IAC3B,OAAO,EAAE;QACP,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE,QAAQ;KACf;CACF,CAAA;AAEY,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,YAAY;IACrB,WAAW,EAAE,0BAA0B;IACvC,SAAS,EAAE,0BAA0B;IACrC,KAAK,EAAE,CAAC;IACR,OAAO,EAAE;QACP,MAAM,EAAE,KAAK;KACd;CACF,CAAA;AAEY,QAAA,WAAW,GAAY;IAClC,EAAE,EAAE,OAAO;IACX,GAAG,EAAE,YAAY;IACjB,WAAW,EAAE,YAAY;IACzB,QAAQ,EAAE;QACR,GAAG,EAAE,KAAK;KACX;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.esnext.object.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/header.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/readable.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/assert.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/assert/strict.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/header.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/readable.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/file.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/fetch.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/formdata.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/connector.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/client.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/errors.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/dispatcher.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/global-dispatcher.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/global-origin.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/pool-stats.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/pool.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/handlers.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/balanced-pool.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/agent.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-interceptor.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-agent.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-client.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-pool.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/mock-errors.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/proxy-agent.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/api.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/cookies.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/patch.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/filereader.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/diagnostics-channel.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/websocket.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/content-type.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/cache.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/interceptors.d.ts","../../node_modules/.pnpm/undici-types@5.26.5/node_modules/undici-types/index.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/globals.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/async_hooks.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/buffer.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/child_process.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/cluster.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/console.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/constants.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/crypto.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/dgram.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/dns.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/dns/promises.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/domain.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/dom-events.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/events.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/fs.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/fs/promises.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/http.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/http2.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/https.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/inspector.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/module.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/net.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/os.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/path.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/perf_hooks.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/process.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/punycode.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/querystring.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/readline.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/readline/promises.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/repl.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/sea.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/stream.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/stream/promises.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/stream/consumers.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/stream/web.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/string_decoder.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/test.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/timers.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/timers/promises.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/tls.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/trace_events.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/tty.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/url.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/util.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/v8.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/vm.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/wasi.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/worker_threads.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/zlib.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/globals.global.d.ts","../../node_modules/.pnpm/@types+node@20.12.7/node_modules/@types/node/index.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/file.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/fetch.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/formdata.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/connector.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/client.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/errors.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/dispatcher.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/global-dispatcher.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/global-origin.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/pool-stats.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/pool.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/handlers.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/balanced-pool.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/agent.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/mock-interceptor.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/mock-agent.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/mock-client.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/mock-pool.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/mock-errors.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/proxy-agent.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/env-http-proxy-agent.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/retry-handler.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/retry-agent.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/api.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/util.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/cookies.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/patch.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/websocket.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/eventsource.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/filereader.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/diagnostics-channel.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/content-type.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/cache.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/interceptors.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/types/index.d.ts","../../node_modules/.pnpm/undici@6.14.1/node_modules/undici/index.d.ts","../../schemas/openapi.ts","../../clients/client.ts","../../clients/event.ts","../../clients/meter.ts","../../clients/portal.ts","../../clients/subject.ts","../../index.ts","../../test/mocks.ts","../../test/agent.ts","../../node_modules/.pnpm/@types+eslint@8.56.7/node_modules/@types/eslint/helpers.d.ts","../../node_modules/.pnpm/@types+estree@1.0.5/node_modules/@types/estree/index.d.ts","../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts","../../node_modules/.pnpm/@types+eslint@8.56.7/node_modules/@types/eslint/index.d.ts","../../node_modules/.pnpm/form-data@4.0.0/node_modules/form-data/index.d.ts","../../node_modules/.pnpm/@types+node-fetch@2.6.11/node_modules/@types/node-fetch/externals.d.ts","../../node_modules/.pnpm/@types+node-fetch@2.6.11/node_modules/@types/node-fetch/index.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","impliedFormat":1},{"version":"1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","impliedFormat":1},{"version":"886e50ef125efb7878f744e86908884c0133e7a6d9d80013f421b0cd8fb2af94","impliedFormat":1},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true,"impliedFormat":1},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true,"impliedFormat":1},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true,"impliedFormat":1},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true,"impliedFormat":1},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true,"impliedFormat":1},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true,"impliedFormat":1},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true,"impliedFormat":1},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"acdc9fb9638a235a69bd270003d8db4d6153ada2b7ccbea741ade36b295e431e","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","impliedFormat":1},{"version":"3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","impliedFormat":1},{"version":"e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","impliedFormat":1},{"version":"471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","impliedFormat":1},{"version":"c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","impliedFormat":1},{"version":"40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","impliedFormat":1},{"version":"8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","impliedFormat":1},{"version":"4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1","impliedFormat":1},{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true,"impliedFormat":1},{"version":"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c","impliedFormat":1},{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","impliedFormat":1},{"version":"d69a3298a197fe5d59edba0ec23b4abf2c8e7b8c6718eac97833633cd664e4c9","impliedFormat":1},{"version":"a9544f6f8af0d046565e8dde585502698ebc99eef28b715bad7c2bded62e4a32","affectsGlobalScope":true,"impliedFormat":1},{"version":"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","impliedFormat":1},{"version":"8b809082dfeffc8cc4f3b9c59f55c0ff52ba12f5ae0766cb5c35deee83b8552e","affectsGlobalScope":true,"impliedFormat":1},{"version":"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","impliedFormat":1},{"version":"4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","impliedFormat":1},{"version":"d4f9d3ae2fe1ae199e1c832cca2c44f45e0b305dfa2808afdd51249b6f4a5163","impliedFormat":1},{"version":"7525257b4aa35efc7a1bbc00f205a9a96c4e4ab791da90db41b77938c4e0c18e","impliedFormat":1},{"version":"b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"9c611eff81287837680c1f4496daf9e737d6f3a1ff17752207814b8f8e1265af","affectsGlobalScope":true,"impliedFormat":1},{"version":"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","impliedFormat":1},{"version":"b5d4e3e524f2eead4519c8e819eaf7fa44a27c22418eff1b7b2d0ebc5fdc510d","impliedFormat":1},{"version":"afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","impliedFormat":1},{"version":"9bd8e5984676cf28ebffcc65620b4ab5cb38ab2ec0aac0825df8568856895653","impliedFormat":1},{"version":"396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","impliedFormat":1},{"version":"5e8dc64e7e68b2b3ea52ed685cf85239e0d5fb9df31aabc94370c6bc7e19077b","impliedFormat":1},{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","impliedFormat":1},{"version":"45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","impliedFormat":1},{"version":"0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7","impliedFormat":1},{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true,"impliedFormat":1},{"version":"46755a4afc53df75f0bfce72259fb971daac826b0cdd8c4eaccad2755a817403","affectsGlobalScope":true,"impliedFormat":1},{"version":"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","impliedFormat":1},{"version":"54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","impliedFormat":1},{"version":"d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","impliedFormat":1},{"version":"8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","impliedFormat":1},{"version":"01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","impliedFormat":1},{"version":"269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"7fa32887f8a97909fca35ebba3740f8caf8df146618d8fff957a3f89f67a2f6a","impliedFormat":1},{"version":"9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024","impliedFormat":1},{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true,"impliedFormat":1},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true,"impliedFormat":1},{"version":"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","impliedFormat":1},{"version":"4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","impliedFormat":1},{"version":"7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","impliedFormat":1},{"version":"7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df","impliedFormat":1},{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","impliedFormat":1},{"version":"79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","impliedFormat":1},{"version":"21c56c6e8eeacef15f63f373a29fab6a2b36e4705be7a528aae8c51469e2737b","impliedFormat":1},{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"34b4f256dd3c591cb7c9e96a763d79d54b69d417709b9015dcec3ac5583eec73","impliedFormat":1},{"version":"3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","impliedFormat":1},{"version":"d6298248f2f3af5b409e2dff9afd5b63aa818f05cd8e0a8e643af6d162bde53d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"8b9bf58d580d9b36ab2f23178c88757ce7cc6830ccbdd09e8a76f4cb1bc0fcf7","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"7782678102bd835ef2c54330ee16c31388e51dfd9ca535b47f6fd8f3d6e07993","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","impliedFormat":1},{"version":"547d4fc9814510d9f04e6603f8b274f75d5a41d554c0d1b569b7165687c872ac","impliedFormat":1},{"version":"299fd0c281633d8dbfbe5f44c5f2850fe37392da6fd3b9cca3cb4e10cda16432","impliedFormat":1},{"version":"8e30805d00f4c4c5e3fbe546863f04bdec5d37812706620d7d6adba0f74c4f59","signature":"71d7e8ed05903ee9229c0a5a70d04b531b5bd25d7b81e8b0af6367b329a30523","impliedFormat":1},{"version":"ea22ffe08697e085e4a5aba8b5558298c83640a050abd54a6aab8969bed1d16a","signature":"acf2be812a743df8957b6e261d50054b6ac91564b740a6b19da249a7b3a9c11f","impliedFormat":1},{"version":"fe50fa06dbb879143f48ee04d9fb6bc30b987f9de6f03e482d67cfac709cc1fb","signature":"9cf47f7fe53e19bd310b6d41cd06fe6692e828b1edbb4ed8a307c99de08331cc","impliedFormat":1},{"version":"35e05f5b0dcd81dbb291ef84d44da32be5fa9c8a8fe51f35368f3f9ac3d8f36e","signature":"6e5de733114a660d3a3c692b9d8593959ca8cda5aa4c1eebb955fdde7f734ee4","impliedFormat":1},{"version":"88f99415f6b9fe25c841eeefe85c79ebd203a17ac984bb97f507e90f18409cef","signature":"0e6bb49d6702d46bfa799e3536e269b2fb2d5a8d2f9a277debbec0cad0508ee3","impliedFormat":1},{"version":"458a992b6fe83595cfdcb0e9ce3ec213bff00b314bf73762ba1a9165bf4384d8","signature":"d1694bd78a031d03885e6b233a61b1122ea1c38ecdad0a5e82e480d0637c0b31","impliedFormat":1},{"version":"c31008875b1c886a5af8b8af8f235ce28b6bc9988431b7d7d5454143f7b10b5e","signature":"b6bb1e13b00a55d51137aef31f9f143ae2b1c71de2d19626b81fbdc7d94aa3cd","impliedFormat":1},{"version":"a309648baf0396b9c9b55515485dc9255bdb52a15e65142c55772946ee4b2ca5","signature":"7223735f63ff40dee205d9e574eb3218d04ae77f2e15022427c17d4a3946459d","impliedFormat":1},{"version":"395961ef4c40cfd7bca473e1c17de7a664e0a2d5d397f959bd406e2fd478786d","signature":"034fd5b38e44b4302935037f69d3888fdeb7a15bfebf5ee33a375cf4d92823ed","impliedFormat":1},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true,"impliedFormat":1},{"version":"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"042633127c7595f5d198bca8ff3051203fe29f49460d0ed1d82a1179fc9805bd","impliedFormat":1},{"version":"736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","impliedFormat":1},{"version":"4340936f4e937c452ae783514e7c7bbb7fc06d0c97993ff4865370d0962bb9cf","impliedFormat":1},{"version":"5fc6e6b8232254d80ed6b802372dba7f426f0a596f5fe26b7773acfdc8232926","impliedFormat":1}],"root":[[193,201]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":199,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"fileIdsList":[[121,192,193],[111,193,194],[193,194],[194,195,196,197,198],[202,203,204],[121,148,156,206,207],[70],[105],[106,111,140],[107,118,119,126,137,148],[107,108,118,126],[109,149],[110,111,119,127],[111,137,145],[112,114,118,126],[105,113],[114,115],[118],[116,118],[105,118],[118,119,120,137,148],[118,119,120,133,137,140],[103,106,153],[114,118,121,126,137,148],[118,119,121,122,126,137,145,148],[121,123,137,145,148],[70,71,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155],[118,124],[125,148,153],[114,118,126,137],[127],[128],[105,129],[130,147,153],[131],[132],[118,133,134],[133,135,149,151],[106,118,137,138,139,140],[106,137,139],[137,138],[140],[141],[105,137],[118,143,144],[143,144],[111,126,137,145],[146],[126,147],[106,121,132,148],[111,149],[137,150],[125,151],[152],[106,111,118,120,129,137,148,151,153],[137,154],[121,137,156],[80,84,148],[80,137,148],[75],[77,80,145,148],[126,145],[156],[75,156],[77,80,126,148],[72,73,76,79,106,118,137,148],[72,78],[76,80,106,140,148,156],[106,156],[96,106,156],[74,75,156],[80],[74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90,91,92,93,94,95,97,98,99,100,101,102],[80,87,88],[78,80,88,89],[79],[72,75,80],[80,84,88,89],[84],[78,80,83,148],[72,77,78,80,84,87],[106,137],[75,80,96,106,153,156],[191],[148,163,167],[137,148,163],[158],[145,148,160,163],[156,158],[126,148,160,163],[68,69,106,118,137,148,159,162],[163,170],[68,161],[163,183,184],[106,140,148,156,159,163],[106,156,183],[156,157,158],[163],[157,158,159,160,161,162,163,164,165,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,184,185,186,187,188,189,190],[163,170,171],[161,163,171,172],[162],[68,158,163],[163,167,171,172],[167],[148,161,163,166],[68,160,163,170],[68,160,163,170,178],[106,153,156,158,163,183],[192,200],[198,199],[121,148,192,193],[192]],"referencedMap":[[194,1],[195,2],[196,3],[197,3],[198,3],[199,4],[205,5],[208,6],[70,7],[71,7],[105,8],[106,9],[107,10],[108,11],[109,12],[110,13],[111,14],[112,15],[113,16],[114,17],[115,17],[117,18],[116,19],[118,20],[119,21],[120,22],[104,23],[121,24],[122,25],[123,26],[156,27],[124,28],[125,29],[126,30],[127,31],[128,32],[129,33],[130,34],[131,35],[132,36],[133,37],[134,37],[135,38],[137,39],[139,40],[138,41],[140,42],[141,43],[142,44],[143,45],[144,46],[145,47],[146,48],[147,49],[148,50],[149,51],[150,52],[151,53],[152,54],[153,55],[154,56],[206,57],[87,58],[94,59],[86,58],[101,60],[78,61],[77,62],[100,63],[95,64],[98,65],[80,66],[79,67],[75,68],[74,69],[97,70],[76,71],[81,72],[85,72],[103,73],[102,72],[89,74],[90,75],[92,76],[88,77],[91,78],[96,63],[83,79],[84,80],[93,81],[73,82],[99,83],[192,84],[170,85],[180,86],[169,85],[189,87],[161,88],[160,62],[188,63],[182,89],[187,90],[163,91],[177,92],[162,93],[185,94],[158,95],[157,69],[186,96],[159,97],[164,98],[168,98],[191,99],[190,98],[172,100],[173,101],[175,102],[171,103],[174,104],[183,63],[166,105],[167,106],[176,107],[69,82],[179,108],[178,98],[184,109],[201,110],[200,111]],"exportedModulesMap":[[194,112],[195,3],[196,3],[197,3],[198,3],[199,4],[205,5],[208,6],[70,7],[71,7],[105,8],[106,9],[107,10],[108,11],[109,12],[110,13],[111,14],[112,15],[113,16],[114,17],[115,17],[117,18],[116,19],[118,20],[119,21],[120,22],[104,23],[121,24],[122,25],[123,26],[156,27],[124,28],[125,29],[126,30],[127,31],[128,32],[129,33],[130,34],[131,35],[132,36],[133,37],[134,37],[135,38],[137,39],[139,40],[138,41],[140,42],[141,43],[142,44],[143,45],[144,46],[145,47],[146,48],[147,49],[148,50],[149,51],[150,52],[151,53],[152,54],[153,55],[154,56],[206,57],[87,58],[94,59],[86,58],[101,60],[78,61],[77,62],[100,63],[95,64],[98,65],[80,66],[79,67],[75,68],[74,69],[97,70],[76,71],[81,72],[85,72],[103,73],[102,72],[89,74],[90,75],[92,76],[88,77],[91,78],[96,63],[83,79],[84,80],[93,81],[73,82],[99,83],[192,84],[170,85],[180,86],[169,85],[189,87],[161,88],[160,62],[188,63],[182,89],[187,90],[163,91],[177,92],[162,93],[185,94],[158,95],[157,69],[186,96],[159,97],[164,98],[168,98],[191,99],[190,98],[172,100],[173,101],[175,102],[171,103],[174,104],[183,63],[166,105],[167,106],[176,107],[69,82],[179,108],[178,98],[184,109],[201,113],[200,111]],"semanticDiagnosticsPerFile":[194,195,196,197,198,199,202,205,203,204,207,208,70,71,105,106,107,108,109,110,111,112,113,114,115,117,116,118,119,120,104,155,121,122,123,156,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,138,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,206,66,67,13,12,2,14,15,16,17,18,19,20,21,3,22,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,60,11,64,62,61,65,63,87,94,86,101,78,77,100,95,98,80,79,75,74,97,76,81,82,85,72,103,102,89,90,92,88,91,96,83,84,93,73,99,192,170,180,169,189,161,160,188,182,187,163,177,162,185,158,157,186,159,164,165,168,68,191,190,172,173,175,171,174,183,166,167,176,69,179,178,181,184,193,201,200]},"version":"5.4.5"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
3
4
|
import { IncomingHttpHeaders } from 'http';
|
|
4
5
|
import { Dispatcher } from 'undici';
|
|
5
6
|
import { components } from '../schemas/openapi.js';
|
|
@@ -25,7 +26,7 @@ export declare class BaseClient {
|
|
|
25
26
|
body?: string | Buffer | Uint8Array;
|
|
26
27
|
options?: RequestOptions;
|
|
27
28
|
}): Promise<T>;
|
|
28
|
-
protected getUrl(path: string, searchParams?: URLSearchParams): URL;
|
|
29
|
+
protected getUrl(path: string, searchParams?: URLSearchParams): import("url").URL;
|
|
29
30
|
protected getAuthHeaders(): IncomingHttpHeaders;
|
|
30
31
|
protected static toURLSearchParams(params: Record<string, string | number | Date | string[] | Record<string, string> | undefined>): URLSearchParams;
|
|
31
32
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { request } from 'undici';
|
|
2
|
+
export class BaseClient {
|
|
3
|
+
config;
|
|
4
|
+
constructor(config) {
|
|
5
|
+
this.config = config;
|
|
6
|
+
}
|
|
7
|
+
async request({ path, method, searchParams, headers, body, options, }) {
|
|
8
|
+
// Building URL
|
|
9
|
+
const url = this.getUrl(path, searchParams);
|
|
10
|
+
// Request options
|
|
11
|
+
const reqHeaders = {
|
|
12
|
+
Accept: 'application/json',
|
|
13
|
+
...headers,
|
|
14
|
+
...this.getAuthHeaders(),
|
|
15
|
+
...this.config.headers,
|
|
16
|
+
...options?.headers,
|
|
17
|
+
};
|
|
18
|
+
const reqOpts = {
|
|
19
|
+
method,
|
|
20
|
+
headers: reqHeaders,
|
|
21
|
+
};
|
|
22
|
+
// Optional body
|
|
23
|
+
if (body) {
|
|
24
|
+
if (!reqHeaders['Content-Type'] && !reqHeaders['content-type']) {
|
|
25
|
+
throw new Error('Content Type is required with body');
|
|
26
|
+
}
|
|
27
|
+
reqOpts.body = body;
|
|
28
|
+
}
|
|
29
|
+
const resp = await request(url, reqOpts);
|
|
30
|
+
// Error handling
|
|
31
|
+
if (resp.statusCode > 399) {
|
|
32
|
+
if (resp.headers['content-type'] === 'application/problem+json') {
|
|
33
|
+
const problem = (await resp.body.json());
|
|
34
|
+
throw new HttpError({
|
|
35
|
+
statusCode: resp.statusCode,
|
|
36
|
+
problem,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// Requests can fail before API, in this case we only have a status code
|
|
40
|
+
throw new HttpError({
|
|
41
|
+
statusCode: resp.statusCode,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
// Response parsing
|
|
45
|
+
if (resp.statusCode === 204 || resp.headers['content-length'] === '0') {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
if (resp.headers['content-type'] === 'application/json') {
|
|
49
|
+
return (await resp.body.json());
|
|
50
|
+
}
|
|
51
|
+
if (!resp.headers['content-type']) {
|
|
52
|
+
throw new Error('Missing content type');
|
|
53
|
+
}
|
|
54
|
+
throw new Error(`Unknown content type: ${resp.headers['content-type']}`);
|
|
55
|
+
}
|
|
56
|
+
getUrl(path, searchParams) {
|
|
57
|
+
let qs = searchParams ? searchParams.toString() : '';
|
|
58
|
+
qs = qs.length > 0 ? `?${qs}` : '';
|
|
59
|
+
const url = new URL(`${path}${qs}`, this.config.baseUrl);
|
|
60
|
+
return url;
|
|
61
|
+
}
|
|
62
|
+
getAuthHeaders() {
|
|
63
|
+
if (this.config.token) {
|
|
64
|
+
return {
|
|
65
|
+
authorization: `Bearer ${this.config.token}`,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (this.config.username && this.config.password) {
|
|
69
|
+
const encoded = Buffer.from(`${this.config.username}:${this.config.password}`).toString('base64');
|
|
70
|
+
return {
|
|
71
|
+
authorization: `Basic ${encoded}`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return {};
|
|
75
|
+
}
|
|
76
|
+
static toURLSearchParams(params) {
|
|
77
|
+
const searchParams = new URLSearchParams();
|
|
78
|
+
for (const [key, value] of Object.entries(params)) {
|
|
79
|
+
if (value === undefined) {
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (Array.isArray(value)) {
|
|
83
|
+
for (const item of value) {
|
|
84
|
+
searchParams.append(key, item);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if (value instanceof Date) {
|
|
88
|
+
searchParams.append(key, value.toISOString());
|
|
89
|
+
}
|
|
90
|
+
else if (typeof value === 'object') {
|
|
91
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
92
|
+
searchParams.append(`${key}[${k}]`, v);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
searchParams.append(key, value.toString());
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return searchParams;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export class HttpError extends Error {
|
|
103
|
+
statusCode;
|
|
104
|
+
problem;
|
|
105
|
+
constructor({ statusCode, problem, }) {
|
|
106
|
+
super(problem?.type || 'unexpected status code');
|
|
107
|
+
this.name = 'HttpError';
|
|
108
|
+
this.statusCode = statusCode;
|
|
109
|
+
this.problem = problem;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../clients/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAA;AAuB5C,MAAM,OAAO,UAAU;IACX,MAAM,CAAiB;IAEjC,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAES,KAAK,CAAC,OAAO,CAAI,EACzB,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,IAAI,EACJ,OAAO,GAQR;QACC,eAAe;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;QAE3C,kBAAkB;QAClB,MAAM,UAAU,GAAwB;YACtC,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO;YACV,GAAG,IAAI,CAAC,cAAc,EAAE;YACxB,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO;YACtB,GAAG,OAAO,EAAE,OAAO;SACpB,CAAA;QACD,MAAM,OAAO,GAAyB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|
1
1
|
import { components } from '../schemas/openapi.js';
|
|
2
2
|
import { RequestOptions, BaseClient, OpenMeterConfig } from './client.js';
|
|
3
|
-
export type
|
|
3
|
+
export type CloudEvent = components['schemas']['Event'];
|
|
4
4
|
export type IngestedEvent = components['schemas']['IngestedEvent'];
|
|
5
5
|
export type EventsQueryParams = {
|
|
6
6
|
/**
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
import { BaseClient } from './client.js';
|
|
3
|
+
export class EventsClient extends BaseClient {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super(config);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Ingest usage event in a CloudEvents format
|
|
9
|
+
* @see https://cloudevents.io
|
|
10
|
+
*/
|
|
11
|
+
async ingest(usageEvent, options) {
|
|
12
|
+
const isBatch = Array.isArray(usageEvent);
|
|
13
|
+
const cloudEvents = (isBatch ? usageEvent : [usageEvent]).map((ev) => {
|
|
14
|
+
// Validate content type
|
|
15
|
+
if (ev.datacontenttype && ev.datacontenttype !== 'application/json') {
|
|
16
|
+
throw new TypeError(`Unsupported datacontenttype: ${ev.datacontenttype}`);
|
|
17
|
+
}
|
|
18
|
+
// We default where we can to lower the barrier to use CloudEvents
|
|
19
|
+
const cloudEvent = {
|
|
20
|
+
specversion: ev.specversion ?? '1.0',
|
|
21
|
+
id: ev.id ?? crypto.randomUUID(),
|
|
22
|
+
source: ev.source ?? '@openmeter/sdk',
|
|
23
|
+
type: ev.type,
|
|
24
|
+
subject: ev.subject,
|
|
25
|
+
time: ev.time?.toISOString(),
|
|
26
|
+
datacontenttype: ev.datacontenttype,
|
|
27
|
+
dataschema: ev.dataschema,
|
|
28
|
+
data: ev.data,
|
|
29
|
+
};
|
|
30
|
+
return cloudEvent;
|
|
31
|
+
});
|
|
32
|
+
const contentType = isBatch
|
|
33
|
+
? 'application/cloudevents-batch+json'
|
|
34
|
+
: 'application/cloudevents+json';
|
|
35
|
+
const body = isBatch
|
|
36
|
+
? JSON.stringify(cloudEvents)
|
|
37
|
+
: JSON.stringify(cloudEvents[0]);
|
|
38
|
+
// Making Request
|
|
39
|
+
return await this.request({
|
|
40
|
+
path: '/api/v1/events',
|
|
41
|
+
method: 'POST',
|
|
42
|
+
body,
|
|
43
|
+
headers: {
|
|
44
|
+
'Content-Type': contentType,
|
|
45
|
+
},
|
|
46
|
+
options,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* List raw events
|
|
51
|
+
*/
|
|
52
|
+
async list(params, options) {
|
|
53
|
+
const searchParams = params
|
|
54
|
+
? BaseClient.toURLSearchParams(params)
|
|
55
|
+
: undefined;
|
|
56
|
+
return this.request({
|
|
57
|
+
method: 'GET',
|
|
58
|
+
path: `/api/v1/events`,
|
|
59
|
+
searchParams,
|
|
60
|
+
options,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../clients/event.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAkB,UAAU,EAAmB,MAAM,aAAa,CAAA;AAuEzE,MAAM,OAAO,YAAa,SAAQ,UAAU;IAC1C,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAA;IACf,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,UAA2B,EAC3B,OAAwB;QAExB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;QACzC,MAAM,WAAW,GAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CACzE,CAAC,EAAE,EAAE,EAAE;YACL,wBAAwB;YACxB,IAAI,EAAE,CAAC,eAAe,IAAI,EAAE,C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AC;YACtC,CAAC,CAAC,SAAS,CAAA;QACb,OAAO,IAAI,CAAC,OAAO,CAAkB;YACnC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,gBAAgB;YACtB,YAAY;YACZ,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BaseClient } from './client.js';
|
|
2
|
+
export var WindowSize;
|
|
3
|
+
(function (WindowSize) {
|
|
4
|
+
WindowSize["MINUTE"] = "MINUTE";
|
|
5
|
+
WindowSize["HOUR"] = "HOUR";
|
|
6
|
+
WindowSize["DAY"] = "DAY";
|
|
7
|
+
})(WindowSize || (WindowSize = {}));
|
|
8
|
+
export var MeterAggregation;
|
|
9
|
+
(function (MeterAggregation) {
|
|
10
|
+
MeterAggregation["SUM"] = "SUM";
|
|
11
|
+
MeterAggregation["COUNT"] = "COUNT";
|
|
12
|
+
MeterAggregation["AVG"] = "AVG";
|
|
13
|
+
MeterAggregation["MIN"] = "MIN";
|
|
14
|
+
MeterAggregation["MAX"] = "MAX";
|
|
15
|
+
})(MeterAggregation || (MeterAggregation = {}));
|
|
16
|
+
export class MetersClient extends BaseClient {
|
|
17
|
+
constructor(config) {
|
|
18
|
+
super(config);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get one meter by slug
|
|
22
|
+
*/
|
|
23
|
+
async get(slug, options) {
|
|
24
|
+
return this.request({
|
|
25
|
+
method: 'GET',
|
|
26
|
+
path: `/api/v1/meters/${slug}`,
|
|
27
|
+
options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* List meters
|
|
32
|
+
*/
|
|
33
|
+
async list(options) {
|
|
34
|
+
return this.request({
|
|
35
|
+
method: 'GET',
|
|
36
|
+
path: `/api/v1/meters`,
|
|
37
|
+
options,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Query a meter
|
|
42
|
+
*/
|
|
43
|
+
async query(slug, params, options) {
|
|
44
|
+
const searchParams = params
|
|
45
|
+
? BaseClient.toURLSearchParams(params)
|
|
46
|
+
: undefined;
|
|
47
|
+
return this.request({
|
|
48
|
+
method: 'GET',
|
|
49
|
+
path: `/api/v1/meters/${slug}/query`,
|
|
50
|
+
searchParams,
|
|
51
|
+
options,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* List subjects of a meter
|
|
56
|
+
*/
|
|
57
|
+
async subjects(slug, options) {
|
|
58
|
+
return this.request({
|
|
59
|
+
method: 'GET',
|
|
60
|
+
path: `/api/v1/meters/${slug}/subjects`,
|
|
61
|
+
options,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=meter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meter.js","sourceRoot":"","sources":["../../clients/meter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmC,MAAM,aAAa,CAAA;AAEzE,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,2BAAa,CAAA;IACb,yBAAW,CAAA;AACb,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAED,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,mCAAe,CAAA;IACf,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,+BAAW,CAAA;AACb,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AAgDD,MAAM,OAAO,YAAa,SAAQ,UAAU;IAC1C,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAA;IACf,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAQ;YACzB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,kBAAkB,IAAI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