@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.
Files changed (109) 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/authorizationReasonDto.d.ts +1 -0
  15. package/dist/models/authorizationSuggestionDto.d.ts +11 -2
  16. package/dist/models/capabilityAuthorityRequestDto.d.ts +29 -0
  17. package/dist/models/capabilityAuthorityRequestDtoDataArrayEnvelope.d.ts +9 -0
  18. package/dist/models/capabilityAuthorityRequestDtoDataEnvelope.d.ts +9 -0
  19. package/dist/models/capabilityAuthorityRequestDtoDisposition.d.ts +14 -0
  20. package/dist/models/capabilityAuthorityRequestDtoDisposition.js +13 -0
  21. package/dist/models/capabilityAuthorityRequestDtoOutcome.d.ts +16 -0
  22. package/dist/models/capabilityAuthorityRequestDtoOutcome.js +15 -0
  23. package/dist/models/capabilityAuthorityRequestDtoRefusal.d.ts +14 -0
  24. package/dist/models/capabilityAuthorityRequestDtoRefusal.js +13 -0
  25. package/dist/models/{errorDetailsDtoDetails.d.ts → capabilityAuthorityRequestsControllerGetByIdParams.d.ts} +3 -6
  26. package/dist/models/capabilityAuthorityRequestsControllerListForSubjectParams.d.ts +10 -0
  27. package/dist/models/createExecutionEnvironmentDto.d.ts +9 -2
  28. package/dist/models/createGrantDto.d.ts +17 -4
  29. package/dist/models/createRoleDto.d.ts +3 -0
  30. package/dist/models/createTeamDto.d.ts +10 -2
  31. package/dist/models/environmentCeilingSource.d.ts +1 -1
  32. package/dist/models/environmentsControllerFindBySlugParams.d.ts +1 -0
  33. package/dist/models/environmentsControllerListParams.d.ts +1 -0
  34. package/dist/models/environmentsControllerRemoveParams.d.ts +1 -0
  35. package/dist/models/environmentsControllerUpdateParams.d.ts +1 -0
  36. package/dist/models/exactResourceAuthorityDto.d.ts +8 -2
  37. package/dist/models/exactResourceBindingDto.d.ts +8 -2
  38. package/dist/models/executionEnvironmentResponseDto.d.ts +1 -1
  39. package/dist/models/grantConstraintsDto.d.ts +6 -1
  40. package/dist/models/grantsControllerListParams.d.ts +10 -0
  41. package/dist/models/index.d.ts +15 -8
  42. package/dist/models/index.js +15 -8
  43. package/dist/models/listRegisteredResourcesDto.d.ts +4 -1
  44. package/dist/models/listVisibleResourcesDto.d.ts +8 -2
  45. package/dist/models/openCapabilityAuthorityRequestDto.d.ts +35 -0
  46. package/dist/models/openCapabilityAuthorityRequestDtoSubjectKind.d.ts +21 -0
  47. package/dist/models/openCapabilityAuthorityRequestDtoSubjectKind.js +20 -0
  48. package/dist/models/outputRouteAuthorityDto.d.ts +10 -2
  49. package/dist/models/outputRouteRevisionDto.d.ts +10 -2
  50. package/dist/models/policyActingAgentDto.d.ts +14 -0
  51. package/dist/models/policyActingAgentDtoKind.d.ts +9 -0
  52. package/dist/models/{orgRole.js → policyActingAgentDtoKind.js} +3 -5
  53. package/dist/models/policyActingForDto.d.ts +8 -0
  54. package/dist/models/policyBiomeDto.d.ts +2 -0
  55. package/dist/models/policyCallerDto.d.ts +4 -0
  56. package/dist/models/policyCapabilityDto.d.ts +5 -1
  57. package/dist/models/policyCheckRequestDto.d.ts +53 -3
  58. package/dist/models/policyDecisionDto.d.ts +8 -2
  59. package/dist/models/policyEnvironmentDto.d.ts +4 -1
  60. package/dist/models/policyObligationDto.d.ts +9 -2
  61. package/dist/models/policyResourceDto.d.ts +4 -1
  62. package/dist/models/policyRouteHintDto.d.ts +1 -0
  63. package/dist/models/policySpaceRefDto.d.ts +7 -0
  64. package/dist/models/policySubjectRefDto.d.ts +1 -0
  65. package/dist/models/previewOutputRouteImpactDto.d.ts +1 -0
  66. package/dist/models/problemDetailsDto.d.ts +24 -0
  67. package/dist/models/problemDetailsDto.js +2 -0
  68. package/dist/models/problemFieldIssueDto.d.ts +10 -0
  69. package/dist/models/problemFieldIssueDto.js +7 -0
  70. package/dist/models/provisionAgentRequestDto.d.ts +12 -3
  71. package/dist/models/provisionedCapabilityDto.d.ts +4 -1
  72. package/dist/models/recordAgentReachTierRequestDto.d.ts +21 -0
  73. package/dist/models/recordAgentReachTierRequestDto.js +2 -0
  74. package/dist/models/registerResourceOwnershipDto.d.ts +16 -4
  75. package/dist/models/registerResourceRevisionDto.d.ts +16 -4
  76. package/dist/models/registeredResourceRevisionDto.d.ts +8 -2
  77. package/dist/models/relationshipsControllerListParams.d.ts +4 -0
  78. package/dist/models/replaceResourceOwnershipDto.d.ts +8 -2
  79. package/dist/models/requestOutputRouteRetirementDto.d.ts +4 -1
  80. package/dist/models/requestOutputRouteRevisionReleaseDto.d.ts +14 -3
  81. package/dist/models/requestOutputRouteRollbackDto.d.ts +5 -1
  82. package/dist/models/resolveExactOutputRouteDto.d.ts +1 -0
  83. package/dist/models/resolveOutputRouteChannelDto.d.ts +1 -0
  84. package/dist/models/resourceShareRefDto.d.ts +8 -2
  85. package/dist/models/resourceSubjectRefDto.d.ts +4 -1
  86. package/dist/models/rolesControllerListParams.d.ts +3 -0
  87. package/dist/models/rollbackExecutionEnvironmentDto.d.ts +5 -2
  88. package/dist/models/subjectRefDto.d.ts +4 -1
  89. package/dist/models/teamsControllerListParams.d.ts +2 -0
  90. package/dist/models/updateExecutionEnvironmentDto.d.ts +1 -0
  91. package/dist/models/updateGrantDto.d.ts +5 -1
  92. package/dist/models/updateRoleDto.d.ts +1 -0
  93. package/dist/models/updateTeamDto.d.ts +1 -0
  94. package/dist/models/upsertCredentialDefaultDto.d.ts +16 -4
  95. package/package.json +26 -2
  96. package/dist/models/errorDetailsDto.d.ts +0 -10
  97. package/dist/models/errorPayloadDto.d.ts +0 -11
  98. package/dist/models/errorResponseDto.d.ts +0 -9
  99. package/dist/models/orgRole.d.ts +0 -14
  100. package/dist/models/orgRoleSyncDto.d.ts +0 -16
  101. package/dist/models/orgRoleSyncResultDto.d.ts +0 -9
  102. package/dist/models/orgRoleSyncResultDtoDataEnvelope.d.ts +0 -9
  103. /package/dist/models/{errorDetailsDto.js → capabilityAuthorityRequestDto.js} +0 -0
  104. /package/dist/models/{errorPayloadDto.js → capabilityAuthorityRequestDtoDataArrayEnvelope.js} +0 -0
  105. /package/dist/models/{errorResponseDto.js → capabilityAuthorityRequestDtoDataEnvelope.js} +0 -0
  106. /package/dist/models/{errorDetailsDtoDetails.js → capabilityAuthorityRequestsControllerGetByIdParams.js} +0 -0
  107. /package/dist/models/{orgRoleSyncResultDto.js → capabilityAuthorityRequestsControllerListForSubjectParams.js} +0 -0
  108. /package/dist/models/{orgRoleSyncDto.js → openCapabilityAuthorityRequestDto.js} +0 -0
  109. /package/dist/models/{orgRoleSyncResultDtoDataEnvelope.js → policyActingAgentDto.js} +0 -0
