@company-semantics/contracts 0.121.0 → 0.122.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.121.0",
3
+ "version": "0.122.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = 'd4f412a26098' as const;
3
- export const SPEC_HASH_FULL = 'd4f412a26098e42f4578da215bc71e3960ed6850e2482e8de7c1a38f785c2cf6' as const;
2
+ export const SPEC_HASH = '785191c09824' as const;
3
+ export const SPEC_HASH_FULL = '785191c09824d7a5a12b6a0a1f8b049487c2489bad21f66ca89d93a1e2f1e707' as const;
@@ -619,19 +619,9 @@ export interface paths {
619
619
  };
620
620
  get?: never;
621
621
  put?: never;
622
- /**
623
- * Initiate ownership transfer
624
- * @description Initiates an ownership transfer to a new owner by email.
625
- * Sends an email with a transfer acceptance link to the new owner.
626
- * Only the org owner can initiate transfers.
627
- * Rate limited: 5/hour per user.
628
- */
622
+ /** Initiate ownership transfer */
629
623
  post: operations["initiateOwnershipTransfer"];
630
- /**
631
- * Cancel ownership transfer
632
- * @description Cancels a pending ownership transfer.
633
- * Only the user who initiated the transfer can cancel it.
634
- */
624
+ /** Cancel ownership transfer */
635
625
  delete: operations["cancelOwnershipTransfer"];
636
626
  options?: never;
637
627
  head?: never;
@@ -645,11 +635,7 @@ export interface paths {
645
635
  path?: never;
646
636
  cookie?: never;
647
637
  };
648
- /**
649
- * Get ownership transfer status
650
- * @description Returns the status of any pending ownership transfer.
651
- * Only the org owner can view transfer status.
652
- */
638
+ /** Get ownership transfer status */
653
639
  get: operations["getOwnershipTransferStatus"];
654
640
  put?: never;
655
641
  post?: never;
@@ -668,13 +654,7 @@ export interface paths {
668
654
  };
669
655
  get?: never;
670
656
  put?: never;
671
- /**
672
- * Preview ownership transfer details
673
- * @description Returns transfer details for the acceptance page.
674
- * This endpoint does NOT require session auth - the token is the credential.
675
- * Token is passed in POST body (not URL) to prevent logging exposure.
676
- * Rate limited: 10/hour per IP.
677
- */
657
+ /** Preview ownership transfer details */
678
658
  post: operations["previewOwnershipTransfer"];
679
659
  delete?: never;
680
660
  options?: never;
@@ -691,12 +671,7 @@ export interface paths {
691
671
  };
692
672
  get?: never;
693
673
  put?: never;
694
- /**
695
- * Accept ownership transfer
696
- * @description Accepts an ownership transfer using the token from email.
697
- * Requires authenticated session with login freshness (15 minutes).
698
- * Rate limited: 10/hour per IP.
699
- */
674
+ /** Accept ownership transfer */
700
675
  post: operations["acceptOwnershipTransfer"];
701
676
  delete?: never;
702
677
  options?: never;
@@ -711,12 +686,7 @@ export interface paths {
711
686
  path?: never;
712
687
  cookie?: never;
713
688
  };
714
- /**
715
- * Get ITL-aware transfer eligibility
716
- * @description Returns ITL-aware transfer eligibility for the org and all members.
717
- * Used by the transfer ownership dialog to show eligibility indicators.
718
- * Only org owners may call this endpoint.
719
- */
689
+ /** Get ITL-aware transfer eligibility */
720
690
  get: operations["getTransferEligibility"];
721
691
  put?: never;
722
692
  post?: never;
@@ -733,12 +703,7 @@ export interface paths {
733
703
  path?: never;
734
704
  cookie?: never;
735
705
  };
736
- /**
737
- * Check org deletion eligibility
738
- * @description Check whether the current org is eligible for deletion and return
739
- * member classification (suggested fates for each member).
740
- * Only org owners may call this endpoint.
741
- */
706
+ /** Check org deletion eligibility */
742
707
  get: operations["orgDeletionEligibility"];
743
708
  put?: never;
744
709
  post?: never;
@@ -757,12 +722,7 @@ export interface paths {
757
722
  };
758
723
  get?: never;
759
724
  put?: never;
760
- /**
761
- * Request org deletion
762
- * @description Request deletion of the current org. Requires explicit list of user IDs
763
- * to cascade-delete. Non-listed members will be removed from org only.
764
- * Only org owners may call this endpoint.
765
- */
725
+ /** Request org deletion */
766
726
  post: operations["orgDelete"];
767
727
  delete?: never;
768
728
  options?: never;
@@ -779,13 +739,7 @@ export interface paths {
779
739
  };
780
740
  get?: never;
781
741
  put?: never;
782
- /**
783
- * Cancel pending org deletion
784
- * @description Cancel a pending org deletion during the 30-day grace period.
785
- * Restores org to active, re-activates memberships, and cancels
786
- * cascade-deleted users (if still pending and no independent intent).
787
- * Only org owners may call this endpoint.
788
- */
742
+ /** Cancel pending org deletion */
789
743
  post: operations["orgCancelDeletion"];
790
744
  delete?: never;
791
745
  options?: never;
@@ -1004,12 +958,7 @@ export interface paths {
1004
958
  path?: never;
1005
959
  cookie?: never;
1006
960
  };
1007
- /**
1008
- * Validate an invite token
1009
- * @description Validate an invite token without accepting it.
1010
- * Used by the frontend to preflight-check tokens on page load.
1011
- * No authentication required.
1012
- */
961
+ /** Validate an invite token */
1013
962
  get: operations["validateInviteToken"];
1014
963
  put?: never;
1015
964
  post?: never;
@@ -1026,19 +975,10 @@ export interface paths {
1026
975
  path?: never;
1027
976
  cookie?: never;
1028
977
  };
