@limitry/sdk 0.0.0-stage → 1.0.0-rc.3

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.
@@ -0,0 +1,4207 @@
1
+ export interface paths {
2
+ "/checks": {
3
+ parameters: {
4
+ query?: never;
5
+ header?: never;
6
+ path?: never;
7
+ cookie?: never;
8
+ };
9
+ get?: never;
10
+ put?: never;
11
+ /**
12
+ * Check whether a subject may act
13
+ * @description Asks whether `subject` may do `action` at `cost`, given every enabled limit that applies, and — in `consume` mode — uses it. Always 200 for a decision: read `allowed`; `remaining` shows what is left per limit and `retryAfterSeconds` when to try again. An `Idempotency-Key` header makes a retried check return the same decision without using twice. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.
14
+ */
15
+ post: operations["checks.create"];
16
+ delete?: never;
17
+ options?: never;
18
+ head?: never;
19
+ patch?: never;
20
+ trace?: never;
21
+ };
22
+ "/limits": {
23
+ parameters: {
24
+ query?: never;
25
+ header?: never;
26
+ path?: never;
27
+ cookie?: never;
28
+ };
29
+ /**
30
+ * List limits
31
+ * @description The workspace's active limits, newest first (`archived=true`: the archived ones). Filter by `subjectKind` and `action`; paginate with the opaque `nextCursor` token.
32
+ */
33
+ get: operations["limits.list"];
34
+ put?: never;
35
+ /**
36
+ * Create a limit
37
+ * @description Limits how much of an action a subject may use per window — for example 200 cents of `ai-call` a month for every `user`. Checks enforce it from then on. Names are unique among the environment's active limits. Owners and admins only, for a person's token.
38
+ */
39
+ post: operations["limits.create"];
40
+ delete?: never;
41
+ options?: never;
42
+ head?: never;
43
+ patch?: never;
44
+ trace?: never;
45
+ };
46
+ "/limits/{limitId}": {
47
+ parameters: {
48
+ query?: never;
49
+ header?: never;
50
+ path?: never;
51
+ cookie?: never;
52
+ };
53
+ /**
54
+ * Get a limit
55
+ * @description One limit: who it applies to, the action, amount and window.
56
+ */
57
+ get: operations["limits.get"];
58
+ put?: never;
59
+ post?: never;
60
+ delete?: never;
61
+ options?: never;
62
+ head?: never;
63
+ /**
64
+ * Change a limit
65
+ * @description Changes any of a limit's fields; checks use the new rule within a minute. Owners and admins only, for a person's token.
66
+ */
67
+ patch: operations["limits.update"];
68
+ trace?: never;
69
+ };
70
+ "/limits/{limitId}/archive": {
71
+ parameters: {
72
+ query?: never;
73
+ header?: never;
74
+ path?: never;
75
+ cookie?: never;
76
+ };
77
+ get?: never;
78
+ put?: never;
79
+ /**
80
+ * Archive a limit
81
+ * @description Stops a limit: checks stop enforcing it within a minute, and it leaves the list. It is archived, not erased — its usage history and credit grants stay, and `POST /v1/limits/{limitId}/restore` brings it back. Owners and admins only, for a person's token.
82
+ */
83
+ post: operations["limits.archive"];
84
+ delete?: never;
85
+ options?: never;
86
+ head?: never;
87
+ patch?: never;
88
+ trace?: never;
89
+ };
90
+ "/limits/{limitId}/grants": {
91
+ parameters: {
92
+ query?: never;
93
+ header?: never;
94
+ path?: never;
95
+ cookie?: never;
96
+ };
97
+ /**
98
+ * List a balance's grants
99
+ * @description Credits added to subjects' balances for this limit, newest first.
100
+ */
101
+ get: operations["limits.grants.list"];
102
+ put?: never;
103
+ /**
104
+ * Add credits to a balance
105
+ * @description Adds `amount` to one subject's balance — a limit whose window is `total`. A negative `amount` takes credits back (a refund, a chargeback) and needs a `note` saying why; the balance may go below zero, and checks are refused until it is topped up. Owners and admins, or a workspace API key; an agent asks a person (the `limit.grant` approval).
106
+ */
107
+ post: operations["limits.grants.create"];
108
+ delete?: never;
109
+ options?: never;
110
+ head?: never;
111
+ patch?: never;
112
+ trace?: never;
113
+ };
114
+ "/limits/{limitId}/restore": {
115
+ parameters: {
116
+ query?: never;
117
+ header?: never;
118
+ path?: never;
119
+ cookie?: never;
120
+ };
121
+ get?: never;
122
+ put?: never;
123
+ /**
124
+ * Restore an archived limit
125
+ * @description Brings an archived limit back into force — refused while an active limit has its name. Owners and admins only, for a person's token.
126
+ */
127
+ post: operations["limits.restore"];
128
+ delete?: never;
129
+ options?: never;
130
+ head?: never;
131
+ patch?: never;
132
+ trace?: never;
133
+ };
134
+ "/limits/sync": {
135
+ parameters: {
136
+ query?: never;
137
+ header?: never;
138
+ path?: never;
139
+ cookie?: never;
140
+ };
141
+ get?: never;
142
+ put?: never;
143
+ /**
144
+ * Sync limits from a list
145
+ * @description Makes the environment's limits match `limits`, by name: creates the missing, changes those that differ (an omitted field means its default) and, with `archiveMissing`, archives active limits the list doesn't name. Running it twice changes nothing the second time. Limitry checks the whole list first, and a problem anywhere changes nothing (400, each problem in `details`); then it writes every change at once. `dryRun` answers the plan without writing. For keeping limits in a file in your repository (`limitry sync`). Owners and admins only, for a person's token.
146
+ */
147
+ post: operations["limits.sync"];
148
+ delete?: never;
149
+ options?: never;
150
+ head?: never;
151
+ patch?: never;
152
+ trace?: never;
153
+ };
154
+ "/reservations/{reservationId}/commit": {
155
+ parameters: {
156
+ query?: never;
157
+ header?: never;
158
+ path?: never;
159
+ cookie?: never;
160
+ };
161
+ get?: never;
162
+ put?: never;
163
+ /**
164
+ * Commit a reservation
165
+ * @description Settles a hold with the ACTUAL amount used (`cost`): less than held gives the rest back at once; more is charged in full — the work happened. A commit after the hold expired still charges `cost`. Repeating a commit answers the same. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.
166
+ */
167
+ post: operations["reservations.commit"];
168
+ delete?: never;
169
+ options?: never;
170
+ head?: never;
171
+ patch?: never;
172
+ trace?: never;
173
+ };
174
+ "/reservations/{reservationId}/extend": {
175
+ parameters: {
176
+ query?: never;
177
+ header?: never;
178
+ path?: never;
179
+ cookie?: never;
180
+ };
181
+ get?: never;
182
+ put?: never;
183
+ /**
184
+ * Extend a reservation
185
+ * @description Keeps a hold for longer work: it now expires `ttlSeconds` from now (default 300, at most 3600) — call it again as a heartbeat. Only a held reservation can be extended. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.
186
+ */
187
+ post: operations["reservations.extend"];
188
+ delete?: never;
189
+ options?: never;
190
+ head?: never;
191
+ patch?: never;
192
+ trace?: never;
193
+ };
194
+ "/reservations/{reservationId}/release": {
195
+ parameters: {
196
+ query?: never;
197
+ header?: never;
198
+ path?: never;
199
+ cookie?: never;
200
+ };
201
+ get?: never;
202
+ put?: never;
203
+ /**
204
+ * Release a reservation
205
+ * @description Gives the whole hold back — the work did not happen. Repeating a release answers the same; releasing a committed reservation is refused. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.
206
+ */
207
+ post: operations["reservations.release"];
208
+ delete?: never;
209
+ options?: never;
210
+ head?: never;
211
+ patch?: never;
212
+ trace?: never;
213
+ };
214
+ "/subjects/{subjectKind}/{subjectId}": {
215
+ parameters: {
216
+ query?: never;
217
+ header?: never;
218
+ path?: never;
219
+ cookie?: never;
220
+ };
221
+ /**
222
+ * Get a subject
223
+ * @description A subject's anchor: when its `anchor` limits' periods start from. A subject is yours (a user, a team, an agent) and exists once a check names it.
224
+ */
225
+ get: operations["subjects.get"];
226
+ put?: never;
227
+ post?: never;
228
+ delete?: never;
229
+ options?: never;
230
+ head?: never;
231
+ /**
232
+ * Set a subject's anchor
233
+ * @description Sets when a subject's `anchor` limits' periods start from: typically its subscription's start date, from your billing system's webhook, so its allowance refills on its own billing day (monthly for an annual plan, too). Owners and admins only, for a person's token.
234
+ */
235
+ patch: operations["subjects.update"];
236
+ trace?: never;
237
+ };
238
+ "/subjects/{subjectKind}/{subjectId}/reset": {
239
+ parameters: {
240
+ query?: never;
241
+ header?: never;
242
+ path?: never;
243
+ cookie?: never;
244
+ };
245
+ get?: never;
246
+ put?: never;
247
+ /**
248
+ * Reset a subject's limits
249
+ * @description Refills one limit on a subject (`limitId`), or every limit on it (`{}`), at once: for goodwill, a promotion or support. The schedule doesn't move: the next refill is still the usual one. A balance goes back to its amount; a concurrent limit is skipped. Send an Idempotency-Key and a repeat resets once. Owners and admins only, for a person's token.
250
+ */
251
+ post: operations["subjects.reset"];
252
+ delete?: never;
253
+ options?: never;
254
+ head?: never;
255
+ patch?: never;
256
+ trace?: never;
257
+ };
258
+ "/usage": {
259
+ parameters: {
260
+ query?: never;
261
+ header?: never;
262
+ path?: never;
263
+ cookie?: never;
264
+ };
265
+ /**
266
+ * Get a limit's usage over time
267
+ * @description Units used, checks allowed and denied for one limit — across all subjects, or one (`subjectKind` + `subjectId`) — per hour or per day (UTC), every bucket in the range included. Up to about a minute behind live checks. Default: the last 30 days, by day.
268
+ */
269
+ get: operations["usage.query"];
270
+ put?: never;
271
+ post?: never;
272
+ delete?: never;
273
+ options?: never;
274
+ head?: never;
275
+ patch?: never;
276
+ trace?: never;
277
+ };
278
+ "/usage/standing": {
279
+ parameters: {
280
+ query?: never;
281
+ header?: never;
282
+ path?: never;
283
+ cookie?: never;
284
+ };
285
+ /**
286
+ * Get where a subject stands
287
+ * @description Every enabled limit on one subject — and on its shared subjects (`shared`, comma-separated `kind:id`, such as `team:team_42`) — with what is used, what is left and when it resets, exact as of now. For showing an end user where they stand: call it from your server with your key, never from a browser. Not a check: nothing is counted. A subject with no limit here answers an empty `limits` list.
288
+ */
289
+ get: operations["usage.standing"];
290
+ put?: never;
291
+ post?: never;
292
+ delete?: never;
293
+ options?: never;
294
+ head?: never;
295
+ patch?: never;
296
+ trace?: never;
297
+ };
298
+ "/usage/subjects": {
299
+ parameters: {
300
+ query?: never;
301
+ header?: never;
302
+ path?: never;
303
+ cookie?: never;
304
+ };
305
+ /**
306
+ * List who is using a limit now
307
+ * @description A limit's subjects in its CURRENT window, most used first: units used, what is left, how many checks were denied — `over` when any were. Up to about a minute behind live checks.
308
+ */
309
+ get: operations["usage.subjects"];
310
+ put?: never;
311
+ post?: never;
312
+ delete?: never;
313
+ options?: never;
314
+ head?: never;
315
+ patch?: never;
316
+ trace?: never;
317
+ };
318
+ "/user/me": {
319
+ parameters: {
320
+ query?: never;
321
+ header?: never;
322
+ path?: never;
323
+ cookie?: never;
324
+ };
325
+ /**
326
+ * Get the current user
327
+ * @description Returns the user the personal access token belongs to, with their workspace memberships. Useful as an integration smoke test ("who am I?").
328
+ */
329
+ get: operations["user.me"];
330
+ put?: never;
331
+ post?: never;
332
+ delete?: never;
333
+ options?: never;
334
+ head?: never;
335
+ patch?: never;
336
+ trace?: never;
337
+ };
338
+ "/user/token": {
339
+ parameters: {
340
+ query?: never;
341
+ header?: never;
342
+ path?: never;
343
+ cookie?: never;
344
+ };
345
+ get?: never;
346
+ put?: never;
347
+ post?: never;
348
+ /**
349
+ * Revoke the token making this request
350
+ * @description Revokes the personal access token used to call it — signing out from a script or the CLI (`logout`). The token stops working immediately; other tokens are untouched.
351
+ */
352
+ delete: operations["user.revokeToken"];
353
+ options?: never;
354
+ head?: never;
355
+ patch?: never;
356
+ trace?: never;
357
+ };
358
+ "/workspace": {
359
+ parameters: {
360
+ query?: never;
361
+ header?: never;
362
+ path?: never;
363
+ cookie?: never;
364
+ };
365
+ /**
366
+ * Get the current workspace
367
+ * @description Returns the Workspace the credential acts in — the API key's own, or the one named by X-Workspace for a personal access token. Useful as an integration smoke test ("who am I?").
368
+ */
369
+ get: operations["workspace.get"];
370
+ put?: never;
371
+ post?: never;
372
+ delete?: never;
373
+ options?: never;
374
+ head?: never;
375
+ patch?: never;
376
+ trace?: never;
377
+ };
378
+ "/workspace/approval-actions": {
379
+ parameters: {
380
+ query?: never;
381
+ header?: never;
382
+ path?: never;
383
+ cookie?: never;
384
+ };
385
+ /**
386
+ * List the actions you can ask approval for
387
+ * @description Actions a credential may not take itself but may ASK a person to approve: each one's input (JSON Schema), who can approve it, and whether it creates a secret.
388
+ */
389
+ get: operations["workspace.approvalActions.list"];
390
+ put?: never;
391
+ post?: never;
392
+ delete?: never;
393
+ options?: never;
394
+ head?: never;
395
+ patch?: never;
396
+ trace?: never;
397
+ };
398
+ "/workspace/approval-requests": {
399
+ parameters: {
400
+ query?: never;
401
+ header?: never;
402
+ path?: never;
403
+ cookie?: never;
404
+ };
405
+ get?: never;
406
+ put?: never;
407
+ /**
408
+ * Ask a person to approve an action
409
+ * @description Files a request for an action you may not take yourself (see approval-actions) and notifies everyone who can approve it. Show the person `approveUrl` and why you need it; then check the request until it is decided (it expires after 24 hours). A personal access token or an app a person connected may ask — not a workspace API key.
410
+ */
411
+ post: operations["workspace.approvalRequests.create"];
412
+ delete?: never;
413
+ options?: never;
414
+ head?: never;
415
+ patch?: never;
416
+ trace?: never;
417
+ };
418
+ "/workspace/approval-requests/{requestId}": {
419
+ parameters: {
420
+ query?: never;
421
+ header?: never;
422
+ path?: never;
423
+ cookie?: never;
424
+ };
425
+ /**
426
+ * Check an approval request
427
+ * @description The request you filed: pending, denied, completed (the action ran — see `result`), approved (waiting for the CLI to redeem it), failed or expired.
428
+ */
429
+ get: operations["workspace.approvalRequests.get"];
430
+ put?: never;
431
+ post?: never;
432
+ delete?: never;
433
+ options?: never;
434
+ head?: never;
435
+ patch?: never;
436
+ trace?: never;
437
+ };
438
+ "/workspace/approval-requests/{requestId}/redeem": {
439
+ parameters: {
440
+ query?: never;
441
+ header?: never;
442
+ path?: never;
443
+ cookie?: never;
444
+ };
445
+ get?: never;
446
+ put?: never;
447
+ /**
448
+ * Redeem an approved request
449
+ * @description Runs an approved, secret-producing action ONCE and returns its secret — to the personal access token that asked, only. The CLI writes it to a file without printing it.
450
+ */
451
+ post: operations["workspace.approvalRequests.redeem"];
452
+ delete?: never;
453
+ options?: never;
454
+ head?: never;
455
+ patch?: never;
456
+ trace?: never;
457
+ };
458
+ "/workspace/audit-events": {
459
+ parameters: {
460
+ query?: never;
461
+ header?: never;
462
+ path?: never;
463
+ cookie?: never;
464
+ };
465
+ /**
466
+ * List workspace audit events
467
+ * @description The workspace's audit trail, newest first. Paginate with the opaque `nextCursor` token; `limit` is clamped to 1–100 (default 25). Owner-only for personal access tokens, like the audit page in the application; a Workspace API key is its workspace and always passes.
468
+ */
469
+ get: operations["workspace.auditEvents.list"];
470
+ put?: never;
471
+ post?: never;
472
+ delete?: never;
473
+ options?: never;
474
+ head?: never;
475
+ patch?: never;
476
+ trace?: never;
477
+ };
478
+ "/workspace/event-types": {
479
+ parameters: {
480
+ query?: never;
481
+ header?: never;
482
+ path?: never;
483
+ cookie?: never;
484
+ };
485
+ /**
486
+ * List event types
487
+ * @description Every workspace event a webhook endpoint can subscribe to, with what it means. Pass some as `eventTypes` when adding an endpoint; an endpoint without a list receives them all.
488
+ */
489
+ get: operations["workspace.eventTypes.list"];
490
+ put?: never;
491
+ post?: never;
492
+ delete?: never;
493
+ options?: never;
494
+ head?: never;
495
+ patch?: never;
496
+ trace?: never;
497
+ };
498
+ "/workspace/invitations": {
499
+ parameters: {
500
+ query?: never;
501
+ header?: never;
502
+ path?: never;
503
+ cookie?: never;
504
+ };
505
+ /**
506
+ * List pending invitations
507
+ * @description Invitations sent and not yet accepted, declined or expired, newest first. Owners and admins only for a personal credential, as in the app. Paginate with the opaque `nextCursor`.
508
+ */
509
+ get: operations["workspace.invitations.list"];
510
+ put?: never;
511
+ post?: never;
512
+ delete?: never;
513
+ options?: never;
514
+ head?: never;
515
+ patch?: never;
516
+ trace?: never;
517
+ };
518
+ "/workspace/members": {
519
+ parameters: {
520
+ query?: never;
521
+ header?: never;
522
+ path?: never;
523
+ cookie?: never;
524
+ };
525
+ /**
526
+ * List workspace members
527
+ * @description The workspace's members with their roles, newest first. Paginate with the opaque `nextCursor`; `limit` is clamped to 1–100 (default 25). Members are invited, removed and given roles in the app.
528
+ */
529
+ get: operations["workspace.members.list"];
530
+ put?: never;
531
+ post?: never;
532
+ delete?: never;
533
+ options?: never;
534
+ head?: never;
535
+ patch?: never;
536
+ trace?: never;
537
+ };
538
+ "/workspace/teams": {
539
+ parameters: {
540
+ query?: never;
541
+ header?: never;
542
+ path?: never;
543
+ cookie?: never;
544
+ };
545
+ /**
546
+ * List teams
547
+ * @description The workspace's teams with their members' user ids, newest first. Paginate with the opaque `nextCursor`; `limit` is clamped to 1–100 (default 25). Teams are created and staffed in the app.
548
+ */
549
+ get: operations["workspace.teams.list"];
550
+ put?: never;
551
+ post?: never;
552
+ delete?: never;
553
+ options?: never;
554
+ head?: never;
555
+ patch?: never;
556
+ trace?: never;
557
+ };
558
+ "/workspace/usage": {
559
+ parameters: {
560
+ query?: never;
561
+ header?: never;
562
+ path?: never;
563
+ cookie?: never;
564
+ };
565
+ /**
566
+ * Get your plan's usage this period
567
+ * @description How much of each meter the workspace used this period, with the plan's limit for it (null = unlimited). A period is a month from the workspace's billing date: its subscription's (an annual plan refills monthly from its start), else the day the workspace was created.
568
+ */
569
+ get: operations["workspace.usage"];
570
+ put?: never;
571
+ post?: never;
572
+ delete?: never;
573
+ options?: never;
574
+ head?: never;
575
+ patch?: never;
576
+ trace?: never;
577
+ };
578
+ "/workspace/webhook-endpoints": {
579
+ parameters: {
580
+ query?: never;
581
+ header?: never;
582
+ path?: never;
583
+ cookie?: never;
584
+ };
585
+ /**
586
+ * List webhook endpoints
587
+ * @description The workspace's outgoing webhook endpoints, newest first, without their signing secrets. A workspace has at most 10, so the list is a single page (`nextCursor` is null).
588
+ */
589
+ get: operations["workspace.webhookEndpoints.list"];
590
+ put?: never;
591
+ /**
592
+ * Add a webhook endpoint
593
+ * @description Registers an https URL to receive the workspace's events, signed Svix-compatibly. The response carries the endpoint's signing secret (`whsec_…`) — shown ONCE, store it to verify deliveries. Private and non-https hosts are refused; at most 10 per workspace.
594
+ */
595
+ post: operations["workspace.webhookEndpoints.create"];
596
+ delete?: never;
597
+ options?: never;
598
+ head?: never;
599
+ patch?: never;
600
+ trace?: never;
601
+ };
602
+ "/workspace/webhook-endpoints/{endpointId}": {
603
+ parameters: {
604
+ query?: never;
605
+ header?: never;
606
+ path?: never;
607
+ cookie?: never;
608
+ };
609
+ /**
610
+ * Get a webhook endpoint
611
+ * @description One endpoint, without its signing secret: whether it is enabled, its consecutive failures and its last delivery status.
612
+ */
613
+ get: operations["workspace.webhookEndpoints.get"];
614
+ put?: never;
615
+ post?: never;
616
+ /**
617
+ * Remove a webhook endpoint
618
+ * @description Stops all deliveries to the endpoint and deletes it with its secret. Its delivery history goes with it.
619
+ */
620
+ delete: operations["workspace.webhookEndpoints.delete"];
621
+ options?: never;
622
+ head?: never;
623
+ patch?: never;
624
+ trace?: never;
625
+ };
626
+ "/workspace/webhook-endpoints/{endpointId}/deliveries": {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ /**
634
+ * List an endpoint's deliveries
635
+ * @description Delivery history for one endpoint, newest first: each event's status, attempts and last HTTP status (payloads are not returned). Kept for 30 days. Paginate with the opaque `nextCursor`.
636
+ */
637
+ get: operations["workspace.webhookDeliveries.list"];
638
+ put?: never;
639
+ post?: never;
640
+ delete?: never;
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
646
+ "/workspace/webhook-endpoints/{endpointId}/deliveries/{deliveryId}/redeliver": {
647
+ parameters: {
648
+ query?: never;
649
+ header?: never;
650
+ path?: never;
651
+ cookie?: never;
652
+ };
653
+ get?: never;
654
+ put?: never;
655
+ /**
656
+ * Redeliver an event
657
+ * @description Sends a recorded delivery's event again, as a new delivery with its own history entry; the event id is unchanged, so receivers can deduplicate. The endpoint must be enabled.
658
+ */
659
+ post: operations["workspace.webhookDeliveries.redeliver"];
660
+ delete?: never;
661
+ options?: never;
662
+ head?: never;
663
+ patch?: never;
664
+ trace?: never;
665
+ };
666
+ "/workspace/webhook-endpoints/{endpointId}/enable": {
667
+ parameters: {
668
+ query?: never;
669
+ header?: never;
670
+ path?: never;
671
+ cookie?: never;
672
+ };
673
+ get?: never;
674
+ put?: never;
675
+ /**
676
+ * Re-enable a webhook endpoint
677
+ * @description Resumes deliveries to an endpoint that was disabled after repeated failures, keeping its signing secret; the failure count resets.
678
+ */
679
+ post: operations["workspace.webhookEndpoints.enable"];
680
+ delete?: never;
681
+ options?: never;
682
+ head?: never;
683
+ patch?: never;
684
+ trace?: never;
685
+ };
686
+ "/workspace/webhook-endpoints/{endpointId}/test": {
687
+ parameters: {
688
+ query?: never;
689
+ header?: never;
690
+ path?: never;
691
+ cookie?: never;
692
+ };
693
+ get?: never;
694
+ put?: never;
695
+ /**
696
+ * Send a test event
697
+ * @description Sends a `ping` event to the endpoint, signed like every delivery — the way to check an integration verifies and accepts deliveries.
698
+ */
699
+ post: operations["workspace.webhookEndpoints.test"];
700
+ delete?: never;
701
+ options?: never;
702
+ head?: never;
703
+ patch?: never;
704
+ trace?: never;
705
+ };
706
+ }
707
+ export type webhooks = Record<string, never>;
708
+ export interface components {
709
+ schemas: {
710
+ ApprovalRequest: {
711
+ /** @example workspace.apiKey.create */
712
+ action: string;
713
+ /** @description Where a person approves or denies it — show it to them. */
714
+ approveUrl: string;
715
+ createdAt: string;
716
+ decidedAt: string | null;
717
+ expiresAt: string;
718
+ id: string;
719
+ input: {
720
+ [key: string]: unknown;
721
+ };
722
+ reason: string;
723
+ requestedBy: string | null;
724
+ /** @description The outcome — never a secret. */
725
+ result: {
726
+ [key: string]: unknown;
727
+ } | null;
728
+ /** @description Set when the action creates a secret. */
729
+ secret: {
730
+ envVar: string;
731
+ name: string;
732
+ } | null;
733
+ /**
734
+ * @description `approved` = waiting for the CLI to redeem it (a secret-producing action asked from the CLI).
735
+ * @enum {string}
736
+ */
737
+ status: "pending" | "approved" | "completed" | "denied" | "failed" | "expired";
738
+ /** @description Exactly what will happen, as the person reads it. */
739
+ summary: string;
740
+ title: string;
741
+ };
742
+ AuditEvent: {
743
+ /** @example member.invited */
744
+ action: string;
745
+ /**
746
+ * @description Who is accountable: `user`, `staff`, `system` or `api_key`.
747
+ * @example user
748
+ */
749
+ actorType: string;
750
+ /** @example 2026-08-19T12:00:00.000Z */
751
+ createdAt: string;
752
+ /** @description The API credential the action came through, as named when it happened; null for actions taken in the app. */
753
+ credential: {
754
+ /** @example ci */
755
+ name: string | null;
756
+ /**
757
+ * @description `api_key` or `pat`.
758
+ * @example pat
759
+ */
760
+ type: string;
761
+ } | null;
762
+ /** @example evt_k3TAiF2ZP5sQxWbV */
763
+ id: string;
764
+ };
765
+ AuditEventPage: {
766
+ items: components["schemas"]["AuditEvent"][];
767
+ /** @description Pass as ?cursor= to fetch the next page. */
768
+ nextCursor: string | null;
769
+ };
770
+ CheckDecision: {
771
+ /** @description The answer. `false` is a normal answer, not an error — branch on it. */
772
+ allowed: boolean;
773
+ /** @example chk_9d2e… */
774
+ id: string;
775
+ /** @description Why not, when `allowed` is false: a limit is used up (`limit` names it), or the subject already holds the most open reservations (1,000). */
776
+ reason: {
777
+ /** @enum {string} */
778
+ code: "limit_exceeded" | "too_many_reservations";
779
+ /** @example lim_3f0c… */
780
+ limit: string | null;
781
+ } | null;
782
+ /** @description Every limit that applied, and what is left in its window. */
783
+ remaining: components["schemas"]["CheckRemaining"][];
784
+ /** @description With `mode: reserve`, when allowed: the hold — commit or release it before `expiresAt`, or it releases itself. */
785
+ reservation?: {
786
+ expiresAt: string;
787
+ /** @example rsv_WyJ1c2VyIiwidV80MiJd_9f… */
788
+ id: string;
789
+ };
790
+ /** @description When `allowed` is false: seconds until it could be allowed. */
791
+ retryAfterSeconds: number | null;
792
+ };
793
+ CheckRemaining: {
794
+ /**
795
+ * @description What to do if Limitry cannot be reached next time: `open` allows, `closed` denies. SDKs remember it.
796
+ * @enum {string}
797
+ */
798
+ failMode: "open" | "closed";
799
+ /** @example lim_3f0c… */
800
+ limit: string;
801
+ /** @example AI budget */
802
+ name: string;
803
+ /** @example 195 */
804
+ remaining: number;
805
+ /**
806
+ * @description When the window resets — for a rolling limit, when its oldest use leaves the window. Null when nothing will: a balance (`total`), a `concurrent` limit, a rolling limit with nothing in use.
807
+ * @example 2026-11-01T00:00:00.000Z
808
+ */
809
+ resetsAt: string | null;
810
+ /** @description The limit counts the last window, not the calendar one. */
811
+ rolling: boolean;
812
+ /** @example cents */
813
+ unit: string;
814
+ /** @enum {string} */
815
+ window: "minute" | "hour" | "day" | "week" | "month" | "year" | "total" | "concurrent";
816
+ };
817
+ CheckRequest: {
818
+ /**
819
+ * @description What the subject wants to do.
820
+ * @example ai-call
821
+ */
822
+ action: string;
823
+ /**
824
+ * @description Units it would use. Default 1.
825
+ * @example 5
826
+ */
827
+ cost?: number;
828
+ /**
829
+ * @description `consume` (default) decides and uses; `preview` decides without using; `reserve` decides and HOLDS `cost` (an estimate) until you commit the actual amount or release it — see `reservation` in the answer. Only a reservation takes a slot of a `concurrent` limit.
830
+ * @example consume
831
+ * @enum {string}
832
+ */
833
+ mode?: "consume" | "preview" | "reserve";
834
+ /**
835
+ * @description Shared subjects it also draws from — a team's, org's or project's pool (at most 4). Every limit on every subject must fit; all are charged, or none.
836
+ * @example [
837
+ * {
838
+ * "kind": "team",
839
+ * "id": "team_42"
840
+ * }
841
+ * ]
842
+ */
843
+ shared?: {
844
+ id: string;
845
+ kind: string;
846
+ }[];
847
+ subject: components["schemas"]["CheckSubject"];
848
+ /**
849
+ * @description With `reserve`: how long the hold lasts before it releases itself. Default 300, at most 3600.
850
+ * @example 300
851
+ */
852
+ ttlSeconds?: number;
853
+ };
854
+ /** @description Who is acting, as `{"kind": "user", "id": "usr_123"}`. */
855
+ CheckSubject: {
856
+ /**
857
+ * @description Who exactly, in your product.
858
+ * @example usr_123
859
+ */
860
+ id: string;
861
+ /**
862
+ * @description Your own label for who is acting: user, apikey, agent …
863
+ * @example user
864
+ */
865
+ kind: string;
866
+ };
867
+ ErrorEnvelope: {
868
+ error: {
869
+ /** @example unauthorized */
870
+ code: string;
871
+ details?: {
872
+ message: string;
873
+ path: string;
874
+ }[];
875
+ /**
876
+ * @description Link to this error code's entry in the documentation — how to fix it.
877
+ * @example https://example.com/docs/errors/#unauthorized
878
+ */
879
+ docs?: string;
880
+ /** @example Unauthorized */
881
+ message: string;
882
+ requestId?: string;
883
+ };
884
+ };
885
+ Invitation: {
886
+ /** @example 2026-08-19T12:00:00.000Z */
887
+ createdAt: string;
888
+ email: string;
889
+ /** @example 2026-08-21T12:00:00.000Z */
890
+ expiresAt: string;
891
+ id: string;
892
+ /** @example member */
893
+ role: string | null;
894
+ /** @description Teams the person joins on accepting (besides the default team, unless a guest). */
895
+ teamIds: string[];
896
+ };
897
+ InvitationPage: {
898
+ items: components["schemas"]["Invitation"][];
899
+ /** @description Pass as ?cursor= to fetch the next page. */
900
+ nextCursor: string | null;
901
+ };
902
+ Limit: {
903
+ /**
904
+ * @description The action it limits; `*` for every action.
905
+ * @example ai-call
906
+ */
907
+ action: string;
908
+ /**
909
+ * @description How many units per window — for a `concurrent` limit, how many at once.
910
+ * @example 200
911
+ */
912
+ amount: number;
913
+ /** @description When it was archived (deleting archives it); null while active. An archived limit isn't enforced; its usage history and credit grants stay. */
914
+ archivedAt: string | null;
915
+ /** @example 2026-10-04T12:00:00.000Z */
916
+ createdAt: string;
917
+ enabled: boolean;
918
+ /**
919
+ * @description How many `window` units a period lasts: `window: "month", every: 3` is a quarter, `window: "hour", every: 5` five hours. Default: 1.
920
+ * @example 1
921
+ */
922
+ every: number;
923
+ /**
924
+ * @description What your code should do when Limitry cannot be reached: `open` allows, `closed` denies.
925
+ * @example closed
926
+ * @enum {string}
927
+ */
928
+ failMode: "open" | "closed";
929
+ /** @example lim_3f0c… */
930
+ id: string;
931
+ /** @example AI budget */
932
+ name: string;
933
+ /** @description Counts the last minute, hour or day at the moment of the check instead of the calendar window. */
934
+ rolling: boolean;
935
+ /**
936
+ * @description Where a period begins. `calendar`: UTC boundaries (midnight, Monday, the 1st, 1 January). `anchor`: from the subject's anchor, its billing date, set with `subjects.update` (its first check until then), so an annual plan can refill monthly from its start day. `first_use`: at the first check after the previous period ended. Default: calendar.
937
+ * @example calendar
938
+ * @enum {string}
939
+ */
940
+ start: "calendar" | "anchor" | "first_use";
941
+ subject: components["schemas"]["LimitSubject"];
942
+ /** @example cents */
943
+ unit: string;
944
+ /** @example 2026-10-04T12:00:00.000Z */
945
+ updatedAt: string;
946
+ /** @description Increases on every change. */
947
+ version: number;
948
+ /**
949
+ * @description `minute`, `hour`, `day`, `week`, `month` or `year`: a period of `every` of them, refilled where `start` says (or rolling: see `rolling`). `total`: a balance that never resets, topped up by grants. `concurrent`: at most `amount` held reservations at once.
950
+ * @example month
951
+ * @enum {string}
952
+ */
953
+ window: "minute" | "hour" | "day" | "week" | "month" | "year" | "total" | "concurrent";
954
+ };
955
+ LimitGrant: {
956
+ amount: number;
957
+ createdAt: string;
958
+ createdByUserId: string | null;
959
+ /** @example grt_… */
960
+ id: string;
961
+ limitId: string;
962
+ note: string;
963
+ subject: {
964
+ id: string;
965
+ kind: string;
966
+ };
967
+ };
968
+ LimitGrantInput: {
969
+ /**
970
+ * @description Credits to add; negative to take them back. Not 0.
971
+ * @example 5000
972
+ */
973
+ amount: number;
974
+ /**
975
+ * @description Required when `amount` is negative.
976
+ * @example October top-up
977
+ */
978
+ note?: string;
979
+ /**
980
+ * @description Who gets the credits, as `{"kind": "team", "id": "team_42"}`.
981
+ * @example {
982
+ * "kind": "team",
983
+ * "id": "team_42"
984
+ * }
985
+ */
986
+ subject: {
987
+ id: string;
988
+ kind: string;
989
+ };
990
+ };
991
+ LimitInput: {
992
+ /**
993
+ * @description The action to limit; `*` for every action.
994
+ * @example ai-call
995
+ */
996
+ action: string;
997
+ /**
998
+ * @description How many units each subject may use per window.
999
+ * @example 200
1000
+ */
1001
+ amount: number;
1002
+ /** @description Whether checks enforce it. Default: true. */
1003
+ enabled?: boolean;
1004
+ /**
1005
+ * @description How many `window` units a period lasts: `window: "month", every: 3` is a quarter, `window: "hour", every: 5` five hours. Default: 1.
1006
+ * @example 1
1007
+ */
1008
+ every?: number;
1009
+ /**
1010
+ * @description What your code should do when Limitry can't be reached: `open` (allow) or `closed` (deny). Default: open.
1011
+ * @enum {string}
1012
+ */
1013
+ failMode?: "open" | "closed";
1014
+ /**
1015
+ * @description A name for the limit, unique among its environment's active limits.
1016
+ * @example AI budget
1017
+ */
1018
+ name: string;
1019
+ /** @description Count the last window instead of the calendar one (minute, hour or day only). Default: false. */
1020
+ rolling?: boolean;
1021
+ /**
1022
+ * @description Where a period begins. `calendar`: UTC boundaries (midnight, Monday, the 1st, 1 January). `anchor`: from the subject's anchor, its billing date, set with `subjects.update` (its first check until then), so an annual plan can refill monthly from its start day. `first_use`: at the first check after the previous period ended. Default: calendar.
1023
+ * @example calendar
1024
+ * @enum {string}
1025
+ */
1026
+ start?: "calendar" | "anchor" | "first_use";
1027
+ /** @description One subject; omit or null for every subject of the kind. A subject's own limit replaces the kind's limits with the same action and window. */
1028
+ subjectId?: string | null;
1029
+ /**
1030
+ * @description Your own label for who is checked.
1031
+ * @example user
1032
+ */
1033
+ subjectKind: string;
1034
+ /**
1035
+ * @description What the amount counts (display only). Default: units.
1036
+ * @example cents
1037
+ */
1038
+ unit?: string;
1039
+ /**
1040
+ * @description `minute`, `hour`, `day`, `week`, `month` or `year`: a period of `every` of them, refilled where `start` says (or rolling: see `rolling`). `total`: a balance that never resets, topped up by grants. `concurrent`: at most `amount` held reservations at once.
1041
+ * @example month
1042
+ * @enum {string}
1043
+ */
1044
+ window: "minute" | "hour" | "day" | "week" | "month" | "year" | "total" | "concurrent";
1045
+ };
1046
+ LimitPage: {
1047
+ items: components["schemas"]["Limit"][];
1048
+ /** @description Pass as ?cursor= to fetch the next page. */
1049
+ nextCursor: string | null;
1050
+ };
1051
+ LimitPatch: {
1052
+ /**
1053
+ * @description The action to limit; `*` for every action.
1054
+ * @example ai-call
1055
+ */
1056
+ action?: string;
1057
+ /**
1058
+ * @description How many units each subject may use per window.
1059
+ * @example 200
1060
+ */
1061
+ amount?: number;
1062
+ /** @description Whether checks enforce it. Default: true. */
1063
+ enabled?: boolean;
1064
+ /**
1065
+ * @description How many `window` units a period lasts: `window: "month", every: 3` is a quarter, `window: "hour", every: 5` five hours. Default: 1.
1066
+ * @example 1
1067
+ */
1068
+ every?: number;
1069
+ /**
1070
+ * @description What your code should do when Limitry can't be reached: `open` (allow) or `closed` (deny). Default: open.
1071
+ * @enum {string}
1072
+ */
1073
+ failMode?: "open" | "closed";
1074
+ /**
1075
+ * @description A name for the limit, unique among its environment's active limits.
1076
+ * @example AI budget
1077
+ */
1078
+ name?: string;
1079
+ /** @description Count the last window instead of the calendar one (minute, hour or day only). Default: false. */
1080
+ rolling?: boolean;
1081
+ /**
1082
+ * @description Where a period begins. `calendar`: UTC boundaries (midnight, Monday, the 1st, 1 January). `anchor`: from the subject's anchor, its billing date, set with `subjects.update` (its first check until then), so an annual plan can refill monthly from its start day. `first_use`: at the first check after the previous period ended. Default: calendar.
1083
+ * @example calendar
1084
+ * @enum {string}
1085
+ */
1086
+ start?: "calendar" | "anchor" | "first_use";
1087
+ /** @description One subject; omit or null for every subject of the kind. A subject's own limit replaces the kind's limits with the same action and window. */
1088
+ subjectId?: string | null;
1089
+ /**
1090
+ * @description Your own label for who is checked.
1091
+ * @example user
1092
+ */
1093
+ subjectKind?: string;
1094
+ /**
1095
+ * @description What the amount counts (display only). Default: units.
1096
+ * @example cents
1097
+ */
1098
+ unit?: string;
1099
+ /**
1100
+ * @description `minute`, `hour`, `day`, `week`, `month` or `year`: a period of `every` of them, refilled where `start` says (or rolling: see `rolling`). `total`: a balance that never resets, topped up by grants. `concurrent`: at most `amount` held reservations at once.
1101
+ * @example month
1102
+ * @enum {string}
1103
+ */
1104
+ window?: "minute" | "hour" | "day" | "week" | "month" | "year" | "total" | "concurrent";
1105
+ };
1106
+ LimitSubject: {
1107
+ /**
1108
+ * @description One subject, or null for every subject of this kind.
1109
+ * @example null
1110
+ */
1111
+ id: string | null;
1112
+ /**
1113
+ * @description Your own label for who is checked: user, apikey, agent, team …
1114
+ * @example user
1115
+ */
1116
+ kind: string;
1117
+ };
1118
+ LimitSyncInput: {
1119
+ /** @description Archive the environment's active limits whose names aren't in `limits` (restorable). Default: false, which leaves them alone. */
1120
+ archiveMissing?: boolean;
1121
+ /** @description Answer what the sync would do and change nothing. Default: false. */
1122
+ dryRun?: boolean;
1123
+ /**
1124
+ * @description Every limit you want, each described whole: an omitted field is its default, as on create. Names are the key and must be unique in the list. At most 200.
1125
+ * @example [
1126
+ * {
1127
+ * "name": "AI budget",
1128
+ * "subjectKind": "user",
1129
+ * "action": "ai-call",
1130
+ * "amount": 200,
1131
+ * "unit": "cents",
1132
+ * "window": "month"
1133
+ * }
1134
+ * ]
1135
+ */
1136
+ limits: components["schemas"]["LimitInput"][];
1137
+ };
1138
+ LimitSyncResult: {
1139
+ /** @description Names of the limits archived (with `archiveMissing`). */
1140
+ archived: string[];
1141
+ /**
1142
+ * @description Names of the limits created.
1143
+ * @example [
1144
+ * "AI budget"
1145
+ * ]
1146
+ */
1147
+ created: string[];
1148
+ /** @description True when nothing was written: this is the plan. */
1149
+ dryRun: boolean;
1150
+ /** @description Names of the limits that already matched. */
1151
+ unchanged: string[];
1152
+ /** @description The limits changed, field by field. */
1153
+ updated: {
1154
+ /**
1155
+ * @description Each changed field, from its old value to the new.
1156
+ * @example {
1157
+ * "amount": {
1158
+ * "from": 200,
1159
+ * "to": 300
1160
+ * }
1161
+ * }
1162
+ */
1163
+ changes: {
1164
+ [key: string]: {
1165
+ from: string | number | boolean | null;
1166
+ to: string | number | boolean | null;
1167
+ };
1168
+ };
1169
+ name: string;
1170
+ }[];
1171
+ };
1172
+ Member: {
1173
+ email: string;
1174
+ /** @description The membership's id. */
1175
+ id: string;
1176
+ /** @example 2026-08-19T12:00:00.000Z */
1177
+ joinedAt: string;
1178
+ name: string;
1179
+ /**
1180
+ * @description `owner`, `admin`, `member` or `guest`.
1181
+ * @example member
1182
+ */
1183
+ role: string;
1184
+ userId: string;
1185
+ };
1186
+ MemberPage: {
1187
+ items: components["schemas"]["Member"][];
1188
+ /** @description Pass as ?cursor= to fetch the next page. */
1189
+ nextCursor: string | null;
1190
+ };
1191
+ Reservation: {
1192
+ /** @description What it finally used: the committed cost; 0 when released. */
1193
+ cost: number;
1194
+ expiresAt: string;
1195
+ id: string;
1196
+ /** @description The amount held. */
1197
+ reserved: number;
1198
+ /**
1199
+ * @description `expired`: nobody settled it in time, so it gave its hold back.
1200
+ * @enum {string}
1201
+ */
1202
+ status: "held" | "committed" | "released" | "expired";
1203
+ };
1204
+ ReservationCommit: {
1205
+ /**
1206
+ * @description The amount actually used.
1207
+ * @example 3
1208
+ */
1209
+ cost: number;
1210
+ };
1211
+ ReservationExtend: {
1212
+ /**
1213
+ * @description Seconds from now. Default 300.
1214
+ * @example 600
1215
+ */
1216
+ ttlSeconds?: number;
1217
+ };
1218
+ Subject: {
1219
+ /**
1220
+ * @description When its `anchor` limits' periods start from: its billing date, else its first counted check. Null until it has one.
1221
+ * @example 2026-03-17T14:30:00.000Z
1222
+ */
1223
+ anchor: string | null;
1224
+ subject: components["schemas"]["SubjectRef"];
1225
+ };
1226
+ SubjectRef: {
1227
+ id: string;
1228
+ kind: string;
1229
+ };
1230
+ SubjectReset: {
1231
+ /**
1232
+ * @description Just this limit. Default: every limit on the subject.
1233
+ * @example lim_3f0c…
1234
+ */
1235
+ limitId?: string;
1236
+ };
1237
+ SubjectResetResult: {
1238
+ /** @description The limits that were refilled. */
1239
+ reset: string[];
1240
+ subject: components["schemas"]["SubjectRef"];
1241
+ };
1242
+ SubjectUpdate: {
1243
+ /**
1244
+ * Format: date-time
1245
+ * @description The date and time its periods start from (ISO 8601), such as a subscription's start.
1246
+ * @example 2026-03-17T14:30:00Z
1247
+ */
1248
+ anchor: string;
1249
+ };
1250
+ Team: {
1251
+ /** @example 2026-08-19T12:00:00.000Z */
1252
+ createdAt: string;
1253
+ id: string;
1254
+ /** @description The team every member (not guests) belongs to. */
1255
+ isDefault: boolean;
1256
+ /** @description The user ids of the team's members. */
1257
+ memberIds: string[];
1258
+ name: string;
1259
+ };
1260
+ TeamPage: {
1261
+ items: components["schemas"]["Team"][];
1262
+ /** @description Pass as ?cursor= to fetch the next page. */
1263
+ nextCursor: string | null;
1264
+ };
1265
+ UsageBySubject: {
1266
+ items: {
1267
+ denied: number;
1268
+ over: boolean;
1269
+ remaining: number;
1270
+ subject: {
1271
+ id: string;
1272
+ kind: string;
1273
+ };
1274
+ used: number;
1275
+ }[];
1276
+ limitId: string;
1277
+ windowStart: string;
1278
+ };
1279
+ UsageSeries: {
1280
+ /** @enum {string} */
1281
+ granularity: "hour" | "day";
1282
+ limitId: string;
1283
+ points: {
1284
+ allowed: number;
1285
+ denied: number;
1286
+ start: string;
1287
+ used: number;
1288
+ }[];
1289
+ };
1290
+ UsageStanding: {
1291
+ /** @example live */
1292
+ environment: string;
1293
+ limits: {
1294
+ action: string;
1295
+ amount: number;
1296
+ limit: string;
1297
+ name: string;
1298
+ /** @description A balance's can exceed `amount` once credits are granted. */
1299
+ remaining: number;
1300
+ resetsAt: string | null;
1301
+ rolling: boolean;
1302
+ /** @description On a shared subject, not this one. */
1303
+ shared: boolean;
1304
+ subject: {
1305
+ id: string;
1306
+ kind: string;
1307
+ };
1308
+ unit: string;
1309
+ used: number;
1310
+ /** @enum {string} */
1311
+ window: "minute" | "hour" | "day" | "week" | "month" | "year" | "total" | "concurrent";
1312
+ }[];
1313
+ subject: {
1314
+ id: string;
1315
+ kind: string;
1316
+ };
1317
+ };
1318
+ UserMe: {
1319
+ /** @example casey@example.com */
1320
+ email: string;
1321
+ /** @example k3TAiF2ZP5sQxWbVJd8mR1cyNGuh4Eo9 */
1322
+ id: string;
1323
+ /** @example Casey Customer */
1324
+ name: string;
1325
+ workspaces: {
1326
+ id: string;
1327
+ /** @example Acme Inc. */
1328
+ name: string;
1329
+ /** @example owner */
1330
+ role: string;
1331
+ /** @example acme */
1332
+ slug: string;
1333
+ }[];
1334
+ };
1335
+ WebhookDelivery: {
1336
+ attempts: number;
1337
+ createdAt: string;
1338
+ /** @example evt_51c2… */
1339
+ eventId: string;
1340
+ /** @example workspace.member.joined */
1341
+ eventType: string;
1342
+ /** @example del_8a1b… */
1343
+ id: string;
1344
+ lastAttemptAt: string | null;
1345
+ lastStatus: number | null;
1346
+ /**
1347
+ * @description `pending`, `delivered` or `failed`.
1348
+ * @example delivered
1349
+ */
1350
+ status: string;
1351
+ };
1352
+ WebhookDeliveryOutcome: {
1353
+ deliveryId: string;
1354
+ /** @description When attempted immediately: whether it was accepted. */
1355
+ ok?: boolean;
1356
+ /** @description True when queued for delivery (with retries); false when attempted immediately. */
1357
+ queued: boolean;
1358
+ status?: number | null;
1359
+ };
1360
+ WebhookDeliveryPage: {
1361
+ items: components["schemas"]["WebhookDelivery"][];
1362
+ /** @description Pass as ?cursor= to fetch the next page. */
1363
+ nextCursor: string | null;
1364
+ };
1365
+ WebhookEndpoint: {
1366
+ consecutiveFailures: number;
1367
+ createdAt: string;
1368
+ description: string | null;
1369
+ /** @description False after 20 failed attempts in a row (retries count); re-enable to resume. */
1370
+ enabled: boolean;
1371
+ /**
1372
+ * @description The environment it belongs to, where the product has them: it receives only that environment's events and is managed with a credential acting in it. Null otherwise.
1373
+ * @example live
1374
+ */
1375
+ environment: string | null;
1376
+ /** @description The event types it receives (see event-types); null = every event. */
1377
+ eventTypes: string[] | null;
1378
+ /** @example we_3f0c… */
1379
+ id: string;
1380
+ lastAttemptAt: string | null;
1381
+ lastStatus: number | null;
1382
+ /** @example https://example.com/hooks */
1383
+ url: string;
1384
+ };
1385
+ WebhookEndpointCreated: {
1386
+ endpoint: components["schemas"]["WebhookEndpoint"];
1387
+ secret: string;
1388
+ };
1389
+ WebhookEndpointPage: {
1390
+ items: components["schemas"]["WebhookEndpoint"][];
1391
+ /** @description Pass as ?cursor= to fetch the next page. */
1392
+ nextCursor: string | null;
1393
+ };
1394
+ Workspace: {
1395
+ /** @example k3TAiF2ZP5sQxWbVJd8mR1cyNGuh4Eo9 */
1396
+ id: string;
1397
+ /** @example Acme Inc. */
1398
+ name: string;
1399
+ };
1400
+ WorkspaceUsage: {
1401
+ meters: {
1402
+ description: string;
1403
+ /** @example webhook_deliveries */
1404
+ id: string;
1405
+ /** @description The plan's limit this period; null = unlimited. */
1406
+ limit: number | null;
1407
+ used: number;
1408
+ }[];
1409
+ /** @description Things to know about these numbers, such as some usage being unavailable right now. */
1410
+ notices?: string[];
1411
+ /**
1412
+ * @description When the counts reset.
1413
+ * @example 2026-11-17T14:30:00.000Z
1414
+ */
1415
+ periodEnd: string;
1416
+ /**
1417
+ * @description When this period began: a month after the last, from the billing date.
1418
+ * @example 2026-10-17T14:30:00.000Z
1419
+ */
1420
+ periodStart: string;
1421
+ };
1422
+ };
1423
+ responses: never;
1424
+ parameters: never;
1425
+ requestBodies: never;
1426
+ headers: never;
1427
+ pathItems: never;
1428
+ }
1429
+ export type $defs = Record<string, never>;
1430
+ export interface operations {
1431
+ "checks.create": {
1432
+ parameters: {
1433
+ query?: never;
1434
+ header?: {
1435
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1436
+ "x-environment"?: string;
1437
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1438
+ "x-workspace"?: string;
1439
+ };
1440
+ path?: never;
1441
+ cookie?: never;
1442
+ };
1443
+ requestBody: {
1444
+ content: {
1445
+ "application/json": components["schemas"]["CheckRequest"];
1446
+ };
1447
+ };
1448
+ responses: {
1449
+ /** @description The decision — allowed or not. */
1450
+ 200: {
1451
+ headers: {
1452
+ [name: string]: unknown;
1453
+ };
1454
+ content: {
1455
+ "application/json": components["schemas"]["CheckDecision"];
1456
+ };
1457
+ };
1458
+ /** @description Invalid request (code: invalid_request). */
1459
+ 400: {
1460
+ headers: {
1461
+ [name: string]: unknown;
1462
+ };
1463
+ content: {
1464
+ "application/json": components["schemas"]["ErrorEnvelope"];
1465
+ };
1466
+ };
1467
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1468
+ 401: {
1469
+ headers: {
1470
+ [name: string]: unknown;
1471
+ };
1472
+ content: {
1473
+ "application/json": components["schemas"]["ErrorEnvelope"];
1474
+ };
1475
+ };
1476
+ /** @description The workspace is more than 10% past its plan's monthly allowed checks or active subjects (code: plan_limit_reached): no decision — apply the limit's fail mode, as when Limitry is unreachable. The SDK does this for you. */
1477
+ 402: {
1478
+ headers: {
1479
+ [name: string]: unknown;
1480
+ };
1481
+ content: {
1482
+ "application/json": components["schemas"]["ErrorEnvelope"];
1483
+ };
1484
+ };
1485
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1486
+ 403: {
1487
+ headers: {
1488
+ [name: string]: unknown;
1489
+ };
1490
+ content: {
1491
+ "application/json": components["schemas"]["ErrorEnvelope"];
1492
+ };
1493
+ };
1494
+ /** @description This Idempotency-Key was used for a different check (code: idempotency_key_reused). */
1495
+ 409: {
1496
+ headers: {
1497
+ [name: string]: unknown;
1498
+ };
1499
+ content: {
1500
+ "application/json": components["schemas"]["ErrorEnvelope"];
1501
+ };
1502
+ };
1503
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1504
+ 429: {
1505
+ headers: {
1506
+ [name: string]: unknown;
1507
+ };
1508
+ content: {
1509
+ "application/json": components["schemas"]["ErrorEnvelope"];
1510
+ };
1511
+ };
1512
+ /** @description Checks are unavailable (code: internal_error). */
1513
+ 503: {
1514
+ headers: {
1515
+ [name: string]: unknown;
1516
+ };
1517
+ content: {
1518
+ "application/json": components["schemas"]["ErrorEnvelope"];
1519
+ };
1520
+ };
1521
+ };
1522
+ };
1523
+ "limits.list": {
1524
+ parameters: {
1525
+ query?: {
1526
+ /** @description Only this action. */
1527
+ action?: string;
1528
+ /** @description `true`: the archived limits instead. */
1529
+ archived?: "true" | "false";
1530
+ /** @description Opaque token from a previous page's nextCursor. */
1531
+ cursor?: string;
1532
+ /** @description Items per page, 1–100 (default 25). */
1533
+ limit?: number;
1534
+ /** @description Only this kind. */
1535
+ subjectKind?: string;
1536
+ };
1537
+ header?: {
1538
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1539
+ "x-environment"?: string;
1540
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1541
+ "x-workspace"?: string;
1542
+ };
1543
+ path?: never;
1544
+ cookie?: never;
1545
+ };
1546
+ requestBody?: never;
1547
+ responses: {
1548
+ /** @description One page of limits. */
1549
+ 200: {
1550
+ headers: {
1551
+ [name: string]: unknown;
1552
+ };
1553
+ content: {
1554
+ "application/json": components["schemas"]["LimitPage"];
1555
+ };
1556
+ };
1557
+ /** @description Malformed cursor or query (code: invalid_request). */
1558
+ 400: {
1559
+ headers: {
1560
+ [name: string]: unknown;
1561
+ };
1562
+ content: {
1563
+ "application/json": components["schemas"]["ErrorEnvelope"];
1564
+ };
1565
+ };
1566
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1567
+ 401: {
1568
+ headers: {
1569
+ [name: string]: unknown;
1570
+ };
1571
+ content: {
1572
+ "application/json": components["schemas"]["ErrorEnvelope"];
1573
+ };
1574
+ };
1575
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1576
+ 403: {
1577
+ headers: {
1578
+ [name: string]: unknown;
1579
+ };
1580
+ content: {
1581
+ "application/json": components["schemas"]["ErrorEnvelope"];
1582
+ };
1583
+ };
1584
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1585
+ 429: {
1586
+ headers: {
1587
+ [name: string]: unknown;
1588
+ };
1589
+ content: {
1590
+ "application/json": components["schemas"]["ErrorEnvelope"];
1591
+ };
1592
+ };
1593
+ };
1594
+ };
1595
+ "limits.create": {
1596
+ parameters: {
1597
+ query?: never;
1598
+ header?: {
1599
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1600
+ "x-environment"?: string;
1601
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1602
+ "x-workspace"?: string;
1603
+ };
1604
+ path?: never;
1605
+ cookie?: never;
1606
+ };
1607
+ requestBody: {
1608
+ content: {
1609
+ "application/json": components["schemas"]["LimitInput"];
1610
+ };
1611
+ };
1612
+ responses: {
1613
+ /** @description The new limit. */
1614
+ 201: {
1615
+ headers: {
1616
+ [name: string]: unknown;
1617
+ };
1618
+ content: {
1619
+ "application/json": components["schemas"]["Limit"];
1620
+ };
1621
+ };
1622
+ /** @description Invalid request, such as a duplicate name (code: invalid_request). */
1623
+ 400: {
1624
+ headers: {
1625
+ [name: string]: unknown;
1626
+ };
1627
+ content: {
1628
+ "application/json": components["schemas"]["ErrorEnvelope"];
1629
+ };
1630
+ };
1631
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1632
+ 401: {
1633
+ headers: {
1634
+ [name: string]: unknown;
1635
+ };
1636
+ content: {
1637
+ "application/json": components["schemas"]["ErrorEnvelope"];
1638
+ };
1639
+ };
1640
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1641
+ 403: {
1642
+ headers: {
1643
+ [name: string]: unknown;
1644
+ };
1645
+ content: {
1646
+ "application/json": components["schemas"]["ErrorEnvelope"];
1647
+ };
1648
+ };
1649
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1650
+ 429: {
1651
+ headers: {
1652
+ [name: string]: unknown;
1653
+ };
1654
+ content: {
1655
+ "application/json": components["schemas"]["ErrorEnvelope"];
1656
+ };
1657
+ };
1658
+ };
1659
+ };
1660
+ "limits.get": {
1661
+ parameters: {
1662
+ query?: never;
1663
+ header?: {
1664
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1665
+ "x-environment"?: string;
1666
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1667
+ "x-workspace"?: string;
1668
+ };
1669
+ path: {
1670
+ limitId: string;
1671
+ };
1672
+ cookie?: never;
1673
+ };
1674
+ requestBody?: never;
1675
+ responses: {
1676
+ /** @description The limit. */
1677
+ 200: {
1678
+ headers: {
1679
+ [name: string]: unknown;
1680
+ };
1681
+ content: {
1682
+ "application/json": components["schemas"]["Limit"];
1683
+ };
1684
+ };
1685
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1686
+ 401: {
1687
+ headers: {
1688
+ [name: string]: unknown;
1689
+ };
1690
+ content: {
1691
+ "application/json": components["schemas"]["ErrorEnvelope"];
1692
+ };
1693
+ };
1694
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1695
+ 403: {
1696
+ headers: {
1697
+ [name: string]: unknown;
1698
+ };
1699
+ content: {
1700
+ "application/json": components["schemas"]["ErrorEnvelope"];
1701
+ };
1702
+ };
1703
+ /** @description No such limit in this workspace (code: not_found). */
1704
+ 404: {
1705
+ headers: {
1706
+ [name: string]: unknown;
1707
+ };
1708
+ content: {
1709
+ "application/json": components["schemas"]["ErrorEnvelope"];
1710
+ };
1711
+ };
1712
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1713
+ 429: {
1714
+ headers: {
1715
+ [name: string]: unknown;
1716
+ };
1717
+ content: {
1718
+ "application/json": components["schemas"]["ErrorEnvelope"];
1719
+ };
1720
+ };
1721
+ };
1722
+ };
1723
+ "limits.update": {
1724
+ parameters: {
1725
+ query?: never;
1726
+ header?: {
1727
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1728
+ "x-environment"?: string;
1729
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1730
+ "x-workspace"?: string;
1731
+ };
1732
+ path: {
1733
+ limitId: string;
1734
+ };
1735
+ cookie?: never;
1736
+ };
1737
+ requestBody: {
1738
+ content: {
1739
+ "application/json": components["schemas"]["LimitPatch"];
1740
+ };
1741
+ };
1742
+ responses: {
1743
+ /** @description The changed limit. */
1744
+ 200: {
1745
+ headers: {
1746
+ [name: string]: unknown;
1747
+ };
1748
+ content: {
1749
+ "application/json": components["schemas"]["Limit"];
1750
+ };
1751
+ };
1752
+ /** @description Invalid request, such as a duplicate name (code: invalid_request). */
1753
+ 400: {
1754
+ headers: {
1755
+ [name: string]: unknown;
1756
+ };
1757
+ content: {
1758
+ "application/json": components["schemas"]["ErrorEnvelope"];
1759
+ };
1760
+ };
1761
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1762
+ 401: {
1763
+ headers: {
1764
+ [name: string]: unknown;
1765
+ };
1766
+ content: {
1767
+ "application/json": components["schemas"]["ErrorEnvelope"];
1768
+ };
1769
+ };
1770
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1771
+ 403: {
1772
+ headers: {
1773
+ [name: string]: unknown;
1774
+ };
1775
+ content: {
1776
+ "application/json": components["schemas"]["ErrorEnvelope"];
1777
+ };
1778
+ };
1779
+ /** @description No such limit in this workspace (code: not_found). */
1780
+ 404: {
1781
+ headers: {
1782
+ [name: string]: unknown;
1783
+ };
1784
+ content: {
1785
+ "application/json": components["schemas"]["ErrorEnvelope"];
1786
+ };
1787
+ };
1788
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1789
+ 429: {
1790
+ headers: {
1791
+ [name: string]: unknown;
1792
+ };
1793
+ content: {
1794
+ "application/json": components["schemas"]["ErrorEnvelope"];
1795
+ };
1796
+ };
1797
+ };
1798
+ };
1799
+ "limits.archive": {
1800
+ parameters: {
1801
+ query?: never;
1802
+ header?: {
1803
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1804
+ "x-environment"?: string;
1805
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1806
+ "x-workspace"?: string;
1807
+ };
1808
+ path: {
1809
+ limitId: string;
1810
+ };
1811
+ cookie?: never;
1812
+ };
1813
+ requestBody?: never;
1814
+ responses: {
1815
+ /** @description Archived. */
1816
+ 204: {
1817
+ headers: {
1818
+ [name: string]: unknown;
1819
+ };
1820
+ content?: never;
1821
+ };
1822
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1823
+ 401: {
1824
+ headers: {
1825
+ [name: string]: unknown;
1826
+ };
1827
+ content: {
1828
+ "application/json": components["schemas"]["ErrorEnvelope"];
1829
+ };
1830
+ };
1831
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1832
+ 403: {
1833
+ headers: {
1834
+ [name: string]: unknown;
1835
+ };
1836
+ content: {
1837
+ "application/json": components["schemas"]["ErrorEnvelope"];
1838
+ };
1839
+ };
1840
+ /** @description No such limit in this workspace (code: not_found). */
1841
+ 404: {
1842
+ headers: {
1843
+ [name: string]: unknown;
1844
+ };
1845
+ content: {
1846
+ "application/json": components["schemas"]["ErrorEnvelope"];
1847
+ };
1848
+ };
1849
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1850
+ 429: {
1851
+ headers: {
1852
+ [name: string]: unknown;
1853
+ };
1854
+ content: {
1855
+ "application/json": components["schemas"]["ErrorEnvelope"];
1856
+ };
1857
+ };
1858
+ };
1859
+ };
1860
+ "limits.grants.list": {
1861
+ parameters: {
1862
+ query?: never;
1863
+ header?: {
1864
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1865
+ "x-environment"?: string;
1866
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1867
+ "x-workspace"?: string;
1868
+ };
1869
+ path: {
1870
+ limitId: string;
1871
+ };
1872
+ cookie?: never;
1873
+ };
1874
+ requestBody?: never;
1875
+ responses: {
1876
+ /** @description The grants. */
1877
+ 200: {
1878
+ headers: {
1879
+ [name: string]: unknown;
1880
+ };
1881
+ content: {
1882
+ "application/json": {
1883
+ items: components["schemas"]["LimitGrant"][];
1884
+ };
1885
+ };
1886
+ };
1887
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1888
+ 401: {
1889
+ headers: {
1890
+ [name: string]: unknown;
1891
+ };
1892
+ content: {
1893
+ "application/json": components["schemas"]["ErrorEnvelope"];
1894
+ };
1895
+ };
1896
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1897
+ 403: {
1898
+ headers: {
1899
+ [name: string]: unknown;
1900
+ };
1901
+ content: {
1902
+ "application/json": components["schemas"]["ErrorEnvelope"];
1903
+ };
1904
+ };
1905
+ /** @description No such limit in this workspace (code: not_found). */
1906
+ 404: {
1907
+ headers: {
1908
+ [name: string]: unknown;
1909
+ };
1910
+ content: {
1911
+ "application/json": components["schemas"]["ErrorEnvelope"];
1912
+ };
1913
+ };
1914
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1915
+ 429: {
1916
+ headers: {
1917
+ [name: string]: unknown;
1918
+ };
1919
+ content: {
1920
+ "application/json": components["schemas"]["ErrorEnvelope"];
1921
+ };
1922
+ };
1923
+ };
1924
+ };
1925
+ "limits.grants.create": {
1926
+ parameters: {
1927
+ query?: never;
1928
+ header?: {
1929
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
1930
+ "x-environment"?: string;
1931
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
1932
+ "x-workspace"?: string;
1933
+ };
1934
+ path: {
1935
+ limitId: string;
1936
+ };
1937
+ cookie?: never;
1938
+ };
1939
+ requestBody: {
1940
+ content: {
1941
+ "application/json": components["schemas"]["LimitGrantInput"];
1942
+ };
1943
+ };
1944
+ responses: {
1945
+ /** @description The grant — the balance is raised. */
1946
+ 201: {
1947
+ headers: {
1948
+ [name: string]: unknown;
1949
+ };
1950
+ content: {
1951
+ "application/json": components["schemas"]["LimitGrant"];
1952
+ };
1953
+ };
1954
+ /** @description Invalid request, such as a duplicate name (code: invalid_request). */
1955
+ 400: {
1956
+ headers: {
1957
+ [name: string]: unknown;
1958
+ };
1959
+ content: {
1960
+ "application/json": components["schemas"]["ErrorEnvelope"];
1961
+ };
1962
+ };
1963
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
1964
+ 401: {
1965
+ headers: {
1966
+ [name: string]: unknown;
1967
+ };
1968
+ content: {
1969
+ "application/json": components["schemas"]["ErrorEnvelope"];
1970
+ };
1971
+ };
1972
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
1973
+ 403: {
1974
+ headers: {
1975
+ [name: string]: unknown;
1976
+ };
1977
+ content: {
1978
+ "application/json": components["schemas"]["ErrorEnvelope"];
1979
+ };
1980
+ };
1981
+ /** @description No such limit in this workspace (code: not_found). */
1982
+ 404: {
1983
+ headers: {
1984
+ [name: string]: unknown;
1985
+ };
1986
+ content: {
1987
+ "application/json": components["schemas"]["ErrorEnvelope"];
1988
+ };
1989
+ };
1990
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
1991
+ 429: {
1992
+ headers: {
1993
+ [name: string]: unknown;
1994
+ };
1995
+ content: {
1996
+ "application/json": components["schemas"]["ErrorEnvelope"];
1997
+ };
1998
+ };
1999
+ /** @description Checks are unavailable (code: internal_error). */
2000
+ 503: {
2001
+ headers: {
2002
+ [name: string]: unknown;
2003
+ };
2004
+ content: {
2005
+ "application/json": components["schemas"]["ErrorEnvelope"];
2006
+ };
2007
+ };
2008
+ };
2009
+ };
2010
+ "limits.restore": {
2011
+ parameters: {
2012
+ query?: never;
2013
+ header?: {
2014
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2015
+ "x-environment"?: string;
2016
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2017
+ "x-workspace"?: string;
2018
+ };
2019
+ path: {
2020
+ limitId: string;
2021
+ };
2022
+ cookie?: never;
2023
+ };
2024
+ requestBody?: never;
2025
+ responses: {
2026
+ /** @description The restored limit. */
2027
+ 200: {
2028
+ headers: {
2029
+ [name: string]: unknown;
2030
+ };
2031
+ content: {
2032
+ "application/json": components["schemas"]["Limit"];
2033
+ };
2034
+ };
2035
+ /** @description Invalid request, such as a duplicate name (code: invalid_request). */
2036
+ 400: {
2037
+ headers: {
2038
+ [name: string]: unknown;
2039
+ };
2040
+ content: {
2041
+ "application/json": components["schemas"]["ErrorEnvelope"];
2042
+ };
2043
+ };
2044
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2045
+ 401: {
2046
+ headers: {
2047
+ [name: string]: unknown;
2048
+ };
2049
+ content: {
2050
+ "application/json": components["schemas"]["ErrorEnvelope"];
2051
+ };
2052
+ };
2053
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2054
+ 403: {
2055
+ headers: {
2056
+ [name: string]: unknown;
2057
+ };
2058
+ content: {
2059
+ "application/json": components["schemas"]["ErrorEnvelope"];
2060
+ };
2061
+ };
2062
+ /** @description No such limit in this workspace (code: not_found). */
2063
+ 404: {
2064
+ headers: {
2065
+ [name: string]: unknown;
2066
+ };
2067
+ content: {
2068
+ "application/json": components["schemas"]["ErrorEnvelope"];
2069
+ };
2070
+ };
2071
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2072
+ 429: {
2073
+ headers: {
2074
+ [name: string]: unknown;
2075
+ };
2076
+ content: {
2077
+ "application/json": components["schemas"]["ErrorEnvelope"];
2078
+ };
2079
+ };
2080
+ };
2081
+ };
2082
+ "limits.sync": {
2083
+ parameters: {
2084
+ query?: never;
2085
+ header?: {
2086
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2087
+ "x-environment"?: string;
2088
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2089
+ "x-workspace"?: string;
2090
+ };
2091
+ path?: never;
2092
+ cookie?: never;
2093
+ };
2094
+ requestBody: {
2095
+ content: {
2096
+ "application/json": components["schemas"]["LimitSyncInput"];
2097
+ };
2098
+ };
2099
+ responses: {
2100
+ /** @description What changed, or with `dryRun`, what would. */
2101
+ 200: {
2102
+ headers: {
2103
+ [name: string]: unknown;
2104
+ };
2105
+ content: {
2106
+ "application/json": components["schemas"]["LimitSyncResult"];
2107
+ };
2108
+ };
2109
+ /** @description Something in the list is invalid, such as a name twice; nothing was changed (code: invalid_request, each problem in `details`). */
2110
+ 400: {
2111
+ headers: {
2112
+ [name: string]: unknown;
2113
+ };
2114
+ content: {
2115
+ "application/json": components["schemas"]["ErrorEnvelope"];
2116
+ };
2117
+ };
2118
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2119
+ 401: {
2120
+ headers: {
2121
+ [name: string]: unknown;
2122
+ };
2123
+ content: {
2124
+ "application/json": components["schemas"]["ErrorEnvelope"];
2125
+ };
2126
+ };
2127
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2128
+ 403: {
2129
+ headers: {
2130
+ [name: string]: unknown;
2131
+ };
2132
+ content: {
2133
+ "application/json": components["schemas"]["ErrorEnvelope"];
2134
+ };
2135
+ };
2136
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2137
+ 429: {
2138
+ headers: {
2139
+ [name: string]: unknown;
2140
+ };
2141
+ content: {
2142
+ "application/json": components["schemas"]["ErrorEnvelope"];
2143
+ };
2144
+ };
2145
+ };
2146
+ };
2147
+ "reservations.commit": {
2148
+ parameters: {
2149
+ query?: never;
2150
+ header?: {
2151
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2152
+ "x-environment"?: string;
2153
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2154
+ "x-workspace"?: string;
2155
+ };
2156
+ path: {
2157
+ reservationId: string;
2158
+ };
2159
+ cookie?: never;
2160
+ };
2161
+ requestBody: {
2162
+ content: {
2163
+ "application/json": components["schemas"]["ReservationCommit"];
2164
+ };
2165
+ };
2166
+ responses: {
2167
+ /** @description The reservation, settled. */
2168
+ 200: {
2169
+ headers: {
2170
+ [name: string]: unknown;
2171
+ };
2172
+ content: {
2173
+ "application/json": components["schemas"]["Reservation"];
2174
+ };
2175
+ };
2176
+ /** @description Already settled the other way, or an invalid cost (code: invalid_request). */
2177
+ 400: {
2178
+ headers: {
2179
+ [name: string]: unknown;
2180
+ };
2181
+ content: {
2182
+ "application/json": components["schemas"]["ErrorEnvelope"];
2183
+ };
2184
+ };
2185
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2186
+ 401: {
2187
+ headers: {
2188
+ [name: string]: unknown;
2189
+ };
2190
+ content: {
2191
+ "application/json": components["schemas"]["ErrorEnvelope"];
2192
+ };
2193
+ };
2194
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2195
+ 403: {
2196
+ headers: {
2197
+ [name: string]: unknown;
2198
+ };
2199
+ content: {
2200
+ "application/json": components["schemas"]["ErrorEnvelope"];
2201
+ };
2202
+ };
2203
+ /** @description No such reservation in this workspace (code: not_found). */
2204
+ 404: {
2205
+ headers: {
2206
+ [name: string]: unknown;
2207
+ };
2208
+ content: {
2209
+ "application/json": components["schemas"]["ErrorEnvelope"];
2210
+ };
2211
+ };
2212
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2213
+ 429: {
2214
+ headers: {
2215
+ [name: string]: unknown;
2216
+ };
2217
+ content: {
2218
+ "application/json": components["schemas"]["ErrorEnvelope"];
2219
+ };
2220
+ };
2221
+ /** @description Checks are unavailable (code: internal_error). */
2222
+ 503: {
2223
+ headers: {
2224
+ [name: string]: unknown;
2225
+ };
2226
+ content: {
2227
+ "application/json": components["schemas"]["ErrorEnvelope"];
2228
+ };
2229
+ };
2230
+ };
2231
+ };
2232
+ "reservations.extend": {
2233
+ parameters: {
2234
+ query?: never;
2235
+ header?: {
2236
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2237
+ "x-environment"?: string;
2238
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2239
+ "x-workspace"?: string;
2240
+ };
2241
+ path: {
2242
+ reservationId: string;
2243
+ };
2244
+ cookie?: never;
2245
+ };
2246
+ requestBody?: {
2247
+ content: {
2248
+ "application/json": components["schemas"]["ReservationExtend"];
2249
+ };
2250
+ };
2251
+ responses: {
2252
+ /** @description The reservation, settled. */
2253
+ 200: {
2254
+ headers: {
2255
+ [name: string]: unknown;
2256
+ };
2257
+ content: {
2258
+ "application/json": components["schemas"]["Reservation"];
2259
+ };
2260
+ };
2261
+ /** @description Already settled the other way, or an invalid cost (code: invalid_request). */
2262
+ 400: {
2263
+ headers: {
2264
+ [name: string]: unknown;
2265
+ };
2266
+ content: {
2267
+ "application/json": components["schemas"]["ErrorEnvelope"];
2268
+ };
2269
+ };
2270
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2271
+ 401: {
2272
+ headers: {
2273
+ [name: string]: unknown;
2274
+ };
2275
+ content: {
2276
+ "application/json": components["schemas"]["ErrorEnvelope"];
2277
+ };
2278
+ };
2279
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2280
+ 403: {
2281
+ headers: {
2282
+ [name: string]: unknown;
2283
+ };
2284
+ content: {
2285
+ "application/json": components["schemas"]["ErrorEnvelope"];
2286
+ };
2287
+ };
2288
+ /** @description No such reservation in this workspace (code: not_found). */
2289
+ 404: {
2290
+ headers: {
2291
+ [name: string]: unknown;
2292
+ };
2293
+ content: {
2294
+ "application/json": components["schemas"]["ErrorEnvelope"];
2295
+ };
2296
+ };
2297
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2298
+ 429: {
2299
+ headers: {
2300
+ [name: string]: unknown;
2301
+ };
2302
+ content: {
2303
+ "application/json": components["schemas"]["ErrorEnvelope"];
2304
+ };
2305
+ };
2306
+ /** @description Checks are unavailable (code: internal_error). */
2307
+ 503: {
2308
+ headers: {
2309
+ [name: string]: unknown;
2310
+ };
2311
+ content: {
2312
+ "application/json": components["schemas"]["ErrorEnvelope"];
2313
+ };
2314
+ };
2315
+ };
2316
+ };
2317
+ "reservations.release": {
2318
+ parameters: {
2319
+ query?: never;
2320
+ header?: {
2321
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2322
+ "x-environment"?: string;
2323
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2324
+ "x-workspace"?: string;
2325
+ };
2326
+ path: {
2327
+ reservationId: string;
2328
+ };
2329
+ cookie?: never;
2330
+ };
2331
+ requestBody?: never;
2332
+ responses: {
2333
+ /** @description The reservation, settled. */
2334
+ 200: {
2335
+ headers: {
2336
+ [name: string]: unknown;
2337
+ };
2338
+ content: {
2339
+ "application/json": components["schemas"]["Reservation"];
2340
+ };
2341
+ };
2342
+ /** @description Already settled the other way, or an invalid cost (code: invalid_request). */
2343
+ 400: {
2344
+ headers: {
2345
+ [name: string]: unknown;
2346
+ };
2347
+ content: {
2348
+ "application/json": components["schemas"]["ErrorEnvelope"];
2349
+ };
2350
+ };
2351
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2352
+ 401: {
2353
+ headers: {
2354
+ [name: string]: unknown;
2355
+ };
2356
+ content: {
2357
+ "application/json": components["schemas"]["ErrorEnvelope"];
2358
+ };
2359
+ };
2360
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2361
+ 403: {
2362
+ headers: {
2363
+ [name: string]: unknown;
2364
+ };
2365
+ content: {
2366
+ "application/json": components["schemas"]["ErrorEnvelope"];
2367
+ };
2368
+ };
2369
+ /** @description No such reservation in this workspace (code: not_found). */
2370
+ 404: {
2371
+ headers: {
2372
+ [name: string]: unknown;
2373
+ };
2374
+ content: {
2375
+ "application/json": components["schemas"]["ErrorEnvelope"];
2376
+ };
2377
+ };
2378
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2379
+ 429: {
2380
+ headers: {
2381
+ [name: string]: unknown;
2382
+ };
2383
+ content: {
2384
+ "application/json": components["schemas"]["ErrorEnvelope"];
2385
+ };
2386
+ };
2387
+ /** @description Checks are unavailable (code: internal_error). */
2388
+ 503: {
2389
+ headers: {
2390
+ [name: string]: unknown;
2391
+ };
2392
+ content: {
2393
+ "application/json": components["schemas"]["ErrorEnvelope"];
2394
+ };
2395
+ };
2396
+ };
2397
+ };
2398
+ "subjects.get": {
2399
+ parameters: {
2400
+ query?: never;
2401
+ header?: {
2402
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2403
+ "x-environment"?: string;
2404
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2405
+ "x-workspace"?: string;
2406
+ };
2407
+ path: {
2408
+ subjectId: string;
2409
+ subjectKind: string;
2410
+ };
2411
+ cookie?: never;
2412
+ };
2413
+ requestBody?: never;
2414
+ responses: {
2415
+ /** @description The subject. */
2416
+ 200: {
2417
+ headers: {
2418
+ [name: string]: unknown;
2419
+ };
2420
+ content: {
2421
+ "application/json": components["schemas"]["Subject"];
2422
+ };
2423
+ };
2424
+ /** @description Unknown environment (code: invalid_request). */
2425
+ 400: {
2426
+ headers: {
2427
+ [name: string]: unknown;
2428
+ };
2429
+ content: {
2430
+ "application/json": components["schemas"]["ErrorEnvelope"];
2431
+ };
2432
+ };
2433
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2434
+ 401: {
2435
+ headers: {
2436
+ [name: string]: unknown;
2437
+ };
2438
+ content: {
2439
+ "application/json": components["schemas"]["ErrorEnvelope"];
2440
+ };
2441
+ };
2442
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2443
+ 403: {
2444
+ headers: {
2445
+ [name: string]: unknown;
2446
+ };
2447
+ content: {
2448
+ "application/json": components["schemas"]["ErrorEnvelope"];
2449
+ };
2450
+ };
2451
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2452
+ 429: {
2453
+ headers: {
2454
+ [name: string]: unknown;
2455
+ };
2456
+ content: {
2457
+ "application/json": components["schemas"]["ErrorEnvelope"];
2458
+ };
2459
+ };
2460
+ /** @description Checks are unavailable (code: internal_error). */
2461
+ 503: {
2462
+ headers: {
2463
+ [name: string]: unknown;
2464
+ };
2465
+ content: {
2466
+ "application/json": components["schemas"]["ErrorEnvelope"];
2467
+ };
2468
+ };
2469
+ };
2470
+ };
2471
+ "subjects.update": {
2472
+ parameters: {
2473
+ query?: never;
2474
+ header?: {
2475
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2476
+ "x-environment"?: string;
2477
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2478
+ "x-workspace"?: string;
2479
+ };
2480
+ path: {
2481
+ subjectId: string;
2482
+ subjectKind: string;
2483
+ };
2484
+ cookie?: never;
2485
+ };
2486
+ requestBody: {
2487
+ content: {
2488
+ "application/json": components["schemas"]["SubjectUpdate"];
2489
+ };
2490
+ };
2491
+ responses: {
2492
+ /** @description The subject, with its new anchor. */
2493
+ 200: {
2494
+ headers: {
2495
+ [name: string]: unknown;
2496
+ };
2497
+ content: {
2498
+ "application/json": components["schemas"]["Subject"];
2499
+ };
2500
+ };
2501
+ /** @description Invalid anchor (code: invalid_request). */
2502
+ 400: {
2503
+ headers: {
2504
+ [name: string]: unknown;
2505
+ };
2506
+ content: {
2507
+ "application/json": components["schemas"]["ErrorEnvelope"];
2508
+ };
2509
+ };
2510
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2511
+ 401: {
2512
+ headers: {
2513
+ [name: string]: unknown;
2514
+ };
2515
+ content: {
2516
+ "application/json": components["schemas"]["ErrorEnvelope"];
2517
+ };
2518
+ };
2519
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2520
+ 403: {
2521
+ headers: {
2522
+ [name: string]: unknown;
2523
+ };
2524
+ content: {
2525
+ "application/json": components["schemas"]["ErrorEnvelope"];
2526
+ };
2527
+ };
2528
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2529
+ 429: {
2530
+ headers: {
2531
+ [name: string]: unknown;
2532
+ };
2533
+ content: {
2534
+ "application/json": components["schemas"]["ErrorEnvelope"];
2535
+ };
2536
+ };
2537
+ /** @description Checks are unavailable (code: internal_error). */
2538
+ 503: {
2539
+ headers: {
2540
+ [name: string]: unknown;
2541
+ };
2542
+ content: {
2543
+ "application/json": components["schemas"]["ErrorEnvelope"];
2544
+ };
2545
+ };
2546
+ };
2547
+ };
2548
+ "subjects.reset": {
2549
+ parameters: {
2550
+ query?: never;
2551
+ header?: {
2552
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2553
+ "x-environment"?: string;
2554
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2555
+ "x-workspace"?: string;
2556
+ };
2557
+ path: {
2558
+ subjectId: string;
2559
+ subjectKind: string;
2560
+ };
2561
+ cookie?: never;
2562
+ };
2563
+ requestBody: {
2564
+ content: {
2565
+ "application/json": components["schemas"]["SubjectReset"];
2566
+ };
2567
+ };
2568
+ responses: {
2569
+ /** @description What was reset. */
2570
+ 200: {
2571
+ headers: {
2572
+ [name: string]: unknown;
2573
+ };
2574
+ content: {
2575
+ "application/json": components["schemas"]["SubjectResetResult"];
2576
+ };
2577
+ };
2578
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2579
+ 401: {
2580
+ headers: {
2581
+ [name: string]: unknown;
2582
+ };
2583
+ content: {
2584
+ "application/json": components["schemas"]["ErrorEnvelope"];
2585
+ };
2586
+ };
2587
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2588
+ 403: {
2589
+ headers: {
2590
+ [name: string]: unknown;
2591
+ };
2592
+ content: {
2593
+ "application/json": components["schemas"]["ErrorEnvelope"];
2594
+ };
2595
+ };
2596
+ /** @description No such limit on this subject (code: not_found). */
2597
+ 404: {
2598
+ headers: {
2599
+ [name: string]: unknown;
2600
+ };
2601
+ content: {
2602
+ "application/json": components["schemas"]["ErrorEnvelope"];
2603
+ };
2604
+ };
2605
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2606
+ 429: {
2607
+ headers: {
2608
+ [name: string]: unknown;
2609
+ };
2610
+ content: {
2611
+ "application/json": components["schemas"]["ErrorEnvelope"];
2612
+ };
2613
+ };
2614
+ /** @description Checks are unavailable (code: internal_error). */
2615
+ 503: {
2616
+ headers: {
2617
+ [name: string]: unknown;
2618
+ };
2619
+ content: {
2620
+ "application/json": components["schemas"]["ErrorEnvelope"];
2621
+ };
2622
+ };
2623
+ };
2624
+ };
2625
+ "usage.query": {
2626
+ parameters: {
2627
+ query: {
2628
+ /** @description Start of the range (ISO 8601). Default: 30 days before `to`. */
2629
+ from?: string;
2630
+ /** @description One bucket per `hour` or per `day` (UTC). Default: day. */
2631
+ granularity?: "hour" | "day";
2632
+ /** @description The limit. */
2633
+ limitId: string;
2634
+ /** @description With `subjectKind`: one subject's usage. */
2635
+ subjectId?: string;
2636
+ /** @description With `subjectId`: one subject's usage, not every subject's. */
2637
+ subjectKind?: string;
2638
+ /** @description End of the range (ISO 8601). Default: now. */
2639
+ to?: string;
2640
+ };
2641
+ header?: {
2642
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2643
+ "x-environment"?: string;
2644
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2645
+ "x-workspace"?: string;
2646
+ };
2647
+ path?: never;
2648
+ cookie?: never;
2649
+ };
2650
+ requestBody?: never;
2651
+ responses: {
2652
+ /** @description The series. */
2653
+ 200: {
2654
+ headers: {
2655
+ [name: string]: unknown;
2656
+ };
2657
+ content: {
2658
+ "application/json": components["schemas"]["UsageSeries"];
2659
+ };
2660
+ };
2661
+ /** @description Invalid range (code: invalid_request). */
2662
+ 400: {
2663
+ headers: {
2664
+ [name: string]: unknown;
2665
+ };
2666
+ content: {
2667
+ "application/json": components["schemas"]["ErrorEnvelope"];
2668
+ };
2669
+ };
2670
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2671
+ 401: {
2672
+ headers: {
2673
+ [name: string]: unknown;
2674
+ };
2675
+ content: {
2676
+ "application/json": components["schemas"]["ErrorEnvelope"];
2677
+ };
2678
+ };
2679
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2680
+ 403: {
2681
+ headers: {
2682
+ [name: string]: unknown;
2683
+ };
2684
+ content: {
2685
+ "application/json": components["schemas"]["ErrorEnvelope"];
2686
+ };
2687
+ };
2688
+ /** @description No such limit (code: not_found). */
2689
+ 404: {
2690
+ headers: {
2691
+ [name: string]: unknown;
2692
+ };
2693
+ content: {
2694
+ "application/json": components["schemas"]["ErrorEnvelope"];
2695
+ };
2696
+ };
2697
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2698
+ 429: {
2699
+ headers: {
2700
+ [name: string]: unknown;
2701
+ };
2702
+ content: {
2703
+ "application/json": components["schemas"]["ErrorEnvelope"];
2704
+ };
2705
+ };
2706
+ };
2707
+ };
2708
+ "usage.standing": {
2709
+ parameters: {
2710
+ query: {
2711
+ /** @description The subject's id, as your checks send it. */
2712
+ id: string;
2713
+ /** @description The subject's kind, as your checks send it. */
2714
+ kind: string;
2715
+ /** @description Shared subjects to include, comma-separated `kind:id` (up to 4). */
2716
+ shared?: string;
2717
+ };
2718
+ header?: {
2719
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2720
+ "x-environment"?: string;
2721
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2722
+ "x-workspace"?: string;
2723
+ };
2724
+ path?: never;
2725
+ cookie?: never;
2726
+ };
2727
+ requestBody?: never;
2728
+ responses: {
2729
+ /** @description Where the subject stands. */
2730
+ 200: {
2731
+ headers: {
2732
+ [name: string]: unknown;
2733
+ };
2734
+ content: {
2735
+ "application/json": components["schemas"]["UsageStanding"];
2736
+ };
2737
+ };
2738
+ /** @description Invalid subject (code: invalid_request). */
2739
+ 400: {
2740
+ headers: {
2741
+ [name: string]: unknown;
2742
+ };
2743
+ content: {
2744
+ "application/json": components["schemas"]["ErrorEnvelope"];
2745
+ };
2746
+ };
2747
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2748
+ 401: {
2749
+ headers: {
2750
+ [name: string]: unknown;
2751
+ };
2752
+ content: {
2753
+ "application/json": components["schemas"]["ErrorEnvelope"];
2754
+ };
2755
+ };
2756
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2757
+ 403: {
2758
+ headers: {
2759
+ [name: string]: unknown;
2760
+ };
2761
+ content: {
2762
+ "application/json": components["schemas"]["ErrorEnvelope"];
2763
+ };
2764
+ };
2765
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2766
+ 429: {
2767
+ headers: {
2768
+ [name: string]: unknown;
2769
+ };
2770
+ content: {
2771
+ "application/json": components["schemas"]["ErrorEnvelope"];
2772
+ };
2773
+ };
2774
+ /** @description Checks are unavailable (code: internal_error). */
2775
+ 503: {
2776
+ headers: {
2777
+ [name: string]: unknown;
2778
+ };
2779
+ content: {
2780
+ "application/json": components["schemas"]["ErrorEnvelope"];
2781
+ };
2782
+ };
2783
+ };
2784
+ };
2785
+ "usage.subjects": {
2786
+ parameters: {
2787
+ query: {
2788
+ /** @description How many subjects, most used first: 1–200. Default 50. */
2789
+ limit?: number;
2790
+ /** @description The limit. */
2791
+ limitId: string;
2792
+ };
2793
+ header?: {
2794
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2795
+ "x-environment"?: string;
2796
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2797
+ "x-workspace"?: string;
2798
+ };
2799
+ path?: never;
2800
+ cookie?: never;
2801
+ };
2802
+ requestBody?: never;
2803
+ responses: {
2804
+ /** @description The subjects. */
2805
+ 200: {
2806
+ headers: {
2807
+ [name: string]: unknown;
2808
+ };
2809
+ content: {
2810
+ "application/json": components["schemas"]["UsageBySubject"];
2811
+ };
2812
+ };
2813
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2814
+ 401: {
2815
+ headers: {
2816
+ [name: string]: unknown;
2817
+ };
2818
+ content: {
2819
+ "application/json": components["schemas"]["ErrorEnvelope"];
2820
+ };
2821
+ };
2822
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2823
+ 403: {
2824
+ headers: {
2825
+ [name: string]: unknown;
2826
+ };
2827
+ content: {
2828
+ "application/json": components["schemas"]["ErrorEnvelope"];
2829
+ };
2830
+ };
2831
+ /** @description No such limit (code: not_found). */
2832
+ 404: {
2833
+ headers: {
2834
+ [name: string]: unknown;
2835
+ };
2836
+ content: {
2837
+ "application/json": components["schemas"]["ErrorEnvelope"];
2838
+ };
2839
+ };
2840
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2841
+ 429: {
2842
+ headers: {
2843
+ [name: string]: unknown;
2844
+ };
2845
+ content: {
2846
+ "application/json": components["schemas"]["ErrorEnvelope"];
2847
+ };
2848
+ };
2849
+ };
2850
+ };
2851
+ "user.me": {
2852
+ parameters: {
2853
+ query?: never;
2854
+ header?: never;
2855
+ path?: never;
2856
+ cookie?: never;
2857
+ };
2858
+ requestBody?: never;
2859
+ responses: {
2860
+ /** @description The user the token authenticates. */
2861
+ 200: {
2862
+ headers: {
2863
+ [name: string]: unknown;
2864
+ };
2865
+ content: {
2866
+ "application/json": components["schemas"]["UserMe"];
2867
+ };
2868
+ };
2869
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2870
+ 401: {
2871
+ headers: {
2872
+ [name: string]: unknown;
2873
+ };
2874
+ content: {
2875
+ "application/json": components["schemas"]["ErrorEnvelope"];
2876
+ };
2877
+ };
2878
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2879
+ 403: {
2880
+ headers: {
2881
+ [name: string]: unknown;
2882
+ };
2883
+ content: {
2884
+ "application/json": components["schemas"]["ErrorEnvelope"];
2885
+ };
2886
+ };
2887
+ /** @description Personal access tokens are disabled in this deployment (code: not_found). */
2888
+ 404: {
2889
+ headers: {
2890
+ [name: string]: unknown;
2891
+ };
2892
+ content: {
2893
+ "application/json": components["schemas"]["ErrorEnvelope"];
2894
+ };
2895
+ };
2896
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2897
+ 429: {
2898
+ headers: {
2899
+ [name: string]: unknown;
2900
+ };
2901
+ content: {
2902
+ "application/json": components["schemas"]["ErrorEnvelope"];
2903
+ };
2904
+ };
2905
+ };
2906
+ };
2907
+ "user.revokeToken": {
2908
+ parameters: {
2909
+ query?: never;
2910
+ header?: never;
2911
+ path?: never;
2912
+ cookie?: never;
2913
+ };
2914
+ requestBody?: never;
2915
+ responses: {
2916
+ /** @description Revoked. */
2917
+ 204: {
2918
+ headers: {
2919
+ [name: string]: unknown;
2920
+ };
2921
+ content?: never;
2922
+ };
2923
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2924
+ 401: {
2925
+ headers: {
2926
+ [name: string]: unknown;
2927
+ };
2928
+ content: {
2929
+ "application/json": components["schemas"]["ErrorEnvelope"];
2930
+ };
2931
+ };
2932
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2933
+ 403: {
2934
+ headers: {
2935
+ [name: string]: unknown;
2936
+ };
2937
+ content: {
2938
+ "application/json": components["schemas"]["ErrorEnvelope"];
2939
+ };
2940
+ };
2941
+ /** @description Personal access tokens are disabled in this deployment (code: not_found). */
2942
+ 404: {
2943
+ headers: {
2944
+ [name: string]: unknown;
2945
+ };
2946
+ content: {
2947
+ "application/json": components["schemas"]["ErrorEnvelope"];
2948
+ };
2949
+ };
2950
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
2951
+ 429: {
2952
+ headers: {
2953
+ [name: string]: unknown;
2954
+ };
2955
+ content: {
2956
+ "application/json": components["schemas"]["ErrorEnvelope"];
2957
+ };
2958
+ };
2959
+ };
2960
+ };
2961
+ "workspace.get": {
2962
+ parameters: {
2963
+ query?: never;
2964
+ header?: {
2965
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
2966
+ "x-environment"?: string;
2967
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
2968
+ "x-workspace"?: string;
2969
+ };
2970
+ path?: never;
2971
+ cookie?: never;
2972
+ };
2973
+ requestBody?: never;
2974
+ responses: {
2975
+ /** @description The Workspace the key authenticates. */
2976
+ 200: {
2977
+ headers: {
2978
+ [name: string]: unknown;
2979
+ };
2980
+ content: {
2981
+ "application/json": components["schemas"]["Workspace"];
2982
+ };
2983
+ };
2984
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
2985
+ 401: {
2986
+ headers: {
2987
+ [name: string]: unknown;
2988
+ };
2989
+ content: {
2990
+ "application/json": components["schemas"]["ErrorEnvelope"];
2991
+ };
2992
+ };
2993
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
2994
+ 403: {
2995
+ headers: {
2996
+ [name: string]: unknown;
2997
+ };
2998
+ content: {
2999
+ "application/json": components["schemas"]["ErrorEnvelope"];
3000
+ };
3001
+ };
3002
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3003
+ 429: {
3004
+ headers: {
3005
+ [name: string]: unknown;
3006
+ };
3007
+ content: {
3008
+ "application/json": components["schemas"]["ErrorEnvelope"];
3009
+ };
3010
+ };
3011
+ };
3012
+ };
3013
+ "workspace.approvalActions.list": {
3014
+ parameters: {
3015
+ query?: never;
3016
+ header?: {
3017
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3018
+ "x-environment"?: string;
3019
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3020
+ "x-workspace"?: string;
3021
+ };
3022
+ path?: never;
3023
+ cookie?: never;
3024
+ };
3025
+ requestBody?: never;
3026
+ responses: {
3027
+ /** @description The approvable actions. */
3028
+ 200: {
3029
+ headers: {
3030
+ [name: string]: unknown;
3031
+ };
3032
+ content: {
3033
+ "application/json": {
3034
+ items: {
3035
+ approverRoles: string[];
3036
+ createsSecret: boolean;
3037
+ id: string;
3038
+ input: {
3039
+ [key: string]: unknown;
3040
+ };
3041
+ title: string;
3042
+ }[];
3043
+ };
3044
+ };
3045
+ };
3046
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3047
+ 401: {
3048
+ headers: {
3049
+ [name: string]: unknown;
3050
+ };
3051
+ content: {
3052
+ "application/json": components["schemas"]["ErrorEnvelope"];
3053
+ };
3054
+ };
3055
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3056
+ 403: {
3057
+ headers: {
3058
+ [name: string]: unknown;
3059
+ };
3060
+ content: {
3061
+ "application/json": components["schemas"]["ErrorEnvelope"];
3062
+ };
3063
+ };
3064
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3065
+ 429: {
3066
+ headers: {
3067
+ [name: string]: unknown;
3068
+ };
3069
+ content: {
3070
+ "application/json": components["schemas"]["ErrorEnvelope"];
3071
+ };
3072
+ };
3073
+ };
3074
+ };
3075
+ "workspace.approvalRequests.create": {
3076
+ parameters: {
3077
+ query?: never;
3078
+ header?: {
3079
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3080
+ "x-environment"?: string;
3081
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3082
+ "x-workspace"?: string;
3083
+ };
3084
+ path?: never;
3085
+ cookie?: never;
3086
+ };
3087
+ requestBody?: {
3088
+ content: {
3089
+ "application/json": {
3090
+ /**
3091
+ * @description An action id from approval-actions.
3092
+ * @example workspace.apiKey.create
3093
+ */
3094
+ action: string;
3095
+ /**
3096
+ * @description The action's input, per its JSON Schema.
3097
+ * @example {
3098
+ * "name": "acme-web",
3099
+ * "scopes": [
3100
+ * "workspace:read"
3101
+ * ]
3102
+ * }
3103
+ */
3104
+ input: {
3105
+ [key: string]: unknown;
3106
+ };
3107
+ /** @description Why — the person reads it before deciding. */
3108
+ reason: string;
3109
+ };
3110
+ };
3111
+ };
3112
+ responses: {
3113
+ /** @description The request, pending. */
3114
+ 201: {
3115
+ headers: {
3116
+ [name: string]: unknown;
3117
+ };
3118
+ content: {
3119
+ "application/json": components["schemas"]["ApprovalRequest"];
3120
+ };
3121
+ };
3122
+ /** @description Unknown action or invalid input (code: invalid_request). */
3123
+ 400: {
3124
+ headers: {
3125
+ [name: string]: unknown;
3126
+ };
3127
+ content: {
3128
+ "application/json": components["schemas"]["ErrorEnvelope"];
3129
+ };
3130
+ };
3131
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3132
+ 401: {
3133
+ headers: {
3134
+ [name: string]: unknown;
3135
+ };
3136
+ content: {
3137
+ "application/json": components["schemas"]["ErrorEnvelope"];
3138
+ };
3139
+ };
3140
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3141
+ 403: {
3142
+ headers: {
3143
+ [name: string]: unknown;
3144
+ };
3145
+ content: {
3146
+ "application/json": components["schemas"]["ErrorEnvelope"];
3147
+ };
3148
+ };
3149
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3150
+ 429: {
3151
+ headers: {
3152
+ [name: string]: unknown;
3153
+ };
3154
+ content: {
3155
+ "application/json": components["schemas"]["ErrorEnvelope"];
3156
+ };
3157
+ };
3158
+ };
3159
+ };
3160
+ "workspace.approvalRequests.get": {
3161
+ parameters: {
3162
+ query?: never;
3163
+ header?: {
3164
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3165
+ "x-environment"?: string;
3166
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3167
+ "x-workspace"?: string;
3168
+ };
3169
+ path: {
3170
+ /** @description The request's id. */
3171
+ requestId: string;
3172
+ };
3173
+ cookie?: never;
3174
+ };
3175
+ requestBody?: never;
3176
+ responses: {
3177
+ /** @description The request. */
3178
+ 200: {
3179
+ headers: {
3180
+ [name: string]: unknown;
3181
+ };
3182
+ content: {
3183
+ "application/json": components["schemas"]["ApprovalRequest"];
3184
+ };
3185
+ };
3186
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3187
+ 401: {
3188
+ headers: {
3189
+ [name: string]: unknown;
3190
+ };
3191
+ content: {
3192
+ "application/json": components["schemas"]["ErrorEnvelope"];
3193
+ };
3194
+ };
3195
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3196
+ 403: {
3197
+ headers: {
3198
+ [name: string]: unknown;
3199
+ };
3200
+ content: {
3201
+ "application/json": components["schemas"]["ErrorEnvelope"];
3202
+ };
3203
+ };
3204
+ /** @description Not one of yours (code: not_found). */
3205
+ 404: {
3206
+ headers: {
3207
+ [name: string]: unknown;
3208
+ };
3209
+ content: {
3210
+ "application/json": components["schemas"]["ErrorEnvelope"];
3211
+ };
3212
+ };
3213
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3214
+ 429: {
3215
+ headers: {
3216
+ [name: string]: unknown;
3217
+ };
3218
+ content: {
3219
+ "application/json": components["schemas"]["ErrorEnvelope"];
3220
+ };
3221
+ };
3222
+ };
3223
+ };
3224
+ "workspace.approvalRequests.redeem": {
3225
+ parameters: {
3226
+ query?: never;
3227
+ header?: {
3228
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3229
+ "x-environment"?: string;
3230
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3231
+ "x-workspace"?: string;
3232
+ };
3233
+ path: {
3234
+ /** @description The request's id. */
3235
+ requestId: string;
3236
+ };
3237
+ cookie?: never;
3238
+ };
3239
+ requestBody?: never;
3240
+ responses: {
3241
+ /** @description Done; the secret, once. */
3242
+ 200: {
3243
+ headers: {
3244
+ [name: string]: unknown;
3245
+ };
3246
+ content: {
3247
+ "application/json": {
3248
+ envVar: string | null;
3249
+ request: components["schemas"]["ApprovalRequest"];
3250
+ secret: string | null;
3251
+ };
3252
+ };
3253
+ };
3254
+ /** @description Not approved, already redeemed or expired (code: invalid_request). */
3255
+ 400: {
3256
+ headers: {
3257
+ [name: string]: unknown;
3258
+ };
3259
+ content: {
3260
+ "application/json": components["schemas"]["ErrorEnvelope"];
3261
+ };
3262
+ };
3263
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3264
+ 401: {
3265
+ headers: {
3266
+ [name: string]: unknown;
3267
+ };
3268
+ content: {
3269
+ "application/json": components["schemas"]["ErrorEnvelope"];
3270
+ };
3271
+ };
3272
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3273
+ 403: {
3274
+ headers: {
3275
+ [name: string]: unknown;
3276
+ };
3277
+ content: {
3278
+ "application/json": components["schemas"]["ErrorEnvelope"];
3279
+ };
3280
+ };
3281
+ /** @description Not yours (code: not_found). */
3282
+ 404: {
3283
+ headers: {
3284
+ [name: string]: unknown;
3285
+ };
3286
+ content: {
3287
+ "application/json": components["schemas"]["ErrorEnvelope"];
3288
+ };
3289
+ };
3290
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3291
+ 429: {
3292
+ headers: {
3293
+ [name: string]: unknown;
3294
+ };
3295
+ content: {
3296
+ "application/json": components["schemas"]["ErrorEnvelope"];
3297
+ };
3298
+ };
3299
+ };
3300
+ };
3301
+ "workspace.auditEvents.list": {
3302
+ parameters: {
3303
+ query?: {
3304
+ /** @description Opaque token from a previous page's nextCursor. */
3305
+ cursor?: string;
3306
+ /** @description Items per page, 1–100 (default 25). */
3307
+ limit?: number;
3308
+ };
3309
+ header?: {
3310
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3311
+ "x-environment"?: string;
3312
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3313
+ "x-workspace"?: string;
3314
+ };
3315
+ path?: never;
3316
+ cookie?: never;
3317
+ };
3318
+ requestBody?: never;
3319
+ responses: {
3320
+ /** @description One page of audit events, newest first. */
3321
+ 200: {
3322
+ headers: {
3323
+ [name: string]: unknown;
3324
+ };
3325
+ content: {
3326
+ "application/json": components["schemas"]["AuditEventPage"];
3327
+ };
3328
+ };
3329
+ /** @description Malformed cursor or query (code: invalid_request). */
3330
+ 400: {
3331
+ headers: {
3332
+ [name: string]: unknown;
3333
+ };
3334
+ content: {
3335
+ "application/json": components["schemas"]["ErrorEnvelope"];
3336
+ };
3337
+ };
3338
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3339
+ 401: {
3340
+ headers: {
3341
+ [name: string]: unknown;
3342
+ };
3343
+ content: {
3344
+ "application/json": components["schemas"]["ErrorEnvelope"];
3345
+ };
3346
+ };
3347
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3348
+ 403: {
3349
+ headers: {
3350
+ [name: string]: unknown;
3351
+ };
3352
+ content: {
3353
+ "application/json": components["schemas"]["ErrorEnvelope"];
3354
+ };
3355
+ };
3356
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3357
+ 429: {
3358
+ headers: {
3359
+ [name: string]: unknown;
3360
+ };
3361
+ content: {
3362
+ "application/json": components["schemas"]["ErrorEnvelope"];
3363
+ };
3364
+ };
3365
+ };
3366
+ };
3367
+ "workspace.eventTypes.list": {
3368
+ parameters: {
3369
+ query?: never;
3370
+ header?: {
3371
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3372
+ "x-environment"?: string;
3373
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3374
+ "x-workspace"?: string;
3375
+ };
3376
+ path?: never;
3377
+ cookie?: never;
3378
+ };
3379
+ requestBody?: never;
3380
+ responses: {
3381
+ /** @description The event types. */
3382
+ 200: {
3383
+ headers: {
3384
+ [name: string]: unknown;
3385
+ };
3386
+ content: {
3387
+ "application/json": {
3388
+ items: {
3389
+ description: string;
3390
+ /** @example workspace.member.joined */
3391
+ type: string;
3392
+ }[];
3393
+ };
3394
+ };
3395
+ };
3396
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3397
+ 401: {
3398
+ headers: {
3399
+ [name: string]: unknown;
3400
+ };
3401
+ content: {
3402
+ "application/json": components["schemas"]["ErrorEnvelope"];
3403
+ };
3404
+ };
3405
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3406
+ 403: {
3407
+ headers: {
3408
+ [name: string]: unknown;
3409
+ };
3410
+ content: {
3411
+ "application/json": components["schemas"]["ErrorEnvelope"];
3412
+ };
3413
+ };
3414
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3415
+ 429: {
3416
+ headers: {
3417
+ [name: string]: unknown;
3418
+ };
3419
+ content: {
3420
+ "application/json": components["schemas"]["ErrorEnvelope"];
3421
+ };
3422
+ };
3423
+ };
3424
+ };
3425
+ "workspace.invitations.list": {
3426
+ parameters: {
3427
+ query?: {
3428
+ /** @description Opaque token from a previous page's nextCursor. */
3429
+ cursor?: string;
3430
+ /** @description Items per page, 1–100 (default 25). */
3431
+ limit?: number;
3432
+ };
3433
+ header?: {
3434
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3435
+ "x-environment"?: string;
3436
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3437
+ "x-workspace"?: string;
3438
+ };
3439
+ path?: never;
3440
+ cookie?: never;
3441
+ };
3442
+ requestBody?: never;
3443
+ responses: {
3444
+ /** @description One page of pending invitations, newest first. */
3445
+ 200: {
3446
+ headers: {
3447
+ [name: string]: unknown;
3448
+ };
3449
+ content: {
3450
+ "application/json": components["schemas"]["InvitationPage"];
3451
+ };
3452
+ };
3453
+ /** @description Malformed cursor or query (code: invalid_request). */
3454
+ 400: {
3455
+ headers: {
3456
+ [name: string]: unknown;
3457
+ };
3458
+ content: {
3459
+ "application/json": components["schemas"]["ErrorEnvelope"];
3460
+ };
3461
+ };
3462
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3463
+ 401: {
3464
+ headers: {
3465
+ [name: string]: unknown;
3466
+ };
3467
+ content: {
3468
+ "application/json": components["schemas"]["ErrorEnvelope"];
3469
+ };
3470
+ };
3471
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3472
+ 403: {
3473
+ headers: {
3474
+ [name: string]: unknown;
3475
+ };
3476
+ content: {
3477
+ "application/json": components["schemas"]["ErrorEnvelope"];
3478
+ };
3479
+ };
3480
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3481
+ 429: {
3482
+ headers: {
3483
+ [name: string]: unknown;
3484
+ };
3485
+ content: {
3486
+ "application/json": components["schemas"]["ErrorEnvelope"];
3487
+ };
3488
+ };
3489
+ };
3490
+ };
3491
+ "workspace.members.list": {
3492
+ parameters: {
3493
+ query?: {
3494
+ /** @description Opaque token from a previous page's nextCursor. */
3495
+ cursor?: string;
3496
+ /** @description Items per page, 1–100 (default 25). */
3497
+ limit?: number;
3498
+ };
3499
+ header?: {
3500
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3501
+ "x-environment"?: string;
3502
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3503
+ "x-workspace"?: string;
3504
+ };
3505
+ path?: never;
3506
+ cookie?: never;
3507
+ };
3508
+ requestBody?: never;
3509
+ responses: {
3510
+ /** @description One page of members, newest first. */
3511
+ 200: {
3512
+ headers: {
3513
+ [name: string]: unknown;
3514
+ };
3515
+ content: {
3516
+ "application/json": components["schemas"]["MemberPage"];
3517
+ };
3518
+ };
3519
+ /** @description Malformed cursor or query (code: invalid_request). */
3520
+ 400: {
3521
+ headers: {
3522
+ [name: string]: unknown;
3523
+ };
3524
+ content: {
3525
+ "application/json": components["schemas"]["ErrorEnvelope"];
3526
+ };
3527
+ };
3528
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3529
+ 401: {
3530
+ headers: {
3531
+ [name: string]: unknown;
3532
+ };
3533
+ content: {
3534
+ "application/json": components["schemas"]["ErrorEnvelope"];
3535
+ };
3536
+ };
3537
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3538
+ 403: {
3539
+ headers: {
3540
+ [name: string]: unknown;
3541
+ };
3542
+ content: {
3543
+ "application/json": components["schemas"]["ErrorEnvelope"];
3544
+ };
3545
+ };
3546
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3547
+ 429: {
3548
+ headers: {
3549
+ [name: string]: unknown;
3550
+ };
3551
+ content: {
3552
+ "application/json": components["schemas"]["ErrorEnvelope"];
3553
+ };
3554
+ };
3555
+ };
3556
+ };
3557
+ "workspace.teams.list": {
3558
+ parameters: {
3559
+ query?: {
3560
+ /** @description Opaque token from a previous page's nextCursor. */
3561
+ cursor?: string;
3562
+ /** @description Items per page, 1–100 (default 25). */
3563
+ limit?: number;
3564
+ };
3565
+ header?: {
3566
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3567
+ "x-environment"?: string;
3568
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3569
+ "x-workspace"?: string;
3570
+ };
3571
+ path?: never;
3572
+ cookie?: never;
3573
+ };
3574
+ requestBody?: never;
3575
+ responses: {
3576
+ /** @description One page of teams, newest first. */
3577
+ 200: {
3578
+ headers: {
3579
+ [name: string]: unknown;
3580
+ };
3581
+ content: {
3582
+ "application/json": components["schemas"]["TeamPage"];
3583
+ };
3584
+ };
3585
+ /** @description Malformed cursor or query (code: invalid_request). */
3586
+ 400: {
3587
+ headers: {
3588
+ [name: string]: unknown;
3589
+ };
3590
+ content: {
3591
+ "application/json": components["schemas"]["ErrorEnvelope"];
3592
+ };
3593
+ };
3594
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3595
+ 401: {
3596
+ headers: {
3597
+ [name: string]: unknown;
3598
+ };
3599
+ content: {
3600
+ "application/json": components["schemas"]["ErrorEnvelope"];
3601
+ };
3602
+ };
3603
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3604
+ 403: {
3605
+ headers: {
3606
+ [name: string]: unknown;
3607
+ };
3608
+ content: {
3609
+ "application/json": components["schemas"]["ErrorEnvelope"];
3610
+ };
3611
+ };
3612
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3613
+ 429: {
3614
+ headers: {
3615
+ [name: string]: unknown;
3616
+ };
3617
+ content: {
3618
+ "application/json": components["schemas"]["ErrorEnvelope"];
3619
+ };
3620
+ };
3621
+ };
3622
+ };
3623
+ "workspace.usage": {
3624
+ parameters: {
3625
+ query?: never;
3626
+ header?: {
3627
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3628
+ "x-environment"?: string;
3629
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3630
+ "x-workspace"?: string;
3631
+ };
3632
+ path?: never;
3633
+ cookie?: never;
3634
+ };
3635
+ requestBody?: never;
3636
+ responses: {
3637
+ /** @description This period's usage. */
3638
+ 200: {
3639
+ headers: {
3640
+ [name: string]: unknown;
3641
+ };
3642
+ content: {
3643
+ "application/json": components["schemas"]["WorkspaceUsage"];
3644
+ };
3645
+ };
3646
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3647
+ 401: {
3648
+ headers: {
3649
+ [name: string]: unknown;
3650
+ };
3651
+ content: {
3652
+ "application/json": components["schemas"]["ErrorEnvelope"];
3653
+ };
3654
+ };
3655
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3656
+ 403: {
3657
+ headers: {
3658
+ [name: string]: unknown;
3659
+ };
3660
+ content: {
3661
+ "application/json": components["schemas"]["ErrorEnvelope"];
3662
+ };
3663
+ };
3664
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3665
+ 429: {
3666
+ headers: {
3667
+ [name: string]: unknown;
3668
+ };
3669
+ content: {
3670
+ "application/json": components["schemas"]["ErrorEnvelope"];
3671
+ };
3672
+ };
3673
+ };
3674
+ };
3675
+ "workspace.webhookEndpoints.list": {
3676
+ parameters: {
3677
+ query?: never;
3678
+ header?: {
3679
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3680
+ "x-environment"?: string;
3681
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3682
+ "x-workspace"?: string;
3683
+ };
3684
+ path?: never;
3685
+ cookie?: never;
3686
+ };
3687
+ requestBody?: never;
3688
+ responses: {
3689
+ /** @description The endpoints. */
3690
+ 200: {
3691
+ headers: {
3692
+ [name: string]: unknown;
3693
+ };
3694
+ content: {
3695
+ "application/json": components["schemas"]["WebhookEndpointPage"];
3696
+ };
3697
+ };
3698
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3699
+ 401: {
3700
+ headers: {
3701
+ [name: string]: unknown;
3702
+ };
3703
+ content: {
3704
+ "application/json": components["schemas"]["ErrorEnvelope"];
3705
+ };
3706
+ };
3707
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3708
+ 403: {
3709
+ headers: {
3710
+ [name: string]: unknown;
3711
+ };
3712
+ content: {
3713
+ "application/json": components["schemas"]["ErrorEnvelope"];
3714
+ };
3715
+ };
3716
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3717
+ 429: {
3718
+ headers: {
3719
+ [name: string]: unknown;
3720
+ };
3721
+ content: {
3722
+ "application/json": components["schemas"]["ErrorEnvelope"];
3723
+ };
3724
+ };
3725
+ };
3726
+ };
3727
+ "workspace.webhookEndpoints.create": {
3728
+ parameters: {
3729
+ query?: never;
3730
+ header?: {
3731
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3732
+ "x-environment"?: string;
3733
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3734
+ "x-workspace"?: string;
3735
+ };
3736
+ path?: never;
3737
+ cookie?: never;
3738
+ };
3739
+ requestBody?: {
3740
+ content: {
3741
+ "application/json": {
3742
+ /** @description A note for people managing the endpoint. */
3743
+ description?: string;
3744
+ /**
3745
+ * @description Only these event types (see event-types); omit for every event.
3746
+ * @example [
3747
+ * "workspace.member.joined"
3748
+ * ]
3749
+ */
3750
+ eventTypes?: string[];
3751
+ /**
3752
+ * @description The https URL that receives the events.
3753
+ * @example https://example.com/hooks
3754
+ */
3755
+ url: string;
3756
+ };
3757
+ };
3758
+ };
3759
+ responses: {
3760
+ /** @description The endpoint and its signing secret (shown once). */
3761
+ 201: {
3762
+ headers: {
3763
+ [name: string]: unknown;
3764
+ };
3765
+ content: {
3766
+ "application/json": components["schemas"]["WebhookEndpointCreated"];
3767
+ };
3768
+ };
3769
+ /** @description Invalid request (code: invalid_request). */
3770
+ 400: {
3771
+ headers: {
3772
+ [name: string]: unknown;
3773
+ };
3774
+ content: {
3775
+ "application/json": components["schemas"]["ErrorEnvelope"];
3776
+ };
3777
+ };
3778
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3779
+ 401: {
3780
+ headers: {
3781
+ [name: string]: unknown;
3782
+ };
3783
+ content: {
3784
+ "application/json": components["schemas"]["ErrorEnvelope"];
3785
+ };
3786
+ };
3787
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3788
+ 403: {
3789
+ headers: {
3790
+ [name: string]: unknown;
3791
+ };
3792
+ content: {
3793
+ "application/json": components["schemas"]["ErrorEnvelope"];
3794
+ };
3795
+ };
3796
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3797
+ 429: {
3798
+ headers: {
3799
+ [name: string]: unknown;
3800
+ };
3801
+ content: {
3802
+ "application/json": components["schemas"]["ErrorEnvelope"];
3803
+ };
3804
+ };
3805
+ };
3806
+ };
3807
+ "workspace.webhookEndpoints.get": {
3808
+ parameters: {
3809
+ query?: never;
3810
+ header?: {
3811
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3812
+ "x-environment"?: string;
3813
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3814
+ "x-workspace"?: string;
3815
+ };
3816
+ path: {
3817
+ endpointId: string;
3818
+ };
3819
+ cookie?: never;
3820
+ };
3821
+ requestBody?: never;
3822
+ responses: {
3823
+ /** @description The endpoint. */
3824
+ 200: {
3825
+ headers: {
3826
+ [name: string]: unknown;
3827
+ };
3828
+ content: {
3829
+ "application/json": components["schemas"]["WebhookEndpoint"];
3830
+ };
3831
+ };
3832
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3833
+ 401: {
3834
+ headers: {
3835
+ [name: string]: unknown;
3836
+ };
3837
+ content: {
3838
+ "application/json": components["schemas"]["ErrorEnvelope"];
3839
+ };
3840
+ };
3841
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3842
+ 403: {
3843
+ headers: {
3844
+ [name: string]: unknown;
3845
+ };
3846
+ content: {
3847
+ "application/json": components["schemas"]["ErrorEnvelope"];
3848
+ };
3849
+ };
3850
+ /** @description No such endpoint (or delivery) in this workspace (code: not_found). */
3851
+ 404: {
3852
+ headers: {
3853
+ [name: string]: unknown;
3854
+ };
3855
+ content: {
3856
+ "application/json": components["schemas"]["ErrorEnvelope"];
3857
+ };
3858
+ };
3859
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3860
+ 429: {
3861
+ headers: {
3862
+ [name: string]: unknown;
3863
+ };
3864
+ content: {
3865
+ "application/json": components["schemas"]["ErrorEnvelope"];
3866
+ };
3867
+ };
3868
+ };
3869
+ };
3870
+ "workspace.webhookEndpoints.delete": {
3871
+ parameters: {
3872
+ query?: never;
3873
+ header?: {
3874
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3875
+ "x-environment"?: string;
3876
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3877
+ "x-workspace"?: string;
3878
+ };
3879
+ path: {
3880
+ endpointId: string;
3881
+ };
3882
+ cookie?: never;
3883
+ };
3884
+ requestBody?: never;
3885
+ responses: {
3886
+ /** @description Removed. */
3887
+ 204: {
3888
+ headers: {
3889
+ [name: string]: unknown;
3890
+ };
3891
+ content?: never;
3892
+ };
3893
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3894
+ 401: {
3895
+ headers: {
3896
+ [name: string]: unknown;
3897
+ };
3898
+ content: {
3899
+ "application/json": components["schemas"]["ErrorEnvelope"];
3900
+ };
3901
+ };
3902
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3903
+ 403: {
3904
+ headers: {
3905
+ [name: string]: unknown;
3906
+ };
3907
+ content: {
3908
+ "application/json": components["schemas"]["ErrorEnvelope"];
3909
+ };
3910
+ };
3911
+ /** @description No such endpoint (or delivery) in this workspace (code: not_found). */
3912
+ 404: {
3913
+ headers: {
3914
+ [name: string]: unknown;
3915
+ };
3916
+ content: {
3917
+ "application/json": components["schemas"]["ErrorEnvelope"];
3918
+ };
3919
+ };
3920
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3921
+ 429: {
3922
+ headers: {
3923
+ [name: string]: unknown;
3924
+ };
3925
+ content: {
3926
+ "application/json": components["schemas"]["ErrorEnvelope"];
3927
+ };
3928
+ };
3929
+ };
3930
+ };
3931
+ "workspace.webhookDeliveries.list": {
3932
+ parameters: {
3933
+ query?: {
3934
+ /** @description Opaque token from a previous page's nextCursor. */
3935
+ cursor?: string;
3936
+ /** @description Items per page, 1–100 (default 25). */
3937
+ limit?: number;
3938
+ };
3939
+ header?: {
3940
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
3941
+ "x-environment"?: string;
3942
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
3943
+ "x-workspace"?: string;
3944
+ };
3945
+ path: {
3946
+ endpointId: string;
3947
+ };
3948
+ cookie?: never;
3949
+ };
3950
+ requestBody?: never;
3951
+ responses: {
3952
+ /** @description One page of deliveries. */
3953
+ 200: {
3954
+ headers: {
3955
+ [name: string]: unknown;
3956
+ };
3957
+ content: {
3958
+ "application/json": components["schemas"]["WebhookDeliveryPage"];
3959
+ };
3960
+ };
3961
+ /** @description Invalid request (code: invalid_request). */
3962
+ 400: {
3963
+ headers: {
3964
+ [name: string]: unknown;
3965
+ };
3966
+ content: {
3967
+ "application/json": components["schemas"]["ErrorEnvelope"];
3968
+ };
3969
+ };
3970
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
3971
+ 401: {
3972
+ headers: {
3973
+ [name: string]: unknown;
3974
+ };
3975
+ content: {
3976
+ "application/json": components["schemas"]["ErrorEnvelope"];
3977
+ };
3978
+ };
3979
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
3980
+ 403: {
3981
+ headers: {
3982
+ [name: string]: unknown;
3983
+ };
3984
+ content: {
3985
+ "application/json": components["schemas"]["ErrorEnvelope"];
3986
+ };
3987
+ };
3988
+ /** @description No such endpoint (or delivery) in this workspace (code: not_found). */
3989
+ 404: {
3990
+ headers: {
3991
+ [name: string]: unknown;
3992
+ };
3993
+ content: {
3994
+ "application/json": components["schemas"]["ErrorEnvelope"];
3995
+ };
3996
+ };
3997
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
3998
+ 429: {
3999
+ headers: {
4000
+ [name: string]: unknown;
4001
+ };
4002
+ content: {
4003
+ "application/json": components["schemas"]["ErrorEnvelope"];
4004
+ };
4005
+ };
4006
+ };
4007
+ };
4008
+ "workspace.webhookDeliveries.redeliver": {
4009
+ parameters: {
4010
+ query?: never;
4011
+ header?: {
4012
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
4013
+ "x-environment"?: string;
4014
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
4015
+ "x-workspace"?: string;
4016
+ };
4017
+ path: {
4018
+ deliveryId: string;
4019
+ endpointId: string;
4020
+ };
4021
+ cookie?: never;
4022
+ };
4023
+ requestBody?: never;
4024
+ responses: {
4025
+ /** @description The redelivery was sent or queued. */
4026
+ 202: {
4027
+ headers: {
4028
+ [name: string]: unknown;
4029
+ };
4030
+ content: {
4031
+ "application/json": components["schemas"]["WebhookDeliveryOutcome"];
4032
+ };
4033
+ };
4034
+ /** @description Invalid request (code: invalid_request). */
4035
+ 400: {
4036
+ headers: {
4037
+ [name: string]: unknown;
4038
+ };
4039
+ content: {
4040
+ "application/json": components["schemas"]["ErrorEnvelope"];
4041
+ };
4042
+ };
4043
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
4044
+ 401: {
4045
+ headers: {
4046
+ [name: string]: unknown;
4047
+ };
4048
+ content: {
4049
+ "application/json": components["schemas"]["ErrorEnvelope"];
4050
+ };
4051
+ };
4052
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
4053
+ 403: {
4054
+ headers: {
4055
+ [name: string]: unknown;
4056
+ };
4057
+ content: {
4058
+ "application/json": components["schemas"]["ErrorEnvelope"];
4059
+ };
4060
+ };
4061
+ /** @description No such endpoint (or delivery) in this workspace (code: not_found). */
4062
+ 404: {
4063
+ headers: {
4064
+ [name: string]: unknown;
4065
+ };
4066
+ content: {
4067
+ "application/json": components["schemas"]["ErrorEnvelope"];
4068
+ };
4069
+ };
4070
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
4071
+ 429: {
4072
+ headers: {
4073
+ [name: string]: unknown;
4074
+ };
4075
+ content: {
4076
+ "application/json": components["schemas"]["ErrorEnvelope"];
4077
+ };
4078
+ };
4079
+ };
4080
+ };
4081
+ "workspace.webhookEndpoints.enable": {
4082
+ parameters: {
4083
+ query?: never;
4084
+ header?: {
4085
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
4086
+ "x-environment"?: string;
4087
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
4088
+ "x-workspace"?: string;
4089
+ };
4090
+ path: {
4091
+ endpointId: string;
4092
+ };
4093
+ cookie?: never;
4094
+ };
4095
+ requestBody?: never;
4096
+ responses: {
4097
+ /** @description The re-enabled endpoint. */
4098
+ 200: {
4099
+ headers: {
4100
+ [name: string]: unknown;
4101
+ };
4102
+ content: {
4103
+ "application/json": components["schemas"]["WebhookEndpoint"];
4104
+ };
4105
+ };
4106
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
4107
+ 401: {
4108
+ headers: {
4109
+ [name: string]: unknown;
4110
+ };
4111
+ content: {
4112
+ "application/json": components["schemas"]["ErrorEnvelope"];
4113
+ };
4114
+ };
4115
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
4116
+ 403: {
4117
+ headers: {
4118
+ [name: string]: unknown;
4119
+ };
4120
+ content: {
4121
+ "application/json": components["schemas"]["ErrorEnvelope"];
4122
+ };
4123
+ };
4124
+ /** @description No such endpoint (or delivery) in this workspace (code: not_found). */
4125
+ 404: {
4126
+ headers: {
4127
+ [name: string]: unknown;
4128
+ };
4129
+ content: {
4130
+ "application/json": components["schemas"]["ErrorEnvelope"];
4131
+ };
4132
+ };
4133
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
4134
+ 429: {
4135
+ headers: {
4136
+ [name: string]: unknown;
4137
+ };
4138
+ content: {
4139
+ "application/json": components["schemas"]["ErrorEnvelope"];
4140
+ };
4141
+ };
4142
+ };
4143
+ };
4144
+ "workspace.webhookEndpoints.test": {
4145
+ parameters: {
4146
+ query?: never;
4147
+ header?: {
4148
+ /** @description The environment the request acts in; without it, the product's default. An API key bound to an environment always acts in its own (403 naming another); an unknown environment is 400. */
4149
+ "x-environment"?: string;
4150
+ /** @description Workspace slug. REQUIRED when authenticating with a personal access token (400 without it); ignored for API keys. */
4151
+ "x-workspace"?: string;
4152
+ };
4153
+ path: {
4154
+ endpointId: string;
4155
+ };
4156
+ cookie?: never;
4157
+ };
4158
+ requestBody?: never;
4159
+ responses: {
4160
+ /** @description The test delivery was sent or queued. */
4161
+ 202: {
4162
+ headers: {
4163
+ [name: string]: unknown;
4164
+ };
4165
+ content: {
4166
+ "application/json": components["schemas"]["WebhookDeliveryOutcome"];
4167
+ };
4168
+ };
4169
+ /** @description Missing, malformed, invalid, revoked, or expired credential — API key or personal access token (code: unauthorized). */
4170
+ 401: {
4171
+ headers: {
4172
+ [name: string]: unknown;
4173
+ };
4174
+ content: {
4175
+ "application/json": components["schemas"]["ErrorEnvelope"];
4176
+ };
4177
+ };
4178
+ /** @description A personal access token that cannot act in the named workspace (unknown slug, not a member, or excluded by the token's scopes), is not granted this route's scope, or lacks the workspace role the route requires (code: forbidden). */
4179
+ 403: {
4180
+ headers: {
4181
+ [name: string]: unknown;
4182
+ };
4183
+ content: {
4184
+ "application/json": components["schemas"]["ErrorEnvelope"];
4185
+ };
4186
+ };
4187
+ /** @description No such endpoint (or delivery) in this workspace (code: not_found). */
4188
+ 404: {
4189
+ headers: {
4190
+ [name: string]: unknown;
4191
+ };
4192
+ content: {
4193
+ "application/json": components["schemas"]["ErrorEnvelope"];
4194
+ };
4195
+ };
4196
+ /** @description Per-key quota exhausted (code: rate_limited); retry after the Retry-After header. */
4197
+ 429: {
4198
+ headers: {
4199
+ [name: string]: unknown;
4200
+ };
4201
+ content: {
4202
+ "application/json": components["schemas"]["ErrorEnvelope"];
4203
+ };
4204
+ };
4205
+ };
4206
+ };
4207
+ }