@openmeter/sdk 1.0.0-beta.60 → 1.0.0-beta.62

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.
Files changed (57) hide show
  1. package/dist/cjs/clients/client.js +194 -0
  2. package/dist/cjs/clients/client.js.map +1 -0
  3. package/dist/cjs/clients/event.js +137 -0
  4. package/dist/cjs/clients/event.js.map +1 -0
  5. package/dist/cjs/clients/meter.js +139 -0
  6. package/dist/cjs/clients/meter.js.map +1 -0
  7. package/dist/cjs/clients/portal.js +109 -0
  8. package/dist/cjs/clients/portal.js.map +1 -0
  9. package/dist/cjs/clients/subject.js +141 -0
  10. package/dist/cjs/clients/subject.js.map +1 -0
  11. package/dist/cjs/index.js +21 -0
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/schemas/openapi.js +7 -0
  14. package/dist/cjs/schemas/openapi.js.map +1 -0
  15. package/dist/cjs/test/agent.js +266 -0
  16. package/dist/cjs/test/agent.js.map +1 -0
  17. package/dist/cjs/test/mocks.js +44 -0
  18. package/dist/cjs/test/mocks.js.map +1 -0
  19. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  20. package/dist/esm/clients/client.js +191 -0
  21. package/dist/esm/clients/client.js.map +1 -0
  22. package/dist/esm/clients/event.js +131 -0
  23. package/dist/esm/clients/event.js.map +1 -0
  24. package/dist/esm/clients/meter.js +136 -0
  25. package/dist/esm/clients/meter.js.map +1 -0
  26. package/dist/esm/clients/portal.js +106 -0
  27. package/dist/esm/clients/portal.js.map +1 -0
  28. package/dist/esm/clients/subject.js +138 -0
  29. package/dist/esm/clients/subject.js.map +1 -0
  30. package/dist/{index.js → esm/index.js} +6 -7
  31. package/dist/esm/index.js.map +1 -0
  32. package/dist/{schemas → esm/schemas}/openapi.js +1 -0
  33. package/dist/esm/schemas/openapi.js.map +1 -0
  34. package/dist/{test → esm/test}/agent.js +8 -7
  35. package/dist/esm/test/agent.js.map +1 -0
  36. package/dist/{test → esm/test}/mocks.js +5 -4
  37. package/dist/esm/test/mocks.js.map +1 -0
  38. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
  39. package/dist/{clients → types/clients}/client.d.ts +1 -2
  40. package/dist/{schemas → types/schemas}/openapi.d.ts +5 -2
  41. package/package.json +25 -20
  42. package/tsconfig.base.json +24 -0
  43. package/tsconfig.cjs.json +8 -0
  44. package/tsconfig.esm.json +8 -0
  45. package/dist/clients/client.js +0 -111
  46. package/dist/clients/event.js +0 -60
  47. package/dist/clients/meter.js +0 -64
  48. package/dist/clients/portal.js +0 -36
  49. package/dist/clients/subject.js +0 -55
  50. package/dist/tsconfig.tsbuildinfo +0 -1
  51. /package/dist/{clients → types/clients}/event.d.ts +0 -0
  52. /package/dist/{clients → types/clients}/meter.d.ts +0 -0
  53. /package/dist/{clients → types/clients}/portal.d.ts +0 -0
  54. /package/dist/{clients → types/clients}/subject.d.ts +0 -0
  55. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  56. /package/dist/{test → types/test}/agent.d.ts +0 -0
  57. /package/dist/{test → types/test}/mocks.d.ts +0 -0
