@xemahq/authorization-internal-api-client 0.4.19 → 0.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/endpoints/agents/agents.d.ts +7 -1
  2. package/dist/endpoints/agents/agents.js +18 -1
  3. package/dist/endpoints/capability-authority-requests/capability-authority-requests.d.ts +24 -0
  4. package/dist/endpoints/capability-authority-requests/capability-authority-requests.js +89 -0
  5. package/dist/endpoints/roles/roles.d.ts +1 -6
  6. package/dist/endpoints/roles/roles.js +1 -17
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +1 -0
  9. package/dist/models/addRoleGrantDto.d.ts +8 -2
  10. package/dist/models/addTeamMemberDto.d.ts +1 -0
  11. package/dist/models/agentReachTier.d.ts +1 -1
  12. package/dist/models/assignRoleDto.d.ts +9 -2
  13. package/dist/models/authorizationCheckRequestDto.d.ts +24 -6
  14. package/dist/models/authorizationDecisionCode.d.ts +1 -0
  15. package/dist/models/authorizationDecisionCode.js +1 -0
  16. package/dist/models/authorizationReasonDto.d.ts +1 -0
  17. package/dist/models/authorizationSuggestionDto.d.ts +11 -2
  18. package/dist/models/capabilityAuthorityRequestDto.d.ts +29 -0
  19. package/dist/models/capabilityAuthorityRequestDtoDataArrayEnvelope.d.ts +9 -0
  20. package/dist/models/capabilityAuthorityRequestDtoDataEnvelope.d.ts +9 -0
  21. package/dist/models/capabilityAuthorityRequestDtoDisposition.d.ts +14 -0
  22. package/dist/models/capabilityAuthorityRequestDtoDisposition.js +13 -0
  23. package/dist/models/capabilityAuthorityRequestDtoOutcome.d.ts +16 -0
  24. package/dist/models/capabilityAuthorityRequestDtoOutcome.js +15 -0
  25. package/dist/models/capabilityAuthorityRequestDtoRefusal.d.ts +14 -0
  26. package/dist/models/capabilityAuthorityRequestDtoRefusal.js +13 -0
  27. package/dist/models/{errorDetailsDtoDetails.d.ts → capabilityAuthorityRequestsControllerGetByIdParams.d.ts} +3 -6
  28. package/dist/models/capabilityAuthorityRequestsControllerListForSubjectParams.d.ts +10 -0
  29. package/dist/models/createExecutionEnvironmentDto.d.ts +9 -2
  30. package/dist/models/createGrantDto.d.ts +17 -4
  31. package/dist/models/createRoleDto.d.ts +3 -0
  32. package/dist/models/createTeamDto.d.ts +10 -2
  33. package/dist/models/environmentCeilingSource.d.ts +1 -1
  34. package/dist/models/environmentsControllerFindBySlugParams.d.ts +1 -0
  35. package/dist/models/environmentsControllerListParams.d.ts +1 -0
  36. package/dist/models/environmentsControllerRemoveParams.d.ts +1 -0
  37. package/dist/models/environmentsControllerUpdateParams.d.ts +1 -0
  38. package/dist/models/exactResourceAuthorityDto.d.ts +8 -2
  39. package/dist/models/exactResourceBindingDto.d.ts +8 -2
  40. package/dist/models/executionEnvironmentResponseDto.d.ts +1 -1
  41. package/dist/models/grantConstraintsDto.d.ts +6 -1
  42. package/dist/models/grantsControllerListParams.d.ts +10 -0
  43. package/dist/models/index.d.ts +15 -8
  44. package/dist/models/index.js +15 -8
  45. package/dist/models/listRegisteredResourcesDto.d.ts +4 -1
  46. package/dist/models/listVisibleResourcesDto.d.ts +8 -2
  47. package/dist/models/openCapabilityAuthorityRequestDto.d.ts +35 -0
  48. package/dist/models/openCapabilityAuthorityRequestDtoSubjectKind.d.ts +21 -0
  49. package/dist/models/openCapabilityAuthorityRequestDtoSubjectKind.js +20 -0
  50. package/dist/models/outputRouteAuthorityDto.d.ts +10 -2
  51. package/dist/models/outputRouteRevisionDto.d.ts +10 -2
  52. package/dist/models/policyActingAgentDto.d.ts +14 -0
  53. package/dist/models/policyActingAgentDtoKind.d.ts +9 -0
  54. package/dist/models/{orgRole.js → policyActingAgentDtoKind.js} +3 -5
  55. package/dist/models/policyActingForDto.d.ts +8 -0
  56. package/dist/models/policyBiomeDto.d.ts +2 -0
  57. package/dist/models/policyCallerDto.d.ts +4 -0
  58. package/dist/models/policyCapabilityDto.d.ts +5 -1
  59. package/dist/models/policyCheckRequestDto.d.ts +53 -3
  60. package/dist/models/policyDecisionDto.d.ts +8 -2
  61. package/dist/models/policyEnvironmentDto.d.ts +4 -1
  62. package/dist/models/policyObligationDto.d.ts +9 -2
  63. package/dist/models/policyResourceDto.d.ts +4 -1
  64. package/dist/models/policyRouteHintDto.d.ts +1 -0
  65. package/dist/models/policySpaceRefDto.d.ts +7 -0
  66. package/dist/models/policySubjectRefDto.d.ts +1 -0
  67. package/dist/models/previewOutputRouteImpactDto.d.ts +1 -0
  68. package/dist/models/problemDetailsDto.d.ts +24 -0
  69. package/dist/models/problemDetailsDto.js +2 -0
  70. package/dist/models/problemFieldIssueDto.d.ts +10 -0
  71. package/dist/models/problemFieldIssueDto.js +7 -0
  72. package/dist/models/provisionAgentRequestDto.d.ts +12 -3
  73. package/dist/models/provisionedCapabilityDto.d.ts +4 -1
  74. package/dist/models/recordAgentReachTierRequestDto.d.ts +21 -0
  75. package/dist/models/recordAgentReachTierRequestDto.js +2 -0
  76. package/dist/models/registerResourceOwnershipDto.d.ts +16 -4
  77. package/dist/models/registerResourceRevisionDto.d.ts +16 -4
  78. package/dist/models/registeredResourceRevisionDto.d.ts +8 -2
  79. package/dist/models/relationshipsControllerListParams.d.ts +4 -0
  80. package/dist/models/replaceResourceOwnershipDto.d.ts +8 -2
  81. package/dist/models/requestOutputRouteRetirementDto.d.ts +4 -1
  82. package/dist/models/requestOutputRouteRevisionReleaseDto.d.ts +14 -3
  83. package/dist/models/requestOutputRouteRollbackDto.d.ts +5 -1
  84. package/dist/models/resolveExactOutputRouteDto.d.ts +1 -0
  85. package/dist/models/resolveOutputRouteChannelDto.d.ts +1 -0
  86. package/dist/models/resourceShareRefDto.d.ts +8 -2
  87. package/dist/models/resourceSubjectRefDto.d.ts +4 -1
  88. package/dist/models/rolesControllerListParams.d.ts +3 -0
  89. package/dist/models/rollbackExecutionEnvironmentDto.d.ts +5 -2
  90. package/dist/models/subjectRefDto.d.ts +4 -1
  91. package/dist/models/teamsControllerListParams.d.ts +2 -0
  92. package/dist/models/updateExecutionEnvironmentDto.d.ts +1 -0
  93. package/dist/models/updateGrantDto.d.ts +5 -1
  94. package/dist/models/updateRoleDto.d.ts +1 -0
  95. package/dist/models/updateTeamDto.d.ts +1 -0
  96. package/dist/models/upsertCredentialDefaultDto.d.ts +16 -4
  97. package/package.json +26 -2
  98. package/dist/models/errorDetailsDto.d.ts +0 -10
  99. package/dist/models/errorPayloadDto.d.ts +0 -11
  100. package/dist/models/errorResponseDto.d.ts +0 -9
  101. package/dist/models/orgRole.d.ts +0 -14
  102. package/dist/models/orgRoleSyncDto.d.ts +0 -16
  103. package/dist/models/orgRoleSyncResultDto.d.ts +0 -9
  104. package/dist/models/orgRoleSyncResultDtoDataEnvelope.d.ts +0 -9
  105. /package/dist/models/{errorDetailsDto.js → capabilityAuthorityRequestDto.js} +0 -0
  106. /package/dist/models/{errorPayloadDto.js → capabilityAuthorityRequestDtoDataArrayEnvelope.js} +0 -0
  107. /package/dist/models/{errorResponseDto.js → capabilityAuthorityRequestDtoDataEnvelope.js} +0 -0
  108. /package/dist/models/{errorDetailsDtoDetails.js → capabilityAuthorityRequestsControllerGetByIdParams.js} +0 -0
  109. /package/dist/models/{orgRoleSyncResultDto.js → capabilityAuthorityRequestsControllerListForSubjectParams.js} +0 -0
  110. /package/dist/models/{orgRoleSyncDto.js → openCapabilityAuthorityRequestDto.js} +0 -0
  111. /package/dist/models/{orgRoleSyncResultDtoDataEnvelope.js → policyActingAgentDto.js} +0 -0
