@xemahq/authorization-internal-api-client 0.4.20 → 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.
- package/dist/endpoints/agents/agents.d.ts +7 -1
- package/dist/endpoints/agents/agents.js +18 -1
- package/dist/endpoints/capability-authority-requests/capability-authority-requests.d.ts +24 -0
- package/dist/endpoints/capability-authority-requests/capability-authority-requests.js +89 -0
- package/dist/endpoints/roles/roles.d.ts +1 -6
- package/dist/endpoints/roles/roles.js +1 -17
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/addRoleGrantDto.d.ts +8 -2
- package/dist/models/addTeamMemberDto.d.ts +1 -0
- package/dist/models/agentReachTier.d.ts +1 -1
- package/dist/models/assignRoleDto.d.ts +9 -2
- package/dist/models/authorizationCheckRequestDto.d.ts +24 -6
- package/dist/models/authorizationReasonDto.d.ts +1 -0
- package/dist/models/authorizationSuggestionDto.d.ts +11 -2
- package/dist/models/capabilityAuthorityRequestDto.d.ts +29 -0
- package/dist/models/capabilityAuthorityRequestDtoDataArrayEnvelope.d.ts +9 -0
- package/dist/models/capabilityAuthorityRequestDtoDataEnvelope.d.ts +9 -0
- package/dist/models/capabilityAuthorityRequestDtoDisposition.d.ts +14 -0
- package/dist/models/capabilityAuthorityRequestDtoDisposition.js +13 -0
- package/dist/models/capabilityAuthorityRequestDtoOutcome.d.ts +16 -0
- package/dist/models/capabilityAuthorityRequestDtoOutcome.js +15 -0
- package/dist/models/capabilityAuthorityRequestDtoRefusal.d.ts +14 -0
- package/dist/models/capabilityAuthorityRequestDtoRefusal.js +13 -0
- package/dist/models/{errorDetailsDtoDetails.d.ts → capabilityAuthorityRequestsControllerGetByIdParams.d.ts} +3 -6
- package/dist/models/capabilityAuthorityRequestsControllerListForSubjectParams.d.ts +10 -0
- package/dist/models/createExecutionEnvironmentDto.d.ts +9 -2
- package/dist/models/createGrantDto.d.ts +17 -4
- package/dist/models/createRoleDto.d.ts +3 -0
- package/dist/models/createTeamDto.d.ts +10 -2
- package/dist/models/environmentCeilingSource.d.ts +1 -1
- package/dist/models/environmentsControllerFindBySlugParams.d.ts +1 -0
- package/dist/models/environmentsControllerListParams.d.ts +1 -0
- package/dist/models/environmentsControllerRemoveParams.d.ts +1 -0
- package/dist/models/environmentsControllerUpdateParams.d.ts +1 -0
- package/dist/models/exactResourceAuthorityDto.d.ts +8 -2
- package/dist/models/exactResourceBindingDto.d.ts +8 -2
- package/dist/models/executionEnvironmentResponseDto.d.ts +1 -1
- package/dist/models/grantConstraintsDto.d.ts +6 -1
- package/dist/models/grantsControllerListParams.d.ts +10 -0
- package/dist/models/index.d.ts +15 -8
- package/dist/models/index.js +15 -8
- package/dist/models/listRegisteredResourcesDto.d.ts +4 -1
- package/dist/models/listVisibleResourcesDto.d.ts +8 -2
- package/dist/models/openCapabilityAuthorityRequestDto.d.ts +35 -0
- package/dist/models/openCapabilityAuthorityRequestDtoSubjectKind.d.ts +21 -0
- package/dist/models/openCapabilityAuthorityRequestDtoSubjectKind.js +20 -0
- package/dist/models/outputRouteAuthorityDto.d.ts +10 -2
- package/dist/models/outputRouteRevisionDto.d.ts +10 -2
- package/dist/models/policyActingAgentDto.d.ts +14 -0
- package/dist/models/policyActingAgentDtoKind.d.ts +9 -0
- package/dist/models/{orgRole.js → policyActingAgentDtoKind.js} +3 -5
- package/dist/models/policyActingForDto.d.ts +8 -0
- package/dist/models/policyBiomeDto.d.ts +2 -0
- package/dist/models/policyCallerDto.d.ts +4 -0
- package/dist/models/policyCapabilityDto.d.ts +5 -1
- package/dist/models/policyCheckRequestDto.d.ts +53 -3
- package/dist/models/policyDecisionDto.d.ts +8 -2
- package/dist/models/policyEnvironmentDto.d.ts +4 -1
- package/dist/models/policyObligationDto.d.ts +9 -2
- package/dist/models/policyResourceDto.d.ts +4 -1
- package/dist/models/policyRouteHintDto.d.ts +1 -0
- package/dist/models/policySpaceRefDto.d.ts +7 -0
- package/dist/models/policySubjectRefDto.d.ts +1 -0
- package/dist/models/previewOutputRouteImpactDto.d.ts +1 -0
- package/dist/models/problemDetailsDto.d.ts +24 -0
- package/dist/models/problemDetailsDto.js +2 -0
- package/dist/models/problemFieldIssueDto.d.ts +10 -0
- package/dist/models/problemFieldIssueDto.js +7 -0
- package/dist/models/provisionAgentRequestDto.d.ts +12 -3
- package/dist/models/provisionedCapabilityDto.d.ts +4 -1
- package/dist/models/recordAgentReachTierRequestDto.d.ts +21 -0
- package/dist/models/recordAgentReachTierRequestDto.js +2 -0
- package/dist/models/registerResourceOwnershipDto.d.ts +16 -4
- package/dist/models/registerResourceRevisionDto.d.ts +16 -4
- package/dist/models/registeredResourceRevisionDto.d.ts +8 -2
- package/dist/models/relationshipsControllerListParams.d.ts +4 -0
- package/dist/models/replaceResourceOwnershipDto.d.ts +8 -2
- package/dist/models/requestOutputRouteRetirementDto.d.ts +4 -1
- package/dist/models/requestOutputRouteRevisionReleaseDto.d.ts +14 -3
- package/dist/models/requestOutputRouteRollbackDto.d.ts +5 -1
- package/dist/models/resolveExactOutputRouteDto.d.ts +1 -0
- package/dist/models/resolveOutputRouteChannelDto.d.ts +1 -0
- package/dist/models/resourceShareRefDto.d.ts +8 -2
- package/dist/models/resourceSubjectRefDto.d.ts +4 -1
- package/dist/models/rolesControllerListParams.d.ts +3 -0
- package/dist/models/rollbackExecutionEnvironmentDto.d.ts +5 -2
- package/dist/models/subjectRefDto.d.ts +4 -1
- package/dist/models/teamsControllerListParams.d.ts +2 -0
- package/dist/models/updateExecutionEnvironmentDto.d.ts +1 -0
- package/dist/models/updateGrantDto.d.ts +5 -1
- package/dist/models/updateRoleDto.d.ts +1 -0
- package/dist/models/updateTeamDto.d.ts +1 -0
- package/dist/models/upsertCredentialDefaultDto.d.ts +16 -4
- package/package.json +26 -2
- package/dist/models/errorDetailsDto.d.ts +0 -10
- package/dist/models/errorPayloadDto.d.ts +0 -11
- package/dist/models/errorResponseDto.d.ts +0 -9
- package/dist/models/orgRole.d.ts +0 -14
- package/dist/models/orgRoleSyncDto.d.ts +0 -16
- package/dist/models/orgRoleSyncResultDto.d.ts +0 -9
- package/dist/models/orgRoleSyncResultDtoDataEnvelope.d.ts +0 -9
- /package/dist/models/{errorDetailsDto.js → capabilityAuthorityRequestDto.js} +0 -0
- /package/dist/models/{errorPayloadDto.js → capabilityAuthorityRequestDtoDataArrayEnvelope.js} +0 -0
- /package/dist/models/{errorResponseDto.js → capabilityAuthorityRequestDtoDataEnvelope.js} +0 -0
- /package/dist/models/{errorDetailsDtoDetails.js → capabilityAuthorityRequestsControllerGetByIdParams.js} +0 -0
- /package/dist/models/{orgRoleSyncResultDto.js → capabilityAuthorityRequestsControllerListForSubjectParams.js} +0 -0
- /package/dist/models/{orgRoleSyncDto.js → openCapabilityAuthorityRequestDto.js} +0 -0
- /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,
|
|
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.
|
|
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
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`.
|
|
10
|
+
* @minLength 1
|
|
11
|
+
*/
|
|
9
12
|
capability: string;
|
|
10
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Built-in environment slug.
|
|
15
|
+
* @minLength 1
|
|
16
|
+
*/
|
|
11
17
|
environment: string;
|
|
12
18
|
constraints?: GrantConstraintsDto;
|
|
13
19
|
requiresApproval?: boolean;
|
|
@@ -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.
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Organization identifier. Scopes the grant lookup to the tenant.
|
|
10
|
+
* @minLength 1
|
|
11
|
+
*/
|
|
9
12
|
orgId: string;
|
|
10
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Audience policy slug; Phase 3 ignores this dimension.
|
|
31
|
+
* @minLength 1
|
|
32
|
+
*/
|
|
18
33
|
audience?: string;
|
|
19
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Caller-supplied correlation id surfaced in audit logs.
|
|
36
|
+
* @minLength 1
|
|
37
|
+
*/
|
|
20
38
|
correlationId?: string;
|
|
21
39
|
}
|
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
+
};
|
|
@@ -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
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Owning organization. Scopes the custom environment to the tenant.
|
|
14
|
+
* @minLength 1
|
|
15
|
+
*/
|
|
13
16
|
orgId: string;
|
|
14
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`.
|
|
20
|
+
* @minLength 1
|
|
21
|
+
*/
|
|
15
22
|
capability: string;
|
|
16
|
-
/**
|
|
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
|
-
/**
|
|
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,11 +4,19 @@
|
|
|
4
4
|
* OpenAPI spec version: 0.1.1
|
|
5
5
|
*/
|
|
6
6
|
export interface CreateTeamDto {
|
|
7
|
+
/** @minLength 1 */
|
|
7
8
|
orgId: string;
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Org-unique stable slug (lowercase alphanumeric + dashes).
|
|
11
|
+
* @pattern SLUG_PATTERN
|
|
12
|
+
*/
|
|
9
13
|
slug: string;
|
|
14
|
+
/** @minLength 1 */
|
|
10
15
|
displayName: string;
|
|
11
16
|
description?: string;
|
|
12
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Parent team id — ENTERPRISE nesting. The new team becomes a sub-team whose members roll up into the parent. Entitlement-gated at the org-admin BFF (`teams.nested`).
|
|
19
|
+
* @minLength 1
|
|
20
|
+
*/
|
|
13
21
|
parentTeamId?: string;
|
|
14
22
|
}
|