@chirpier/chirpier-js 0.2.0 → 0.3.0
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/README.md +49 -18
- package/dist/__tests__/chirpier.test.js +150 -14
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +77 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +177 -54
- package/package.json +4 -4
- package/src/__tests__/chirpier.test.ts +105 -11
- package/src/index.ts +173 -70
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ import { initialize, logEvent, stop } from "@chirpier/chirpier-js";
|
|
|
21
21
|
initialize({ key: "chp_your_api_key" });
|
|
22
22
|
|
|
23
23
|
await logEvent({
|
|
24
|
-
|
|
24
|
+
log_id: "9f97d65f-fb30-4062-b4d0-8617c03fe4f6",
|
|
25
|
+
agent: "openclaw.main",
|
|
25
26
|
event: "tool.errors.count",
|
|
26
27
|
value: 1,
|
|
27
28
|
meta: { tool_name: "browser.open", workflow: "triage" },
|
|
@@ -38,7 +39,7 @@ import { createClient } from "@chirpier/chirpier-js";
|
|
|
38
39
|
const client = createClient({ key: "chp_your_api_key" });
|
|
39
40
|
|
|
40
41
|
await client.log({
|
|
41
|
-
|
|
42
|
+
agent: "openclaw.main",
|
|
42
43
|
event: "task.duration_ms",
|
|
43
44
|
value: 420,
|
|
44
45
|
meta: { task_name: "email_triage", result: "success" },
|
|
@@ -64,7 +65,7 @@ Initializes the SDK singleton.
|
|
|
64
65
|
- `timeout` (number, optional): HTTP timeout in ms.
|
|
65
66
|
- `batchSize` (number, optional): Flush size threshold.
|
|
66
67
|
- `flushDelay` (number, optional): Flush interval in ms.
|
|
67
|
-
- `maxQueueSize` (number, optional):
|
|
68
|
+
- `maxQueueSize` (number, optional, deprecated): Ignored; queues grow in memory until flushed.
|
|
68
69
|
|
|
69
70
|
API key resolution precedence (when `key` is omitted):
|
|
70
71
|
1. `CHIRPIER_API_KEY` from process environment
|
|
@@ -73,6 +74,7 @@ API key resolution precedence (when `key` is omitted):
|
|
|
73
74
|
Default ingest endpoint is `https://logs.chirpier.co/v1.0/logs`.
|
|
74
75
|
Default servicer endpoint is `https://api.chirpier.co/v1.0`.
|
|
75
76
|
The same bearer token is used for both ingest and servicer APIs.
|
|
77
|
+
Queued logs are not dropped locally because of queue capacity or retry exhaustion.
|
|
76
78
|
|
|
77
79
|
### `logEvent(log)`
|
|
78
80
|
|
|
@@ -82,7 +84,7 @@ Example with `occurred_at`:
|
|
|
82
84
|
|
|
83
85
|
```ts
|
|
84
86
|
await logEvent({
|
|
85
|
-
|
|
87
|
+
agent: "openclaw.main",
|
|
86
88
|
event: "tokens.used",
|
|
87
89
|
value: 1530,
|
|
88
90
|
occurred_at: "2026-03-05T14:30:00Z",
|
|
@@ -90,14 +92,16 @@ await logEvent({
|
|
|
90
92
|
```
|
|
91
93
|
|
|
92
94
|
`log`:
|
|
93
|
-
- `
|
|
95
|
+
- `agent` (string, optional): Free-form agent identifier text.
|
|
96
|
+
- `log_id` (string, optional): UUID idempotency key for the log. Generated automatically when omitted.
|
|
94
97
|
- `event` (string, required): Event name.
|
|
95
98
|
- `value` (number, required): Numeric value.
|
|
96
99
|
- `occurred_at` (string | Date, optional): Event occurrence timestamp.
|
|
97
100
|
- `meta` (JSON, optional): Additional JSON-encodable metadata.
|
|
98
101
|
|
|
99
102
|
Notes:
|
|
100
|
-
- `
|
|
103
|
+
- `agent` whitespace-only values are treated as omitted.
|
|
104
|
+
- `log_id` blank values are treated as omitted and replaced with a generated UUIDv4.
|
|
101
105
|
- `event` must be non-empty after trimming.
|
|
102
106
|
- `occurred_at` must be within the last 30 days and no more than 1 day in the future.
|
|
103
107
|
- Use ISO8601 UTC timestamps, such as `2026-03-05T14:30:00Z`, or pass a `Date` instance.
|
|
@@ -120,6 +124,7 @@ Client methods:
|
|
|
120
124
|
- `client.close()`: Alias of `client.shutdown()`.
|
|
121
125
|
- `client.listEvents()`: List event definitions using the servicer API.
|
|
122
126
|
- `client.getEvent(eventID)`: Read one event definition.
|
|
127
|
+
- `client.getEventAnalytics(eventID, query)`: Read analytics window comparisons.
|
|
123
128
|
- `client.updateEvent(eventID, payload)`: Update event definition metadata.
|
|
124
129
|
- `client.listPolicies()`: List monitors/policies.
|
|
125
130
|
- `client.createPolicy(payload)`: Create a monitor/policy.
|
|
@@ -128,7 +133,7 @@ Client methods:
|
|
|
128
133
|
- `client.acknowledgeAlert(alertID)`: Acknowledge an alert.
|
|
129
134
|
- `client.resolveAlert(alertID)`: Resolve an alert.
|
|
130
135
|
- `client.archiveAlert(alertID)`: Archive an alert.
|
|
131
|
-
- `client.
|
|
136
|
+
- `client.testDestination(destinationID)`: Send a destination test and return the synthetic test `alert_id`.
|
|
132
137
|
- `client.getEventLogs(eventID, { period, limit, offset })`: Read minute/hour/day event rollups.
|
|
133
138
|
<!-- docs:end common-tasks -->
|
|
134
139
|
|
|
@@ -138,23 +143,33 @@ Client methods:
|
|
|
138
143
|
const client = createClient({ key: "chp_your_api_key" });
|
|
139
144
|
|
|
140
145
|
await client.log({
|
|
141
|
-
|
|
146
|
+
agent: "openclaw.main",
|
|
142
147
|
event: "tool.errors.count",
|
|
143
148
|
value: 1,
|
|
144
149
|
meta: { tool_name: "browser.open" },
|
|
145
150
|
});
|
|
146
151
|
|
|
147
152
|
await client.log({
|
|
148
|
-
|
|
153
|
+
agent: "openclaw.main",
|
|
149
154
|
event: "task.duration_ms",
|
|
150
155
|
value: 780,
|
|
151
156
|
meta: { task_name: "daily_digest" },
|
|
152
157
|
});
|
|
153
158
|
|
|
159
|
+
await client.flush();
|
|
160
|
+
|
|
154
161
|
const events = await client.listEvents();
|
|
155
|
-
const toolErrors = events.find(
|
|
162
|
+
const toolErrors = events.find(
|
|
163
|
+
(eventDef) => eventDef.agent === "openclaw.main" && eventDef.event === "tool.errors.count"
|
|
164
|
+
);
|
|
156
165
|
|
|
157
166
|
if (toolErrors) {
|
|
167
|
+
const analytics = await client.getEventAnalytics(toolErrors.event_id, {
|
|
168
|
+
view: "window",
|
|
169
|
+
period: "1h",
|
|
170
|
+
previous: "previous_window",
|
|
171
|
+
});
|
|
172
|
+
|
|
158
173
|
await client.createPolicy({
|
|
159
174
|
event_id: toolErrors.event_id,
|
|
160
175
|
title: "OpenClaw tool errors spike",
|
|
@@ -168,6 +183,17 @@ if (toolErrors) {
|
|
|
168
183
|
});
|
|
169
184
|
|
|
170
185
|
await client.getEventLogs(toolErrors.event_id, { period: "hour", limit: 24 });
|
|
186
|
+
|
|
187
|
+
const destination = await client.createDestination({
|
|
188
|
+
channel: "slack",
|
|
189
|
+
url: "https://hooks.slack.com/services/T000/B000/secret",
|
|
190
|
+
scope: "all",
|
|
191
|
+
policy_ids: [],
|
|
192
|
+
enabled: true,
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
const test = await client.testDestination(destination.destination_id);
|
|
196
|
+
await client.getAlertDeliveries(test.alert_id, { kind: "test" });
|
|
171
197
|
}
|
|
172
198
|
|
|
173
199
|
await client.shutdown();
|
|
@@ -183,16 +209,18 @@ Flushes pending logs and stops the SDK singleton.
|
|
|
183
209
|
npm test
|
|
184
210
|
```
|
|
185
211
|
|
|
186
|
-
##
|
|
212
|
+
## Destination Setup Examples
|
|
187
213
|
|
|
188
|
-
Create a Slack
|
|
214
|
+
Create a Slack destination for OpenClaw alerts:
|
|
189
215
|
|
|
190
216
|
```ts
|
|
191
217
|
await axios.post(
|
|
192
|
-
"https://api.chirpier.co/v1.0/
|
|
218
|
+
"https://api.chirpier.co/v1.0/destinations",
|
|
193
219
|
{
|
|
194
220
|
url: "https://hooks.slack.com/services/T000/B000/secret",
|
|
195
|
-
|
|
221
|
+
channel: "slack",
|
|
222
|
+
scope: "all",
|
|
223
|
+
policy_ids: [],
|
|
196
224
|
enabled: true,
|
|
197
225
|
},
|
|
198
226
|
{
|
|
@@ -201,14 +229,16 @@ await axios.post(
|
|
|
201
229
|
);
|
|
202
230
|
```
|
|
203
231
|
|
|
204
|
-
Create a Telegram
|
|
232
|
+
Create a Telegram destination for OpenClaw alerts:
|
|
205
233
|
|
|
206
234
|
```ts
|
|
207
235
|
await axios.post(
|
|
208
|
-
"https://api.chirpier.co/v1.0/
|
|
236
|
+
"https://api.chirpier.co/v1.0/destinations",
|
|
209
237
|
{
|
|
210
|
-
|
|
238
|
+
channel: "telegram",
|
|
211
239
|
enabled: true,
|
|
240
|
+
scope: "all",
|
|
241
|
+
policy_ids: [],
|
|
212
242
|
credentials: {
|
|
213
243
|
bot_token: "123456:telegram-bot-token",
|
|
214
244
|
chat_id: "987654321",
|
|
@@ -223,5 +253,6 @@ await axios.post(
|
|
|
223
253
|
Send a test notification:
|
|
224
254
|
|
|
225
255
|
```ts
|
|
226
|
-
await client.
|
|
256
|
+
const result = await client.testDestination("whk_123");
|
|
257
|
+
await client.getAlertDeliveries(result.alert_id, { kind: "test" });
|
|
227
258
|
```
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g =
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -190,7 +190,7 @@ describe("Chirpier SDK", function () {
|
|
|
190
190
|
logLevel: 0 /* LogLevel.None */,
|
|
191
191
|
});
|
|
192
192
|
log = {
|
|
193
|
-
|
|
193
|
+
agent: "api.worker",
|
|
194
194
|
event: "request.finished",
|
|
195
195
|
value: 1,
|
|
196
196
|
};
|
|
@@ -204,16 +204,45 @@ describe("Chirpier SDK", function () {
|
|
|
204
204
|
expect(mock.history.post[0].url).toBe(constants_1.DEFAULT_API_ENDPOINT);
|
|
205
205
|
expect(JSON.parse(mock.history.post[0].data)).toEqual([
|
|
206
206
|
{
|
|
207
|
-
|
|
207
|
+
log_id: expect.any(String),
|
|
208
|
+
agent: "api.worker",
|
|
208
209
|
event: "request.finished",
|
|
209
210
|
value: 1,
|
|
210
211
|
},
|
|
211
212
|
]);
|
|
213
|
+
expect(JSON.parse(mock.history.post[0].data)[0].log_id).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
|
|
212
214
|
return [2 /*return*/];
|
|
213
215
|
}
|
|
214
216
|
});
|
|
215
217
|
}); });
|
|
216
|
-
test("
|
|
218
|
+
test("should preserve provided log_id", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
219
|
+
var mock, payload;
|
|
220
|
+
return __generator(this, function (_a) {
|
|
221
|
+
switch (_a.label) {
|
|
222
|
+
case 0:
|
|
223
|
+
mock = new axios_mock_adapter_1.default(axios_1.default);
|
|
224
|
+
mock.onPost(constants_1.DEFAULT_API_ENDPOINT).reply(200, { success: true });
|
|
225
|
+
(0, index_1.initialize)({
|
|
226
|
+
key: "chp_log_id_key",
|
|
227
|
+
logLevel: 0 /* LogLevel.None */,
|
|
228
|
+
});
|
|
229
|
+
return [4 /*yield*/, (0, index_1.logEvent)({
|
|
230
|
+
log_id: "9f97d65f-fb30-4062-b4d0-8617c03fe4f6",
|
|
231
|
+
event: "request.finished",
|
|
232
|
+
value: 1,
|
|
233
|
+
})];
|
|
234
|
+
case 1:
|
|
235
|
+
_a.sent();
|
|
236
|
+
return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 2000); })];
|
|
237
|
+
case 2:
|
|
238
|
+
_a.sent();
|
|
239
|
+
payload = JSON.parse(mock.history.post[0].data);
|
|
240
|
+
expect(payload[0].log_id).toBe("9f97d65f-fb30-4062-b4d0-8617c03fe4f6");
|
|
241
|
+
return [2 /*return*/];
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}); });
|
|
245
|
+
test("agent whitespace should be omitted", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
217
246
|
var mock, payload;
|
|
218
247
|
return __generator(this, function (_a) {
|
|
219
248
|
switch (_a.label) {
|
|
@@ -225,7 +254,7 @@ describe("Chirpier SDK", function () {
|
|
|
225
254
|
logLevel: 0 /* LogLevel.None */,
|
|
226
255
|
});
|
|
227
256
|
return [4 /*yield*/, (0, index_1.logEvent)({
|
|
228
|
-
|
|
257
|
+
agent: " ",
|
|
229
258
|
event: "metric.tick",
|
|
230
259
|
value: 42,
|
|
231
260
|
})];
|
|
@@ -235,7 +264,7 @@ describe("Chirpier SDK", function () {
|
|
|
235
264
|
case 2:
|
|
236
265
|
_a.sent();
|
|
237
266
|
payload = JSON.parse(mock.history.post[0].data);
|
|
238
|
-
expect(payload[0].
|
|
267
|
+
expect(payload[0].agent).toBeUndefined();
|
|
239
268
|
return [2 /*return*/];
|
|
240
269
|
}
|
|
241
270
|
});
|
|
@@ -252,7 +281,7 @@ describe("Chirpier SDK", function () {
|
|
|
252
281
|
logLevel: 0 /* LogLevel.None */,
|
|
253
282
|
});
|
|
254
283
|
return [4 /*yield*/, (0, index_1.logEvent)({
|
|
255
|
-
|
|
284
|
+
agent: "api.worker",
|
|
256
285
|
event: "request.finished",
|
|
257
286
|
value: 200,
|
|
258
287
|
meta: {
|
|
@@ -329,6 +358,13 @@ describe("Chirpier SDK", function () {
|
|
|
329
358
|
occurred_at: new Date(Date.now() + 25 * 60 * 60 * 1000),
|
|
330
359
|
})).rejects.toThrow(index_1.ChirpierError)];
|
|
331
360
|
case 3:
|
|
361
|
+
_a.sent();
|
|
362
|
+
return [4 /*yield*/, expect((0, index_1.logEvent)({
|
|
363
|
+
log_id: "not-a-uuid",
|
|
364
|
+
event: "bad-log-id",
|
|
365
|
+
value: 1,
|
|
366
|
+
})).rejects.toThrow(index_1.ChirpierError)];
|
|
367
|
+
case 4:
|
|
332
368
|
_a.sent();
|
|
333
369
|
expect(mock.history.post.length).toBe(0);
|
|
334
370
|
return [2 /*return*/];
|
|
@@ -438,6 +474,66 @@ describe("Chirpier SDK", function () {
|
|
|
438
474
|
}
|
|
439
475
|
});
|
|
440
476
|
}); });
|
|
477
|
+
test("event, policy, alert, and destination helpers use servicer endpoints", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
478
|
+
var mock, client, createdEvent, policy, alert_1, destination, updatedDestination;
|
|
479
|
+
return __generator(this, function (_a) {
|
|
480
|
+
switch (_a.label) {
|
|
481
|
+
case 0:
|
|
482
|
+
mock = new axios_mock_adapter_1.default(axios_1.default);
|
|
483
|
+
mock.onPost("https://api.chirpier.co/v1.0/events").reply(200, { event_id: "evt_123", event: "tool.errors.count", public: false, timezone: "UTC" });
|
|
484
|
+
mock.onGet("https://api.chirpier.co/v1.0/events/evt_123").reply(200, { event_id: "evt_123", event: "tool.errors.count", public: false, timezone: "UTC" });
|
|
485
|
+
mock.onGet("https://api.chirpier.co/v1.0/policies/pol_123").reply(200, { policy_id: "pol_123", event_id: "evt_123", title: "Policy", channel: "ops", period: "hour", aggregate: "sum", condition: "gt", threshold: 1, severity: "warning", enabled: true });
|
|
486
|
+
mock.onPut("https://api.chirpier.co/v1.0/policies/pol_123").reply(200, { policy_id: "pol_123", event_id: "evt_123", title: "Updated", channel: "ops", period: "hour", aggregate: "sum", condition: "gt", threshold: 1, severity: "warning", enabled: true });
|
|
487
|
+
mock.onGet("https://api.chirpier.co/v1.0/alerts/alrt_123").reply(200, { alert_id: "alrt_123", policy_id: "pol_123", event_id: "evt_123", event: "tool.errors.count", title: "Alert", channel: "ops", period: "hour", aggregate: "sum", condition: "gt", threshold: 1, severity: "warning", status: "triggered", value: 2, count: 2, min: 1, max: 1 });
|
|
488
|
+
mock.onGet("https://api.chirpier.co/v1.0/destinations").reply(200, []);
|
|
489
|
+
mock.onPost("https://api.chirpier.co/v1.0/destinations").reply(200, { destination_id: "dst_123", channel: "slack", scope: "all", enabled: true });
|
|
490
|
+
mock.onGet("https://api.chirpier.co/v1.0/destinations/dst_123").reply(200, { destination_id: "dst_123", channel: "slack", scope: "all", enabled: true });
|
|
491
|
+
mock.onPut("https://api.chirpier.co/v1.0/destinations/dst_123").reply(200, { destination_id: "dst_123", channel: "slack", scope: "all", enabled: false });
|
|
492
|
+
client = (0, index_1.createClient)({ key: "chp_client_route_key" });
|
|
493
|
+
_a.label = 1;
|
|
494
|
+
case 1:
|
|
495
|
+
_a.trys.push([1, , 11, 13]);
|
|
496
|
+
return [4 /*yield*/, client.createEvent({ event: "tool.errors.count" })];
|
|
497
|
+
case 2:
|
|
498
|
+
createdEvent = _a.sent();
|
|
499
|
+
expect(createdEvent.event_id).toBe("evt_123");
|
|
500
|
+
return [4 /*yield*/, client.getEvent("evt_123")];
|
|
501
|
+
case 3:
|
|
502
|
+
_a.sent();
|
|
503
|
+
return [4 /*yield*/, client.getPolicy("pol_123")];
|
|
504
|
+
case 4:
|
|
505
|
+
policy = _a.sent();
|
|
506
|
+
expect(policy.policy_id).toBe("pol_123");
|
|
507
|
+
return [4 /*yield*/, client.updatePolicy("pol_123", { title: "Updated" })];
|
|
508
|
+
case 5:
|
|
509
|
+
_a.sent();
|
|
510
|
+
return [4 /*yield*/, client.getAlert("alrt_123")];
|
|
511
|
+
case 6:
|
|
512
|
+
alert_1 = _a.sent();
|
|
513
|
+
expect(alert_1.alert_id).toBe("alrt_123");
|
|
514
|
+
return [4 /*yield*/, client.listDestinations()];
|
|
515
|
+
case 7:
|
|
516
|
+
_a.sent();
|
|
517
|
+
return [4 /*yield*/, client.createDestination({ channel: "slack", scope: "all", enabled: true })];
|
|
518
|
+
case 8:
|
|
519
|
+
destination = _a.sent();
|
|
520
|
+
expect(destination.destination_id).toBe("dst_123");
|
|
521
|
+
return [4 /*yield*/, client.getDestination("dst_123")];
|
|
522
|
+
case 9:
|
|
523
|
+
_a.sent();
|
|
524
|
+
return [4 /*yield*/, client.updateDestination("dst_123", { enabled: false })];
|
|
525
|
+
case 10:
|
|
526
|
+
updatedDestination = _a.sent();
|
|
527
|
+
expect(updatedDestination.enabled).toBe(false);
|
|
528
|
+
return [3 /*break*/, 13];
|
|
529
|
+
case 11: return [4 /*yield*/, client.shutdown()];
|
|
530
|
+
case 12:
|
|
531
|
+
_a.sent();
|
|
532
|
+
return [7 /*endfinally*/];
|
|
533
|
+
case 13: return [2 /*return*/];
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
}); });
|
|
441
537
|
test("getAlertDeliveries uses pagination params", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
442
538
|
var mock, client;
|
|
443
539
|
return __generator(this, function (_a) {
|
|
@@ -486,21 +582,61 @@ describe("Chirpier SDK", function () {
|
|
|
486
582
|
}
|
|
487
583
|
});
|
|
488
584
|
}); });
|
|
489
|
-
test("
|
|
490
|
-
var mock, client;
|
|
585
|
+
test("testDestination posts to servicer endpoint", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
586
|
+
var mock, client, result;
|
|
491
587
|
return __generator(this, function (_a) {
|
|
492
588
|
switch (_a.label) {
|
|
493
589
|
case 0:
|
|
494
590
|
mock = new axios_mock_adapter_1.default(axios_1.default);
|
|
495
|
-
mock.onPost("https://api.chirpier.co/v1.0/
|
|
496
|
-
|
|
591
|
+
mock.onPost("https://api.chirpier.co/v1.0/destinations/whk_123/test").reply(200, {
|
|
592
|
+
alert_id: "alrt_123",
|
|
593
|
+
destination_id: "whk_123",
|
|
594
|
+
status: "sent",
|
|
595
|
+
});
|
|
596
|
+
client = (0, index_1.createClient)({ key: "chp_client_destination_key" });
|
|
497
597
|
_a.label = 1;
|
|
498
598
|
case 1:
|
|
499
599
|
_a.trys.push([1, , 3, 5]);
|
|
500
|
-
return [4 /*yield*/, client.
|
|
600
|
+
return [4 /*yield*/, client.testDestination("whk_123")];
|
|
501
601
|
case 2:
|
|
602
|
+
result = _a.sent();
|
|
603
|
+
expect(result.alert_id).toBe("alrt_123");
|
|
604
|
+
expect(mock.history.post[0].url).toBe("https://api.chirpier.co/v1.0/destinations/whk_123/test");
|
|
605
|
+
return [3 /*break*/, 5];
|
|
606
|
+
case 3: return [4 /*yield*/, client.shutdown()];
|
|
607
|
+
case 4:
|
|
502
608
|
_a.sent();
|
|
503
|
-
|
|
609
|
+
return [7 /*endfinally*/];
|
|
610
|
+
case 5: return [2 /*return*/];
|
|
611
|
+
}
|
|
612
|
+
});
|
|
613
|
+
}); });
|
|
614
|
+
test("getEventAnalytics uses analytics endpoint", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
615
|
+
var mock, client, analytics;
|
|
616
|
+
return __generator(this, function (_a) {
|
|
617
|
+
switch (_a.label) {
|
|
618
|
+
case 0:
|
|
619
|
+
mock = new axios_mock_adapter_1.default(axios_1.default);
|
|
620
|
+
mock.onGet("https://api.chirpier.co/v1.0/events/evt_123/analytics?view=window&period=1h&previous=previous_window").reply(200, {
|
|
621
|
+
event_id: "evt_123",
|
|
622
|
+
view: "window",
|
|
623
|
+
period: "1h",
|
|
624
|
+
previous: "previous_window",
|
|
625
|
+
data: null,
|
|
626
|
+
});
|
|
627
|
+
client = (0, index_1.createClient)({ key: "chp_client_analytics_key" });
|
|
628
|
+
_a.label = 1;
|
|
629
|
+
case 1:
|
|
630
|
+
_a.trys.push([1, , 3, 5]);
|
|
631
|
+
return [4 /*yield*/, client.getEventAnalytics("evt_123", {
|
|
632
|
+
view: "window",
|
|
633
|
+
period: "1h",
|
|
634
|
+
previous: "previous_window",
|
|
635
|
+
})];
|
|
636
|
+
case 2:
|
|
637
|
+
analytics = _a.sent();
|
|
638
|
+
expect(analytics.event_id).toBe("evt_123");
|
|
639
|
+
expect(mock.history.get[0].url).toBe("https://api.chirpier.co/v1.0/events/evt_123/analytics?view=window&period=1h&previous=previous_window");
|
|
504
640
|
return [3 /*break*/, 5];
|
|
505
641
|
case 3: return [4 /*yield*/, client.shutdown()];
|
|
506
642
|
case 4:
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAG,EAAW,CAAC;AAC3C,eAAO,MAAM,eAAe,EAAG,IAAa,CAAC;AAC7C,eAAO,MAAM,kBAAkB,EAAG,GAAY,CAAC;AAC/C,eAAO,MAAM,mBAAmB,EAAG,GAAY,CAAC;AAChD,eAAO,MAAM,cAAc,EAAG,IAAa,CAAC;AAC5C,eAAO,MAAM,oBAAoB,EAAG,oCAA6C,CAAC;AAClF,eAAO,MAAM,yBAAyB,EAAG,8BAAuC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,27 +20,33 @@ export interface Config {
|
|
|
20
20
|
*/
|
|
21
21
|
export type Options = Config;
|
|
22
22
|
export interface Log {
|
|
23
|
-
|
|
23
|
+
log_id?: string;
|
|
24
|
+
agent?: string;
|
|
24
25
|
event: string;
|
|
25
26
|
value: number;
|
|
26
27
|
meta?: unknown;
|
|
27
28
|
occurred_at?: string | Date;
|
|
28
29
|
}
|
|
29
|
-
export interface
|
|
30
|
+
export interface Event {
|
|
30
31
|
readonly event_id: string;
|
|
31
|
-
readonly
|
|
32
|
+
readonly agent?: string;
|
|
32
33
|
readonly event: string;
|
|
33
34
|
readonly title?: string;
|
|
34
35
|
readonly public: boolean;
|
|
35
36
|
readonly description?: string;
|
|
36
37
|
readonly unit?: string;
|
|
37
|
-
readonly
|
|
38
|
-
readonly default_aggregate: string;
|
|
39
|
-
readonly enabled: boolean;
|
|
40
|
-
readonly origin: string;
|
|
41
|
-
readonly archived_at?: string;
|
|
38
|
+
readonly timezone: string;
|
|
42
39
|
readonly created_at?: string;
|
|
43
40
|
}
|
|
41
|
+
export interface CreateEventPayload {
|
|
42
|
+
agent?: string;
|
|
43
|
+
event: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
public?: boolean;
|
|
46
|
+
description?: string;
|
|
47
|
+
unit?: string;
|
|
48
|
+
timezone?: string;
|
|
49
|
+
}
|
|
44
50
|
export interface Policy {
|
|
45
51
|
readonly policy_id: string;
|
|
46
52
|
readonly event_id: string;
|
|
@@ -54,11 +60,13 @@ export interface Policy {
|
|
|
54
60
|
readonly severity: string;
|
|
55
61
|
readonly enabled: boolean;
|
|
56
62
|
}
|
|
63
|
+
export type CreatePolicyPayload = Omit<Policy, "policy_id">;
|
|
64
|
+
export type UpdatePolicyPayload = Partial<Omit<Policy, "policy_id">>;
|
|
57
65
|
export interface Alert {
|
|
58
66
|
readonly alert_id: string;
|
|
59
67
|
readonly policy_id: string;
|
|
60
68
|
readonly event_id: string;
|
|
61
|
-
readonly
|
|
69
|
+
readonly agent?: string;
|
|
62
70
|
readonly event: string;
|
|
63
71
|
readonly title: string;
|
|
64
72
|
readonly period: string;
|
|
@@ -78,7 +86,7 @@ export interface Alert {
|
|
|
78
86
|
export interface AlertDelivery {
|
|
79
87
|
readonly attempt_id: string;
|
|
80
88
|
readonly alert_id: string;
|
|
81
|
-
readonly
|
|
89
|
+
readonly destination_id?: string;
|
|
82
90
|
readonly channel: string;
|
|
83
91
|
readonly target: string;
|
|
84
92
|
readonly status: string;
|
|
@@ -86,9 +94,20 @@ export interface AlertDelivery {
|
|
|
86
94
|
readonly error_message?: string;
|
|
87
95
|
readonly created_at: string;
|
|
88
96
|
}
|
|
97
|
+
export interface Destination {
|
|
98
|
+
readonly destination_id: string;
|
|
99
|
+
readonly channel: string;
|
|
100
|
+
readonly url?: string;
|
|
101
|
+
readonly credentials?: Record<string, unknown>;
|
|
102
|
+
readonly scope: string;
|
|
103
|
+
readonly policy_ids?: string[];
|
|
104
|
+
readonly enabled: boolean;
|
|
105
|
+
}
|
|
106
|
+
export type CreateDestinationPayload = Omit<Destination, "destination_id">;
|
|
107
|
+
export type UpdateDestinationPayload = Partial<Omit<Destination, "destination_id">>;
|
|
89
108
|
export interface EventLogPoint {
|
|
90
109
|
readonly event_id: string;
|
|
91
|
-
readonly
|
|
110
|
+
readonly agent?: string;
|
|
92
111
|
readonly event: string;
|
|
93
112
|
readonly period: string;
|
|
94
113
|
readonly occurred_at: string;
|
|
@@ -98,6 +117,39 @@ export interface EventLogPoint {
|
|
|
98
117
|
readonly min: number;
|
|
99
118
|
readonly max: number;
|
|
100
119
|
}
|
|
120
|
+
export interface AnalyticsWindowQuery {
|
|
121
|
+
view: "window";
|
|
122
|
+
period: "1h" | "1d" | "7d" | "1m";
|
|
123
|
+
previous: "previous_window" | "previous_1d" | "previous_7d" | "previous_1m";
|
|
124
|
+
}
|
|
125
|
+
export interface AnalyticsWindowData {
|
|
126
|
+
readonly current_value: number;
|
|
127
|
+
readonly current_count: number;
|
|
128
|
+
readonly previous_value: number;
|
|
129
|
+
readonly previous_count: number;
|
|
130
|
+
readonly value_delta: number;
|
|
131
|
+
readonly count_delta: number;
|
|
132
|
+
readonly value_pct_change: number;
|
|
133
|
+
readonly count_pct_change: number;
|
|
134
|
+
readonly current_mean: number;
|
|
135
|
+
readonly previous_mean: number;
|
|
136
|
+
readonly mean_delta: number;
|
|
137
|
+
readonly mean_pct_change: number;
|
|
138
|
+
readonly current_stddev: number;
|
|
139
|
+
readonly previous_stddev: number;
|
|
140
|
+
}
|
|
141
|
+
export interface AnalyticsWindowResponse {
|
|
142
|
+
readonly event_id: string;
|
|
143
|
+
readonly view: "window";
|
|
144
|
+
readonly period: "1h" | "1d" | "7d" | "1m";
|
|
145
|
+
readonly previous: "previous_window" | "previous_1d" | "previous_7d" | "previous_1m";
|
|
146
|
+
readonly data: AnalyticsWindowData | null;
|
|
147
|
+
}
|
|
148
|
+
export interface DestinationTestResult {
|
|
149
|
+
readonly alert_id: string;
|
|
150
|
+
readonly destination_id: string;
|
|
151
|
+
readonly status: string;
|
|
152
|
+
}
|
|
101
153
|
export interface PaginationOptions {
|
|
102
154
|
period?: "minute" | "hour" | "day";
|
|
103
155
|
limit?: number;
|
|
@@ -118,7 +170,6 @@ export declare class Client {
|
|
|
118
170
|
private logQueue;
|
|
119
171
|
private readonly batchSize;
|
|
120
172
|
private readonly flushDelay;
|
|
121
|
-
private readonly maxQueueSize;
|
|
122
173
|
private flushTimeoutId;
|
|
123
174
|
private readonly queueLock;
|
|
124
175
|
private readonly flushLock;
|
|
@@ -132,12 +183,16 @@ export declare class Client {
|
|
|
132
183
|
flush(): Promise<void>;
|
|
133
184
|
shutdown(): Promise<void>;
|
|
134
185
|
close(): Promise<void>;
|
|
135
|
-
listEvents(): Promise<
|
|
136
|
-
|
|
137
|
-
|
|
186
|
+
listEvents(): Promise<Event[]>;
|
|
187
|
+
createEvent(payload: CreateEventPayload): Promise<Event>;
|
|
188
|
+
getEvent(eventID: string): Promise<Event>;
|
|
189
|
+
updateEvent(eventID: string, payload: Partial<Omit<Event, "event_id" | "created_at">>): Promise<Event>;
|
|
138
190
|
listPolicies(): Promise<Policy[]>;
|
|
139
|
-
|
|
191
|
+
getPolicy(policyID: string): Promise<Policy>;
|
|
192
|
+
createPolicy(payload: CreatePolicyPayload): Promise<Policy>;
|
|
193
|
+
updatePolicy(policyID: string, payload: UpdatePolicyPayload): Promise<Policy>;
|
|
140
194
|
listAlerts(status?: string): Promise<Alert[]>;
|
|
195
|
+
getAlert(alertID: string): Promise<Alert>;
|
|
141
196
|
getAlertDeliveries(alertID: string, options?: {
|
|
142
197
|
limit?: number;
|
|
143
198
|
offset?: number;
|
|
@@ -145,8 +200,13 @@ export declare class Client {
|
|
|
145
200
|
}): Promise<AlertDelivery[]>;
|
|
146
201
|
acknowledgeAlert(alertID: string): Promise<Alert>;
|
|
147
202
|
archiveAlert(alertID: string): Promise<Alert>;
|
|
148
|
-
|
|
203
|
+
listDestinations(): Promise<Destination[]>;
|
|
204
|
+
createDestination(payload: CreateDestinationPayload): Promise<Destination>;
|
|
205
|
+
getDestination(destinationID: string): Promise<Destination>;
|
|
206
|
+
updateDestination(destinationID: string, payload: UpdateDestinationPayload): Promise<Destination>;
|
|
207
|
+
testDestination(destinationID: string): Promise<DestinationTestResult>;
|
|
149
208
|
getEventLogs(eventID: string, options?: PaginationOptions): Promise<EventLogPoint[]>;
|
|
209
|
+
getEventAnalytics(eventID: string, query: AnalyticsWindowQuery): Promise<AnalyticsWindowResponse>;
|
|
150
210
|
resolveAlert(alertID: string): Promise<Alert>;
|
|
151
211
|
}
|
|
152
212
|
export declare function createClient(config?: Config): Client;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,0BAAkB,QAAQ;IACxB,IAAI,IAAI;IACR,KAAK,IAAI;IACT,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,GAAG;IAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,0BAAkB,QA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