@@ -3,7 +3,13 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- import type { ProvisionAgentRequestDto, ProvisionAgentResultDtoDataEnvelope } from '../../models';
6
+ import type { ProvisionAgentRequestDto, ProvisionAgentResultDtoDataEnvelope, RecordAgentReachTierRequestDto } from '../../models';
7
+ export declare const getAgentsControllerRecordReachTierUrl: () => string;
8
+ /**
9
+ * Projects `(orgId, agentSlug) -> reachTier` into this service's own store, which is what the verdict path resolves an agent ceiling from. A `null` `orgId` declares a GLOBALLY-owned agent (system-seeded or biome-contributed) and is stored slug-keyed, applying in every org; an org row always wins over it. An OMITTED `orgId` is a 400, never read as global. Idempotent (upsert on the key), so a re-save, a retry and a concurrent save from another replica all converge. Writes NO grant — that is `POST /agents/provision`, and keeping the two apart is the point: a ceiling is a restriction, a grant is an authority, and fusing them put the restriction behind the grant feature flag.
10
+ * @summary Record an agent's DECLARED reach-tier ceiling
11
+ */
12
+ export declare const agentsControllerRecordReachTier: (recordAgentReachTierRequestDto: RecordAgentReachTierRequestDto, options?: RequestInit) => Promise<void>;
7
13
  export declare const getAgentsControllerProvisionUrl: () => string;