@@ -0,0 +1,191 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
28
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
29
+ return new (P || (P = Promise))(function (resolve, reject) {
30
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
31
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
32
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
33
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
34
+ });
35
+ };
36
+ var __generator = (this && this.__generator) || function (thisArg, body) {
37
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
38
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
39
+ function verb(n) { return function (v) { return step([n, v]); }; }
40
+ function step(op) {
41
+ if (f) throw new TypeError("Generator is already executing.");
42
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
43
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
44
+ if (y = 0, t) op = [op[0] & 2, t.value];
45
+ switch (op[0]) {
46
+ case 0: case 1: t = op; break;
47
+ case 4: _.label++; return { value: op[1], done: false };
48
+ case 5: _.label++; y = op[1]; op = [0]; continue;
49
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
50
+ default:
51
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
53
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
54
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
55
+ if (t[2]) _.ops.pop();
56
+ _.trys.pop(); continue;
57
+ }
58
+ op = body.call(thisArg, _);
59
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
60
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
61
+ }
62
+ };
63
+ import { request } from 'undici';
64
+ var BaseClient = /** @class */ (function () {
65
+ function BaseClient(config) {
66
+ this.config = config;
67
+ }
68
+ BaseClient.prototype.request = function (_a) {
69
+ return __awaiter(this, arguments, void 0, function (_b) {
70
+ var url, reqHeaders, reqOpts, resp, problem;
71
+ var path = _b.path, method = _b.method, searchParams = _b.searchParams, headers = _b.headers, body = _b.body, options = _b.options;
72
+ return __generator(this, function (_c) {
73
+ switch (_c.label) {
74
+ case 0:
75
+ url = this.getUrl(path, searchParams);
76
+ reqHeaders = __assign(__assign(__assign(__assign({ Accept: 'application/json' }, headers), this.getAuthHeaders()), this.config.headers), options === null || options === void 0 ? void 0 : options.headers);
77
+ reqOpts = {
78
+ method: method,
79
+ headers: reqHeaders,
80
+ };
81
+ // Optional body
82
+ if (body) {
83
+ if (!reqHeaders['Content-Type'] && !reqHeaders['content-type']) {
84
+ throw new Error('Content Type is required with body');
85
+ }
86
+ reqOpts.body = body;
87
+ }
88
+ return [4 /*yield*/, request(url, reqOpts)
89
+ // Error handling
90
+ ];
91
+ case 1:
92
+ resp = _c.sent();
93
+ if (!(resp.statusCode > 399)) return [3 /*break*/, 4];
94
+ if (!(resp.headers['content-type'] === 'application/problem+json')) return [3 /*break*/, 3];
95
+ return [4 /*yield*/, resp.body.json()];
96
+ case 2:
97
+ problem = (_c.sent());
98
+ throw new HttpError({
99
+ statusCode: resp.statusCode,
100
+ problem: problem,
101
+ });
102
+ case 3:
103
+ // Requests can fail before API, in this case we only have a status code
104
+ throw new HttpError({
105
+ statusCode: resp.statusCode,
106
+ });
107
+ case 4:
108
+ // Response parsing
109
+ if (resp.statusCode === 204 || resp.headers['content-length'] === '0') {
110
+ return [2 /*return*/, undefined];
111
+ }
112
+ if (!(resp.headers['content-type'] === 'application/json')) return [3 /*break*/, 6];
113
+ return [4 /*yield*/, resp.body.json()];
114
+ case 5: return [2 /*return*/, (_c.sent())];
115
+ case 6:
116
+ if (!resp.headers['content-type']) {
117
+ throw new Error('Missing content type');
118
+ }
119
+ throw new Error("Unknown content type: ".concat(resp.headers['content-type']));
120
+ }
121
+ });
122
+ });
123
+ };
124
+ BaseClient.prototype.getUrl = function (path, searchParams) {
125
+ var qs = searchParams ? searchParams.toString() : '';
126
+ qs = qs.length > 0 ? "?".concat(qs) : '';
127
+ var url = new URL("".concat(path).concat(qs), this.config.baseUrl);
128
+ return url;
129
+ };
130
+ BaseClient.prototype.getAuthHeaders = function () {
131
+ if (this.config.token) {
132
+ return {
133
+ authorization: "Bearer ".concat(this.config.token),
134
+ };
135
+ }
136
+ if (this.config.username && this.config.password) {
137
+ var encoded = Buffer.from("".concat(this.config.username, ":").concat(this.config.password)).toString('base64');
138
+ return {
139
+ authorization: "Basic ".concat(encoded),
140
+ };
141
+ }
142
+ return {};
143
+ };
144
+ BaseClient.toURLSearchParams = function (params) {
145
+ var searchParams = new URLSearchParams();
146
+ var _loop_1 = function (key, value) {
147
+ if (value === undefined) {
148
+ return "continue";
149
+ }
150
+ if (Array.isArray(value)) {
151
+ for (var _c = 0, value_1 = value; _c < value_1.length; _c++) {
152
+ var item = value_1[_c];
153
+ searchParams.append(key, item);
154
+ }
155
+ }
156
+ else if (value instanceof Date) {
157
+ searchParams.append(key, value.toISOString());
158
+ }
159
+ else if (typeof value === 'object') {
160
+ Object.entries(value).forEach(function (_a) {
161
+ var k = _a[0], v = _a[1];
162
+ searchParams.append("".concat(key, "[").concat(k, "]"), v);
163
+ });
164
+ }
165
+ else {
166
+ searchParams.append(key, value.toString());
167
+ }
168
+ };
169
+ for (var _i = 0, _a = Object.entries(params); _i < _a.length; _i++) {
170
+ var _b = _a[_i], key = _b[0], value = _b[1];
171
+ _loop_1(key, value);
172
+ }
173
+ return searchParams;
174
+ };
175
+ return BaseClient;
176
+ }());
177
+ export { BaseClient };
178
+ var HttpError = /** @class */ (function (_super) {
179
+ __extends(HttpError, _super);
180
+ function HttpError(_a) {
181
+ var statusCode = _a.statusCode, problem = _a.problem;
182
+ var _this = _super.call(this, (problem === null || problem === void 0 ? void 0 : problem.type) || 'unexpected status code') || this;
183
+ _this.name = 'HttpError';
184
+ _this.statusCode = statusCode;
185
+ _this.problem = problem;
186
+ return _this;
187
+ }
188
+ return HttpError;
189
+ }(Error));
190
+ export { HttpError };
191
+ //# 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;IAGE,oBAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEe,4BAAO,GAAvB;4DAA2B,EAc1B;;gBAbC,IAAI,UAAA,EACJ,MAAM,YAAA,EACN,YAAY,kBAAA,EACZ,OAAO,aAAA,EACP,IAAI,UAAA,EACJ,OAAO,aAAA;;;;wBAUD,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;wBAGrC,UAAU,yCACd,MAAM,EAAE,kBAAkB,IACvB,OAAO,GACP,IAAI,CAAC,cAAc,EAAE,GACrB,IAAI,CAAC,MAAM,CAAC,OAAO,GACnB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CACpB,CAAA;wBACK,OAAO,GAAyB;4BACpC,MAAM,QAAA;4BACN,OAAO,EAAE,UAAU;yBACpB,CAAA;wBAED,gBAAgB;wBAChB,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,KAAI,wBAAwB,CAAC,SAAA;QAChD,KAAI,CAAC,IAAI,GAAG,WAAW,CAAA;QACvB,KAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,KAAI,CAAC,OAAO,GAAG,OAAO,CAAA;;IACxB,CAAC;IACH,gBAAC;AAAD,CAAC,AAhBD,CAA+B,KAAK,GAgBnC"}
@@ -0,0 +1,131 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
27
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ function verb(n) { return function (v) { return step([n, v]); }; }
29
+ function step(op) {
30
+ if (f) throw new TypeError("Generator is already executing.");
31
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
+ if (y = 0, t) op = [op[0] & 2, t.value];
34
+ switch (op[0]) {
35
+ case 0: case 1: t = op; break;
36
+ case 4: _.label++; return { value: op[1], done: false };
37
+ case 5: _.label++; y = op[1]; op = [0]; continue;
38
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
+ default:
40
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
+ if (t[2]) _.ops.pop();
45
+ _.trys.pop(); continue;
46
+ }
47
+ op = body.call(thisArg, _);
48
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
+ }
51
+ };
52
+ import crypto from 'crypto';
53
+ import { BaseClient } from './client.js';
54
+ var EventsClient = /** @class */ (function (_super) {
55
+ __extends(EventsClient, _super);
56
+ function EventsClient(config) {
57
+ return _super.call(this, config) || this;
58
+ }
59
+ /**
60
+ * Ingest usage event in a CloudEvents format
61
+ * @see https://cloudevents.io
62
+ */
63
+ EventsClient.prototype.ingest = function (usageEvent, options) {
64
+ return __awaiter(this, void 0, void 0, function () {
65
+ var isBatch, cloudEvents, contentType, body;
66
+ return __generator(this, function (_a) {
67
+ switch (_a.label) {
68
+ case 0:
69
+ isBatch = Array.isArray(usageEvent);
70
+ cloudEvents = (isBatch ? usageEvent : [usageEvent]).map(function (ev) {
71
+ var _a, _b, _c, _d;
72
+ // Validate content type
73
+ if (ev.datacontenttype &&
74
+ ev.datacontenttype !== 'application/json') {
75
+ throw new TypeError("Unsupported datacontenttype: ".concat(ev.datacontenttype));
76
+ }
77
+ // We default where we can to lower the barrier to use CloudEvents
78
+ var cloudEvent = {
79
+ specversion: (_a = ev.specversion) !== null && _a !== void 0 ? _a : '1.0',
80
+ id: (_b = ev.id) !== null && _b !== void 0 ? _b : crypto.randomUUID(),
81
+ source: (_c = ev.source) !== null && _c !== void 0 ? _c : '@openmeter/sdk',
82
+ type: ev.type,
83
+ subject: ev.subject,
84
+ time: (_d = ev.time) === null || _d === void 0 ? void 0 : _d.toISOString(),
85
+ datacontenttype: ev.datacontenttype,
86
+ dataschema: ev.dataschema,
87
+ data: ev.data,
88
+ };
89
+ return cloudEvent;
90
+ });
91
+ contentType = isBatch ? 'application/cloudevents-batch+json' : 'application/cloudevents+json';
92
+ body = isBatch ? JSON.stringify(cloudEvents) : JSON.stringify(cloudEvents[0]);
93
+ return [4 /*yield*/, this.request({
94
+ path: '/api/v1/events',
95
+ method: 'POST',
96
+ body: body,
97
+ headers: {
98
+ 'Content-Type': contentType,
99
+ },
100
+ options: options,
101
+ })];
102
+ case 1:
103
+ // Making Request
104
+ return [2 /*return*/, _a.sent()];
105
+ }
106
+ });
107
+ });
108
+ };
109
+ /**
110
+ * List raw events
111
+ */
112
+ EventsClient.prototype.list = function (params, options) {
113
+ return __awaiter(this, void 0, void 0, function () {
114
+ var searchParams;
115
+ return __generator(this, function (_a) {
116
+ searchParams = params
117
+ ? BaseClient.toURLSearchParams(params)
118
+ : undefined;
119
+ return [2 /*return*/, this.request({
120
+ method: 'GET',
121
+ path: "/api/v1/events",
122
+ searchParams: searchParams,
123
+ options: options,
124
+ })];
125
+ });
126
+ });
127
+ };
128
+ return EventsClient;
129
+ }(BaseClient));
130
+ export { EventsClient };
131
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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;4BAED,OAAO,UAAU,CAAA;wBACnB,CAAC,CAAC,CAAA;wBAEI,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,8BAA8B,CAAA;wBAC7F,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;wBAG5E,qBAAM,IAAI,CAAC,OAAO,CAAC;gCACxB,IAAI,EAAE,gBAAgB;gCACtB,MAAM,EAAE,MAAM;gCACd,IAAI,MAAA;gCACJ,OAAO,EAAE;oCACP,cAAc,EAAE,WAAW;iCAC5B;gCACD,OAAO,SAAA;6BACR,CAAC,EAAA;;oBATF,iBAAiB;oBACjB,sBAAO,SAQL,EAAA;;;;KACH;IAED;;OAEG;IACU,2BAAI,GAAjB,UACE,MAA0B,EAC1B,OAAwB;;;;gBAElB,YAAY,GAAG,MAAM;oBACzB,CAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC;oBACtC,CAAC,CAAC,SAAS,CAAA;gBACb,sBAAO,IAAI,CAAC,OAAO,CAAkB;wBACnC,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,gBAAgB;wBACtB,YAAY,cAAA;wBACZ,OAAO,SAAA;qBACR,CAAC,EAAA;;;KACH;IACH,mBAAC;AAAD,CAAC,AAzED,CAAkC,UAAU,GAyE3C"}
@@ -0,0 +1,136 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
27
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ function verb(n) { return function (v) { return step([n, v]); }; }
29
+ function step(op) {
30
+ if (f) throw new TypeError("Generator is already executing.");
31
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
+ if (y = 0, t) op = [op[0] & 2, t.value];
34
+ switch (op[0]) {
35
+ case 0: case 1: t = op; break;
36
+ case 4: _.label++; return { value: op[1], done: false };
37
+ case 5: _.label++; y = op[1]; op = [0]; continue;
38
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
+ default:
40
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
+ if (t[2]) _.ops.pop();
45
+ _.trys.pop(); continue;
46
+ }
47
+ op = body.call(thisArg, _);
48
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
+ }
51
+ };
52
+ import { BaseClient } from './client.js';
53
+ export var WindowSize;
54
+ (function (WindowSize) {
55
+ WindowSize["MINUTE"] = "MINUTE";
56
+ WindowSize["HOUR"] = "HOUR";
57
+ WindowSize["DAY"] = "DAY";
58
+ })(WindowSize || (WindowSize = {}));
59
+ export var MeterAggregation;
60
+ (function (MeterAggregation) {
61
+ MeterAggregation["SUM"] = "SUM";
62
+ MeterAggregation["COUNT"] = "COUNT";
63
+ MeterAggregation["AVG"] = "AVG";
64
+ MeterAggregation["MIN"] = "MIN";
65
+ MeterAggregation["MAX"] = "MAX";
66
+ })(MeterAggregation || (MeterAggregation = {}));
67
+ var MetersClient = /** @class */ (function (_super) {
68
+ __extends(MetersClient, _super);
69
+ function MetersClient(config) {
70
+ return _super.call(this, config) || this;
71
+ }
72
+ /**
73
+ * Get one meter by slug
74
+ */
75
+ MetersClient.prototype.get = function (slug, options) {
76
+ return __awaiter(this, void 0, void 0, function () {
77
+ return __generator(this, function (_a) {
78
+ return [2 /*return*/, this.request({
79
+ method: 'GET',
80
+ path: "/api/v1/meters/".concat(slug),
81
+ options: options,
82
+ })];
83
+ });
84
+ });
85
+ };
86
+ /**
87
+ * List meters
88
+ */
89
+ MetersClient.prototype.list = function (options) {
90
+ return __awaiter(this, void 0, void 0, function () {
91
+ return __generator(this, function (_a) {
92
+ return [2 /*return*/, this.request({
93
+ method: 'GET',
94
+ path: "/api/v1/meters",
95
+ options: options,
96
+ })];
97
+ });
98
+ });
99
+ };
100
+ /**
101
+ * Query a meter
102
+ */
103
+ MetersClient.prototype.query = function (slug, params, options) {
104
+ return __awaiter(this, void 0, void 0, function () {
105
+ var searchParams;
106
+ return __generator(this, function (_a) {
107
+ searchParams = params
108
+ ? BaseClient.toURLSearchParams(params)
109
+ : undefined;
110
+ return [2 /*return*/, this.request({
111
+ method: 'GET',
112
+ path: "/api/v1/meters/".concat(slug, "/query"),
113
+ searchParams: searchParams,
114
+ options: options,
115
+ })];
116
+ });
117
+ });
118
+ };
119
+ /**
120
+ * List subjects of a meter
121
+ */
122
+ MetersClient.prototype.subjects = function (slug, options) {
123
+ return __awaiter(this, void 0, void 0, function () {
124
+ return __generator(this, function (_a) {
125
+ return [2 /*return*/, this.request({
126
+ method: 'GET',
127
+ path: "/api/v1/meters/".concat(slug, "/subjects"),
128
+ options: options,
129
+ })];
130
+ });
131
+ });
132
+ };
133
+ return MetersClient;
134
+ }(BaseClient));
135
+ export { MetersClient };
136
+ //# 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;IAAkC,gCAAU;IAC1C,sBAAY,MAAuB;QACjC,OAAA,MAAK,YAAC,MAAM,CAAC,SAAA;IACf,CAAC;IAED;;OAEG;IACU,0BAAG,GAAhB,UAAiB,IAAY,EAAE,OAAwB;;;gBACrD,sBAAO,IAAI,CAAC,OAAO,CAAQ;wBACzB,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,yBAAkB,IAAI,CAAE;wBAC9B,OAAO,SAAA;qBACR,CAAC,EAAA;;;KACH;IAED;;OAEG;IACU,2BAAI,GAAjB,UAAkB,OAAwB;;;gBACxC,sBAAO,IAAI,CAAC,OAAO,CAAU;wBAC3B,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,gBAAgB;wBACtB,OAAO,SAAA;qBACR,CAAC,EAAA;;;KACH;IAED;;OAEG;IACU,4BAAK,GAAlB,UACE,IAAY,EACZ,MAAyB,EACzB,OAAwB;;;;gBAElB,YAAY,GAAG,MAAM;oBACzB,CAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC;oBACtC,CAAC,CAAC,SAAS,CAAA;gBACb,sBAAO,IAAI,CAAC,OAAO,CAAqB;wBACtC,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,yBAAkB,IAAI,WAAQ;wBACpC,YAAY,cAAA;wBACZ,OAAO,SAAA;qBACR,CAAC,EAAA;;;KACH;IAED;;OAEG;IACU,+BAAQ,GAArB,UACE,IAAY,EACZ,OAAwB;;;gBAExB,sBAAO,IAAI,CAAC,OAAO,CAAW;wBAC5B,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,yBAAkB,IAAI,cAAW;wBACvC,OAAO,SAAA;qBACR,CAAC,EAAA;;;KACH;IACH,mBAAC;AAAD,CAAC,AA3DD,CAAkC,UAAU,GA2D3C"}
@@ -0,0 +1,106 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ var __generator = (this && this.__generator) || function (thisArg, body) {
26
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
27
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ function verb(n) { return function (v) { return step([n, v]); }; }
29
+ function step(op) {
30
+ if (f) throw new TypeError("Generator is already executing.");
31
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
32
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
33
+ if (y = 0, t) op = [op[0] & 2, t.value];
34
+ switch (op[0]) {
35
+ case 0: case 1: t = op; break;
36
+ case 4: _.label++; return { value: op[1], done: false };
37
+ case 5: _.label++; y = op[1]; op = [0]; continue;
38
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
39
+ default:
40
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
41
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
42
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
43
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
44
+ if (t[2]) _.ops.pop();
45
+ _.trys.pop(); continue;
46
+ }
47
+ op = body.call(thisArg, _);
48
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
49
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
50
+ }
51
+ };
52
+ import { BaseClient } from './client.js';
53
+ var PortalClient = /** @class */ (function (_super) {
54
+ __extends(PortalClient, _super);
55
+ function PortalClient(config) {
56
+ return _super.call(this, config) || this;
57
+ }
58
+ /**
59
+ * Create portal token
60
+ * Useful for creating a token sharable with your customer to query their own usage
61
+ */
62
+ PortalClient.prototype.createToken = function (token, options) {
63
+ return __awaiter(this, void 0, void 0, function () {
64
+ return __generator(this, function (_a) {
65
+ switch (_a.label) {
66
+ case 0: return [4 /*yield*/, this.request({
67
+ path: '/api/v1/portal/tokens',
68
+ method: 'POST',
69
+ headers: {
70
+ 'Content-Type': 'application/json',
71
+ },
72
+ body: JSON.stringify(token),
73
+ options: options,
74
+ })];
75
+ case 1: return [2 /*return*/, _a.sent()];
76
+ }
77
+ });
78
+ });
79
+ };
80
+ /**
81
+ * Invalidate portal token
82
+ * @note OpenMeter Cloud only feature
83
+ */
84
+ PortalClient.prototype.invalidateTokens = function () {
85
+ return __awaiter(this, arguments, void 0, function (invalidate, options) {
86
+ if (invalidate === void 0) { invalidate = {}; }
87
+ return __generator(this, function (_a) {
88
+ switch (_a.label) {
89
+ case 0: return [4 /*yield*/, this.request({
90
+ path: '/api/v1/portal/tokens/invalidate',
91
+ method: 'POST',
92
+ headers: {
93
+ 'Content-Type': 'application/json',
94
+ },
95
+ body: JSON.stringify(invalidate),
96
+ options: options,
97
+ })];
98
+ case 1: return [2 /*return*/, _a.sent()];
99
+ }
100
+ });
101
+ });
102
+ };
103
+ return PortalClient;
104
+ }(BaseClient));
105
+ export { PortalClient };
106
+ //# sourceMappingURL=portal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal.js","sourceRoot":"","sources":["../../../clients/portal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAkB,UAAU,EAAmB,MAAM,aAAa,CAAA;AAIzE;IAAkC,gCAAU;IAC1C,sBAAY,MAAuB;QACjC,OAAA,MAAK,YAAC,MAAM,CAAC,SAAA;IACf,CAAC;IAED;;;OAGG;IACU,kCAAW,GAAxB,UACE,KAIC,EACD,OAAwB;;;;4BAEjB,qBAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,IAAI,EAAE,uBAAuB;4BAC7B,MAAM,EAAE,MAAM;4BACd,OAAO,EAAE;gCACP,cAAc,EAAE,kBAAkB;6BACnC;4BACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;4BAC3B,OAAO,SAAA;yBACR,CAAC,EAAA;4BARF,sBAAO,SAQL,EAAA;;;;KACH;IAED;;;OAGG;IACU,uCAAgB,GAA7B;4DACE,UAAqC,EACrC,OAAwB;YADxB,2BAAA,EAAA,eAAqC;;;4BAG9B,qBAAM,IAAI,CAAC,OAAO,CAAC;4BACxB,IAAI,EAAE,kCAAkC;4BACxC,MAAM,EAAE,MAAM;4BACd,OAAO,EAAE;gCACP,cAAc,EAAE,kBAAkB;6BACnC;4BACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;4BAChC,OAAO,SAAA;yBACR,CAAC,EAAA;4BARF,sBAAO,SAQL,EAAA;;;;KACH;IACH,mBAAC;AAAD,CAAC,AA9CD,CAAkC,UAAU,GA8C3C"}