1029
- /**
1030
- * List pending invites
1031
- * @description List pending invites for the current organization.
1032
- * Requires org.view_workspace capability.
1033
- */
978
+ /** List pending invites */
1034
979
  get: operations["listPendingInvites"];
1035
980
  put?: never;
1036
- /**
1037
- * Create workspace invite
1038
- * @description Create a new organization invite.
1039
- * Requires org.invite_member capability.
1040
- * Invites expire after 7 days.
1041
- */
981
+ /** Create workspace invite */
1042
982
  post: operations["createInvite"];
1043
983
  delete?: never;
1044
984
  options?: never;
@@ -1055,11 +995,7 @@ export interface paths {
1055
995
  };
1056
996
  get?: never;
1057
997
  put?: never;
1058
- /**
1059
- * Accept workspace invite
1060
- * @description Accept an organization invite.
1061
- * First invite acceptance triggers personal to shared transition.
1062
- */
998
+ /** Accept workspace invite */
1063
999
  post: operations["acceptInvite"];
1064
1000
  delete?: never;
1065
1001
  options?: never;
@@ -1077,11 +1013,7 @@ export interface paths {
1077
1013
  get?: never;
1078
1014
  put?: never;
1079
1015
  post?: never;
1080
- /**
1081
- * Revoke pending invite
1082
- * @description Revoke a pending invite.
1083
- * Requires org.invite_member capability.
1084
- */
1016
+ /** Revoke pending invite */
1085
1017
  delete: operations["revokeInvite"];
1086
1018
  options?: never;
1087
1019
  head?: never;
@@ -1129,22 +1061,10 @@ export interface paths {
1129
1061
  path?: never;
1130
1062
  cookie?: never;
1131
1063
  };
1132
- /**
1133
- * List workspace domains
1134
- * @description List all domains claimed by the workspace.
1135
- * Returns domains with their verification status.
1136
- * Verification tokens are NOT included in response.
1137
- * Requires org.view_workspace capability.
1138
- */
1064
+ /** List workspace domains */
1139
1065
  get: operations["listDomains"];
1140
1066
  put?: never;
1141
- /**
1142
- * Claim a domain for verification
1143
- * @description Claim a domain for DNS verification.
1144
- * Creates a pending domain claim with DNS TXT record instructions.
1145
- * Only one org can have a verified claim on a domain (global uniqueness).
1146
- * Requires org.claim_domain capability (owner-only).
1147
- */
1067
+ /** Claim a domain for verification */
1148
1068
  post: operations["claimDomain"];
1149
1069
  delete?: never;
1150
1070
  options?: never;
@@ -1161,13 +1081,7 @@ export interface paths {
1161
1081
  };
1162
1082
  get?: never;
1163
1083
  put?: never;
1164
- /**
1165
- * Verify domain ownership
1166
- * @description Trigger DNS verification for a pending domain claim.
1167
- * Checks DNS TXT record for the verification token.
1168
- * On success, domain status changes to 'verified'.
1169
- * Requires org.claim_domain capability (owner-only).
1170
- */
1084
+ /** Trigger DNS verification for a domain */
1171
1085
  post: operations["verifyDomain"];
1172
1086
  delete?: never;
1173
1087
  options?: never;
@@ -1185,12 +1099,7 @@ export interface paths {
1185
1099
  get?: never;
1186
1100
  put?: never;
1187
1101
  post?: never;
1188
- /**
1189
- * Delete domain claim
1190
- * @description Delete a domain claim.
1191
- * Removes the domain record, allowing other orgs to claim it.
1192
- * Requires org.claim_domain capability (owner-only).
1193
- */
1102
+ /** Delete a domain claim */
1194
1103
  delete: operations["deleteDomain"];
1195
1104
  options?: never;
1196
1105
  head?: never;
@@ -1325,11 +1234,7 @@ export interface paths {
1325
1234
  path?: never;
1326
1235
  cookie?: never;
1327
1236
  };
1328
- /**
1329
- * Get organization billing information
1330
- * @description Read-only billing information for organization owners.
1331
- * Only org owners may view billing (BILL-ORG-1).
1332
- */
1237
+ /** Get organization billing information */
1333
1238
  get: operations["getBilling"];
1334
1239
  put?: never;
1335
1240
  post?: never;
@@ -2799,16 +2704,12 @@ export interface components {
2799
2704
  RelayState: string;
2800
2705
  };
2801
2706
  InitiateTransferRequest: {
2802
- /**
2803
- * Format: email
2804
- * @description Email of the new owner
2805
- */
2707
+ /** Format: email */
2806
2708
  newOwnerEmail: string;
2709
+ note?: string;
2807
2710
  };
2808
2711
  InitiateTransferResponse: {
2809
- /** Format: uuid */
2810
2712
  transferId: string;
2811
- /** Format: date-time */
2812
2713
  expiresAt: string;
2813
2714
  message: string;
2814
2715
  };
@@ -3023,26 +2924,35 @@ export interface components {
3023
2924
  selfRevoked?: boolean;
3024
2925
  };
3025
2926
  CreateInviteRequest: {
3026
- /**
3027
- * Format: email
3028
- * @description Email address of the invitee
3029
- */
2927
+ /** Format: email */
3030
2928
  email: string;
3031
- /**
3032
- * @description Role to assign
3033
- * @enum {string}
3034
- */
2929
+ /** @enum {string} */
3035
2930
  role: "admin" | "member";
3036
2931
  };
3037
2932
  CreateInviteResponse: {
3038
- invite: components["schemas"]["OrgInvite"];
2933
+ invite: {
2934
+ id: string;
2935
+ orgId: string;
2936
+ email: string;
2937
+ /** @enum {string} */
2938
+ role: "owner" | "admin" | "member" | "auditor";
2939
+ invitedBy: {
2940
+ id: string;
2941
+ name: string;
2942
+ };
2943
+ /** @enum {string} */
2944
+ status: "pending" | "accepted" | "expired" | "revoked";
2945
+ createdAt: string;
2946
+ expiresAt: string;
2947
+ acceptedAt?: string;
2948
+ };
3039
2949
  };
3040
2950
  AcceptInviteRequest: {
3041
- /** @description The invite acceptance token */
3042
2951
  token: string;
3043
2952
  };
3044
2953
  AcceptInviteResponse: {
3045
- success: boolean;
2954
+ /** @constant */
2955
+ success: true;
3046
2956
  /** Format: uuid */
3047
2957
  orgId: string;
3048
2958
  role: string;
@@ -3108,7 +3018,6 @@ export interface components {
3108
3018
  createdAt: string;
3109
3019
  };
3110
3020
  ClaimDomainRequest: {
3111
- /** @description The domain to claim (e.g., "example.com") */
3112
3021
  domain: string;
3113
3022
  };
3114
3023
  DnsInstructions: {
@@ -3120,8 +3029,21 @@ export interface components {
3120
3029
  value: string;
3121
3030
  };
3122
3031
  ClaimDomainResponse: {
3123
- domain: components["schemas"]["OrgDomain"];
3124
- dnsInstructions: components["schemas"]["DnsInstructions"];
3032
+ id: string;
3033
+ orgId: string;
3034
+ domain: string;
3035
+ /** @enum {string} */
3036
+ status: "pending" | "verified";
3037
+ /** @enum {string} */
3038
+ verificationMethod: "dns_txt" | "email" | "idp";
3039
+ verificationToken?: string;
3040
+ verifiedAt: string | null;
3041
+ createdAt: string;
3042
+ verifiedBy?: {
3043
+ id: string;
3044
+ name: string;
3045
+ email: string;
3046
+ };
3125
3047
  };
3126
3048
  RevokeDomainResponse: {
3127
3049
  /** @constant */
@@ -3306,9 +3228,7 @@ export interface components {
3306
3228
  };
3307
3229
  InviteValidationResult: {
3308
3230
  valid: boolean;
3309
- /** @description Invite status (e.g. pending, accepted, expired, revoked) */
3310
3231
  status: string;
3311
- /** @description Organization name (present when invite is valid) */
3312
3232
  orgName?: string;
3313
3233
  };
3314
3234
  LogoutResponse: {
@@ -3555,6 +3475,96 @@ export interface components {
3555
3475
  /** @enum {string} */
3556
3476
  errorCode?: "IDENTITY_CONFLICT" | "DOMAIN_MISMATCH" | "ISSUER_MISMATCH" | "CALLBACK_ERROR";
3557
3477
  };
3478
+ InviteListResponse: {
3479
+ id: string;
3480
+ orgId: string;
3481
+ email: string;
3482
+ /** @enum {string} */
3483
+ role: "owner" | "admin" | "member" | "auditor";
3484
+ invitedBy: {
3485
+ id: string;
3486
+ name: string;
3487
+ };
3488
+ /** @enum {string} */
3489
+ status: "pending" | "accepted" | "expired" | "revoked";
3490
+ createdAt: string;
3491
+ expiresAt: string;
3492
+ acceptedAt?: string;
3493
+ }[];
3494
+ DomainListResponse: {
3495
+ id: string;
3496
+ orgId: string;
3497
+ domain: string;
3498
+ /** @enum {string} */
3499
+ status: "pending" | "verified";
3500
+ /** @enum {string} */
3501
+ verificationMethod: "dns_txt" | "email" | "idp";
3502
+ verificationToken?: string;
3503
+ verifiedAt: string | null;
3504
+ createdAt: string;
3505
+ verifiedBy?: {
3506
+ id: string;
3507
+ name: string;
3508
+ email: string;
3509
+ };
3510
+ }[];
3511
+ VerifyDomainResponse: {
3512
+ id: string;
3513
+ orgId: string;
3514
+ domain: string;
3515
+ /** @enum {string} */
3516
+ status: "pending" | "verified";
3517
+ /** @enum {string} */
3518
+ verificationMethod: "dns_txt" | "email" | "idp";
3519
+ verificationToken?: string;
3520
+ verifiedAt: string | null;
3521
+ createdAt: string;
3522
+ verifiedBy?: {
3523
+ id: string;
3524
+ name: string;
3525
+ email: string;
3526
+ };
3527
+ };
3528
+ OrgBillingResponse: {
3529
+ planName: string;
3530
+ /** @enum {string} */
3531
+ planStatus: "active" | "trialing" | "past_due" | "canceled";
3532
+ billingCadence: string;
3533
+ seatCount: number;
3534
+ seatLimit: number;
3535
+ billingOwnerUserId: string;
3536
+ };
3537
+ OrgDeletionStatus: {
3538
+ orgId: string;
3539
+ eligible: boolean;
3540
+ isPersonalOrg: boolean;
3541
+ ownerStatus?: string;
3542
+ deletionRequestedAt?: string;
3543
+ classifications: {
3544
+ userId: string;
3545
+ email: string;
3546
+ /** @enum {string} */
3547
+ suggestedFate: "REMOVE_FROM_ORG" | "DELETE_ACCOUNT" | "BLOCKED";
3548
+ reason: string;
3549
+ }[];
3550
+ };
3551
+ OrgDeleteRequest: {
3552
+ userIdsToDelete: string[];
3553
+ };
3554
+ AcceptTransferRequest: {
3555
+ token: string;
3556
+ };
3557
+ OwnershipTransferPreview: {
3558
+ workspaceName: string;
3559
+ initiatorName: string;
3560
+ initiatorEmail: string;
3561
+ note?: string;
3562
+ expiresAt: string;
3563
+ token: string;
3564
+ };
3565
+ PreviewTransferRequest: {
3566
+ token: string;
3567
+ };
3558
3568
  };
3559
3569
  responses: never;
3560
3570
  parameters: never;
@@ -4703,42 +4713,6 @@ export interface operations {
4703
4713
  "application/json": components["schemas"]["InitiateTransferResponse"];
4704
4714
  };
4705
4715
  };
4706
- /** @description Validation error or self-transfer attempt */
4707
- 400: {
4708
- headers: {
4709
- [name: string]: unknown;
4710
- };
4711
- content: {
4712
- "application/json": components["schemas"]["ErrorResponse"];
4713
- };
4714
- };
4715
- /** @description Not the organization owner */
4716
- 403: {
4717
- headers: {
4718
- [name: string]: unknown;
4719
- };
4720
- content: {
4721
- "application/json": components["schemas"]["ErrorResponse"];
4722
- };
4723
- };
4724
- /** @description Transfer already pending or target ineligible */
4725
- 409: {
4726
- headers: {
4727
- [name: string]: unknown;
4728
- };
4729
- content: {
4730
- "application/json": components["schemas"]["ErrorResponse"];
4731
- };
4732
- };
4733
- /** @description Rate limit exceeded */
4734
- 429: {
4735
- headers: {
4736
- [name: string]: unknown;
4737
- };
4738
- content: {
4739
- "application/json": components["schemas"]["ErrorResponse"];
4740
- };
4741
- };
4742
4716
  };
4743
4717
  };
4744
4718
  cancelOwnershipTransfer: {
@@ -4755,27 +4729,7 @@ export interface operations {
4755
4729
  headers: {
4756
4730
  [name: string]: unknown;
4757
4731
  };
4758
- content: {
4759
- "application/json": components["schemas"]["OkResponse"];
4760
- };
4761
- };
4762
- /** @description Not the organization owner */
4763
- 403: {
4764
- headers: {
4765
- [name: string]: unknown;
4766
- };
4767
- content: {
4768
- "application/json": components["schemas"]["ErrorResponse"];
4769
- };
4770
- };
4771
- /** @description No pending transfer found */
4772
- 404: {
4773
- headers: {
4774
- [name: string]: unknown;
4775
- };
4776
- content: {
4777
- "application/json": components["schemas"]["ErrorResponse"];
4778
- };
4732
+ content?: never;
4779
4733
  };
4780
4734
  };
4781
4735
  };
@@ -4793,22 +4747,35 @@ export interface operations {
4793
4747
  headers: {
4794
4748
  [name: string]: unknown;
4795
4749
  };
4796
- content: {
4797
- "application/json": components["schemas"]["TransferStatusResponse"];
4798
- };
4750
+ content?: never;
4799
4751
  };
4800
- /** @description Not the organization owner */
4801
- 403: {
4752
+ };
4753
+ };
4754
+ previewOwnershipTransfer: {
4755
+ parameters: {
4756
+ query?: never;
4757
+ header?: never;
4758
+ path?: never;
4759
+ cookie?: never;
4760
+ };
4761
+ requestBody: {
4762
+ content: {
4763
+ "application/json": components["schemas"]["PreviewTransferRequest"];
4764
+ };
4765
+ };
4766
+ responses: {
4767
+ /** @description Transfer preview details */
4768
+ 200: {
4802
4769
  headers: {
4803
4770
  [name: string]: unknown;
4804
4771
  };
4805
4772
  content: {
4806
- "application/json": components["schemas"]["ErrorResponse"];
4773
+ "application/json": components["schemas"]["OwnershipTransferPreview"];
4807
4774
  };
4808
4775
  };
4809
4776
  };
4810
4777
  };