8
14
  /**
9
15
  * Auto-grants low/medium-risk, owner-held, non-approval-gated capabilities as full grants; writes everything else as approval-gated grants. Idempotent (each grant upserts on its natural tuple). Returns a summary for the Studio review UI.
@@ -1,7 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.agentsControllerProvision = exports.getAgentsControllerProvisionUrl = void 0;
3
+ exports.agentsControllerProvision = exports.getAgentsControllerProvisionUrl = exports.agentsControllerRecordReachTier = exports.getAgentsControllerRecordReachTierUrl = void 0;
4
4
  const custom_fetch_1 = require("../../custom-fetch");
5
+ const getAgentsControllerRecordReachTierUrl = () => {
6
+ return `/agents/reach-tier`;
7
+ };
8
+ exports.getAgentsControllerRecordReachTierUrl = getAgentsControllerRecordReachTierUrl;
9
+ /**
10
+ * Projects `(orgId, agentSlug) -> reachTier` into this service's own store, which is what the verdict path resolves an agent ceiling from. A `null` `orgId` declares a GLOBALLY-owned agent (system-seeded or biome-contributed) and is stored slug-keyed, applying in every org; an org row always wins over it. An OMITTED `orgId` is a 400, never read as global. Idempotent (upsert on the key), so a re-save, a retry and a concurrent save from another replica all converge. Writes NO grant — that is `POST /agents/provision`, and keeping the two apart is the point: a ceiling is a restriction, a grant is an authority, and fusing them put the restriction behind the grant feature flag.
11
+ * @summary Record an agent's DECLARED reach-tier ceiling
12
+ */
13
+ const agentsControllerRecordReachTier = async (recordAgentReachTierRequestDto, options) => {
14
+ return (0, custom_fetch_1.customFetch)((0, exports.getAgentsControllerRecordReachTierUrl)(), {
15
+ ...options,
16
+ method: 'PUT',
17
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
18
+ body: JSON.stringify(recordAgentReachTierRequestDto)
19
+ });
20
+ };
21
+ exports.agentsControllerRecordReachTier = agentsControllerRecordReachTier;
5
22
  const getAgentsControllerProvisionUrl = () => {
6
23
  return `/agents/provision`;
7
24
  };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ import type { CapabilityAuthorityRequestDtoDataArrayEnvelope, CapabilityAuthorityRequestDtoDataEnvelope, CapabilityAuthorityRequestsControllerGetByIdParams, CapabilityAuthorityRequestsControllerListForSubjectParams, OpenCapabilityAuthorityRequestDto } from '../../models';
