@farthershore/client 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/README.md +9 -8
  3. package/dist/index.js +66 -54
  4. package/dist/types/api.generated.d.ts +13 -7
  5. package/dist/types/generated/schemas.d.ts +3670 -0
  6. package/dist/types/helpers/wait-for-frontend-build.d.ts +12 -4
  7. package/dist/types/index.d.ts +2 -2
  8. package/dist/types/operations/agents.d.ts +204 -12
  9. package/dist/types/operations/agreements.d.ts +139 -9
  10. package/dist/types/operations/analytics.d.ts +27 -5
  11. package/dist/types/operations/audit-notifications.d.ts +64 -7
  12. package/dist/types/operations/auth.d.ts +12 -4
  13. package/dist/types/operations/backends.d.ts +211 -9
  14. package/dist/types/operations/billing.d.ts +60 -4
  15. package/dist/types/operations/businesses.d.ts +730 -27
  16. package/dist/types/operations/change-sets.d.ts +426 -7
  17. package/dist/types/operations/consumers.d.ts +133 -14
  18. package/dist/types/operations/define.d.ts +16 -5
  19. package/dist/types/operations/environments.d.ts +40 -4
  20. package/dist/types/operations/frontend.d.ts +20 -2
  21. package/dist/types/operations/index.d.ts +3930 -193
  22. package/dist/types/operations/maker-tokens.d.ts +175 -11
  23. package/dist/types/operations/organizations.d.ts +321 -19
  24. package/dist/types/operations/personas.d.ts +98 -8
  25. package/dist/types/operations/plans-usage.d.ts +69 -3
  26. package/dist/types/operations/platform.d.ts +420 -12
  27. package/dist/types/operations/portal.d.ts +409 -16
  28. package/dist/types/operations/promo-codes.d.ts +126 -6
  29. package/dist/types/operations/variables.d.ts +170 -7
  30. package/dist/types/operations/webhooks.d.ts +77 -14
  31. package/dist/types/surface-types.d.ts +25 -3
  32. package/dist/types/transport.d.ts +5 -10
  33. package/dist/types/types.d.ts +382 -411
  34. package/dist/types/version.d.ts +2 -2
  35. package/package.json +1 -1