4811
- previewOwnershipTransfer: {
4778
+ acceptOwnershipTransfer: {
4812
4779
  parameters: {
4813
4780
  query?: never;
4814
4781
  header?: never;
@@ -4817,40 +4784,58 @@ export interface operations {
4817
4784
  };
4818
4785
  requestBody: {
4819
4786
  content: {
4820
- "application/json": components["schemas"]["AcceptTransferBody"];
4787
+ "application/json": components["schemas"]["AcceptTransferRequest"];
4821
4788
  };
4822
4789
  };
4823
4790
  responses: {
4824
- /** @description Transfer preview details */
4791
+ /** @description Ownership transferred */
4825
4792
  200: {
4826
4793
  headers: {
4827
4794
  [name: string]: unknown;
4828
4795
  };
4829
- content: {
4830
- "application/json": components["schemas"]["TransferAcceptanceView"];
4831
- };
4796
+ content?: never;
4832
4797
  };
4833
- /** @description Transfer not found or token is invalid */
4834
- 404: {
4798
+ };
4799
+ };
4800
+ getTransferEligibility: {
4801
+ parameters: {
4802
+ query?: never;
4803
+ header?: never;
4804
+ path?: never;
4805
+ cookie?: never;
4806
+ };
4807
+ requestBody?: never;
4808
+ responses: {
4809
+ /** @description Transfer eligibility result with per-member eligibility */
4810
+ 200: {
4835
4811
  headers: {
4836
4812
  [name: string]: unknown;
4837
4813
  };
4838
- content: {
4839
- "application/json": components["schemas"]["ErrorResponse"];
4840
- };
4814
+ content?: never;
4841
4815
  };
4842
- /** @description Rate limit exceeded */
4843
- 429: {
4816
+ };
4817
+ };
4818
+ orgDeletionEligibility: {
4819
+ parameters: {
4820
+ query?: never;
4821
+ header?: never;
4822
+ path?: never;
4823
+ cookie?: never;
4824
+ };
4825
+ requestBody?: never;
4826
+ responses: {
4827
+ /** @description Eligibility check result with member classifications */
4828
+ 200: {
4844
4829
  headers: {
4845
4830
  [name: string]: unknown;
4846
4831
  };
4847
4832
  content: {
4848
- "application/json": components["schemas"]["ErrorResponse"];
4833
+ "application/json": components["schemas"]["OrgDeletionStatus"];
4849
4834
  };
4850
4835
  };
4851
4836
  };
4852
4837
  };
4853
- acceptOwnershipTransfer: {
4838
+ orgDelete: {
4854
4839
  parameters: {
4855
4840
  query?: never;
4856
4841
  header?: never;
@@ -4859,188 +4844,16 @@ export interface operations {
4859
4844
  };
4860
4845
  requestBody: {
4861
4846
  content: {
4862
- "application/json": components["schemas"]["AcceptTransferBody"];
4847
+ "application/json": components["schemas"]["OrgDeleteRequest"];
4863
4848
  };
4864
4849
  };
4865
4850
  responses: {
4866
- /** @description Transfer accepted, ownership transferred */
4851
+ /** @description Org deletion initiated, confirmation email sent */
4867
4852
  200: {
4868
4853
  headers: {
4869
4854
  [name: string]: unknown;
4870
4855
  };
4871
- content: {
4872
- "application/json": components["schemas"]["AcceptTransferResponse"];
4873
- };
4874
- };
4875
- /** @description Invalid or missing token */
4876
- 400: {
4877
- headers: {
4878
- [name: string]: unknown;
4879
- };
4880
- content: {
4881
- "application/json": components["schemas"]["ErrorResponse"];
4882
- };
4883
- };
4884
- /** @description Session too old — re-authentication required */
4885
- 403: {
4886
- headers: {
4887
- [name: string]: unknown;
4888
- };
4889
- content: {
4890
- "application/json": components["schemas"]["ErrorResponse"];
4891
- };
4892
- };
4893
- /** @description Transfer not found */
4894
- 404: {
4895
- headers: {
4896
- [name: string]: unknown;
4897
- };
4898
- content: {
4899
- "application/json": components["schemas"]["ErrorResponse"];
4900
- };
4901
- };
4902
- /** @description Transfer expired */
4903
- 410: {
4904
- headers: {
4905
- [name: string]: unknown;
4906
- };
4907
- content: {
4908
- "application/json": components["schemas"]["ErrorResponse"];
4909
- };
4910
- };
4911
- /** @description Rate limit exceeded */
4912
- 429: {
4913
- headers: {
4914
- [name: string]: unknown;
4915
- };
4916
- content: {
4917
- "application/json": components["schemas"]["ErrorResponse"];
4918
- };
4919
- };
4920
- };
4921
- };
4922
- getTransferEligibility: {
4923
- parameters: {
4924
- query?: never;
4925
- header?: never;
4926
- path?: never;
4927
- cookie?: never;
4928
- };
4929
- requestBody?: never;
4930
- responses: {
4931
- /** @description Transfer eligibility result with per-member eligibility */
4932
- 200: {
4933
- headers: {
4934
- [name: string]: unknown;
4935
- };
4936
- content: {
4937
- "application/json": {
4938
- eligibility: components["schemas"]["TransferEligibilityResult"];
4939
- members: components["schemas"]["TransferMemberEligibility"][];
4940
- };
4941
- };
4942
- };
4943
- /** @description Not an org owner */
4944
- 403: {
4945
- headers: {
4946
- [name: string]: unknown;
4947
- };
4948
- content: {
4949
- "application/json": components["schemas"]["ErrorResponse"];
4950
- };
4951
- };
4952
- };
4953
- };
4954
- orgDeletionEligibility: {
4955
- parameters: {
4956
- query?: never;
4957
- header?: never;
4958
- path?: never;
4959
- cookie?: never;
4960
- };
4961
- requestBody?: never;
4962
- responses: {
4963
- /** @description Eligibility check result with member classifications */
4964
- 200: {
4965
- headers: {
4966
- [name: string]: unknown;
4967
- };
4968
- content: {
4969
- "application/json": {
4970
- orgId: string;
4971
- eligible: boolean;
4972
- isPersonalOrg: boolean;
4973
- ownerStatus?: string;
4974
- classifications: Record<string, never>[];
4975
- };
4976
- };
4977
- };
4978
- /** @description Not authenticated */
4979
- 401: {
4980
- headers: {
4981
- [name: string]: unknown;
4982
- };
4983
- content: {
4984
- "application/json": components["schemas"]["ErrorResponse"];
4985
- };
4986
- };
4987
- /** @description Organization not found */
4988
- 404: {
4989
- headers: {
4990
- [name: string]: unknown;
4991
- };
4992
- content: {
4993
- "application/json": components["schemas"]["ErrorResponse"];
4994
- };
4995
- };
4996
- };
4997
- };
4998
- orgDelete: {
4999
- parameters: {
5000
- query?: never;
5001
- header?: never;
5002
- path?: never;
5003
- cookie?: never;
5004
- };
5005
- requestBody: {
5006
- content: {
5007
- "application/json": {
5008
- userIdsToDelete: string[];
5009
- };
5010
- };
5011
- };
5012
- responses: {
5013
- /** @description Org deletion initiated */
5014
- 200: {
5015
- headers: {
5016
- [name: string]: unknown;
5017
- };
5018
- content: {
5019
- "application/json": {
5020
- /** @constant */
5021
- status: "pending_deletion";
5022
- correlationId: string;
5023
- deletionKind: string;
5024
- };
5025
- };
5026
- };
5027
- /** @description Invalid request body */
5028
- 400: {
5029
- headers: {
5030
- [name: string]: unknown;
5031
- };
5032
- content: {
5033
- "application/json": components["schemas"]["ErrorResponse"];
5034
- };
5035
- };
5036
- /** @description Not authenticated */
5037
- 401: {
5038
- headers: {
5039
- [name: string]: unknown;
5040
- };
5041
- content: {
5042
- "application/json": components["schemas"]["ErrorResponse"];
5043
- };
4856
+ content?: never;
5044
4857
  };
5045
4858
  };
5046
4859
  };
@@ -5058,21 +4871,7 @@ export interface operations {
5058
4871
  headers: {
5059
4872
  [name: string]: unknown;
5060
4873
  };
5061
- content: {
5062
- "application/json": {
5063
- /** @constant */
5064
- status: "active";
5065
- };
5066
- };
5067
- };
5068
- /** @description Not authenticated */
5069
- 401: {
5070
- headers: {
5071
- [name: string]: unknown;
5072
- };
5073
- content: {
5074
- "application/json": components["schemas"]["ErrorResponse"];
5075
- };
4874
+ content?: never;
5076
4875
  };
5077
4876
  };
5078
4877
  };
@@ -5371,7 +5170,6 @@ export interface operations {
5371
5170
  validateInviteToken: {
5372
5171
  parameters: {
5373
5172
  query: {
5374
- /** @description Invite acceptance token */
5375
5173
  token: string;
5376
5174
  };
5377
5175
  header?: never;
@@ -5389,15 +5187,6 @@ export interface operations {
5389
5187
  "application/json": components["schemas"]["InviteValidationResult"];
5390
5188
  };
5391
5189
  };
5392
- /** @description Missing token parameter */
5393
- 400: {
5394
- headers: {
5395
- [name: string]: unknown;
5396
- };
5397
- content: {
5398
- "application/json": components["schemas"]["ErrorResponse"];
5399
- };
5400
- };
5401
5190
  };
5402
5191
  };
5403
5192
  listPendingInvites: {
@@ -5415,16 +5204,7 @@ export interface operations {
5415
5204
  [name: string]: unknown;
5416
5205
  };
5417
5206
  content: {
5418
- "application/json": components["schemas"]["OrgInvite"][];
5419
- };
5420
- };
5421
- /** @description No view capability */
5422
- 403: {
5423
- headers: {
5424
- [name: string]: unknown;
5425
- };
5426
- content: {
5427
- "application/json": components["schemas"]["ErrorResponse"];
5207
+ "application/json": components["schemas"]["InviteListResponse"];
5428
5208
  };
5429
5209
  };
5430
5210
  };
@@ -5451,33 +5231,6 @@ export interface operations {
5451
5231
  "application/json": components["schemas"]["CreateInviteResponse"];
5452
5232
  };
5453
5233
  };
5454
- /** @description Invalid input */
5455
- 400: {
5456
- headers: {
5457
- [name: string]: unknown;
5458
- };
5459
- content: {
5460
- "application/json": components["schemas"]["ErrorResponse"];
5461
- };
5462
- };
5463
- /** @description No invite capability */
5464
- 403: {
5465
- headers: {
5466
- [name: string]: unknown;
5467
- };
5468
- content: {
5469
- "application/json": components["schemas"]["ErrorResponse"];
5470
- };
5471
- };
5472
- /** @description Duplicate invite or already member */
5473
- 409: {
5474
- headers: {
5475
- [name: string]: unknown;
5476
- };
5477
- content: {
5478
- "application/json": components["schemas"]["ErrorResponse"];
5479
- };
5480
- };
5481
5234
  };
5482
5235
  };
