@xemahq/authorization-internal-api-client 0.3.10 → 0.4.12

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 (135) hide show
  1. package/dist/custom-fetch.d.ts +22 -0
  2. package/dist/custom-fetch.js +27 -0
  3. package/dist/endpoints/environments/environments.d.ts +23 -2
  4. package/dist/endpoints/environments/environments.js +118 -2
  5. package/dist/endpoints/org-erasure/org-erasure.d.ts +5 -0
  6. package/dist/endpoints/org-erasure/org-erasure.js +23 -0
  7. package/dist/endpoints/output-routes/output-routes.d.ts +41 -0
  8. package/dist/endpoints/output-routes/output-routes.js +133 -0
  9. package/dist/endpoints/resource-revisions/resource-revisions.d.ts +16 -0
  10. package/dist/endpoints/resource-revisions/resource-revisions.js +36 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.js +3 -0
  13. package/dist/models/addResourceShareDto.d.ts +4 -1
  14. package/dist/models/addRoleGrantDto.d.ts +0 -1
  15. package/dist/models/capabilityEffectClass.d.ts +11 -0
  16. package/dist/models/capabilityEffectClass.js +13 -0
  17. package/dist/models/capabilityGrantDto.d.ts +0 -1
  18. package/dist/models/capabilityReach.d.ts +14 -0
  19. package/dist/models/capabilityReach.js +13 -0
  20. package/dist/models/createGrantDto.d.ts +0 -2
  21. package/dist/models/credentialDefaultDto.d.ts +2 -0
  22. package/dist/models/credentialDefaultsControllerDeleteParams.d.ts +4 -0
  23. package/dist/models/credentialDefaultsControllerGetParams.d.ts +4 -0
  24. package/dist/models/dataResidency.d.ts +0 -2
  25. package/dist/models/dataResidency.js +0 -2
  26. package/dist/models/environmentCeilingSource.d.ts +1 -1
  27. package/dist/models/environmentsControllerReleaseHistoryParams.d.ts +9 -0
  28. package/dist/models/environmentsControllerReleaseHistoryParams.js +7 -0
  29. package/dist/models/environmentsControllerReleaseImpactParams.d.ts +9 -0
  30. package/dist/models/environmentsControllerReleaseImpactParams.js +7 -0
  31. package/dist/models/environmentsControllerRollbackParams.d.ts +8 -0
  32. package/dist/models/environmentsControllerRollbackParams.js +7 -0
  33. package/dist/models/exactResourceAuthorityDto.d.ts +21 -0
  34. package/dist/models/exactResourceAuthorityDto.js +2 -0
  35. package/dist/models/exactResourceAuthorityDtoDataEnvelope.d.ts +9 -0
  36. package/dist/models/exactResourceAuthorityDtoDataEnvelope.js +2 -0
  37. package/dist/models/exactResourceBindingDto.d.ts +11 -0
  38. package/dist/models/exactResourceBindingDto.js +7 -0
  39. package/dist/models/executionEnvironmentReleaseHistoryDto.d.ts +19 -0
  40. package/dist/models/executionEnvironmentReleaseHistoryDto.js +2 -0
  41. package/dist/models/executionEnvironmentReleaseHistoryDtoDataArrayEnvelope.d.ts +9 -0
  42. package/dist/models/executionEnvironmentReleaseHistoryDtoDataArrayEnvelope.js +2 -0
  43. package/dist/models/executionEnvironmentReleaseHistoryDtoOperation.d.ts +11 -0
  44. package/dist/models/executionEnvironmentReleaseHistoryDtoOperation.js +13 -0
  45. package/dist/models/executionEnvironmentReleaseImpactDto.d.ts +14 -0
  46. package/dist/models/executionEnvironmentReleaseImpactDto.js +7 -0
  47. package/dist/models/executionEnvironmentReleaseImpactDtoDataArrayEnvelope.d.ts +9 -0
  48. package/dist/models/executionEnvironmentReleaseImpactDtoDataArrayEnvelope.js +2 -0
  49. package/dist/models/executionEnvironmentResponseDto.d.ts +20 -2
  50. package/dist/models/executionEnvironmentResponseDtoAllowedBiomesItem.d.ts +8 -0
  51. package/dist/models/executionEnvironmentResponseDtoAllowedBiomesItem.js +7 -0
  52. package/dist/models/executionEnvironmentResponseDtoAllowedConnectorsItem.d.ts +8 -0
  53. package/dist/models/executionEnvironmentResponseDtoAllowedConnectorsItem.js +7 -0
  54. package/dist/models/executionEnvironmentResponseDtoAllowedKnowledgeScopesItem.d.ts +8 -0
  55. package/dist/models/executionEnvironmentResponseDtoAllowedKnowledgeScopesItem.js +7 -0
  56. package/dist/models/executionEnvironmentResponseDtoAllowedMountsItem.d.ts +8 -0
  57. package/dist/models/executionEnvironmentResponseDtoAllowedMountsItem.js +7 -0
  58. package/dist/models/executionEnvironmentResponseDtoOrgId.d.ts +1 -1
  59. package/dist/models/impactedOutputRouteConsumerDto.d.ts +16 -0
  60. package/dist/models/impactedOutputRouteConsumerDto.js +7 -0
  61. package/dist/models/impactedOutputRouteConsumerDtoDataArrayEnvelope.d.ts +9 -0
  62. package/dist/models/impactedOutputRouteConsumerDtoDataArrayEnvelope.js +2 -0
  63. package/dist/models/index.d.ts +49 -0
  64. package/dist/models/index.js +49 -0
  65. package/dist/models/object.d.ts +8 -0
  66. package/dist/models/object.js +7 -0
  67. package/dist/models/outputRouteAuthorityDto.d.ts +29 -0
  68. package/dist/models/outputRouteAuthorityDto.js +2 -0
  69. package/dist/models/outputRouteAuthorityDtoAllowedOutputSchema.d.ts +11 -0
  70. package/dist/models/outputRouteAuthorityDtoAllowedOutputSchema.js +7 -0
  71. package/dist/models/outputRouteAuthorityDtoDataEnvelope.d.ts +9 -0
  72. package/dist/models/outputRouteAuthorityDtoDataEnvelope.js +2 -0
  73. package/dist/models/outputRouteDestinationKind.d.ts +12 -0
  74. package/dist/models/outputRouteDestinationKind.js +14 -0
  75. package/dist/models/outputRoutePublicationRequestDto.d.ts +11 -0
  76. package/dist/models/outputRoutePublicationRequestDto.js +2 -0
  77. package/dist/models/outputRoutePublicationRequestDtoDataEnvelope.d.ts +9 -0
  78. package/dist/models/outputRoutePublicationRequestDtoDataEnvelope.js +2 -0
  79. package/dist/models/outputRouteReleaseHistoryDto.d.ts +24 -0
  80. package/dist/models/outputRouteReleaseHistoryDto.js +2 -0
  81. package/dist/models/outputRouteReleaseHistoryDtoDataArrayEnvelope.d.ts +9 -0
  82. package/dist/models/outputRouteReleaseHistoryDtoDataArrayEnvelope.js +2 -0
  83. package/dist/models/outputRouteReleaseHistoryDtoOperation.d.ts +11 -0
  84. package/dist/models/outputRouteReleaseHistoryDtoOperation.js +13 -0
  85. package/dist/models/outputRouteReleaseRequestDto.d.ts +17 -0
  86. package/dist/models/outputRouteReleaseRequestDto.js +2 -0
  87. package/dist/models/outputRouteReleaseRequestDtoDataEnvelope.d.ts +9 -0
  88. package/dist/models/outputRouteReleaseRequestDtoDataEnvelope.js +2 -0
  89. package/dist/models/outputRouteReleaseRequestDtoStatus.d.ts +11 -0
  90. package/dist/models/outputRouteReleaseRequestDtoStatus.js +13 -0
  91. package/dist/models/outputRouteRevisionDto.d.ts +27 -0
  92. package/dist/models/outputRouteRevisionDto.js +2 -0
  93. package/dist/models/outputRouteRevisionDtoAllowedOutputSchema.d.ts +11 -0
  94. package/dist/models/outputRouteRevisionDtoAllowedOutputSchema.js +7 -0
  95. package/dist/models/outputRouteRevisionsControllerReleaseHistoryParams.d.ts +13 -0
  96. package/dist/models/outputRouteRevisionsControllerReleaseHistoryParams.js +2 -0
  97. package/dist/models/policyResourceDto.d.ts +1 -1
  98. package/dist/models/previewOutputRouteImpactDto.d.ts +10 -0
  99. package/dist/models/previewOutputRouteImpactDto.js +7 -0
  100. package/dist/models/registerResourceOwnershipDto.d.ts +3 -2
  101. package/dist/models/registerResourceRevisionDto.d.ts +17 -0
  102. package/dist/models/registerResourceRevisionDto.js +2 -0
  103. package/dist/models/registeredResourceRevisionDto.d.ts +19 -0
  104. package/dist/models/registeredResourceRevisionDto.js +2 -0
  105. package/dist/models/registeredResourceRevisionDtoDataEnvelope.d.ts +9 -0
  106. package/dist/models/registeredResourceRevisionDtoDataEnvelope.js +2 -0
  107. package/dist/models/replaceResourceOwnershipDto.d.ts +3 -2
  108. package/dist/models/requestOutputRouteRetirementDto.d.ts +16 -0
  109. package/dist/models/requestOutputRouteRetirementDto.js +7 -0
  110. package/dist/models/requestOutputRouteRevisionReleaseDto.d.ts +31 -0
  111. package/dist/models/requestOutputRouteRevisionReleaseDto.js +2 -0
  112. package/dist/models/requestOutputRouteRevisionReleaseDtoAllowedOutputSchema.d.ts +11 -0
  113. package/dist/models/requestOutputRouteRevisionReleaseDtoAllowedOutputSchema.js +7 -0
  114. package/dist/models/requestOutputRouteRollbackDto.d.ts +17 -0
  115. package/dist/models/requestOutputRouteRollbackDto.js +7 -0
  116. package/dist/models/resolveExactOutputRouteDto.d.ts +10 -0
  117. package/dist/models/resolveExactOutputRouteDto.js +2 -0
  118. package/dist/models/resolveExactResourceRevisionDto.d.ts +11 -0
  119. package/dist/models/resolveExactResourceRevisionDto.js +2 -0
  120. package/dist/models/resolveOutputRouteChannelDto.d.ts +12 -0
  121. package/dist/models/resolveOutputRouteChannelDto.js +2 -0
  122. package/dist/models/resourceOwnershipEntryDto.d.ts +6 -0
  123. package/dist/models/resourceOwnershipReadDto.d.ts +5 -3
  124. package/dist/models/resourceShareRefDto.d.ts +15 -0
  125. package/dist/models/resourceShareRefDto.js +2 -0
  126. package/dist/models/resourceSubjectAccessResult.d.ts +10 -0
  127. package/dist/models/resourceSubjectAccessResult.js +12 -0
  128. package/dist/models/roleGrantDto.d.ts +0 -1
  129. package/dist/models/rollbackExecutionEnvironmentDto.d.ts +11 -0
  130. package/dist/models/rollbackExecutionEnvironmentDto.js +7 -0
  131. package/dist/models/updateGrantDto.d.ts +0 -1
  132. package/dist/models/upsertCredentialDefaultDto.d.ts +2 -0
  133. package/dist/models/xemaObjectKind.d.ts +2 -2
  134. package/dist/models/xemaObjectKind.js +2 -2
  135. package/package.json +2 -2