7
+ export declare const getCapabilityAuthorityRequestsControllerOpenUrl: () => string;
8
+ /**
9
+ * The organisation policy answers immediately with one of three dispositions. `auto-allow` means the grant already exists by the time this returns and the runtime may retry its invocation. `decision-required` means a human has been asked and the runtime must poll or wait — it is NOT a denial. `refuse` is terminal and carries a machine-readable reason. A request for a capability the subject already holds is a 409 rather than a silent no-op, and a second live request for the same capability is a 409 rather than a second question in front of an administrator.
10
+ * @summary Request capability authority for an App or agent
11
+ */
12
+ export declare const capabilityAuthorityRequestsControllerOpen: (openCapabilityAuthorityRequestDto: OpenCapabilityAuthorityRequestDto, options?: RequestInit) => Promise<CapabilityAuthorityRequestDtoDataEnvelope>;
13
+ export declare const getCapabilityAuthorityRequestsControllerListForSubjectUrl: (params: CapabilityAuthorityRequestsControllerListForSubjectParams) => string;
14
+ /**
15
+ * The list a runtime reads to learn what happened to an ask it opened. Deliberately keyed on the SUBJECT rather than on the caller: the runtime relaying the request is not the subject of it, and a "requests I made" list would answer for the service instead of for the App.
16
+ * @summary One subject's own authority requests
17
+ */
18
+ export declare const capabilityAuthorityRequestsControllerListForSubject: (params: CapabilityAuthorityRequestsControllerListForSubjectParams, options?: RequestInit) => Promise<CapabilityAuthorityRequestDtoDataArrayEnvelope>;
19
+ export declare const getCapabilityAuthorityRequestsControllerGetByIdUrl: (id: string, params: CapabilityAuthorityRequestsControllerGetByIdParams) => string;
20
+ /**
21
+ * The live status of an ask. Read from THIS plane's row; the decision's own lifecycle is decision-api's to report, and this service does not mirror it — a settled ask cannot show as pending here because the row is written by the same handler that acts on the answer.
22
+ * @summary One authority request
23
+ */
24
+ export declare const capabilityAuthorityRequestsControllerGetById: (id: string, params: CapabilityAuthorityRequestsControllerGetByIdParams, options?: RequestInit) => Promise<CapabilityAuthorityRequestDtoDataEnvelope>;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.capabilityAuthorityRequestsControllerGetById = exports.getCapabilityAuthorityRequestsControllerGetByIdUrl = exports.capabilityAuthorityRequestsControllerListForSubject = exports.getCapabilityAuthorityRequestsControllerListForSubjectUrl = exports.capabilityAuthorityRequestsControllerOpen = exports.getCapabilityAuthorityRequestsControllerOpenUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ const getCapabilityAuthorityRequestsControllerOpenUrl = () => {
6
+ return `/internal/capability-authority-requests`;
7
+ };
8
+ exports.getCapabilityAuthorityRequestsControllerOpenUrl = getCapabilityAuthorityRequestsControllerOpenUrl;
9
+ /**
10
+ * The organisation policy answers immediately with one of three dispositions. `auto-allow` means the grant already exists by the time this returns and the runtime may retry its invocation. `decision-required` means a human has been asked and the runtime must poll or wait — it is NOT a denial. `refuse` is terminal and carries a machine-readable reason. A request for a capability the subject already holds is a 409 rather than a silent no-op, and a second live request for the same capability is a 409 rather than a second question in front of an administrator.
11
+ * @summary Request capability authority for an App or agent
12
+ */
13
+ const capabilityAuthorityRequestsControllerOpen = async (openCapabilityAuthorityRequestDto, options) => {
14
+ return (0, custom_fetch_1.customFetch)((0, exports.getCapabilityAuthorityRequestsControllerOpenUrl)(), {
15
+ ...options,
16
+ method: 'POST',
17
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
18
+ body: JSON.stringify(openCapabilityAuthorityRequestDto)
19
+ });
20
+ };
21
+ exports.capabilityAuthorityRequestsControllerOpen = capabilityAuthorityRequestsControllerOpen;
22
+ const getCapabilityAuthorityRequestsControllerListForSubjectUrl = (params) => {
23
+ const normalizedParams = new URLSearchParams();
24
+ Object.entries(params || {}).forEach(([key, value]) => {
25
+ if (value === undefined)
26
+ return;
27
+ if (value === null) {
28
+ normalizedParams.append(key, 'null');
29
+ return;
30
+ }
31
+ if (Array.isArray(value)) {
32
+ for (const item of value) {
33
+ if (item === undefined || item === null)
34
+ continue;
35
+ normalizedParams.append(key, item.toString());
36
+ }
37
+ return;
38
+ }
39
+ normalizedParams.append(key, value.toString());
40
+ });
41
+ const stringifiedParams = normalizedParams.toString();
42
+ return stringifiedParams.length > 0 ? `/internal/capability-authority-requests?${stringifiedParams}` : `/internal/capability-authority-requests`;
43
+ };
44
+ exports.getCapabilityAuthorityRequestsControllerListForSubjectUrl = getCapabilityAuthorityRequestsControllerListForSubjectUrl;
45
+ /**
46
+ * The list a runtime reads to learn what happened to an ask it opened. Deliberately keyed on the SUBJECT rather than on the caller: the runtime relaying the request is not the subject of it, and a "requests I made" list would answer for the service instead of for the App.
47
+ * @summary One subject's own authority requests
48
+ */
49
+ const capabilityAuthorityRequestsControllerListForSubject = async (params, options) => {
50
+ return (0, custom_fetch_1.customFetch)((0, exports.getCapabilityAuthorityRequestsControllerListForSubjectUrl)(params), {
51
+ ...options,
52
+ method: 'GET'
53
+ });
54
+ };
55
+ exports.capabilityAuthorityRequestsControllerListForSubject = capabilityAuthorityRequestsControllerListForSubject;
56
+ const getCapabilityAuthorityRequestsControllerGetByIdUrl = (id, params) => {
57
+ const normalizedParams = new URLSearchParams();
58
+ Object.entries(params || {}).forEach(([key, value]) => {
59
+ if (value === undefined)
60
+ return;
61
+ if (value === null) {
62
+ normalizedParams.append(key, 'null');
63
+ return;
64
+ }
65
+ if (Array.isArray(value)) {
66
+ for (const item of value) {
67
+ if (item === undefined || item === null)
68
+ continue;
69
+ normalizedParams.append(key, item.toString());
70
+ }
71
+ return;
72
+ }
73
+ normalizedParams.append(key, value.toString());
74
+ });
75
+ const stringifiedParams = normalizedParams.toString();
76
+ return stringifiedParams.length > 0 ? `/internal/capability-authority-requests/${id}?${stringifiedParams}` : `/internal/capability-authority-requests/${id}`;
77
+ };
78
+ exports.getCapabilityAuthorityRequestsControllerGetByIdUrl = getCapabilityAuthorityRequestsControllerGetByIdUrl;
79
+ /**
80
+ * The live status of an ask. Read from THIS plane's row; the decision's own lifecycle is decision-api's to report, and this service does not mirror it — a settled ask cannot show as pending here because the row is written by the same handler that acts on the answer.
81
+ * @summary One authority request
82
+ */
83
+ const capabilityAuthorityRequestsControllerGetById = async (id, params, options) => {
84
+ return (0, custom_fetch_1.customFetch)((0, exports.getCapabilityAuthorityRequestsControllerGetByIdUrl)(id, params), {
85
+ ...options,
86
+ method: 'GET'
87
+ });
88
+ };
89
+ exports.capabilityAuthorityRequestsControllerGetById = capabilityAuthorityRequestsControllerGetById;
@@ -3,7 +3,7 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- import type { AddRoleGrantDto, AssignRoleDto, CreateRoleDto, OrgRoleSyncDto, OrgRoleSyncResultDtoDataEnvelope, RoleAssignmentDtoDataArrayEnvelope, RoleAssignmentDtoDataEnvelope, RoleDtoDataArrayEnvelope, RoleDtoDataEnvelope, RoleGrantDtoDataArrayEnvelope, RoleGrantDtoDataEnvelope, RolesControllerListParams, UpdateRoleDto } from '../../models';
6
+ import type { AddRoleGrantDto, AssignRoleDto, CreateRoleDto, RoleAssignmentDtoDataArrayEnvelope, RoleAssignmentDtoDataEnvelope, RoleDtoDataArrayEnvelope, RoleDtoDataEnvelope, RoleGrantDtoDataArrayEnvelope, RoleGrantDtoDataEnvelope, RolesControllerListParams, UpdateRoleDto } from '../../models';
7
7
  export declare const getRolesControllerCreateUrl: () => string;
8
8
  /**
9
9
  * @summary Create a custom role
@@ -59,8 +59,3 @@ export declare const getRolesControllerUnassignUrl: (id: string, assignmentId: s
59
59
  * @summary Remove a role assignment
60
60
  */
61
61
  export declare const rolesControllerUnassign: (id: string, assignmentId: string, options?: RequestInit) => Promise<void>;