5483
5236
  acceptInvite: {
@@ -5502,43 +5255,13 @@ export interface operations {
5502
5255
  "application/json": components["schemas"]["AcceptInviteResponse"];
5503
5256
  };
5504
5257
  };
5505
- /** @description Invite not found */
5506
- 404: {
5507
- headers: {
5508
- [name: string]: unknown;
5509
- };
5510
- content: {
5511
- "application/json": components["schemas"]["ErrorResponse"];
5512
- };
5513
- };
5514
- /** @description Invite already processed */
5515
- 409: {
5516
- headers: {
5517
- [name: string]: unknown;
5518
- };
5519
- content: {
5520
- "application/json": components["schemas"]["ErrorResponse"];
5521
- };
5522
- };
5523
- /** @description Invite expired */
5524
- 410: {
5525
- headers: {
5526
- [name: string]: unknown;
5527
- };
5528
- content: {
5529
- "application/json": components["schemas"]["ErrorResponse"];
5530
- };
5531
- };
5532
5258
  };
5533
5259
  };
5534
5260
  revokeInvite: {
5535
5261
  parameters: {
5536
5262
  query?: never;
5537
5263
  header?: never;
5538
- path: {
5539
- /** @description Invite ID */
5540
- id: string;
5541
- };
5264
+ path?: never;
5542
5265
  cookie?: never;
5543
5266
  };
5544
5267
  requestBody?: never;
@@ -5550,33 +5273,6 @@ export interface operations {
5550
5273
  };
5551
5274
  content?: never;
5552
5275
  };