@@ -47,6 +47,28 @@ export interface ClientConfig {
47
47
  getAuthToken?: () => Promise<string>;
48
48
  /** Optional callback returning headers to inject on every request. Per-call headers take precedence. */
49
49
  getHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
50
+ /**
51
+ * Optional resolver for the CORRELATION ID of the request being made — the
52
+ * handle that ties one causal chain together across every service hop.
53
+ *
54
+ * WHY IT IS A CALLBACK AND NOT A VALUE. `ClientConfig` is process-global
55
+ * (`configureClient` is called once at wiring time), and a correlation id is
56
+ * per-request. This is invoked INSIDE the request, so a server can point it
57
+ * at whatever carries its ambient request context and get the CURRENT id
58
+ * rather than the one that happened to be live at boot.
59
+ *
60
+ * WHY THE TRANSPORT DOES NOT MINT ONE. Returning `undefined` sends no header,
61
+ * and the receiving service's `RequestContextMiddleware` mints its own — a
62
+ * new trace, which is honest. A transport that minted per call would produce
63
+ * a FRESH id on every hop while looking like propagation, which is strictly
64
+ * worse than none: every row would carry a correlation id and no two rows
65
+ * that belong together would share one. That is the exact defect this exists
66
+ * to fix, so the transport must not reproduce it one layer down.
67
+ *
68
+ * A caller-supplied `X-Correlation-Id` header always wins, and so does one
69
+ * from `getHeaders`.
70
+ */
71
+ getCorrelationId?: () => string | undefined | Promise<string | undefined>;
50
72
  /**
51
73
  * Optional callback invoked on a 401 before ONE re-attempt. Supplying it is
52
74
  * what opts this client into that re-attempt; without it a 401 comes back to
@@ -89,6 +89,16 @@ function getClientConfig() {
89
89
  */
90
90
  /** The only statuses that state the request was NOT processed. See above. */
91
91
  const RETRYABLE_STATUSES = [429, 503];
92
+ /**
93
+ * The platform's correlation header, spelled once.
94
+ *
95
+ * Value-identical to what `RequestContextMiddleware` reads in
96
+ * `@xemahq/platform-common`. It is a literal here rather than an import
97
+ * because this file has ZERO imports on purpose: it ships byte-identical into
98
+ * browser-target clients as well as server-target ones, and a dependency on a
99
+ * NestJS-peer package would follow it into every one of them.
100
+ */
101
+ const CORRELATION_ID_HEADER = 'X-Correlation-Id';
92
102
  /** Backoff floor, doubling per attempt up to {@link MAX_BACKOFF_MS}. */
93
103
  const BASE_BACKOFF_MS = 1000;
94
104
  /** Ceiling on a single backoff, however many attempts have elapsed. */
@@ -104,6 +114,23 @@ async function buildHeaders(config, callerHeaders) {
104
114
  }
105
115
  }
