@rustrak/client 0.23.0 → 0.25.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 +29 -13
- package/dist/generated/sdk.gen.cjs +285 -22
- package/dist/generated/sdk.gen.cjs.map +1 -1
- package/dist/generated/sdk.gen.d.cts +24 -1
- package/dist/generated/sdk.gen.d.cts.map +1 -1
- package/dist/generated/sdk.gen.d.mts +24 -1
- package/dist/generated/sdk.gen.d.mts.map +1 -1
- package/dist/generated/sdk.gen.mjs +284 -24
- package/dist/generated/sdk.gen.mjs.map +1 -1
- package/dist/generated/types.gen.d.cts +310 -26
- package/dist/generated/types.gen.d.cts.map +1 -1
- package/dist/generated/types.gen.d.mts +310 -26
- package/dist/generated/types.gen.d.mts.map +1 -1
- package/dist/generated/zod.gen.cjs +313 -71
- package/dist/generated/zod.gen.cjs.map +1 -1
- package/dist/generated/zod.gen.mjs +273 -69
- 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 +1 -1
package/README.md
CHANGED
|
@@ -226,6 +226,19 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
226
226
|
<!-- api:start -->
|
|
227
227
|
<!-- Generated by `pnpm generate` from openapi.json. Do not edit by hand. -->
|
|
228
228
|
|
|
229
|
+
### Access
|
|
230
|
+
|
|
231
|
+
| Method | Endpoint | Description |
|
|
232
|
+
|---|---|---|
|
|
233
|
+
| `access.catalog()` | `GET /api/access/catalog` | Lists every resource a permission can name, with its module, scope and actions. |
|
|
234
|
+
| `access.me()` | `GET /api/access/me` | Returns what the caller may do, on the instance and on each project. |
|
|
235
|
+
| `roles.create({ body })` | `POST /api/roles` | Creates a role from permissions the caller holds themselves. |
|
|
236
|
+
| `roles.delete({ path })` | `DELETE /api/roles/{id}` | Deletes a role nobody holds. |
|
|
237
|
+
| `roles.list()` | `GET /api/roles` | Lists every role with its permissions and how often it is assigned. |
|
|
238
|
+
| `roles.update({ path, body })` | `PUT /api/roles/{id}` | Replaces a role's name, description and permissions. |
|
|
239
|
+
| `users.assignments({ path })` | `GET /api/users/{id}/assignments` | Lists the roles a user holds, on the instance and on each project. |
|
|
240
|
+
| `users.setAssignments({ path, body })` | `PUT /api/users/{id}/assignments` | Replaces every role and personal permission a user holds. |
|
|
241
|
+
|
|
229
242
|
### Agents
|
|
230
243
|
|
|
231
244
|
| Method | Endpoint | Description |
|
|
@@ -250,7 +263,7 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
250
263
|
| `alertChannels.create({ body })` | `POST /api/integrations` | |
|
|
251
264
|
| `alertChannels.delete({ path })` | `DELETE /api/integrations/{id}` | |
|
|
252
265
|
| `alertChannels.get({ path })` | `GET /api/integrations/{id}` | |
|
|
253
|
-
| `alertChannels.list()` | `GET /api/integrations` |
|
|
266
|
+
| `alertChannels.list()` | `GET /api/integrations` | Lists the channels alerts can go through. |
|
|
254
267
|
| `alertChannels.previewTemplate({ body })` | `POST /api/integrations/preview-template` | Renders a Custom Webhook template against a sample payload and hands back the body that would be sent. |
|
|
255
268
|
| `alertChannels.test({ path, body })` | `POST /api/integrations/{id}/test` | |
|
|
256
269
|
| `alertChannels.update({ path, body })` | `PATCH /api/integrations/{id}` | |
|
|
@@ -331,9 +344,11 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
331
344
|
|
|
332
345
|
| Method | Endpoint | Description |
|
|
333
346
|
|---|---|---|
|
|
334
|
-
| `invitations.create({ body })` | `POST /api/invitations` | Create an invitation (
|
|
335
|
-
| `invitations.
|
|
336
|
-
| `invitations.
|
|
347
|
+
| `invitations.create({ body })` | `POST /api/invitations` | Create an invitation (needs `invitations:create`) |
|
|
348
|
+
| `invitations.emailStatus()` | `GET /api/invitations/email-status` | Whether invitation emails can be sent (needs `invitations:read`) |
|
|
349
|
+
| `invitations.list()` | `GET /api/invitations` | List invitations (needs `invitations:read`) |
|
|
350
|
+
| `invitations.resend({ path })` | `POST /api/invitations/{id}/resend` | Email the invite link again (needs `invitations:create`) |
|
|
351
|
+
| `invitations.revoke({ path })` | `DELETE /api/invitations/{id}` | Revoke a pending invitation (needs `invitations:delete`) |
|
|
337
352
|
|
|
338
353
|
### Issues
|
|
339
354
|
|
|
@@ -371,9 +386,10 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
371
386
|
|
|
372
387
|
| Method | Endpoint | Description |
|
|
373
388
|
|---|---|---|
|
|
374
|
-
| `members.
|
|
375
|
-
| `members.
|
|
376
|
-
| `members.
|
|
389
|
+
| `members.candidates({ path })` | `GET /api/projects/{project_id}/members/candidates` | Lists the people and the roles the caller can give on the project, so it takes neither `users:read` nor `roles:read` to manage its members. |
|
|
390
|
+
| `members.list({ path })` | `GET /api/projects/{project_id}/members` | Lists everyone holding a role on the project, with those roles; personal permissions are not roles. |
|
|
391
|
+
| `members.remove({ path })` | `DELETE /api/projects/{project_id}/members/{user_id}` | Removes the roles a user holds on this project; roles on all projects and personal permissions stay. |
|
|
392
|
+
| `members.upsert({ path, body })` | `PUT /api/projects/{project_id}/members` | Sets the roles a user holds on the project. |
|
|
377
393
|
|
|
378
394
|
### Monitors
|
|
379
395
|
|
|
@@ -450,7 +466,7 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
450
466
|
| Method | Endpoint | Description |
|
|
451
467
|
|---|---|---|
|
|
452
468
|
| `settings.getMcp()` | `GET /api/settings/mcp` | Whether the MCP endpoint at `/mcp` is on. |
|
|
453
|
-
| `settings.updateMcp({ body })` | `PUT /api/settings/mcp` | Turns the MCP endpoint at `/mcp` on or off. |
|
|
469
|
+
| `settings.updateMcp({ body })` | `PUT /api/settings/mcp` | Turns the MCP endpoint at `/mcp` on or off (needs `mcp:update`). |
|
|
454
470
|
|
|
455
471
|
### Source Maps
|
|
456
472
|
|
|
@@ -501,9 +517,9 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
501
517
|
|
|
502
518
|
| Method | Endpoint | Description |
|
|
503
519
|
|---|---|---|
|
|
504
|
-
| `team.deleteUser({ path })` | `DELETE /api/team/{user_id}` | Remove a user from the instance (
|
|
505
|
-
| `team.list()` | `GET /api/team` | List all users (
|
|
506
|
-
| `team.updateRole({ path, body })` | `PATCH /api/team/{user_id}/role` | Change a user's global role (
|
|
520
|
+
| `team.deleteUser({ path })` | `DELETE /api/team/{user_id}` | Remove a user from the instance (needs `users:delete`) |
|
|
521
|
+
| `team.list()` | `GET /api/team` | List all users (needs `users:read`) |
|
|
522
|
+
| `team.updateRole({ path, body })` | `PATCH /api/team/{user_id}/role` | Change a user's global role (needs `users:update`) |
|
|
507
523
|
|
|
508
524
|
### Telemetry
|
|
509
525
|
|
|
@@ -515,9 +531,9 @@ Every method, grouped as it hangs off the client (`client.issues.list(...)`).
|
|
|
515
531
|
|
|
516
532
|
| Method | Endpoint | Description |
|
|
517
533
|
|---|---|---|
|
|
518
|
-
| `tokens.create({ body })` | `POST /api/tokens` | Create a new token (
|
|
534
|
+
| `tokens.create({ body })` | `POST /api/tokens` | Create a new token (from a signed-in session only) |
|
|
519
535
|
| `tokens.delete({ path })` | `DELETE /api/tokens/{id}` | Revoke a token |
|
|
520
|
-
| `tokens.get({ path })` | `GET /api/tokens/{id}` |
|
|
536
|
+
| `tokens.get({ path })` | `GET /api/tokens/{id}` | Token details, masked |
|
|
521
537
|
| `tokens.list()` | `GET /api/tokens` | List tokens (masked) |
|
|
522
538
|
|
|
523
539
|
### Transactions
|
|
@@ -521,6 +521,46 @@ var Releases = class extends HeyApiClient {
|
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
};
|
|
524
|
+
var Access = class extends HeyApiClient {
|
|
525
|
+
/**
|
|
526
|
+
* Lists every resource a permission can name, with its module, scope and actions.
|
|
527
|
+
*/
|
|
528
|
+
catalog(options) {
|
|
529
|
+
return (options?.client ?? this.client).get({
|
|
530
|
+
requestValidator: async (data) => await zod.object({
|
|
531
|
+
body: zod.never().optional(),
|
|
532
|
+
path: zod.never().optional(),
|
|
533
|
+
query: zod.never().optional()
|
|
534
|
+
}).parseAsync(data),
|
|
535
|
+
responseValidator: async (data) => await require_zod_gen.zAccessCatalogResponse.parseAsync(data),
|
|
536
|
+
security: [{
|
|
537
|
+
scheme: "bearer",
|
|
538
|
+
type: "http"
|
|
539
|
+
}],
|
|
540
|
+
url: "/api/access/catalog",
|
|
541
|
+
...options
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Returns what the caller may do, on the instance and on each project.
|
|
546
|
+
*/
|
|
547
|
+
me(options) {
|
|
548
|
+
return (options?.client ?? this.client).get({
|
|
549
|
+
requestValidator: async (data) => await zod.object({
|
|
550
|
+
body: zod.never().optional(),
|
|
551
|
+
path: zod.never().optional(),
|
|
552
|
+
query: zod.never().optional()
|
|
553
|
+
}).parseAsync(data),
|
|
554
|
+
responseValidator: async (data) => await require_zod_gen.zAccessMeResponse.parseAsync(data),
|
|
555
|
+
security: [{
|
|
556
|
+
scheme: "bearer",
|
|
557
|
+
type: "http"
|
|
558
|
+
}],
|
|
559
|
+
url: "/api/access/me",
|
|
560
|
+
...options
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
};
|
|
524
564
|
var Github = class extends HeyApiClient {
|
|
525
565
|
/**
|
|
526
566
|
* DELETE /api/github
|
|
@@ -917,7 +957,12 @@ var Github = class extends HeyApiClient {
|
|
|
917
957
|
};
|
|
918
958
|
var AlertChannels = class extends HeyApiClient {
|
|
919
959
|
/**
|
|
920
|
-
*
|
|
960
|
+
* Lists the channels alerts can go through.
|
|
961
|
+
*
|
|
962
|
+
* `integrations:read` sees their credentials masked, `integrations:update` in
|
|
963
|
+
* full. Holding an alert-rules permission on any project is enough for the
|
|
964
|
+
* rest, without them: choosing where a rule notifies takes a channel's name,
|
|
965
|
+
* not its secrets.
|
|
921
966
|
*/
|
|
922
967
|
list(options) {
|
|
923
968
|
return (options?.client ?? this.client).get({
|
|
@@ -1073,7 +1118,7 @@ var AlertChannels = class extends HeyApiClient {
|
|
|
1073
1118
|
};
|
|
1074
1119
|
var Invitations = class extends HeyApiClient {
|
|
1075
1120
|
/**
|
|
1076
|
-
* GET /api/invitations — list invitations (
|
|
1121
|
+
* GET /api/invitations — list invitations (needs `invitations:read`)
|
|
1077
1122
|
*/
|
|
1078
1123
|
list(options) {
|
|
1079
1124
|
return (options?.client ?? this.client).get({
|
|
@@ -1092,7 +1137,11 @@ var Invitations = class extends HeyApiClient {
|
|
|
1092
1137
|
});
|
|
1093
1138
|
}
|
|
1094
1139
|
/**
|
|
1095
|
-
* POST /api/invitations — create an invitation (
|
|
1140
|
+
* POST /api/invitations — create an invitation (needs `invitations:create`)
|
|
1141
|
+
*
|
|
1142
|
+
* With `send_email: true` the invite link is also emailed. A failed send
|
|
1143
|
+
* still creates the invitation, with `email_sent_at: null`, so its link can
|
|
1144
|
+
* be shared by hand or the email resent.
|
|
1096
1145
|
*/
|
|
1097
1146
|
create(options) {
|
|
1098
1147
|
return (options.client ?? this.client).post({
|
|
@@ -1115,7 +1164,26 @@ var Invitations = class extends HeyApiClient {
|
|
|
1115
1164
|
});
|
|
1116
1165
|
}
|
|
1117
1166
|
/**
|
|
1118
|
-
*
|
|
1167
|
+
* GET /api/invitations/email-status — whether invitation emails can be sent (needs `invitations:read`)
|
|
1168
|
+
*/
|
|
1169
|
+
emailStatus(options) {
|
|
1170
|
+
return (options?.client ?? this.client).get({
|
|
1171
|
+
requestValidator: async (data) => await zod.object({
|
|
1172
|
+
body: zod.never().optional(),
|
|
1173
|
+
path: zod.never().optional(),
|
|
1174
|
+
query: zod.never().optional()
|
|
1175
|
+
}).parseAsync(data),
|
|
1176
|
+
responseValidator: async (data) => await require_zod_gen.zInvitationsEmailStatusResponse.parseAsync(data),
|
|
1177
|
+
security: [{
|
|
1178
|
+
scheme: "bearer",
|
|
1179
|
+
type: "http"
|
|
1180
|
+
}],
|
|
1181
|
+
url: "/api/invitations/email-status",
|
|
1182
|
+
...options
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* DELETE /api/invitations/{id} — revoke a pending invitation (needs `invitations:delete`)
|
|
1119
1187
|
*/
|
|
1120
1188
|
revoke(options) {
|
|
1121
1189
|
return (options.client ?? this.client).delete({
|
|
@@ -1129,7 +1197,26 @@ var Invitations = class extends HeyApiClient {
|
|
|
1129
1197
|
scheme: "bearer",
|
|
1130
1198
|
type: "http"
|
|
1131
1199
|
}],
|
|
1132
|
-
url: "/api/invitations/{
|
|
1200
|
+
url: "/api/invitations/{id}",
|
|
1201
|
+
...options
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* POST /api/invitations/{id}/resend — email the invite link again (needs `invitations:create`)
|
|
1206
|
+
*/
|
|
1207
|
+
resend(options) {
|
|
1208
|
+
return (options.client ?? this.client).post({
|
|
1209
|
+
requestValidator: async (data) => await zod.object({
|
|
1210
|
+
body: zod.never().optional(),
|
|
1211
|
+
path: require_zod_gen.zInvitationsResendPath,
|
|
1212
|
+
query: zod.never().optional()
|
|
1213
|
+
}).parseAsync(data),
|
|
1214
|
+
responseValidator: async (data) => await require_zod_gen.zInvitationsResendResponse.parseAsync(data),
|
|
1215
|
+
security: [{
|
|
1216
|
+
scheme: "bearer",
|
|
1217
|
+
type: "http"
|
|
1218
|
+
}],
|
|
1219
|
+
url: "/api/invitations/{id}/resend",
|
|
1133
1220
|
...options
|
|
1134
1221
|
});
|
|
1135
1222
|
}
|
|
@@ -1204,7 +1291,7 @@ var Projects = class extends HeyApiClient {
|
|
|
1204
1291
|
/**
|
|
1205
1292
|
* GET /api/projects - List projects with pagination
|
|
1206
1293
|
*
|
|
1207
|
-
*
|
|
1294
|
+
* Only the projects the caller holds a permission on.
|
|
1208
1295
|
*/
|
|
1209
1296
|
list(options) {
|
|
1210
1297
|
return (options?.client ?? this.client).get({
|
|
@@ -1225,8 +1312,9 @@ var Projects = class extends HeyApiClient {
|
|
|
1225
1312
|
/**
|
|
1226
1313
|
* POST /api/projects - Create a new project
|
|
1227
1314
|
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1315
|
+
* Needs `projects:create` and a permission on at least one project, because
|
|
1316
|
+
* the creator's own roles extend to the new one. A token limited to chosen
|
|
1317
|
+
* projects can create one, but its list does not grow to reach it.
|
|
1230
1318
|
*/
|
|
1231
1319
|
create(options) {
|
|
1232
1320
|
return (options.client ?? this.client).post({
|
|
@@ -2327,7 +2415,7 @@ var Logs = class extends HeyApiClient {
|
|
|
2327
2415
|
};
|
|
2328
2416
|
var Members = class extends HeyApiClient {
|
|
2329
2417
|
/**
|
|
2330
|
-
*
|
|
2418
|
+
* Lists everyone holding a role on the project, with those roles; personal permissions are not roles.
|
|
2331
2419
|
*/
|
|
2332
2420
|
list(options) {
|
|
2333
2421
|
return (options.client ?? this.client).get({
|
|
@@ -2346,7 +2434,7 @@ var Members = class extends HeyApiClient {
|
|
|
2346
2434
|
});
|
|
2347
2435
|
}
|
|
2348
2436
|
/**
|
|
2349
|
-
*
|
|
2437
|
+
* Sets the roles a user holds on the project.
|
|
2350
2438
|
*/
|
|
2351
2439
|
upsert(options) {
|
|
2352
2440
|
return (options.client ?? this.client).put({
|
|
@@ -2369,7 +2457,26 @@ var Members = class extends HeyApiClient {
|
|
|
2369
2457
|
});
|
|
2370
2458
|
}
|
|
2371
2459
|
/**
|
|
2372
|
-
*
|
|
2460
|
+
* Lists the people and the roles the caller can give on the project, so it takes neither `users:read` nor `roles:read` to manage its members.
|
|
2461
|
+
*/
|
|
2462
|
+
candidates(options) {
|
|
2463
|
+
return (options.client ?? this.client).get({
|
|
2464
|
+
requestValidator: async (data) => await zod.object({
|
|
2465
|
+
body: zod.never().optional(),
|
|
2466
|
+
path: require_zod_gen.zMembersCandidatesPath,
|
|
2467
|
+
query: zod.never().optional()
|
|
2468
|
+
}).parseAsync(data),
|
|
2469
|
+
responseValidator: async (data) => await require_zod_gen.zMembersCandidatesResponse.parseAsync(data),
|
|
2470
|
+
security: [{
|
|
2471
|
+
scheme: "bearer",
|
|
2472
|
+
type: "http"
|
|
2473
|
+
}],
|
|
2474
|
+
url: "/api/projects/{project_id}/members/candidates",
|
|
2475
|
+
...options
|
|
2476
|
+
});
|
|
2477
|
+
}
|
|
2478
|
+
/**
|
|
2479
|
+
* Removes the roles a user holds on this project; roles on all projects and personal permissions stay.
|
|
2373
2480
|
*/
|
|
2374
2481
|
remove(options) {
|
|
2375
2482
|
return (options.client ?? this.client).delete({
|
|
@@ -2768,6 +2875,95 @@ var Transactions = class extends HeyApiClient {
|
|
|
2768
2875
|
});
|
|
2769
2876
|
}
|
|
2770
2877
|
};
|
|
2878
|
+
var Roles = class extends HeyApiClient {
|
|
2879
|
+
/**
|
|
2880
|
+
* Lists every role with its permissions and how often it is assigned.
|
|
2881
|
+
*/
|
|
2882
|
+
list(options) {
|
|
2883
|
+
return (options?.client ?? this.client).get({
|
|
2884
|
+
requestValidator: async (data) => await zod.object({
|
|
2885
|
+
body: zod.never().optional(),
|
|
2886
|
+
path: zod.never().optional(),
|
|
2887
|
+
query: zod.never().optional()
|
|
2888
|
+
}).parseAsync(data),
|
|
2889
|
+
responseValidator: async (data) => await require_zod_gen.zRolesListResponse.parseAsync(data),
|
|
2890
|
+
security: [{
|
|
2891
|
+
scheme: "bearer",
|
|
2892
|
+
type: "http"
|
|
2893
|
+
}],
|
|
2894
|
+
url: "/api/roles",
|
|
2895
|
+
...options
|
|
2896
|
+
});
|
|
2897
|
+
}
|
|
2898
|
+
/**
|
|
2899
|
+
* Creates a role from permissions the caller holds themselves.
|
|
2900
|
+
*/
|
|
2901
|
+
create(options) {
|
|
2902
|
+
return (options.client ?? this.client).post({
|
|
2903
|
+
requestValidator: async (data) => await zod.object({
|
|
2904
|
+
body: require_zod_gen.zRolesCreateBody,
|
|
2905
|
+
path: zod.never().optional(),
|
|
2906
|
+
query: zod.never().optional()
|
|
2907
|
+
}).parseAsync(data),
|
|
2908
|
+
responseValidator: async (data) => await require_zod_gen.zRolesCreateResponse.parseAsync(data),
|
|
2909
|
+
security: [{
|
|
2910
|
+
scheme: "bearer",
|
|
2911
|
+
type: "http"
|
|
2912
|
+
}],
|
|
2913
|
+
url: "/api/roles",
|
|
2914
|
+
...options,
|
|
2915
|
+
headers: {
|
|
2916
|
+
"Content-Type": "application/json",
|
|
2917
|
+
...options.headers
|
|
2918
|
+
}
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
/**
|
|
2922
|
+
* Deletes a role nobody holds.
|
|
2923
|
+
*/
|
|
2924
|
+
delete(options) {
|
|
2925
|
+
return (options.client ?? this.client).delete({
|
|
2926
|
+
requestValidator: async (data) => await zod.object({
|
|
2927
|
+
body: zod.never().optional(),
|
|
2928
|
+
path: require_zod_gen.zRolesDeletePath,
|
|
2929
|
+
query: zod.never().optional()
|
|
2930
|
+
}).parseAsync(data),
|
|
2931
|
+
responseValidator: async (data) => await require_zod_gen.zRolesDeleteResponse.parseAsync(data),
|
|
2932
|
+
security: [{
|
|
2933
|
+
scheme: "bearer",
|
|
2934
|
+
type: "http"
|
|
2935
|
+
}],
|
|
2936
|
+
url: "/api/roles/{id}",
|
|
2937
|
+
...options
|
|
2938
|
+
});
|
|
2939
|
+
}
|
|
2940
|
+
/**
|
|
2941
|
+
* Replaces a role's name, description and permissions.
|
|
2942
|
+
*
|
|
2943
|
+
* The caller must hold both the permissions being added and those being
|
|
2944
|
+
* removed, so nobody strips a role of something they could not give back.
|
|
2945
|
+
*/
|
|
2946
|
+
update(options) {
|
|
2947
|
+
return (options.client ?? this.client).put({
|
|
2948
|
+
requestValidator: async (data) => await zod.object({
|
|
2949
|
+
body: require_zod_gen.zRolesUpdateBody,
|
|
2950
|
+
path: require_zod_gen.zRolesUpdatePath,
|
|
2951
|
+
query: zod.never().optional()
|
|
2952
|
+
}).parseAsync(data),
|
|
2953
|
+
responseValidator: async (data) => await require_zod_gen.zRolesUpdateResponse.parseAsync(data),
|
|
2954
|
+
security: [{
|
|
2955
|
+
scheme: "bearer",
|
|
2956
|
+
type: "http"
|
|
2957
|
+
}],
|
|
2958
|
+
url: "/api/roles/{id}",
|
|
2959
|
+
...options,
|
|
2960
|
+
headers: {
|
|
2961
|
+
"Content-Type": "application/json",
|
|
2962
|
+
...options.headers
|
|
2963
|
+
}
|
|
2964
|
+
});
|
|
2965
|
+
}
|
|
2966
|
+
};
|
|
2771
2967
|
var Schedules = class extends HeyApiClient {
|
|
2772
2968
|
/**
|
|
2773
2969
|
* POST /api/schedules/preview
|
|
@@ -2798,7 +2994,8 @@ var Schedules = class extends HeyApiClient {
|
|
|
2798
2994
|
};
|
|
2799
2995
|
var Settings = class extends HeyApiClient {
|
|
2800
2996
|
/**
|
|
2801
|
-
* Whether the MCP endpoint at `/mcp` is on.
|
|
2997
|
+
* Whether the MCP endpoint at `/mcp` is on. Open to every member: it is what
|
|
2998
|
+
* they point their own assistant at.
|
|
2802
2999
|
*/
|
|
2803
3000
|
getMcp(options) {
|
|
2804
3001
|
return (options?.client ?? this.client).get({
|
|
@@ -2817,7 +3014,7 @@ var Settings = class extends HeyApiClient {
|
|
|
2817
3014
|
});
|
|
2818
3015
|
}
|
|
2819
3016
|
/**
|
|
2820
|
-
* Turns the MCP endpoint at `/mcp` on or off
|
|
3017
|
+
* Turns the MCP endpoint at `/mcp` on or off (needs `mcp:update`).
|
|
2821
3018
|
*/
|
|
2822
3019
|
updateMcp(options) {
|
|
2823
3020
|
return (options.client ?? this.client).put({
|
|
@@ -3134,7 +3331,7 @@ var Storage = class extends HeyApiClient {
|
|
|
3134
3331
|
};
|
|
3135
3332
|
var Team = class extends HeyApiClient {
|
|
3136
3333
|
/**
|
|
3137
|
-
* GET /api/team — list all users (
|
|
3334
|
+
* GET /api/team — list all users (needs `users:read`)
|
|
3138
3335
|
*/
|
|
3139
3336
|
list(options) {
|
|
3140
3337
|
return (options?.client ?? this.client).get({
|
|
@@ -3153,7 +3350,7 @@ var Team = class extends HeyApiClient {
|
|
|
3153
3350
|
});
|
|
3154
3351
|
}
|
|
3155
3352
|
/**
|
|
3156
|
-
* DELETE /api/team/{user_id} — remove a user from the instance (
|
|
3353
|
+
* DELETE /api/team/{user_id} — remove a user from the instance (needs `users:delete`)
|
|
3157
3354
|
*/
|
|
3158
3355
|
deleteUser(options) {
|
|
3159
3356
|
return (options.client ?? this.client).delete({
|
|
@@ -3172,7 +3369,7 @@ var Team = class extends HeyApiClient {
|
|
|
3172
3369
|
});
|
|
3173
3370
|
}
|
|
3174
3371
|
/**
|
|
3175
|
-
* PATCH /api/team/{user_id}/role — change a user's global role (
|
|
3372
|
+
* PATCH /api/team/{user_id}/role — change a user's global role (needs `users:update`)
|
|
3176
3373
|
*/
|
|
3177
3374
|
updateRole(options) {
|
|
3178
3375
|
return (options.client ?? this.client).patch({
|
|
@@ -3220,7 +3417,8 @@ var Tokens = class extends HeyApiClient {
|
|
|
3220
3417
|
/**
|
|
3221
3418
|
* GET /api/tokens - List tokens (masked)
|
|
3222
3419
|
*
|
|
3223
|
-
*
|
|
3420
|
+
* Everyone sees their own tokens; `api-tokens:read` sees every token. A token
|
|
3421
|
+
* limited to other permissions sees none: it must not reach its owner's others.
|
|
3224
3422
|
*/
|
|
3225
3423
|
list(options) {
|
|
3226
3424
|
return (options?.client ?? this.client).get({
|
|
@@ -3239,7 +3437,10 @@ var Tokens = class extends HeyApiClient {
|
|
|
3239
3437
|
});
|
|
3240
3438
|
}
|
|
3241
3439
|
/**
|
|
3242
|
-
* POST /api/tokens - Create a new token (
|
|
3440
|
+
* POST /api/tokens - Create a new token (from a signed-in session only)
|
|
3441
|
+
*
|
|
3442
|
+
* A token cannot create tokens: a limited or expiring one could otherwise
|
|
3443
|
+
* mint itself a way out of its limits.
|
|
3243
3444
|
*/
|
|
3244
3445
|
create(options) {
|
|
3245
3446
|
return (options.client ?? this.client).post({
|
|
@@ -3264,7 +3465,7 @@ var Tokens = class extends HeyApiClient {
|
|
|
3264
3465
|
/**
|
|
3265
3466
|
* DELETE /api/tokens/{id} - Revoke a token
|
|
3266
3467
|
*
|
|
3267
|
-
*
|
|
3468
|
+
* Everyone may revoke their own; `api-tokens:delete` revokes any.
|
|
3268
3469
|
*/
|
|
3269
3470
|
delete(options) {
|
|
3270
3471
|
return (options.client ?? this.client).delete({
|
|
@@ -3283,10 +3484,10 @@ var Tokens = class extends HeyApiClient {
|
|
|
3283
3484
|
});
|
|
3284
3485
|
}
|
|
3285
3486
|
/**
|
|
3286
|
-
* GET /api/tokens/{id} -
|
|
3487
|
+
* GET /api/tokens/{id} - Token details, masked
|
|
3287
3488
|
*
|
|
3288
|
-
*
|
|
3289
|
-
*
|
|
3489
|
+
* Tokens are stored hashed, so the full value is only ever shown on
|
|
3490
|
+
* creation. Everyone may view their own; `api-tokens:read` views any.
|
|
3290
3491
|
*/
|
|
3291
3492
|
get(options) {
|
|
3292
3493
|
return (options.client ?? this.client).get({
|
|
@@ -3305,6 +3506,53 @@ var Tokens = class extends HeyApiClient {
|
|
|
3305
3506
|
});
|
|
3306
3507
|
}
|
|
3307
3508
|
};
|
|
3509
|
+
var Users = class extends HeyApiClient {
|
|
3510
|
+
/**
|
|
3511
|
+
* Lists the roles a user holds, on the instance and on each project.
|
|
3512
|
+
*/
|
|
3513
|
+
assignments(options) {
|
|
3514
|
+
return (options.client ?? this.client).get({
|
|
3515
|
+
requestValidator: async (data) => await zod.object({
|
|
3516
|
+
body: zod.never().optional(),
|
|
3517
|
+
path: require_zod_gen.zUsersAssignmentsPath,
|
|
3518
|
+
query: zod.never().optional()
|
|
3519
|
+
}).parseAsync(data),
|
|
3520
|
+
responseValidator: async (data) => await require_zod_gen.zUsersAssignmentsResponse.parseAsync(data),
|
|
3521
|
+
security: [{
|
|
3522
|
+
scheme: "bearer",
|
|
3523
|
+
type: "http"
|
|
3524
|
+
}],
|
|
3525
|
+
url: "/api/users/{id}/assignments",
|
|
3526
|
+
...options
|
|
3527
|
+
});
|
|
3528
|
+
}
|
|
3529
|
+
/**
|
|
3530
|
+
* Replaces every role and personal permission a user holds.
|
|
3531
|
+
*
|
|
3532
|
+
* The caller must hold every role being given or taken away, on the scope
|
|
3533
|
+
* it applies to.
|
|
3534
|
+
*/
|
|
3535
|
+
setAssignments(options) {
|
|
3536
|
+
return (options.client ?? this.client).put({
|
|
3537
|
+
requestValidator: async (data) => await zod.object({
|
|
3538
|
+
body: require_zod_gen.zUsersSetAssignmentsBody,
|
|
3539
|
+
path: require_zod_gen.zUsersSetAssignmentsPath,
|
|
3540
|
+
query: zod.never().optional()
|
|
3541
|
+
}).parseAsync(data),
|
|
3542
|
+
responseValidator: async (data) => await require_zod_gen.zUsersSetAssignmentsResponse.parseAsync(data),
|
|
3543
|
+
security: [{
|
|
3544
|
+
scheme: "bearer",
|
|
3545
|
+
type: "http"
|
|
3546
|
+
}],
|
|
3547
|
+
url: "/api/users/{id}/assignments",
|
|
3548
|
+
...options,
|
|
3549
|
+
headers: {
|
|
3550
|
+
"Content-Type": "application/json",
|
|
3551
|
+
...options.headers
|
|
3552
|
+
}
|
|
3553
|
+
});
|
|
3554
|
+
}
|
|
3555
|
+
};
|
|
3308
3556
|
var Auth = class extends HeyApiClient {
|
|
3309
3557
|
/**
|
|
3310
3558
|
* POST /auth/accept-invitation
|
|
@@ -3646,6 +3894,10 @@ var Rustrak = class Rustrak extends HeyApiClient {
|
|
|
3646
3894
|
get releases() {
|
|
3647
3895
|
return this._releases ??= new Releases({ client: this.client });
|
|
3648
3896
|
}
|
|
3897
|
+
_access;
|
|
3898
|
+
get access() {
|
|
3899
|
+
return this._access ??= new Access({ client: this.client });
|
|
3900
|
+
}
|
|
3649
3901
|
_github;
|
|
3650
3902
|
get github() {
|
|
3651
3903
|
return this._github ??= new Github({ client: this.client });
|
|
@@ -3718,6 +3970,10 @@ var Rustrak = class Rustrak extends HeyApiClient {
|
|
|
3718
3970
|
get transactions() {
|
|
3719
3971
|
return this._transactions ??= new Transactions({ client: this.client });
|
|
3720
3972
|
}
|
|
3973
|
+
_roles;
|
|
3974
|
+
get roles() {
|
|
3975
|
+
return this._roles ??= new Roles({ client: this.client });
|
|
3976
|
+
}
|
|
3721
3977
|
_schedules;
|
|
3722
3978
|
get schedules() {
|
|
3723
3979
|
return this._schedules ??= new Schedules({ client: this.client });
|
|
@@ -3742,6 +3998,10 @@ var Rustrak = class Rustrak extends HeyApiClient {
|
|
|
3742
3998
|
get tokens() {
|
|
3743
3999
|
return this._tokens ??= new Tokens({ client: this.client });
|
|
3744
4000
|
}
|
|
4001
|
+
_users;
|
|
4002
|
+
get users() {
|
|
4003
|
+
return this._users ??= new Users({ client: this.client });
|
|
4004
|
+
}
|
|
3745
4005
|
_auth;
|
|
3746
4006
|
get auth() {
|
|
3747
4007
|
return this._auth ??= new Auth({ client: this.client });
|
|
@@ -3751,6 +4011,7 @@ var Rustrak = class Rustrak extends HeyApiClient {
|
|
|
3751
4011
|
return this._health ??= new Health({ client: this.client });
|
|
3752
4012
|
}
|
|
3753
4013
|
};
|
|
4014
|
+
exports.Access = Access;
|
|
3754
4015
|
exports.Agents = Agents;
|
|
3755
4016
|
exports.AlertChannels = AlertChannels;
|
|
3756
4017
|
exports.AlertRules = AlertRules;
|
|
@@ -3769,6 +4030,7 @@ exports.Monitors = Monitors;
|
|
|
3769
4030
|
exports.Oauth = Oauth;
|
|
3770
4031
|
exports.Projects = Projects;
|
|
3771
4032
|
exports.Releases = Releases;
|
|
4033
|
+
exports.Roles = Roles;
|
|
3772
4034
|
exports.Rustrak = Rustrak;
|
|
3773
4035
|
exports.Schedules = Schedules;
|
|
3774
4036
|
exports.Sentry = Sentry;
|
|
@@ -3782,5 +4044,6 @@ exports.Team = Team;
|
|
|
3782
4044
|
exports.Telemetry = Telemetry;
|
|
3783
4045
|
exports.Tokens = Tokens;
|
|
3784
4046
|
exports.Transactions = Transactions;
|
|
4047
|
+
exports.Users = Users;
|
|
3785
4048
|
|
|
3786
4049
|
//# sourceMappingURL=sdk.gen.cjs.map
|