5553
- /** @description No invite capability */
5554
- 403: {
5555
- headers: {
5556
- [name: string]: unknown;
5557
- };
5558
- content: {
5559
- "application/json": components["schemas"]["ErrorResponse"];
5560
- };
5561
- };
5562
- /** @description Invite not found */
5563
- 404: {
5564
- headers: {
5565
- [name: string]: unknown;
5566
- };
5567
- content: {
5568
- "application/json": components["schemas"]["ErrorResponse"];
5569
- };
5570
- };
5571
- /** @description Invite already processed */
5572
- 409: {
5573
- headers: {
5574
- [name: string]: unknown;
5575
- };
5576
- content: {
5577
- "application/json": components["schemas"]["ErrorResponse"];
5578
- };
5579
- };
5580
5276
  };
5581
5277
  };
5582
5278
  removeMember: {
@@ -5638,16 +5334,7 @@ export interface operations {
5638
5334
  [name: string]: unknown;
5639
5335
  };
5640
5336
  content: {
5641
- "application/json": components["schemas"]["OrgDomain"][];
5642
- };
5643
- };
5644
- /** @description No org.view_workspace capability */
5645
- 403: {
5646
- headers: {
5647
- [name: string]: unknown;
5648
- };
5649
- content: {
5650
- "application/json": components["schemas"]["ErrorResponse"];
5337
+ "application/json": components["schemas"]["DomainListResponse"];
5651
5338
  };
5652
5339
  };