106
116
  }
117
+ // Correlation id (caller and global headers still take precedence).
118
+ //
119
+ // Without this, every server-to-server hop through a generated client started
120
+ // a NEW trace: the id is read-or-minted per hop by the receiving service's
121
+ // RequestContextMiddleware, and nothing carried it outbound — so an audit
122
+ // journal could record a whole causal chain and offer no way to join it back
123
+ // together.
124
+ //
125
+ // Absent resolver, or a resolver that answers `undefined`: NO header. The
126
+ // receiver mints and a new trace begins, which is the truthful outcome when
127
+ // there is nothing to continue.
128
+ if (config.getCorrelationId && !headers.has(CORRELATION_ID_HEADER)) {
129
+ const correlationId = await Promise.resolve(config.getCorrelationId());
130
+ if (correlationId) {
131
+ headers.set(CORRELATION_ID_HEADER, correlationId);
132
+ }
133
+ }
107
134
  // Auth token (caller or global headers take precedence)
108
135
  if (config.getAuthToken && !headers.has('Authorization')) {
109
136
  const token = await config.getAuthToken();
@@ -3,7 +3,7 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
- import type { CreateExecutionEnvironmentDto, EnvironmentsControllerFindBySlugParams, EnvironmentsControllerListParams, EnvironmentsControllerRemoveParams, EnvironmentsControllerUpdateParams, ExecutionEnvironmentResponseDtoDataArrayEnvelope, ExecutionEnvironmentResponseDtoDataEnvelope, UpdateExecutionEnvironmentDto } from '../../models';
6
+ import type { CreateExecutionEnvironmentDto, EnvironmentsControllerFindBySlugParams, EnvironmentsControllerListParams, EnvironmentsControllerReleaseHistoryParams, EnvironmentsControllerReleaseImpactParams, EnvironmentsControllerRemoveParams, EnvironmentsControllerRollbackParams, EnvironmentsControllerUpdateParams, ExecutionEnvironmentReleaseHistoryDtoDataArrayEnvelope, ExecutionEnvironmentReleaseImpactDtoDataArrayEnvelope, ExecutionEnvironmentResponseDtoDataArrayEnvelope, ExecutionEnvironmentResponseDtoDataEnvelope, RollbackExecutionEnvironmentDto, UpdateExecutionEnvironmentDto } from '../../models';
7
7
  export declare const getEnvironmentsControllerListUrl: (params?: EnvironmentsControllerListParams) => string;
8
8
  /**
9
9
  * Returns the kernel-seeded built-in environments. With `orgId` it also includes that org's custom environments; without `orgId` it returns built-ins only (back-compat).
@@ -16,6 +16,27 @@ export declare const getEnvironmentsControllerCreateUrl: () => string;
16
16
  * @summary Create an org-custom ExecutionEnvironment
17
17
  */
18
18
  export declare const environmentsControllerCreate: (createExecutionEnvironmentDto: CreateExecutionEnvironmentDto, options?: RequestInit) => Promise<ExecutionEnvironmentResponseDtoDataEnvelope>;
19
+ export declare const getEnvironmentsControllerResolveExactPolicyUrl: (slug: string, contentHash: string) => string;
20
+ /**
21
+ * Service-only authority read. Tenant scope comes exclusively from the verified request context; the response includes the exact revision/hash and complete canonical Environment policy ceilings.
22
+ * @summary Resolve one exact immutable Environment policy publication
23
+ */
24
+ export declare const environmentsControllerResolveExactPolicy: (slug: string, contentHash: string, options?: RequestInit) => Promise<ExecutionEnvironmentResponseDtoDataEnvelope>;
25
+ export declare const getEnvironmentsControllerReleaseHistoryUrl: (slug: string, params?: EnvironmentsControllerReleaseHistoryParams) => string;
26
+ /**
27
+ * @summary List immutable generic ReleaseSet history for an Environment
28
+ */
29
+ export declare const environmentsControllerReleaseHistory: (slug: string, params?: EnvironmentsControllerReleaseHistoryParams, options?: RequestInit) => Promise<ExecutionEnvironmentReleaseHistoryDtoDataArrayEnvelope>;
30
+ export declare const getEnvironmentsControllerReleaseImpactUrl: (slug: string, params?: EnvironmentsControllerReleaseImpactParams) => string;
31
+ /**
32
+ * @summary Preview reverse-transitive impact of the selected Environment release
33
+ */
34
+ export declare const environmentsControllerReleaseImpact: (slug: string, params?: EnvironmentsControllerReleaseImpactParams, options?: RequestInit) => Promise<ExecutionEnvironmentReleaseImpactDtoDataArrayEnvelope>;
35
+ export declare const getEnvironmentsControllerRollbackUrl: (slug: string, params?: EnvironmentsControllerRollbackParams) => string;
36
+ /**
37
+ * @summary CAS-rollback an Environment channel to a prior ReleaseSet
38
+ */
39
+ export declare const environmentsControllerRollback: (slug: string, rollbackExecutionEnvironmentDto: RollbackExecutionEnvironmentDto, params?: EnvironmentsControllerRollbackParams, options?: RequestInit) => Promise<ExecutionEnvironmentResponseDtoDataEnvelope>;
19
40
  export declare const getEnvironmentsControllerFindBySlugUrl: (slug: string, params?: EnvironmentsControllerFindBySlugParams) => string;
20
41
  /**
21
42
  * Resolves a built-in by slug. With `orgId`, an org-custom slug resolves before the built-in fallback. 404 if unknown.
@@ -24,7 +45,7 @@ export declare const getEnvironmentsControllerFindBySlugUrl: (slug: string, para
24
45
  export declare const environmentsControllerFindBySlug: (slug: string, params?: EnvironmentsControllerFindBySlugParams, options?: RequestInit) => Promise<ExecutionEnvironmentResponseDtoDataEnvelope>;
25
46
  export declare const getEnvironmentsControllerUpdateUrl: (slug: string, params: EnvironmentsControllerUpdateParams) => string;
26
47
  /**
27
- * Updates the mutable fields (description / allowedCapabilities / approvalRules / runtimeLimits) of an org-custom environment. Refuses built-ins with 403 (immutable). `slug` / `kind` / `orgId` are immutable.
48
+ * Updates identity description and authors an immutable policy revision for allowedCapabilities / approvalRules / runtimeLimits, then CAS-promotes its generic stable channel. Refuses built-ins with 403. `slug` / `kind` / `orgId` are immutable.
28
49
  * @summary Update an org-custom ExecutionEnvironment
29
50
  */
30
51
  export declare const environmentsControllerUpdate: (slug: string, updateExecutionEnvironmentDto: UpdateExecutionEnvironmentDto, params: EnvironmentsControllerUpdateParams, options?: RequestInit) => Promise<ExecutionEnvironmentResponseDtoDataEnvelope>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.environmentsControllerRemove = exports.getEnvironmentsControllerRemoveUrl = exports.environmentsControllerUpdate = exports.getEnvironmentsControllerUpdateUrl = exports.environmentsControllerFindBySlug = exports.getEnvironmentsControllerFindBySlugUrl = exports.environmentsControllerCreate = exports.getEnvironmentsControllerCreateUrl = exports.environmentsControllerList = exports.getEnvironmentsControllerListUrl = void 0;
3
+ exports.environmentsControllerRemove = exports.getEnvironmentsControllerRemoveUrl = exports.environmentsControllerUpdate = exports.getEnvironmentsControllerUpdateUrl = exports.environmentsControllerFindBySlug = exports.getEnvironmentsControllerFindBySlugUrl = exports.environmentsControllerRollback = exports.getEnvironmentsControllerRollbackUrl = exports.environmentsControllerReleaseImpact = exports.getEnvironmentsControllerReleaseImpactUrl = exports.environmentsControllerReleaseHistory = exports.getEnvironmentsControllerReleaseHistoryUrl = exports.environmentsControllerResolveExactPolicy = exports.getEnvironmentsControllerResolveExactPolicyUrl = exports.environmentsControllerCreate = exports.getEnvironmentsControllerCreateUrl = exports.environmentsControllerList = exports.getEnvironmentsControllerListUrl = void 0;
4
4
  const custom_fetch_1 = require("../../custom-fetch");
5
5
  const getEnvironmentsControllerListUrl = (params) => {
6
6
  const normalizedParams = new URLSearchParams();
@@ -53,6 +53,122 @@ const environmentsControllerCreate = async (createExecutionEnvironmentDto, optio
53
53
  });
54
54
  };
