@openmeter/sdk 1.0.0-beta.62 → 1.0.0-beta.63
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/{types/clients → clients}/client.d.ts +2 -1
- package/dist/{types/clients → clients}/event.d.ts +1 -1
- package/dist/index.cjs +348 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{types/index.d.ts → index.d.ts} +1 -1
- package/dist/index.js +346 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.ts +1 -1
- package/package.json +8 -6
- package/rollup.config.js +22 -0
- package/dist/cjs/clients/client.js +0 -194
- package/dist/cjs/clients/client.js.map +0 -1
- package/dist/cjs/clients/event.js +0 -137
- package/dist/cjs/clients/event.js.map +0 -1
- package/dist/cjs/clients/meter.js +0 -139
- package/dist/cjs/clients/meter.js.map +0 -1
- package/dist/cjs/clients/portal.js +0 -109
- package/dist/cjs/clients/portal.js.map +0 -1
- package/dist/cjs/clients/subject.js +0 -141
- package/dist/cjs/clients/subject.js.map +0 -1
- package/dist/cjs/index.js +0 -21
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/schemas/openapi.js +0 -7
- package/dist/cjs/schemas/openapi.js.map +0 -1
- package/dist/cjs/test/agent.js +0 -266
- package/dist/cjs/test/agent.js.map +0 -1
- package/dist/cjs/test/mocks.js +0 -44
- package/dist/cjs/test/mocks.js.map +0 -1
- 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 +0 -16
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/schemas/openapi.js +0 -6
- package/dist/esm/schemas/openapi.js.map +0 -1
- package/dist/esm/test/agent.js +0 -263
- package/dist/esm/test/agent.js.map +0 -1
- package/dist/esm/test/mocks.js +0 -41
- package/dist/esm/test/mocks.js.map +0 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/tsconfig.base.json +0 -24
- package/tsconfig.cjs.json +0 -8
- package/tsconfig.esm.json +0 -8
- /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/{types/schemas → schemas}/openapi.d.ts +0 -0
- /package/dist/{types/test → test}/agent.d.ts +0 -0
- /package/dist/{types/test → test}/mocks.d.ts +0 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
import { request } from 'undici';
|
|
3
|
+
|
|
4
|
+
class BaseClient {
|
|
5
|
+
config;
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this.config = config;
|
|
8
|
+
}
|
|
9
|
+
async request({ path, method, searchParams, headers, body, options, }) {
|
|
10
|
+
// Building URL
|
|
11
|
+
const url = this.getUrl(path, searchParams);
|
|
12
|
+
// Request options
|
|
13
|
+
const reqHeaders = {
|
|
14
|
+
Accept: 'application/json',
|
|
15
|
+
...headers,
|
|
16
|
+
...this.getAuthHeaders(),
|
|
17
|
+
...this.config.headers,
|
|
18
|
+
...options?.headers,
|
|
19
|
+
};
|
|
20
|
+
const reqOpts = {
|
|
21
|
+
method,
|
|
22
|
+
headers: reqHeaders,
|
|
23
|
+
};
|
|
24
|
+
// Optional body
|
|
25
|
+
if (body) {
|
|
26
|
+
if (!reqHeaders['Content-Type'] && !reqHeaders['content-type']) {
|
|
27
|
+
throw new Error('Content Type is required with body');
|
|
28
|
+
}
|
|
29
|
+
reqOpts.body = body;
|
|
30
|
+
}
|
|
31
|
+
const resp = await request(url, reqOpts);
|
|
32
|
+
// Error handling
|
|
33
|
+
if (resp.statusCode > 399) {
|
|
34
|
+
if (resp.headers['content-type'] === 'application/problem+json') {
|
|
35
|
+
const problem = (await resp.body.json());
|
|
36
|
+
throw new HttpError({
|
|
37
|
+
statusCode: resp.statusCode,
|
|
38
|
+
problem,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Requests can fail before API, in this case we only have a status code
|
|
42
|
+
throw new HttpError({
|
|
43
|
+
statusCode: resp.statusCode,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
// Response parsing
|
|
47
|
+
if (resp.statusCode === 204 || resp.headers['content-length'] === '0') {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
if (resp.headers['content-type'] === 'application/json') {
|
|
51
|
+
return (await resp.body.json());
|
|
52
|
+
}
|
|
53
|
+
if (!resp.headers['content-type']) {
|
|
54
|
+
throw new Error('Missing content type');
|
|
55
|
+
}
|
|
56
|
+
throw new Error(`Unknown content type: ${resp.headers['content-type']}`);
|
|
57
|
+
}
|
|
58
|
+
getUrl(path, searchParams) {
|
|
59
|
+
let qs = searchParams ? searchParams.toString() : '';
|
|
60
|
+
qs = qs.length > 0 ? `?${qs}` : '';
|
|
61
|
+
const url = new URL(`${path}${qs}`, this.config.baseUrl);
|
|
62
|
+
return url;
|
|
63
|
+
}
|
|
64
|
+
getAuthHeaders() {
|
|
65
|
+
if (this.config.token) {
|
|
66
|
+
return {
|
|
67
|
+
authorization: `Bearer ${this.config.token}`,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (this.config.username && this.config.password) {
|
|
71
|
+
const encoded = Buffer.from(`${this.config.username}:${this.config.password}`).toString('base64');
|
|
72
|
+
return {
|
|
73
|
+
authorization: `Basic ${encoded}`,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
static toURLSearchParams(params) {
|
|
79
|
+
const searchParams = new URLSearchParams();
|
|
80
|
+
for (const [key, value] of Object.entries(params)) {
|
|
81
|
+
if (value === undefined) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (Array.isArray(value)) {
|
|
85
|
+
for (const item of value) {
|
|
86
|
+
searchParams.append(key, item);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else if (value instanceof Date) {
|
|
90
|
+
searchParams.append(key, value.toISOString());
|
|
91
|
+
}
|
|
92
|
+
else if (typeof value === 'object') {
|
|
93
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
94
|
+
searchParams.append(`${key}[${k}]`, v);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
searchParams.append(key, value.toString());
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return searchParams;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
class HttpError extends Error {
|
|
105
|
+
statusCode;
|
|
106
|
+
problem;
|
|
107
|
+
constructor({ statusCode, problem, }) {
|
|
108
|
+
super(problem?.type || 'unexpected status code');
|
|
109
|
+
this.name = 'HttpError';
|
|
110
|
+
this.statusCode = statusCode;
|
|
111
|
+
this.problem = problem;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
class EventsClient extends BaseClient {
|
|
116
|
+
constructor(config) {
|
|
117
|
+
super(config);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Ingest usage event in a CloudEvents format
|
|
121
|
+
* @see https://cloudevents.io
|
|
122
|
+
*/
|
|
123
|
+
async ingest(usageEvent, options) {
|
|
124
|
+
const isBatch = Array.isArray(usageEvent);
|
|
125
|
+
const cloudEvents = (isBatch ? usageEvent : [usageEvent]).map((ev) => {
|
|
126
|
+
// Validate content type
|
|
127
|
+
if (ev.datacontenttype && ev.datacontenttype !== 'application/json') {
|
|
128
|
+
throw new TypeError(`Unsupported datacontenttype: ${ev.datacontenttype}`);
|
|
129
|
+
}
|
|
130
|
+
// We default where we can to lower the barrier to use CloudEvents
|
|
131
|
+
const cloudEvent = {
|
|
132
|
+
specversion: ev.specversion ?? '1.0',
|
|
133
|
+
id: ev.id ?? crypto.randomUUID(),
|
|
134
|
+
source: ev.source ?? '@openmeter/sdk',
|
|
135
|
+
type: ev.type,
|
|
136
|
+
subject: ev.subject,
|
|
137
|
+
time: ev.time?.toISOString(),
|
|
138
|
+
datacontenttype: ev.datacontenttype,
|
|
139
|
+
dataschema: ev.dataschema,
|
|
140
|
+
data: ev.data,
|
|
141
|
+
};
|
|
142
|
+
return cloudEvent;
|
|
143
|
+
});
|
|
144
|
+
const contentType = isBatch
|
|
145
|
+
? 'application/cloudevents-batch+json'
|
|
146
|
+
: 'application/cloudevents+json';
|
|
147
|
+
const body = isBatch
|
|
148
|
+
? JSON.stringify(cloudEvents)
|
|
149
|
+
: JSON.stringify(cloudEvents[0]);
|
|
150
|
+
// Making Request
|
|
151
|
+
return await this.request({
|
|
152
|
+
path: '/api/v1/events',
|
|
153
|
+
method: 'POST',
|
|
154
|
+
body,
|
|
155
|
+
headers: {
|
|
156
|
+
'Content-Type': contentType,
|
|
157
|
+
},
|
|
158
|
+
options,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* List raw events
|
|
163
|
+
*/
|
|
164
|
+
async list(params, options) {
|
|
165
|
+
const searchParams = params
|
|
166
|
+
? BaseClient.toURLSearchParams(params)
|
|
167
|
+
: undefined;
|
|
168
|
+
return this.request({
|
|
169
|
+
method: 'GET',
|
|
170
|
+
path: `/api/v1/events`,
|
|
171
|
+
searchParams,
|
|
172
|
+
options,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
var WindowSize;
|
|
178
|
+
(function (WindowSize) {
|
|
179
|
+
WindowSize["MINUTE"] = "MINUTE";
|
|
180
|
+
WindowSize["HOUR"] = "HOUR";
|
|
181
|
+
WindowSize["DAY"] = "DAY";
|
|
182
|
+
})(WindowSize || (WindowSize = {}));
|
|
183
|
+
var MeterAggregation;
|
|
184
|
+
(function (MeterAggregation) {
|
|
185
|
+
MeterAggregation["SUM"] = "SUM";
|
|
186
|
+
MeterAggregation["COUNT"] = "COUNT";
|
|
187
|
+
MeterAggregation["AVG"] = "AVG";
|
|
188
|
+
MeterAggregation["MIN"] = "MIN";
|
|
189
|
+
MeterAggregation["MAX"] = "MAX";
|
|
190
|
+
})(MeterAggregation || (MeterAggregation = {}));
|
|
191
|
+
class MetersClient extends BaseClient {
|
|
192
|
+
constructor(config) {
|
|
193
|
+
super(config);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get one meter by slug
|
|
197
|
+
*/
|
|
198
|
+
async get(slug, options) {
|
|
199
|
+
return this.request({
|
|
200
|
+
method: 'GET',
|
|
201
|
+
path: `/api/v1/meters/${slug}`,
|
|
202
|
+
options,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* List meters
|
|
207
|
+
*/
|
|
208
|
+
async list(options) {
|
|
209
|
+
return this.request({
|
|
210
|
+
method: 'GET',
|
|
211
|
+
path: `/api/v1/meters`,
|
|
212
|
+
options,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Query a meter
|
|
217
|
+
*/
|
|
218
|
+
async query(slug, params, options) {
|
|
219
|
+
const searchParams = params
|
|
220
|
+
? BaseClient.toURLSearchParams(params)
|
|
221
|
+
: undefined;
|
|
222
|
+
return this.request({
|
|
223
|
+
method: 'GET',
|
|
224
|
+
path: `/api/v1/meters/${slug}/query`,
|
|
225
|
+
searchParams,
|
|
226
|
+
options,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* List subjects of a meter
|
|
231
|
+
*/
|
|
232
|
+
async subjects(slug, options) {
|
|
233
|
+
return this.request({
|
|
234
|
+
method: 'GET',
|
|
235
|
+
path: `/api/v1/meters/${slug}/subjects`,
|
|
236
|
+
options,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
class PortalClient extends BaseClient {
|
|
242
|
+
constructor(config) {
|
|
243
|
+
super(config);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Create portal token
|
|
247
|
+
* Useful for creating a token sharable with your customer to query their own usage
|
|
248
|
+
*/
|
|
249
|
+
async createToken(token, options) {
|
|
250
|
+
return await this.request({
|
|
251
|
+
path: '/api/v1/portal/tokens',
|
|
252
|
+
method: 'POST',
|
|
253
|
+
headers: {
|
|
254
|
+
'Content-Type': 'application/json',
|
|
255
|
+
},
|
|
256
|
+
body: JSON.stringify(token),
|
|
257
|
+
options,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Invalidate portal token
|
|
262
|
+
* @note OpenMeter Cloud only feature
|
|
263
|
+
*/
|
|
264
|
+
async invalidateTokens(invalidate = {}, options) {
|
|
265
|
+
return await this.request({
|
|
266
|
+
path: '/api/v1/portal/tokens/invalidate',
|
|
267
|
+
method: 'POST',
|
|
268
|
+
headers: {
|
|
269
|
+
'Content-Type': 'application/json',
|
|
270
|
+
},
|
|
271
|
+
body: JSON.stringify(invalidate),
|
|
272
|
+
options,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
class SubjectClient extends BaseClient {
|
|
278
|
+
constructor(config) {
|
|
279
|
+
super(config);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Upsert subject
|
|
283
|
+
* Useful to map display name and metadata to subjects
|
|
284
|
+
* @note OpenMeter Cloud only feature
|
|
285
|
+
*/
|
|
286
|
+
async upsert(subject, options) {
|
|
287
|
+
return await this.request({
|
|
288
|
+
path: '/api/v1/subjects',
|
|
289
|
+
method: 'POST',
|
|
290
|
+
headers: {
|
|
291
|
+
'Content-Type': 'application/json',
|
|
292
|
+
},
|
|
293
|
+
body: JSON.stringify(subject),
|
|
294
|
+
options,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Get subject by id or key
|
|
299
|
+
* @note OpenMeter Cloud only feature
|
|
300
|
+
*/
|
|
301
|
+
async get(idOrKey, options) {
|
|
302
|
+
return await this.request({
|
|
303
|
+
path: `/api/v1/subjects/${idOrKey}`,
|
|
304
|
+
method: 'GET',
|
|
305
|
+
options,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* List subjects
|
|
310
|
+
* @note OpenMeter Cloud only feature
|
|
311
|
+
*/
|
|
312
|
+
async list(options) {
|
|
313
|
+
return await this.request({
|
|
314
|
+
path: '/api/v1/subjects',
|
|
315
|
+
method: 'GET',
|
|
316
|
+
options,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Delete subject by id or key
|
|
321
|
+
* @note OpenMeter Cloud only feature
|
|
322
|
+
*/
|
|
323
|
+
async delete(idOrKey, options) {
|
|
324
|
+
return await this.request({
|
|
325
|
+
path: `/api/v1/subjects/${idOrKey}`,
|
|
326
|
+
method: 'DELETE',
|
|
327
|
+
options,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
class OpenMeter {
|
|
333
|
+
events;
|
|
334
|
+
meters;
|
|
335
|
+
portal;
|
|
336
|
+
subjects;
|
|
337
|
+
constructor(config) {
|
|
338
|
+
this.events = new EventsClient(config);
|
|
339
|
+
this.meters = new MetersClient(config);
|
|
340
|
+
this.portal = new PortalClient(config);
|
|
341
|
+
this.subjects = new SubjectClient(config);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export { MeterAggregation, OpenMeter, WindowSize };
|
|
346
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../clients/client.ts","../../clients/event.ts","../../clients/meter.ts","../../clients/portal.ts","../../clients/subject.ts","../../index.ts"],"sourcesContent":["import { IncomingHttpHeaders } from 'http'\nimport { Dispatcher, request } from 'undici'\nimport { components } from '../schemas/openapi.js'\n\nexport type OpenMeterConfig = {\n baseUrl: string\n token?: string\n username?: string\n password?: string\n headers?: IncomingHttpHeaders\n}\n\nexport type RequestOptions = {\n headers?: IncomingHttpHeaders\n}\n\nexport type Problem = components['schemas']['Problem']\n\ntype UndiciRequestOptions = { dispatcher?: Dispatcher } & Omit<\n Dispatcher.RequestOptions,\n 'origin' | 'path' | 'method'\n> &\n Partial<Pick<Dispatcher.RequestOptions, 'method'>>\n\nexport class BaseClient {\n protected config: OpenMeterConfig\n\n constructor(config: OpenMeterConfig) {\n this.config = config\n }\n\n protected async request<T>({\n path,\n method,\n searchParams,\n headers,\n body,\n options,\n }: {\n path: string\n method: Dispatcher.HttpMethod\n searchParams?: URLSearchParams\n headers?: IncomingHttpHeaders\n body?: string | Buffer | Uint8Array\n options?: RequestOptions\n }): Promise<T> {\n // Building URL\n const url = this.getUrl(path, searchParams)\n\n // Request options\n const reqHeaders: IncomingHttpHeaders = {\n Accept: 'application/json',\n ...headers,\n ...this.getAuthHeaders(),\n ...this.config.headers,\n ...options?.headers,\n }\n const reqOpts: UndiciRequestOptions = {\n method,\n headers: reqHeaders,\n }\n\n // Optional body\n if (body) {\n if (!reqHeaders['Content-Type'] && !reqHeaders['content-type']) {\n throw new Error('Content Type is required with body')\n }\n\n reqOpts.body = body\n }\n\n const resp = await request(url, reqOpts)\n\n // Error handling\n if (resp.statusCode > 399) {\n if (resp.headers['content-type'] === 'application/problem+json') {\n const problem = (await resp.body.json()) as Problem\n throw new HttpError({\n statusCode: resp.statusCode,\n problem,\n })\n }\n\n // Requests can fail before API, in this case we only have a status code\n throw new HttpError({\n statusCode: resp.statusCode,\n })\n }\n\n // Response parsing\n if (resp.statusCode === 204 || resp.headers['content-length'] === '0') {\n return undefined as unknown as T\n }\n if (resp.headers['content-type'] === 'application/json') {\n return (await resp.body.json()) as T\n }\n if (!resp.headers['content-type']) {\n throw new Error('Missing content type')\n }\n\n throw new Error(`Unknown content type: ${resp.headers['content-type']}`)\n }\n\n protected getUrl(path: string, searchParams?: URLSearchParams) {\n let qs = searchParams ? searchParams.toString() : ''\n qs = qs.length > 0 ? `?${qs}` : ''\n const url = new URL(`${path}${qs}`, this.config.baseUrl)\n return url\n }\n\n protected getAuthHeaders(): IncomingHttpHeaders {\n if (this.config.token) {\n return {\n authorization: `Bearer ${this.config.token}`,\n }\n }\n\n if (this.config.username && this.config.password) {\n const encoded = Buffer.from(\n `${this.config.username}:${this.config.password}`\n ).toString('base64')\n return {\n authorization: `Basic ${encoded}`,\n }\n }\n\n return {}\n }\n\n protected static toURLSearchParams(\n params: Record<string, string | number | Date | string[] | Record<string, string> | undefined>\n ): URLSearchParams {\n const searchParams = new URLSearchParams()\n\n for (const [key, value] of Object.entries(params)) {\n if (value === undefined) {\n continue\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, item)\n }\n } else if (value instanceof Date) {\n searchParams.append(key, value.toISOString())\n } else if (typeof value === 'object') {\n Object.entries(value).forEach(([k, v]) => {\n searchParams.append(`${key}[${k}]`, v)\n })\n } else {\n searchParams.append(key, value.toString())\n }\n }\n\n return searchParams\n }\n}\n\nexport class HttpError extends Error {\n public statusCode: number\n public problem?: Problem\n\n constructor({\n statusCode,\n problem,\n }: {\n statusCode: number\n problem?: Problem\n }) {\n super(problem?.type || 'unexpected status code')\n this.name = 'HttpError'\n this.statusCode = statusCode\n this.problem = problem\n }\n}\n","import crypto from 'crypto'\nimport { components } from '../schemas/openapi.js'\nimport { RequestOptions, BaseClient, OpenMeterConfig } from './client.js'\n\n// We export Event instead\nexport type CloudEvent = components['schemas']['Event']\nexport type IngestedEvent = components['schemas']['IngestedEvent']\n\nexport type EventsQueryParams = {\n /**\n * @description Limit number of results. Max: 100\n * @example 25\n */\n limit?: number\n}\n\n/**\n * Usage Event\n */\nexport type Event = {\n /**\n * @description The version of the CloudEvents specification which the event uses.\n * @example 1.0\n */\n specversion?: string\n /**\n * @description Unique identifier for the event, defaults to uuid v4.\n * @example \"5c10fade-1c9e-4d6c-8275-c52c36731d3c\"\n */\n id?: string\n /**\n * Format: uri-reference\n * @description Identifies the context in which an event happened, defaults to: @openmeter/sdk\n * @example services/service-0\n */\n source?: string\n /**\n * @description Describes the type of event related to the originating occurrence.\n * @example \"api_request\"\n */\n type: string\n /**\n * @description Describes the subject of the event in the context of the event producer (identified by source).\n * @example \"customer_id\"\n */\n subject: string\n /**\n * Format: date-time\n * @description Date of when the occurrence happened.\n * @example new Date('2023-01-01T01:01:01.001Z')\n */\n time?: Date\n /**\n * Format: uri\n * @description Identifies the schema that data adheres to.\n */\n dataschema?: string\n /**\n * @description Content type of the data value. Must adhere to RFC 2046 format.\n * @example application/json\n * @enum {string|null}\n */\n datacontenttype?: 'application/json'\n /**\n * @description The event payload.\n * @example {\n * \"duration_ms\": \"12\",\n * \"path\": \"/hello\"\n * }\n */\n data: Record<string, unknown>\n}\n\nexport class EventsClient extends BaseClient {\n constructor(config: OpenMeterConfig) {\n super(config)\n }\n\n /**\n * Ingest usage event in a CloudEvents format\n * @see https://cloudevents.io\n */\n public async ingest(\n usageEvent: Event | Event[],\n options?: RequestOptions\n ): Promise<void> {\n const isBatch = Array.isArray(usageEvent)\n const cloudEvents: CloudEvent[] = (isBatch ? usageEvent : [usageEvent]).map(\n (ev) => {\n // Validate content type\n if (ev.datacontenttype && ev.datacontenttype !== 'application/json') {\n throw new TypeError(\n `Unsupported datacontenttype: ${ev.datacontenttype}`\n )\n }\n\n // We default where we can to lower the barrier to use CloudEvents\n const cloudEvent: CloudEvent = {\n specversion: ev.specversion ?? '1.0',\n id: ev.id ?? crypto.randomUUID(),\n source: ev.source ?? '@openmeter/sdk',\n type: ev.type,\n subject: ev.subject,\n time: ev.time?.toISOString(),\n datacontenttype: ev.datacontenttype,\n dataschema: ev.dataschema,\n data: ev.data,\n }\n\n return cloudEvent\n }\n )\n\n const contentType = isBatch\n ? 'application/cloudevents-batch+json'\n : 'application/cloudevents+json'\n const body = isBatch\n ? JSON.stringify(cloudEvents)\n : JSON.stringify(cloudEvents[0])\n\n // Making Request\n return await this.request({\n path: '/api/v1/events',\n method: 'POST',\n body,\n headers: {\n 'Content-Type': contentType,\n },\n options,\n })\n }\n\n /**\n * List raw events\n */\n public async list(\n params?: EventsQueryParams,\n options?: RequestOptions\n ): Promise<IngestedEvent[]> {\n const searchParams = params\n ? BaseClient.toURLSearchParams(params)\n : undefined\n return this.request<IngestedEvent[]>({\n method: 'GET',\n path: `/api/v1/events`,\n searchParams,\n options,\n })\n }\n}\n","import { paths, components } from '../schemas/openapi.js'\nimport { BaseClient, OpenMeterConfig, RequestOptions } from './client.js'\n\nexport enum WindowSize {\n MINUTE = 'MINUTE',\n HOUR = 'HOUR',\n DAY = 'DAY',\n}\n\nexport enum MeterAggregation {\n SUM = 'SUM',\n COUNT = 'COUNT',\n AVG = 'AVG',\n MIN = 'MIN',\n MAX = 'MAX',\n}\n\nexport type MeterQueryParams = {\n /**\n * @description Subject(s) to filter by.\n * @example [\"customer-1\", \"customer-2\"]\n */\n subject?: string[]\n /**\n * @description Start date.\n * Must be aligned with the window size.\n * Inclusive.\n */\n from?: Date\n /**\n * @description End date.\n * Must be aligned with the window size.\n * Inclusive.\n */\n to?: Date\n /**\n * @description Window Size\n * If not specified, a single usage aggregate will be returned for the entirety of\n * the specified period for each subject and group.\n */\n windowSize?: WindowSizeType\n /**\n * @description The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\n * If not specified, the UTC timezone will be used.\n */\n windowTimeZone?: string\n /**\n * @description Group By\n * If not specified a single aggregate will be returned for each subject and time window.\n */\n groupBy?: string[]\n /**\n * @description Filter by group by\n */\n filterGroupBy?: Record<string, string>\n}\n\nexport type MeterQueryResponse =\n paths['/api/v1/meters/{meterIdOrSlug}/query']['get']['responses']['200']['content']['application/json']\n\nexport type Meter = components['schemas']['Meter']\nexport type WindowSizeType = components['schemas']['WindowSize']\n\nexport class MetersClient extends BaseClient {\n constructor(config: OpenMeterConfig) {\n super(config)\n }\n\n /**\n * Get one meter by slug\n */\n public async get(slug: string, options?: RequestOptions): Promise<Meter> {\n return this.request<Meter>({\n method: 'GET',\n path: `/api/v1/meters/${slug}`,\n options,\n })\n }\n\n /**\n * List meters\n */\n public async list(options?: RequestOptions): Promise<Meter[]> {\n return this.request<Meter[]>({\n method: 'GET',\n path: `/api/v1/meters`,\n options,\n })\n }\n\n /**\n * Query a meter\n */\n public async query(\n slug: string,\n params?: MeterQueryParams,\n options?: RequestOptions\n ): Promise<MeterQueryResponse> {\n const searchParams = params\n ? BaseClient.toURLSearchParams(params)\n : undefined\n return this.request<MeterQueryResponse>({\n method: 'GET',\n path: `/api/v1/meters/${slug}/query`,\n searchParams,\n options,\n })\n }\n\n /**\n * List subjects of a meter\n */\n public async subjects(\n slug: string,\n options?: RequestOptions\n ): Promise<string[]> {\n return this.request<string[]>({\n method: 'GET',\n path: `/api/v1/meters/${slug}/subjects`,\n options,\n })\n }\n}\n","import { components } from '../schemas/openapi.js'\nimport { RequestOptions, BaseClient, OpenMeterConfig } from './client.js'\n\nexport type PortalToken = components['schemas']['PortalToken']\n\nexport class PortalClient extends BaseClient {\n constructor(config: OpenMeterConfig) {\n super(config)\n }\n\n /**\n * Create portal token\n * Useful for creating a token sharable with your customer to query their own usage\n */\n public async createToken(\n token: {\n subject: string\n expiresAt?: Date\n allowedMeterSlugs?: string[]\n },\n options?: RequestOptions\n ): Promise<PortalToken> {\n return await this.request({\n path: '/api/v1/portal/tokens',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(token),\n options,\n })\n }\n\n /**\n * Invalidate portal token\n * @note OpenMeter Cloud only feature\n */\n public async invalidateTokens(\n invalidate: { subject?: string } = {},\n options?: RequestOptions\n ): Promise<void> {\n return await this.request({\n path: '/api/v1/portal/tokens/invalidate',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(invalidate),\n options,\n })\n }\n}\n","import { components } from '../schemas/openapi.js'\nimport { RequestOptions, BaseClient, OpenMeterConfig } from './client.js'\n\nexport type Subject = components['schemas']['Subject']\n\nexport class SubjectClient extends BaseClient {\n constructor(config: OpenMeterConfig) {\n super(config)\n }\n\n /**\n * Upsert subject\n * Useful to map display name and metadata to subjects\n * @note OpenMeter Cloud only feature\n */\n public async upsert(\n subject: Omit<Subject, 'id'>[],\n options?: RequestOptions\n ): Promise<Subject[]> {\n return await this.request({\n path: '/api/v1/subjects',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(subject),\n options,\n })\n }\n\n /**\n * Get subject by id or key\n * @note OpenMeter Cloud only feature\n */\n public async get(idOrKey: string, options?: RequestOptions): Promise<void> {\n return await this.request({\n path: `/api/v1/subjects/${idOrKey}`,\n method: 'GET',\n options,\n })\n }\n\n /**\n * List subjects\n * @note OpenMeter Cloud only feature\n */\n public async list(options?: RequestOptions): Promise<void> {\n return await this.request({\n path: '/api/v1/subjects',\n method: 'GET',\n options,\n })\n }\n\n /**\n * Delete subject by id or key\n * @note OpenMeter Cloud only feature\n */\n public async delete(\n idOrKey: string,\n options?: RequestOptions\n ): Promise<void> {\n return await this.request({\n path: `/api/v1/subjects/${idOrKey}`,\n method: 'DELETE',\n options,\n })\n }\n}\n","import { OpenMeterConfig } from './clients/client.js'\nimport { EventsClient } from './clients/event.js'\nimport { MetersClient } from './clients/meter.js'\nimport { PortalClient } from './clients/portal.js'\nimport { SubjectClient } from './clients/subject.js'\n\nexport { OpenMeterConfig, RequestOptions } from './clients/client.js'\nexport { Event, IngestedEvent, CloudEvent } from './clients/event.js'\nexport { Meter, MeterAggregation, WindowSize } from './clients/meter.js'\n\nexport class OpenMeter {\n public events: EventsClient\n public meters: MetersClient\n public portal: PortalClient\n public subjects: SubjectClient\n\n constructor(config: OpenMeterConfig) {\n this.events = new EventsClient(config)\n this.meters = new MetersClient(config)\n this.portal = new PortalClient(config)\n this.subjects = new SubjectClient(config)\n }\n}\n"],"names":[],"mappings":";;;MAwBa,UAAU,CAAA;AACX,IAAA,MAAM,CAAiB;AAEjC,IAAA,WAAA,CAAY,MAAuB,EAAA;AACjC,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;KACrB;AAES,IAAA,MAAM,OAAO,CAAI,EACzB,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,OAAO,EACP,IAAI,EACJ,OAAO,GAQR,EAAA;;QAEC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;;AAG3C,QAAA,MAAM,UAAU,GAAwB;AACtC,YAAA,MAAM,EAAE,kBAAkB;AAC1B,YAAA,GAAG,OAAO;YACV,GAAG,IAAI,CAAC,cAAc,EAAE;AACxB,YAAA,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO;YACtB,GAAG,OAAO,EAAE,OAAO;SACpB,CAAA;AACD,QAAA,MAAM,OAAO,GAAyB;YACpC,MAAM;AACN,YAAA,OAAO,EAAE,UAAU;SACpB,CAAA;;QAGD,IAAI,IAAI,EAAE;AACR,YAAA,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;AAC9D,gBAAA,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA;aACtD;AAED,YAAA,OAAO,CAAC,IAAI,GAAG,IAAI,CAAA;SACpB;QAED,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;;AAGxC,QAAA,IAAI,IAAI,CAAC,UAAU,GAAG,GAAG,EAAE;YACzB,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,0BAA0B,EAAE;gBAC/D,MAAM,OAAO,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAY,CA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YACxB,IAAI,EAAE,CAAoB,iBAAA,EAAA,OAAO,CAAE,CAAA;AACnC,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO;AACR,SAAA,CAAC,CAAA;KACH;AACF;;MC1DY,SAAS,CAAA;AACb,IAAA,MAAM,CAAc;AACpB,IAAA,MAAM,CAAc;AACpB,IAAA,MAAM,CAAc;AACpB,IAAA,QAAQ,CAAe;AAE9B,IAAA,WAAA,CAAY,MAAuB,EAAA;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAA;KAC1C;AACF;;;;"}
|
|
@@ -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/tslib@2.6.2/node_modules/tslib/tslib.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/header.d.ts","../node_modules/.pnpm/undici@6.13.0/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.13.0/node_modules/undici/types/file.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/fetch.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/formdata.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/connector.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/client.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/errors.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/dispatcher.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/global-dispatcher.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/global-origin.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/pool-stats.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/pool.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/handlers.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/balanced-pool.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/agent.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/mock-interceptor.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/mock-agent.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/mock-client.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/mock-pool.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/mock-errors.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/proxy-agent.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/retry-handler.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/retry-agent.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/api.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/util.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/cookies.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/patch.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/websocket.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/eventsource.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/filereader.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/diagnostics-channel.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/content-type.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/cache.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/interceptors.d.ts","../node_modules/.pnpm/undici@6.13.0/node_modules/undici/types/index.d.ts","../node_modules/.pnpm/undici@6.13.0/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},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","886e50ef125efb7878f744e86908884c0133e7a6d9d80013f421b0cd8fb2af94",{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","acdc9fb9638a235a69bd270003d8db4d6153ada2b7ccbea741ade36b295e431e","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true},"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","d69a3298a197fe5d59edba0ec23b4abf2c8e7b8c6718eac97833633cd664e4c9",{"version":"a9544f6f8af0d046565e8dde585502698ebc99eef28b715bad7c2bded62e4a32","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"8b809082dfeffc8cc4f3b9c59f55c0ff52ba12f5ae0766cb5c35deee83b8552e","affectsGlobalScope":true},"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","d4f9d3ae2fe1ae199e1c832cca2c44f45e0b305dfa2808afdd51249b6f4a5163","7525257b4aa35efc7a1bbc00f205a9a96c4e4ab791da90db41b77938c4e0c18e","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"9c611eff81287837680c1f4496daf9e737d6f3a1ff17752207814b8f8e1265af","affectsGlobalScope":true},"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","b5d4e3e524f2eead4519c8e819eaf7fa44a27c22418eff1b7b2d0ebc5fdc510d","afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","9bd8e5984676cf28ebffcc65620b4ab5cb38ab2ec0aac0825df8568856895653","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","5e8dc64e7e68b2b3ea52ed685cf85239e0d5fb9df31aabc94370c6bc7e19077b",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true},{"version":"46755a4afc53df75f0bfce72259fb971daac826b0cdd8c4eaccad2755a817403","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","7fa32887f8a97909fca35ebba3740f8caf8df146618d8fff957a3f89f67a2f6a","9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024",{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","21c56c6e8eeacef15f63f373a29fab6a2b36e4705be7a528aae8c51469e2737b",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","34b4f256dd3c591cb7c9e96a763d79d54b69d417709b9015dcec3ac5583eec73","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","57386628c539248e4f428d5308a69f98f4a6a3cd42a053f017d9dd3fd5a43bc5","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","8b9bf58d580d9b36ab2f23178c88757ce7cc6830ccbdd09e8a76f4cb1bc0fcf7","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","7782678102bd835ef2c54330ee16c31388e51dfd9ca535b47f6fd8f3d6e07993","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","1a42891defae8cec268a4f8903140dbf0d214c0cf9ed8fdc1eb6c25e5b3e9a5c","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","37e97c64b890352421ccb29cd8ede863774df8f03763416f6a572093f6058284","299fd0c281633d8dbfbe5f44c5f2850fe37392da6fd3b9cca3cb4e10cda16432","8e30805d00f4c4c5e3fbe546863f04bdec5d37812706620d7d6adba0f74c4f59","ea22ffe08697e085e4a5aba8b5558298c83640a050abd54a6aab8969bed1d16a","fe50fa06dbb879143f48ee04d9fb6bc30b987f9de6f03e482d67cfac709cc1fb","35e05f5b0dcd81dbb291ef84d44da32be5fa9c8a8fe51f35368f3f9ac3d8f36e","88f99415f6b9fe25c841eeefe85c79ebd203a17ac984bb97f507e90f18409cef","458a992b6fe83595cfdcb0e9ce3ec213bff00b314bf73762ba1a9165bf4384d8","c31008875b1c886a5af8b8af8f235ce28b6bc9988431b7d7d5454143f7b10b5e","a309648baf0396b9c9b55515485dc9255bdb52a15e65142c55772946ee4b2ca5","395961ef4c40cfd7bca473e1c17de7a664e0a2d5d397f959bd406e2fd478786d",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","042633127c7595f5d198bca8ff3051203fe29f49460d0ed1d82a1179fc9805bd","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","4340936f4e937c452ae783514e7c7bbb7fc06d0c97993ff4865370d0962bb9cf","5fc6e6b8232254d80ed6b802372dba7f426f0a596f5fe26b7773acfdc8232926"],"root":[[193,201]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitHelpers":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"fileIdsList":[[68,122,192,193],[68,112,193,194],[68,193,194],[68,194,195,196,197,198],[202,203,204],[122,149,157,206,207],[71],[106],[107,112,141],[108,119,120,127,138,149],[108,109,119,127],[110,150],[111,112,120,128],[112,138,146],[113,115,119,127],[106,114],[115,116],[119],[117,119],[106,119],[119,120,121,138,149],[119,120,121,134,138,141],[104,107,154],[115,119,122,127,138,149],[119,120,122,123,127,138,146,149],[122,124,138,146,149],[71,72,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,156],[119,125],[126,149,154],[115,119,127,138],[128],[129],[106,130],[131,148,154],[132],[133],[119,134,135],[134,136,150,152],[107,119,138,139,140,141],[107,138,140],[138,139],[141],[142],[106,138],[119,144,145],[144,145],[112,127,138,146],[147],[127,148],[107,122,133,149],[112,150],[138,151],[126,152],[153],[107,112,119,121,130,138,149,152,154],[138,155],[122,138,157],[81,85,149],[81,138,149],[76],[78,81,146,149],[127,146],[157],[76,157],[78,81,127,149],[73,74,77,80,107,119,138,149],[73,79],[77,81,107,141,149,157],[107,157],[97,107,157],[75,76,157],[81],[75,76,77,78,79,80,81,82,83,85,86,87,88,89,90,91,92,93,94,95,96,98,99,100,101,102,103],[81,88,89],[79,81,89,90],[80],[73,76,81],[81,85,89,90],[85],[79,81,84,149],[73,78,79,81,85,88],[107,138],[76,81,97,107,154,157],[191],[149,164,168],[138,149,164],[159],[146,149,161,164],[157,159],[127,149,161,164],[69,70,107,119,138,149,160,163],[69,162],[183,184],[107,141,149,157,160,164],[107,157,183],[157,158,159],[164],[158,159,160,161,162,163,164,165,166,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,184,185,186,187,188,189,190],[164,171,172],[162,164,172,173],[163],[69,159,164],[164,168,172,173],[168],[149,162,164,167],[69,161,164,171],[69,161,164,171,178],[107,154,157,159,164,183],[68],[68,192,200],[68,198,199]],"referencedMap":[[194,1],[195,2],[196,3],[197,3],[198,3],[199,4],[205,5],[208,6],[71,7],[72,7],[106,8],[107,9],[108,10],[109,11],[110,12],[111,13],[112,14],[113,15],[114,16],[115,17],[116,17],[118,18],[117,19],[119,20],[120,21],[121,22],[105,23],[122,24],[123,25],[124,26],[157,27],[125,28],[126,29],[127,30],[128,31],[129,32],[130,33],[131,34],[132,35],[133,36],[134,37],[135,37],[136,38],[138,39],[140,40],[139,41],[141,42],[142,43],[143,44],[144,45],[145,46],[146,47],[147,48],[148,49],[149,50],[150,51],[151,52],[152,53],[153,54],[154,55],[155,56],[206,57],[88,58],[95,59],[87,58],[102,60],[79,61],[78,62],[101,63],[96,64],[99,65],[81,66],[80,67],[76,68],[75,69],[98,70],[77,71],[82,72],[86,72],[104,73],[103,72],[90,74],[91,75],[93,76],[89,77],[92,78],[97,63],[84,79],[85,80],[94,81],[74,82],[100,83],[192,84],[171,85],[180,86],[170,85],[189,87],[162,88],[161,62],[188,63],[182,89],[187,90],[164,91],[163,92],[185,93],[159,94],[158,69],[186,95],[160,96],[165,97],[169,97],[191,98],[190,97],[173,99],[174,100],[176,101],[172,102],[175,103],[183,63],[167,104],[168,105],[177,106],[70,82],[179,107],[178,97],[184,108],[193,109],[201,110],[200,111]],"exportedModulesMap":[[194,1],[195,2],[196,3],[197,3],[198,3],[199,4],[205,5],[208,6],[71,7],[72,7],[106,8],[107,9],[108,10],[109,11],[110,12],[111,13],[112,14],[113,15],[114,16],[115,17],[116,17],[118,18],[117,19],[119,20],[120,21],[121,22],[105,23],[122,24],[123,25],[124,26],[157,27],[125,28],[126,29],[127,30],[128,31],[129,32],[130,33],[131,34],[132,35],[133,36],[134,37],[135,37],[136,38],[138,39],[140,40],[139,41],[141,42],[142,43],[143,44],[144,45],[145,46],[146,47],[147,48],[148,49],[149,50],[150,51],[151,52],[152,53],[153,54],[154,55],[155,56],[206,57],[88,58],[95,59],[87,58],[102,60],[79,61],[78,62],[101,63],[96,64],[99,65],[81,66],[80,67],[76,68],[75,69],[98,70],[77,71],[82,72],[86,72],[104,73],[103,72],[90,74],[91,75],[93,76],[89,77],[92,78],[97,63],[84,79],[85,80],[94,81],[74,82],[100,83],[192,84],[171,85],[180,86],[170,85],[189,87],[162,88],[161,62],[188,63],[182,89],[187,90],[164,91],[163,92],[185,93],[159,94],[158,69],[186,95],[160,96],[165,97],[169,97],[191,98],[190,97],[173,99],[174,100],[176,101],[172,102],[175,103],[183,63],[167,104],[168,105],[177,106],[70,82],[179,107],[178,97],[184,108],[193,109],[201,110],[200,111]],"semanticDiagnosticsPerFile":[194,195,196,197,198,199,202,205,203,204,207,208,71,72,106,107,108,109,110,111,112,113,114,115,116,118,117,119,120,121,105,156,122,123,124,157,125,126,127,128,129,130,131,132,133,134,135,136,137,138,140,139,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,206,68,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,88,95,87,102,79,78,101,96,99,81,80,76,75,98,77,82,83,86,73,104,103,90,91,93,89,92,97,84,85,94,74,100,192,171,180,170,189,162,161,188,182,187,164,163,185,159,158,186,160,165,166,169,69,191,190,173,174,176,172,175,183,167,168,177,70,179,178,181,184,193,201,200]},"version":"5.4.5"}
|
package/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { PortalClient } from './clients/portal.js'
|
|
|
5
5
|
import { SubjectClient } from './clients/subject.js'
|
|
6
6
|
|
|
7
7
|
export { OpenMeterConfig, RequestOptions } from './clients/client.js'
|
|
8
|
-
export { Event, IngestedEvent } from './clients/event.js'
|
|
8
|
+
export { Event, IngestedEvent, CloudEvent } from './clients/event.js'
|
|
9
9
|
export { Meter, MeterAggregation, WindowSize } from './clients/meter.js'
|
|
10
10
|
|
|
11
11
|
export class OpenMeter {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmeter/sdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.63",
|
|
4
4
|
"description": "Client for OpenMeter: Real-Time and Scalable Usage Metering",
|
|
5
5
|
"license": "Apache 2.0",
|
|
6
6
|
"homepage": "https://openmeter.io",
|
|
@@ -9,18 +9,18 @@
|
|
|
9
9
|
"url": "https://github.com/openmeterio/openmeter.git",
|
|
10
10
|
"directory": "api/client/node"
|
|
11
11
|
},
|
|
12
|
-
"main": "./dist/esm/index.js",
|
|
13
12
|
"types": "./dist/types/index.d.ts",
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
14
|
"exports": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"default": "./dist/esm/index.js"
|
|
15
|
+
"require": "./dist/index.cjs",
|
|
16
|
+
"import": "./dist/index.js"
|
|
18
17
|
},
|
|
19
18
|
"type": "module",
|
|
20
19
|
"engines": {
|
|
21
20
|
"node": ">=18.16.1"
|
|
22
21
|
},
|
|
23
22
|
"devDependencies": {
|
|
23
|
+
"@rollup/plugin-typescript": "11.1.6",
|
|
24
24
|
"@types/node": "^20.12.7",
|
|
25
25
|
"@types/node-fetch": "2.6.11",
|
|
26
26
|
"@typescript-eslint/eslint-plugin": "7.7.0",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"openapi-typescript": "6.7.5",
|
|
38
38
|
"prettier": "3.2.5",
|
|
39
39
|
"rimraf": "5.0.5",
|
|
40
|
+
"rollup": "4.16.1",
|
|
41
|
+
"tslib": "2.6.2",
|
|
40
42
|
"typescript": "5.4.5",
|
|
41
43
|
"vitest": "1.5.0"
|
|
42
44
|
},
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
"scripts": {
|
|
50
52
|
"lint": "eslint . --ext .ts --format=pretty",
|
|
51
53
|
"format": "prettier --write .",
|
|
52
|
-
"build": "rimraf ./dist &&
|
|
54
|
+
"build": "rimraf ./dist && rollup -c",
|
|
53
55
|
"generate": "rimraf ./schemas && openapi-typescript '../../openapi.yaml' --output schemas/openapi.ts && prettier --write schemas/",
|
|
54
56
|
"pretest": "pnpm run build",
|
|
55
57
|
"test": "vitest --run",
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import typescript from '@rollup/plugin-typescript'
|
|
2
|
+
import packageJson from './package.json' assert { type: 'json' }
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
{
|
|
6
|
+
input: 'index.ts',
|
|
7
|
+
external: (id) => !/^[./]/.test(id),
|
|
8
|
+
output: [
|
|
9
|
+
{
|
|
10
|
+
file: packageJson.exports.require,
|
|
11
|
+
format: 'cjs',
|
|
12
|
+
sourcemap: true,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
file: packageJson.exports.import,
|
|
16
|
+
format: 'es',
|
|
17
|
+
sourcemap: true,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
plugins: [typescript({ outputToFilesystem: true })],
|
|
21
|
+
},
|
|
22
|
+
]
|