@productcraft/platform-auth 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -13,6 +13,7 @@ interface paths {
13
13
  path?: never;
14
14
  cookie?: never;
15
15
  };
16
+ /** Public JWKS for verifying platform-issued JWTs (issuer `https://api.auth.productcraft.co`). */
16
17
  get: operations["JwksController_jwks"];
17
18
  put?: never;
18
19
  post?: never;
@@ -32,6 +33,7 @@ interface paths {
32
33
  get?: never;
33
34
  put?: never;
34
35
  post?: never;
36
+ /** Delete the calling account. Auto-promotes the oldest admin (or oldest non-self member) to owner in any workspace where the departing account is the sole owner. */
35
37
  delete: operations["AccountController_deleteAccount"];
36
38
  options?: never;
37
39
  head?: never;
@@ -81,6 +83,7 @@ interface paths {
81
83
  };
82
84
  get?: never;
83
85
  put?: never;
86
+ /** Request a password reset email. The response shape never reveals whether the email matched an account. */
84
87
  post: operations["PasswordController_requestPasswordReset"];
85
88
  delete?: never;
86
89
  options?: never;
@@ -97,6 +100,7 @@ interface paths {
97
100
  };
98
101
  get?: never;
99
102
  put?: never;
103
+ /** Reset password using the email-delivered reset token. */
100
104
  post: operations["PasswordController_resetPassword"];
101
105
  delete?: never;
102
106
  options?: never;
@@ -189,7 +193,7 @@ interface paths {
189
193
  patch?: never;
190
194
  trace?: never;
191
195
  };
192
- "/v1/introspect/workspaces/{workspaceId}": {
196
+ "/v1/introspect/workspaces/{workspace_id}": {
193
197
  parameters: {
194
198
  query?: never;
195
199
  header?: never;
@@ -292,7 +296,7 @@ interface paths {
292
296
  patch?: never;
293
297
  trace?: never;
294
298
  };
295
- "/v1/workspaces/{workspaceSlug}": {
299
+ "/v1/workspaces/{workspace_slug}": {
296
300
  parameters: {
297
301
  query?: never;
298
302
  header?: never;
@@ -311,7 +315,7 @@ interface paths {
311
315
  patch: operations["WorkspaceController_updateWorkspace"];
312
316
  trace?: never;
313
317
  };
314
- "/v1/workspaces/{workspaceSlug}/api-keys": {
318
+ "/v1/workspaces/{workspace_slug}/api-keys": {
315
319
  parameters: {
316
320
  query?: never;
317
321
  header?: never;
@@ -329,23 +333,63 @@ interface paths {
329
333
  patch?: never;
330
334
  trace?: never;
331
335
  };
332
- "/v1/workspaces/{workspaceSlug}/api-keys/{id}": {
336
+ "/v1/workspaces/{workspace_slug}/api-keys/{id}": {
333
337
  parameters: {
334
338
  query?: never;
335
339
  header?: never;
336
340
  path?: never;
337
341
  cookie?: never;
338
342
  };
343
+ /** Get a single PAK by id. */
339
344
  get: operations["PlatformApiKeyController_get"];
340
345
  put?: never;
341
346
  post?: never;
347
+ /** Revoke a PAK. Default behaviour: introspect returns null on the next upstream call; downstream services fail-closed within the 60s cache TTL window. Pass `?force=true` to additionally publish a Redis fan-out that evicts the matching cache entry across every PAK-consuming service immediately — use it when rotating a leaked PAK and the 60s window matters. */
342
348
  delete: operations["PlatformApiKeyController_revoke"];
343
349
  options?: never;
344
350
  head?: never;
351
+ /** Update a PAK’s name or description (does not touch bindings). */
345
352
  patch: operations["PlatformApiKeyController_update"];
346
353
  trace?: never;
347
354
  };
348
- "/v1/workspaces/{workspaceSlug}/audit-logs": {
355
+ "/v1/workspaces/{workspace_slug}/api-keys/{id}/bindings": {
356
+ parameters: {
357
+ query?: never;
358
+ header?: never;
359
+ path?: never;
360
+ cookie?: never;
361
+ };
362
+ get?: never;
363
+ put?: never;
364
+ post?: never;
365
+ delete?: never;
366
+ options?: never;
367
+ head?: never;
368
+ /** Replace the managed-policy bindings on a PAK. Re-runs caller-narrowing on the merged union of statements. */
369
+ patch: operations["PlatformApiKeyController_setBindings"];
370
+ trace?: never;
371
+ };
372
+ "/v1/workspaces/{workspace_slug}/audit-feed": {
373
+ parameters: {
374
+ query?: never;
375
+ header?: never;
376
+ path?: never;
377
+ cookie?: never;
378
+ };
379
+ /**
380
+ * Unified workspace audit feed (cursor-paginated)
381
+ * @description Merged audit timeline across the workspace surfaces. v1 covers `workspace_audit` (this service); per-app Heimdall and per-community Agora rows arrive in a follow-up. Response shape is stable from v1 — clients can build against it today.
382
+ */
383
+ get: operations["WorkspaceAuditFeedController_listFeed"];
384
+ put?: never;
385
+ post?: never;
386
+ delete?: never;
387
+ options?: never;
388
+ head?: never;
389
+ patch?: never;
390
+ trace?: never;
391
+ };
392
+ "/v1/workspaces/{workspace_slug}/audit-logs": {
349
393
  parameters: {
350
394
  query?: never;
351
395
  header?: never;
@@ -362,7 +406,7 @@ interface paths {
362
406
  patch?: never;
363
407
  trace?: never;
364
408
  };
365
- "/v1/workspaces/{workspaceSlug}/invites": {
409
+ "/v1/workspaces/{workspace_slug}/invites": {
366
410
  parameters: {
367
411
  query?: never;
368
412
  header?: never;
@@ -380,7 +424,7 @@ interface paths {
380
424
  patch?: never;
381
425
  trace?: never;
382
426
  };
383
- "/v1/workspaces/{workspaceSlug}/invites/{inviteId}": {
427
+ "/v1/workspaces/{workspace_slug}/invites/{invite_id}": {
384
428
  parameters: {
385
429
  query?: never;
386
430
  header?: never;
@@ -397,7 +441,7 @@ interface paths {
397
441
  patch?: never;
398
442
  trace?: never;
399
443
  };
400
- "/v1/workspaces/{workspaceSlug}/members": {
444
+ "/v1/workspaces/{workspace_slug}/members": {
401
445
  parameters: {
402
446
  query?: never;
403
447
  header?: never;
@@ -414,7 +458,7 @@ interface paths {
414
458
  patch?: never;
415
459
  trace?: never;
416
460
  };
417
- "/v1/workspaces/{workspaceSlug}/members/{accountId}": {
461
+ "/v1/workspaces/{workspace_slug}/members/{account_id}": {
418
462
  parameters: {
419
463
  query?: never;
420
464
  header?: never;
@@ -431,7 +475,7 @@ interface paths {
431
475
  patch?: never;
432
476
  trace?: never;
433
477
  };
434
- "/v1/workspaces/{workspaceSlug}/members/{accountId}/role": {
478
+ "/v1/workspaces/{workspace_slug}/members/{account_id}/role": {
435
479
  parameters: {
436
480
  query?: never;
437
481
  header?: never;
@@ -448,33 +492,33 @@ interface paths {
448
492
  patch: operations["WorkspaceController_updateMemberRole"];
449
493
  trace?: never;
450
494
  };
451
- "/v1/workspaces/{workspaceSlug}/roles": {
495
+ "/v1/workspaces/{workspace_slug}/policies": {
452
496
  parameters: {
453
497
  query?: never;
454
498
  header?: never;
455
499
  path?: never;
456
500
  cookie?: never;
457
501
  };
458
- /** List all roles in a workspace */
459
- get: operations["WorkspaceRoleController_list"];
502
+ /** List every managed policy in a workspace */
503
+ get: operations["WorkspacePolicyController_list"];
460
504
  put?: never;
461
- /** Create a new custom role */
462
- post: operations["WorkspaceRoleController_create"];
505
+ /** Create a managed policy */
506
+ post: operations["WorkspacePolicyController_create"];
463
507
  delete?: never;
464
508
  options?: never;
465
509
  head?: never;
466
510
  patch?: never;
467
511
  trace?: never;
468
512
  };
469
- "/v1/workspaces/{workspaceSlug}/roles/permissions/catalog": {
513
+ "/v1/workspaces/{workspace_slug}/policies/actions/catalog": {
470
514
  parameters: {
471
515
  query?: never;
472
516
  header?: never;
473
517
  path?: never;
474
518
  cookie?: never;
475
519
  };
476
- /** List every known workspace permission */
477
- get: operations["WorkspaceRoleController_catalog"];
520
+ /** List every known workspace action (catalog of statement actions). */
521
+ get: operations["WorkspacePolicyController_catalog"];
478
522
  put?: never;
479
523
  post?: never;
480
524
  delete?: never;
@@ -483,7 +527,44 @@ interface paths {
483
527
  patch?: never;
484
528
  trace?: never;
485
529
  };
486
- "/v1/workspaces/{workspaceSlug}/roles/{roleId}": {
530
+ "/v1/workspaces/{workspace_slug}/policies/{policy_id}": {
531
+ parameters: {
532
+ query?: never;
533
+ header?: never;
534
+ path?: never;
535
+ cookie?: never;
536
+ };
537
+ /** Get a managed policy by id */
538
+ get: operations["WorkspacePolicyController_get"];
539
+ put?: never;
540
+ post?: never;
541
+ /** Delete a managed policy. Cascades: API keys lose the binding (deny-all if no other bindings remain); roles fall back to their inline policy column. */
542
+ delete: operations["WorkspacePolicyController_delete"];
543
+ options?: never;
544
+ head?: never;
545
+ /** Update a managed policy */
546
+ patch: operations["WorkspacePolicyController_update"];
547
+ trace?: never;
548
+ };
549
+ "/v1/workspaces/{workspace_slug}/roles": {
550
+ parameters: {
551
+ query?: never;
552
+ header?: never;
553
+ path?: never;
554
+ cookie?: never;
555
+ };
556
+ /** List all roles in a workspace */
557
+ get: operations["WorkspaceRoleController_list"];
558
+ put?: never;
559
+ /** Create a new custom role */
560
+ post: operations["WorkspaceRoleController_create"];
561
+ delete?: never;
562
+ options?: never;
563
+ head?: never;
564
+ patch?: never;
565
+ trace?: never;
566
+ };
567
+ "/v1/workspaces/{workspace_slug}/roles/{role_id}": {
487
568
  parameters: {
488
569
  query?: never;
489
570
  header?: never;
@@ -502,7 +583,7 @@ interface paths {
502
583
  patch: operations["WorkspaceRoleController_update"];
503
584
  trace?: never;
504
585
  };
505
- "/v1/workspaces/{workspaceSlug}/services": {
586
+ "/v1/workspaces/{workspace_slug}/services": {
506
587
  parameters: {
507
588
  query?: never;
508
589
  header?: never;
@@ -519,7 +600,7 @@ interface paths {
519
600
  patch?: never;
520
601
  trace?: never;
521
602
  };
522
- "/v1/workspaces/{workspaceSlug}/services/{service}": {
603
+ "/v1/workspaces/{workspace_slug}/services/{service}": {
523
604
  parameters: {
524
605
  query?: never;
525
606
  header?: never;
@@ -537,7 +618,7 @@ interface paths {
537
618
  patch?: never;
538
619
  trace?: never;
539
620
  };
540
- "/v1/workspaces/{workspaceSlug}/services/{service}/settings": {
621
+ "/v1/workspaces/{workspace_slug}/services/{service}/settings": {
541
622
  parameters: {
542
623
  query?: never;
543
624
  header?: never;
@@ -564,6 +645,19 @@ interface components {
564
645
  */
565
646
  code: string;
566
647
  };
648
+ AuditFeedResponseDto: {
649
+ data: components["schemas"]["FeedItemDto"][];
650
+ pagination: components["schemas"]["PaginationDto"];
651
+ /** @description Per-source diagnostics so the UI / customer can see which sources contributed to this page and which are stubbed pending the cross-service fanout. */
652
+ sources: components["schemas"]["SourceDiagnosticDto"][];
653
+ };
654
+ BoundPolicySummaryDto: {
655
+ description: string | null;
656
+ /** Format: uuid */
657
+ id: string;
658
+ /** @example envoi-readonly */
659
+ name: string;
660
+ };
567
661
  CreatePakDto: {
568
662
  /** @description Optional description (e.g. which service uses the key). */
569
663
  description?: string;
@@ -572,15 +666,20 @@ interface components {
572
666
  * @example Production agora client
573
667
  */
574
668
  name: string;
575
- /** @description IAM-style policy. List of statements that gate the key — each scoped to a set of actions + resources. */
576
- policy: components["schemas"]["PolicyStatementDto"][];
669
+ /**
670
+ * @description IDs of managed policies (workspace_policy rows) to bind to this PAK. Bind one or more — the PAK's effective policy is the union of all bound statements.
671
+ * @example [
672
+ * "11111111-1111-1111-1111-111111111111"
673
+ * ]
674
+ */
675
+ policy_ids: string[];
577
676
  };
578
677
  CreateWorkspaceDto: {
579
678
  /**
580
679
  * @description Display name shown in console and on receipts.
581
680
  * @example Acme Corp
582
681
  */
583
- displayName: string;
682
+ display_name: string;
584
683
  /**
585
684
  * @description URL-friendly slug. Lowercase alphanumerics, separated by hyphens. Used in URLs and as a stable handle.
586
685
  * @example acme-corp
@@ -597,19 +696,47 @@ interface components {
597
696
  * @description Hours until the invite expires. Defaults to 168 (7 days).
598
697
  * @example 168
599
698
  */
600
- expiresInHours?: number;
699
+ expires_in_hours?: number;
601
700
  /**
602
701
  * @description Maximum number of accepts. Defaults to 1. Use higher values for "team link" invites.
603
702
  * @example 1
604
703
  */
605
- maxUses?: number;
704
+ max_uses?: number;
606
705
  /**
607
706
  * @description System role shortcut: 'owner' | 'admin' | 'member'.
608
707
  * @enum {string}
609
708
  */
610
709
  role?: "owner" | "admin" | "member";
611
710
  /** @description UUID of the role to grant on accept. Use to target custom roles. */
612
- roleId?: string;
711
+ role_id?: string;
712
+ };
713
+ CreateWorkspacePolicyDto: {
714
+ /**
715
+ * @description Optional human description. Pass `null` to clear an existing description on PATCH.
716
+ * @example Read-only access to all Envoi resources
717
+ */
718
+ description?: string | null;
719
+ /**
720
+ * @description Policy name (1-64 chars, alphanumeric + space/underscore/hyphen). Unique per workspace.
721
+ * @example envoi-readonly
722
+ */
723
+ name: string;
724
+ /**
725
+ * @description IAM-style policy. Empty array means "no permissions" — useful as a placeholder before granting any actions.
726
+ * @example [
727
+ * {
728
+ * "actions": [
729
+ * "envoi.read",
730
+ * "envoi.list"
731
+ * ],
732
+ * "effect": "allow",
733
+ * "resources": [
734
+ * "*"
735
+ * ]
736
+ * }
737
+ * ]
738
+ */
739
+ policy: components["schemas"]["PolicyStatementDto"][];
613
740
  };
614
741
  CreateWorkspaceRoleDto: {
615
742
  /** @description Optional human-readable role description. */
@@ -620,18 +747,60 @@ interface components {
620
747
  */
621
748
  name: string;
622
749
  /**
623
- * @description Permission strings (`<service>.<resource>.<action>`) granted to the role.
750
+ * @description IAM-style policy granting the role its permissions. Same wire shape as PAK policies. Omit or pass `[]` for a no-permissions role.
624
751
  * @example [
625
- * "envoi.template.read",
626
- * "envoi.message.read"
752
+ * {
753
+ * "actions": [
754
+ * "envoi.*.read"
755
+ * ],
756
+ * "effect": "allow",
757
+ * "resources": [
758
+ * "*"
759
+ * ]
760
+ * }
627
761
  * ]
628
762
  */
629
- permissions?: string[];
763
+ policy?: components["schemas"]["PolicyStatementDto"][];
764
+ /**
765
+ * @description Optional managed-policy id to bind the role to. When set, the role's effective policy comes from the bound managed policy and `policy` (inline) must be omitted.
766
+ * @example 11111111-1111-1111-1111-111111111111
767
+ */
768
+ policy_id?: string | null;
630
769
  };
631
770
  EnableWorkspaceServiceDto: {
632
771
  /** @description Optional per-service settings blob captured at enable time. */
633
772
  settings?: Record<string, never>;
634
773
  };
774
+ FeedItemDto: {
775
+ /** @example workspace.member.removed */
776
+ action: string;
777
+ /** Format: uuid */
778
+ actor_id: string | null;
779
+ /**
780
+ * @description Actor classification — one of 'platform_user' | 'end_user' | 'm2m' | 'system' | 'pat' | 'api_key'.
781
+ * @example platform_user
782
+ */
783
+ actor_type: string;
784
+ /** @description Free-form metadata (jsonb). */
785
+ metadata: Record<string, never>;
786
+ /** @example workspace_membership */
787
+ resource: string;
788
+ /** Format: uuid */
789
+ resource_id: string | null;
790
+ /**
791
+ * @description Which audit table this row came from.
792
+ * @example workspace_audit
793
+ * @enum {string}
794
+ */
795
+ source: "workspace_audit" | "heimdall_audit" | "agora_moderation";
796
+ /**
797
+ * @description Stable per-source identifier. Used by the cursor to resume from the same point on the next page.
798
+ * @example 4e5f5c9e-b4ee-4401-9275-283feb66c178
799
+ */
800
+ source_ref: string;
801
+ /** Format: date-time */
802
+ timestamp: string;
803
+ };
635
804
  FeedbackResponseDto: {
636
805
  /**
637
806
  * @description Human-readable message
@@ -639,6 +808,139 @@ interface components {
639
808
  */
640
809
  message: string;
641
810
  };
811
+ IntrospectAccountDto: {
812
+ display_name: string | null;
813
+ email: string | null;
814
+ /**
815
+ * Format: date-time
816
+ * @description Timestamp when this account verified its primary email, or null if unverified.
817
+ */
818
+ email_verified_at: string | null;
819
+ /** Format: uuid */
820
+ id: string;
821
+ /** @description Account status (e.g. `active`, `suspended`). */
822
+ status: string;
823
+ username: string;
824
+ };
825
+ IntrospectApiKeyResponseDto: {
826
+ /** Format: uuid */
827
+ api_key_id: string;
828
+ /** Format: uuid */
829
+ created_by: string | null;
830
+ is_valid: boolean;
831
+ /** @description Merged effective policy across every managed policy bound to this PAK. */
832
+ policy: components["schemas"]["PolicyStatementDto"][];
833
+ /** Format: uuid */
834
+ workspace_id: string;
835
+ };
836
+ IntrospectPrincipalDto: {
837
+ email: string | null;
838
+ /** Format: uuid */
839
+ id: string;
840
+ name: string | null;
841
+ /** Format: uuid */
842
+ sub: string;
843
+ };
844
+ IntrospectResponseDto: {
845
+ account?: components["schemas"]["IntrospectAccountDto"] | null;
846
+ is_authenticated: boolean;
847
+ principal?: components["schemas"]["IntrospectPrincipalDto"] | null;
848
+ workspaces?: components["schemas"]["IntrospectWorkspaceListItemDto"][];
849
+ };
850
+ IntrospectRoleDto: {
851
+ /** Format: uuid */
852
+ id: string;
853
+ name: string;
854
+ };
855
+ IntrospectWorkspaceListItemDto: {
856
+ display_name: string;
857
+ /** Format: uuid */
858
+ id: string;
859
+ /**
860
+ * @description Caller’s role name in this workspace.
861
+ * @example owner
862
+ */
863
+ role: string;
864
+ /**
865
+ * @description Enabled services on this workspace.
866
+ * @example [
867
+ * "envoi",
868
+ * "rally"
869
+ * ]
870
+ */
871
+ services: string[];
872
+ slug: string;
873
+ };
874
+ IntrospectWorkspaceResponseDto: {
875
+ /**
876
+ * Format: uuid
877
+ * @description Canonical workspace UUID. Only present for members — non-members get a uniform low-information response.
878
+ */
879
+ id?: string;
880
+ is_member: boolean;
881
+ /** @description Effective IAM-style policy for this caller in this workspace. */
882
+ policy: components["schemas"]["PolicyStatementDto"][];
883
+ role: components["schemas"]["IntrospectRoleDto"] | null;
884
+ /**
885
+ * @description Enabled services on this workspace.
886
+ * @example [
887
+ * "envoi",
888
+ * "rally"
889
+ * ]
890
+ */
891
+ services: string[];
892
+ };
893
+ JwkDto: {
894
+ /**
895
+ * @description Signing algorithm (e.g. `RS256`).
896
+ * @example RS256
897
+ */
898
+ alg: string;
899
+ /**
900
+ * @description Key ID for matching the kid header on a JWT.
901
+ * @example k_2026_05_01
902
+ */
903
+ kid: string;
904
+ /**
905
+ * @description Key type (e.g. `RSA`).
906
+ * @example RSA
907
+ */
908
+ kty: string;
909
+ /**
910
+ * @description Key usage. Always `sig` for this endpoint.
911
+ * @example sig
912
+ */
913
+ use: string;
914
+ };
915
+ JwksResponseDto: {
916
+ /** @description Array of public JWKs. Token verifiers iterate these by `kid` to find the matching signer. */
917
+ keys: components["schemas"]["JwkDto"][];
918
+ };
919
+ ListManagedPoliciesResponseDto: {
920
+ data: components["schemas"]["ManagedPolicyResponseDto"][];
921
+ };
922
+ ListWorkspaceAuditLogsResponseDto: {
923
+ data: components["schemas"]["WorkspaceAuditLogEntryDto"][];
924
+ pagination: components["schemas"]["PaginationDto"];
925
+ };
926
+ ListWorkspaceInvitesResponseDto: {
927
+ data: components["schemas"]["WorkspaceInviteListItemDto"][];
928
+ pagination: components["schemas"]["PaginationDto"];
929
+ };
930
+ ListWorkspaceMembersResponseDto: {
931
+ data: components["schemas"]["WorkspaceMemberResponseDto"][];
932
+ pagination: components["schemas"]["PaginationDto"];
933
+ };
934
+ ListWorkspaceRolesResponseDto: {
935
+ data: components["schemas"]["WorkspaceRoleResponseDto"][];
936
+ };
937
+ ListWorkspaceServicesResponseDto: {
938
+ data: components["schemas"]["WorkspaceServiceStateDto"][];
939
+ };
940
+ ListWorkspacesResponseDto: {
941
+ data: components["schemas"]["WorkspaceListItemDto"][];
942
+ pagination: components["schemas"]["PaginationDto"];
943
+ };
642
944
  LogoutDto: {
643
945
  /**
644
946
  * @description Refresh token (JWT)
@@ -646,12 +948,74 @@ interface components {
646
948
  */
647
949
  refresh_token: string;
648
950
  };
951
+ ManagedPolicyDetailResponseDto: {
952
+ /** @description Counts of currently-bound consumers — surface this in delete-confirm UX so the operator sees cascade impact. */
953
+ binding_count: components["schemas"]["PolicyBindingCountDto"];
954
+ /** Format: date-time */
955
+ created_at: string;
956
+ /**
957
+ * Format: uuid
958
+ * @description Account that authored the row. Only revealed to callers with `workspace.audit.read`; plain members see null.
959
+ */
960
+ created_by: string | null;
961
+ description: string | null;
962
+ /** Format: uuid */
963
+ id: string;
964
+ /** @example envoi-readonly */
965
+ name: string;
966
+ /** @description IAM-style policy statements bound to this managed policy. */
967
+ policy: components["schemas"]["PolicyStatementDto"][];
968
+ /** Format: date-time */
969
+ updated_at: string;
970
+ /** Format: uuid */
971
+ workspace_id: string;
972
+ };
973
+ ManagedPolicyResponseDto: {
974
+ /** Format: date-time */
975
+ created_at: string;
976
+ /**
977
+ * Format: uuid
978
+ * @description Account that authored the row. Only revealed to callers with `workspace.audit.read`; plain members see null.
979
+ */
980
+ created_by: string | null;
981
+ description: string | null;
982
+ /** Format: uuid */
983
+ id: string;
984
+ /** @example envoi-readonly */
985
+ name: string;
986
+ /** @description IAM-style policy statements bound to this managed policy. */
987
+ policy: components["schemas"]["PolicyStatementDto"][];
988
+ /** Format: date-time */
989
+ updated_at: string;
990
+ /** Format: uuid */
991
+ workspace_id: string;
992
+ };
993
+ MintPakResponseDto: {
994
+ record: components["schemas"]["PublicApiKeyDto"];
995
+ /**
996
+ * @description The full plaintext PAK token. Returned ONCE — store it now; it cannot be retrieved later.
997
+ * @example pcft_live_abc123XYZ...
998
+ */
999
+ token: string;
1000
+ };
1001
+ PaginationDto: {
1002
+ /** @example false */
1003
+ has_more: boolean;
1004
+ /** @example null */
1005
+ next_cursor: string | null;
1006
+ };
1007
+ PolicyBindingCountDto: {
1008
+ /** @description Number of platform API keys bound to this policy. */
1009
+ pak: number;
1010
+ /** @description Number of workspace roles bound to this policy. */
1011
+ role: number;
1012
+ };
649
1013
  PolicyStatementDto: {
650
1014
  /**
651
- * @description Action strings the statement applies to (e.g. `agora.actor.read`). Wildcards: `agora.*`, `*`.
1015
+ * @description Action strings the statement applies to. Wildcards (e.g. `agora.*`, `*.read`, `*`) supported per `actionMatches` semantics.
652
1016
  * @example [
653
- * "agora.actor.read",
654
- * "agora.object.read"
1017
+ * "agora.read",
1018
+ * "agora.list"
655
1019
  * ]
656
1020
  */
657
1021
  actions: string[];
@@ -662,13 +1026,38 @@ interface components {
662
1026
  */
663
1027
  effect: "allow" | "deny";
664
1028
  /**
665
- * @description Resource URNs the statement applies to (e.g. `pcft:agora:community/<uuid>`). Wildcards allowed.
1029
+ * @description Resource URNs the statement applies to. Use `["*"]` for workspace-wide. Per-resource scoping (e.g. `pcft:agora:community/<uuid>`) is supported by the PAK lane today; the workspace-role authoring API restricts this to `["*"]` for now (see `tasks/platform-auth-api/001`).
666
1030
  * @example [
667
- * "pcft:agora:community/cccccccc-cccc-cccc-cccc-cccccccccccc"
1031
+ * "*"
668
1032
  * ]
669
1033
  */
670
1034
  resources: string[];
671
1035
  };
1036
+ PublicApiKeyDto: {
1037
+ /** Format: date-time */
1038
+ created_at: string;
1039
+ /** Format: uuid */
1040
+ created_by: string | null;
1041
+ description: string | null;
1042
+ /** Format: uuid */
1043
+ id: string;
1044
+ /** Format: date-time */
1045
+ last_used_at: string | null;
1046
+ name: string;
1047
+ /** @description Managed policies currently bound to this PAK. */
1048
+ policies: components["schemas"]["BoundPolicySummaryDto"][];
1049
+ /** Format: date-time */
1050
+ revoked_at: string | null;
1051
+ /**
1052
+ * @description The first ~14 chars of the token (prefix). Plaintext token is never returned after mint.
1053
+ * @example pcft_live_abc123
1054
+ */
1055
+ token_prefix: string;
1056
+ /** Format: date-time */
1057
+ updated_at: string;
1058
+ /** Format: uuid */
1059
+ workspace_id: string;
1060
+ };
672
1061
  RefreshDto: {
673
1062
  /**
674
1063
  * @description Refresh token (JWT)
@@ -688,7 +1077,7 @@ interface components {
688
1077
  * @description New password (min 8 characters)
689
1078
  * @example MyNewPassword123
690
1079
  */
691
- newPassword: string;
1080
+ new_password: string;
692
1081
  /**
693
1082
  * @description 6-digit reset token sent via email
694
1083
  * @example 123456
@@ -700,19 +1089,19 @@ interface components {
700
1089
  * @description Owning account identifier
701
1090
  * @example acc_01HZY2F2B6N7M8Q9W4E6R2
702
1091
  */
703
- accountId: string;
1092
+ account_id: string;
704
1093
  /**
705
1094
  * Format: date-time
706
1095
  * @description Creation timestamp (ISO 8601)
707
1096
  * @example 2025-09-20T12:34:56.000Z
708
1097
  */
709
- createdAt: string;
1098
+ created_at: string;
710
1099
  /**
711
1100
  * Format: date-time
712
1101
  * @description Expiration timestamp (ISO 8601)
713
1102
  * @example 2025-09-21T12:34:56.000Z
714
1103
  */
715
- expiresAt: string;
1104
+ expires_at: string;
716
1105
  /**
717
1106
  * @description Session identifier
718
1107
  * @example sess_01HZY2G3A7M8Q9W4E6R2K1
@@ -728,12 +1117,16 @@ interface components {
728
1117
  * @description Last time this session was used (ISO 8601) or null
729
1118
  * @example 2025-09-20T18:00:00.000Z
730
1119
  */
731
- lastUsedAt: string | null;
1120
+ last_used_at: string | null;
732
1121
  /**
733
1122
  * @description HTTP User-Agent string
734
1123
  * @example Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
735
1124
  */
736
- userAgent: string | null;
1125
+ user_agent: string | null;
1126
+ };
1127
+ SetBindingsDto: {
1128
+ /** @description Replacement set of managed-policy IDs. Empty array is rejected — revoke the PAK to disable it. */
1129
+ policy_ids: string[];
737
1130
  };
738
1131
  SignInDto: {
739
1132
  /**
@@ -750,14 +1143,14 @@ interface components {
750
1143
  * @description Session duration: "short" (24h), "long" (90d), or integer seconds (3600–7776000). Defaults to 30 days.
751
1144
  * @example short
752
1145
  */
753
- sessionDuration?: Record<string, never>;
1146
+ session_duration?: Record<string, never>;
754
1147
  };
755
1148
  SignUpDto: {
756
1149
  /**
757
1150
  * @description Display name
758
1151
  * @example John Doe
759
1152
  */
760
- displayName?: string;
1153
+ display_name?: string;
761
1154
  /**
762
1155
  * @description User email address
763
1156
  * @example user@example.com
@@ -772,13 +1165,20 @@ interface components {
772
1165
  * @description Session duration: "short" (24h), "long" (90d), or integer seconds (3600–7776000). Defaults to 30 days.
773
1166
  * @example long
774
1167
  */
775
- sessionDuration?: Record<string, never>;
1168
+ session_duration?: Record<string, never>;
776
1169
  /**
777
1170
  * @description Unique username (letters, numbers, dot, underscore, hyphen)
778
1171
  * @example john_doe
779
1172
  */
780
1173
  username: string;
781
1174
  };
1175
+ SourceDiagnosticDto: {
1176
+ count: number;
1177
+ error?: string;
1178
+ included: boolean;
1179
+ /** @enum {string} */
1180
+ source: "workspace_audit" | "heimdall_audit" | "agora_moderation";
1181
+ };
782
1182
  TokenResponseDto: {
783
1183
  /**
784
1184
  * @description Access token (JWT)
@@ -811,16 +1211,28 @@ interface components {
811
1211
  * @description UUID of the role to assign. Use this to target custom roles.
812
1212
  * @example 11111111-1111-4111-8111-111111111111
813
1213
  */
814
- roleId?: string;
1214
+ role_id?: string;
1215
+ };
1216
+ UpdateMemberRoleResponseDto: {
1217
+ /** Format: uuid */
1218
+ account_id: string;
1219
+ /** Format: uuid */
1220
+ id: string;
1221
+ /** Format: uuid */
1222
+ invited_by: string | null;
1223
+ /** Format: date-time */
1224
+ joined_at: string;
1225
+ /** Format: uuid */
1226
+ role_id: string;
1227
+ /** Format: uuid */
1228
+ workspace_id: string;
815
1229
  };
816
1230
  UpdatePakDto: {
817
1231
  description?: string | null;
818
1232
  name?: string;
819
- /** @description Replaces the policy entirely if provided. */
820
- policy?: components["schemas"]["PolicyStatementDto"][];
821
1233
  };
822
1234
  UpdateWorkspaceDto: {
823
- displayName?: string;
1235
+ display_name?: string;
824
1236
  /** @description Free-form workspace settings blob. */
825
1237
  settings?: Record<string, never>;
826
1238
  /**
@@ -829,11 +1241,41 @@ interface components {
829
1241
  */
830
1242
  slug?: string;
831
1243
  };
1244
+ UpdateWorkspacePolicyDto: {
1245
+ /**
1246
+ * @description Optional human description. Pass `null` to clear an existing description on PATCH.
1247
+ * @example Read-only access to all Envoi resources
1248
+ */
1249
+ description?: string | null;
1250
+ /**
1251
+ * @description Policy name (1-64 chars, alphanumeric + space/underscore/hyphen). Unique per workspace.
1252
+ * @example envoi-readonly
1253
+ */
1254
+ name?: string;
1255
+ /**
1256
+ * @description IAM-style policy. Empty array means "no permissions" — useful as a placeholder before granting any actions.
1257
+ * @example [
1258
+ * {
1259
+ * "actions": [
1260
+ * "envoi.read",
1261
+ * "envoi.list"
1262
+ * ],
1263
+ * "effect": "allow",
1264
+ * "resources": [
1265
+ * "*"
1266
+ * ]
1267
+ * }
1268
+ * ]
1269
+ */
1270
+ policy?: components["schemas"]["PolicyStatementDto"][];
1271
+ };
832
1272
  UpdateWorkspaceRoleDto: {
833
1273
  description?: string;
834
1274
  name?: string;
835
- /** @description Replaces the role permission set if provided. Omit to leave permissions unchanged. */
836
- permissions?: string[];
1275
+ /** @description Replaces the role policy if provided. Omit to leave policy unchanged. */
1276
+ policy?: components["schemas"]["PolicyStatementDto"][];
1277
+ /** @description Bind / unbind the role to a managed policy. UUID → bind, null → unbind, omit → leave unchanged. */
1278
+ policy_id?: string | null;
837
1279
  };
838
1280
  VerifyCodeDto: {
839
1281
  /**
@@ -842,6 +1284,190 @@ interface components {
842
1284
  */
843
1285
  code: string;
844
1286
  };
1287
+ WorkspaceActionCatalogResponseDto: {
1288
+ /** @description Every known workspace action across all enabled service catalogs. */
1289
+ actions: string[];
1290
+ };
1291
+ WorkspaceAuditLogEntryDto: {
1292
+ /**
1293
+ * @description Action identifier (e.g. `workspace.member.removed`).
1294
+ * @example workspace.member.removed
1295
+ */
1296
+ action: string;
1297
+ /** @description Account UUID of the actor, or null for system actions. */
1298
+ actor_id: string | null;
1299
+ /**
1300
+ * @description Actor classification.
1301
+ * @example platform_user
1302
+ * @enum {string}
1303
+ */
1304
+ actor_type: "platform_user" | "system" | "pat";
1305
+ /** Format: date-time */
1306
+ created_at: string;
1307
+ /** Format: uuid */
1308
+ id: string;
1309
+ /** @description Originating request IP, when available. */
1310
+ ip: string | null;
1311
+ /** @description Free-form metadata attached to the audit row (jsonb). */
1312
+ metadata: Record<string, never>;
1313
+ /**
1314
+ * @description Resource type the action targeted.
1315
+ * @example workspace_membership
1316
+ */
1317
+ resource: string;
1318
+ /** Format: uuid */
1319
+ resource_id: string | null;
1320
+ /** Format: uuid */
1321
+ workspace_id: string;
1322
+ };
1323
+ WorkspaceInviteListItemDto: {
1324
+ /** @description Single-use invite code embedded in the invite URL. */
1325
+ code: string;
1326
+ /** Format: date-time */
1327
+ created_at: string;
1328
+ /** Format: uuid */
1329
+ created_by: string;
1330
+ /** Format: email */
1331
+ email: string | null;
1332
+ /** Format: date-time */
1333
+ expires_at: string | null;
1334
+ /** Format: uuid */
1335
+ id: string;
1336
+ max_uses: number | null;
1337
+ /** Format: date-time */
1338
+ revoked_at: string | null;
1339
+ /** Format: uuid */
1340
+ role_id: string | null;
1341
+ role_name: string | null;
1342
+ use_count: number;
1343
+ /** Format: uuid */
1344
+ workspace_id: string;
1345
+ };
1346
+ WorkspaceInviteResponseDto: {
1347
+ /** @description Single-use invite code embedded in the invite URL. */
1348
+ code: string;
1349
+ /** Format: date-time */
1350
+ created_at: string;
1351
+ /** Format: uuid */
1352
+ created_by: string;
1353
+ /** Format: email */
1354
+ email: string | null;
1355
+ /** Format: date-time */
1356
+ expires_at: string | null;
1357
+ /** Format: uuid */
1358
+ id: string;
1359
+ max_uses: number | null;
1360
+ /** Format: date-time */
1361
+ revoked_at: string | null;
1362
+ /** Format: uuid */
1363
+ role_id: string | null;
1364
+ use_count: number;
1365
+ /** Format: uuid */
1366
+ workspace_id: string;
1367
+ };
1368
+ WorkspaceListItemDto: {
1369
+ /** Format: date-time */
1370
+ created_at: string;
1371
+ /** Format: uuid */
1372
+ created_by: string;
1373
+ /** @example Acme Corp */
1374
+ display_name: string;
1375
+ /** Format: uuid */
1376
+ id: string;
1377
+ /**
1378
+ * @description Caller’s role name in this workspace.
1379
+ * @example owner
1380
+ */
1381
+ member_role: string | null;
1382
+ /**
1383
+ * Format: uuid
1384
+ * @description Caller’s workspace_role.id for this workspace.
1385
+ */
1386
+ member_role_id: string | null;
1387
+ /** @description Free-form workspace settings blob. */
1388
+ settings: Record<string, never>;
1389
+ /** @example acme-corp */
1390
+ slug: string;
1391
+ /**
1392
+ * @description Workspace status (e.g. `active`).
1393
+ * @example active
1394
+ */
1395
+ status: string;
1396
+ /** Format: date-time */
1397
+ updated_at: string;
1398
+ };
1399
+ WorkspaceMemberResponseDto: {
1400
+ /** Format: uuid */
1401
+ account_id: string;
1402
+ display_name: string | null;
1403
+ /** Format: uuid */
1404
+ id: string;
1405
+ /** Format: date-time */
1406
+ joined_at: string;
1407
+ primary_email: string | null;
1408
+ role: string;
1409
+ /** Format: uuid */
1410
+ role_id: string;
1411
+ role_is_system: boolean;
1412
+ username: string;
1413
+ };
1414
+ WorkspaceResponseDto: {
1415
+ /** Format: date-time */
1416
+ created_at: string;
1417
+ /** Format: uuid */
1418
+ created_by: string;
1419
+ /** @example Acme Corp */
1420
+ display_name: string;
1421
+ /** Format: uuid */
1422
+ id: string;
1423
+ /** @description Free-form workspace settings blob. */
1424
+ settings: Record<string, never>;
1425
+ /** @example acme-corp */
1426
+ slug: string;
1427
+ /**
1428
+ * @description Workspace status (e.g. `active`).
1429
+ * @example active
1430
+ */
1431
+ status: string;
1432
+ /** Format: date-time */
1433
+ updated_at: string;
1434
+ };
1435
+ WorkspaceRoleResponseDto: {
1436
+ description: string | null;
1437
+ /** Format: uuid */
1438
+ id: string;
1439
+ /** @description True for built-in system roles (owner/admin/member); false for custom roles. */
1440
+ is_system: boolean;
1441
+ /** @description Role name. System role names are `owner`/`admin`/`member`. */
1442
+ name: string;
1443
+ /** @description Effective IAM-style policy. When `policy_id` is set this is the bound managed policy; otherwise it is the inline policy column. */
1444
+ policy: components["schemas"]["PolicyStatementDto"][];
1445
+ /**
1446
+ * Format: uuid
1447
+ * @description Managed policy ID if the role is bound to one, else null.
1448
+ */
1449
+ policy_id: string | null;
1450
+ };
1451
+ WorkspaceServiceStateDto: {
1452
+ /** Format: date-time */
1453
+ disabled_at: string | null;
1454
+ /** Format: uuid */
1455
+ disabled_by: string | null;
1456
+ enabled: boolean;
1457
+ /** Format: date-time */
1458
+ enabled_at: string | null;
1459
+ /** Format: uuid */
1460
+ enabled_by: string | null;
1461
+ /**
1462
+ * @description Service identifier (e.g. `envoi`, `rally`, `agora`, `heimdall`).
1463
+ * @example envoi
1464
+ */
1465
+ service: string;
1466
+ /** @description Per-service settings blob (service-specific shape). */
1467
+ settings: Record<string, never>;
1468
+ /** Format: uuid */
1469
+ workspace_id: string;
1470
+ };
845
1471
  };
846
1472
  responses: never;
847
1473
  parameters: never;
@@ -863,7 +1489,9 @@ interface operations {
863
1489
  headers: {
864
1490
  [name: string]: unknown;
865
1491
  };
866
- content?: never;
1492
+ content: {
1493
+ "application/json": components["schemas"]["JwksResponseDto"];
1494
+ };
867
1495
  };
868
1496
  };
869
1497
  };
@@ -876,12 +1504,27 @@ interface operations {
876
1504
  };
877
1505
  requestBody?: never;
878
1506
  responses: {
1507
+ /** @description Account deleted. All sessions revoked. */
879
1508
  204: {
880
1509
  headers: {
881
1510
  [name: string]: unknown;
882
1511
  };
883
1512
  content?: never;
884
1513
  };
1514
+ /** @description The session lacks the required action for self-account deletion (defence-in-depth — the route is guarded but the cookie may be present without action access). */
1515
+ 403: {
1516
+ headers: {
1517
+ [name: string]: unknown;
1518
+ };
1519
+ content?: never;
1520
+ };
1521
+ /** @description No account row exists for the session principal. Should never fire for a valid session — surfaced for SDKs. */
1522
+ 404: {
1523
+ headers: {
1524
+ [name: string]: unknown;
1525
+ };
1526
+ content?: never;
1527
+ };
885
1528
  };
886
1529
  };
887
1530
  AuthenticationController_logout: {
@@ -898,7 +1541,7 @@ interface operations {
898
1541
  };
899
1542
  responses: {
900
1543
  /** @description Logout successful (no content) */
901
- 200: {
1544
+ 204: {
902
1545
  headers: {
903
1546
  [name: string]: unknown;
904
1547
  };
@@ -923,7 +1566,7 @@ interface operations {
923
1566
  requestBody?: never;
924
1567
  responses: {
925
1568
  /** @description Logout successful (no content) */
926
- 200: {
1569
+ 204: {
927
1570
  headers: {
928
1571
  [name: string]: unknown;
929
1572
  };
@@ -951,6 +1594,7 @@ interface operations {
951
1594
  };
952
1595
  };
953
1596
  responses: {
1597
+ /** @description Reset request accepted. If the email matches an account, an email has been queued. */
954
1598
  201: {
955
1599
  headers: {
956
1600
  [name: string]: unknown;
@@ -972,6 +1616,7 @@ interface operations {
972
1616
  };
973
1617
  };
974
1618
  responses: {
1619
+ /** @description Password reset; all active sessions revoked. */
975
1620
  201: {
976
1621
  headers: {
977
1622
  [name: string]: unknown;
@@ -1086,7 +1731,9 @@ interface operations {
1086
1731
  headers: {
1087
1732
  [name: string]: unknown;
1088
1733
  };
1089
- content?: never;
1734
+ content: {
1735
+ "application/json": components["schemas"]["IntrospectResponseDto"];
1736
+ };
1090
1737
  };
1091
1738
  };
1092
1739
  };
@@ -1105,7 +1752,9 @@ interface operations {
1105
1752
  headers: {
1106
1753
  [name: string]: unknown;
1107
1754
  };
1108
- content?: never;
1755
+ content: {
1756
+ "application/json": components["schemas"]["IntrospectApiKeyResponseDto"];
1757
+ };
1109
1758
  };
1110
1759
  };
1111
1760
  };
@@ -1114,7 +1763,7 @@ interface operations {
1114
1763
  query?: never;
1115
1764
  header?: never;
1116
1765
  path: {
1117
- workspaceId: string;
1766
+ workspace_id: string;
1118
1767
  };
1119
1768
  cookie?: never;
1120
1769
  };
@@ -1124,7 +1773,9 @@ interface operations {
1124
1773
  headers: {
1125
1774
  [name: string]: unknown;
1126
1775
  };
1127
- content?: never;
1776
+ content: {
1777
+ "application/json": components["schemas"]["IntrospectWorkspaceResponseDto"];
1778
+ };
1128
1779
  };
1129
1780
  };
1130
1781
  };
@@ -1229,7 +1880,9 @@ interface operations {
1229
1880
  headers: {
1230
1881
  [name: string]: unknown;
1231
1882
  };
1232
- content?: never;
1883
+ content: {
1884
+ "application/json": components["schemas"]["ListWorkspacesResponseDto"];
1885
+ };
1233
1886
  };
1234
1887
  };
1235
1888
  };
@@ -1250,7 +1903,9 @@ interface operations {
1250
1903
  headers: {
1251
1904
  [name: string]: unknown;
1252
1905
  };
1253
- content?: never;
1906
+ content: {
1907
+ "application/json": components["schemas"]["WorkspaceResponseDto"];
1908
+ };
1254
1909
  };
1255
1910
  };
1256
1911
  };
@@ -1267,11 +1922,14 @@ interface operations {
1267
1922
  };
1268
1923
  };
1269
1924
  responses: {
1925
+ /** @description The joined workspace. */
1270
1926
  201: {
1271
1927
  headers: {
1272
1928
  [name: string]: unknown;
1273
1929
  };
1274
- content?: never;
1930
+ content: {
1931
+ "application/json": components["schemas"]["WorkspaceResponseDto"];
1932
+ };
1275
1933
  };
1276
1934
  };
1277
1935
  };
@@ -1280,7 +1938,7 @@ interface operations {
1280
1938
  query?: never;
1281
1939
  header?: never;
1282
1940
  path: {
1283
- workspaceSlug: string;
1941
+ workspace_slug: string;
1284
1942
  };
1285
1943
  cookie?: never;
1286
1944
  };
@@ -1290,7 +1948,9 @@ interface operations {
1290
1948
  headers: {
1291
1949
  [name: string]: unknown;
1292
1950
  };
1293
- content?: never;
1951
+ content: {
1952
+ "application/json": components["schemas"]["WorkspaceResponseDto"];
1953
+ };
1294
1954
  };
1295
1955
  };
1296
1956
  };
@@ -1299,12 +1959,13 @@ interface operations {
1299
1959
  query?: never;
1300
1960
  header?: never;
1301
1961
  path: {
1302
- workspaceSlug: string;
1962
+ workspace_slug: string;
1303
1963
  };
1304
1964
  cookie?: never;
1305
1965
  };
1306
1966
  requestBody?: never;
1307
1967
  responses: {
1968
+ /** @description Workspace deleted. */
1308
1969
  204: {
1309
1970
  headers: {
1310
1971
  [name: string]: unknown;
@@ -1318,7 +1979,7 @@ interface operations {
1318
1979
  query?: never;
1319
1980
  header?: never;
1320
1981
  path: {
1321
- workspaceSlug: string;
1982
+ workspace_slug: string;
1322
1983
  };
1323
1984
  cookie?: never;
1324
1985
  };
@@ -1333,7 +1994,9 @@ interface operations {
1333
1994
  headers: {
1334
1995
  [name: string]: unknown;
1335
1996
  };
1336
- content?: never;
1997
+ content: {
1998
+ "application/json": components["schemas"]["WorkspaceResponseDto"];
1999
+ };
1337
2000
  };
1338
2001
  /** @description Invalid slug or display name. */
1339
2002
  400: {
@@ -1363,7 +2026,7 @@ interface operations {
1363
2026
  query?: never;
1364
2027
  header?: never;
1365
2028
  path: {
1366
- workspaceSlug: string;
2029
+ workspace_slug: string;
1367
2030
  };
1368
2031
  cookie?: never;
1369
2032
  };
@@ -1373,7 +2036,9 @@ interface operations {
1373
2036
  headers: {
1374
2037
  [name: string]: unknown;
1375
2038
  };
1376
- content?: never;
2039
+ content: {
2040
+ "application/json": components["schemas"]["PublicApiKeyDto"][];
2041
+ };
1377
2042
  };
1378
2043
  };
1379
2044
  };
@@ -1382,7 +2047,7 @@ interface operations {
1382
2047
  query?: never;
1383
2048
  header?: never;
1384
2049
  path: {
1385
- workspaceSlug: string;
2050
+ workspace_slug: string;
1386
2051
  };
1387
2052
  cookie?: never;
1388
2053
  };
@@ -1396,7 +2061,9 @@ interface operations {
1396
2061
  headers: {
1397
2062
  [name: string]: unknown;
1398
2063
  };
1399
- content?: never;
2064
+ content: {
2065
+ "application/json": components["schemas"]["MintPakResponseDto"];
2066
+ };
1400
2067
  };
1401
2068
  };
1402
2069
  };
@@ -1405,7 +2072,7 @@ interface operations {
1405
2072
  query?: never;
1406
2073
  header?: never;
1407
2074
  path: {
1408
- workspaceSlug: string;
2075
+ workspace_slug: string;
1409
2076
  id: string;
1410
2077
  };
1411
2078
  cookie?: never;
@@ -1416,22 +2083,28 @@ interface operations {
1416
2083
  headers: {
1417
2084
  [name: string]: unknown;
1418
2085
  };
1419
- content?: never;
2086
+ content: {
2087
+ "application/json": components["schemas"]["PublicApiKeyDto"];
2088
+ };
1420
2089
  };
1421
2090
  };
1422
2091
  };
1423
2092
  PlatformApiKeyController_revoke: {
1424
2093
  parameters: {
1425
- query?: never;
2094
+ query?: {
2095
+ /** @description When `true`, publish a `pak:revoked` Redis fan-out so subscribed services evict their caches immediately instead of waiting out the 60s TTL. */
2096
+ force?: boolean;
2097
+ };
1426
2098
  header?: never;
1427
2099
  path: {
1428
- workspaceSlug: string;
2100
+ workspace_slug: string;
1429
2101
  id: string;
1430
2102
  };
1431
2103
  cookie?: never;
1432
2104
  };
1433
2105
  requestBody?: never;
1434
2106
  responses: {
2107
+ /** @description PAK revoked. */
1435
2108
  204: {
1436
2109
  headers: {
1437
2110
  [name: string]: unknown;
@@ -1445,7 +2118,7 @@ interface operations {
1445
2118
  query?: never;
1446
2119
  header?: never;
1447
2120
  path: {
1448
- workspaceSlug: string;
2121
+ workspace_slug: string;
1449
2122
  id: string;
1450
2123
  };
1451
2124
  cookie?: never;
@@ -1457,6 +2130,114 @@ interface operations {
1457
2130
  };
1458
2131
  responses: {
1459
2132
  200: {
2133
+ headers: {
2134
+ [name: string]: unknown;
2135
+ };
2136
+ content: {
2137
+ "application/json": components["schemas"]["PublicApiKeyDto"];
2138
+ };
2139
+ };
2140
+ };
2141
+ };
2142
+ PlatformApiKeyController_setBindings: {
2143
+ parameters: {
2144
+ query?: never;
2145
+ header?: never;
2146
+ path: {
2147
+ workspace_slug: string;
2148
+ id: string;
2149
+ };
2150
+ cookie?: never;
2151
+ };
2152
+ requestBody: {
2153
+ content: {
2154
+ "application/json": components["schemas"]["SetBindingsDto"];
2155
+ };
2156
+ };
2157
+ responses: {
2158
+ /** @description Updated PAK with new bindings. */
2159
+ 200: {
2160
+ headers: {
2161
+ [name: string]: unknown;
2162
+ };
2163
+ content: {
2164
+ "application/json": components["schemas"]["PublicApiKeyDto"];
2165
+ };
2166
+ };
2167
+ /** @description One of: bound > 25 policies; merged > 200 statements; one of the policy ids does not exist or lives in a different workspace. */
2168
+ 400: {
2169
+ headers: {
2170
+ [name: string]: unknown;
2171
+ };
2172
+ content?: never;
2173
+ };
2174
+ /** @description Caller cannot grant one or more actions in the merged statement set. */
2175
+ 403: {
2176
+ headers: {
2177
+ [name: string]: unknown;
2178
+ };
2179
+ content?: never;
2180
+ };
2181
+ /** @description PAK not found in this workspace. */
2182
+ 404: {
2183
+ headers: {
2184
+ [name: string]: unknown;
2185
+ };
2186
+ content?: never;
2187
+ };
2188
+ /** @description Empty bindings — revoke the PAK instead of leaving it unbound. */
2189
+ 409: {
2190
+ headers: {
2191
+ [name: string]: unknown;
2192
+ };
2193
+ content?: never;
2194
+ };
2195
+ };
2196
+ };
2197
+ WorkspaceAuditFeedController_listFeed: {
2198
+ parameters: {
2199
+ query?: {
2200
+ /** @description ISO-8601 lower bound on `timestamp`. Items older than `since` are not returned. */
2201
+ since?: string;
2202
+ /** @description Opaque cursor from a previous response's `pagination.next_cursor`. Resumes the feed at the same merge boundary. */
2203
+ cursor?: string;
2204
+ /** @description Per-page cap. Clamped to 1..500; default 100. */
2205
+ limit?: number;
2206
+ /** @description Comma-separated subset of sources to include (e.g. `workspace_audit,heimdall_audit`). Omitted = all enabled sources. */
2207
+ sources?: string;
2208
+ };
2209
+ header?: never;
2210
+ path: {
2211
+ workspace_slug: string;
2212
+ };
2213
+ cookie?: never;
2214
+ };
2215
+ requestBody?: never;
2216
+ responses: {
2217
+ 200: {
2218
+ headers: {
2219
+ [name: string]: unknown;
2220
+ };
2221
+ content: {
2222
+ "application/json": components["schemas"]["AuditFeedResponseDto"];
2223
+ };
2224
+ };
2225
+ /** @description Invalid query params — `since` not parseable as ISO-8601, or `sources` references an unknown source name. Unrecognized sources are silently dropped; an empty result set after that filter still returns 200. */
2226
+ 400: {
2227
+ headers: {
2228
+ [name: string]: unknown;
2229
+ };
2230
+ content?: never;
2231
+ };
2232
+ /** @description The caller is signed in but lacks `workspace.audit.read` for this workspace. */
2233
+ 403: {
2234
+ headers: {
2235
+ [name: string]: unknown;
2236
+ };
2237
+ content?: never;
2238
+ };
2239
+ /** @description The `:workspaceSlug` path param does not resolve to a workspace the caller can see. */
2240
+ 404: {
1460
2241
  headers: {
1461
2242
  [name: string]: unknown;
1462
2243
  };
@@ -1472,7 +2253,7 @@ interface operations {
1472
2253
  };
1473
2254
  header?: never;
1474
2255
  path: {
1475
- workspaceSlug: string;
2256
+ workspace_slug: string;
1476
2257
  };
1477
2258
  cookie?: never;
1478
2259
  };
@@ -1482,7 +2263,9 @@ interface operations {
1482
2263
  headers: {
1483
2264
  [name: string]: unknown;
1484
2265
  };
1485
- content?: never;
2266
+ content: {
2267
+ "application/json": components["schemas"]["ListWorkspaceAuditLogsResponseDto"];
2268
+ };
1486
2269
  };
1487
2270
  };
1488
2271
  };
@@ -1494,7 +2277,7 @@ interface operations {
1494
2277
  };
1495
2278
  header?: never;
1496
2279
  path: {
1497
- workspaceSlug: string;
2280
+ workspace_slug: string;
1498
2281
  };
1499
2282
  cookie?: never;
1500
2283
  };
@@ -1504,7 +2287,9 @@ interface operations {
1504
2287
  headers: {
1505
2288
  [name: string]: unknown;
1506
2289
  };
1507
- content?: never;
2290
+ content: {
2291
+ "application/json": components["schemas"]["ListWorkspaceInvitesResponseDto"];
2292
+ };
1508
2293
  };
1509
2294
  };
1510
2295
  };
@@ -1513,7 +2298,7 @@ interface operations {
1513
2298
  query?: never;
1514
2299
  header?: never;
1515
2300
  path: {
1516
- workspaceSlug: string;
2301
+ workspace_slug: string;
1517
2302
  };
1518
2303
  cookie?: never;
1519
2304
  };
@@ -1527,7 +2312,9 @@ interface operations {
1527
2312
  headers: {
1528
2313
  [name: string]: unknown;
1529
2314
  };
1530
- content?: never;
2315
+ content: {
2316
+ "application/json": components["schemas"]["WorkspaceInviteResponseDto"];
2317
+ };
1531
2318
  };
1532
2319
  };
1533
2320
  };
@@ -1536,13 +2323,14 @@ interface operations {
1536
2323
  query?: never;
1537
2324
  header?: never;
1538
2325
  path: {
1539
- workspaceSlug: string;
1540
- inviteId: string;
2326
+ workspace_slug: string;
2327
+ invite_id: string;
1541
2328
  };
1542
2329
  cookie?: never;
1543
2330
  };
1544
2331
  requestBody?: never;
1545
2332
  responses: {
2333
+ /** @description Invite revoked. */
1546
2334
  204: {
1547
2335
  headers: {
1548
2336
  [name: string]: unknown;
@@ -1559,7 +2347,7 @@ interface operations {
1559
2347
  };
1560
2348
  header?: never;
1561
2349
  path: {
1562
- workspaceSlug: string;
2350
+ workspace_slug: string;
1563
2351
  };
1564
2352
  cookie?: never;
1565
2353
  };
@@ -1569,7 +2357,9 @@ interface operations {
1569
2357
  headers: {
1570
2358
  [name: string]: unknown;
1571
2359
  };
1572
- content?: never;
2360
+ content: {
2361
+ "application/json": components["schemas"]["ListWorkspaceMembersResponseDto"];
2362
+ };
1573
2363
  };
1574
2364
  };
1575
2365
  };
@@ -1578,13 +2368,14 @@ interface operations {
1578
2368
  query?: never;
1579
2369
  header?: never;
1580
2370
  path: {
1581
- workspaceSlug: string;
1582
- accountId: string;
2371
+ workspace_slug: string;
2372
+ account_id: string;
1583
2373
  };
1584
2374
  cookie?: never;
1585
2375
  };
1586
2376
  requestBody?: never;
1587
2377
  responses: {
2378
+ /** @description Member removed. */
1588
2379
  204: {
1589
2380
  headers: {
1590
2381
  [name: string]: unknown;
@@ -1598,8 +2389,8 @@ interface operations {
1598
2389
  query?: never;
1599
2390
  header?: never;
1600
2391
  path: {
1601
- workspaceSlug: string;
1602
- accountId: string;
2392
+ workspace_slug: string;
2393
+ account_id: string;
1603
2394
  };
1604
2395
  cookie?: never;
1605
2396
  };
@@ -1613,16 +2404,18 @@ interface operations {
1613
2404
  headers: {
1614
2405
  [name: string]: unknown;
1615
2406
  };
1616
- content?: never;
2407
+ content: {
2408
+ "application/json": components["schemas"]["UpdateMemberRoleResponseDto"];
2409
+ };
1617
2410
  };
1618
2411
  };
1619
2412
  };
1620
- WorkspaceRoleController_list: {
2413
+ WorkspacePolicyController_list: {
1621
2414
  parameters: {
1622
2415
  query?: never;
1623
2416
  header?: never;
1624
2417
  path: {
1625
- workspaceSlug: string;
2418
+ workspace_slug: string;
1626
2419
  };
1627
2420
  cookie?: never;
1628
2421
  };
@@ -1632,26 +2425,38 @@ interface operations {
1632
2425
  headers: {
1633
2426
  [name: string]: unknown;
1634
2427
  };
1635
- content?: never;
2428
+ content: {
2429
+ "application/json": components["schemas"]["ListManagedPoliciesResponseDto"];
2430
+ };
1636
2431
  };
1637
2432
  };
1638
2433
  };
1639
- WorkspaceRoleController_create: {
2434
+ WorkspacePolicyController_create: {
1640
2435
  parameters: {
1641
2436
  query?: never;
1642
2437
  header?: never;
1643
2438
  path: {
1644
- workspaceSlug: string;
2439
+ workspace_slug: string;
1645
2440
  };
1646
2441
  cookie?: never;
1647
2442
  };
1648
2443
  requestBody: {
1649
2444
  content: {
1650
- "application/json": components["schemas"]["CreateWorkspaceRoleDto"];
2445
+ "application/json": components["schemas"]["CreateWorkspacePolicyDto"];
1651
2446
  };
1652
2447
  };
1653
2448
  responses: {
2449
+ /** @description Policy created. */
1654
2450
  201: {
2451
+ headers: {
2452
+ [name: string]: unknown;
2453
+ };
2454
+ content: {
2455
+ "application/json": components["schemas"]["ManagedPolicyResponseDto"];
2456
+ };
2457
+ };
2458
+ /** @description Name already in use. */
2459
+ 409: {
1655
2460
  headers: {
1656
2461
  [name: string]: unknown;
1657
2462
  };
@@ -1659,18 +2464,50 @@ interface operations {
1659
2464
  };
1660
2465
  };
1661
2466
  };
1662
- WorkspaceRoleController_catalog: {
2467
+ WorkspacePolicyController_catalog: {
1663
2468
  parameters: {
1664
2469
  query?: never;
1665
2470
  header?: never;
1666
2471
  path: {
1667
- workspaceSlug: string;
2472
+ workspace_slug: string;
1668
2473
  };
1669
2474
  cookie?: never;
1670
2475
  };
1671
2476
  requestBody?: never;
1672
2477
  responses: {
1673
2478
  200: {
2479
+ headers: {
2480
+ [name: string]: unknown;
2481
+ };
2482
+ content: {
2483
+ "application/json": components["schemas"]["WorkspaceActionCatalogResponseDto"];
2484
+ };
2485
+ };
2486
+ };
2487
+ };
2488
+ WorkspacePolicyController_get: {
2489
+ parameters: {
2490
+ query?: never;
2491
+ header?: never;
2492
+ path: {
2493
+ workspace_slug: string;
2494
+ policy_id: string;
2495
+ };
2496
+ cookie?: never;
2497
+ };
2498
+ requestBody?: never;
2499
+ responses: {
2500
+ /** @description Policy detail. `binding_count.{pak,role}` reports how many things are currently bound — surface this in delete-confirm UX. */
2501
+ 200: {
2502
+ headers: {
2503
+ [name: string]: unknown;
2504
+ };
2505
+ content: {
2506
+ "application/json": components["schemas"]["ManagedPolicyDetailResponseDto"];
2507
+ };
2508
+ };
2509
+ /** @description Policy not found in this workspace. */
2510
+ 404: {
1674
2511
  headers: {
1675
2512
  [name: string]: unknown;
1676
2513
  };
@@ -1678,19 +2515,82 @@ interface operations {
1678
2515
  };
1679
2516
  };
1680
2517
  };
1681
- WorkspaceRoleController_get: {
2518
+ WorkspacePolicyController_delete: {
1682
2519
  parameters: {
1683
2520
  query?: never;
1684
2521
  header?: never;
1685
2522
  path: {
1686
- workspaceSlug: string;
1687
- roleId: string;
2523
+ workspace_slug: string;
2524
+ policy_id: string;
1688
2525
  };
1689
2526
  cookie?: never;
1690
2527
  };
1691
2528
  requestBody?: never;
1692
2529
  responses: {
2530
+ /** @description Policy deleted. */
2531
+ 204: {
2532
+ headers: {
2533
+ [name: string]: unknown;
2534
+ };
2535
+ content?: never;
2536
+ };
2537
+ /** @description Policy not found in this workspace. */
2538
+ 404: {
2539
+ headers: {
2540
+ [name: string]: unknown;
2541
+ };
2542
+ content?: never;
2543
+ };
2544
+ };
2545
+ };
2546
+ WorkspacePolicyController_update: {
2547
+ parameters: {
2548
+ query?: never;
2549
+ header?: never;
2550
+ path: {
2551
+ workspace_slug: string;
2552
+ policy_id: string;
2553
+ };
2554
+ cookie?: never;
2555
+ };
2556
+ requestBody: {
2557
+ content: {
2558
+ "application/json": components["schemas"]["UpdateWorkspacePolicyDto"];
2559
+ };
2560
+ };
2561
+ responses: {
2562
+ /** @description Updated policy. */
1693
2563
  200: {
2564
+ headers: {
2565
+ [name: string]: unknown;
2566
+ };
2567
+ content: {
2568
+ "application/json": components["schemas"]["ManagedPolicyDetailResponseDto"];
2569
+ };
2570
+ };
2571
+ /** @description Invalid policy shape, name, or condition block. */
2572
+ 400: {
2573
+ headers: {
2574
+ [name: string]: unknown;
2575
+ };
2576
+ content?: never;
2577
+ };
2578
+ /** @description Caller cannot grant one or more requested actions. */
2579
+ 403: {
2580
+ headers: {
2581
+ [name: string]: unknown;
2582
+ };
2583
+ content?: never;
2584
+ };
2585
+ /** @description Policy not found in this workspace. */
2586
+ 404: {
2587
+ headers: {
2588
+ [name: string]: unknown;
2589
+ };
2590
+ content?: never;
2591
+ };
2592
+ /** @description Name already in use. */
2593
+ 409: {
1694
2594
  headers: {
1695
2595
  [name: string]: unknown;
1696
2596
  };
@@ -1698,18 +2598,87 @@ interface operations {
1698
2598
  };
1699
2599
  };
1700
2600
  };
2601
+ WorkspaceRoleController_list: {
2602
+ parameters: {
2603
+ query?: never;
2604
+ header?: never;
2605
+ path: {
2606
+ workspace_slug: string;
2607
+ };
2608
+ cookie?: never;
2609
+ };
2610
+ requestBody?: never;
2611
+ responses: {
2612
+ 200: {
2613
+ headers: {
2614
+ [name: string]: unknown;
2615
+ };
2616
+ content: {
2617
+ "application/json": components["schemas"]["ListWorkspaceRolesResponseDto"];
2618
+ };
2619
+ };
2620
+ };
2621
+ };
2622
+ WorkspaceRoleController_create: {
2623
+ parameters: {
2624
+ query?: never;
2625
+ header?: never;
2626
+ path: {
2627
+ workspace_slug: string;
2628
+ };
2629
+ cookie?: never;
2630
+ };
2631
+ requestBody: {
2632
+ content: {
2633
+ "application/json": components["schemas"]["CreateWorkspaceRoleDto"];
2634
+ };
2635
+ };
2636
+ responses: {
2637
+ 201: {
2638
+ headers: {
2639
+ [name: string]: unknown;
2640
+ };
2641
+ content: {
2642
+ "application/json": components["schemas"]["WorkspaceRoleResponseDto"];
2643
+ };
2644
+ };
2645
+ };
2646
+ };
2647
+ WorkspaceRoleController_get: {
2648
+ parameters: {
2649
+ query?: never;
2650
+ header?: never;
2651
+ path: {
2652
+ workspace_slug: string;
2653
+ role_id: string;
2654
+ };
2655
+ cookie?: never;
2656
+ };
2657
+ requestBody?: never;
2658
+ responses: {
2659
+ 200: {
2660
+ headers: {
2661
+ [name: string]: unknown;
2662
+ };
2663
+ content: {
2664
+ "application/json": components["schemas"]["WorkspaceRoleResponseDto"];
2665
+ };
2666
+ };
2667
+ };
2668
+ };
1701
2669
  WorkspaceRoleController_delete: {
1702
2670
  parameters: {
1703
2671
  query?: never;
1704
2672
  header?: never;
1705
2673
  path: {
1706
- workspaceSlug: string;
1707
- roleId: string;
2674
+ workspace_slug: string;
2675
+ role_id: string;
1708
2676
  };
1709
2677
  cookie?: never;
1710
2678
  };
1711
2679
  requestBody?: never;
1712
2680
  responses: {
2681
+ /** @description Custom role deleted. */
1713
2682
  204: {
1714
2683
  headers: {
1715
2684
  [name: string]: unknown;
@@ -1723,8 +2692,8 @@ interface operations {
1723
2692
  query?: never;
1724
2693
  header?: never;
1725
2694
  path: {
1726
- workspaceSlug: string;
1727
- roleId: string;
2695
+ workspace_slug: string;
2696
+ role_id: string;
1728
2697
  };
1729
2698
  cookie?: never;
1730
2699
  };
@@ -1738,7 +2707,9 @@ interface operations {
1738
2707
  headers: {
1739
2708
  [name: string]: unknown;
1740
2709
  };
1741
- content?: never;
2710
+ content: {
2711
+ "application/json": components["schemas"]["WorkspaceRoleResponseDto"];
2712
+ };
1742
2713
  };
1743
2714
  };
1744
2715
  };
@@ -1747,7 +2718,7 @@ interface operations {
1747
2718
  query?: never;
1748
2719
  header?: never;
1749
2720
  path: {
1750
- workspaceSlug: string;
2721
+ workspace_slug: string;
1751
2722
  };
1752
2723
  cookie?: never;
1753
2724
  };
@@ -1757,7 +2728,9 @@ interface operations {
1757
2728
  headers: {
1758
2729
  [name: string]: unknown;
1759
2730
  };
1760
- content?: never;
2731
+ content: {
2732
+ "application/json": components["schemas"]["ListWorkspaceServicesResponseDto"];
2733
+ };
1761
2734
  };
1762
2735
  };
1763
2736
  };
@@ -1766,7 +2739,7 @@ interface operations {
1766
2739
  query?: never;
1767
2740
  header?: never;
1768
2741
  path: {
1769
- workspaceSlug: string;
2742
+ workspace_slug: string;
1770
2743
  service: string;
1771
2744
  };
1772
2745
  cookie?: never;
@@ -1781,7 +2754,9 @@ interface operations {
1781
2754
  headers: {
1782
2755
  [name: string]: unknown;
1783
2756
  };
1784
- content?: never;
2757
+ content: {
2758
+ "application/json": components["schemas"]["WorkspaceServiceStateDto"];
2759
+ };
1785
2760
  };
1786
2761
  };
1787
2762
  };
@@ -1790,13 +2765,14 @@ interface operations {
1790
2765
  query?: never;
1791
2766
  header?: never;
1792
2767
  path: {
1793
- workspaceSlug: string;
2768
+ workspace_slug: string;
1794
2769
  service: string;
1795
2770
  };
1796
2771
  cookie?: never;
1797
2772
  };
1798
2773
  requestBody?: never;
1799
2774
  responses: {
2775
+ /** @description Service disabled. Settings preserved for re-enable. */
1800
2776
  204: {
1801
2777
  headers: {
1802
2778
  [name: string]: unknown;
@@ -1810,7 +2786,7 @@ interface operations {
1810
2786
  query?: never;
1811
2787
  header?: never;
1812
2788
  path: {
1813
- workspaceSlug: string;
2789
+ workspace_slug: string;
1814
2790
  service: string;
1815
2791
  };
1816
2792
  cookie?: never;
@@ -1828,7 +2804,9 @@ interface operations {
1828
2804
  headers: {
1829
2805
  [name: string]: unknown;
1830
2806
  };
1831
- content?: never;
2807
+ content: {
2808
+ "application/json": components["schemas"]["WorkspaceServiceStateDto"];
2809
+ };
1832
2810
  };
1833
2811
  };
1834
2812
  };