62
- export declare const getOrgRoleSyncControllerSyncUrl: () => string;
63
- /**
64
- * @summary Ensure a subject holds the given org role, correctly org-scoped (idempotent).
65
- */
66
- export declare const orgRoleSyncControllerSync: (orgRoleSyncDto: OrgRoleSyncDto, options?: RequestInit) => Promise<OrgRoleSyncResultDtoDataEnvelope>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.orgRoleSyncControllerSync = exports.getOrgRoleSyncControllerSyncUrl = exports.rolesControllerUnassign = exports.getRolesControllerUnassignUrl = exports.rolesControllerAssign = exports.getRolesControllerAssignUrl = exports.rolesControllerListAssignments = exports.getRolesControllerListAssignmentsUrl = exports.rolesControllerRemoveGrant = exports.getRolesControllerRemoveGrantUrl = exports.rolesControllerAddGrant = exports.getRolesControllerAddGrantUrl = exports.rolesControllerListGrants = exports.getRolesControllerListGrantsUrl = exports.rolesControllerDelete = exports.getRolesControllerDeleteUrl = exports.rolesControllerUpdate = exports.getRolesControllerUpdateUrl = exports.rolesControllerGetById = exports.getRolesControllerGetByIdUrl = exports.rolesControllerList = exports.getRolesControllerListUrl = exports.rolesControllerCreate = exports.getRolesControllerCreateUrl = void 0;
3
+ exports.rolesControllerUnassign = exports.getRolesControllerUnassignUrl = exports.rolesControllerAssign = exports.getRolesControllerAssignUrl = exports.rolesControllerListAssignments = exports.getRolesControllerListAssignmentsUrl = exports.rolesControllerRemoveGrant = exports.getRolesControllerRemoveGrantUrl = exports.rolesControllerAddGrant = exports.getRolesControllerAddGrantUrl = exports.rolesControllerListGrants = exports.getRolesControllerListGrantsUrl = exports.rolesControllerDelete = exports.getRolesControllerDeleteUrl = exports.rolesControllerUpdate = exports.getRolesControllerUpdateUrl = exports.rolesControllerGetById = exports.getRolesControllerGetByIdUrl = exports.rolesControllerList = exports.getRolesControllerListUrl = exports.rolesControllerCreate = exports.getRolesControllerCreateUrl = void 0;
4
4
  const custom_fetch_1 = require("../../custom-fetch");
5
5
  const getRolesControllerCreateUrl = () => {
6
6
  return `/roles`;
@@ -183,19 +183,3 @@ const rolesControllerUnassign = async (id, assignmentId, options) => {
183
183
  });
184
184
  };
185
185
  exports.rolesControllerUnassign = rolesControllerUnassign;