5653
5340
  };
@@ -5665,7 +5352,7 @@ export interface operations {
5665
5352
  };
5666
5353
  };
5667
5354
  responses: {
5668
- /** @description Domain claimed, DNS instructions returned */
5355
+ /** @description Domain claimed */
5669
5356
  201: {
5670
5357
  headers: {
5671
5358
  [name: string]: unknown;
@@ -5674,90 +5361,24 @@ export interface operations {
5674
5361
  "application/json": components["schemas"]["ClaimDomainResponse"];
5675
5362
  };
5676
5363
  };
5677
- /** @description Invalid domain format */
5678
- 400: {
5679
- headers: {
5680
- [name: string]: unknown;
5681
- };
5682
- content: {
5683
- "application/json": components["schemas"]["ErrorResponse"];
5684
- };
5685
- };
5686
- /** @description No org.claim_domain capability */
5687
- 403: {
5688
- headers: {
5689
- [name: string]: unknown;
5690
- };
5691
- content: {
5692
- "application/json": components["schemas"]["ErrorResponse"];
5693
- };
5694
- };
5695
- /** @description Domain already claimed by this org or verified by another */
5696
- 409: {
5697
- headers: {
5698
- [name: string]: unknown;
5699
- };
5700
- content: {
5701
- "application/json": components["schemas"]["ErrorResponse"];
5702
- };
5703
- };
5704
5364
  };
5705
5365
  };