55
55
  exports.environmentsControllerCreate = environmentsControllerCreate;
56
+ const getEnvironmentsControllerResolveExactPolicyUrl = (slug, contentHash) => {
57
+ return `/environments/${slug}/revisions/${contentHash}`;
58
+ };
59
+ exports.getEnvironmentsControllerResolveExactPolicyUrl = getEnvironmentsControllerResolveExactPolicyUrl;
60
+ /**
61
+ * Service-only authority read. Tenant scope comes exclusively from the verified request context; the response includes the exact revision/hash and complete canonical Environment policy ceilings.
62
+ * @summary Resolve one exact immutable Environment policy publication
63
+ */
64
+ const environmentsControllerResolveExactPolicy = async (slug, contentHash, options) => {
65
+ return (0, custom_fetch_1.customFetch)((0, exports.getEnvironmentsControllerResolveExactPolicyUrl)(slug, contentHash), {
66
+ ...options,
67
+ method: 'GET'
68
+ });
69
+ };
70
+ exports.environmentsControllerResolveExactPolicy = environmentsControllerResolveExactPolicy;
71
+ const getEnvironmentsControllerReleaseHistoryUrl = (slug, params) => {
72
+ const normalizedParams = new URLSearchParams();
73
+ Object.entries(params || {}).forEach(([key, value]) => {
74
+ if (value === undefined)
75
+ return;
76
+ if (value === null) {
77
+ normalizedParams.append(key, 'null');
78
+ return;
79
+ }
80
+ if (Array.isArray(value)) {
81
+ for (const item of value) {
82
+ if (item === undefined || item === null)
83
+ continue;
84
+ normalizedParams.append(key, item.toString());
85
+ }
86
+ return;
87
+ }
88
+ normalizedParams.append(key, value.toString());
89
+ });
90
+ const stringifiedParams = normalizedParams.toString();
91
+ return stringifiedParams.length > 0 ? `/environments/${slug}/release-history?${stringifiedParams}` : `/environments/${slug}/release-history`;
92
+ };
93
+ exports.getEnvironmentsControllerReleaseHistoryUrl = getEnvironmentsControllerReleaseHistoryUrl;
94
+ /**
95
+ * @summary List immutable generic ReleaseSet history for an Environment
96
+ */
97
+ const environmentsControllerReleaseHistory = async (slug, params, options) => {
98
+ return (0, custom_fetch_1.customFetch)((0, exports.getEnvironmentsControllerReleaseHistoryUrl)(slug, params), {
99
+ ...options,
100
+ method: 'GET'
101
+ });
102
+ };
103
+ exports.environmentsControllerReleaseHistory = environmentsControllerReleaseHistory;
104
+ const getEnvironmentsControllerReleaseImpactUrl = (slug, params) => {
105
+ const normalizedParams = new URLSearchParams();
106
+ Object.entries(params || {}).forEach(([key, value]) => {
107
+ if (value === undefined)
108
+ return;
109
+ if (value === null) {
110
+ normalizedParams.append(key, 'null');
111
+ return;
112
+ }
113
+ if (Array.isArray(value)) {
114
+ for (const item of value) {
115
+ if (item === undefined || item === null)
116
+ continue;
117
+ normalizedParams.append(key, item.toString());
118
+ }
119
+ return;
120
+ }
121
+ normalizedParams.append(key, value.toString());
122
+ });
123
+ const stringifiedParams = normalizedParams.toString();
124
+ return stringifiedParams.length > 0 ? `/environments/${slug}/release-impact?${stringifiedParams}` : `/environments/${slug}/release-impact`;
125
+ };
126
+ exports.getEnvironmentsControllerReleaseImpactUrl = getEnvironmentsControllerReleaseImpactUrl;
127
+ /**
128
+ * @summary Preview reverse-transitive impact of the selected Environment release
129
+ */
130
+ const environmentsControllerReleaseImpact = async (slug, params, options) => {
131
+ return (0, custom_fetch_1.customFetch)((0, exports.getEnvironmentsControllerReleaseImpactUrl)(slug, params), {
132
+ ...options,
133
+ method: 'GET'
134
+ });
135
+ };
136
+ exports.environmentsControllerReleaseImpact = environmentsControllerReleaseImpact;
137
+ const getEnvironmentsControllerRollbackUrl = (slug, params) => {
138
+ const normalizedParams = new URLSearchParams();
139
+ Object.entries(params || {}).forEach(([key, value]) => {
140
+ if (value === undefined)
141
+ return;
142
+ if (value === null) {
143
+ normalizedParams.append(key, 'null');
144
+ return;
145
+ }
146
+ if (Array.isArray(value)) {
147
+ for (const item of value) {
148
+ if (item === undefined || item === null)
149
+ continue;
150
+ normalizedParams.append(key, item.toString());
151
+ }
152
+ return;
153
+ }
154
+ normalizedParams.append(key, value.toString());
155
+ });
156
+ const stringifiedParams = normalizedParams.toString();
157
+ return stringifiedParams.length > 0 ? `/environments/${slug}/rollback?${stringifiedParams}` : `/environments/${slug}/rollback`;
158
+ };
159
+ exports.getEnvironmentsControllerRollbackUrl = getEnvironmentsControllerRollbackUrl;
160
+ /**
161
+ * @summary CAS-rollback an Environment channel to a prior ReleaseSet
162
+ */
163
+ const environmentsControllerRollback = async (slug, rollbackExecutionEnvironmentDto, params, options) => {
164
+ return (0, custom_fetch_1.customFetch)((0, exports.getEnvironmentsControllerRollbackUrl)(slug, params), {
165
+ ...options,
166
+ method: 'POST',
167
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
168
+ body: JSON.stringify(rollbackExecutionEnvironmentDto)
169
+ });
170
+ };
171
+ exports.environmentsControllerRollback = environmentsControllerRollback;
56
172
  const getEnvironmentsControllerFindBySlugUrl = (slug, params) => {
57
173
  const normalizedParams = new URLSearchParams();
58
174
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -111,7 +227,7 @@ const getEnvironmentsControllerUpdateUrl = (slug, params) => {
111
227
  };
112
228
  exports.getEnvironmentsControllerUpdateUrl = getEnvironmentsControllerUpdateUrl;
113
229
  /**
114
- * Updates the mutable fields (description / allowedCapabilities / approvalRules / runtimeLimits) of an org-custom environment. Refuses built-ins with 403 (immutable). `slug` / `kind` / `orgId` are immutable.
230
+ * Updates identity description and authors an immutable policy revision for allowedCapabilities / approvalRules / runtimeLimits, then CAS-promotes its generic stable channel. Refuses built-ins with 403. `slug` / `kind` / `orgId` are immutable.
115
231
  * @summary Update an org-custom ExecutionEnvironment
116
232
  */
117
233
  const environmentsControllerUpdate = async (slug, updateExecutionEnvironmentDto, params, options) => {
@@ -0,0 +1,5 @@
1
+ export declare const getOrgErasureControllerEraseUrl: (orgId: string) => string;
2
+ /**
3
+ * @summary Erase every row belonging to an org across this service's org-scoped models
4
+ */
5
+ export declare const orgErasureControllerErase: (orgId: string, options?: RequestInit) => Promise<void>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.orgErasureControllerErase = exports.getOrgErasureControllerEraseUrl = void 0;
4
+ /**
5
+ * Generated by @xemahq/api-client-generator — do not edit manually.
6
+ * Authorization API
7
+ * OpenAPI spec version: 0.1.1
8
+ */
9
+ const custom_fetch_1 = require("../../custom-fetch");
10
+ const getOrgErasureControllerEraseUrl = (orgId) => {
11
+ return `/internal/org-erasure/${orgId}`;
12
+ };
13
+ exports.getOrgErasureControllerEraseUrl = getOrgErasureControllerEraseUrl;
14
+ /**
15
+ * @summary Erase every row belonging to an org across this service's org-scoped models
16
+ */
17
+ const orgErasureControllerErase = async (orgId, options) => {
18
+ return (0, custom_fetch_1.customFetch)((0, exports.getOrgErasureControllerEraseUrl)(orgId), {
19
+ ...options,
20
+ method: 'POST'
21
+ });
22
+ };
23
+ exports.orgErasureControllerErase = orgErasureControllerErase;
@@ -0,0 +1,41 @@
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 { ImpactedOutputRouteConsumerDtoDataArrayEnvelope, OutputRouteAuthorityDtoDataEnvelope, OutputRoutePublicationRequestDtoDataEnvelope, OutputRouteReleaseHistoryDtoDataArrayEnvelope, OutputRouteReleaseRequestDtoDataEnvelope, OutputRouteRevisionsControllerReleaseHistoryParams, PreviewOutputRouteImpactDto, RequestOutputRouteRetirementDto, RequestOutputRouteRevisionReleaseDto, RequestOutputRouteRollbackDto, ResolveExactOutputRouteDto, ResolveOutputRouteChannelDto } from '../../models';
7
+ export declare const getOutputRouteRevisionsControllerRequestRevisionReleaseUrl: () => string;
8
+ /**
9
+ * @summary Publish an immutable OutputRoute revision and request its governed channel release
10
+ */
11
+ export declare const outputRouteRevisionsControllerRequestRevisionRelease: (requestOutputRouteRevisionReleaseDto: RequestOutputRouteRevisionReleaseDto, options?: RequestInit) => Promise<OutputRoutePublicationRequestDtoDataEnvelope>;
12
+ export declare const getOutputRouteRevisionsControllerResolveExactUrl: () => string;
13
+ /**
14
+ * @summary Resolve one exact OutputRoute revision and current subject access
15
+ */
16
+ export declare const outputRouteRevisionsControllerResolveExact: (resolveExactOutputRouteDto: ResolveExactOutputRouteDto, options?: RequestInit) => Promise<OutputRouteAuthorityDtoDataEnvelope>;
17
+ export declare const getOutputRouteRevisionsControllerResolveChannelUrl: () => string;
18
+ /**
19
+ * @summary Resolve a governed OutputRoute channel to the exact pin a new binding must persist
20
+ */
21
+ export declare const outputRouteRevisionsControllerResolveChannel: (resolveOutputRouteChannelDto: ResolveOutputRouteChannelDto, options?: RequestInit) => Promise<OutputRouteAuthorityDtoDataEnvelope>;
22
+ export declare const getOutputRouteRevisionsControllerRequestRetirementUrl: (routeId: string) => string;
23
+ /**
24
+ * @summary Request governed OutputRoute channel retirement without invalidating exact historical pins
25
+ */
26
+ export declare const outputRouteRevisionsControllerRequestRetirement: (routeId: string, requestOutputRouteRetirementDto: RequestOutputRouteRetirementDto, options?: RequestInit) => Promise<OutputRouteReleaseRequestDtoDataEnvelope>;
27
+ export declare const getOutputRouteRevisionsControllerRequestRollbackUrl: (routeId: string) => string;
28
+ /**
29
+ * @summary Request rollback to an immutable prior ReleaseSet
30
+ */
31
+ export declare const outputRouteRevisionsControllerRequestRollback: (routeId: string, requestOutputRouteRollbackDto: RequestOutputRouteRollbackDto, options?: RequestInit) => Promise<OutputRouteReleaseRequestDtoDataEnvelope>;
32
+ export declare const getOutputRouteRevisionsControllerReleaseHistoryUrl: (routeId: string, params: OutputRouteRevisionsControllerReleaseHistoryParams) => string;
33
+ /**
34
+ * @summary List immutable governed OutputRoute release history
35
+ */
36
+ export declare const outputRouteRevisionsControllerReleaseHistory: (routeId: string, params: OutputRouteRevisionsControllerReleaseHistoryParams, options?: RequestInit) => Promise<OutputRouteReleaseHistoryDtoDataArrayEnvelope>;
37
+ export declare const getOutputRouteRevisionsControllerPreviewImpactUrl: (routeId: string) => string;
38
+ /**
39
+ * @summary Preview reverse impact of a channel advance
40
+ */
41
+ export declare const outputRouteRevisionsControllerPreviewImpact: (routeId: string, previewOutputRouteImpactDto: PreviewOutputRouteImpactDto, options?: RequestInit) => Promise<ImpactedOutputRouteConsumerDtoDataArrayEnvelope>;
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.outputRouteRevisionsControllerPreviewImpact = exports.getOutputRouteRevisionsControllerPreviewImpactUrl = exports.outputRouteRevisionsControllerReleaseHistory = exports.getOutputRouteRevisionsControllerReleaseHistoryUrl = exports.outputRouteRevisionsControllerRequestRollback = exports.getOutputRouteRevisionsControllerRequestRollbackUrl = exports.outputRouteRevisionsControllerRequestRetirement = exports.getOutputRouteRevisionsControllerRequestRetirementUrl = exports.outputRouteRevisionsControllerResolveChannel = exports.getOutputRouteRevisionsControllerResolveChannelUrl = exports.outputRouteRevisionsControllerResolveExact = exports.getOutputRouteRevisionsControllerResolveExactUrl = exports.outputRouteRevisionsControllerRequestRevisionRelease = exports.getOutputRouteRevisionsControllerRequestRevisionReleaseUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ const getOutputRouteRevisionsControllerRequestRevisionReleaseUrl = () => {
6
+ return `/output-routes/revisions`;
7
+ };
8
+ exports.getOutputRouteRevisionsControllerRequestRevisionReleaseUrl = getOutputRouteRevisionsControllerRequestRevisionReleaseUrl;
9
+ /**
10
+ * @summary Publish an immutable OutputRoute revision and request its governed channel release
11
+ */
12
+ const outputRouteRevisionsControllerRequestRevisionRelease = async (requestOutputRouteRevisionReleaseDto, options) => {
13
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerRequestRevisionReleaseUrl)(), {
14
+ ...options,
15
+ method: 'POST',
16
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
17
+ body: JSON.stringify(requestOutputRouteRevisionReleaseDto)
18
+ });
19
+ };
20
+ exports.outputRouteRevisionsControllerRequestRevisionRelease = outputRouteRevisionsControllerRequestRevisionRelease;
21
+ const getOutputRouteRevisionsControllerResolveExactUrl = () => {
22
+ return `/output-routes/resolve-exact`;
23
+ };
24
+ exports.getOutputRouteRevisionsControllerResolveExactUrl = getOutputRouteRevisionsControllerResolveExactUrl;
25
+ /**
26
+ * @summary Resolve one exact OutputRoute revision and current subject access
27
+ */
28
+ const outputRouteRevisionsControllerResolveExact = async (resolveExactOutputRouteDto, options) => {
29
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerResolveExactUrl)(), {
30
+ ...options,
31
+ method: 'POST',
32
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
33
+ body: JSON.stringify(resolveExactOutputRouteDto)
34
+ });
35
+ };
36
+ exports.outputRouteRevisionsControllerResolveExact = outputRouteRevisionsControllerResolveExact;
37
+ const getOutputRouteRevisionsControllerResolveChannelUrl = () => {
38
+ return `/output-routes/resolve-channel`;
39
+ };
40
+ exports.getOutputRouteRevisionsControllerResolveChannelUrl = getOutputRouteRevisionsControllerResolveChannelUrl;
41
+ /**
42
+ * @summary Resolve a governed OutputRoute channel to the exact pin a new binding must persist
43
+ */
44
+ const outputRouteRevisionsControllerResolveChannel = async (resolveOutputRouteChannelDto, options) => {
45
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerResolveChannelUrl)(), {
46
+ ...options,
47
+ method: 'POST',
48
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
49
+ body: JSON.stringify(resolveOutputRouteChannelDto)
50
+ });
51
+ };
52
+ exports.outputRouteRevisionsControllerResolveChannel = outputRouteRevisionsControllerResolveChannel;
53
+ const getOutputRouteRevisionsControllerRequestRetirementUrl = (routeId) => {
54
+ return `/output-routes/${routeId}/retire-requests`;
55
+ };
56
+ exports.getOutputRouteRevisionsControllerRequestRetirementUrl = getOutputRouteRevisionsControllerRequestRetirementUrl;
57
+ /**
58
+ * @summary Request governed OutputRoute channel retirement without invalidating exact historical pins
59
+ */
60
+ const outputRouteRevisionsControllerRequestRetirement = async (routeId, requestOutputRouteRetirementDto, options) => {
61
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerRequestRetirementUrl)(routeId), {
62
+ ...options,
63
+ method: 'POST',
64
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
65
+ body: JSON.stringify(requestOutputRouteRetirementDto)
66
+ });
67
+ };
68
+ exports.outputRouteRevisionsControllerRequestRetirement = outputRouteRevisionsControllerRequestRetirement;
69
+ const getOutputRouteRevisionsControllerRequestRollbackUrl = (routeId) => {
70
+ return `/output-routes/${routeId}/rollback-requests`;
71
+ };
72
+ exports.getOutputRouteRevisionsControllerRequestRollbackUrl = getOutputRouteRevisionsControllerRequestRollbackUrl;
73
+ /**
74
+ * @summary Request rollback to an immutable prior ReleaseSet
75
+ */
76
+ const outputRouteRevisionsControllerRequestRollback = async (routeId, requestOutputRouteRollbackDto, options) => {
77
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerRequestRollbackUrl)(routeId), {
78
+ ...options,
79
+ method: 'POST',
80
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
81
+ body: JSON.stringify(requestOutputRouteRollbackDto)
82
+ });
83
+ };
84
+ exports.outputRouteRevisionsControllerRequestRollback = outputRouteRevisionsControllerRequestRollback;
85
+ const getOutputRouteRevisionsControllerReleaseHistoryUrl = (routeId, params) => {
86
+ const normalizedParams = new URLSearchParams();
87
+ Object.entries(params || {}).forEach(([key, value]) => {
88
+ if (value === undefined)
89
+ return;
90
+ if (value === null) {
91
+ normalizedParams.append(key, 'null');
92
+ return;
93
+ }
94
+ if (Array.isArray(value)) {
95
+ for (const item of value) {
96
+ if (item === undefined || item === null)
97
+ continue;
98
+ normalizedParams.append(key, item.toString());
99
+ }
100
+ return;
101
+ }
102
+ normalizedParams.append(key, value.toString());
103
+ });
104
+ const stringifiedParams = normalizedParams.toString();
105
+ return stringifiedParams.length > 0 ? `/output-routes/${routeId}/release-history?${stringifiedParams}` : `/output-routes/${routeId}/release-history`;
106
+ };
107
+ exports.getOutputRouteRevisionsControllerReleaseHistoryUrl = getOutputRouteRevisionsControllerReleaseHistoryUrl;
108
+ /**
109
+ * @summary List immutable governed OutputRoute release history
110
+ */
111
+ const outputRouteRevisionsControllerReleaseHistory = async (routeId, params, options) => {
112
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerReleaseHistoryUrl)(routeId, params), {
113
+ ...options,
114
+ method: 'GET'
115
+ });
116
+ };
117
+ exports.outputRouteRevisionsControllerReleaseHistory = outputRouteRevisionsControllerReleaseHistory;
118
+ const getOutputRouteRevisionsControllerPreviewImpactUrl = (routeId) => {
119
+ return `/output-routes/${routeId}/release-impact`;
120
+ };
121
+ exports.getOutputRouteRevisionsControllerPreviewImpactUrl = getOutputRouteRevisionsControllerPreviewImpactUrl;
122
+ /**
123
+ * @summary Preview reverse impact of a channel advance
124
+ */
125
+ const outputRouteRevisionsControllerPreviewImpact = async (routeId, previewOutputRouteImpactDto, options) => {
126
+ return (0, custom_fetch_1.customFetch)((0, exports.getOutputRouteRevisionsControllerPreviewImpactUrl)(routeId), {
127
+ ...options,
128
+ method: 'POST',
129
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
130
+ body: JSON.stringify(previewOutputRouteImpactDto)
131
+ });
132
+ };
133
+ exports.outputRouteRevisionsControllerPreviewImpact = outputRouteRevisionsControllerPreviewImpact;
@@ -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
+ import type { ExactResourceAuthorityDtoDataEnvelope, RegisterResourceRevisionDto, RegisteredResourceRevisionDtoDataEnvelope, ResolveExactResourceRevisionDto } from '../../models';
7
+ export declare const getResourceRevisionsControllerRegisterUrl: () => string;
8
+ /**
9
+ * @summary Register immutable resource revision metadata
10
+ */
11
+ export declare const resourceRevisionsControllerRegister: (registerResourceRevisionDto: RegisterResourceRevisionDto, options?: RequestInit) => Promise<RegisteredResourceRevisionDtoDataEnvelope>;
12
+ export declare const getResourceRevisionsControllerResolveExactUrl: () => string;
13
+ /**
14
+ * @summary Resolve exact resource metadata and current subject access
15
+ */
16
+ export declare const resourceRevisionsControllerResolveExact: (resolveExactResourceRevisionDto: ResolveExactResourceRevisionDto, options?: RequestInit) => Promise<ExactResourceAuthorityDtoDataEnvelope>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resourceRevisionsControllerResolveExact = exports.getResourceRevisionsControllerResolveExactUrl = exports.resourceRevisionsControllerRegister = exports.getResourceRevisionsControllerRegisterUrl = void 0;
4
+ const custom_fetch_1 = require("../../custom-fetch");
5
+ const getResourceRevisionsControllerRegisterUrl = () => {
6
+ return `/resource-revisions`;
7
+ };
8
+ exports.getResourceRevisionsControllerRegisterUrl = getResourceRevisionsControllerRegisterUrl;
9
+ /**
10
+ * @summary Register immutable resource revision metadata
11
+ */
12
+ const resourceRevisionsControllerRegister = async (registerResourceRevisionDto, options) => {
13
+ return (0, custom_fetch_1.customFetch)((0, exports.getResourceRevisionsControllerRegisterUrl)(), {
14
+ ...options,
15
+ method: 'POST',
16
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
17
+ body: JSON.stringify(registerResourceRevisionDto)
18
+ });
19
+ };
20
+ exports.resourceRevisionsControllerRegister = resourceRevisionsControllerRegister;
21
+ const getResourceRevisionsControllerResolveExactUrl = () => {
22
+ return `/resource-revisions/resolve-exact`;
23
+ };
24
+ exports.getResourceRevisionsControllerResolveExactUrl = getResourceRevisionsControllerResolveExactUrl;
25
+ /**
26
+ * @summary Resolve exact resource metadata and current subject access
27
+ */
28
+ const resourceRevisionsControllerResolveExact = async (resolveExactResourceRevisionDto, options) => {
29
+ return (0, custom_fetch_1.customFetch)((0, exports.getResourceRevisionsControllerResolveExactUrl)(), {
30
+ ...options,
31
+ method: 'POST',
32
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
33
+ body: JSON.stringify(resolveExactResourceRevisionDto)
34
+ });
35
+ };
36
+ exports.resourceRevisionsControllerResolveExact = resourceRevisionsControllerResolveExact;
package/dist/index.d.ts CHANGED
@@ -7,8 +7,11 @@ export * from './endpoints/credential-defaults/credential-defaults';
7
7
  export * from './endpoints/describe-objects/describe-objects';