186
- const getOrgRoleSyncControllerSyncUrl = () => {
187
- return `/internal/org-role-sync`;
188
- };
189
- exports.getOrgRoleSyncControllerSyncUrl = getOrgRoleSyncControllerSyncUrl;
190
- /**
191
- * @summary Ensure a subject holds the given org role, correctly org-scoped (idempotent).
192
- */
193
- const orgRoleSyncControllerSync = async (orgRoleSyncDto, options) => {
194
- return (0, custom_fetch_1.customFetch)((0, exports.getOrgRoleSyncControllerSyncUrl)(), {
195
- ...options,
196
- method: 'POST',
197
- headers: { 'Content-Type': 'application/json', ...options?.headers },
198
- body: JSON.stringify(orgRoleSyncDto)
199
- });
200
- };
201
- exports.orgRoleSyncControllerSync = orgRoleSyncControllerSync;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { configureClient, getClientConfig, ClientError, customFetch, type Client
2
2
  export * from './models';
3
3
  export * from './endpoints/agents/agents';
4
4
  export * from './endpoints/authorization/authorization';
5
+ export * from './endpoints/capability-authority-requests/capability-authority-requests';
5
6
  export * from './endpoints/contribution-sync/contribution-sync';
6
7
  export * from './endpoints/credential-defaults/credential-defaults';
7
8
  export * from './endpoints/describe-objects/describe-objects';
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ Object.defineProperty(exports, "customFetch", { enumerable: true, get: function
24
24
  __exportStar(require("./models"), exports);
25
25
  __exportStar(require("./endpoints/agents/agents"), exports);
26
26
  __exportStar(require("./endpoints/authorization/authorization"), exports);
27
+ __exportStar(require("./endpoints/capability-authority-requests/capability-authority-requests"), exports);
27
28
  __exportStar(require("./endpoints/contribution-sync/contribution-sync"), exports);
28
29
  __exportStar(require("./endpoints/credential-defaults/credential-defaults"), exports);
29
30
  __exportStar(require("./endpoints/describe-objects/describe-objects"), exports);
@@ -5,9 +5,15 @@
5
5
  */
6
6
  import type { GrantConstraintsDto } from './grantConstraintsDto.js';
7
7
  export interface AddRoleGrantDto {
8
- /** Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`. */
8
+ /**
9
+ * Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`.
10
+ * @minLength 1
11
+ */
9
12
  capability: string;
10
- /** Built-in environment slug. */
13
+ /**
14
+ * Built-in environment slug.
15
+ * @minLength 1
16
+ */
11
17
  environment: string;
12
18
  constraints?: GrantConstraintsDto;
13
19
  requiresApproval?: boolean;
@@ -6,5 +6,6 @@
6
6
  import type { SubjectKind } from './subjectKind.js';
7
7
  export interface AddTeamMemberDto {
8
8
  subjectKind: SubjectKind;
9
+ /** @minLength 1 */
9
10
  subjectRef: string;
10
11
  }
@@ -4,7 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  /**
7
- * The agent's permission CEILING — ordered supersets `sandbox ⊂ as-owner ⊂ connected ⊂ full`. Intersected with the agent's armed tools and its owner's authority at resolution, so it can only RESTRICT, never amplify. Absent ⇒ `as-owner`.
7
+ * The agent's permission CEILING — ordered supersets `sandbox ⊂ as-owner ⊂ connected ⊂ full`. Intersected with the agent's armed tools and its owner's authority at resolution, so it can only RESTRICT, never amplify.
8
8
  */
9
9
  export type AgentReachTier = typeof AgentReachTier[keyof typeof AgentReachTier];
10
10
  export declare const AgentReachTier: {
@@ -5,10 +5,17 @@
5
5
  */
6
6
  import type { SubjectKind } from './subjectKind.js';
7
7
  export interface AssignRoleDto {
8
- /** The org this assignment is scoped to. For a custom role it must equal the role’s org; for a built-in role (system sentinel) it is the real consuming org. */
8
+ /**
9
+ * The org this assignment is scoped to. For a custom role it must equal the role’s org; for a built-in role (system sentinel) it is the real consuming org.
10
+ * @minLength 1
11
+ */
9
12
  orgId: string;
10
13
  subjectKind?: SubjectKind;
14
+ /** @minLength 1 */
11
15
  subjectRef?: string;
12
- /** Assign the role to every member of this team. */
16
+ /**
17
+ * Assign the role to every member of this team.
18
+ * @minLength 1
19
+ */
13
20
  teamId?: string;
14
21
  }
@@ -5,17 +5,35 @@
5
5
  */
6
6
  import type { SubjectRefDto } from './subjectRefDto.js';
7
7
  export interface AuthorizationCheckRequestDto {
8
- /** Organization identifier. Scopes the grant lookup to the tenant. */
8
+ /**
9
+ * Organization identifier. Scopes the grant lookup to the tenant.
10
+ * @minLength 1
11
+ */
9
12
  orgId: string;
10
- /** Canonical CapabilityRef `<domain>:<resource>.<verb>@<major>` from `@xemahq/kernel-contracts/capability`. */
13
+ /**
14
+ * Canonical CapabilityRef `<domain>:<resource>.<verb>@<major>` from `@xemahq/kernel-contracts/capability`.
15
+ * @minLength 1
16
+ */
11
17
  capability: string;
12
18
  subject: SubjectRefDto;
13
- /** ExecutionEnvironmentRef in `environment:<slug>` format (e.g. `"environment:project"`). The service parses the prefix and checks the slug against the ExecutionEnvironmentKind enum. */
19
+ /**
20
+ * ExecutionEnvironmentRef in `environment:<slug>` format (e.g. `"environment:project"`). The service parses the prefix and checks the slug against the ExecutionEnvironmentKind enum.
21
+ * @minLength 1
22
+ */
14
23
  environment: string;
15
- /** CANONICAL kernel resource-instance ref `resource:<type>:<id>` naming the instance the capability targets. Optional — omit it for a verb-only check. When PRESENT it must be canonical: the service resolves it with `parseResourceRef` and answers `400 RESOURCE_REF_MALFORMED` for any other shape. Build it with `composeResourceRef(type, id)` from `@xemahq/kernel-contracts/resource`; a bare `<type>:<id>` and an `xema://…` path are BOTH rejected. */
24
+ /**
25
+ * Canonical `xema://<Space>/resource/<type>/<id>[@version]` address naming the instance the capability targets. Optional — omit it for a verb-only check; do not send a placeholder. The legacy `resource:<type>:<id>` form is still accepted, but it cannot express the org scope the canonical form carries. Any other shape is refused at the edge with `400 RESOURCE_REF_MALFORMED`.
26
+ * @minLength 1
27
+ */
16
28
  resource?: string;
17
- /** Audience policy slug; Phase 3 ignores this dimension. */
29
+ /**
30
+ * Audience policy slug; Phase 3 ignores this dimension.
31
+ * @minLength 1
32
+ */
18
33
  audience?: string;
19
- /** Caller-supplied correlation id surfaced in audit logs. */
34
+ /**
35
+ * Caller-supplied correlation id surfaced in audit logs.
36
+ * @minLength 1
37
+ */
20
38
  correlationId?: string;
21
39
  }
@@ -12,6 +12,7 @@ export declare const AuthorizationDecisionCode: {
12
12
  readonly CAPABILITY_REQUIRES_APPROVAL: "CAPABILITY_REQUIRES_APPROVAL";
13
13
  readonly DELEGATION_GRANT_INSUFFICIENT: "DELEGATION_GRANT_INSUFFICIENT";
14
14
  readonly RESOURCE_NOT_OWNED: "RESOURCE_NOT_OWNED";
15
+ readonly RESOURCE_SHARE_LEVEL_INSUFFICIENT: "RESOURCE_SHARE_LEVEL_INSUFFICIENT";
15
16
  readonly RESOURCE_UNREGISTERED: "RESOURCE_UNREGISTERED";
16
17
  readonly REACH_TIER_DENIED: "REACH_TIER_DENIED";
17
18
  };
@@ -14,6 +14,7 @@ exports.AuthorizationDecisionCode = {
14
14
  CAPABILITY_REQUIRES_APPROVAL: 'CAPABILITY_REQUIRES_APPROVAL',
15
15
  DELEGATION_GRANT_INSUFFICIENT: 'DELEGATION_GRANT_INSUFFICIENT',
16
16
  RESOURCE_NOT_OWNED: 'RESOURCE_NOT_OWNED',
17
+ RESOURCE_SHARE_LEVEL_INSUFFICIENT: 'RESOURCE_SHARE_LEVEL_INSUFFICIENT',
17
18
  RESOURCE_UNREGISTERED: 'RESOURCE_UNREGISTERED',
18
19
  REACH_TIER_DENIED: 'REACH_TIER_DENIED',
19
20
  };
@@ -6,5 +6,6 @@
6
6
  import type { AuthorizationDecisionCode } from './authorizationDecisionCode.js';
7
7
  export interface AuthorizationReasonDto {
8
8
  code: AuthorizationDecisionCode;
9
+ /** @minLength 1 */
9
10
  detail: string;
10
11
  }
@@ -6,11 +6,20 @@
6
6
  import type { AuthorizationSuggestionKind } from './authorizationSuggestionKind.js';
7
7
  export interface AuthorizationSuggestionDto {
8
8
  kind: AuthorizationSuggestionKind;
9
+ /** @minLength 1 */
9
10
  capability?: string;
11
+ /** @minLength 1 */
10
12
  environment?: string;
13
+ /** @minLength 1 */
11
14
  resource?: string;
12
- /** For `switch-environment`: the environment the request was sent with (denied). For other kinds, undefined. */
15
+ /**
16
+ * For `switch-environment`: the environment the request was sent with (denied). For other kinds, undefined.
17
+ * @minLength 1
18
+ */
13
19
  from?: string;
14
- /** For `switch-environment`: a environment the caller already holds a matching grant in. For other kinds, undefined. */
20
+ /**
21
+ * For `switch-environment`: a environment the caller already holds a matching grant in. For other kinds, undefined.
22
+ * @minLength 1
23
+ */
15
24
  to?: string;
16
25
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ import type { CapabilityAuthorityRequestDtoDisposition } from './capabilityAuthorityRequestDtoDisposition.js';
7
+ import type { CapabilityAuthorityRequestDtoOutcome } from './capabilityAuthorityRequestDtoOutcome.js';
8
+ import type { CapabilityAuthorityRequestDtoRefusal } from './capabilityAuthorityRequestDtoRefusal.js';
9
+ export interface CapabilityAuthorityRequestDto {
10
+ id: string;
11
+ orgId: string;
12
+ subjectKind: string;
13
+ subjectRef: string;
14
+ capability: string;
15
+ environment: string;
16
+ justification?: string;
17
+ /** What the organisation policy decided. */
18
+ disposition: CapabilityAuthorityRequestDtoDisposition;
19
+ /** Set iff the disposition is `refuse`. */
20
+ refusal?: CapabilityAuthorityRequestDtoRefusal;
21
+ /** The decision-api ask, set iff a human is being asked. Its live status is read from decision-api rather than mirrored here, so a settled ask cannot show as pending because an event was lost. */
22
+ decisionId?: string;
23
+ /** Terminal state. Absent while the ask is live. */
24
+ outcome?: CapabilityAuthorityRequestDtoOutcome;
25
+ /** The grant this request produced, if any. A POINTER for the audit trail — authority itself lives in `capability_grants`, and nothing reads this field as permission. */
26
+ grantId?: string;
27
+ createdAt: string;
28
+ settledAt?: string;
29
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ import type { CapabilityAuthorityRequestDto } from './capabilityAuthorityRequestDto.js';
7
+ export interface CapabilityAuthorityRequestDtoDataArrayEnvelope {
8
+ data: CapabilityAuthorityRequestDto[];
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ import type { CapabilityAuthorityRequestDto } from './capabilityAuthorityRequestDto.js';
7
+ export interface CapabilityAuthorityRequestDtoDataEnvelope {
8
+ data: CapabilityAuthorityRequestDto;
9
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ /**
7
+ * What the organisation policy decided.
8
+ */
9
+ export type CapabilityAuthorityRequestDtoDisposition = typeof CapabilityAuthorityRequestDtoDisposition[keyof typeof CapabilityAuthorityRequestDtoDisposition];
10
+ export declare const CapabilityAuthorityRequestDtoDisposition: {
11
+ readonly 'auto-allow': "auto-allow";
12
+ readonly 'decision-required': "decision-required";
13
+ readonly refuse: "refuse";
14
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * Authorization API
5
+ * OpenAPI spec version: 0.1.1
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CapabilityAuthorityRequestDtoDisposition = void 0;
9
+ exports.CapabilityAuthorityRequestDtoDisposition = {
10
+ 'auto-allow': 'auto-allow',
11
+ 'decision-required': 'decision-required',
12
+ refuse: 'refuse',
13
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ /**
7
+ * Terminal state. Absent while the ask is live.
8
+ */
9
+ export type CapabilityAuthorityRequestDtoOutcome = typeof CapabilityAuthorityRequestDtoOutcome[keyof typeof CapabilityAuthorityRequestDtoOutcome];
10
+ export declare const CapabilityAuthorityRequestDtoOutcome: {
11
+ readonly granted: "granted";
12
+ readonly refused: "refused";
13
+ readonly refused_by_policy: "refused_by_policy";
14
+ readonly no_judgement: "no_judgement";
15
+ readonly grant_write_refused: "grant_write_refused";
16
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * Authorization API
5
+ * OpenAPI spec version: 0.1.1
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CapabilityAuthorityRequestDtoOutcome = void 0;
9
+ exports.CapabilityAuthorityRequestDtoOutcome = {
10
+ granted: 'granted',
11
+ refused: 'refused',
12
+ refused_by_policy: 'refused_by_policy',
13
+ no_judgement: 'no_judgement',
14
+ grant_write_refused: 'grant_write_refused',
15
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ /**
7
+ * Set iff the disposition is `refuse`.
8
+ */
9
+ export type CapabilityAuthorityRequestDtoRefusal = typeof CapabilityAuthorityRequestDtoRefusal[keyof typeof CapabilityAuthorityRequestDtoRefusal];
10
+ export declare const CapabilityAuthorityRequestDtoRefusal: {
11
+ readonly SUBJECT_KIND_MAY_NOT_REQUEST: "SUBJECT_KIND_MAY_NOT_REQUEST";
12
+ readonly REACH_EXCEEDS_ORG_AUTHORITY: "REACH_EXCEEDS_ORG_AUTHORITY";
13
+ readonly ORG_REFUSED_CAPABILITY: "ORG_REFUSED_CAPABILITY";
14
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Generated by @xemahq/api-client-generator — do not edit manually.
4
+ * Authorization API
5
+ * OpenAPI spec version: 0.1.1
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CapabilityAuthorityRequestDtoRefusal = void 0;
9
+ exports.CapabilityAuthorityRequestDtoRefusal = {
10
+ SUBJECT_KIND_MAY_NOT_REQUEST: 'SUBJECT_KIND_MAY_NOT_REQUEST',
11
+ REACH_EXCEEDS_ORG_AUTHORITY: 'REACH_EXCEEDS_ORG_AUTHORITY',
12
+ ORG_REFUSED_CAPABILITY: 'ORG_REFUSED_CAPABILITY',
13
+ };
@@ -3,9 +3,6 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- /**
7
- * @nullable
8
- */
9
- export type ErrorDetailsDtoDetails = {
10
- [key: string]: unknown;
11
- } | null;
6
+ export type CapabilityAuthorityRequestsControllerGetByIdParams = {
7
+ orgId: string;
8
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * Authorization API
4
+ * OpenAPI spec version: 0.1.1
5
+ */
6
+ export type CapabilityAuthorityRequestsControllerListForSubjectParams = {
7
+ orgId: string;
8
+ subjectKind: string;
9
+ subjectRef: string;
10
+ };
@@ -9,12 +9,19 @@ import type { CreateExecutionEnvironmentDtoRuntimeLimits } from './createExecuti
9
9
  import type { DataClassification } from './dataClassification.js';
10
10
  import type { ExecutionEnvironmentKind } from './executionEnvironmentKind.js';
11
11
  export interface CreateExecutionEnvironmentDto {
12
- /** Owning organization. Scopes the custom environment to the tenant. */
12
+ /**
13
+ * Owning organization. Scopes the custom environment to the tenant.
14
+ * @minLength 1
15
+ */
13
16
  orgId: string;
14
- /** Environment slug (lowercase kebab, must start with a letter). Unique per org; must not collide with a built-in slug. */
17
+ /**
18
+ * Environment slug (lowercase kebab, must start with a letter). Unique per org; must not collide with a built-in slug.
19
+ * @pattern ENVIRONMENT_SLUG_REGEX
20
+ */
15
21
  slug: string;
16
22
  /** ExecutionEnvironmentKind classification for this environment. */
17
23
  kind: ExecutionEnvironmentKind;
24
+ /** @minLength 1 */
18
25
  description: string;
19
26
  /** Per-environment capability allow-list (`CapabilityPolicy[]`). Defaults to `[]`. */
20
27
  allowedCapabilities?: CreateExecutionEnvironmentDtoAllowedCapabilitiesItem[];
@@ -7,18 +7,31 @@ import type { BiomePermissionProfile } from './biomePermissionProfile.js';
7
7
  import type { GrantConstraintsDto } from './grantConstraintsDto.js';
8
8
  import type { SubjectKind } from './subjectKind.js';
9
9
  export interface CreateGrantDto {
10
- /** Organization identifier. Scopes the grant to the tenant. */
10
+ /**
11
+ * Organization identifier. Scopes the grant to the tenant.
12
+ * @minLength 1
13
+ */
11
14
  orgId: string;
12
15
  subjectKind: SubjectKind;
16
+ /** @minLength 1 */
13
17
  subjectRef: string;
14
- /** Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`. */
18
+ /**
19
+ * Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`.
20
+ * @minLength 1
21
+ */
15
22
  capability: string;
16
- /** Built-in environment slug. Phase 3 stores but does not enforce. */
23
+ /**
24
+ * Built-in environment slug. Phase 3 stores but does not enforce.
25
+ * @minLength 1
26
+ */
17
27
  environment: string;
18
28
  constraints?: GrantConstraintsDto;
19
29
  requiresApproval?: boolean;
20
30
  /** Profile template that materialised this row, if any. */
21
31
  profile?: BiomePermissionProfile;
22
- /** Opaque credential-binding pointer. EXPLICIT (highest-precedence) tier of the credential ladder. Not a secret; NOT tuple-affecting. */
32
+ /**
33
+ * Opaque credential-binding pointer. EXPLICIT (highest-precedence) tier of the credential ladder. Not a secret; NOT tuple-affecting.
34
+ * @minLength 1
35
+ */
23
36
  credentialBindingId?: string;
24
37
  }
@@ -4,8 +4,11 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export interface CreateRoleDto {
7
+ /** @minLength 1 */
7
8
  orgId: string;
9
+ /** @pattern SLUG_PATTERN */
8
10
  slug: string;
11
+ /** @minLength 1 */
9
12
  displayName: string;
10
13
  description?: string;
11
14
  }