5706
5366
  verifyDomain: {
5707
5367
  parameters: {
5708
5368
  query?: never;
5709
5369
  header?: never;
5710
- path: {
5711
- /** @description Domain claim ID */
5712
- id: string;
5713
- };
5370
+ path?: never;
5714
5371
  cookie?: never;
5715
5372
  };
5716
5373
  requestBody?: never;
5717
5374
  responses: {
5718
- /** @description Domain verified successfully */
5375
+ /** @description Domain verification result */
5719
5376
  200: {
5720
5377
  headers: {
5721
5378
  [name: string]: unknown;
5722
5379
  };
5723
5380
  content: {
5724
- "application/json": components["schemas"]["OrgDomain"];
5725
- };
5726
- };
5727
- /** @description Domain not pending, DNS lookup failed, or token mismatch */
5728
- 400: {
5729
- headers: {
5730
- [name: string]: unknown;
5731
- };
5732
- content: {
5733
- "application/json": components["schemas"]["ErrorResponse"];
5734
- };
5735
- };
5736
- /** @description No org.claim_domain capability */
5737
- 403: {
5738
- headers: {
5739
- [name: string]: unknown;
5740
- };
5741
- content: {
5742
- "application/json": components["schemas"]["ErrorResponse"];
5743
- };
5744
- };
5745
- /** @description Domain not found */
5746
- 404: {
5747
- headers: {
5748
- [name: string]: unknown;
5749
- };
5750
- content: {
5751
- "application/json": components["schemas"]["ErrorResponse"];
5752
- };
5753
- };
5754
- /** @description Another org verified this domain (race condition) */
5755
- 409: {
5756
- headers: {
5757
- [name: string]: unknown;
5758
- };
5759
- content: {
5760
- "application/json": components["schemas"]["ErrorResponse"];
5381
+ "application/json": components["schemas"]["VerifyDomainResponse"];
5761
5382
  };
5762
5383
  };
5763
5384
  };
@@ -5766,49 +5387,17 @@ export interface operations {
5766
5387
  parameters: {
5767
5388
  query?: never;
5768
5389
  header?: never;
5769
- path: {
5770
- /** @description Domain claim ID */
5771
- id: string;
5772
- };
5390
+ path?: never;
5773
5391
  cookie?: never;
5774
5392
  };
5775
5393
  requestBody?: never;
5776
5394
  responses: {
5777
- /** @description Domain claim revoked */
5395
+ /** @description Domain deleted */
5778
5396
  200: {
5779
5397
  headers: {
5780
5398
  [name: string]: unknown;
5781
5399
  };
5782
- content: {
5783
- "application/json": components["schemas"]["RevokeDomainResponse"];
5784
- };
5785
- };
5786
- /** @description Domain already revoked */
5787
- 400: {
5788
- headers: {
5789
- [name: string]: unknown;
5790
- };
5791
- content: {
5792
- "application/json": components["schemas"]["ErrorResponse"];
5793
- };
5794
- };
5795
- /** @description No org.claim_domain capability */
5796
- 403: {
5797
- headers: {
5798
- [name: string]: unknown;
5799
- };
5800
- content: {
5801
- "application/json": components["schemas"]["ErrorResponse"];
5802
- };
5803
- };
5804
- /** @description Domain not found */
5805
- 404: {
5806
- headers: {
5807
- [name: string]: unknown;
5808
- };
5809
- content: {
5810
- "application/json": components["schemas"]["ErrorResponse"];
5811
- };
5400
+ content?: never;
5812
5401
  };
5813
5402
  };
5814
5403
  };
@@ -6024,10 +5613,7 @@ export interface operations {
6024
5613
  parameters: {
6025
5614
  query?: never;
6026
5615
  header?: never;
6027
- path: {
6028
- /** @description Organization ID */
6029
- orgId: string;
6030
- };
5616
+ path?: never;
6031
5617
  cookie?: never;
6032
5618
  };
6033
5619
  requestBody?: never;
@@ -6038,25 +5624,7 @@ export interface operations {
6038
5624
  [name: string]: unknown;
6039
5625
  };
6040
5626
  content: {
6041
- "application/json": {
6042
- planName: string;
6043
- /** @enum {string} */
6044
- planStatus: "active" | "trialing" | "past_due" | "canceled";
6045
- billingCadence: string;
6046
- seatCount: number;
6047
- seatLimit: number;
6048
- /** Format: uuid */
6049
- billingOwnerUserId: string;
6050
- };
6051
- };
6052
- };
6053
- /** @description Not an org owner */
6054
- 403: {
6055
- headers: {
6056
- [name: string]: unknown;
6057
- };
6058
- content: {
6059
- "application/json": components["schemas"]["ErrorResponse"];
5627
+ "application/json": components["schemas"]["OrgBillingResponse"];
6060
5628
  };
6061
5629
  };
6062
5630
  };