@@ -10,13 +10,20 @@ import type { RunnerKind } from './runnerKind.js';
10
10
  export interface PolicyObligationDto {
11
11
  kind: PolicyObligationKind;
12
12
  runnerKind?: RunnerKind;
13
+ /** @minLength 1 */
13
14
  approverRole?: string;
14
15
  maxDurationSeconds?: number;
15
16
  maxCostUsd?: number;
16
17
  maxClassification?: DataClassification;
17
18
  residency?: DataResidency;
18
- /** Egress allowlist patterns (wildcard host or https:// URL-prefix). Present only when kind=egress-allowlist. */
19
+ /**
20
+ * Egress allowlist patterns (wildcard host or https:// URL-prefix). Present only when kind=egress-allowlist.
21
+ * @items.minLength 1
22
+ */
19
23
  allow?: string[];
20
- /** Egress blocklist patterns; a match denies even if `allow` matched. Present only when kind=egress-allowlist. */
24
+ /**
25
+ * Egress blocklist patterns; a match denies even if `allow` matched. Present only when kind=egress-allowlist.
26
+ * @items.minLength 1
27
+ */
21
28
  deny?: string[];
22
29
  }
@@ -5,7 +5,10 @@
5
5
  */
6
6
  import type { DataClassification } from './dataClassification.js';