@@ -0,0 +1,3670 @@
1
+ export type paths = Record<string, never>;
2
+ export type webhooks = Record<string, never>;
3
+ export interface components {
4
+ schemas: {
5
+ AcceptedBusinessContract: {
6
+ business: {
7
+ /**
8
+ * @default public
9
+ * @enum {string}
10
+ */
11
+ visibility: "public" | "private";
12
+ };
13
+ gateway: {
14
+ authHeader: string;
15
+ upstreamAuth: {
16
+ /** @enum {string} */
17
+ type: "none" | "static_bearer";
18
+ };
19
+ };
20
+ /**
21
+ * @default {
22
+ * "meters": [],
23
+ * "billOn4xx": false
24
+ * }
25
+ */
26
+ metering: {
27
+ /** @default [] */
28
+ meters: {
29
+ key: string;
30
+ displayKey?: string;
31
+ display: string;
32
+ unit?: string;
33
+ routeDefault?: number;
34
+ /**
35
+ * @default estimated_then_settled
36
+ * @enum {string}
37
+ */
38
+ enforcementType: "exact_pre_request" | "estimated_then_settled" | "postpaid" | "strict_concurrency";
39
+ /**
40
+ * @default COUNT
41
+ * @enum {string}
42
+ */
43
+ aggregation: "SUM" | "COUNT" | "MAX" | "UNIQUE_COUNT" | "LATEST";
44
+ /**
45
+ * @default billing_period
46
+ * @enum {string}
47
+ */
48
+ window: "minute" | "hour" | "day" | "month" | "billing_period";
49
+ valueProperty?: string;
50
+ uniqueProperty?: string;
51
+ groupBy?: string[];
52
+ eventCode?: string;
53
+ /** @enum {string} */
54
+ tokenCategory?: "input" | "output" | "total" | "cached_read_input" | "cache_creation_input" | "context" | "max_output" | "estimated_output" | "actual_output" | "streaming_output";
55
+ /** @enum {string} */
56
+ reserveStrategy?: "reserve_max" | "estimate" | "count_actual";
57
+ reserveCeiling?: number;
58
+ pairsWith?: string;
59
+ }[];
60
+ /** @default false */
61
+ billOn4xx: boolean;
62
+ };
63
+ backend?: {
64
+ [key: string]: {
65
+ name?: string;
66
+ slug?: string;
67
+ /**
68
+ * @default {
69
+ * "mode": "direct"
70
+ * }
71
+ */
72
+ transport: {
73
+ /**
74
+ * @default direct
75
+ * @enum {string}
76
+ */
77
+ mode: "direct" | "tunnel";
78
+ /** @enum {string} */
79
+ runner?: "embedded" | "sidecar";
80
+ };
81
+ /**
82
+ * @default {
83
+ * "required": true
84
+ * }
85
+ */
86
+ verification: {
87
+ /** @default true */
88
+ required: boolean;
89
+ };
90
+ meters?: string[];
91
+ default?: boolean;
92
+ };
93
+ };
94
+ usage?: {
95
+ meters: {
96
+ [key: string]: {
97
+ selector?: string;
98
+ measures: string[];
99
+ rating?: {
100
+ /** @constant */
101
+ source: "fixed";
102
+ rates: {
103
+ [key: string]: {
104
+ [key: string]: number;
105
+ };
106
+ };
107
+ } | {
108
+ /** @constant */
109
+ source: "provider_catalog";
110
+ catalog: string;
111
+ /**
112
+ * @default pass_through
113
+ * @enum {string}
114
+ */
115
+ pricePolicy: "pass_through" | "markup";
116
+ markupPercent?: number;
117
+ marginMicros?: number;
118
+ };
119
+ };
120
+ };
121
+ };
122
+ usagePricing?: never;
123
+ routeCatalog?: {
124
+ [key: string]: {
125
+ description?: string;
126
+ routes: {
127
+ /** @enum {string} */
128
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
129
+ path: string;
130
+ actionId?: string;
131
+ permissionSubject?: string;
132
+ permissionVerb?: string;
133
+ actionMeta?: {
134
+ /** @enum {string} */
135
+ kind: "query" | "mutation";
136
+ title?: string;
137
+ actorType?: string;
138
+ subject?: {
139
+ type: string;
140
+ /** @enum {string} */
141
+ from: "header" | "path_param";
142
+ name: string;
143
+ };
144
+ /** @enum {string} */
145
+ audit: "none" | "metadata" | "full";
146
+ resource?: {
147
+ resource: string;
148
+ /** @enum {string} */
149
+ effect: "create" | "delete";
150
+ };
151
+ };
152
+ unmetered?: boolean;
153
+ metering?: {
154
+ defaults?: {
155
+ [key: string]: number;
156
+ };
157
+ reports?: string[];
158
+ onStatusCodes?: string | number[];
159
+ postStreamBilling?: boolean;
160
+ };
161
+ inheritDefaultMeters?: boolean;
162
+ backend?: string;
163
+ limits?: {
164
+ /** @default requests */
165
+ dimension: string;
166
+ window: {
167
+ /** @constant */
168
+ type: "named";
169
+ /** @enum {string} */
170
+ name: "second" | "minute" | "hour" | "day" | "week" | "month";
171
+ } | {
172
+ /** @constant */
173
+ type: "custom";
174
+ seconds: number;
175
+ label?: string;
176
+ };
177
+ capacity: number;
178
+ /**
179
+ * @default enforce
180
+ * @enum {string}
181
+ */
182
+ enforcement: "enforce" | "track";
183
+ /** @enum {string} */
184
+ strategy?: "fixed_window" | "sliding_window" | "token_bucket";
185
+ bucketCapacity?: number;
186
+ refillRatePerSecond?: number;
187
+ }[];
188
+ policy?: {
189
+ /** @enum {string} */
190
+ authMode?: "public" | "required";
191
+ timeoutMs?: number;
192
+ idleTimeoutMs?: number;
193
+ retry?: {
194
+ maxAttempts: number;
195
+ retryOn: ("network" | "5xx")[];
196
+ backoff: {
197
+ base: number;
198
+ max: number;
199
+ jitter: number;
200
+ };
201
+ budgetRatio: number;
202
+ };
203
+ /** @enum {string} */
204
+ subject?: "member" | "service";
205
+ surfaces?: ("ui" | "api" | "agent" | "webhook" | "cli")[];
206
+ hidden?: boolean;
207
+ };
208
+ }[];
209
+ };
210
+ };
211
+ permissions?: {
212
+ subject: string;
213
+ /** @default [] */
214
+ verbs: string[];
215
+ escalatory?: string[];
216
+ description?: string;
217
+ }[];
218
+ /** @default [] */
219
+ resources: {
220
+ name: string;
221
+ display?: string;
222
+ /**
223
+ * @default subscription
224
+ * @enum {string}
225
+ */
226
+ scope: "subscription" | "subject";
227
+ subjectType?: string;
228
+ /**
229
+ * @default reported
230
+ * @enum {string}
231
+ */
232
+ countSource: "reported" | "action_inferred";
233
+ }[];
234
+ /**
235
+ * @default {
236
+ * "cleanup": {
237
+ * "enabled": false,
238
+ * "mode": "report"
239
+ * },
240
+ * "change_approval": {
241
+ * "auto_merge_max_risk": "none",
242
+ * "require_human_for": [
243
+ * "economic_risk",
244
+ * "blocking"
245
+ * ]
246
+ * }
247
+ * }
248
+ */
249
+ policies: {
250
+ /**
251
+ * @default {
252
+ * "enabled": false,
253
+ * "mode": "report"
254
+ * }
255
+ */
256
+ cleanup: {
257
+ /** @default false */
258
+ enabled: boolean;
259
+ /**
260
+ * @default report
261
+ * @enum {string}
262
+ */
263
+ mode: "report" | "pull_request";
264
+ };
265
+ /**
266
+ * @default {
267
+ * "auto_merge_max_risk": "none",
268
+ * "require_human_for": [
269
+ * "economic_risk",
270
+ * "blocking"
271
+ * ]
272
+ * }
273
+ */
274
+ change_approval: {
275
+ /**
276
+ * @default none
277
+ * @enum {string}
278
+ */
279
+ auto_merge_max_risk: "none" | "safe" | "non_blocking";
280
+ /**
281
+ * @default [
282
+ * "economic_risk",
283
+ * "blocking"
284
+ * ]
285
+ */
286
+ require_human_for: ("safe" | "non_blocking" | "economic_risk" | "blocking")[];
287
+ };
288
+ };
289
+ customer_context?: {
290
+ context_tokens?: {
291
+ /** @default true */
292
+ enabled: boolean;
293
+ };
294
+ portal_auth?: {
295
+ /** @enum {string} */
296
+ strategy: "clerk" | "test-personas";
297
+ };
298
+ };
299
+ frontend?: never;
300
+ /**
301
+ * @default {
302
+ * "subscriberChangePolicy": {
303
+ * "default": "period_end",
304
+ * "when": {
305
+ * "price_increase": "period_end",
306
+ * "price_decrease": "immediate",
307
+ * "route_grant_added": "immediate",
308
+ * "route_grant_removed": "period_end",
309
+ * "limit_increased": "immediate",
310
+ * "limit_reduced": "period_end",
311
+ * "credit_increased": "immediate",
312
+ * "credit_reduced": "period_end",
313
+ * "rating_changed": "period_end"
314
+ * },
315
+ * "allowImmediatePriceIncrease": false,
316
+ * "allowImmediateEntitlementReduction": false
317
+ * }
318
+ * }
319
+ */
320
+ billing: {
321
+ applyLimitUpgradesInstantly?: boolean;
322
+ /**
323
+ * @default {
324
+ * "default": "period_end",
325
+ * "when": {
326
+ * "price_increase": "period_end",
327
+ * "price_decrease": "immediate",
328
+ * "route_grant_added": "immediate",
329
+ * "route_grant_removed": "period_end",
330
+ * "limit_increased": "immediate",
331
+ * "limit_reduced": "period_end",
332
+ * "credit_increased": "immediate",
333
+ * "credit_reduced": "period_end",
334
+ * "rating_changed": "period_end"
335
+ * },
336
+ * "allowImmediatePriceIncrease": false,
337
+ * "allowImmediateEntitlementReduction": false
338
+ * }
339
+ */
340
+ subscriberChangePolicy: {
341
+ /**
342
+ * @default period_end
343
+ * @enum {string}
344
+ */
345
+ default: "immediate" | "period_end";
346
+ /**
347
+ * @default {
348
+ * "price_increase": "period_end",
349
+ * "price_decrease": "immediate",
350
+ * "route_grant_added": "immediate",
351
+ * "route_grant_removed": "period_end",
352
+ * "limit_increased": "immediate",
353
+ * "limit_reduced": "period_end",
354
+ * "credit_increased": "immediate",
355
+ * "credit_reduced": "period_end",
356
+ * "rating_changed": "period_end"
357
+ * }
358
+ */
359
+ when: {
360
+ /** @enum {string} */
361
+ price_increase?: "immediate" | "period_end";
362
+ /** @enum {string} */
363
+ price_decrease?: "immediate" | "period_end";
364
+ /** @enum {string} */
365
+ route_grant_added?: "immediate" | "period_end";
366
+ /** @enum {string} */
367
+ route_grant_removed?: "immediate" | "period_end";
368
+ /** @enum {string} */
369
+ limit_increased?: "immediate" | "period_end";
370
+ /** @enum {string} */
371
+ limit_reduced?: "immediate" | "period_end";
372
+ /** @enum {string} */
373
+ credit_increased?: "immediate" | "period_end";
374
+ /** @enum {string} */
375
+ credit_reduced?: "immediate" | "period_end";
376
+ /** @enum {string} */
377
+ rating_changed?: "immediate" | "period_end";
378
+ };
379
+ /** @default false */
380
+ allowImmediatePriceIncrease: boolean;
381
+ /** @default false */
382
+ allowImmediateEntitlementReduction: boolean;
383
+ };
384
+ };
385
+ plans: {
386
+ key: string;
387
+ name: string;
388
+ description?: string;
389
+ details?: string[];
390
+ /** @enum {string} */
391
+ kind: "free" | "flat" | "usage" | "prepaid" | "hybrid" | "trial" | "custom";
392
+ /** @default [] */
393
+ meters: {
394
+ dimension: string;
395
+ /**
396
+ * @default linear
397
+ * @enum {string}
398
+ */
399
+ kind: "linear" | "active_count" | "event_count";
400
+ }[];
401
+ /** @default 0 */
402
+ recurring_fee_cents: number;
403
+ /**
404
+ * @default month
405
+ * @enum {string}
406
+ */
407
+ billing_interval: "month" | "year";
408
+ /** @default 0 */
409
+ trial_days: number;
410
+ max_monthly_spend_cents?: number;
411
+ min_monthly_spend_cents?: number;
412
+ /** @default [] */
413
+ limits: {
414
+ dimension: string;
415
+ window: {
416
+ /** @constant */
417
+ type: "named";
418
+ /** @enum {string} */
419
+ name: "second" | "minute" | "hour" | "day" | "week" | "month";
420
+ } | {
421
+ /** @constant */
422
+ type: "custom";
423
+ seconds: number;
424
+ label?: string;
425
+ };
426
+ capacity: number;
427
+ /** @enum {string} */
428
+ enforcement?: "enforce" | "track";
429
+ warnAt?: number;
430
+ /** @enum {string} */
431
+ strategy?: "fixed_window" | "sliding_window" | "token_bucket";
432
+ bucketCapacity?: number;
433
+ refillRatePerSecond?: number;
434
+ scope?: {
435
+ endpoint?: string;
436
+ apiKey?: string;
437
+ workspace?: string;
438
+ region?: string;
439
+ actor?: {
440
+ /** @enum {string} */
441
+ kind: "member" | "service_account";
442
+ };
443
+ };
444
+ acknowledgeUnreachable?: boolean;
445
+ }[];
446
+ routeGrants?: string[];
447
+ frontendIntegrationGrants?: string[];
448
+ /** @default {} */
449
+ resource_limits: {
450
+ [key: string]: number;
451
+ };
452
+ /**
453
+ * @default block
454
+ * @enum {string}
455
+ */
456
+ overageBehavior: "block" | "allow_and_bill";
457
+ /** @default true */
458
+ selfServeEnabled: boolean;
459
+ capacity?: {
460
+ maxInputTokens?: number;
461
+ maxOutputTokens?: number;
462
+ maxContextTokens?: number;
463
+ maxPayloadBytes?: number;
464
+ /**
465
+ * @default enforce
466
+ * @enum {string}
467
+ */
468
+ enforcement: "enforce" | "track";
469
+ /**
470
+ * @default open
471
+ * @enum {string}
472
+ */
473
+ failMode: "open" | "closed";
474
+ /** @enum {string} */
475
+ tokenCountSource?: "declared" | "estimated";
476
+ scope?: {
477
+ endpoint?: string;
478
+ apiKey?: string;
479
+ workspace?: string;
480
+ region?: string;
481
+ actor?: {
482
+ /** @enum {string} */
483
+ kind: "member" | "service_account";
484
+ };
485
+ };
486
+ };
487
+ archive?: {
488
+ /** Format: date-time */
489
+ at?: string;
490
+ transitionTo?: string;
491
+ /**
492
+ * @default auto
493
+ * @enum {string}
494
+ */
495
+ strategy: "auto" | "explicit" | "block";
496
+ };
497
+ }[];
498
+ /**
499
+ * @default {
500
+ * "breaking_changes": {
501
+ * "require_deprecation_window_days": 0,
502
+ * "require_successor_route": false
503
+ * }
504
+ * }
505
+ */
506
+ lifecycle: {
507
+ /**
508
+ * @default {
509
+ * "require_deprecation_window_days": 0,
510
+ * "require_successor_route": false
511
+ * }
512
+ */
513
+ breaking_changes: {
514
+ /** @default 0 */
515
+ require_deprecation_window_days: number;
516
+ /** @default false */
517
+ require_successor_route: boolean;
518
+ };
519
+ };
520
+ environments?: {
521
+ [key: string]: {
522
+ plans?: {
523
+ [key: string]: {
524
+ meters?: {
525
+ dimension: string;
526
+ /**
527
+ * @default linear
528
+ * @enum {string}
529
+ */
530
+ kind: "linear" | "active_count" | "event_count";
531
+ }[];
532
+ recurring_fee_cents?: number;
533
+ /** @enum {string} */
534
+ billing_interval?: "month" | "year";
535
+ trial_days?: number;
536
+ max_monthly_spend_cents?: number;
537
+ limits?: {
538
+ dimension: string;
539
+ window: {
540
+ /** @constant */
541
+ type: "named";
542
+ /** @enum {string} */
543
+ name: "second" | "minute" | "hour" | "day" | "week" | "month";
544
+ } | {
545
+ /** @constant */
546
+ type: "custom";
547
+ seconds: number;
548
+ label?: string;
549
+ };
550
+ capacity: number;
551
+ /** @enum {string} */
552
+ enforcement?: "enforce" | "track";
553
+ warnAt?: number;
554
+ /** @enum {string} */
555
+ strategy?: "fixed_window" | "sliding_window" | "token_bucket";
556
+ bucketCapacity?: number;
557
+ refillRatePerSecond?: number;
558
+ scope?: {
559
+ endpoint?: string;
560
+ apiKey?: string;
561
+ workspace?: string;
562
+ region?: string;
563
+ actor?: {
564
+ /** @enum {string} */
565
+ kind: "member" | "service_account";
566
+ };
567
+ };
568
+ acknowledgeUnreachable?: boolean;
569
+ }[];
570
+ /** @enum {string} */
571
+ overageBehavior?: "block" | "allow_and_bill";
572
+ selfServeEnabled?: boolean;
573
+ };
574
+ };
575
+ };
576
+ };
577
+ ephemeral?: {
578
+ defaultPlan?: string;
579
+ };
580
+ };
581
+ Agent: {
582
+ id: string;
583
+ role: string;
584
+ enabled: boolean;
585
+ config: components["schemas"]["AgentConfig"];
586
+ lastRunAt: string | null;
587
+ /** Format: date-time */
588
+ createdAt: string;
589
+ /** Format: date-time */
590
+ updatedAt: string;
591
+ };
592
+ AgentAction: {
593
+ kind: string;
594
+ /** @enum {string} */
595
+ status: "pending" | "executed" | "denied" | "failed";
596
+ launchIndex: number;
597
+ summary: string | null;
598
+ reason: string | null;
599
+ /** Format: date-time */
600
+ createdAt: string;
601
+ };
602
+ AgentCatalogEntry: {
603
+ /** @enum {string} */
604
+ kind: "prompt" | "skill";
605
+ key: string;
606
+ version: number;
607
+ /** @enum {string} */
608
+ status: "active" | "retired" | "rolled_back";
609
+ /** @enum {string} */
610
+ createdBy: "platform" | "agent";
611
+ reason: string | null;
612
+ launches: number;
613
+ badLaunches: number;
614
+ avgScore: number | null;
615
+ /** Format: date-time */
616
+ createdAt: string;
617
+ };
618
+ AgentConfig: {
619
+ cadenceMinutes?: number;
620
+ tone?: string;
621
+ maxOutreachPerRun?: number;
622
+ deepEveryNRuns?: number;
623
+ focus?: string;
624
+ competitorSeeds?: string[];
625
+ selfEvolve?: boolean;
626
+ appealsEnabled?: boolean;
627
+ outreachEnabled?: boolean;
628
+ notifyEnabled?: boolean;
629
+ callCaps?: {
630
+ search?: number;
631
+ fetch?: number;
632
+ dataforseo?: number;
633
+ };
634
+ };
635
+ AgentLaunch: {
636
+ promptKey: string;
637
+ promptVersion: number | null;
638
+ skillRefs: {
639
+ key: string;
640
+ version: number | null;
641
+ }[];
642
+ tools: string[];
643
+ actor: boolean;
644
+ /** @enum {string} */
645
+ outcome: "ok" | "degraded" | "error";
646
+ proposedActions: number;
647
+ actionsExecuted: number;
648
+ tokensIn: number;
649
+ tokensOut: number;
650
+ score: number | null;
651
+ round: number;
652
+ appealed: boolean;
653
+ appealGranted: boolean;
654
+ grantedDelta: number | null;
655
+ note: string | null;
656
+ };
657
+ AgentList: {
658
+ agents: components["schemas"]["Agent"][];
659
+ availableRoles: string[];
660
+ };
661
+ AgentRun: {
662
+ id: string;
663
+ /** @enum {string} */
664
+ status: "queued" | "dispatched" | "succeeded" | "failed" | "stale";
665
+ /** @enum {string} */
666
+ trigger: "tick" | "manual";
667
+ dispatchedAt: string | null;
668
+ finishedAt: string | null;
669
+ errorCode: string | null;
670
+ errorMessage: string | null;
671
+ /** Format: date-time */
672
+ createdAt: string;
673
+ };
674
+ AgentRunDetail: {
675
+ run: {
676
+ id: string;
677
+ /** @enum {string} */
678
+ status: "queued" | "dispatched" | "succeeded" | "failed" | "stale";
679
+ /** @enum {string} */
680
+ trigger: "tick" | "manual";
681
+ dispatchedAt: string | null;
682
+ finishedAt: string | null;
683
+ errorCode: string | null;
684
+ errorMessage: string | null;
685
+ /** Format: date-time */
686
+ createdAt: string;
687
+ degraded: boolean;
688
+ result: {
689
+ [key: string]: unknown;
690
+ } | null;
691
+ trace: {
692
+ [key: string]: unknown;
693
+ } | null;
694
+ };
695
+ launches: components["schemas"]["AgentLaunch"][];
696
+ actions: components["schemas"]["AgentAction"][];
697
+ };
698
+ AgentStatus: {
699
+ id: string;
700
+ role: string;
701
+ enabled: boolean;
702
+ config: components["schemas"]["AgentConfig"];
703
+ lastRunAt: string | null;
704
+ /** Format: date-time */
705
+ createdAt: string;
706
+ /** Format: date-time */
707
+ updatedAt: string;
708
+ recentRuns: components["schemas"]["AgentRun"][];
709
+ usage: {
710
+ tokensIn: number;
711
+ tokensOut: number;
712
+ actionsCount: number;
713
+ };
714
+ catalog: components["schemas"]["AgentCatalogEntry"][];
715
+ };
716
+ AgreementAmendEffect: {
717
+ /** @constant */
718
+ kind: "amend";
719
+ agreementId: string;
720
+ subjectId: string;
721
+ pricingPolicyId: string;
722
+ pricingPolicyVersionId: string;
723
+ currentVersion: {
724
+ id: string;
725
+ version: number;
726
+ };
727
+ nextVersion: number;
728
+ terms: components["schemas"]["ContractTerms"];
729
+ bounds: components["schemas"]["ContractTermsBounds"];
730
+ ownedNamespaces: string[];
731
+ effectiveAt: string | null;
732
+ };
733
+ AgreementAmendPreview: {
734
+ effect: components["schemas"]["AgreementAmendEffect"];
735
+ /** @description Pass with the SAME body to commit exactly this effect. Expires after 15 minutes; a changed body or a newly published policy version makes it stale. */
736
+ confirmationToken: string;
737
+ };
738
+ AgreementCreateEffect: {
739
+ /** @constant */
740
+ kind: "create";
741
+ environmentId: string | null;
742
+ subjectId: string;
743
+ binding: {
744
+ /** @enum {string} */
745
+ mode: "current" | "current_with_contract_terms" | "fixed_version";
746
+ pricingPolicyId: string;
747
+ pricingPolicyKey: string;
748
+ pricingPolicyVersionId: string;
749
+ pricingPolicyVersion: number;
750
+ };
751
+ /** @enum {string} */
752
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
753
+ /** @enum {string} */
754
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
755
+ terms?: components["schemas"]["ContractTerms"];
756
+ bounds: components["schemas"]["ContractTermsBounds"];
757
+ ownedNamespaces: string[];
758
+ agreedBasis: {
759
+ measurementRuleIds: string[];
760
+ measureSetByRuleId: {
761
+ [key: string]: string[];
762
+ };
763
+ };
764
+ effectiveAt: string | null;
765
+ expiresAt: string | null;
766
+ };
767
+ AgreementCreatePreview: {
768
+ effect: components["schemas"]["AgreementCreateEffect"];
769
+ /** @description Pass with the SAME body to commit exactly this effect. Expires after 15 minutes; a changed body or a newly published policy version makes it stale. */
770
+ confirmationToken: string;
771
+ };
772
+ AgreementUsagePricingBinding: {
773
+ /** @constant */
774
+ mode: "current";
775
+ pricingPolicyId: string;
776
+ } | {
777
+ /** @constant */
778
+ mode: "current_with_contract_terms";
779
+ pricingPolicyId: string;
780
+ contractPricingVersionId: string;
781
+ } | {
782
+ /** @constant */
783
+ mode: "fixed_version";
784
+ pricingPolicyId: string;
785
+ pricingPolicyVersionId: string;
786
+ };
787
+ AnalyticsEventFeedResponse: {
788
+ result: components["schemas"]["AnalyticsEventFeedRow"][];
789
+ };
790
+ AnalyticsEventFeedRow: {
791
+ id: string;
792
+ /** @enum {string} */
793
+ type: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
794
+ /** Format: date-time */
795
+ occurredAt: string;
796
+ environmentId: string | null;
797
+ actor: {
798
+ type: string;
799
+ id: string;
800
+ } | null;
801
+ request: components["schemas"]["AnalyticsRequestDetail"] | null;
802
+ };
803
+ AnalyticsPercentileRow: {
804
+ percentile: number;
805
+ value: number | null;
806
+ sampleCount: number | null;
807
+ };
808
+ AnalyticsPercentilesResponse: {
809
+ result: components["schemas"]["AnalyticsPercentileRow"][];
810
+ };
811
+ AnalyticsQueryResponse: components["schemas"]["AnalyticsTimeseriesResponse"] | components["schemas"]["AnalyticsTopKResponse"] | components["schemas"]["AnalyticsPercentilesResponse"] | components["schemas"]["AnalyticsEventFeedResponse"];
812
+ AnalyticsRequestDetail: {
813
+ path: string | null;
814
+ statusCode: number | null;
815
+ subscriberId: string | null;
816
+ denyCode: string | null;
817
+ timing: components["schemas"]["AnalyticsRequestTiming"] | null;
818
+ };
819
+ AnalyticsRequestTiming: {
820
+ totalMs: number;
821
+ upstreamMs: number | null;
822
+ gatewayMs: number;
823
+ };
824
+ AnalyticsTimeseriesBucket: {
825
+ /** Format: date-time */
826
+ t: string;
827
+ value: number;
828
+ };
829
+ AnalyticsTimeseriesResponse: {
830
+ result: components["schemas"]["AnalyticsTimeseriesBucket"][];
831
+ };
832
+ AnalyticsTopKResponse: {
833
+ result: components["schemas"]["AnalyticsTopKRow"][];
834
+ };
835
+ AnalyticsTopKRow: {
836
+ key: string;
837
+ count: number;
838
+ };
839
+ ApplyTimelineEntry: {
840
+ id: string;
841
+ /** @enum {string} */
842
+ source: "github_pr" | "github_push" | "github_release";
843
+ /** @enum {string} */
844
+ status: "pending" | "running" | "passed" | "failed" | "applied" | "deferred" | "stale";
845
+ branch: string;
846
+ baseBranch: string | null;
847
+ defaultBranch: string | null;
848
+ commitSha: string;
849
+ repoFullName: string;
850
+ prNumber: number | null;
851
+ releaseTag: string | null;
852
+ environmentId: string | null;
853
+ createdAt: string;
854
+ updatedAt: string;
855
+ semanticDiff: {
856
+ diffSummary: {
857
+ hasChanges: boolean;
858
+ productFieldChanges: number;
859
+ gatewayFieldChanges: number;
860
+ billingFieldChanges: number;
861
+ plansAdded: number;
862
+ plansRemoved: number;
863
+ plansModified: number;
864
+ pricingPoliciesChanged: number;
865
+ economicChange: boolean;
866
+ } | null;
867
+ semanticChanges: {
868
+ /** @enum {string} */
869
+ domain: "economic_contract" | "entitlement_surface" | "operational_policy" | "compatibility_lifecycle";
870
+ kind: string;
871
+ path: string;
872
+ from: unknown;
873
+ to: unknown;
874
+ additive: boolean;
875
+ rationale?: string;
876
+ }[] | null;
877
+ riskSummary: {
878
+ /** @enum {string} */
879
+ level: "safe" | "non_blocking" | "economic_risk" | "blocking";
880
+ byDomain: {
881
+ /** @enum {string} */
882
+ economic_contract: "safe" | "non_blocking" | "economic_risk" | "blocking";
883
+ /** @enum {string} */
884
+ entitlement_surface: "safe" | "non_blocking" | "economic_risk" | "blocking";
885
+ /** @enum {string} */
886
+ operational_policy: "safe" | "non_blocking" | "economic_risk" | "blocking";
887
+ /** @enum {string} */
888
+ compatibility_lifecycle: "safe" | "non_blocking" | "economic_risk" | "blocking";
889
+ };
890
+ blockingReasons: string[];
891
+ } | null;
892
+ lifecyclePlan: {
893
+ requiresSubscriptionMigration: boolean;
894
+ actions: {
895
+ /** @enum {string} */
896
+ domain: "economic_contract" | "entitlement_surface" | "operational_policy" | "compatibility_lifecycle";
897
+ /** @enum {string} */
898
+ action: "no_op" | "migrate_at_renewal" | "migrate_immediately" | "replay" | "block";
899
+ rationale: string;
900
+ }[];
901
+ } | null;
902
+ };
903
+ checks: {
904
+ name: string;
905
+ /** @enum {string} */
906
+ status: "pending" | "running" | "passed" | "failed" | "skipped";
907
+ summary: string | null;
908
+ }[];
909
+ apply: {
910
+ id: string;
911
+ /** @enum {string} */
912
+ overallStatus: "pending" | "running" | "succeeded" | "failed" | "skipped";
913
+ phases: {
914
+ build: {
915
+ /** @enum {string} */
916
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
917
+ startedAt: string | null;
918
+ finishedAt: string | null;
919
+ error: string | null;
920
+ };
921
+ compile: {
922
+ /** @enum {string} */
923
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
924
+ startedAt: string | null;
925
+ finishedAt: string | null;
926
+ error: string | null;
927
+ };
928
+ accept: {
929
+ /** @enum {string} */
930
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
931
+ startedAt: string | null;
932
+ finishedAt: string | null;
933
+ error: string | null;
934
+ };
935
+ publish: {
936
+ /** @enum {string} */
937
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
938
+ startedAt: string | null;
939
+ finishedAt: string | null;
940
+ error: string | null;
941
+ };
942
+ billing: {
943
+ /** @enum {string} */
944
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
945
+ startedAt: string | null;
946
+ finishedAt: string | null;
947
+ error: string | null;
948
+ } | null;
949
+ };
950
+ } | null;
951
+ existingSubscribers?: {
952
+ planKey: string;
953
+ fromCompiledPlanId: string;
954
+ toCompiledPlanId: string;
955
+ /** @enum {string} */
956
+ timing: "aliased" | "immediate" | "period_end";
957
+ cohorts: number;
958
+ reasons: string[];
959
+ }[];
960
+ };
961
+ ApplyTimelineList: {
962
+ data: components["schemas"]["ApplyTimelineEntry"][];
963
+ environmentId: string | null;
964
+ };
965
+ AuditLogEntry: {
966
+ id: string;
967
+ createdAt: string;
968
+ actorType: string;
969
+ actorUserId: string | null;
970
+ actor: {
971
+ displayName: string | null;
972
+ email: string | null;
973
+ } | null;
974
+ organizationId: string | null;
975
+ businessId: string | null;
976
+ subscriberId: string | null;
977
+ action: string;
978
+ label: string | null;
979
+ decision: ("ALLOW" | "DENY") | null;
980
+ matchedRole: string | null;
981
+ payloadJson: {
982
+ [key: string]: unknown;
983
+ };
984
+ };
985
+ AuditLogList: {
986
+ items: components["schemas"]["AuditLogEntry"][];
987
+ nextCursor: string | null;
988
+ };
989
+ AutomationRule: {
990
+ name: string;
991
+ trigger: {
992
+ /** @enum {string} */
993
+ eventType: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached" | "rate_limit.exceeded" | "usage.recorded" | "usage.archive_checkpoint" | "gateway.request_denied" | "change_set.created" | "change_set.approved" | "change_set.applied" | "change_set.rolled_back" | "change_set.cancelled" | "billing.event_recorded" | "authz.decision" | "repo.changed" | "automation.rule_fired" | "automation.action_succeeded" | "automation.action_failed" | "automation.action_denied" | "automation.notification" | "access_request.created" | "access_request.resolved" | "build.failed" | "product.published" | "workflow.failed" | "pr.review_posted";
994
+ filter?: {
995
+ subjectType?: string;
996
+ subjectId?: string;
997
+ };
998
+ };
999
+ /** @default [] */
1000
+ conditions: {
1001
+ path: string;
1002
+ /** @enum {string} */
1003
+ operator: "eq" | "neq" | "gt" | "lt" | "contains" | "path_prefix";
1004
+ value: string | number | boolean;
1005
+ }[];
1006
+ actions: ({
1007
+ /** @constant */
1008
+ kind: "emit_webhook_event";
1009
+ /** @enum {string} */
1010
+ event: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached";
1011
+ /** @default {} */
1012
+ payload: {
1013
+ [key: string]: unknown;
1014
+ };
1015
+ } | {
1016
+ /** @constant */
1017
+ kind: "create_notification";
1018
+ /**
1019
+ * @default info
1020
+ * @enum {string}
1021
+ */
1022
+ level: "info" | "warning" | "critical";
1023
+ message: string;
1024
+ } | {
1025
+ /** @constant */
1026
+ kind: "propose_change_set";
1027
+ intent: string;
1028
+ roleKey: string;
1029
+ permissions: string[];
1030
+ } | {
1031
+ /** @constant */
1032
+ kind: "notify_audience";
1033
+ audience: {
1034
+ [key: string]: unknown;
1035
+ };
1036
+ /** @enum {string} */
1037
+ class: "product_update" | "transactional";
1038
+ subject: string;
1039
+ body: string;
1040
+ })[];
1041
+ /** @default true */
1042
+ enabled: boolean;
1043
+ /** @default 1 */
1044
+ schemaVersion: number;
1045
+ id: string;
1046
+ businessId: string;
1047
+ environmentId: string | null;
1048
+ /** Format: date-time */
1049
+ createdAt: string;
1050
+ /** Format: date-time */
1051
+ updatedAt: string;
1052
+ };
1053
+ AutomationRuleList: {
1054
+ items: components["schemas"]["AutomationRule"][];
1055
+ nextCursor: string | null;
1056
+ };
1057
+ Backend: {
1058
+ id: string;
1059
+ businessId: string;
1060
+ environmentId: string | null;
1061
+ name: string;
1062
+ slug: string;
1063
+ /** @enum {string} */
1064
+ transportMode: "direct" | "tunnel";
1065
+ runner: ("embedded" | "sidecar") | null;
1066
+ runtime: string | null;
1067
+ verificationRequired: boolean;
1068
+ originUrl: string | null;
1069
+ isDefault: boolean;
1070
+ /** @enum {string} */
1071
+ status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
1072
+ lastSeenAt: string | null;
1073
+ /** Format: date-time */
1074
+ createdAt: string;
1075
+ };
1076
+ BackendCreatePreview: {
1077
+ /** @enum {string} */
1078
+ action: "create" | "update";
1079
+ backend: {
1080
+ businessId: string;
1081
+ environmentId: string | null;
1082
+ name: string;
1083
+ slug: string;
1084
+ /** @enum {string} */
1085
+ transportMode: "direct" | "tunnel";
1086
+ runner: ("embedded" | "sidecar") | null;
1087
+ runtime: string | null;
1088
+ originUrl: string | null;
1089
+ isDefault: boolean;
1090
+ };
1091
+ };
1092
+ BackendCreateResponse: {
1093
+ id: string;
1094
+ businessId: string;
1095
+ environmentId: string | null;
1096
+ name: string;
1097
+ slug: string;
1098
+ /** @enum {string} */
1099
+ transportMode: "direct" | "tunnel";
1100
+ runner: ("embedded" | "sidecar") | null;
1101
+ runtime: string | null;
1102
+ verificationRequired: boolean;
1103
+ originUrl: string | null;
1104
+ isDefault: boolean;
1105
+ /** @enum {string} */
1106
+ status: "registered" | "building" | "deployed" | "tunnel_connected" | "healthy" | "unhealthy" | "verification_failed" | "provision_failed" | "disabled";
1107
+ lastSeenAt: string | null;
1108
+ /** Format: date-time */
1109
+ createdAt: string;
1110
+ /** @constant */
1111
+ updated?: true;
1112
+ };
1113
+ BackendDeleteResponse: {
1114
+ id: string;
1115
+ /** @constant */
1116
+ deleted: true;
1117
+ };
1118
+ BackendList: {
1119
+ data: components["schemas"]["Backend"][];
1120
+ pagination: {
1121
+ total: number;
1122
+ limit: number;
1123
+ offset: number;
1124
+ hasMore: boolean;
1125
+ };
1126
+ /** @enum {string} */
1127
+ scope: "all" | "production" | "environment";
1128
+ environmentId: string | null;
1129
+ };
1130
+ BuilderContext: {
1131
+ user: {
1132
+ id: string;
1133
+ };
1134
+ personalOrganization: components["schemas"]["BuilderContextOrganization"];
1135
+ activeOrganization: {
1136
+ id: string;
1137
+ type: string | null;
1138
+ name: string | null;
1139
+ slug: string | null;
1140
+ publicPageUrl: string | null;
1141
+ };
1142
+ memberships: {
1143
+ organization: components["schemas"]["BuilderContextOrganization"];
1144
+ role: string;
1145
+ }[];
1146
+ effectivePermissions: ("agent:configure" | "agent:read" | "agreement:amend" | "agreement:create" | "agreement:read" | "analytics:read" | "apply_timeline:read" | "audit_log:export" | "audit_log:read" | "auth_context:issue" | "auth_context:read" | "auth_provider_connection:create" | "auth_provider_connection:delete" | "auth_provider_connection:read" | "auth_provider_connection:update" | "automation_rule:create" | "automation_rule:delete" | "automation_rule:read" | "automation_rule:update" | "backend:bind" | "backend:create" | "backend:delete" | "backend:read" | "brand:update" | "bulletin:ack" | "bulletin:read" | "bulletin:resolve" | "business:compile" | "business:cors_update" | "business:create" | "business:delete" | "business:docs_update" | "business:preview_env_update" | "business:publish" | "business:rbac_update" | "business:read" | "business:rollback" | "business_dependents:read" | "business_variable:create" | "business_variable:delete" | "business_variable:operation_read" | "business_variable:read" | "business_variable:revoke" | "business_variable:rotate" | "change_set:propose" | "change_set:read" | "consumer:block" | "consumer:migrate_latest" | "consumer:read" | "consumer:remove" | "consumer:roles_assign" | "denial:read" | "environment:create" | "environment:delete" | "environment:read" | "frontend:read" | "frontend:rollback" | "git_connection:create" | "git_connection:delete" | "git_connection:read" | "git_connection:update" | "knowledge:read" | "maker_token:create" | "maker_token:create_org" | "maker_token:read" | "maker_token:revoke" | "maker_token:rotate" | "notification:preferences_read" | "notification:preferences_update" | "organization:create" | "organization:delete" | "organization:manage_billing" | "organization:ownership_transfer" | "organization:read" | "organization_bulletin:read" | "organization_invitation:accept" | "organization_invitation:create" | "organization_invitation:list" | "organization_invitation:revoke" | "organization_member:list" | "organization_member:remove" | "organization_member:update" | "organization_role:create" | "organization_role:delete" | "organization_role:read" | "organization_role:update" | "persona:issue" | "persona:read" | "persona:revoke" | "persona:rotate" | "plan:read" | "product_subscription:create" | "promo_code:archive" | "promo_code:create" | "promo_code:reactivate" | "promo_code:read" | "promo_code:update" | "rbac:read" | "resource_count:report" | "runtime_token:mint" | "runtime_token:read" | "runtime_token:revoke" | "runtime_token:rotate" | "stripe_connection:create" | "stripe_connection:delete" | "stripe_connection:read" | "tax_settings:read" | "tax_settings:update" | "usage:read" | "webhook:create" | "webhook:delete" | "webhook:delivery_read" | "webhook:read" | "webhook:test" | "webhook:update" | "workflow:replay" | "workflow:rollback")[];
1147
+ shouldPersistActiveOrganization: boolean;
1148
+ platformTier: string | null;
1149
+ features: {
1150
+ team?: boolean;
1151
+ };
1152
+ platformPlans: components["schemas"]["BuilderContextPlatformPlan"][];
1153
+ platformUsage: {
1154
+ products: number;
1155
+ requests: number | null;
1156
+ agentUnits: number | null;
1157
+ } | null;
1158
+ };
1159
+ BuilderContextOrganization: {
1160
+ id: string;
1161
+ type: string | null;
1162
+ name: string | null;
1163
+ slug: string | null;
1164
+ };
1165
+ BuilderContextPlatformPlan: {
1166
+ slug: string;
1167
+ name: string;
1168
+ displayOrder: number;
1169
+ monthlyPriceCents: number;
1170
+ limits: {
1171
+ [key: string]: number;
1172
+ };
1173
+ features: string[];
1174
+ marketingFeatures: string[];
1175
+ checkoutLink: string | null;
1176
+ };
1177
+ BuilderPlan: {
1178
+ key: string;
1179
+ name: string;
1180
+ description?: string;
1181
+ details?: string[];
1182
+ /** @enum {string} */
1183
+ kind: "free" | "flat" | "usage" | "prepaid" | "hybrid" | "trial" | "custom";
1184
+ /** @default [] */
1185
+ meters: {
1186
+ dimension: string;
1187
+ /**
1188
+ * @default linear
1189
+ * @enum {string}
1190
+ */
1191
+ kind: "linear" | "active_count" | "event_count";
1192
+ }[];
1193
+ /** @default 0 */
1194
+ recurring_fee_cents: number;
1195
+ /**
1196
+ * @default month
1197
+ * @enum {string}
1198
+ */
1199
+ billing_interval: "month" | "year";
1200
+ /** @default 0 */
1201
+ trial_days: number;
1202
+ max_monthly_spend_cents?: number;
1203
+ min_monthly_spend_cents?: number;
1204
+ /** @default [] */
1205
+ limits: {
1206
+ dimension: string;
1207
+ window: {
1208
+ /** @constant */
1209
+ type: "named";
1210
+ /** @enum {string} */
1211
+ name: "second" | "minute" | "hour" | "day" | "week" | "month";
1212
+ } | {
1213
+ /** @constant */
1214
+ type: "custom";
1215
+ seconds: number;
1216
+ label?: string;
1217
+ };
1218
+ capacity: number;
1219
+ /** @enum {string} */
1220
+ enforcement?: "enforce" | "track";
1221
+ warnAt?: number;
1222
+ /** @enum {string} */
1223
+ strategy?: "fixed_window" | "sliding_window" | "token_bucket";
1224
+ bucketCapacity?: number;
1225
+ refillRatePerSecond?: number;
1226
+ scope?: {
1227
+ endpoint?: string;
1228
+ apiKey?: string;
1229
+ workspace?: string;
1230
+ region?: string;
1231
+ actor?: {
1232
+ /** @enum {string} */
1233
+ kind: "member" | "service_account";
1234
+ };
1235
+ };
1236
+ acknowledgeUnreachable?: boolean;
1237
+ }[];
1238
+ routeGrants?: string[];
1239
+ frontendIntegrationGrants?: string[];
1240
+ /** @default {} */
1241
+ resource_limits: {
1242
+ [key: string]: number;
1243
+ };
1244
+ /**
1245
+ * @default block
1246
+ * @enum {string}
1247
+ */
1248
+ overageBehavior: "block" | "allow_and_bill";
1249
+ /** @default true */
1250
+ selfServeEnabled: boolean;
1251
+ capacity?: {
1252
+ maxInputTokens?: number;
1253
+ maxOutputTokens?: number;
1254
+ maxContextTokens?: number;
1255
+ maxPayloadBytes?: number;
1256
+ /**
1257
+ * @default enforce
1258
+ * @enum {string}
1259
+ */
1260
+ enforcement: "enforce" | "track";
1261
+ /**
1262
+ * @default open
1263
+ * @enum {string}
1264
+ */
1265
+ failMode: "open" | "closed";
1266
+ /** @enum {string} */
1267
+ tokenCountSource?: "declared" | "estimated";
1268
+ scope?: {
1269
+ endpoint?: string;
1270
+ apiKey?: string;
1271
+ workspace?: string;
1272
+ region?: string;
1273
+ actor?: {
1274
+ /** @enum {string} */
1275
+ kind: "member" | "service_account";
1276
+ };
1277
+ };
1278
+ };
1279
+ archive?: {
1280
+ /** Format: date-time */
1281
+ at?: string;
1282
+ transitionTo?: string;
1283
+ /**
1284
+ * @default auto
1285
+ * @enum {string}
1286
+ */
1287
+ strategy: "auto" | "explicit" | "block";
1288
+ };
1289
+ id: string;
1290
+ businessId: string;
1291
+ environmentId: string | null;
1292
+ isActive: boolean;
1293
+ createdAt: string;
1294
+ };
1295
+ BulletinPost: {
1296
+ id: string;
1297
+ kind: string;
1298
+ role: string;
1299
+ title: string;
1300
+ body: string;
1301
+ dataJson: {
1302
+ [key: string]: unknown;
1303
+ };
1304
+ severity: string;
1305
+ status: string;
1306
+ changeSetId: string | null;
1307
+ /** Format: date-time */
1308
+ createdAt: string;
1309
+ /** Format: date-time */
1310
+ updatedAt: string;
1311
+ };
1312
+ BulletinPostList: {
1313
+ items: components["schemas"]["BulletinPost"][];
1314
+ nextCursor: string | null;
1315
+ };
1316
+ Business: {
1317
+ id: string;
1318
+ organizationId: string | null;
1319
+ name: string;
1320
+ displayName: string | null;
1321
+ description: string | null;
1322
+ /** @enum {string} */
1323
+ status: "DRAFT" | "ACTIVE";
1324
+ /** @enum {string} */
1325
+ visibility: "PUBLIC" | "PRIVATE";
1326
+ runtimeHostname: string | null;
1327
+ portalHostname: string | null;
1328
+ iconUrl: string | null;
1329
+ logoUrl: string | null;
1330
+ keyPrefix: string | null;
1331
+ allowedOrigins: string[];
1332
+ docsEnabled: boolean;
1333
+ listedOnOrganizationPage: boolean;
1334
+ rbacEnabled: boolean;
1335
+ meters: components["schemas"]["BusinessMeter"][];
1336
+ plans: components["schemas"]["BusinessPlan"][];
1337
+ unreadablePlans?: components["schemas"]["BusinessUnreadablePlan"][];
1338
+ rateLimitConfig: components["schemas"]["BusinessRateLimit"] | null;
1339
+ publishedRevisionId: string | null;
1340
+ latestRevisionId: string | null;
1341
+ latestRevisionNumber: number | null;
1342
+ latestReleaseVersion: string | null;
1343
+ gitRepoFullName: string | null;
1344
+ envBranchPrefix: string | null;
1345
+ /** @enum {string} */
1346
+ previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
1347
+ /** Format: date-time */
1348
+ createdAt: string;
1349
+ /** Format: date-time */
1350
+ updatedAt: string;
1351
+ };
1352
+ BusinessConfig: {
1353
+ businessId: string;
1354
+ environment: {
1355
+ name: string | null;
1356
+ production: boolean;
1357
+ };
1358
+ /** @enum {string} */
1359
+ state: "accepted" | "none" | "unreadable";
1360
+ config: components["schemas"]["AcceptedBusinessContract"] | null;
1361
+ acceptedConfigVersion: string | null;
1362
+ acceptedConfigSource: ("UI" | "CLI" | "MCP" | "GITHUB" | "API" | "REPAIR" | "MIGRATION") | null;
1363
+ acceptedAt: string | null;
1364
+ repositorySyncStatus: ("PENDING" | "SYNCED" | "FAILED" | "SKIPPED") | null;
1365
+ commitSha: string | null;
1366
+ };
1367
+ BusinessConfigAttempt: {
1368
+ id: string;
1369
+ /** @enum {string} */
1370
+ source: "UI" | "CLI" | "MCP" | "GITHUB" | "API" | "REPAIR" | "MIGRATION";
1371
+ sourceRef: string | null;
1372
+ /** @enum {string} */
1373
+ status: "PARSE_FAILED" | "SCHEMA_FAILED" | "COMPILE_FAILED" | "APPLY_FAILED";
1374
+ diagnostics: components["schemas"]["BusinessDiagnostic"][];
1375
+ /** Format: date-time */
1376
+ createdAt: string;
1377
+ };
1378
+ BusinessConfigAttemptList: {
1379
+ businessId: string;
1380
+ environment: {
1381
+ name: string | null;
1382
+ production: boolean;
1383
+ };
1384
+ attempts: components["schemas"]["BusinessConfigAttempt"][];
1385
+ };
1386
+ BusinessContract: {
1387
+ plans: components["schemas"]["ContractPlan"][];
1388
+ unreadablePlans?: {
1389
+ key: string;
1390
+ version: number;
1391
+ }[];
1392
+ meterKeys: string[];
1393
+ meterLabels: {
1394
+ [key: string]: components["schemas"]["UsageMeterLabel"];
1395
+ };
1396
+ metered: components["schemas"]["ContractRoute"][];
1397
+ unmetered: components["schemas"]["ContractRoute"][];
1398
+ unmeteredWrites: components["schemas"]["ContractRoute"][];
1399
+ };
1400
+ BusinessCreateResponse: {
1401
+ business: components["schemas"]["Business"];
1402
+ repo: {
1403
+ fullName: string;
1404
+ htmlUrl: string;
1405
+ cloneUrl: string;
1406
+ };
1407
+ agent: {
1408
+ instructions: string;
1409
+ agentsMdUrl: string;
1410
+ };
1411
+ };
1412
+ BusinessDependent: {
1413
+ subscriberId: string;
1414
+ apiKeyId: string | null;
1415
+ /** Format: date-time */
1416
+ lastSeenAt: string;
1417
+ /** Format: date-time */
1418
+ firstSeenAt: string;
1419
+ requestCount30d: number;
1420
+ };
1421
+ BusinessDependents: {
1422
+ businessId: string;
1423
+ routeKey: string;
1424
+ environmentId: string | null;
1425
+ sinceMs: number;
1426
+ count: number;
1427
+ truncated: boolean;
1428
+ consumers: components["schemas"]["BusinessDependent"][];
1429
+ };
1430
+ BusinessDetail: {
1431
+ id: string;
1432
+ organizationId: string | null;
1433
+ name: string;
1434
+ displayName: string | null;
1435
+ description: string | null;
1436
+ /** @enum {string} */
1437
+ status: "DRAFT" | "ACTIVE";
1438
+ /** @enum {string} */
1439
+ visibility: "PUBLIC" | "PRIVATE";
1440
+ runtimeHostname: string | null;
1441
+ portalHostname: string | null;
1442
+ iconUrl: string | null;
1443
+ logoUrl: string | null;
1444
+ keyPrefix: string | null;
1445
+ allowedOrigins: string[];
1446
+ docsEnabled: boolean;
1447
+ listedOnOrganizationPage: boolean;
1448
+ rbacEnabled: boolean;
1449
+ meters: components["schemas"]["BusinessMeter"][];
1450
+ plans: components["schemas"]["BusinessPlan"][];
1451
+ unreadablePlans?: components["schemas"]["BusinessUnreadablePlan"][];
1452
+ rateLimitConfig: components["schemas"]["BusinessRateLimit"] | null;
1453
+ publishedRevisionId: string | null;
1454
+ latestRevisionId: string | null;
1455
+ latestRevisionNumber: number | null;
1456
+ latestReleaseVersion: string | null;
1457
+ gitRepoFullName: string | null;
1458
+ envBranchPrefix: string | null;
1459
+ /** @enum {string} */
1460
+ previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
1461
+ /** Format: date-time */
1462
+ createdAt: string;
1463
+ /** Format: date-time */
1464
+ updatedAt: string;
1465
+ environments: components["schemas"]["BusinessEnvironment"][];
1466
+ };
1467
+ BusinessDiagnostic: {
1468
+ code: string;
1469
+ message: string;
1470
+ path: string;
1471
+ };
1472
+ BusinessEnvironment: {
1473
+ id: string;
1474
+ name: string;
1475
+ branch: string;
1476
+ subdomain: string;
1477
+ runtimeHostname: string;
1478
+ portalHostname: string | null;
1479
+ status: string;
1480
+ };
1481
+ BusinessEnvironmentCreateResponse: {
1482
+ id: string;
1483
+ name: string;
1484
+ branch: string;
1485
+ subdomain: string;
1486
+ runtimeHostname: string;
1487
+ portalHostname: string | null;
1488
+ status: string;
1489
+ created: boolean;
1490
+ branchCreated: boolean;
1491
+ };
1492
+ BusinessEnvironmentList: {
1493
+ data: components["schemas"]["BusinessEnvironment"][];
1494
+ pagination: {
1495
+ total: number;
1496
+ limit: number;
1497
+ offset: number;
1498
+ hasMore: boolean;
1499
+ };
1500
+ };
1501
+ BusinessIconUploadResponse: {
1502
+ iconUrl: string;
1503
+ };
1504
+ BusinessLogoUploadResponse: {
1505
+ logoUrl: string;
1506
+ };
1507
+ BusinessMeter: {
1508
+ key: string;
1509
+ displayKey?: string;
1510
+ display: string;
1511
+ unit?: string;
1512
+ };
1513
+ BusinessPlan: {
1514
+ key: string;
1515
+ name: string;
1516
+ description?: string;
1517
+ details?: string[];
1518
+ /** @enum {string} */
1519
+ kind: "free" | "flat" | "usage" | "prepaid" | "hybrid" | "trial" | "custom";
1520
+ /** @default [] */
1521
+ meters: {
1522
+ dimension: string;
1523
+ /**
1524
+ * @default linear
1525
+ * @enum {string}
1526
+ */
1527
+ kind: "linear" | "active_count" | "event_count";
1528
+ }[];
1529
+ /** @default 0 */
1530
+ recurring_fee_cents: number;
1531
+ /**
1532
+ * @default month
1533
+ * @enum {string}
1534
+ */
1535
+ billing_interval: "month" | "year";
1536
+ /** @default 0 */
1537
+ trial_days: number;
1538
+ max_monthly_spend_cents?: number;
1539
+ min_monthly_spend_cents?: number;
1540
+ /** @default [] */
1541
+ limits: {
1542
+ dimension: string;
1543
+ window: {
1544
+ /** @constant */
1545
+ type: "named";
1546
+ /** @enum {string} */
1547
+ name: "second" | "minute" | "hour" | "day" | "week" | "month";
1548
+ } | {
1549
+ /** @constant */
1550
+ type: "custom";
1551
+ seconds: number;
1552
+ label?: string;
1553
+ };
1554
+ capacity: number;
1555
+ /** @enum {string} */
1556
+ enforcement?: "enforce" | "track";
1557
+ warnAt?: number;
1558
+ /** @enum {string} */
1559
+ strategy?: "fixed_window" | "sliding_window" | "token_bucket";
1560
+ bucketCapacity?: number;
1561
+ refillRatePerSecond?: number;
1562
+ scope?: {
1563
+ endpoint?: string;
1564
+ apiKey?: string;
1565
+ workspace?: string;
1566
+ region?: string;
1567
+ actor?: {
1568
+ /** @enum {string} */
1569
+ kind: "member" | "service_account";
1570
+ };
1571
+ };
1572
+ acknowledgeUnreachable?: boolean;
1573
+ }[];
1574
+ routeGrants?: string[];
1575
+ frontendIntegrationGrants?: string[];
1576
+ /** @default {} */
1577
+ resource_limits: {
1578
+ [key: string]: number;
1579
+ };
1580
+ /**
1581
+ * @default block
1582
+ * @enum {string}
1583
+ */
1584
+ overageBehavior: "block" | "allow_and_bill";
1585
+ /** @default true */
1586
+ selfServeEnabled: boolean;
1587
+ capacity?: {
1588
+ maxInputTokens?: number;
1589
+ maxOutputTokens?: number;
1590
+ maxContextTokens?: number;
1591
+ maxPayloadBytes?: number;
1592
+ /**
1593
+ * @default enforce
1594
+ * @enum {string}
1595
+ */
1596
+ enforcement: "enforce" | "track";
1597
+ /**
1598
+ * @default open
1599
+ * @enum {string}
1600
+ */
1601
+ failMode: "open" | "closed";
1602
+ /** @enum {string} */
1603
+ tokenCountSource?: "declared" | "estimated";
1604
+ scope?: {
1605
+ endpoint?: string;
1606
+ apiKey?: string;
1607
+ workspace?: string;
1608
+ region?: string;
1609
+ actor?: {
1610
+ /** @enum {string} */
1611
+ kind: "member" | "service_account";
1612
+ };
1613
+ };
1614
+ };
1615
+ archive?: {
1616
+ /** Format: date-time */
1617
+ at?: string;
1618
+ transitionTo?: string;
1619
+ /**
1620
+ * @default auto
1621
+ * @enum {string}
1622
+ */
1623
+ strategy: "auto" | "explicit" | "block";
1624
+ };
1625
+ id: string;
1626
+ businessId: string;
1627
+ environmentId: string | null;
1628
+ isActive: boolean;
1629
+ createdAt: string;
1630
+ featured: boolean;
1631
+ };
1632
+ BusinessRateLimit: {
1633
+ windowSizeSeconds: number | null;
1634
+ maxUnitsPerWindow: number | null;
1635
+ maxUnitsPerMonth: number | null;
1636
+ overageBehavior: string | null;
1637
+ };
1638
+ BusinessRbacUpdateResponse: {
1639
+ rbacEnabled: boolean;
1640
+ };
1641
+ BusinessRoute: {
1642
+ routeId: string;
1643
+ method: string;
1644
+ path: string;
1645
+ subject: ("member" | "service") | null;
1646
+ };
1647
+ BusinessRouteList: {
1648
+ routes: components["schemas"]["BusinessRoute"][];
1649
+ };
1650
+ BusinessStatus: {
1651
+ data: components["schemas"]["DeploymentRun"][];
1652
+ applies: components["schemas"]["DeploymentApply"][];
1653
+ environmentId: string | null;
1654
+ business: {
1655
+ id: string;
1656
+ /** @enum {string} */
1657
+ status: "DRAFT" | "ACTIVE";
1658
+ latestReleaseVersion: string | null;
1659
+ };
1660
+ live: boolean;
1661
+ scopedLive: boolean;
1662
+ serving: components["schemas"]["ServingState"];
1663
+ };
1664
+ BusinessUnreadablePlan: {
1665
+ id: string;
1666
+ key: string;
1667
+ environmentId: string | null;
1668
+ };
1669
+ BusinessValidateResponse: {
1670
+ success: boolean;
1671
+ environment: {
1672
+ name: string | null;
1673
+ production: boolean;
1674
+ };
1675
+ errors: components["schemas"]["BusinessDiagnostic"][];
1676
+ warnings: components["schemas"]["BusinessDiagnostic"][];
1677
+ lifecyclePlan: {
1678
+ requiresSubscriptionMigration: boolean;
1679
+ actions: {
1680
+ /** @enum {string} */
1681
+ domain: "economic_contract" | "entitlement_surface" | "operational_policy" | "compatibility_lifecycle";
1682
+ /** @enum {string} */
1683
+ action: "no_op" | "migrate_at_renewal" | "migrate_immediately" | "replay" | "block";
1684
+ rationale: string;
1685
+ }[];
1686
+ } | null;
1687
+ economicChange: boolean;
1688
+ };
1689
+ BusinessVariable: {
1690
+ name: string;
1691
+ /** @enum {string} */
1692
+ visibility: "public" | "secret";
1693
+ value: string | null;
1694
+ hasValue: boolean;
1695
+ /** @enum {string} */
1696
+ lifecycleStatus: "PENDING" | "ACTIVE" | "REVOKING" | "REVOKED" | "DELETE_PENDING" | "DELETED";
1697
+ version: number | null;
1698
+ };
1699
+ BusinessVariableList: {
1700
+ variables: components["schemas"]["BusinessVariable"][];
1701
+ };
1702
+ ChangeSet: {
1703
+ id: string;
1704
+ scope: {
1705
+ businessId: string;
1706
+ environmentId: string | null;
1707
+ subscriberId: string | null;
1708
+ /** @enum {string} */
1709
+ scopeType: "business" | "environment" | "subscriber";
1710
+ };
1711
+ /** @enum {string} */
1712
+ source: "operate" | "system" | "agent";
1713
+ actorType: string;
1714
+ actorId: string;
1715
+ intent: string;
1716
+ /** @enum {string} */
1717
+ status: "draft" | "previewed" | "approval_required" | "approved" | "scheduled" | "applied" | "failed" | "rolled_back" | "cancelled";
1718
+ /** @enum {string} */
1719
+ riskLevel: "low" | "medium" | "high" | "critical";
1720
+ operations: components["schemas"]["ChangeSetOperation"][];
1721
+ simulation: components["schemas"]["ChangeSetSimulation"] | null;
1722
+ approvalRequirement: {
1723
+ required: boolean;
1724
+ minApprovals: number;
1725
+ distinctFromProposer: boolean;
1726
+ humanApproverRequired: boolean;
1727
+ requiredVerb: string;
1728
+ };
1729
+ approvals: {
1730
+ id: string;
1731
+ approverType: string;
1732
+ approverId: string;
1733
+ /** @enum {string} */
1734
+ decision: "approved" | "rejected";
1735
+ comment: string | null;
1736
+ soleOwner: boolean;
1737
+ createdAt: string;
1738
+ }[];
1739
+ resetReason: ("simulation_expired" | "simulation_fingerprint_mismatch" | "version_mismatch" | "catalog_drift" | "role_deleted" | "status_conflict") | null;
1740
+ scheduledFor: string | null;
1741
+ createdAt: string;
1742
+ updatedAt: string;
1743
+ appliedAt: string | null;
1744
+ rolledBackAt: string | null;
1745
+ };
1746
+ ChangeSetList: {
1747
+ items: components["schemas"]["ChangeSet"][];
1748
+ nextCursor: string | null;
1749
+ };
1750
+ ChangeSetOperation: {
1751
+ /** @constant */
1752
+ type: "update_role_permissions";
1753
+ /** @constant */
1754
+ schemaVersion: 1;
1755
+ target: {
1756
+ /** @constant */
1757
+ resourceType: "subscriber_product_role";
1758
+ resourceId: string;
1759
+ resourceKey?: string;
1760
+ expectedVersion?: number;
1761
+ };
1762
+ payload: {
1763
+ permissions: string[];
1764
+ };
1765
+ } | {
1766
+ /** @constant */
1767
+ type: "update_component_access_policy";
1768
+ /** @constant */
1769
+ schemaVersion: 1;
1770
+ target: {
1771
+ /** @constant */
1772
+ resourceType: "component_access_policy";
1773
+ resourceId: string;
1774
+ resourceKey?: string;
1775
+ expectedVersion?: number;
1776
+ };
1777
+ payload: {
1778
+ componentKey: string;
1779
+ requiredPermission: string | null;
1780
+ gateMode: string | null;
1781
+ };
1782
+ } | {
1783
+ /** @constant */
1784
+ type: "enable_feature";
1785
+ /** @constant */
1786
+ schemaVersion: 1;
1787
+ target: {
1788
+ /** @constant */
1789
+ resourceType: "subscriber_feature_setting";
1790
+ resourceId: string;
1791
+ resourceKey?: string;
1792
+ expectedVersion?: number;
1793
+ };
1794
+ payload: {
1795
+ featureKey: string;
1796
+ enabled: boolean;
1797
+ };
1798
+ };
1799
+ ChangeSetProposePreview: {
1800
+ scope: {
1801
+ businessId: string;
1802
+ environmentId: string | null;
1803
+ subscriberId: string | null;
1804
+ /** @enum {string} */
1805
+ scopeType: "business" | "environment" | "subscriber";
1806
+ };
1807
+ actorType: string;
1808
+ actorId: string;
1809
+ intent: string;
1810
+ operationCount: number;
1811
+ };
1812
+ ChangeSetSimulation: {
1813
+ computedAt: string;
1814
+ summary: {
1815
+ membersAffected: number;
1816
+ apiKeysAffected: number;
1817
+ personasAffected: number;
1818
+ permissionsGained: number;
1819
+ permissionsLost: number;
1820
+ lockedOut: number;
1821
+ componentsAffected?: number | null;
1822
+ componentsUnquantified?: number;
1823
+ };
1824
+ impacts: {
1825
+ /** @enum {string} */
1826
+ principalType: "member" | "api_key" | "test_persona";
1827
+ principalId: string;
1828
+ principalLabel: string;
1829
+ gained: string[];
1830
+ lost: string[];
1831
+ }[];
1832
+ componentImpacts?: ({
1833
+ componentKey: string;
1834
+ beforeRequiredPermission: string | null;
1835
+ afterRequiredPermission: string | null;
1836
+ principalsGained: {
1837
+ /** @enum {string} */
1838
+ principalType: "member" | "api_key" | "test_persona";
1839
+ principalId: string;
1840
+ principalLabel: string;
1841
+ }[];
1842
+ principalsLost: {
1843
+ /** @enum {string} */
1844
+ principalType: "member" | "api_key" | "test_persona";
1845
+ principalId: string;
1846
+ principalLabel: string;
1847
+ }[];
1848
+ gateModeChange: {
1849
+ before: string | null;
1850
+ after: string | null;
1851
+ } | null;
1852
+ /** @constant */
1853
+ accessAssessment: "exact";
1854
+ principalsGainedCount: number;
1855
+ principalsLostCount: number;
1856
+ } | {
1857
+ componentKey: string;
1858
+ beforeRequiredPermission: string | null;
1859
+ afterRequiredPermission: string | null;
1860
+ principalsGained: {
1861
+ /** @enum {string} */
1862
+ principalType: "member" | "api_key" | "test_persona";
1863
+ principalId: string;
1864
+ principalLabel: string;
1865
+ }[];
1866
+ principalsLost: {
1867
+ /** @enum {string} */
1868
+ principalType: "member" | "api_key" | "test_persona";
1869
+ principalId: string;
1870
+ principalLabel: string;
1871
+ }[];
1872
+ gateModeChange: {
1873
+ before: string | null;
1874
+ after: string | null;
1875
+ } | null;
1876
+ /** @constant */
1877
+ accessAssessment: "state_dependent";
1878
+ /** @constant */
1879
+ subscriberCapability: "planChoiceAllowed";
1880
+ /** @constant */
1881
+ reason: "subscriber_capability_not_in_simulation_inputs";
1882
+ principalsGainedCount: null;
1883
+ principalsLostCount: null;
1884
+ })[];
1885
+ featureAdoptionImpacts?: {
1886
+ featureKey: string;
1887
+ beforeEnabled: boolean | null;
1888
+ afterEnabled: boolean;
1889
+ membersAffected: number;
1890
+ lockedOutMembers: {
1891
+ /** @enum {string} */
1892
+ principalType: "member" | "api_key" | "test_persona";
1893
+ principalId: string;
1894
+ principalLabel: string;
1895
+ }[];
1896
+ lockedOutCount: number;
1897
+ }[];
1898
+ truncated: boolean;
1899
+ };
1900
+ CliAccessExchangeResponse: {
1901
+ /** @constant */
1902
+ tokenType: "Bearer";
1903
+ accessToken: string;
1904
+ /** Format: date-time */
1905
+ expiresAt: string;
1906
+ /** @enum {string} */
1907
+ credentialType: "maker_token" | "cli_session";
1908
+ userId?: string;
1909
+ organizationId: string;
1910
+ };
1911
+ CliOrganizationSummary: {
1912
+ id: string;
1913
+ name: string;
1914
+ slug: string;
1915
+ role: string;
1916
+ };
1917
+ CliOrganizationsResponse: {
1918
+ userId: string;
1919
+ organizations: components["schemas"]["CliOrganizationSummary"][];
1920
+ };
1921
+ ConfigRollbackPreview: {
1922
+ /** @constant */
1923
+ status: "preview_only";
1924
+ businessId: string;
1925
+ commitSha: string;
1926
+ /** @constant */
1927
+ dryRun: true;
1928
+ currentCommitSha: string | null;
1929
+ message: string;
1930
+ diff?: {
1931
+ repo: string;
1932
+ fromCommit: string;
1933
+ toCommit: string;
1934
+ files: {
1935
+ path: string;
1936
+ contentFrom: string;
1937
+ contentTo: string;
1938
+ }[];
1939
+ revertCommitSha: string | null;
1940
+ };
1941
+ };
1942
+ Consumer: {
1943
+ id: string;
1944
+ businessId: string;
1945
+ /** @enum {string} */
1946
+ status: "ONBOARDING" | "ACTIVE" | "SUSPENDED";
1947
+ /** @enum {string} */
1948
+ ownerType: "personal_organization" | "team_organization";
1949
+ ownerOrganizationId: string | null;
1950
+ ownerName: string | null;
1951
+ planId: string | null;
1952
+ planName: string | null;
1953
+ onLatestPlan: boolean;
1954
+ /** Format: date-time */
1955
+ createdAt: string;
1956
+ rbac: {
1957
+ enabled: boolean;
1958
+ roles: {
1959
+ roleKey: string;
1960
+ name: string;
1961
+ }[];
1962
+ };
1963
+ members: components["schemas"]["ConsumerMember"][];
1964
+ };
1965
+ ConsumerApiKey: {
1966
+ id: string;
1967
+ name: string | null;
1968
+ displayPrefix: string;
1969
+ /** @enum {string} */
1970
+ status: "ACTIVE" | "REVOKED";
1971
+ /** @enum {string} */
1972
+ kind: "PERSONAL" | "SERVICE";
1973
+ /** Format: date-time */
1974
+ createdAt: string;
1975
+ lastUsedAt: string | null;
1976
+ expiresAt: string | null;
1977
+ revokedAt: string | null;
1978
+ };
1979
+ ConsumerApiKeyList: {
1980
+ apiKeys: components["schemas"]["ConsumerApiKey"][];
1981
+ };
1982
+ ConsumerBlockResponse: {
1983
+ /** @constant */
1984
+ blocked: true;
1985
+ subscriberId: string;
1986
+ apiKeysRevoked: number;
1987
+ alreadyBlocked: boolean;
1988
+ };
1989
+ ConsumerList: components["schemas"]["Consumer"][];
1990
+ ConsumerMember: {
1991
+ userExternalId: string;
1992
+ /** @enum {string} */
1993
+ accountRole: "owner" | "admin" | "member";
1994
+ businessRoleKeys: string[];
1995
+ staleRoleKeys: string[];
1996
+ };
1997
+ ConsumerMemberRoles: {
1998
+ userExternalId: string;
1999
+ /** @enum {string} */
2000
+ accountRole: "owner" | "admin" | "member";
2001
+ businessRoleKeys: string[];
2002
+ };
2003
+ ConsumerMigrateLatestResponse: {
2004
+ /** @constant */
2005
+ migrated: true;
2006
+ subscriberId: string;
2007
+ } | {
2008
+ /** @constant */
2009
+ migrated: false;
2010
+ subscriberId: string;
2011
+ /** @enum {string} */
2012
+ reason: "already_on_head" | "no_active_head";
2013
+ };
2014
+ ConsumerRbacRole: {
2015
+ roleKey: string;
2016
+ name: string;
2017
+ permissions: string[];
2018
+ /** @enum {string} */
2019
+ kind: "ACCOUNT" | "CUSTOM";
2020
+ /** Format: date-time */
2021
+ createdAt: string;
2022
+ };
2023
+ ConsumerRbacRoleList: {
2024
+ roles: components["schemas"]["ConsumerRbacRole"][];
2025
+ };
2026
+ ConsumerRbacSettings: {
2027
+ enabled: boolean;
2028
+ defaultRoleKey: string | null;
2029
+ };
2030
+ ConsumerRemoveResponse: {
2031
+ /** @constant */
2032
+ removed: true;
2033
+ subscriberId: string;
2034
+ subscriptionsRemoved: number;
2035
+ apiKeysRevoked: number;
2036
+ };
2037
+ ContextTokenResponse: {
2038
+ data: {
2039
+ token: string;
2040
+ /** Format: date-time */
2041
+ expiresAt: string;
2042
+ };
2043
+ };
2044
+ ContractPlan: {
2045
+ key: string;
2046
+ name: string | null;
2047
+ version: number;
2048
+ recurringFeeCents: number | null;
2049
+ billingInterval: string | null;
2050
+ limits: {
2051
+ dimension: string;
2052
+ window: {
2053
+ /** @constant */
2054
+ type: "named";
2055
+ /** @enum {string} */
2056
+ name: "second" | "minute" | "hour" | "day" | "week" | "month";
2057
+ } | {
2058
+ /** @constant */
2059
+ type: "custom";
2060
+ seconds: number;
2061
+ label?: string;
2062
+ };
2063
+ capacity: number;
2064
+ /** @enum {string} */
2065
+ enforcement?: "enforce" | "track";
2066
+ warnAt?: number;
2067
+ /** @enum {string} */
2068
+ strategy?: "fixed_window" | "sliding_window" | "token_bucket";
2069
+ bucketCapacity?: number;
2070
+ refillRatePerSecond?: number;
2071
+ scope?: {
2072
+ endpoint?: string;
2073
+ apiKey?: string;
2074
+ workspace?: string;
2075
+ region?: string;
2076
+ actor?: {
2077
+ /** @enum {string} */
2078
+ kind: "member" | "service_account";
2079
+ };
2080
+ };
2081
+ acknowledgeUnreachable?: boolean;
2082
+ }[];
2083
+ meters: {
2084
+ dimension: string;
2085
+ /**
2086
+ * @default linear
2087
+ * @enum {string}
2088
+ */
2089
+ kind: "linear" | "active_count" | "event_count";
2090
+ }[];
2091
+ };
2092
+ ContractPricingVersion: {
2093
+ id: string;
2094
+ version: number;
2095
+ terms: components["schemas"]["ContractTerms"];
2096
+ effectiveAt: string;
2097
+ createdAt: string;
2098
+ };
2099
+ ContractRoute: {
2100
+ routeId: string;
2101
+ method: string;
2102
+ path: string;
2103
+ subject: ("member" | "service") | null;
2104
+ meters: string[];
2105
+ grantedBy: string[];
2106
+ };
2107
+ ContractTerms: {
2108
+ percentDiscount?: {
2109
+ num: string;
2110
+ den: string;
2111
+ };
2112
+ floorNanos?: string;
2113
+ capNanos?: string;
2114
+ selectorScope: ({
2115
+ /** @constant */
2116
+ kind: "catalog_item";
2117
+ item: {
2118
+ provider: string;
2119
+ model: string;
2120
+ modality?: string;
2121
+ };
2122
+ } | {
2123
+ /** @constant */
2124
+ kind: "provider_model_glob";
2125
+ provider: string;
2126
+ modelGlob: string;
2127
+ modality?: string;
2128
+ })[];
2129
+ };
2130
+ ContractTermsBounds: {
2131
+ maxPercentDiscount?: {
2132
+ num: string;
2133
+ den: string;
2134
+ };
2135
+ minFloorNanos?: string;
2136
+ maxCapNanos?: string;
2137
+ requireFloorWithDiscount?: boolean;
2138
+ };
2139
+ CustomPermissionSubject: {
2140
+ subject: string;
2141
+ verbs: string[];
2142
+ escalatory: string[];
2143
+ description?: string;
2144
+ };
2145
+ CustomPermissionSubjectListResponse: {
2146
+ subjects: components["schemas"]["CustomPermissionSubject"][];
2147
+ };
2148
+ DenialEvent: {
2149
+ requestId: string;
2150
+ environmentId: string | null;
2151
+ subscriberId: string | null;
2152
+ apiKeyId: string | null;
2153
+ routeKey: string | null;
2154
+ constraintKind: string;
2155
+ code: string;
2156
+ details: {
2157
+ statusCode: number | null;
2158
+ limitClass: string | null;
2159
+ reason: string | null;
2160
+ decisionId: string | null;
2161
+ };
2162
+ /** Format: date-time */
2163
+ occurredAt: string;
2164
+ };
2165
+ DenialExplanation: {
2166
+ denialEvent: components["schemas"]["DenialEvent"];
2167
+ };
2168
+ DeploymentApply: {
2169
+ id: string;
2170
+ /** @enum {string} */
2171
+ trigger: "DEFAULT_PUSH" | "ENV_PUSH" | "RELEASE";
2172
+ branch: string;
2173
+ commitSha: string;
2174
+ environmentId: string | null;
2175
+ revisionId: string | null;
2176
+ version: string | null;
2177
+ /** @enum {string} */
2178
+ overallStatus: "pending" | "running" | "succeeded" | "failed" | "skipped";
2179
+ /** Format: date-time */
2180
+ createdAt: string;
2181
+ phases: {
2182
+ build: {
2183
+ /** @enum {string} */
2184
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
2185
+ startedAt: string | null;
2186
+ finishedAt: string | null;
2187
+ error: string | null;
2188
+ };
2189
+ compile: {
2190
+ /** @enum {string} */
2191
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
2192
+ startedAt: string | null;
2193
+ finishedAt: string | null;
2194
+ error: string | null;
2195
+ };
2196
+ accept: {
2197
+ /** @enum {string} */
2198
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
2199
+ startedAt: string | null;
2200
+ finishedAt: string | null;
2201
+ error: string | null;
2202
+ };
2203
+ publish: {
2204
+ /** @enum {string} */
2205
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
2206
+ startedAt: string | null;
2207
+ finishedAt: string | null;
2208
+ error: string | null;
2209
+ };
2210
+ billing: {
2211
+ /** @enum {string} */
2212
+ status: "pending" | "running" | "succeeded" | "failed" | "skipped";
2213
+ startedAt: string | null;
2214
+ finishedAt: string | null;
2215
+ error: string | null;
2216
+ } | null;
2217
+ };
2218
+ existingSubscribers?: {
2219
+ planKey: string;
2220
+ fromCompiledPlanId: string;
2221
+ toCompiledPlanId: string;
2222
+ /** @enum {string} */
2223
+ timing: "aliased" | "immediate" | "period_end";
2224
+ cohorts: number;
2225
+ reasons: string[];
2226
+ }[];
2227
+ };
2228
+ DeploymentRun: {
2229
+ id: string;
2230
+ environmentId: string | null;
2231
+ /** @enum {string} */
2232
+ status: "PENDING" | "RUNNING" | "COMPLETED" | "PARTIALLY_FAILED" | "FAILED";
2233
+ /** @enum {string} */
2234
+ publishStatus: "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED" | "SKIPPED";
2235
+ publishError: string | null;
2236
+ /** @enum {string} */
2237
+ billingStatus: "PENDING" | "RUNNING" | "SUCCEEDED" | "FAILED" | "SKIPPED";
2238
+ billingError: string | null;
2239
+ startedAt: string | null;
2240
+ completedAt: string | null;
2241
+ /** Format: date-time */
2242
+ createdAt: string;
2243
+ };
2244
+ EconomicAgreement: {
2245
+ id: string;
2246
+ environmentId: string | null;
2247
+ subjectId: string;
2248
+ usagePricingBinding: components["schemas"]["AgreementUsagePricingBinding"];
2249
+ /** @enum {string} */
2250
+ newMeterPolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
2251
+ /** @enum {string} */
2252
+ newMeasurePolicy: "adopt_at_current_rate" | "exclude_until_renewal" | "require_amendment";
2253
+ effectiveAt: string;
2254
+ expiresAt: string | null;
2255
+ createdAt: string;
2256
+ contractPricingVersions: components["schemas"]["ContractPricingVersion"][];
2257
+ };
2258
+ EconomicAgreementList: {
2259
+ data: components["schemas"]["EconomicAgreement"][];
2260
+ pagination: {
2261
+ total: number;
2262
+ limit: number;
2263
+ offset: number;
2264
+ hasMore: boolean;
2265
+ };
2266
+ };
2267
+ FrontendBuild: {
2268
+ id: string;
2269
+ /** @enum {string} */
2270
+ status: "QUEUED" | "BUILDING" | "SUCCEEDED" | "FAILED" | "CANCELLED" | "SUPERSEDED";
2271
+ error: string | null;
2272
+ diagnostics: {
2273
+ /** @enum {string} */
2274
+ code: "FRONTEND_SIGN_IN_MISSING" | "FRONTEND_SDK_TOO_OLD";
2275
+ message: string;
2276
+ fix: string;
2277
+ docsPath: string;
2278
+ }[];
2279
+ ref: string | null;
2280
+ releaseId: string | null;
2281
+ createdAt: string;
2282
+ startedAt: string | null;
2283
+ finishedAt: string | null;
2284
+ };
2285
+ FrontendRelease: {
2286
+ releaseId: string;
2287
+ buildId: string;
2288
+ ref: string | null;
2289
+ createdAt: string;
2290
+ finishedAt: string | null;
2291
+ active: boolean;
2292
+ };
2293
+ FrontendReleaseList: {
2294
+ releases: components["schemas"]["FrontendRelease"][];
2295
+ };
2296
+ FrontendRollbackDryRun: {
2297
+ /** @constant */
2298
+ dryRun: true;
2299
+ wouldHave: components["schemas"]["FrontendRollbackPreview"];
2300
+ };
2301
+ FrontendRollbackPreview: {
2302
+ releaseId: string;
2303
+ buildId: string;
2304
+ environmentId: string | null;
2305
+ };
2306
+ FrontendRollbackResponse: {
2307
+ releaseId: string;
2308
+ buildId: string;
2309
+ environmentId: string | null;
2310
+ host: string;
2311
+ /** @enum {string} */
2312
+ uiMode: "template" | "custom-react";
2313
+ };
2314
+ FrontendServeState: {
2315
+ environmentId: string | null;
2316
+ /** @enum {string} */
2317
+ uiMode: "template" | "custom-react";
2318
+ activeReleaseId: string | null;
2319
+ activeBuildId: string | null;
2320
+ pinned: boolean;
2321
+ templateChannel: string | null;
2322
+ };
2323
+ FrontendStatus: {
2324
+ status: components["schemas"]["FrontendServeState"];
2325
+ releases: components["schemas"]["FrontendRelease"][];
2326
+ builds: components["schemas"]["FrontendBuild"][];
2327
+ };
2328
+ KnowledgeIndex: {
2329
+ items: components["schemas"]["KnowledgeResource"][];
2330
+ nextCursor: string | null;
2331
+ };
2332
+ KnowledgeResource: {
2333
+ id: string;
2334
+ /** @enum {string} */
2335
+ resourceType: "platform_guide" | "api_reference" | "business_docs";
2336
+ title: string;
2337
+ tags: string[];
2338
+ version: string;
2339
+ contentHash: string;
2340
+ storageUrl: string;
2341
+ businessId?: string;
2342
+ updatedAt: string;
2343
+ };
2344
+ /** @enum {string} */
2345
+ MakerDelegablePermission: "agent:configure" | "agent:read" | "agreement:amend" | "agreement:create" | "agreement:read" | "analytics:read" | "apply_timeline:read" | "audit_log:export" | "audit_log:read" | "auth_context:issue" | "auth_context:read" | "automation_rule:create" | "automation_rule:delete" | "automation_rule:read" | "automation_rule:update" | "backend:bind" | "backend:create" | "backend:delete" | "backend:read" | "brand:update" | "bulletin:ack" | "bulletin:read" | "bulletin:resolve" | "business:compile" | "business:cors_update" | "business:create" | "business:delete" | "business:docs_update" | "business:preview_env_update" | "business:publish" | "business:rbac_update" | "business:read" | "business:rollback" | "business_dependents:read" | "business_variable:create" | "business_variable:delete" | "business_variable:operation_read" | "business_variable:read" | "business_variable:revoke" | "business_variable:rotate" | "change_set:propose" | "change_set:read" | "consumer:block" | "consumer:migrate_latest" | "consumer:read" | "consumer:remove" | "consumer:roles_assign" | "denial:read" | "environment:create" | "environment:delete" | "environment:read" | "frontend:read" | "frontend:rollback" | "knowledge:read" | "organization:read" | "organization_bulletin:read" | "persona:issue" | "persona:read" | "persona:revoke" | "persona:rotate" | "plan:read" | "promo_code:archive" | "promo_code:create" | "promo_code:reactivate" | "promo_code:read" | "promo_code:update" | "rbac:read" | "resource_count:report" | "runtime_token:mint" | "runtime_token:read" | "runtime_token:revoke" | "runtime_token:rotate" | "tax_settings:read" | "tax_settings:update" | "usage:read" | "webhook:create" | "webhook:delete" | "webhook:delivery_read" | "webhook:read" | "webhook:test" | "webhook:update" | "workflow:replay" | "workflow:rollback";
2346
+ MakerTokenBusinessScopeSummary: {
2347
+ /** @constant */
2348
+ mode: "ALL";
2349
+ } | {
2350
+ /** @constant */
2351
+ mode: "SELECTED";
2352
+ businesses: {
2353
+ id: string;
2354
+ name: string;
2355
+ }[];
2356
+ };
2357
+ MakerTokenIssuanceResponse: {
2358
+ id: string;
2359
+ organizationId: string;
2360
+ name: string;
2361
+ /** @enum {string} */
2362
+ variant: "PERSONAL" | "ORG";
2363
+ /** @constant */
2364
+ provisioningState: "ACTIVE";
2365
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2366
+ businessScope: components["schemas"]["MakerTokenBusinessScopeSummary"];
2367
+ lastFour: string;
2368
+ createdAt: string | null;
2369
+ lastUsedAt: string | null;
2370
+ revokedAt: string | null;
2371
+ /** @enum {string} */
2372
+ origin: "USER" | "PLATFORM";
2373
+ purpose: string | null;
2374
+ token: string;
2375
+ };
2376
+ MakerTokenListResponse: {
2377
+ data: components["schemas"]["MakerTokenSummary"][];
2378
+ pagination: {
2379
+ total: number;
2380
+ limit: number;
2381
+ offset: number;
2382
+ hasMore: boolean;
2383
+ };
2384
+ };
2385
+ MakerTokenPermissionCatalog: {
2386
+ entries: {
2387
+ subject: string;
2388
+ title: string;
2389
+ permissions: components["schemas"]["MakerDelegablePermission"][];
2390
+ }[];
2391
+ };
2392
+ MakerTokenRotationResponse: {
2393
+ id: string;
2394
+ lastFour: string;
2395
+ token: string;
2396
+ };
2397
+ MakerTokenSummary: {
2398
+ id: string;
2399
+ organizationId: string;
2400
+ name: string;
2401
+ /** @enum {string} */
2402
+ variant: "PERSONAL" | "ORG";
2403
+ /** @constant */
2404
+ provisioningState: "ACTIVE";
2405
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2406
+ businessScope: components["schemas"]["MakerTokenBusinessScopeSummary"];
2407
+ lastFour: string;
2408
+ createdAt: string | null;
2409
+ lastUsedAt: string | null;
2410
+ revokedAt: string | null;
2411
+ /** @enum {string} */
2412
+ origin: "USER" | "PLATFORM";
2413
+ purpose: string | null;
2414
+ };
2415
+ ManagedSubdomainAvailability: {
2416
+ subdomain: string;
2417
+ available: boolean;
2418
+ message?: string;
2419
+ };
2420
+ ManagementBusinessList: {
2421
+ data: components["schemas"]["Business"][];
2422
+ total: number;
2423
+ };
2424
+ ManagementUsageLimit: {
2425
+ id: string;
2426
+ subscriberId: string;
2427
+ environmentId: string | null;
2428
+ plan: components["schemas"]["UsageLimitPlan"] | null;
2429
+ lifecycle: string;
2430
+ /** @enum {string} */
2431
+ scope: "ORG" | "MEMBER" | "SERVICE_ACCOUNT";
2432
+ quantity: string;
2433
+ quantityDisplayKey: string;
2434
+ quantityLabel: string;
2435
+ limitUnits: number | null;
2436
+ limitCents: number | null;
2437
+ /** @enum {string} */
2438
+ mode: "BLOCK" | "NOTIFY";
2439
+ /** @constant */
2440
+ period: "BILLING_PERIOD";
2441
+ notifyAtPct: number | null;
2442
+ allTimeUsage: {
2443
+ quantity: string;
2444
+ requestCount: number;
2445
+ };
2446
+ /** Format: date-time */
2447
+ createdAt: string;
2448
+ /** Format: date-time */
2449
+ updatedAt: string;
2450
+ };
2451
+ ManagementUsageLimitListResponse: {
2452
+ data: components["schemas"]["ManagementUsageLimit"][];
2453
+ pagination: {
2454
+ total: number;
2455
+ limit: number;
2456
+ offset: number;
2457
+ hasMore: boolean;
2458
+ };
2459
+ };
2460
+ ManagementWhoamiCliSession: {
2461
+ /** @constant */
2462
+ credentialType: "cli_session";
2463
+ sessionId: string;
2464
+ userId: string;
2465
+ organizationId: string;
2466
+ role: string;
2467
+ };
2468
+ ManagementWhoamiMakerToken: {
2469
+ /** @constant */
2470
+ credentialType: "maker_token";
2471
+ tokenId: string;
2472
+ organizationId: string;
2473
+ grantedPermissions: ("agent:configure" | "agent:read" | "agreement:amend" | "agreement:create" | "agreement:read" | "analytics:read" | "apply_timeline:read" | "audit_log:export" | "audit_log:read" | "auth_context:issue" | "auth_context:read" | "auth_provider_connection:create" | "auth_provider_connection:delete" | "auth_provider_connection:read" | "auth_provider_connection:update" | "automation_rule:create" | "automation_rule:delete" | "automation_rule:read" | "automation_rule:update" | "backend:bind" | "backend:create" | "backend:delete" | "backend:read" | "brand:update" | "bulletin:ack" | "bulletin:read" | "bulletin:resolve" | "business:compile" | "business:cors_update" | "business:create" | "business:delete" | "business:docs_update" | "business:preview_env_update" | "business:publish" | "business:rbac_update" | "business:read" | "business:rollback" | "business_dependents:read" | "business_variable:create" | "business_variable:delete" | "business_variable:operation_read" | "business_variable:read" | "business_variable:revoke" | "business_variable:rotate" | "change_set:propose" | "change_set:read" | "consumer:block" | "consumer:migrate_latest" | "consumer:read" | "consumer:remove" | "consumer:roles_assign" | "denial:read" | "environment:create" | "environment:delete" | "environment:read" | "frontend:read" | "frontend:rollback" | "git_connection:create" | "git_connection:delete" | "git_connection:read" | "git_connection:update" | "knowledge:read" | "maker_token:create" | "maker_token:create_org" | "maker_token:read" | "maker_token:revoke" | "maker_token:rotate" | "notification:preferences_read" | "notification:preferences_update" | "organization:create" | "organization:delete" | "organization:manage_billing" | "organization:ownership_transfer" | "organization:read" | "organization_bulletin:read" | "organization_invitation:accept" | "organization_invitation:create" | "organization_invitation:list" | "organization_invitation:revoke" | "organization_member:list" | "organization_member:remove" | "organization_member:update" | "organization_role:create" | "organization_role:delete" | "organization_role:read" | "organization_role:update" | "persona:issue" | "persona:read" | "persona:revoke" | "persona:rotate" | "plan:read" | "product_subscription:create" | "promo_code:archive" | "promo_code:create" | "promo_code:reactivate" | "promo_code:read" | "promo_code:update" | "rbac:read" | "resource_count:report" | "runtime_token:mint" | "runtime_token:read" | "runtime_token:revoke" | "runtime_token:rotate" | "stripe_connection:create" | "stripe_connection:delete" | "stripe_connection:read" | "tax_settings:read" | "tax_settings:update" | "usage:read" | "webhook:create" | "webhook:delete" | "webhook:delivery_read" | "webhook:read" | "webhook:test" | "webhook:update" | "workflow:replay" | "workflow:rollback")[];
2474
+ /** @enum {string} */
2475
+ businessScopeMode: "ALL" | "SELECTED";
2476
+ selectedBusinessIds: string[];
2477
+ };
2478
+ NotificationPreferences: {
2479
+ /** @default false */
2480
+ master: boolean;
2481
+ /** @default {} */
2482
+ categories: {
2483
+ billing?: boolean;
2484
+ usage?: boolean;
2485
+ access?: boolean;
2486
+ product?: boolean;
2487
+ deployments?: boolean;
2488
+ team?: boolean;
2489
+ security?: boolean;
2490
+ };
2491
+ };
2492
+ OrgMakerTokenActiveCreateResponse: {
2493
+ /** @constant */
2494
+ status: "ACTIVE";
2495
+ id: string;
2496
+ organizationId: string;
2497
+ name: string;
2498
+ /** @enum {string} */
2499
+ variant: "PERSONAL" | "ORG";
2500
+ /** @constant */
2501
+ provisioningState: "ACTIVE";
2502
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2503
+ businessScope: components["schemas"]["MakerTokenBusinessScopeSummary"];
2504
+ lastFour: string;
2505
+ createdAt: string | null;
2506
+ lastUsedAt: string | null;
2507
+ revokedAt: string | null;
2508
+ /** @enum {string} */
2509
+ origin: "USER" | "PLATFORM";
2510
+ purpose: string | null;
2511
+ token: string;
2512
+ };
2513
+ OrgMakerTokenActiveUpdateResponse: {
2514
+ /** @constant */
2515
+ status: "ACTIVE";
2516
+ makerTokenId: string;
2517
+ requestedPermissions: components["schemas"]["MakerDelegablePermission"][];
2518
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2519
+ };
2520
+ OrgMakerTokenApprovalResponse: {
2521
+ /** @constant */
2522
+ status: "ACTIVE";
2523
+ approvalId: string;
2524
+ makerTokenId: string;
2525
+ requestedPermissions: components["schemas"]["MakerDelegablePermission"][];
2526
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2527
+ token?: string;
2528
+ lastFour?: string;
2529
+ };
2530
+ OrgMakerTokenCreateResponse: components["schemas"]["OrgMakerTokenActiveCreateResponse"] | components["schemas"]["PendingOrgMakerTokenCreateResponse"];
2531
+ OrgMakerTokenDenyResponse: {
2532
+ /** @constant */
2533
+ status: "DENIED";
2534
+ approvalId: string;
2535
+ makerTokenId: string;
2536
+ };
2537
+ OrgMakerTokenPendingApproval: {
2538
+ id: string;
2539
+ /** @enum {string} */
2540
+ operation: "CREATE" | "UPDATE";
2541
+ makerTokenId: string;
2542
+ requestedBy: string;
2543
+ requestedPermissions: components["schemas"]["MakerDelegablePermission"][];
2544
+ excessPermissions: components["schemas"]["MakerDelegablePermission"][];
2545
+ /** Format: date-time */
2546
+ createdAt: string;
2547
+ makerToken: {
2548
+ name: string;
2549
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2550
+ };
2551
+ };
2552
+ OrgMakerTokenPendingApprovalListResponse: components["schemas"]["OrgMakerTokenPendingApproval"][];
2553
+ OrgMakerTokenUpdateResponse: components["schemas"]["OrgMakerTokenActiveUpdateResponse"] | components["schemas"]["PendingOrgMakerTokenUpdateResponse"];
2554
+ OrganizationBulletin: {
2555
+ items: components["schemas"]["OrganizationBulletinPost"][];
2556
+ nextCursor: string | null;
2557
+ };
2558
+ OrganizationBulletinPost: {
2559
+ id: string;
2560
+ kind: string;
2561
+ role: string;
2562
+ title: string;
2563
+ body: string;
2564
+ dataJson: {
2565
+ [key: string]: unknown;
2566
+ };
2567
+ severity: string;
2568
+ status: string;
2569
+ changeSetId: string | null;
2570
+ /** Format: date-time */
2571
+ createdAt: string;
2572
+ /** Format: date-time */
2573
+ updatedAt: string;
2574
+ businessId: string;
2575
+ businessName: string;
2576
+ };
2577
+ OrganizationCreateResponse: {
2578
+ organization: components["schemas"]["OrganizationSummary"];
2579
+ /** @constant */
2580
+ roleKey: "owner";
2581
+ };
2582
+ OrganizationInvitationAcceptResponse: {
2583
+ organization: components["schemas"]["OrganizationSummary"];
2584
+ roleKey: string;
2585
+ };
2586
+ OrganizationInvitationCreateResponse: {
2587
+ id: string;
2588
+ email: string;
2589
+ roleKey: string | null;
2590
+ role: components["schemas"]["OrganizationRole"] | null;
2591
+ /** @constant */
2592
+ status: "pending";
2593
+ /** Format: date-time */
2594
+ expiresAt: string;
2595
+ organizationId: string;
2596
+ };
2597
+ OrganizationList: components["schemas"]["OrganizationMembership"][];
2598
+ OrganizationMember: {
2599
+ userId: string;
2600
+ email: string | null;
2601
+ displayName: string;
2602
+ roleKey: string;
2603
+ role: components["schemas"]["OrganizationRole"];
2604
+ /** Format: date-time */
2605
+ createdAt: string;
2606
+ permissions: components["schemas"]["OrganizationMemberPermissions"];
2607
+ };
2608
+ OrganizationMemberPermissions: {
2609
+ isPrimaryOwner: boolean;
2610
+ allowedRoleKeys: string[];
2611
+ canChangeRole: boolean;
2612
+ canRemove: boolean;
2613
+ };
2614
+ OrganizationMemberUpdateResponse: {
2615
+ userId: string;
2616
+ roleKey: string;
2617
+ };
2618
+ OrganizationMembers: {
2619
+ primaryOwnerUserId: string;
2620
+ viewerRoleKey: string;
2621
+ members: components["schemas"]["OrganizationMember"][];
2622
+ pagination: {
2623
+ total: number;
2624
+ limit: number;
2625
+ offset: number;
2626
+ hasMore: boolean;
2627
+ };
2628
+ /** @constant */
2629
+ organizationType: "personal";
2630
+ /** @constant */
2631
+ ownershipMode: "fixed_single";
2632
+ permissions: {
2633
+ canInvite: boolean;
2634
+ allowedInvitationRoleKeys: string[];
2635
+ canManageRoles: boolean;
2636
+ /** @constant */
2637
+ canTransferPrimaryOwnership: false;
2638
+ };
2639
+ } | {
2640
+ primaryOwnerUserId: string;
2641
+ viewerRoleKey: string;
2642
+ members: components["schemas"]["OrganizationMember"][];
2643
+ pagination: {
2644
+ total: number;
2645
+ limit: number;
2646
+ offset: number;
2647
+ hasMore: boolean;
2648
+ };
2649
+ /** @enum {string} */
2650
+ organizationType: "team" | "company";
2651
+ /** @constant */
2652
+ ownershipMode: "transferable_multi";
2653
+ permissions: components["schemas"]["OrganizationViewerPermissions"];
2654
+ };
2655
+ OrganizationMembership: {
2656
+ organization: components["schemas"]["OrganizationSummary"];
2657
+ roleKey: string | null;
2658
+ /** @enum {string} */
2659
+ principalKind: "browser_user" | "cli_user" | "maker_token";
2660
+ };
2661
+ OrganizationOverview: {
2662
+ organization: {
2663
+ mrrCents: number | null;
2664
+ mrrDeltaPct: number | null;
2665
+ activeSubscribers: number | null;
2666
+ subscribersDelta7d: number | null;
2667
+ requests7d: number | null;
2668
+ requestsToday: number | null;
2669
+ requestsSeries7d: number[] | null;
2670
+ limitDenials24h: number | null;
2671
+ limitDenialsPct24h: number | null;
2672
+ planUsage: {
2673
+ used: number;
2674
+ cap: number | null;
2675
+ unit: string;
2676
+ periodLabel: string;
2677
+ } | null;
2678
+ stripeConnected: boolean;
2679
+ };
2680
+ businesses: components["schemas"]["OrganizationOverviewBusiness"][];
2681
+ recentActivity: components["schemas"]["OrganizationOverviewActivity"][];
2682
+ };
2683
+ OrganizationOverviewActivity: {
2684
+ id: string;
2685
+ /** @enum {string} */
2686
+ kind: "subscriber" | "webhook_failure" | "deploy" | "limit_denials" | "milestone" | "other";
2687
+ title: string;
2688
+ businessName: string | null;
2689
+ /** Format: date-time */
2690
+ at: string;
2691
+ };
2692
+ OrganizationOverviewBusiness: {
2693
+ businessId: string;
2694
+ name: string;
2695
+ /** @enum {string} */
2696
+ status: "ACTIVE" | "DRAFT";
2697
+ hostname: string | null;
2698
+ mrrCents: number | null;
2699
+ activeSubscribers: number | null;
2700
+ requests7d: number | null;
2701
+ requests7dDeltaPct: number | null;
2702
+ requestsSeries7d: number[] | null;
2703
+ webhookFailures24h: number | null;
2704
+ lastDeploy: {
2705
+ label: string;
2706
+ /** Format: date-time */
2707
+ at: string;
2708
+ } | null;
2709
+ setup: {
2710
+ created: boolean;
2711
+ live: boolean;
2712
+ } | null;
2713
+ };
2714
+ OrganizationOwnershipTransferResponse: {
2715
+ organizationId: string;
2716
+ previousPrimaryOwnerUserId: string;
2717
+ primaryOwnerUserId: string;
2718
+ };
2719
+ OrganizationReceivedInvitation: {
2720
+ id: string;
2721
+ email: string;
2722
+ roleKey: string | null;
2723
+ role: components["schemas"]["OrganizationRole"] | null;
2724
+ /** @constant */
2725
+ status: "pending";
2726
+ /** Format: date-time */
2727
+ expiresAt: string;
2728
+ organization: components["schemas"]["OrganizationSummary"];
2729
+ };
2730
+ OrganizationReceivedInvitationList: components["schemas"]["OrganizationReceivedInvitation"][];
2731
+ OrganizationRole: {
2732
+ id: string;
2733
+ organizationId: string;
2734
+ key: string;
2735
+ name: string;
2736
+ description: string | null;
2737
+ builtIn: boolean;
2738
+ permissions: components["schemas"]["PlatformPermission"][];
2739
+ memberCount: number;
2740
+ canEdit: boolean;
2741
+ canDelete: boolean;
2742
+ /** Format: date-time */
2743
+ createdAt: string;
2744
+ /** Format: date-time */
2745
+ updatedAt: string;
2746
+ };
2747
+ OrganizationRoleList: {
2748
+ roles: components["schemas"]["OrganizationRole"][];
2749
+ permissionCatalog: {
2750
+ key: components["schemas"]["PlatformPermission"];
2751
+ title: string;
2752
+ description: string;
2753
+ domain: string;
2754
+ /** @enum {string} */
2755
+ effect: "read" | "write";
2756
+ /** @enum {string} */
2757
+ delegation: "maker_token" | "user_session_only" | "browser_only";
2758
+ }[];
2759
+ grantablePermissionKeys: components["schemas"]["PlatformPermission"][];
2760
+ permissions: {
2761
+ canCreate: boolean;
2762
+ canEdit: boolean;
2763
+ canDelete: boolean;
2764
+ };
2765
+ };
2766
+ OrganizationSentInvitation: {
2767
+ id: string;
2768
+ email: string;
2769
+ roleKey: string | null;
2770
+ role: components["schemas"]["OrganizationRole"] | null;
2771
+ /** @constant */
2772
+ status: "pending";
2773
+ /** Format: date-time */
2774
+ expiresAt: string;
2775
+ /** Format: date-time */
2776
+ createdAt: string;
2777
+ };
2778
+ OrganizationSentInvitationList: components["schemas"]["OrganizationSentInvitation"][];
2779
+ OrganizationSummary: {
2780
+ id: string;
2781
+ /** @enum {string} */
2782
+ type: "personal" | "team" | "company";
2783
+ name: string;
2784
+ slug: string;
2785
+ publicPageUrl: string;
2786
+ };
2787
+ OrganizationViewerPermissions: {
2788
+ canInvite: boolean;
2789
+ allowedInvitationRoleKeys: string[];
2790
+ canManageRoles: boolean;
2791
+ canTransferPrimaryOwnership: boolean;
2792
+ };
2793
+ PendingOrgMakerTokenCreateResponse: {
2794
+ /** @constant */
2795
+ status: "PENDING";
2796
+ makerTokenId: string;
2797
+ approvalId: string;
2798
+ requestedPermissions: components["schemas"]["MakerDelegablePermission"][];
2799
+ grantedPermissions: components["schemas"]["MakerDelegablePermission"][];
2800
+ excessPermissions: components["schemas"]["MakerDelegablePermission"][];
2801
+ eligibleApproverIds: string[];
2802
+ };
2803
+ PendingOrgMakerTokenUpdateResponse: {
2804
+ /** @constant */
2805
+ status: "PENDING";
2806
+ makerTokenId: string;
2807
+ approvalId: string;
2808
+ requestedPermissions: components["schemas"]["MakerDelegablePermission"][];
2809
+ activePermissions: components["schemas"]["MakerDelegablePermission"][];
2810
+ excessPermissions: components["schemas"]["MakerDelegablePermission"][];
2811
+ eligibleApproverIds: string[];
2812
+ };
2813
+ PlanList: {
2814
+ data: components["schemas"]["BuilderPlan"][];
2815
+ pagination: {
2816
+ total: number;
2817
+ limit: number;
2818
+ offset: number;
2819
+ hasMore: boolean;
2820
+ };
2821
+ environmentId: string | null;
2822
+ /** @enum {string} */
2823
+ scope: "production" | "environment";
2824
+ unreadable?: components["schemas"]["BusinessUnreadablePlan"][];
2825
+ };
2826
+ /** @enum {string} */
2827
+ PlatformPermission: "agent:configure" | "agent:read" | "agreement:amend" | "agreement:create" | "agreement:read" | "analytics:read" | "apply_timeline:read" | "audit_log:export" | "audit_log:read" | "auth_context:issue" | "auth_context:read" | "auth_provider_connection:create" | "auth_provider_connection:delete" | "auth_provider_connection:read" | "auth_provider_connection:update" | "automation_rule:create" | "automation_rule:delete" | "automation_rule:read" | "automation_rule:update" | "backend:bind" | "backend:create" | "backend:delete" | "backend:read" | "brand:update" | "bulletin:ack" | "bulletin:read" | "bulletin:resolve" | "business:compile" | "business:cors_update" | "business:create" | "business:delete" | "business:docs_update" | "business:preview_env_update" | "business:publish" | "business:rbac_update" | "business:read" | "business:rollback" | "business_dependents:read" | "business_variable:create" | "business_variable:delete" | "business_variable:operation_read" | "business_variable:read" | "business_variable:revoke" | "business_variable:rotate" | "change_set:propose" | "change_set:read" | "consumer:block" | "consumer:migrate_latest" | "consumer:read" | "consumer:remove" | "consumer:roles_assign" | "denial:read" | "environment:create" | "environment:delete" | "environment:read" | "frontend:read" | "frontend:rollback" | "git_connection:create" | "git_connection:delete" | "git_connection:read" | "git_connection:update" | "knowledge:read" | "maker_token:create" | "maker_token:create_org" | "maker_token:read" | "maker_token:revoke" | "maker_token:rotate" | "notification:preferences_read" | "notification:preferences_update" | "organization:create" | "organization:delete" | "organization:manage_billing" | "organization:ownership_transfer" | "organization:read" | "organization_bulletin:read" | "organization_invitation:accept" | "organization_invitation:create" | "organization_invitation:list" | "organization_invitation:revoke" | "organization_member:list" | "organization_member:remove" | "organization_member:update" | "organization_role:create" | "organization_role:delete" | "organization_role:read" | "organization_role:update" | "persona:issue" | "persona:read" | "persona:revoke" | "persona:rotate" | "plan:read" | "product_subscription:create" | "promo_code:archive" | "promo_code:create" | "promo_code:reactivate" | "promo_code:read" | "promo_code:update" | "rbac:read" | "resource_count:report" | "runtime_token:mint" | "runtime_token:read" | "runtime_token:revoke" | "runtime_token:rotate" | "stripe_connection:create" | "stripe_connection:delete" | "stripe_connection:read" | "tax_settings:read" | "tax_settings:update" | "usage:read" | "webhook:create" | "webhook:delete" | "webhook:delivery_read" | "webhook:read" | "webhook:test" | "webhook:update" | "workflow:replay" | "workflow:rollback";
2828
+ PortalOffsetPagination: {
2829
+ limit: number;
2830
+ offset: number;
2831
+ hasMore: boolean;
2832
+ };
2833
+ PortalServiceAccountActiveCreateResponse: {
2834
+ /** @constant */
2835
+ status: "ACTIVE";
2836
+ serviceAccountId: string;
2837
+ apiKeyId: string;
2838
+ keyPrefix: string;
2839
+ plaintext: string;
2840
+ requestedPermissions: string[];
2841
+ grantedPermissions: string[];
2842
+ };
2843
+ PortalServiceAccountActiveUpdateResponse: {
2844
+ /** @constant */
2845
+ status: "ACTIVE";
2846
+ serviceAccountId: string;
2847
+ requestedPermissions: string[];
2848
+ grantedPermissions: string[];
2849
+ };
2850
+ PortalServiceAccountApprovalResponse: components["schemas"]["PortalServiceAccountApprovedCreateResponse"] | components["schemas"]["PortalServiceAccountApprovedUpdateResponse"];
2851
+ PortalServiceAccountApprovalSummary: {
2852
+ id: string;
2853
+ /** @enum {string} */
2854
+ operation: "CREATE" | "UPDATE";
2855
+ requestedBy: string;
2856
+ requestedPermissions: string[];
2857
+ excessPermissions: string[];
2858
+ /** Format: date-time */
2859
+ createdAt: string;
2860
+ };
2861
+ PortalServiceAccountApprovedCreateResponse: {
2862
+ /** @constant */
2863
+ status: "ACTIVE";
2864
+ /** @constant */
2865
+ operation: "CREATE";
2866
+ serviceAccountId: string;
2867
+ apiKeyId: string;
2868
+ plaintext: string;
2869
+ grantedPermissions: string[];
2870
+ };
2871
+ PortalServiceAccountApprovedUpdateResponse: {
2872
+ /** @constant */
2873
+ status: "ACTIVE";
2874
+ /** @constant */
2875
+ operation: "UPDATE";
2876
+ serviceAccountId: string;
2877
+ grantedPermissions: string[];
2878
+ };
2879
+ PortalServiceAccountCreateResponse: components["schemas"]["PortalServiceAccountActiveCreateResponse"] | components["schemas"]["PortalServiceAccountPendingCreateResponse"];
2880
+ PortalServiceAccountDenyResponse: {
2881
+ /** @constant */
2882
+ status: "DENIED";
2883
+ };
2884
+ PortalServiceAccountListItem: {
2885
+ id: string;
2886
+ name: string;
2887
+ /** @enum {string} */
2888
+ state: "PENDING" | "ACTIVE";
2889
+ requestedPermissions: string[];
2890
+ grantedPermissions: string[];
2891
+ createdBy: string | null;
2892
+ approvedBy: string | null;
2893
+ /** Format: date-time */
2894
+ createdAt: string;
2895
+ activatedAt: string | null;
2896
+ revokedAt: string | null;
2897
+ usageLimits: ({
2898
+ quantity: string;
2899
+ limitUnits: number;
2900
+ limitCents?: never;
2901
+ /** @constant */
2902
+ mode: "BLOCK";
2903
+ notifyAtPct?: never;
2904
+ } | {
2905
+ quantity: string;
2906
+ limitUnits: number;
2907
+ limitCents?: never;
2908
+ /** @constant */
2909
+ mode: "NOTIFY";
2910
+ notifyAtPct: number;
2911
+ } | {
2912
+ quantity: string;
2913
+ limitUnits?: never;
2914
+ limitCents: number;
2915
+ /** @constant */
2916
+ mode: "BLOCK";
2917
+ notifyAtPct?: never;
2918
+ } | {
2919
+ quantity: string;
2920
+ limitUnits?: never;
2921
+ limitCents: number;
2922
+ /** @constant */
2923
+ mode: "NOTIFY";
2924
+ notifyAtPct: number;
2925
+ })[];
2926
+ credentialApprovals: components["schemas"]["PortalServiceAccountApprovalSummary"][];
2927
+ };
2928
+ PortalServiceAccountListResponse: {
2929
+ data: components["schemas"]["PortalServiceAccountListItem"][];
2930
+ pagination: components["schemas"]["PortalOffsetPagination"];
2931
+ };
2932
+ PortalServiceAccountPendingApproval: {
2933
+ id: string;
2934
+ /** @enum {string} */
2935
+ operation: "CREATE" | "UPDATE";
2936
+ serviceAccountId: string;
2937
+ requestedBy: string;
2938
+ requestedPermissions: string[];
2939
+ excessPermissions: string[];
2940
+ /** Format: date-time */
2941
+ createdAt: string;
2942
+ serviceAccount: {
2943
+ name: string;
2944
+ grantedPermissions: string[];
2945
+ };
2946
+ };
2947
+ PortalServiceAccountPendingApprovalListResponse: {
2948
+ data: components["schemas"]["PortalServiceAccountPendingApproval"][];
2949
+ pagination: components["schemas"]["PortalOffsetPagination"];
2950
+ };
2951
+ PortalServiceAccountPendingCreateResponse: {
2952
+ /** @constant */
2953
+ status: "PENDING";
2954
+ serviceAccountId: string;
2955
+ approvalId: string;
2956
+ requestedPermissions: string[];
2957
+ grantedPermissions: [];
2958
+ excessPermissions: string[];
2959
+ eligibleApproverIds: string[];
2960
+ };
2961
+ PortalServiceAccountPendingUpdateResponse: {
2962
+ /** @constant */
2963
+ status: "PENDING";
2964
+ serviceAccountId: string;
2965
+ approvalId: string;
2966
+ activePermissions: string[];
2967
+ requestedPermissions: string[];
2968
+ excessPermissions: string[];
2969
+ eligibleApproverIds: string[];
2970
+ };
2971
+ PortalServiceAccountRotateResponse: {
2972
+ /** @constant */
2973
+ status: "ACTIVE";
2974
+ serviceAccountId: string;
2975
+ revokedKeyId: string;
2976
+ apiKeyId: string;
2977
+ plaintext: string;
2978
+ grantedPermissions: string[];
2979
+ };
2980
+ PortalServiceAccountUpdateResponse: components["schemas"]["PortalServiceAccountActiveUpdateResponse"] | components["schemas"]["PortalServiceAccountPendingUpdateResponse"];
2981
+ PortalUsageLimitDeleteResponse: {
2982
+ id: string;
2983
+ /** @constant */
2984
+ deleted: true;
2985
+ };
2986
+ PortalUsageLimitDto: {
2987
+ id: string;
2988
+ quantity: string;
2989
+ quantityDisplayKey: string;
2990
+ quantityLabel: string;
2991
+ /** @enum {string} */
2992
+ mode: "BLOCK" | "NOTIFY";
2993
+ /** @constant */
2994
+ period: "BILLING_PERIOD";
2995
+ notifyAtPct?: number;
2996
+ ceiling: {
2997
+ limitUnits?: number;
2998
+ limitCents?: number;
2999
+ };
3000
+ effectiveWindow?: {
3001
+ /** @enum {string} */
3002
+ strategy: "fixed_window" | "sliding_window";
3003
+ periodSeconds: number;
3004
+ };
3005
+ createdBy: string | null;
3006
+ /** Format: date-time */
3007
+ createdAt: string;
3008
+ /** Format: date-time */
3009
+ updatedAt: string;
3010
+ /** @constant */
3011
+ scope: "ORG";
3012
+ subjectId?: never;
3013
+ limitUnits: number;
3014
+ limitCents?: never;
3015
+ } | {
3016
+ id: string;
3017
+ quantity: string;
3018
+ quantityDisplayKey: string;
3019
+ quantityLabel: string;
3020
+ /** @enum {string} */
3021
+ mode: "BLOCK" | "NOTIFY";
3022
+ /** @constant */
3023
+ period: "BILLING_PERIOD";
3024
+ notifyAtPct?: number;
3025
+ ceiling: {
3026
+ limitUnits?: number;
3027
+ limitCents?: number;
3028
+ };
3029
+ effectiveWindow?: {
3030
+ /** @enum {string} */
3031
+ strategy: "fixed_window" | "sliding_window";
3032
+ periodSeconds: number;
3033
+ };
3034
+ createdBy: string | null;
3035
+ /** Format: date-time */
3036
+ createdAt: string;
3037
+ /** Format: date-time */
3038
+ updatedAt: string;
3039
+ /** @constant */
3040
+ scope: "ORG";
3041
+ subjectId?: never;
3042
+ limitUnits?: never;
3043
+ limitCents: number;
3044
+ } | {
3045
+ id: string;
3046
+ quantity: string;
3047
+ quantityDisplayKey: string;
3048
+ quantityLabel: string;
3049
+ /** @enum {string} */
3050
+ mode: "BLOCK" | "NOTIFY";
3051
+ /** @constant */
3052
+ period: "BILLING_PERIOD";
3053
+ notifyAtPct?: number;
3054
+ ceiling: {
3055
+ limitUnits?: number;
3056
+ limitCents?: number;
3057
+ };
3058
+ effectiveWindow?: {
3059
+ /** @enum {string} */
3060
+ strategy: "fixed_window" | "sliding_window";
3061
+ periodSeconds: number;
3062
+ };
3063
+ createdBy: string | null;
3064
+ /** Format: date-time */
3065
+ createdAt: string;
3066
+ /** Format: date-time */
3067
+ updatedAt: string;
3068
+ /** @constant */
3069
+ scope: "MEMBER";
3070
+ subjectId: string;
3071
+ limitUnits: number;
3072
+ limitCents?: never;
3073
+ } | {
3074
+ id: string;
3075
+ quantity: string;
3076
+ quantityDisplayKey: string;
3077
+ quantityLabel: string;
3078
+ /** @enum {string} */
3079
+ mode: "BLOCK" | "NOTIFY";
3080
+ /** @constant */
3081
+ period: "BILLING_PERIOD";
3082
+ notifyAtPct?: number;
3083
+ ceiling: {
3084
+ limitUnits?: number;
3085
+ limitCents?: number;
3086
+ };
3087
+ effectiveWindow?: {
3088
+ /** @enum {string} */
3089
+ strategy: "fixed_window" | "sliding_window";
3090
+ periodSeconds: number;
3091
+ };
3092
+ createdBy: string | null;
3093
+ /** Format: date-time */
3094
+ createdAt: string;
3095
+ /** Format: date-time */
3096
+ updatedAt: string;
3097
+ /** @constant */
3098
+ scope: "MEMBER";
3099
+ subjectId: string;
3100
+ limitUnits?: never;
3101
+ limitCents: number;
3102
+ } | {
3103
+ id: string;
3104
+ quantity: string;
3105
+ quantityDisplayKey: string;
3106
+ quantityLabel: string;
3107
+ /** @enum {string} */
3108
+ mode: "BLOCK" | "NOTIFY";
3109
+ /** @constant */
3110
+ period: "BILLING_PERIOD";
3111
+ notifyAtPct?: number;
3112
+ ceiling: {
3113
+ limitUnits?: number;
3114
+ limitCents?: number;
3115
+ };
3116
+ effectiveWindow?: {
3117
+ /** @enum {string} */
3118
+ strategy: "fixed_window" | "sliding_window";
3119
+ periodSeconds: number;
3120
+ };
3121
+ createdBy: string | null;
3122
+ /** Format: date-time */
3123
+ createdAt: string;
3124
+ /** Format: date-time */
3125
+ updatedAt: string;
3126
+ /** @constant */
3127
+ scope: "SERVICE_ACCOUNT";
3128
+ subjectId: string;
3129
+ limitUnits: number;
3130
+ limitCents?: never;
3131
+ } | {
3132
+ id: string;
3133
+ quantity: string;
3134
+ quantityDisplayKey: string;
3135
+ quantityLabel: string;
3136
+ /** @enum {string} */
3137
+ mode: "BLOCK" | "NOTIFY";
3138
+ /** @constant */
3139
+ period: "BILLING_PERIOD";
3140
+ notifyAtPct?: number;
3141
+ ceiling: {
3142
+ limitUnits?: number;
3143
+ limitCents?: number;
3144
+ };
3145
+ effectiveWindow?: {
3146
+ /** @enum {string} */
3147
+ strategy: "fixed_window" | "sliding_window";
3148
+ periodSeconds: number;
3149
+ };
3150
+ createdBy: string | null;
3151
+ /** Format: date-time */
3152
+ createdAt: string;
3153
+ /** Format: date-time */
3154
+ updatedAt: string;
3155
+ /** @constant */
3156
+ scope: "SERVICE_ACCOUNT";
3157
+ subjectId: string;
3158
+ limitUnits?: never;
3159
+ limitCents: number;
3160
+ };
3161
+ PortalUsageLimitListResponse: {
3162
+ data: components["schemas"]["PortalUsageLimitDto"][];
3163
+ pagination: components["schemas"]["PortalOffsetPagination"];
3164
+ };
3165
+ PromoCode: {
3166
+ id: string;
3167
+ code: string;
3168
+ kind: ("percent_off" | "amount_off" | "free_months") | null;
3169
+ amount: number | null;
3170
+ durationMonths: number | null;
3171
+ applicablePlanIds: string[];
3172
+ maxRedemptions: number | null;
3173
+ redemptionCount: number;
3174
+ activeUntil: string | null;
3175
+ /** @enum {string} */
3176
+ status: "ACTIVE" | "ARCHIVED";
3177
+ createdAt: string;
3178
+ };
3179
+ PromoCodeList: components["schemas"]["PromoCode"][];
3180
+ PublishBusinessPreview: {
3181
+ /** @constant */
3182
+ dryRun: true;
3183
+ wouldHave: components["schemas"]["PublishBusinessResponse"];
3184
+ };
3185
+ PublishBusinessResponse: {
3186
+ id: string;
3187
+ organizationId: string | null;
3188
+ name: string;
3189
+ displayName: string | null;
3190
+ description: string | null;
3191
+ /** @enum {string} */
3192
+ status: "DRAFT" | "ACTIVE";
3193
+ /** @enum {string} */
3194
+ visibility: "PUBLIC" | "PRIVATE";
3195
+ runtimeHostname: string | null;
3196
+ portalHostname: string | null;
3197
+ iconUrl: string | null;
3198
+ logoUrl: string | null;
3199
+ keyPrefix: string | null;
3200
+ allowedOrigins: string[];
3201
+ docsEnabled: boolean;
3202
+ listedOnOrganizationPage: boolean;
3203
+ rbacEnabled: boolean;
3204
+ meters: components["schemas"]["BusinessMeter"][];
3205
+ plans: components["schemas"]["BusinessPlan"][];
3206
+ unreadablePlans?: components["schemas"]["BusinessUnreadablePlan"][];
3207
+ rateLimitConfig: components["schemas"]["BusinessRateLimit"] | null;
3208
+ publishedRevisionId: string | null;
3209
+ latestRevisionId: string | null;
3210
+ latestRevisionNumber: number | null;
3211
+ latestReleaseVersion: string | null;
3212
+ gitRepoFullName: string | null;
3213
+ envBranchPrefix: string | null;
3214
+ /** @enum {string} */
3215
+ previewEnvTrigger: "BRANCH_PREFIX" | "PULL_REQUEST" | "DISABLED";
3216
+ /** Format: date-time */
3217
+ createdAt: string;
3218
+ /** Format: date-time */
3219
+ updatedAt: string;
3220
+ _release: components["schemas"]["PublishRelease"];
3221
+ };
3222
+ PublishRelease: {
3223
+ compilationRecordId: string | null;
3224
+ previousVersion: string | null;
3225
+ /** @enum {string} */
3226
+ computedBump: "major" | "minor" | "patch";
3227
+ version: string;
3228
+ tagCreated: boolean;
3229
+ changeSummary: string;
3230
+ reasons: string[];
3231
+ /** @enum {string} */
3232
+ status: "PENDING" | "PREVIEW";
3233
+ };
3234
+ ReplayInvoiceResult: {
3235
+ /** @constant */
3236
+ status: "computed";
3237
+ invoiceId: string;
3238
+ dryRun: boolean;
3239
+ proposedInvoice: {
3240
+ id: string;
3241
+ periodStart: string;
3242
+ periodEnd: string;
3243
+ subtotalMicros: string;
3244
+ totalMicros: string;
3245
+ currency: string;
3246
+ lineItems: {
3247
+ id: string | null;
3248
+ description: string | null;
3249
+ amountMicros: string;
3250
+ }[];
3251
+ };
3252
+ delta: string;
3253
+ deltaCents: number;
3254
+ };
3255
+ ReplayResult: components["schemas"]["ReplayScopePreview"] | components["schemas"]["ReplayInvoiceResult"];
3256
+ ReplayScopePreview: {
3257
+ /** @constant */
3258
+ status: "preview_only";
3259
+ businessId: string;
3260
+ /** Format: date-time */
3261
+ periodStart: string;
3262
+ /** Format: date-time */
3263
+ periodEnd: string;
3264
+ /** @constant */
3265
+ dryRun: true;
3266
+ scope: {
3267
+ subscriptions: number;
3268
+ usageEvents: number;
3269
+ };
3270
+ message: string;
3271
+ };
3272
+ ResourceCount: {
3273
+ resource: string;
3274
+ subscriptionId: string;
3275
+ environmentId: string | null;
3276
+ subjectType: string | null;
3277
+ subjectId: string | null;
3278
+ count: number;
3279
+ /** Format: date-time */
3280
+ updatedAt: string;
3281
+ };
3282
+ ResourceCountReport: {
3283
+ resourceCount: components["schemas"]["ResourceCount"];
3284
+ };
3285
+ RuntimeToken: {
3286
+ id: string;
3287
+ businessId: string;
3288
+ environmentId: string | null;
3289
+ backendId: string | null;
3290
+ /** @enum {string} */
3291
+ kind: "live" | "test";
3292
+ lastFour: string;
3293
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
3294
+ allowedMeters: string[];
3295
+ allowedRoutes: string[];
3296
+ /** @enum {string} */
3297
+ status: "active" | "revoked";
3298
+ rotatedFromId: string | null;
3299
+ /** Format: date-time */
3300
+ createdAt: string;
3301
+ revokedAt: string | null;
3302
+ lastUsedAt: string | null;
3303
+ };
3304
+ RuntimeTokenIssuance: {
3305
+ id: string;
3306
+ businessId: string;
3307
+ environmentId: string | null;
3308
+ backendId: string | null;
3309
+ /** @enum {string} */
3310
+ kind: "live" | "test";
3311
+ lastFour: string;
3312
+ operations: ("gateway_verification" | "metering" | "health" | "tunnel" | "drift_report")[];
3313
+ allowedMeters: string[];
3314
+ allowedRoutes: string[];
3315
+ /** @enum {string} */
3316
+ status: "active" | "revoked";
3317
+ rotatedFromId: string | null;
3318
+ /** Format: date-time */
3319
+ createdAt: string;
3320
+ revokedAt: string | null;
3321
+ lastUsedAt: string | null;
3322
+ /** @constant */
3323
+ envVar: "FS_RUNTIME_TOKEN";
3324
+ token: string;
3325
+ };
3326
+ RuntimeTokenList: {
3327
+ data: components["schemas"]["RuntimeToken"][];
3328
+ pagination: {
3329
+ total: number;
3330
+ limit: number;
3331
+ offset: number;
3332
+ hasMore: boolean;
3333
+ };
3334
+ /** @enum {string} */
3335
+ scope: "all" | "production" | "environment";
3336
+ environmentId: string | null;
3337
+ };
3338
+ SecretMutationImpact: {
3339
+ integrations: string[];
3340
+ subscriberCount: number;
3341
+ };
3342
+ SecretMutationOperation: {
3343
+ operationId: string;
3344
+ /** @enum {string} */
3345
+ kind: "CREATE" | "ROTATE" | "REVOKE" | "DELETE";
3346
+ /** @enum {string} */
3347
+ status: "PENDING" | "PROCESSING" | "WAITING_RETRY" | "SUCCEEDED" | "ABORTED";
3348
+ version: number;
3349
+ pending: boolean;
3350
+ attemptCount: number;
3351
+ nextAttemptAt: string;
3352
+ lastAttemptAt: string | null;
3353
+ lastError: {
3354
+ /** @enum {string} */
3355
+ code: "SECRET_PUBLICATION_FAILED";
3356
+ message: string;
3357
+ } | null;
3358
+ completedAt: string | null;
3359
+ impact: components["schemas"]["SecretMutationImpact"];
3360
+ };
3361
+ SecretMutationResponse: {
3362
+ operation: components["schemas"]["SecretMutationOperation"];
3363
+ };
3364
+ SecretReferencedByActiveCohortsDetails: {
3365
+ /** @constant */
3366
+ reason: "SECRET_REFERENCED_BY_ACTIVE_COHORTS";
3367
+ secretName: string;
3368
+ integrations: string[];
3369
+ subscriberCount: number;
3370
+ acknowledgeImpact: {
3371
+ subscriberCount: number;
3372
+ };
3373
+ };
3374
+ ServingState: {
3375
+ /** @enum {string} */
3376
+ status: "unconfigured" | "publishing" | "missing" | "invalid" | "coherent";
3377
+ coherent: boolean;
3378
+ message: string | null;
3379
+ };
3380
+ StripeConnectionStatus: {
3381
+ connected: boolean;
3382
+ /** @enum {string} */
3383
+ source: "business" | "organization";
3384
+ isOverride: boolean;
3385
+ chargesEnabled: boolean;
3386
+ cardPaymentsEnabled: boolean;
3387
+ };
3388
+ StripeDisconnectResponse: {
3389
+ /** @constant */
3390
+ disconnected: true;
3391
+ };
3392
+ SubjectPins: {
3393
+ subjectId: string;
3394
+ environmentId: string | null;
3395
+ recurringPricePin: {
3396
+ planKey: string;
3397
+ version: number;
3398
+ recurringFeeCents: number;
3399
+ billingInterval: string;
3400
+ } | null;
3401
+ usagePricingBinding: {
3402
+ /** @constant */
3403
+ source: "agreement";
3404
+ agreementId: string;
3405
+ binding: components["schemas"]["AgreementUsagePricingBinding"];
3406
+ } | {
3407
+ /** @constant */
3408
+ source: "plan_default";
3409
+ /** @constant */
3410
+ mode: "current";
3411
+ };
3412
+ migrateToLatest: {
3413
+ /** @constant */
3414
+ status: "deferred";
3415
+ };
3416
+ };
3417
+ TaxAddress: {
3418
+ line1: string | null;
3419
+ line2: string | null;
3420
+ city: string | null;
3421
+ state: string | null;
3422
+ postal_code: string | null;
3423
+ country: string | null;
3424
+ };
3425
+ TaxSettings: {
3426
+ /** @enum {string} */
3427
+ status: "active" | "pending";
3428
+ defaults: {
3429
+ taxBehavior: ("exclusive" | "inclusive" | "inferred_by_currency") | null;
3430
+ taxCode: string | null;
3431
+ };
3432
+ headOffice: {
3433
+ address: components["schemas"]["TaxAddress"];
3434
+ } | null;
3435
+ missingFields: string[];
3436
+ };
3437
+ TestPersona: {
3438
+ id: string;
3439
+ displayName: string | null;
3440
+ subscriptionId: string | null;
3441
+ subscriberId: string | null;
3442
+ organizationId: string | null;
3443
+ accountRole: ("owner" | "admin" | "member") | null;
3444
+ roleKeys: string[];
3445
+ defaultRoleKey: string | null;
3446
+ availableRoleKeys: string[];
3447
+ keyLastFour: string | null;
3448
+ createdAt: string;
3449
+ rotatedAt: string | null;
3450
+ revokedAt: string | null;
3451
+ revokedReason: ("revoked" | "rotated" | "retracted" | "deleted" | "env_reset") | null;
3452
+ };
3453
+ TestPersonaBootstrapResponse: {
3454
+ data: {
3455
+ personaId: string;
3456
+ environmentId: string;
3457
+ subscriptionId: string;
3458
+ subscriberId: string;
3459
+ organizationId: string;
3460
+ /** @enum {string} */
3461
+ accountRole: "owner" | "admin" | "member";
3462
+ roleKeys: string[];
3463
+ defaultRoleKey: string | null;
3464
+ availableRoleKeys: string[];
3465
+ apiKey: string;
3466
+ keyLastFour: string;
3467
+ sessionToken: string | null;
3468
+ expiresAt: string | null;
3469
+ planKey: string | null;
3470
+ scopes: string[];
3471
+ };
3472
+ };
3473
+ TestPersonaDeleteResponse: {
3474
+ data: {
3475
+ id: string;
3476
+ /** @constant */
3477
+ deleted: true;
3478
+ alreadyDeleted: boolean;
3479
+ };
3480
+ };
3481
+ TestPersonaList: {
3482
+ data: components["schemas"]["TestPersona"][];
3483
+ };
3484
+ TestPersonaLoginResponse: {
3485
+ data: {
3486
+ personaId: string;
3487
+ environmentId: string;
3488
+ portalUrl: string;
3489
+ handoffToken: string;
3490
+ expiresAt: string;
3491
+ };
3492
+ };
3493
+ TestPersonaRotateResponse: {
3494
+ data: {
3495
+ id: string;
3496
+ apiKey: string;
3497
+ keyLastFour: string;
3498
+ rotatedAt: string;
3499
+ };
3500
+ };
3501
+ UsageLimitPlan: {
3502
+ key: string;
3503
+ version: number;
3504
+ };
3505
+ UsageMemberBucket: {
3506
+ actorId: string | null;
3507
+ actorType: string | null;
3508
+ label: string | null;
3509
+ summary: {
3510
+ [key: string]: number;
3511
+ };
3512
+ events: number;
3513
+ };
3514
+ UsageMeterLabel: {
3515
+ displayKey: string;
3516
+ label: string;
3517
+ };
3518
+ UsageSummary: {
3519
+ environmentId: string | null;
3520
+ /** @enum {string} */
3521
+ scope: "all" | "environment";
3522
+ totalRequests: number;
3523
+ requestsLast30Days: number;
3524
+ activeApiKeys: number;
3525
+ /** Format: date-time */
3526
+ periodStart: string;
3527
+ /** Format: date-time */
3528
+ periodEnd: string;
3529
+ byMember: components["schemas"]["UsageMemberBucket"][];
3530
+ byMemberTruncated: boolean;
3531
+ meterLabels: {
3532
+ [key: string]: components["schemas"]["UsageMeterLabel"];
3533
+ };
3534
+ unratable: components["schemas"]["UsageUnratable"];
3535
+ };
3536
+ UsageUnratable: {
3537
+ eventCount: number;
3538
+ topReasonCode: string | null;
3539
+ oldestQuarantinedAt: string | null;
3540
+ byReasonCode: {
3541
+ reasonCode: string;
3542
+ count: number;
3543
+ }[];
3544
+ };
3545
+ WebhookDelivery: {
3546
+ id: string;
3547
+ eventType: string;
3548
+ /**
3549
+ * @description pending: queued or being sent. success: the endpoint answered 2xx. failed: the last attempt failed; another is scheduled at nextAttemptAt, and when nextAttemptAt is null (a test send) nothing further is attempted. dead: every attempt failed; it will not be retried.
3550
+ * @enum {string}
3551
+ */
3552
+ status: "pending" | "success" | "failed" | "dead";
3553
+ attempts: number;
3554
+ lastAttemptAt: string | null;
3555
+ /** @description When the next attempt is scheduled. Null when no further attempt will be made (a success, a dead delivery, or a failed test send). */
3556
+ nextAttemptAt: string | null;
3557
+ responseStatus: number | null;
3558
+ environmentId: string | null;
3559
+ /** Format: date-time */
3560
+ createdAt: string;
3561
+ };
3562
+ WebhookDeliveryList: {
3563
+ data: components["schemas"]["WebhookDelivery"][];
3564
+ pagination: {
3565
+ total: number;
3566
+ limit: number;
3567
+ offset: number;
3568
+ hasMore: boolean;
3569
+ };
3570
+ };
3571
+ WebhookDeliveryResponse: {
3572
+ data: components["schemas"]["WebhookDelivery"];
3573
+ };
3574
+ WebhookEndpoint: {
3575
+ id: string;
3576
+ url: string;
3577
+ environmentId: string | null;
3578
+ events: string[];
3579
+ enabled: boolean;
3580
+ failCount: number;
3581
+ disabledAt: string | null;
3582
+ /** Format: date-time */
3583
+ createdAt: string;
3584
+ /** Format: date-time */
3585
+ updatedAt: string;
3586
+ };
3587
+ WebhookEndpointCreateResponse: {
3588
+ data: components["schemas"]["WebhookEndpointIssuance"];
3589
+ };
3590
+ WebhookEndpointDeleteResponse: {
3591
+ data: {
3592
+ /** @constant */
3593
+ deleted: true;
3594
+ };
3595
+ };
3596
+ WebhookEndpointIssuance: {
3597
+ id: string;
3598
+ url: string;
3599
+ environmentId: string | null;
3600
+ events: string[];
3601
+ enabled: boolean;
3602
+ failCount: number;
3603
+ disabledAt: string | null;
3604
+ /** Format: date-time */
3605
+ createdAt: string;
3606
+ /** Format: date-time */
3607
+ updatedAt: string;
3608
+ secret: string;
3609
+ };
3610
+ WebhookEndpointList: {
3611
+ data: components["schemas"]["WebhookEndpoint"][];
3612
+ pagination: {
3613
+ total: number;
3614
+ limit: number;
3615
+ offset: number;
3616
+ hasMore: boolean;
3617
+ };
3618
+ };
3619
+ WebhookEndpointRotateSecretResponse: {
3620
+ data: components["schemas"]["WebhookEndpointRotation"];
3621
+ };
3622
+ WebhookEndpointRotation: {
3623
+ id: string;
3624
+ url: string;
3625
+ environmentId: string | null;
3626
+ events: string[];
3627
+ enabled: boolean;
3628
+ failCount: number;
3629
+ disabledAt: string | null;
3630
+ /** Format: date-time */
3631
+ createdAt: string;
3632
+ /** Format: date-time */
3633
+ updatedAt: string;
3634
+ secret: string;
3635
+ /** Format: date-time */
3636
+ previousSecretExpiresAt: string;
3637
+ };
3638
+ WebhookEndpointUpdateResponse: {
3639
+ data: components["schemas"]["WebhookEndpoint"];
3640
+ };
3641
+ WebhookEventTypeList: {
3642
+ data: {
3643
+ events: {
3644
+ /** @enum {string} */
3645
+ name: "subscription.created" | "subscription.updated" | "subscription.canceled" | "payment.succeeded" | "payment.failed" | "entitlement.changed" | "usage.threshold_reached";
3646
+ description: string;
3647
+ }[];
3648
+ };
3649
+ };
3650
+ WebhookTestResponse: {
3651
+ data: components["schemas"]["WebhookTestResult"];
3652
+ };
3653
+ WebhookTestResult: {
3654
+ success: boolean;
3655
+ status: number | null;
3656
+ durationMs: number;
3657
+ /** @description The test delivery's id in the deliveries log; null when the attempt could not be recorded. */
3658
+ deliveryId: string | null;
3659
+ responseBody: string | null;
3660
+ error: string | null;
3661
+ };
3662
+ };
3663
+ responses: never;
3664
+ parameters: never;
3665
+ requestBodies: never;
3666
+ headers: never;
3667
+ pathItems: never;
3668
+ }
3669
+ export type $defs = Record<string, never>;
3670
+ export type operations = Record<string, never>;