@@ -145,3 +145,25 @@ export type {
145
145
  TimelineIcon,
146
146
  TimelineUIEvent,
147
147
  } from './timeline-ui'
148
+
149
+ // =============================================================================
150
+ // HTTP Response Schemas (Zod)
151
+ // =============================================================================
152
+
153
+ export {
154
+ ExecutionSummarySchema,
155
+ ExecutionListResponseSchema,
156
+ TimelineEventSchema,
157
+ ExecutionTimelineResponseSchema,
158
+ ConfirmExecutionResponseSchema,
159
+ RejectExecutionResponseSchema,
160
+ } from './schemas'
161
+
162
+ export type {
163
+ ExecutionSummaryResponse,
164
+ ExecutionListResponse,
165
+ TimelineEvent,
166
+ ExecutionTimelineResponse,
167
+ ConfirmExecutionResponse,
168
+ RejectExecutionResponse,
169
+ } from './schemas'
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Execution Response Schemas
3
+ *
4
+ * Zod schemas for execution HTTP endpoint responses.
5
+ * These schemas are used for runtime validation at API contract surfaces.
6
+ *
7
+ * @see ADR-CONT-029 for design rationale
8
+ */
9
+
10
+ import { z } from 'zod'
11
+
12
+ // =============================================================================
13
+ // Execution Summary
14
+ // =============================================================================
15
+
16
+ export const ExecutionSummarySchema = z.object({
17
+ executionId: z.string().uuid(),
18
+ kind: z.string(),
19
+ status: z.enum(['pending', 'succeeded', 'failed']),
20
+ decidedAt: z.string().datetime({ offset: true }),
21
+ completedAt: z.string().datetime({ offset: true }).optional(),
22
+ target: z.object({ type: z.string() }),
23
+ })
24
+
25
+ export type ExecutionSummaryResponse = z.infer<typeof ExecutionSummarySchema>
26
+
27
+ // =============================================================================
28
+ // Execution List Response
29
+ // =============================================================================
30
+
31
+ export const ExecutionListResponseSchema = z.object({
32
+ executions: z.array(ExecutionSummarySchema),
33
+ nextCursor: z.string().nullable().optional(),
34
+ hasMore: z.boolean().optional(),
35
+ })
36
+
37
+ export type ExecutionListResponse = z.infer<typeof ExecutionListResponseSchema>
38
+
39
+ // =============================================================================
40
+ // Timeline Event
41
+ // =============================================================================
42
+
43
+ const TimelineRelatedIdsSchema = z.object({
44
+ decisionId: z.string().optional(),
45
+ artifactId: z.string().optional(),
46
+ rollbackId: z.string().optional(),
47
+ provenanceIds: z.array(z.string()).optional(),
48
+ })
49
+
50
+ export const TimelineEventSchema = z.object({
51
+ eventId: z.string(),
52
+ executionId: z.string().uuid(),
53
+ timestamp: z.string(),
54
+ createdAt: z.string(),
55
+ kind: z.string(),
56
+ summary: z.string(),
57
+ details: z.record(z.string(), z.unknown()).optional(),
58
+ relatedIds: TimelineRelatedIdsSchema.optional(),
59
+ visibilityLevel: z.enum(['system', 'oversight', 'org_admin', 'user']),
60
+ })
61
+
62
+ export type TimelineEvent = z.infer<typeof TimelineEventSchema>
63
+
64
+ // =============================================================================
65
+ // Execution Timeline Response
66
+ // =============================================================================
67
+
68
+ export const ExecutionTimelineResponseSchema = z.object({
69
+ events: z.array(TimelineEventSchema),
70
+ })
71
+
72
+ export type ExecutionTimelineResponse = z.infer<typeof ExecutionTimelineResponseSchema>
73
+
74
+ // =============================================================================
75
+ // Execution Lifecycle Responses
76
+ // =============================================================================
77
+
78
+ export const ConfirmExecutionResponseSchema = z.object({
79
+ status: z.enum([
80
+ 'executing',
81
+ 'blocked_pending_approval',
82
+ 'already_confirmed',
83
+ 'awaiting_approval',
84
+ ]),
85
+ code: z.string().optional(),
86
+ executionId: z.string().optional(),
87
+ })
88
+
89
+ export type ConfirmExecutionResponse = z.infer<typeof ConfirmExecutionResponseSchema>
90
+
91
+ export const RejectExecutionResponseSchema = z.object({
92
+ status: z.literal('cancelled'),
93
+ })
94
+
95
+ export type RejectExecutionResponse = z.infer<typeof RejectExecutionResponseSchema>