7
7
  export interface PolicyResourceDto {
8
- /** Canonical `xema://<Space>/resource/<type>/<id>[@version]` address naming the instance this invocation targets. Exact Agent bindings always carry the version. The server answers `400 RESOURCE_REF_MALFORMED` for any other shape. Omit the whole `resource` block for a verb-only check; do not send a placeholder. */
8
+ /**
9
+ * Canonical `xema://<Space>/resource/<type>/<id>[@version]` address naming the instance this invocation targets. Exact Agent bindings always carry the version. The server answers `400 RESOURCE_REF_MALFORMED` for any other shape. Omit the whole `resource` block for a verb-only check; do not send a placeholder.
10
+ * @minLength 1
11
+ */
9
12
  ref: string;
10
13
  /** The classification the target resource carries. OMIT IT when the producer has none to declare — the effective classification is then the Space floor alone, and the request still gets the resource-ownership clamp. Omitting the whole `resource` block is NOT the same thing: that downgrades the call to a verb-only check and discards the ownership clamp. Never send a placeholder value. */
11
14
  classification?: DataClassification;
@@ -8,6 +8,7 @@ import type { RunnerKind } from './runnerKind.js';
8
8
  export interface PolicyRouteHintDto {
9
9
  requiredRunnerLabels?: PolicyRouteHintDtoRequiredRunnerLabels;
10
10
  preferredRunnerKind?: RunnerKind;
11
+ /** @minLength 1 */
11
12
  requiredRegion?: string;
12
13
  requireCustomerEdge?: boolean;
13
14
  }
@@ -6,11 +6,18 @@
6
6
  import type { SpaceKind } from './spaceKind.js';
7
7
  export interface PolicySpaceRefDto {
8
8
  tier: SpaceKind;
9
+ /** @minLength 1 */
9
10
  orgId?: string;
11
+ /** @minLength 1 */
10
12
  projectId?: string;
13
+ /** @minLength 1 */
11
14
  appId?: string;
15
+ /** @minLength 1 */
12
16
  sessionId?: string;
17
+ /** @minLength 1 */
13
18
  biomeId?: string;
19
+ /** @minLength 1 */
14
20
  userId?: string;
21
+ /** @minLength 1 */
15
22
  path?: string;
16
23
  }
@@ -7,6 +7,7 @@ import type { PolicyActingForDto } from './policyActingForDto.js';
7
7
  import type { SubjectKind } from './subjectKind.js';
8
8
  export interface PolicySubjectRefDto {
9
9
  kind: SubjectKind;
10
+ /** @minLength 1 */
10
11
  id: string;
11
12
  roles?: string[];
12
13
  actingFor?: PolicyActingForDto;
@@ -4,6 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export interface PreviewOutputRouteImpactDto {
7
+ /** @minLength 1 */
7
8
  ref: string;
8
9
  /** @pattern ^[a-z][a-z0-9-]{0,62}$ */
9
10
  channel: string;
@@ -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 { ProblemFieldIssueDto } from './problemFieldIssueDto.js';
7
+ export interface ProblemDetailsDto {
8
+ /** Absolute URI identifying the refusal TYPE. Derived one-to-one from `code`, so a caller may branch on either and can never be told two different things. Never `about:blank`. */
9
+ type: string;
10
+ /** Short, human-readable, and STABLE for a given `type`. Never per-occurrence — that is `detail`. */
11
+ title: string;
12
+ /** The HTTP status code, repeated in the body so a logged document is self-contained. */
13
+ status: number;
14
+ /** SCREAMING_SNAKE_CASE. The machine-branchable refusal, and the value a policy rule, a retry predicate and a UI branch all name. */
15
+ code: string;
16
+ /** Human-readable and specific to THIS occurrence. */
17
+ detail?: string;
18
+ /** URI reference identifying the occurrence — a request path, a run, a row. */
19
+ instance?: string;
20
+ /** W3C trace-context trace-id, present when the caller sent a `traceparent`. Omitted rather than invented when it did not. */
21
+ traceId?: string;
22
+ /** Field-level issues, when the refusal is about the request body. */
23
+ errors?: ProblemFieldIssueDto[];
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 interface ProblemFieldIssueDto {
7
+ /** RFC 6901 JSON Pointer into the request body. Root is "/". */
8
+ pointer: string;
9
+ detail: string;
10
+ }
@@ -0,0 +1,7 @@
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 });
@@ -5,11 +5,20 @@
5
5
  */
6
6
  import type { AgentReachTier } from './agentReachTier.js';
7
7
  export interface ProvisionAgentRequestDto {
8
- /** Organization the agent + its capability grants are scoped to. */
8
+ /**
9
+ * Organization the agent + its capability grants are scoped to.
10
+ * @minLength 1
11
+ */
9
12
  orgId: string;
10
- /** The agent subject ref the grants are written for (subjectKind=agent). */
13
+ /**
14
+ * The agent subject ref the grants are written for (subjectKind=agent).
15
+ * @minLength 1
16
+ */
11
17
  agentSubjectRef: string;
12
- /** The owning user subject ref. Auto-grant requires the OWNER to currently hold the capability (a full, non-pending grant in the agent's environment). */
18
+ /**
19
+ * The owning user subject ref. Auto-grant requires the OWNER to currently hold the capability (a full, non-pending grant in the agent's environment).
20
+ * @minLength 1
21
+ */
13
22
  ownerSubjectRef: string;
14
23
  /** The agent reach-tier ceiling. Selects the execution environment the owner-held check + grants resolve under. */
15
24
  reachTier: AgentReachTier;
@@ -8,7 +8,10 @@ import type { AgentProvisionReason } from './agentProvisionReason.js';
8
8
  import type { CapabilityRiskTier } from './capabilityRiskTier.js';
9
9
  import type { ExecutionEnvironmentKind } from './executionEnvironmentKind.js';
10
10
  export interface ProvisionedCapabilityDto {
11
- /** The canonical CapabilityRef this entry describes. */
11
+ /**
12
+ * The canonical CapabilityRef this entry describes.
13
+ * @minLength 1
14
+ */
12
15
  capability: string;
13
16
  decision: AgentProvisionDecision;
14
17
  reason: AgentProvisionReason;
@@ -0,0 +1,21 @@
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 { AgentReachTier } from './agentReachTier.js';
7
+ export interface RecordAgentReachTierRequestDto {
8
+ /**
9
+ * Organization that OWNS the agent, or `null` when the agent is GLOBALLY owned (system-seeded or biome-contributed) and its ceiling applies in every org. The field must be PRESENT either way — an omitted `orgId` is refused rather than read as global, because global is the wider scope.
10
+ * @minLength 1
11
+ * @nullable
12
+ */
13
+ orgId: string | null;
14
+ /**
15
+ * The agent's stable composition SLUG — the same identity its capability grants are written under, and the same identity a policy-check envelope carries on `actingAgent`.
16
+ * @minLength 1
17
+ */
18
+ agentSlug: string;
19
+ /** 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. */
20
+ reachTier: AgentReachTier;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,15 +7,27 @@ import type { ResourceShareRefDto } from './resourceShareRefDto.js';
7
7
  import type { ResourceSubjectRefDto } from './resourceSubjectRefDto.js';
8
8
  import type { ResourceVisibilityPattern } from './resourceVisibilityPattern.js';
9
9
  export interface RegisterResourceOwnershipDto {
10
- /** Resource kind/type slug. */
10
+ /**
11
+ * Resource kind/type slug.
12
+ * @minLength 1
13
+ */
11
14
  resourceType: string;
12
- /** Resource instance id. */
15
+ /**
16
+ * Resource instance id.
17
+ * @minLength 1
18
+ */
13
19
  resourceId: string;
14
20
  /** Instance visibility pattern. The PDP ANDs the verb verdict with the ownership check resolved per this pattern. */
15
21
  visibility: ResourceVisibilityPattern;
16
- /** The `xema://` SPACE that owns the instance — an ADDRESS, which this service expands into the owner SUBJECTS its own vocabulary resolves it to (`xema://orgs/<id>` → the org-owner and org-admin role usersets; `xema://users/<id>` → that user). A producer knows the owning Space (`App.ownerSpaceUri`, `Skill.ownerSpaceUri`) and CANNOT know which subjects it resolves to, because those role instances are this service's own rows. Refused (400 `RESOURCE_OWNER_SPACE_NOT_ADMISSIBLE`) when the address is unparseable, names a tier the resource kind does not admit, names another organisation, or names a tier with no owner-subject expansion. May be combined with `owners`; the effective owner set is the UNION, de-duplicated. At least one of the two must yield an owner. */
22
+ /**
23
+ * The `xema://` SPACE that owns the instance — an ADDRESS, which this service expands into the owner SUBJECTS its own vocabulary resolves it to (`xema://orgs/<id>` → the org-owner and org-admin role usersets; `xema://users/<id>` → that user). A producer knows the owning Space (`App.ownerSpaceUri`, `Skill.ownerSpaceUri`) and CANNOT know which subjects it resolves to, because those role instances are this service's own rows. Refused (400 `RESOURCE_OWNER_SPACE_NOT_ADMISSIBLE`) when the address is unparseable, names a tier the resource kind does not admit, names another organisation, or names a tier with no owner-subject expansion. May be combined with `owners`; the effective owner set is the UNION, de-duplicated. At least one of the two must yield an owner.
24
+ * @minLength 1
25
+ */
17
26
  ownerSpaceUri?: string;
18
- /** Subjects that OWN the instance (full visibility), named explicitly. OPTIONAL only because `ownerSpaceUri` is the other way to say it — the service still refuses a request that yields no owner at all, so the ≥ 1-owner rule is unchanged. It moved from the DTO to the service because validation runs BEFORE the expansion and therefore cannot see the owners the address produces. */
27
+ /**
28
+ * Subjects that OWN the instance (full visibility), named explicitly. OPTIONAL only because `ownerSpaceUri` is the other way to say it — the service still refuses a request that yields no owner at all, so the ≥ 1-owner rule is unchanged. It moved from the DTO to the service because validation runs BEFORE the expansion and therefore cannot see the owners the address produces.
29
+ * @minItems 1
30
+ */
19
31
  owners?: ResourceSubjectRefDto[];
20
32
  /** Subjects explicitly granted visibility, each at a LEVEL and with an optional expiry. */
21
33
  explicitShares?: ResourceShareRefDto[];
@@ -5,13 +5,25 @@
5
5
  */
6
6
  import type { DataClassification } from './dataClassification.js';
7
7
  export interface RegisterResourceRevisionDto {
8
- /** Canonical version-pinned Xema Resource ref. The first slug segment is the registered resource kind. */
8
+ /**
9
+ * Canonical version-pinned Xema Resource ref. The first slug segment is the registered resource kind.
10
+ * @minLength 1
11
+ */
9
12
  ref: string;
10
- /** Lowercase SHA-256 of the immutable revision metadata. */
13
+ /**
14
+ * Lowercase SHA-256 of the immutable revision metadata.
15
+ * @pattern SHA256_HEX
16
+ */
11
17
  contentHash: string;
12
- /** Canonical OwnerSpace key produced by formatOwnerSpaceKey. It must carry the caller tenant fence. */
18
+ /**
19
+ * Canonical OwnerSpace key produced by formatOwnerSpaceKey. It must carry the caller tenant fence.
20
+ * @minLength 1
21
+ */
13
22
  ownerSpaceKey: string;
14
23
  classification: DataClassification;
15
- /** Canonical capability ref the unified Decision must evaluate. */
24
+ /**
25
+ * Canonical capability ref the unified Decision must evaluate.
26
+ * @minLength 1
27
+ */
16
28
  decisionCapabilityRef: string;
17
29
  }
@@ -5,9 +5,15 @@
5
5
  */
6
6
  import type { DataClassification } from './dataClassification.js';
7
7
  export interface RegisteredResourceRevisionDto {
8
- /** Canonical version-pinned Xema Resource ref. The first slug segment is the registered resource kind. */
8
+ /**
9
+ * Canonical version-pinned Xema Resource ref. The first slug segment is the registered resource kind.
10
+ * @minLength 1
11
+ */
9
12
  ref: string;
10
- /** Lowercase SHA-256 of the immutable revision metadata. */
13
+ /**
14
+ * Lowercase SHA-256 of the immutable revision metadata.
15
+ * @pattern SHA256_HEX
16
+ */
11
17
  contentHash: string;
12
18
  orgId: string;
13
19
  resourceType: string;
@@ -8,6 +8,7 @@ import type { SubjectKind } from './subjectKind.js';
8
8
  export type RelationshipsControllerListParams = {
9
9
  /**
10
10
  * Filter to relationships within a single organization.
11
+ * @minLength 1
11
12
  */
12
13
  orgId?: string;
13
14
  /**
@@ -16,14 +17,17 @@ export type RelationshipsControllerListParams = {
16
17
  subjectKind?: SubjectKind;
17
18
  /**
18
19
  * Filter by subject ref (the user-id half of the tuple).
20
+ * @minLength 1
19
21
  */
20
22
  subjectRef?: string;
21
23
  /**
22
24
  * Filter by the canonical CapabilityRef the object encodes.
25
+ * @minLength 1
23
26
  */
24
27
  capability?: string;
25
28
  /**
26
29
  * Filter by the environment slug the capability object is scoped to.
30
+ * @minLength 1
27
31
  */
28
32
  environment?: string;
29
33
  /**
@@ -9,9 +9,15 @@ import type { ResourceVisibilityPattern } from './resourceVisibilityPattern.js';
9
9
  export interface ReplaceResourceOwnershipDto {
10
10
  /** Instance visibility pattern. The PDP ANDs the verb verdict with the ownership check resolved per this pattern. */
11
11
  visibility: ResourceVisibilityPattern;
12
- /** The `xema://` SPACE that owns the instance — an ADDRESS, which this service expands into the owner SUBJECTS its own vocabulary resolves it to (`xema://orgs/<id>` → the org-owner and org-admin role usersets; `xema://users/<id>` → that user). A producer knows the owning Space (`App.ownerSpaceUri`, `Skill.ownerSpaceUri`) and CANNOT know which subjects it resolves to, because those role instances are this service's own rows. Refused (400 `RESOURCE_OWNER_SPACE_NOT_ADMISSIBLE`) when the address is unparseable, names a tier the resource kind does not admit, names another organisation, or names a tier with no owner-subject expansion. May be combined with `owners`; the effective owner set is the UNION, de-duplicated. At least one of the two must yield an owner. */
12
+ /**
13
+ * The `xema://` SPACE that owns the instance — an ADDRESS, which this service expands into the owner SUBJECTS its own vocabulary resolves it to (`xema://orgs/<id>` → the org-owner and org-admin role usersets; `xema://users/<id>` → that user). A producer knows the owning Space (`App.ownerSpaceUri`, `Skill.ownerSpaceUri`) and CANNOT know which subjects it resolves to, because those role instances are this service's own rows. Refused (400 `RESOURCE_OWNER_SPACE_NOT_ADMISSIBLE`) when the address is unparseable, names a tier the resource kind does not admit, names another organisation, or names a tier with no owner-subject expansion. May be combined with `owners`; the effective owner set is the UNION, de-duplicated. At least one of the two must yield an owner.
14
+ * @minLength 1
15
+ */
13
16
  ownerSpaceUri?: string;
14
- /** Subjects that OWN the instance (full visibility), named explicitly. OPTIONAL only because `ownerSpaceUri` is the other way to say it — the service still refuses a request that yields no owner at all, so the ≥ 1-owner rule is unchanged. It moved from the DTO to the service because validation runs BEFORE the expansion and therefore cannot see the owners the address produces. */
17
+ /**
18
+ * Subjects that OWN the instance (full visibility), named explicitly. OPTIONAL only because `ownerSpaceUri` is the other way to say it — the service still refuses a request that yields no owner at all, so the ≥ 1-owner rule is unchanged. It moved from the DTO to the service because validation runs BEFORE the expansion and therefore cannot see the owners the address produces.
19
+ * @minItems 1
20
+ */
15
21
  owners?: ResourceSubjectRefDto[];
16
22
  /** Subjects explicitly granted visibility, each at a LEVEL and with an optional expiry. */
17
23
  explicitShares?: ResourceShareRefDto[];
@@ -11,6 +11,9 @@ export interface RequestOutputRouteRetirementDto {
11
11
  * @maximum 2147483647
12
12
  */
13
13
  expectedChannelVersion: number;
14
- /** @maxLength 2048 */
14
+ /**
15
+ * @minLength 1
16
+ * @maxLength 2048
17
+ */
15
18
  reason: string;
16
19
  }
@@ -8,16 +8,24 @@ import type { DataClassification } from './dataClassification.js';
8
8
  import type { OutputRouteDestinationKind } from './outputRouteDestinationKind.js';
9
9
  import type { RequestOutputRouteRevisionReleaseDtoAllowedOutputSchema } from './requestOutputRouteRevisionReleaseDtoAllowedOutputSchema.js';
10
10
  export interface RequestOutputRouteRevisionReleaseDto {
11
- /** Canonical versioned OutputRoute identity. */
11
+ /**
12
+ * Canonical versioned OutputRoute identity.
13
+ * @minLength 1
14
+ */
12
15
  ref: string;
16
+ /** @minLength 1 */
13
17
  ownerSpaceKey: string;
14
18
  destinationKind: OutputRouteDestinationKind;
15
- /** Secret-free destination identity. Credentials are resolved only by the destination service. */
19
+ /**
20
+ * Secret-free destination identity. Credentials are resolved only by the destination service.
21
+ * @minLength 1
22
+ */
16
23
  destinationRef: string;
17
24
  classification: DataClassification;
18
25
  /** JSON Schema for the only output shape this route accepts. */
19
26
  allowedOutputSchema: RequestOutputRouteRevisionReleaseDtoAllowedOutputSchema;
20
27
  sideEffectClass: CapabilityEffectClass;
28
+ /** @minLength 1 */
21
29
  decisionCapabilityRef: string;
22
30
  /** @pattern ^[a-z][a-z0-9-]{0,62}$ */
23
31
  channel: string;
@@ -26,6 +34,9 @@ export interface RequestOutputRouteRevisionReleaseDto {
26
34
  * @maximum 2147483647
27
35
  */
28
36
  expectedChannelVersion: number;
29
- /** @maxLength 2048 */
37
+ /**
38
+ * @minLength 1
39
+ * @maxLength 2048
40
+ */
30
41
  reason: string;
31
42
  }
@@ -11,7 +11,11 @@ export interface RequestOutputRouteRollbackDto {
11
11
  * @maximum 2147483647
12
12
  */
13
13
  expectedChannelVersion: number;
14
- /** @maxLength 2048 */
14
+ /**
15
+ * @minLength 1
16
+ * @maxLength 2048
17
+ */
15
18
  reason: string;
19
+ /** @minLength 1 */
16
20
  priorReleaseSetId: string;
17
21
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { ResourceSubjectRefDto } from './resourceSubjectRefDto.js';
7
7
  export interface ResolveExactOutputRouteDto {
8
+ /** @minLength 1 */
8
9
  ref: string;
9
10
  subject: ResourceSubjectRefDto;
10
11
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import type { ResourceSubjectRefDto } from './resourceSubjectRefDto.js';
7
7
  export interface ResolveOutputRouteChannelDto {
8
+ /** @minLength 1 */
8
9
  routeId: string;
9
10
  /** @pattern ^[a-z][a-z0-9-]{0,62}$ */
10
11
  channel: string;
@@ -6,9 +6,15 @@
6
6
  import type { SubjectKind } from './subjectKind.js';
7
7
  export interface ResourceShareRefDto {
8
8
  kind: SubjectKind;
9
- /** Subject id (the `<id>` in `<kind>:<id>`). */
9
+ /**
10
+ * Subject id (the `<id>` in `<kind>:<id>`).
11
+ * @minLength 1
12
+ */
10
13
  ref: string;
11
- /** The resource kind's own name for the level this share confers. Levels are declared per kind (a document has `viewer < editor < manager`; a mailbox's `editor` is not a meaningful authority) and are totally ordered with monotone verb expansion. OMITTED means the LOWEST level the kind declares — never the highest. */
14
+ /**
15
+ * The resource kind's own name for the level this share confers. Levels are declared per kind (a document has `viewer < editor < manager`; a mailbox's `editor` is not a meaningful authority) and are totally ordered with monotone verb expansion. OMITTED means the LOWEST level the kind declares — never the highest.
16
+ * @minLength 1
17
+ */
12
18
  level?: string;
13
19
  /** ISO-8601 instant after which the share stops granting. Enforced by an OpenFGA condition evaluated at DECISION time, not by a sweeper — a sweeper leaves a window in which a lapsed share still passes. Omitted means the share does not expire. An instant in the past is a 400. */
14
20
  expiresAt?: string;
@@ -6,6 +6,9 @@
6
6
  import type { SubjectKind } from './subjectKind.js';
7
7
  export interface ResourceSubjectRefDto {
8
8
  kind: SubjectKind;
9
- /** Subject id (the `<id>` in `<kind>:<id>`). */
9
+ /**
10
+ * Subject id (the `<id>` in `<kind>:<id>`).
11
+ * @minLength 1
12
+ */
10
13
  ref: string;
11
14
  }
@@ -4,6 +4,9 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export type RolesControllerListParams = {
7
+ /**
8
+ * @minLength 1
9
+ */
7
10
  orgId: string;
8
11
  /**
9
12
  * Include kernel-seeded built-in roles (default true).
@@ -4,8 +4,11 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export interface RollbackExecutionEnvironmentDto {
7
- /** Immutable prior generic ReleaseSet identifier. */
7
+ /**
8
+ * Immutable prior generic ReleaseSet identifier.
9
+ * @minLength 1
10
+ */
8
11
  priorReleaseSetId: string;
9
- /** True selects this tenant's built-in override channel; false selects the identity default/stable channel. */
12
+ /** Selects the OWNER of the release address to roll back, never a channel. True rolls back this org's restriction OF a built-in; false rolls back the environment's own identity — an installation-wide built-in under the global owner, or this org's own custom environment. All three addresses are published on the `stable` channel (owner ruling D-09-3), and they stay distinct because the release pointer is keyed on the owner. */
10
13
  tenantOverride: boolean;
11
14
  }
@@ -7,6 +7,9 @@ import type { SubjectKind } from './subjectKind.js';
7
7
  export interface SubjectRefDto {
8
8
  /** Discriminator over the kinds of subject that may hold a grant. */
9
9
  kind: SubjectKind;
10
- /** Opaque ref for the subject; authorization-api owns interpretation per `kind`. */
10
+ /**
11
+ * Opaque ref for the subject; authorization-api owns interpretation per `kind`.
12
+ * @minLength 1
13
+ */
11
14
  ref: string;
12
15
  }
@@ -6,10 +6,12 @@
6
6
  export type TeamsControllerListParams = {
7
7
  /**
8
8
  * Required — teams are always listed within a single org.
9
+ * @minLength 1
9
10
  */
10
11
  orgId: string;
11
12
  /**
12
13
  * Filter to the direct children of this parent team id.
14
+ * @minLength 1
13
15
  */
14
16
  parentTeamId?: string;
15
17
  };
@@ -8,6 +8,7 @@ import type { UpdateExecutionEnvironmentDtoAllowedCapabilitiesItem } from './upd
8
8
  import type { UpdateExecutionEnvironmentDtoApprovalRulesItem } from './updateExecutionEnvironmentDtoApprovalRulesItem.js';
9
9
  import type { UpdateExecutionEnvironmentDtoRuntimeLimits } from './updateExecutionEnvironmentDtoRuntimeLimits.js';
10
10
  export interface UpdateExecutionEnvironmentDto {
11
+ /** @minLength 1 */
11
12
  description?: string;
12
13
  /** Per-environment capability allow-list (`CapabilityPolicy[]`). */
13
14
  allowedCapabilities?: UpdateExecutionEnvironmentDtoAllowedCapabilitiesItem[];
@@ -6,10 +6,14 @@
6
6
  import type { BiomePermissionProfile } from './biomePermissionProfile.js';
7
7
  import type { GrantConstraintsDto } from './grantConstraintsDto.js';
8
8
  export interface UpdateGrantDto {
9
+ /** @minLength 1 */
9
10
  environment?: string;
10
11
  constraints?: GrantConstraintsDto;
11
12
  requiresApproval?: boolean;
12
13
  profile?: BiomePermissionProfile;
13
- /** Opaque credential-binding pointer. EXPLICIT tier of the credential ladder. Updating it is NOT tuple-affecting — no OpenFGA reconcile. */
14
+ /**
15
+ * Opaque credential-binding pointer. EXPLICIT tier of the credential ladder. Updating it is NOT tuple-affecting — no OpenFGA reconcile.
16
+ * @minLength 1
17
+ */
14
18
  credentialBindingId?: string;
15
19
  }
@@ -4,6 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export interface UpdateRoleDto {
7
+ /** @minLength 1 */
7
8
  displayName?: string;
8
9
  description?: string;
9
10
  }
@@ -4,6 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export interface UpdateTeamDto {
7
+ /** @minLength 1 */
7
8
  displayName?: string;
8
9
  description?: string;
9
10
  /**
@@ -4,12 +4,24 @@
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
6
  export interface UpsertCredentialDefaultDto {
7
- /** Organization identifier the default is scoped to. */
7
+ /**
8
+ * Organization identifier the default is scoped to.
9
+ * @minLength 1
10
+ */
8
11
  orgId: string;
9
- /** Project identifier. Omit (or null) for the ORG-wide default; set for a per-project default. */
12
+ /**
13
+ * Project identifier. Omit (or null) for the ORG-wide default; set for a per-project default.
14
+ * @minLength 1
15
+ */
10
16
  projectId?: string;
11
- /** The EXTERNAL PROVIDER this default is for — `github`, `slack`, an MCP server's provider slug. A default is per (scope, provider): without it an organisation would have one default binding for every provider at once. Must be a value a capability ref can derive (lowercase kebab), because the ladder looks it up by exactly that derivation. */
17
+ /**
18
+ * The EXTERNAL PROVIDER this default is for — `github`, `slack`, an MCP server's provider slug. A default is per (scope, provider): without it an organisation would have one default binding for every provider at once. Must be a value a capability ref can derive (lowercase kebab), because the ladder looks it up by exactly that derivation.
19
+ * @minLength 1
20
+ */
12
21
  provider: string;
13
- /** Opaque credential-binding pointer the gateway resolves the external credential from. Not a secret. */
22
+ /**
23
+ * Opaque credential-binding pointer the gateway resolves the external credential from. Not a secret.
24
+ * @minLength 1
25
+ */
14
26
  credentialBindingId: string;
15
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/authorization-internal-api-client",
3
- "version": "0.4.20",
3
+ "version": "0.4.26",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -19,7 +19,7 @@
19
19
  "service": "authorization-api",
20
20
  "biome": "authorization",
21
21
  "target": "server",
22
- "generator": "@xemahq/api-client-generator@0.15.2",
22
+ "generator": "@xemahq/api-client-generator@0.19.0",
23
23
  "source": "openapi.internal.json"
24
24
  },
25
25
  "license": "LicenseRef-Xema-BSL-1.1",
@@ -32,6 +32,30 @@
32
32
  "directory": "packages/clients/authorization-internal-api"
33
33
  },
34
34
  "description": "Generated internal API client for the Xema authorization-api service.",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "default": "./dist/index.js"
39
+ },
40
+ "./models": {
41
+ "types": "./dist/models/index.d.ts",
42
+ "default": "./dist/models/index.js"
43
+ },
44
+ "./models/*": {
45
+ "types": "./dist/models/*.d.ts",
46
+ "default": "./dist/models/*.js"
47
+ },
48
+ "./endpoints/*": {
49
+ "types": "./dist/endpoints/*.d.ts",
50
+ "default": "./dist/endpoints/*.js"
51
+ },
52
+ "./custom-fetch": {
53
+ "types": "./dist/custom-fetch.d.ts",
54
+ "default": "./dist/custom-fetch.js"
55
+ },
56
+ "./package.json": "./package.json"
57
+ },
58
+ "sideEffects": false,
35
59
  "scripts": {
36
60
  "build": "tsc -p tsconfig.json"
37
61
  }
@@ -1,10 +0,0 @@
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 { ErrorDetailsDtoDetails } from './errorDetailsDtoDetails.js';
7
- export interface ErrorDetailsDto {
8
- /** @nullable */
9
- details: ErrorDetailsDtoDetails;
10
- }