@rustrak/client 0.21.1 → 0.22.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/LICENSE +21 -674
- package/README.md +13 -4
- package/dist/generated/sdk.gen.cjs +185 -3
- package/dist/generated/sdk.gen.cjs.map +1 -1
- package/dist/generated/sdk.gen.d.cts +10 -1
- package/dist/generated/sdk.gen.d.cts.map +1 -1
- package/dist/generated/sdk.gen.d.mts +10 -1
- package/dist/generated/sdk.gen.d.mts.map +1 -1
- package/dist/generated/sdk.gen.mjs +186 -4
- package/dist/generated/sdk.gen.mjs.map +1 -1
- package/dist/generated/types.gen.d.cts +354 -1
- package/dist/generated/types.gen.d.cts.map +1 -1
- package/dist/generated/types.gen.d.mts +354 -1
- package/dist/generated/types.gen.d.mts.map +1 -1
- package/dist/generated/zod.gen.cjs +372 -13
- package/dist/generated/zod.gen.cjs.map +1 -1
- package/dist/generated/zod.gen.mjs +338 -14
- package/dist/generated/zod.gen.mjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<a href="https://bundlephobia.com/package/@rustrak/client">
|
|
16
16
|
<img src="https://img.shields.io/bundlephobia/minzip/@rustrak/client?style=flat-square&label=bundle" alt="bundle size" />
|
|
17
17
|
</a>
|
|
18
|
-
<a href="https://github.com/rustrak/rustrak/blob/main/LICENSE">
|
|
18
|
+
<a href="https://github.com/rustrak/rustrak/blob/main/packages/client/LICENSE">
|
|
19
19
|
<img src="https://img.shields.io/npm/l/@rustrak/client?style=flat-square" alt="license" />
|
|
20
20
|
</a>
|
|
21
21
|
<a href="https://github.com/rustrak/rustrak/actions/workflows/ci.yml">
|
|
@@ -230,6 +230,8 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
230
230
|
|
|
231
231
|
| Method | Endpoint | Description |
|
|
232
232
|
|---|---|---|
|
|
233
|
+
| `agents.conversation({ path })` | `GET /api/projects/{project_id}/agents/conversations/{conversation_id}` | Returns every AI span of a conversation's turns, oldest first, with its input and output. |
|
|
234
|
+
| `agents.conversations({ path, query? })` | `GET /api/projects/{project_id}/agents/conversations` | Lists conversations -- traces sharing a `gen_ai.conversation.id` -- the most recently active first. |
|
|
233
235
|
| `agents.duration({ path, query? })` | `GET /api/projects/{project_id}/agents/duration` | Time-bucketed avg/p95 duration for `agent`/`ai_client` spans. |
|
|
234
236
|
| `agents.environments({ path })` | `GET /api/projects/{project_id}/agents/environments` | The options the environment filter offers, read from the data rather than hardcoded — an installation may name its environments anything. |
|
|
235
237
|
| `agents.modelsCalls({ path, query? })` | `GET /api/projects/{project_id}/agents/models/calls` | Top models by LLM call count (`gen_ai.operation.type:ai_client`). |
|
|
@@ -260,6 +262,7 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
260
262
|
| `alertRules.create({ path, body })` | `POST /api/projects/{project_id}/alert-rules` | |
|
|
261
263
|
| `alertRules.delete({ path })` | `DELETE /api/projects/{project_id}/alert-rules/{rule_id}` | |
|
|
262
264
|
| `alertRules.get({ path })` | `GET /api/projects/{project_id}/alert-rules/{rule_id}` | |
|
|
265
|
+
| `alertRules.historyByDay({ path, query? })` | `GET /api/projects/{project_id}/alert-history/daily` | Count a project's alert deliveries per day, by outcome. |
|
|
263
266
|
| `alertRules.list({ path })` | `GET /api/projects/{project_id}/alert-rules` | |
|
|
264
267
|
| `alertRules.listHistory({ path, query? })` | `GET /api/projects/{project_id}/alert-history` | |
|
|
265
268
|
| `alertRules.update({ path, body })` | `PATCH /api/projects/{project_id}/alert-rules/{rule_id}` | |
|
|
@@ -358,7 +361,9 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
358
361
|
|
|
359
362
|
| Method | Endpoint | Description |
|
|
360
363
|
|---|---|---|
|
|
361
|
-
| `logs.
|
|
364
|
+
| `logs.get({ path })` | `GET /api/projects/{project_id}/logs/{log_id}` | Returns one of a project's logs, wherever it falls in the list. |
|
|
365
|
+
| `logs.list({ path, query? })` | `GET /api/projects/{project_id}/logs` | Lists logs for a project with offset-based pagination (newest first by log timestamp), optionally filtered by level, trace id, message and window. |
|
|
366
|
+
| `logs.volume({ path, query? })` | `GET /api/projects/{project_id}/logs/volume` | Counts a project's logs per level over time, with the list's filters. |
|
|
362
367
|
|
|
363
368
|
### Members
|
|
364
369
|
|
|
@@ -377,6 +382,7 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
377
382
|
| `monitors.get({ path })` | `GET /api/projects/{project_id}/monitors/{slug}` | |
|
|
378
383
|
| `monitors.list({ path })` | `GET /api/projects/{project_id}/monitors` | |
|
|
379
384
|
| `monitors.listCheckins({ path, query? })` | `GET /api/projects/{project_id}/monitors/{slug}/checkins` | |
|
|
385
|
+
| `monitors.stats({ path, query? })` | `GET /api/projects/{project_id}/monitor-stats` | Counts the check-ins of a project's monitors by status over a window, bucket by bucket. |
|
|
380
386
|
| `monitors.update({ path, body })` | `PUT /api/projects/{project_id}/monitors/{slug}` | |
|
|
381
387
|
|
|
382
388
|
### OAuth
|
|
@@ -405,6 +411,8 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
405
411
|
|---|---|---|
|
|
406
412
|
| `releases.create({ path, body })` | `POST /api/0/projects/{org_slug}/{project_slug}/releases/` | Sentry-compatible release creation. |
|
|
407
413
|
| `releases.finalize({ path, body })` | `PUT /api/0/projects/{org_slug}/{project_slug}/releases/{version}/` | Generic partial update (`ref`, `url`, `dateReleased`). |
|
|
414
|
+
| `releases.get({ path, query? })` | `GET /api/projects/{project_id}/releases/{release}` | Gets one release with its events, new issues, environments and session health. |
|
|
415
|
+
| `releases.list({ path, query? })` | `GET /api/projects/{project_id}/releases` | Lists a project's releases, newest first, with the events, new issues, environments and session health of each. |
|
|
408
416
|
| `releases.newIssues({ path, query? })` | `GET /api/projects/{project_id}/releases/{release}/new-issues` | |
|
|
409
417
|
|
|
410
418
|
### Schedules
|
|
@@ -517,7 +525,8 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
517
525
|
| `transactions.get({ path })` | `GET /api/projects/{project_id}/transactions/{transaction_id}` | Returns a single transaction with its full Sentry payload (spans, contexts, measurements, tags) for the performance detail view. |
|
|
518
526
|
| `transactions.getSpans({ path })` | `GET /api/projects/{project_id}/transactions/{transaction_id}/spans` | Returns the indexed spans extracted from a transaction, ordered for the waterfall view (by start_timestamp ascending). |
|
|
519
527
|
| `transactions.getStatGroup({ path, query })` | `GET /api/projects/{project_id}/transactions/stats/group` | Returns the aggregate stats for a single transaction group — a direct lookup so the summary header works regardless of how many groups the project has. |
|
|
520
|
-
| `transactions.
|
|
528
|
+
| `transactions.getStatGroupTimeseries({ path, query })` | `GET /api/projects/{project_id}/transactions/stats/group/timeseries` | Returns one endpoint's trend over the window, every bucket present: how often it ran and failed, and its p50 and p95. |
|
|
529
|
+
| `transactions.getStats({ path, query? })` | `GET /api/projects/{project_id}/transactions/stats` | Returns paginated aggregate performance stats (count, time spent, p50/p95/p99 latency, failure rate) grouped by transaction name + op, the most time spent first unless `sort` asks otherwise. |
|
|
521
530
|
| `transactions.list({ path, query? })` | `GET /api/projects/{project_id}/transactions` | Lists transactions for a project with offset-based pagination (newest first). |
|
|
522
531
|
|
|
523
532
|
<!-- api:end -->
|
|
@@ -539,4 +548,4 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
539
548
|
|
|
540
549
|
## License
|
|
541
550
|
|
|
542
|
-
[
|
|
551
|
+
[MIT](LICENSE)
|
|
@@ -462,6 +462,46 @@ var Releases = class extends HeyApiClient {
|
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
464
|
/**
|
|
465
|
+
* Lists a project's releases, newest first, with the events, new issues,
|
|
466
|
+
* environments and session health of each.
|
|
467
|
+
*/
|
|
468
|
+
list(options) {
|
|
469
|
+
return (options.client ?? this.client).get({
|
|
470
|
+
requestValidator: async (data) => await zod.object({
|
|
471
|
+
body: zod.never().optional(),
|
|
472
|
+
path: require_zod_gen.zReleasesListPath,
|
|
473
|
+
query: require_zod_gen.zReleasesListQuery.optional()
|
|
474
|
+
}).parseAsync(data),
|
|
475
|
+
responseValidator: async (data) => await require_zod_gen.zReleasesListResponse.parseAsync(data),
|
|
476
|
+
security: [{
|
|
477
|
+
scheme: "bearer",
|
|
478
|
+
type: "http"
|
|
479
|
+
}],
|
|
480
|
+
url: "/api/projects/{project_id}/releases",
|
|
481
|
+
...options
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Gets one release with its events, new issues, environments and session
|
|
486
|
+
* health.
|
|
487
|
+
*/
|
|
488
|
+
get(options) {
|
|
489
|
+
return (options.client ?? this.client).get({
|
|
490
|
+
requestValidator: async (data) => await zod.object({
|
|
491
|
+
body: zod.never().optional(),
|
|
492
|
+
path: require_zod_gen.zReleasesGetPath,
|
|
493
|
+
query: require_zod_gen.zReleasesGetQuery.optional()
|
|
494
|
+
}).parseAsync(data),
|
|
495
|
+
responseValidator: async (data) => await require_zod_gen.zReleasesGetResponse.parseAsync(data),
|
|
496
|
+
security: [{
|
|
497
|
+
scheme: "bearer",
|
|
498
|
+
type: "http"
|
|
499
|
+
}],
|
|
500
|
+
url: "/api/projects/{project_id}/releases/{release}",
|
|
501
|
+
...options
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
465
505
|
* GET /api/projects/{project_id}/releases/{release}/new-issues
|
|
466
506
|
*/
|
|
467
507
|
newIssues(options) {
|
|
@@ -1246,6 +1286,46 @@ var Projects = class extends HeyApiClient {
|
|
|
1246
1286
|
}
|
|
1247
1287
|
};
|
|
1248
1288
|
var Agents = class extends HeyApiClient {
|
|
1289
|
+
/**
|
|
1290
|
+
* GET /api/projects/{project_id}/agents/conversations
|
|
1291
|
+
* Lists conversations -- traces sharing a `gen_ai.conversation.id` -- the most recently active first.
|
|
1292
|
+
*/
|
|
1293
|
+
conversations(options) {
|
|
1294
|
+
return (options.client ?? this.client).get({
|
|
1295
|
+
requestValidator: async (data) => await zod.object({
|
|
1296
|
+
body: zod.never().optional(),
|
|
1297
|
+
path: require_zod_gen.zAgentsConversationsPath,
|
|
1298
|
+
query: require_zod_gen.zAgentsConversationsQuery.optional()
|
|
1299
|
+
}).parseAsync(data),
|
|
1300
|
+
responseValidator: async (data) => await require_zod_gen.zAgentsConversationsResponse.parseAsync(data),
|
|
1301
|
+
security: [{
|
|
1302
|
+
scheme: "bearer",
|
|
1303
|
+
type: "http"
|
|
1304
|
+
}],
|
|
1305
|
+
url: "/api/projects/{project_id}/agents/conversations",
|
|
1306
|
+
...options
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* GET /api/projects/{project_id}/agents/conversations/{conversation_id}
|
|
1311
|
+
* Returns every AI span of a conversation's turns, oldest first, with its input and output.
|
|
1312
|
+
*/
|
|
1313
|
+
conversation(options) {
|
|
1314
|
+
return (options.client ?? this.client).get({
|
|
1315
|
+
requestValidator: async (data) => await zod.object({
|
|
1316
|
+
body: zod.never().optional(),
|
|
1317
|
+
path: require_zod_gen.zAgentsConversationPath,
|
|
1318
|
+
query: zod.never().optional()
|
|
1319
|
+
}).parseAsync(data),
|
|
1320
|
+
responseValidator: async (data) => await require_zod_gen.zAgentsConversationResponse.parseAsync(data),
|
|
1321
|
+
security: [{
|
|
1322
|
+
scheme: "bearer",
|
|
1323
|
+
type: "http"
|
|
1324
|
+
}],
|
|
1325
|
+
url: "/api/projects/{project_id}/agents/conversations/{conversation_id}",
|
|
1326
|
+
...options
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1249
1329
|
/**
|
|
1250
1330
|
* GET /api/projects/{project_id}/agents/duration
|
|
1251
1331
|
* Time-bucketed avg/p95 duration for `agent`/`ai_client` spans.
|
|
@@ -1469,6 +1549,25 @@ var AlertRules = class extends HeyApiClient {
|
|
|
1469
1549
|
});
|
|
1470
1550
|
}
|
|
1471
1551
|
/**
|
|
1552
|
+
* Count a project's alert deliveries per day, by outcome.
|
|
1553
|
+
*/
|
|
1554
|
+
historyByDay(options) {
|
|
1555
|
+
return (options.client ?? this.client).get({
|
|
1556
|
+
requestValidator: async (data) => await zod.object({
|
|
1557
|
+
body: zod.never().optional(),
|
|
1558
|
+
path: require_zod_gen.zAlertRulesHistoryByDayPath,
|
|
1559
|
+
query: require_zod_gen.zAlertRulesHistoryByDayQuery.optional()
|
|
1560
|
+
}).parseAsync(data),
|
|
1561
|
+
responseValidator: async (data) => await require_zod_gen.zAlertRulesHistoryByDayResponse.parseAsync(data),
|
|
1562
|
+
security: [{
|
|
1563
|
+
scheme: "bearer",
|
|
1564
|
+
type: "http"
|
|
1565
|
+
}],
|
|
1566
|
+
url: "/api/projects/{project_id}/alert-history/daily",
|
|
1567
|
+
...options
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1472
1571
|
* GET /api/projects/{project_id}/alert-rules
|
|
1473
1572
|
*/
|
|
1474
1573
|
list(options) {
|
|
@@ -2123,7 +2222,7 @@ var Logs = class extends HeyApiClient {
|
|
|
2123
2222
|
/**
|
|
2124
2223
|
* GET /api/projects/{project_id}/logs
|
|
2125
2224
|
* Lists logs for a project with offset-based pagination (newest first by
|
|
2126
|
-
* log timestamp), optionally filtered by level
|
|
2225
|
+
* log timestamp), optionally filtered by level, trace id, message and window.
|
|
2127
2226
|
*/
|
|
2128
2227
|
list(options) {
|
|
2129
2228
|
return (options.client ?? this.client).get({
|
|
@@ -2141,6 +2240,46 @@ var Logs = class extends HeyApiClient {
|
|
|
2141
2240
|
...options
|
|
2142
2241
|
});
|
|
2143
2242
|
}
|
|
2243
|
+
/**
|
|
2244
|
+
* GET /api/projects/{project_id}/logs/volume
|
|
2245
|
+
* Counts a project's logs per level over time, with the list's filters.
|
|
2246
|
+
*/
|
|
2247
|
+
volume(options) {
|
|
2248
|
+
return (options.client ?? this.client).get({
|
|
2249
|
+
requestValidator: async (data) => await zod.object({
|
|
2250
|
+
body: zod.never().optional(),
|
|
2251
|
+
path: require_zod_gen.zLogsVolumePath,
|
|
2252
|
+
query: require_zod_gen.zLogsVolumeQuery.optional()
|
|
2253
|
+
}).parseAsync(data),
|
|
2254
|
+
responseValidator: async (data) => await require_zod_gen.zLogsVolumeResponse.parseAsync(data),
|
|
2255
|
+
security: [{
|
|
2256
|
+
scheme: "bearer",
|
|
2257
|
+
type: "http"
|
|
2258
|
+
}],
|
|
2259
|
+
url: "/api/projects/{project_id}/logs/volume",
|
|
2260
|
+
...options
|
|
2261
|
+
});
|
|
2262
|
+
}
|
|
2263
|
+
/**
|
|
2264
|
+
* GET /api/projects/{project_id}/logs/{log_id}
|
|
2265
|
+
* Returns one of a project's logs, wherever it falls in the list.
|
|
2266
|
+
*/
|
|
2267
|
+
get(options) {
|
|
2268
|
+
return (options.client ?? this.client).get({
|
|
2269
|
+
requestValidator: async (data) => await zod.object({
|
|
2270
|
+
body: zod.never().optional(),
|
|
2271
|
+
path: require_zod_gen.zLogsGetPath,
|
|
2272
|
+
query: zod.never().optional()
|
|
2273
|
+
}).parseAsync(data),
|
|
2274
|
+
responseValidator: async (data) => await require_zod_gen.zLogsGetResponse.parseAsync(data),
|
|
2275
|
+
security: [{
|
|
2276
|
+
scheme: "bearer",
|
|
2277
|
+
type: "http"
|
|
2278
|
+
}],
|
|
2279
|
+
url: "/api/projects/{project_id}/logs/{log_id}",
|
|
2280
|
+
...options
|
|
2281
|
+
});
|
|
2282
|
+
}
|
|
2144
2283
|
};
|
|
2145
2284
|
var Members = class extends HeyApiClient {
|
|
2146
2285
|
/**
|
|
@@ -2206,6 +2345,26 @@ var Members = class extends HeyApiClient {
|
|
|
2206
2345
|
}
|
|
2207
2346
|
};
|
|
2208
2347
|
var Monitors = class extends HeyApiClient {
|
|
2348
|
+
/**
|
|
2349
|
+
* GET /api/projects/{project_id}/monitor-stats
|
|
2350
|
+
* Counts the check-ins of a project's monitors by status over a window, bucket by bucket.
|
|
2351
|
+
*/
|
|
2352
|
+
stats(options) {
|
|
2353
|
+
return (options.client ?? this.client).get({
|
|
2354
|
+
requestValidator: async (data) => await zod.object({
|
|
2355
|
+
body: zod.never().optional(),
|
|
2356
|
+
path: require_zod_gen.zMonitorsStatsPath,
|
|
2357
|
+
query: require_zod_gen.zMonitorsStatsQuery.optional()
|
|
2358
|
+
}).parseAsync(data),
|
|
2359
|
+
responseValidator: async (data) => await require_zod_gen.zMonitorsStatsResponse.parseAsync(data),
|
|
2360
|
+
security: [{
|
|
2361
|
+
scheme: "bearer",
|
|
2362
|
+
type: "http"
|
|
2363
|
+
}],
|
|
2364
|
+
url: "/api/projects/{project_id}/monitor-stats",
|
|
2365
|
+
...options
|
|
2366
|
+
});
|
|
2367
|
+
}
|
|
2209
2368
|
/**
|
|
2210
2369
|
* GET /api/projects/{project_id}/monitors
|
|
2211
2370
|
*/
|
|
@@ -2459,8 +2618,9 @@ var Transactions = class extends HeyApiClient {
|
|
|
2459
2618
|
}
|
|
2460
2619
|
/**
|
|
2461
2620
|
* GET /api/projects/{project_id}/transactions/stats
|
|
2462
|
-
* Returns paginated aggregate performance stats (count, p50/p95/p99
|
|
2463
|
-
* failure rate) grouped by transaction name + op, most
|
|
2621
|
+
* Returns paginated aggregate performance stats (count, time spent, p50/p95/p99
|
|
2622
|
+
* latency, failure rate) grouped by transaction name + op, the most time spent
|
|
2623
|
+
* first unless `sort` asks otherwise.
|
|
2464
2624
|
*/
|
|
2465
2625
|
getStats(options) {
|
|
2466
2626
|
return (options.client ?? this.client).get({
|
|
@@ -2500,6 +2660,28 @@ var Transactions = class extends HeyApiClient {
|
|
|
2500
2660
|
});
|
|
2501
2661
|
}
|
|
2502
2662
|
/**
|
|
2663
|
+
* Returns one endpoint's trend over the window, every bucket present:
|
|
2664
|
+
* how often it ran and failed, and its p50 and p95. Without a window, back
|
|
2665
|
+
* to its oldest call and never less than the last 24 hours, which is also
|
|
2666
|
+
* what an endpoint with no calls gets.
|
|
2667
|
+
*/
|
|
2668
|
+
getStatGroupTimeseries(options) {
|
|
2669
|
+
return (options.client ?? this.client).get({
|
|
2670
|
+
requestValidator: async (data) => await zod.object({
|
|
2671
|
+
body: zod.never().optional(),
|
|
2672
|
+
path: require_zod_gen.zTransactionsGetStatGroupTimeseriesPath,
|
|
2673
|
+
query: require_zod_gen.zTransactionsGetStatGroupTimeseriesQuery
|
|
2674
|
+
}).parseAsync(data),
|
|
2675
|
+
responseValidator: async (data) => await require_zod_gen.zTransactionsGetStatGroupTimeseriesResponse.parseAsync(data),
|
|
2676
|
+
security: [{
|
|
2677
|
+
scheme: "bearer",
|
|
2678
|
+
type: "http"
|
|
2679
|
+
}],
|
|
2680
|
+
url: "/api/projects/{project_id}/transactions/stats/group/timeseries",
|
|
2681
|
+
...options
|
|
2682
|
+
});
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2503
2685
|
* GET /api/projects/{project_id}/transactions/{transaction_id}
|
|
2504
2686
|
* Returns a single transaction with its full Sentry payload (spans, contexts,
|
|
2505
2687
|
* measurements, tags) for the performance detail view.
|