8
8
  export * from './endpoints/environments/environments';
9
9
  export * from './endpoints/grants/grants';
10
+ export * from './endpoints/org-erasure/org-erasure';
11
+ export * from './endpoints/output-routes/output-routes';
10
12
  export * from './endpoints/profiles/profiles';
11
13
  export * from './endpoints/relationships/relationships';
14
+ export * from './endpoints/resource-revisions/resource-revisions';
12
15
  export * from './endpoints/resources/resources';
13
16
  export * from './endpoints/roles/roles';
14
17
  export * from './endpoints/teams/teams';
package/dist/index.js CHANGED
@@ -29,8 +29,11 @@ __exportStar(require("./endpoints/credential-defaults/credential-defaults"), exp
29
29
  __exportStar(require("./endpoints/describe-objects/describe-objects"), exports);
30
30
  __exportStar(require("./endpoints/environments/environments"), exports);
31
31
  __exportStar(require("./endpoints/grants/grants"), exports);
32
+ __exportStar(require("./endpoints/org-erasure/org-erasure"), exports);
33
+ __exportStar(require("./endpoints/output-routes/output-routes"), exports);
32
34
  __exportStar(require("./endpoints/profiles/profiles"), exports);
33
35
  __exportStar(require("./endpoints/relationships/relationships"), exports);
36
+ __exportStar(require("./endpoints/resource-revisions/resource-revisions"), exports);
34
37
  __exportStar(require("./endpoints/resources/resources"), exports);
35
38
  __exportStar(require("./endpoints/roles/roles"), exports);
36
39
  __exportStar(require("./endpoints/teams/teams"), exports);
@@ -3,7 +3,10 @@
3
3
  * Authorization API
4
4
  * OpenAPI spec version: 0.1.1
5
5
  */
6
+ import type { ResourceShareRefDto } from './resourceShareRefDto.js';
6
7
  import type { ResourceSubjectRefDto } from './resourceSubjectRefDto.js';
7
8
  export interface AddResourceShareDto {
8
- share: ResourceSubjectRefDto;
9
+ share: ResourceShareRefDto;
10
+ /** The subject GRANTING this share, when it is not the instance owner. Used to apply the two delegation rules: a grantor may never confer more than they hold, and re-sharing is itself a level. Omitted means the caller asserts owner authority, which this service verifies against the tuple store — it is never taken on the caller's word. */
11
+ grantor?: ResourceSubjectRefDto;
9
12
  }
@@ -7,7 +7,6 @@ import type { GrantConstraintsDto } from './grantConstraintsDto.js';
7
7
  export interface AddRoleGrantDto {
8
8
  /** Canonical CapabilityRef from `@xemahq/kernel-contracts/capability`. */
9
9
  capability: string;
10
- resourceGlob?: string;
11
10
  /** Built-in environment slug. */
12
11
  environment: string;
13
12
  constraints?: GrantConstraintsDto;
@@ -0,0 +1,11 @@
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 CapabilityEffectClass = typeof CapabilityEffectClass[keyof typeof CapabilityEffectClass];
7
+ export declare const CapabilityEffectClass: {
8
+ readonly read: "read";
9
+ readonly write: "write";
10
+ readonly admin: "admin";
11
+ };
@@ -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.CapabilityEffectClass = void 0;
9
+ exports.CapabilityEffectClass = {
10
+ read: 'read',
11
+ write: 'write',
12
+ admin: 'admin',
13
+ };
@@ -13,7 +13,6 @@ export interface CapabilityGrantDto {
13
13
  subjectKind: SubjectKind;
14
14
  subjectRef: string;
15
15
  capability: string;
16
- resourceGlob: string;
17
16
  environment: string;
18
17
  constraints?: GrantConstraintsDto | null;
19
18
  requiresApproval: boolean;
@@ -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
+ * Canonical capability reach ceiling derived from `kind`.
8
+ */
9
+ export type CapabilityReach = typeof CapabilityReach[keyof typeof CapabilityReach];
10
+ export declare const CapabilityReach: {
11
+ readonly owner: "owner";
12
+ readonly integration: "integration";
13
+ readonly platform: "platform";
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.CapabilityReach = void 0;
9
+ exports.CapabilityReach = {
10
+ owner: 'owner',
11
+ integration: 'integration',
12
+ platform: 'platform',
13
+ };