@xemahq/app-platform-api-client 0.3.9 → 0.3.13

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 (41) hide show
  1. package/dist/custom-fetch.d.ts +22 -0
  2. package/dist/custom-fetch.js +27 -0
  3. package/dist/endpoints/delegated-session-keys/delegated-session-keys.d.ts +5 -0
  4. package/dist/endpoints/delegated-session-keys/delegated-session-keys.js +23 -0
  5. package/dist/endpoints/project-apps/project-apps.d.ts +36 -6
  6. package/dist/endpoints/project-apps/project-apps.js +115 -8
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +1 -0
  9. package/dist/models/anonAuthDto.d.ts +6 -2
  10. package/dist/models/anonAuthResultDto.d.ts +2 -0
  11. package/dist/models/appDto.d.ts +5 -3
  12. package/dist/models/appDtoPaginatedEnvelope.d.ts +11 -0
  13. package/dist/models/appDtoPaginatedEnvelope.js +2 -0
  14. package/dist/models/audiencePolicyDto.d.ts +4 -3
  15. package/dist/models/createAudiencePolicyDto.d.ts +3 -1
  16. package/dist/models/createPortalDto.d.ts +3 -3
  17. package/dist/models/createProjectAppDto.d.ts +3 -3
  18. package/dist/models/delegatedSessionActorDto.d.ts +12 -0
  19. package/dist/models/delegatedSessionActorDto.js +2 -0
  20. package/dist/models/index.d.ts +7 -2
  21. package/dist/models/index.js +7 -2
  22. package/dist/models/installPortalBiomeDto.d.ts +14 -0
  23. package/dist/models/installPortalBiomeDto.js +2 -0
  24. package/dist/models/{audiencePolicyDtoRateLimitPerHourPerSubject.d.ts → installPortalBiomeDtoConfiguration.d.ts} +3 -3
  25. package/dist/models/oidcAuthDto.d.ts +6 -2
  26. package/dist/models/oidcAuthResultDto.d.ts +2 -0
  27. package/dist/models/paginationMeta.d.ts +16 -0
  28. package/dist/models/portalDetailDto.d.ts +3 -0
  29. package/dist/models/portalsControllerListParams.d.ts +18 -0
  30. package/dist/models/{updateAudiencePolicyDtoRateLimitPerHourPerSubject.d.ts → portalsControllerListParams.js} +2 -6
  31. package/dist/models/projectAppsControllerListParams.d.ts +4 -0
  32. package/dist/models/requestMagicLinkDto.d.ts +4 -2
  33. package/dist/models/unarchivePortalDto.d.ts +9 -0
  34. package/dist/models/unarchivePortalDto.js +2 -0
  35. package/dist/models/updateAudiencePolicyDto.d.ts +2 -3
  36. package/dist/models/updatePortalDto.d.ts +1 -9
  37. package/dist/models/verifyDelegatedSessionResponseDto.d.ts +2 -1
  38. package/dist/models/verifyMagicLinkResultDto.d.ts +2 -0
  39. package/package.json +2 -2
  40. /package/dist/models/{audiencePolicyDtoRateLimitPerHourPerSubject.js → installPortalBiomeDtoConfiguration.js} +0 -0
  41. /package/dist/models/{updateAudiencePolicyDtoRateLimitPerHourPerSubject.js → paginationMeta.js} +0 -0
@@ -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();
@@ -0,0 +1,5 @@
1
+ export declare const getDelegatedSessionJwksControllerJwksUrl: () => string;
2
+ /**
3
+ * @summary Public signing keys for delegated-session JWTs. Contains the ACTIVE key plus any key rotated out but still inside its publication window.
4
+ */
5
+ export declare const delegatedSessionJwksControllerJwks: (options?: RequestInit) => Promise<void>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.delegatedSessionJwksControllerJwks = exports.getDelegatedSessionJwksControllerJwksUrl = void 0;
4
+ /**
5
+ * Generated by @xemahq/api-client-generator — do not edit manually.
6
+ * App Runtime API
7
+ * OpenAPI spec version: 0.1.2
8
+ */
9
+ const custom_fetch_1 = require("../../custom-fetch");
10
+ const getDelegatedSessionJwksControllerJwksUrl = () => {
11
+ return `/public/.well-known/delegated-session-jwks.json`;
12
+ };
13
+ exports.getDelegatedSessionJwksControllerJwksUrl = getDelegatedSessionJwksControllerJwksUrl;
14
+ /**
15
+ * @summary Public signing keys for delegated-session JWTs. Contains the ACTIVE key plus any key rotated out but still inside its publication window.
16
+ */
17
+ const delegatedSessionJwksControllerJwks = async (options) => {
18
+ return (0, custom_fetch_1.customFetch)((0, exports.getDelegatedSessionJwksControllerJwksUrl)(), {
19
+ ...options,
20
+ method: 'GET'
21
+ });
22
+ };
23
+ exports.delegatedSessionJwksControllerJwks = delegatedSessionJwksControllerJwks;
@@ -3,7 +3,7 @@
3
3
  * App Runtime API
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
- import type { AppClientDtoDataArrayEnvelope, AppClientDtoDataEnvelope, AppDtoDataArrayEnvelope, AppDtoDataEnvelope, AppReleaseDtoDataArrayEnvelope, AppReleaseDtoDataEnvelope, AudiencePolicyDtoDataArrayEnvelope, AudiencePolicyDtoDataEnvelope, CreateAppClientDto, CreateAudiencePolicyDto, CreatePortalDto, CreateProjectAppDto, CreatedAppClientDtoDataEnvelope, PortalDetailDtoDataEnvelope, ProjectAppsControllerListParams, UpdateAudiencePolicyDto, UpdatePortalDto } from '../../models';
6
+ import type { AppClientDtoDataArrayEnvelope, AppClientDtoDataEnvelope, AppDtoDataArrayEnvelope, AppDtoDataEnvelope, AppDtoPaginatedEnvelope, AppReleaseDtoDataArrayEnvelope, AppReleaseDtoDataEnvelope, AudiencePolicyDtoDataArrayEnvelope, AudiencePolicyDtoDataEnvelope, CreateAppClientDto, CreateAudiencePolicyDto, CreatePortalDto, CreateProjectAppDto, CreatedAppClientDtoDataEnvelope, InstallPortalBiomeDto, PortalDetailDtoDataEnvelope, PortalsControllerListParams, ProjectAppsControllerListParams, UnarchivePortalDto, UpdateAudiencePolicyDto, UpdatePortalDto } from '../../models';
7
7
  export declare const getProjectAppsControllerCreateUrl: () => string;
8
8
  /**
9
9
  * @summary Create an App in the caller org + named project.
@@ -11,7 +11,7 @@ export declare const getProjectAppsControllerCreateUrl: () => string;
11
11
  export declare const projectAppsControllerCreate: (createProjectAppDto: CreateProjectAppDto, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
12
12
  export declare const getProjectAppsControllerListUrl: (params?: ProjectAppsControllerListParams) => string;
13
13
  /**
14
- * @summary List Apps in the caller org (optionally filtered by project/slug).
14
+ * @summary List Apps in the caller org (optionally filtered by project/slug). Archived Apps are excluded unless `includeArchived=true`.
15
15
  */
16
16
  export declare const projectAppsControllerList: (params?: ProjectAppsControllerListParams, options?: RequestInit) => Promise<AppDtoDataArrayEnvelope>;
17
17
  export declare const getProjectAppsControllerGetByIdUrl: (id: string) => string;
@@ -69,11 +69,11 @@ export declare const getProjectAudiencePoliciesControllerDeleteUrl: (id: string)
69
69
  * @summary Delete an AudiencePolicy owned by the caller org.
70
70
  */
71
71
  export declare const projectAudiencePoliciesControllerDelete: (id: string, options?: RequestInit) => Promise<void>;
72
- export declare const getPortalsControllerListUrl: () => string;
72
+ export declare const getPortalsControllerListUrl: (params?: PortalsControllerListParams) => string;
73
73
  /**
74
- * @summary List the portals the calling user may see in the caller org (visibility-filtered).
74
+ * @summary List the portals the calling user may see in the caller org (visibility-filtered, paginated).
75
75
  */
76
- export declare const portalsControllerList: (options?: RequestInit) => Promise<AppDtoDataArrayEnvelope>;
76
+ export declare const portalsControllerList: (params?: PortalsControllerListParams, options?: RequestInit) => Promise<AppDtoPaginatedEnvelope>;
77
77
  export declare const getPortalsControllerCreateUrl: () => string;
78
78
  /**
79
79
  * @summary Create an org-scoped portal (portal-admin only).
@@ -89,8 +89,38 @@ export declare const getPortalsControllerUpdateUrl: (id: string) => string;
89
89
  * @summary Update a portal owned by the caller org (portal-admin only).
90
90
  */
91
91
  export declare const portalsControllerUpdate: (id: string, updatePortalDto: UpdatePortalDto, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
92
+ export declare const getPortalsControllerRemoveUrl: (id: string) => string;
93
+ /**
94
+ * @summary Hard-delete a UI-owned portal (portal-admin only). Cascades to its releases, app-clients and external subjects. Use archive for a reversible retire; a seeder/IaC/system-owned portal is refused (409) because its producer would recreate it.
95
+ */
96
+ export declare const portalsControllerRemove: (id: string, options?: RequestInit) => Promise<void>;
92
97
  export declare const getPortalsControllerArchiveUrl: (id: string) => string;
93
98
  /**
94
- * @summary Archive a portal owned by the caller org (portal-admin only).
99
+ * @summary Archive a portal owned by the caller org (portal-admin only). Reversible via `POST :id/unarchive`.
95
100
  */
96
101
  export declare const portalsControllerArchive: (id: string, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
102
+ export declare const getPortalsControllerUnarchiveUrl: (id: string) => string;
103
+ /**
104
+ * @summary Un-archive a portal owned by the caller org (portal-admin only). Re-registers its PDP access — `org-shared` unless a block is supplied.
105
+ */
106
+ export declare const portalsControllerUnarchive: (id: string, unarchivePortalDto: UnarchivePortalDto, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
107
+ export declare const getPortalsControllerReadoptUrl: (id: string) => string;
108
+ /**
109
+ * @summary Hand a UI-adopted default portal back to the reconciler (portal-admin only), so it resumes tracking the installed web biomes.
110
+ */
111
+ export declare const portalsControllerReadopt: (id: string, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
112
+ export declare const getPortalsControllerInstallBiomeUrl: (id: string) => string;
113
+ /**
114
+ * @summary Install one biome on a portal (portal-admin only). Idempotent per ref; serialized against concurrent installs by a per-portal lock. Returns 422 for a ref no web biome is registered for.
115
+ */
116
+ export declare const portalsControllerInstallBiome: (id: string, installPortalBiomeDto: InstallPortalBiomeDto, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
117
+ export declare const getPortalsControllerUninstallBiomeUrl: (id: string, encodedRef: string) => string;
118
+ /**
119
+ * @summary Uninstall one biome from a portal (portal-admin only). 404s a ref the portal does not carry, rather than reporting a no-op as success.
120
+ */
121
+ export declare const portalsControllerUninstallBiome: (id: string, encodedRef: string, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
122
+ export declare const getPortalsControllerRefreshLockfileUrl: (id: string) => string;
123
+ /**
124
+ * @summary Refresh a portal lockfile (portal-admin only). Re-pins kernel + installed biomes via the kernel Lockfile Resolver. Returns 422 LOCKFILE_RESOLVER_FAILED on any unsatisfiable constraint, malformed ref, or unreachable upstream.
125
+ */
126
+ export declare const portalsControllerRefreshLockfile: (id: string, options?: RequestInit) => Promise<AppDtoDataEnvelope>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.portalsControllerArchive = exports.getPortalsControllerArchiveUrl = exports.portalsControllerUpdate = exports.getPortalsControllerUpdateUrl = exports.portalsControllerGetOne = exports.getPortalsControllerGetOneUrl = exports.portalsControllerCreate = exports.getPortalsControllerCreateUrl = exports.portalsControllerList = exports.getPortalsControllerListUrl = exports.projectAudiencePoliciesControllerDelete = exports.getProjectAudiencePoliciesControllerDeleteUrl = exports.projectAudiencePoliciesControllerUpdate = exports.getProjectAudiencePoliciesControllerUpdateUrl = exports.projectAudiencePoliciesControllerList = exports.getProjectAudiencePoliciesControllerListUrl = exports.projectAudiencePoliciesControllerCreate = exports.getProjectAudiencePoliciesControllerCreateUrl = exports.projectAppReleasesControllerRollback = exports.getProjectAppReleasesControllerRollbackUrl = exports.projectAppReleasesControllerListHistory = exports.getProjectAppReleasesControllerListHistoryUrl = exports.projectAppReleasesControllerGetLive = exports.getProjectAppReleasesControllerGetLiveUrl = exports.projectAppClientsControllerRevoke = exports.getProjectAppClientsControllerRevokeUrl = exports.projectAppClientsControllerList = exports.getProjectAppClientsControllerListUrl = exports.projectAppClientsControllerCreate = exports.getProjectAppClientsControllerCreateUrl = exports.projectAppsControllerGetById = exports.getProjectAppsControllerGetByIdUrl = exports.projectAppsControllerList = exports.getProjectAppsControllerListUrl = exports.projectAppsControllerCreate = exports.getProjectAppsControllerCreateUrl = void 0;
3
+ exports.portalsControllerRefreshLockfile = exports.getPortalsControllerRefreshLockfileUrl = exports.portalsControllerUninstallBiome = exports.getPortalsControllerUninstallBiomeUrl = exports.portalsControllerInstallBiome = exports.getPortalsControllerInstallBiomeUrl = exports.portalsControllerReadopt = exports.getPortalsControllerReadoptUrl = exports.portalsControllerUnarchive = exports.getPortalsControllerUnarchiveUrl = exports.portalsControllerArchive = exports.getPortalsControllerArchiveUrl = exports.portalsControllerRemove = exports.getPortalsControllerRemoveUrl = exports.portalsControllerUpdate = exports.getPortalsControllerUpdateUrl = exports.portalsControllerGetOne = exports.getPortalsControllerGetOneUrl = exports.portalsControllerCreate = exports.getPortalsControllerCreateUrl = exports.portalsControllerList = exports.getPortalsControllerListUrl = exports.projectAudiencePoliciesControllerDelete = exports.getProjectAudiencePoliciesControllerDeleteUrl = exports.projectAudiencePoliciesControllerUpdate = exports.getProjectAudiencePoliciesControllerUpdateUrl = exports.projectAudiencePoliciesControllerList = exports.getProjectAudiencePoliciesControllerListUrl = exports.projectAudiencePoliciesControllerCreate = exports.getProjectAudiencePoliciesControllerCreateUrl = exports.projectAppReleasesControllerRollback = exports.getProjectAppReleasesControllerRollbackUrl = exports.projectAppReleasesControllerListHistory = exports.getProjectAppReleasesControllerListHistoryUrl = exports.projectAppReleasesControllerGetLive = exports.getProjectAppReleasesControllerGetLiveUrl = exports.projectAppClientsControllerRevoke = exports.getProjectAppClientsControllerRevokeUrl = exports.projectAppClientsControllerList = exports.getProjectAppClientsControllerListUrl = exports.projectAppClientsControllerCreate = exports.getProjectAppClientsControllerCreateUrl = exports.projectAppsControllerGetById = exports.getProjectAppsControllerGetByIdUrl = exports.projectAppsControllerList = exports.getProjectAppsControllerListUrl = exports.projectAppsControllerCreate = exports.getProjectAppsControllerCreateUrl = void 0;
4
4
  const custom_fetch_1 = require("../../custom-fetch");
5
5
  const getProjectAppsControllerCreateUrl = () => {
6
6
  return `/bff/apps`;
@@ -42,7 +42,7 @@ const getProjectAppsControllerListUrl = (params) => {
42
42
  };
43
43
  exports.getProjectAppsControllerListUrl = getProjectAppsControllerListUrl;
44
44
  /**
45
- * @summary List Apps in the caller org (optionally filtered by project/slug).
45
+ * @summary List Apps in the caller org (optionally filtered by project/slug). Archived Apps are excluded unless `includeArchived=true`.
46
46
  */
47
47
  const projectAppsControllerList = async (params, options) => {
48
48
  return (0, custom_fetch_1.customFetch)((0, exports.getProjectAppsControllerListUrl)(params), {
@@ -211,15 +211,34 @@ const projectAudiencePoliciesControllerDelete = async (id, options) => {
211
211
  });
212
212
  };
213
213
  exports.projectAudiencePoliciesControllerDelete = projectAudiencePoliciesControllerDelete;
214
- const getPortalsControllerListUrl = () => {
215
- return `/bff/portals`;
214
+ const getPortalsControllerListUrl = (params) => {
215
+ const normalizedParams = new URLSearchParams();
216
+ Object.entries(params || {}).forEach(([key, value]) => {
217
+ if (value === undefined)
218
+ return;
219
+ if (value === null) {
220
+ normalizedParams.append(key, 'null');
221
+ return;
222
+ }
223
+ if (Array.isArray(value)) {
224
+ for (const item of value) {
225
+ if (item === undefined || item === null)
226
+ continue;
227
+ normalizedParams.append(key, item.toString());
228
+ }
229
+ return;
230
+ }
231
+ normalizedParams.append(key, value.toString());
232
+ });
233
+ const stringifiedParams = normalizedParams.toString();
234
+ return stringifiedParams.length > 0 ? `/bff/portals?${stringifiedParams}` : `/bff/portals`;
216
235
  };
217
236
  exports.getPortalsControllerListUrl = getPortalsControllerListUrl;
218
237
  /**
219
- * @summary List the portals the calling user may see in the caller org (visibility-filtered).
238
+ * @summary List the portals the calling user may see in the caller org (visibility-filtered, paginated).
220
239
  */
221
- const portalsControllerList = async (options) => {
222
- return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerListUrl)(), {
240
+ const portalsControllerList = async (params, options) => {
241
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerListUrl)(params), {
223
242
  ...options,
224
243
  method: 'GET'
225
244
  });
@@ -271,12 +290,26 @@ const portalsControllerUpdate = async (id, updatePortalDto, options) => {
271
290
  });
272
291
  };
273
292
  exports.portalsControllerUpdate = portalsControllerUpdate;
293
+ const getPortalsControllerRemoveUrl = (id) => {
294
+ return `/bff/portals/${id}`;
295
+ };
296
+ exports.getPortalsControllerRemoveUrl = getPortalsControllerRemoveUrl;
297
+ /**
298
+ * @summary Hard-delete a UI-owned portal (portal-admin only). Cascades to its releases, app-clients and external subjects. Use archive for a reversible retire; a seeder/IaC/system-owned portal is refused (409) because its producer would recreate it.
299
+ */
300
+ const portalsControllerRemove = async (id, options) => {
301
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerRemoveUrl)(id), {
302
+ ...options,
303
+ method: 'DELETE'
304
+ });
305
+ };
306
+ exports.portalsControllerRemove = portalsControllerRemove;
274
307
  const getPortalsControllerArchiveUrl = (id) => {
275
308
  return `/bff/portals/${id}/archive`;
276
309
  };
277
310
  exports.getPortalsControllerArchiveUrl = getPortalsControllerArchiveUrl;
278
311
  /**
279
- * @summary Archive a portal owned by the caller org (portal-admin only).
312
+ * @summary Archive a portal owned by the caller org (portal-admin only). Reversible via `POST :id/unarchive`.
280
313
  */
281
314
  const portalsControllerArchive = async (id, options) => {
282
315
  return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerArchiveUrl)(id), {
@@ -285,3 +318,77 @@ const portalsControllerArchive = async (id, options) => {
285
318
  });
286
319
  };
287
320
  exports.portalsControllerArchive = portalsControllerArchive;
321
+ const getPortalsControllerUnarchiveUrl = (id) => {
322
+ return `/bff/portals/${id}/unarchive`;
323
+ };
324
+ exports.getPortalsControllerUnarchiveUrl = getPortalsControllerUnarchiveUrl;
325
+ /**
326
+ * @summary Un-archive a portal owned by the caller org (portal-admin only). Re-registers its PDP access — `org-shared` unless a block is supplied.
327
+ */
328
+ const portalsControllerUnarchive = async (id, unarchivePortalDto, options) => {
329
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerUnarchiveUrl)(id), {
330
+ ...options,
331
+ method: 'POST',
332
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
333
+ body: JSON.stringify(unarchivePortalDto)
334
+ });
335
+ };
336
+ exports.portalsControllerUnarchive = portalsControllerUnarchive;
337
+ const getPortalsControllerReadoptUrl = (id) => {
338
+ return `/bff/portals/${id}/readopt`;
339
+ };
340
+ exports.getPortalsControllerReadoptUrl = getPortalsControllerReadoptUrl;
341
+ /**
342
+ * @summary Hand a UI-adopted default portal back to the reconciler (portal-admin only), so it resumes tracking the installed web biomes.
343
+ */
344
+ const portalsControllerReadopt = async (id, options) => {
345
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerReadoptUrl)(id), {
346
+ ...options,
347
+ method: 'POST'
348
+ });
349
+ };
350
+ exports.portalsControllerReadopt = portalsControllerReadopt;
351
+ const getPortalsControllerInstallBiomeUrl = (id) => {
352
+ return `/bff/portals/${id}/biomes`;
353
+ };
354
+ exports.getPortalsControllerInstallBiomeUrl = getPortalsControllerInstallBiomeUrl;
355
+ /**
356
+ * @summary Install one biome on a portal (portal-admin only). Idempotent per ref; serialized against concurrent installs by a per-portal lock. Returns 422 for a ref no web biome is registered for.
357
+ */
358
+ const portalsControllerInstallBiome = async (id, installPortalBiomeDto, options) => {
359
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerInstallBiomeUrl)(id), {
360
+ ...options,
361
+ method: 'POST',
362
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
363
+ body: JSON.stringify(installPortalBiomeDto)
364
+ });
365
+ };
366
+ exports.portalsControllerInstallBiome = portalsControllerInstallBiome;
367
+ const getPortalsControllerUninstallBiomeUrl = (id, encodedRef) => {
368
+ return `/bff/portals/${id}/biomes/${encodedRef}`;
369
+ };
370
+ exports.getPortalsControllerUninstallBiomeUrl = getPortalsControllerUninstallBiomeUrl;
371
+ /**
372
+ * @summary Uninstall one biome from a portal (portal-admin only). 404s a ref the portal does not carry, rather than reporting a no-op as success.
373
+ */
374
+ const portalsControllerUninstallBiome = async (id, encodedRef, options) => {
375
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerUninstallBiomeUrl)(id, encodedRef), {
376
+ ...options,
377
+ method: 'DELETE'
378
+ });
379
+ };
380
+ exports.portalsControllerUninstallBiome = portalsControllerUninstallBiome;
381
+ const getPortalsControllerRefreshLockfileUrl = (id) => {
382
+ return `/bff/portals/${id}/lockfile/refresh`;
383
+ };
384
+ exports.getPortalsControllerRefreshLockfileUrl = getPortalsControllerRefreshLockfileUrl;
385
+ /**
386
+ * @summary Refresh a portal lockfile (portal-admin only). Re-pins kernel + installed biomes via the kernel Lockfile Resolver. Returns 422 LOCKFILE_RESOLVER_FAILED on any unsatisfiable constraint, malformed ref, or unreachable upstream.
387
+ */
388
+ const portalsControllerRefreshLockfile = async (id, options) => {
389
+ return (0, custom_fetch_1.customFetch)((0, exports.getPortalsControllerRefreshLockfileUrl)(id), {
390
+ ...options,
391
+ method: 'POST'
392
+ });
393
+ };
394
+ exports.portalsControllerRefreshLockfile = portalsControllerRefreshLockfile;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { configureClient, getClientConfig, ClientError, customFetch, type ClientConfig, type RetryNotice } from './custom-fetch';
2
2
  export * from './models';
3
+ export * from './endpoints/delegated-session-keys/delegated-session-keys';
3
4
  export * from './endpoints/delegated-sessions/delegated-sessions';
4
5
  export * from './endpoints/project-apps/project-apps';
5
6
  export * from './endpoints/public-ingress/public-ingress';
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "getClientConfig", { enumerable: true, get: funct
22
22
  Object.defineProperty(exports, "ClientError", { enumerable: true, get: function () { return custom_fetch_1.ClientError; } });
23
23
  Object.defineProperty(exports, "customFetch", { enumerable: true, get: function () { return custom_fetch_1.customFetch; } });
24
24
  __exportStar(require("./models"), exports);
25
+ __exportStar(require("./endpoints/delegated-session-keys/delegated-session-keys"), exports);
25
26
  __exportStar(require("./endpoints/delegated-sessions/delegated-sessions"), exports);
26
27
  __exportStar(require("./endpoints/project-apps/project-apps"), exports);
27
28
  __exportStar(require("./endpoints/public-ingress/public-ingress"), exports);
@@ -4,8 +4,12 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  export interface AnonAuthDto {
7
+ /** AppClient public identifier. */
8
+ clientId: string;
9
+ /** Plaintext AppClient secret. Required on EVERY external-auth door, the anonymous one included: "anonymous" describes the subject, never the caller — the App owner controls who may open sessions in its name. */
10
+ clientSecret: string;
7
11
  /** Optional client-supplied hint used for logging / debugging purposes. Not used for identity resolution — every call creates a fresh anon subject. */
8
12
  sessionHint?: string;
9
- /** AppClient id issuing this auth request. */
10
- appClientId: string;
13
+ /** Requested ExecutionEnvironment slug. Defaults to the App’s `defaultZone`, and either way must be in the resolved AudiencePolicy.allowedEnvironments[]. */
14
+ requestedZone?: string;
11
15
  }
@@ -12,4 +12,6 @@ export interface AnonAuthResultDto {
12
12
  sessionId: string;
13
13
  /** Subject ref minted into the token. */
14
14
  subjectRef: string;
15
+ /** ExecutionEnvironment slug the session was minted into. */
16
+ environment: string;
15
17
  }
@@ -4,6 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  import type { AppLockfileDto } from './appLockfileDto.js';
7
+ import type { AudienceKind } from './audienceKind.js';
7
8
  import type { BiomeInstallDto } from './biomeInstallDto.js';
8
9
  import type { BrandingConfigDto } from './brandingConfigDto.js';
9
10
  import type { CapabilityPolicyOverrideDto } from './capabilityPolicyOverrideDto.js';
@@ -22,13 +23,14 @@ export interface AppDto {
22
23
  lockfile: AppLockfileDto;
23
24
  installedBiomes: BiomeInstallDto[];
24
25
  capabilityPolicy: CapabilityPolicyOverrideDto[];
25
- /** @nullable */
26
- subdomain: string | null;
26
+ /** Whether this App is reachable on a public host. The host itself is DERIVED (see `codedAppSubdomain`), never tenant-chosen — this is the switch for WHETHER, not WHERE. */
27
27
  subdomainEnabled: boolean;
28
- defaultAudience: string;
28
+ defaultAudience: AudienceKind;
29
29
  archived: boolean;
30
30
  /** Provisioning ownership marker. `iac` = managed by the declarative control plane (Terraform / xema.yaml); `seeder` = a distribution default; `ui` = hand-managed (or adopted from iac/seeder via a UI edit); `system` = platform-shipped; null = unmanaged/legacy. Lets a console badge an IaC-owned resource and surface an "export as code" affordance. */
31
31
  managedBy: ResourceManagedBy | null;
32
+ /** Whether this App can be handed back to the portal reconciler — the exact precondition of POST /bff/portals/:id/readopt (true iff the row carries the reconciler natural key). Read-only, server-derived. A `ui`-managed App with readoptable=false was hand-created and was never reconciler-owned; with readoptable=true it is an adopted default portal, and readopt restores automatic updates. */
33
+ readoptable: boolean;
32
34
  createdAt: string;
33
35
  updatedAt: string;
34
36
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * App Runtime API
4
+ * OpenAPI spec version: 0.1.2
5
+ */
6
+ import type { AppDto } from './appDto.js';
7
+ import type { PaginationMeta } from './paginationMeta.js';
8
+ export interface AppDtoPaginatedEnvelope {
9
+ data: AppDto[];
10
+ pagination: PaginationMeta;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,7 +4,6 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  import type { AudienceKind } from './audienceKind.js';
7
- import type { AudiencePolicyDtoRateLimitPerHourPerSubject } from './audiencePolicyDtoRateLimitPerHourPerSubject.js';
8
7
  import type { AudienceUpstreamDto } from './audienceUpstreamDto.js';
9
8
  export interface AudiencePolicyDto {
10
9
  id: string;
@@ -12,8 +11,10 @@ export interface AudiencePolicyDto {
12
11
  kind: AudienceKind;
13
12
  allowedEnvironments: string[];
14
13
  authUpstream?: AudienceUpstreamDto | null;
15
- /** @nullable */
16
- rateLimitPerHourPerSubject?: AudiencePolicyDtoRateLimitPerHourPerSubject;
14
+ /** Session opens per hour for ONE identified external subject. Never null: a null used to mean "no limit", so an audience created without one was uncapped while reading as configured. */
15
+ rateLimitPerHourPerSubject: number;
16
+ /** Session opens per hour for the whole AppClient, across subjects. This is the cap the ANONYMOUS door is measured against — an anon subject is minted fresh on every call, so no per-subject bucket can bound it. */
17
+ rateLimitPerHourPerClient: number;
17
18
  createdAt: string;
18
19
  updatedAt: string;
19
20
  }
@@ -10,6 +10,8 @@ export interface CreateAudiencePolicyDto {
10
10
  /** ExecutionEnvironmentRef slugs this audience may invoke. Required. */
11
11
  allowedEnvironments: string[];
12
12
  authUpstream?: AudienceUpstreamDto;
13
- /** Rate cap (calls/hour/subject). */
13
+ /** Session opens per hour for ONE identified external subject. Omitted means the column default, NOT "unlimited" — there is no value that means unlimited. */
14
14
  rateLimitPerHourPerSubject?: number;
15
+ /** Session opens per hour for the whole AppClient, across subjects. This is the cap the ANONYMOUS door is measured against — an anon subject is minted fresh on every call, so no per-subject bucket can bound it. Omitted means the column default, NOT "unlimited". */
16
+ rateLimitPerHourPerClient?: number;
15
17
  }
@@ -4,6 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  import type { AppLockfileDto } from './appLockfileDto.js';
7
+ import type { AudienceKind } from './audienceKind.js';
7
8
  import type { BiomeInstallDto } from './biomeInstallDto.js';
8
9
  import type { BrandingConfigDto } from './brandingConfigDto.js';
9
10
  import type { CapabilityPolicyOverrideDto } from './capabilityPolicyOverrideDto.js';
@@ -18,10 +19,9 @@ export interface CreatePortalDto {
18
19
  lockfile: AppLockfileDto;
19
20
  installedBiomes: BiomeInstallDto[];
20
21
  capabilityPolicy: CapabilityPolicyOverrideDto[];
21
- /** @nullable */
22
- subdomain?: string | null;
22
+ /** Whether this App is reachable on a public host. The host itself is DERIVED, never tenant-chosen — this is the switch for WHETHER, not WHERE. */
23
23
  subdomainEnabled?: boolean;
24
- defaultAudience?: string;
24
+ defaultAudience?: AudienceKind;
25
25
  archived?: boolean;
26
26
  access?: PortalAccessDto;
27
27
  }
@@ -4,6 +4,7 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  import type { AppLockfileDto } from './appLockfileDto.js';
7
+ import type { AudienceKind } from './audienceKind.js';
7
8
  import type { BiomeInstallDto } from './biomeInstallDto.js';
8
9
  import type { BrandingConfigDto } from './brandingConfigDto.js';
9
10
  import type { CapabilityPolicyOverrideDto } from './capabilityPolicyOverrideDto.js';
@@ -23,10 +24,9 @@ export interface CreateProjectAppDto {
23
24
  lockfile: AppLockfileDto;
24
25
  installedBiomes: BiomeInstallDto[];
25
26
  capabilityPolicy: CapabilityPolicyOverrideDto[];
26
- /** @nullable */
27
- subdomain?: string | null;
27
+ /** Whether this App is reachable on a public host. The host itself is DERIVED, never tenant-chosen — this is the switch for WHETHER, not WHERE. */
28
28
  subdomainEnabled?: boolean;
29
- defaultAudience?: string;
29
+ defaultAudience?: AudienceKind;
30
30
  archived?: boolean;
31
31
  /** Authoring tier. `declared` (the default) and `composed` Apps ARE their JSON definition. A `coded` App is one the platform hosts but does not author — a Webapp Studio session builds a container image from the user's own repo, and every release of it carries that image coordinate. Immutable after creation: the tier decides what a release IS, so changing it would leave existing releases describing the wrong thing. */
32
32
  surface?: SurfaceKind;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * App Runtime API
4
+ * OpenAPI spec version: 0.1.2
5
+ */
6
+ import type { SubjectKind } from './subjectKind.js';
7
+ export interface DelegatedSessionActorDto {
8
+ /** The acting party’s BARE identifier — an `AppClient.clientId`, never a `"<kind>:<id>"` composite. */
9
+ sub: string;
10
+ /** The acting party’s subject kind, stated explicitly by the issuer (wire claim `subject_kind`). Always `app-client` for a delegated session minted by app-platform-api. */
11
+ subjectKind: SubjectKind;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,7 @@ export * from './appClientDtoRevokedAt';
8
8
  export * from './appDto';
9
9
  export * from './appDtoDataArrayEnvelope';
10
10
  export * from './appDtoDataEnvelope';
11
+ export * from './appDtoPaginatedEnvelope';
11
12
  export * from './appLockfileDto';
12
13
  export * from './appLockfileDtoAgents';
13
14
  export * from './appLockfileDtoBiomes';
@@ -29,7 +30,6 @@ export * from './audienceKind';
29
30
  export * from './audiencePolicyDto';
30
31
  export * from './audiencePolicyDtoDataArrayEnvelope';
31
32
  export * from './audiencePolicyDtoDataEnvelope';
32
- export * from './audiencePolicyDtoRateLimitPerHourPerSubject';
33
33
  export * from './audienceUpstreamDto';
34
34
  export * from './audienceUpstreamDtoMetadata';
35
35
  export * from './audienceUpstreamType';
@@ -48,6 +48,7 @@ export * from './createdAppClientDtoDataEnvelope';
48
48
  export * from './createdAppClientDtoRevokedAt';
49
49
  export * from './createdPublicSessionDto';
50
50
  export * from './createdPublicSessionDtoDataEnvelope';
51
+ export * from './delegatedSessionActorDto';
51
52
  export * from './delegatedSessionDto';
52
53
  export * from './delegatedSessionDtoDataEnvelope';
53
54
  export * from './delegatedSessionDtoExternalSubjectId';
@@ -57,13 +58,17 @@ export * from './delegatedSessionStatusDto';
57
58
  export * from './delegatedSessionStatusDtoDataEnvelope';
58
59
  export * from './delegatedSessionStatusDtoExternalSubjectId';
59
60
  export * from './delegatedSessionStatusDtoRevokedAt';
61
+ export * from './installPortalBiomeDto';
62
+ export * from './installPortalBiomeDtoConfiguration';
60
63
  export * from './oidcAuthDto';
61
64
  export * from './oidcAuthResultDto';
62
65
  export * from './oidcAuthResultDtoDataEnvelope';
66
+ export * from './paginationMeta';
63
67
  export * from './portalAccessDto';
64
68
  export * from './portalDetailDto';
65
69
  export * from './portalDetailDtoDataEnvelope';
66
70
  export * from './portalShareDto';
71
+ export * from './portalsControllerListParams';
67
72
  export * from './projectAppsControllerListParams';
68
73
  export * from './requestMagicLinkDto';
69
74
  export * from './requestMagicLinkResultDto';
@@ -73,8 +78,8 @@ export * from './resourceVisibilityPattern';
73
78
  export * from './subjectKind';
74
79
  export * from './surfaceKind';
75
80
  export * from './tokenClass';
81
+ export * from './unarchivePortalDto';
76
82
  export * from './updateAudiencePolicyDto';
77
- export * from './updateAudiencePolicyDtoRateLimitPerHourPerSubject';
78
83
  export * from './updatePortalDto';
79
84
  export * from './verifyDelegatedSessionRequestDto';
80
85
  export * from './verifyDelegatedSessionResponseDto';
@@ -25,6 +25,7 @@ __exportStar(require("./appClientDtoRevokedAt"), exports);
25
25
  __exportStar(require("./appDto"), exports);
26
26
  __exportStar(require("./appDtoDataArrayEnvelope"), exports);
27
27
  __exportStar(require("./appDtoDataEnvelope"), exports);
28
+ __exportStar(require("./appDtoPaginatedEnvelope"), exports);
28
29
  __exportStar(require("./appLockfileDto"), exports);
29
30
  __exportStar(require("./appLockfileDtoAgents"), exports);
30
31
  __exportStar(require("./appLockfileDtoBiomes"), exports);
@@ -46,7 +47,6 @@ __exportStar(require("./audienceKind"), exports);
46
47
  __exportStar(require("./audiencePolicyDto"), exports);
47
48
  __exportStar(require("./audiencePolicyDtoDataArrayEnvelope"), exports);
48
49
  __exportStar(require("./audiencePolicyDtoDataEnvelope"), exports);
49
- __exportStar(require("./audiencePolicyDtoRateLimitPerHourPerSubject"), exports);
50
50
  __exportStar(require("./audienceUpstreamDto"), exports);
51
51
  __exportStar(require("./audienceUpstreamDtoMetadata"), exports);
52
52
  __exportStar(require("./audienceUpstreamType"), exports);
@@ -65,6 +65,7 @@ __exportStar(require("./createdAppClientDtoDataEnvelope"), exports);
65
65
  __exportStar(require("./createdAppClientDtoRevokedAt"), exports);
66
66
  __exportStar(require("./createdPublicSessionDto"), exports);
67
67
  __exportStar(require("./createdPublicSessionDtoDataEnvelope"), exports);
68
+ __exportStar(require("./delegatedSessionActorDto"), exports);
68
69
  __exportStar(require("./delegatedSessionDto"), exports);
69
70
  __exportStar(require("./delegatedSessionDtoDataEnvelope"), exports);
70
71
  __exportStar(require("./delegatedSessionDtoExternalSubjectId"), exports);
@@ -74,13 +75,17 @@ __exportStar(require("./delegatedSessionStatusDto"), exports);
74
75
  __exportStar(require("./delegatedSessionStatusDtoDataEnvelope"), exports);
75
76
  __exportStar(require("./delegatedSessionStatusDtoExternalSubjectId"), exports);
76
77
  __exportStar(require("./delegatedSessionStatusDtoRevokedAt"), exports);
78
+ __exportStar(require("./installPortalBiomeDto"), exports);
79
+ __exportStar(require("./installPortalBiomeDtoConfiguration"), exports);
77
80
  __exportStar(require("./oidcAuthDto"), exports);
78
81
  __exportStar(require("./oidcAuthResultDto"), exports);
79
82
  __exportStar(require("./oidcAuthResultDtoDataEnvelope"), exports);
83
+ __exportStar(require("./paginationMeta"), exports);
80
84
  __exportStar(require("./portalAccessDto"), exports);
81
85
  __exportStar(require("./portalDetailDto"), exports);
82
86
  __exportStar(require("./portalDetailDtoDataEnvelope"), exports);
83
87
  __exportStar(require("./portalShareDto"), exports);
88
+ __exportStar(require("./portalsControllerListParams"), exports);
84
89
  __exportStar(require("./projectAppsControllerListParams"), exports);
85
90
  __exportStar(require("./requestMagicLinkDto"), exports);
86
91
  __exportStar(require("./requestMagicLinkResultDto"), exports);
@@ -90,8 +95,8 @@ __exportStar(require("./resourceVisibilityPattern"), exports);
90
95
  __exportStar(require("./subjectKind"), exports);
91
96
  __exportStar(require("./surfaceKind"), exports);
92
97
  __exportStar(require("./tokenClass"), exports);
98
+ __exportStar(require("./unarchivePortalDto"), exports);
93
99
  __exportStar(require("./updateAudiencePolicyDto"), exports);
94
- __exportStar(require("./updateAudiencePolicyDtoRateLimitPerHourPerSubject"), exports);
95
100
  __exportStar(require("./updatePortalDto"), exports);
96
101
  __exportStar(require("./verifyDelegatedSessionRequestDto"), exports);
97
102
  __exportStar(require("./verifyDelegatedSessionResponseDto"), exports);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * App Runtime API
4
+ * OpenAPI spec version: 0.1.2
5
+ */
6
+ import type { InstallPortalBiomeDtoConfiguration } from './installPortalBiomeDtoConfiguration.js';
7
+ export interface InstallPortalBiomeDto {
8
+ /** Canonical XemaObjectRef for the biome (e.g. `xema://system/biome/document-buddy`). */
9
+ biomeRef: string;
10
+ /** Semver-range string (`^1.2.0`, `~1.2.0`, `1.2.0`, `latest-compatible`). */
11
+ versionConstraint: string;
12
+ /** Free-form per-install configuration the biome consumes. */
13
+ configuration?: InstallPortalBiomeDtoConfiguration;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,8 +4,8 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  /**
7
- * @nullable
7
+ * Free-form per-install configuration the biome consumes.
8
8
  */
9
- export type AudiencePolicyDtoRateLimitPerHourPerSubject = {
9
+ export type InstallPortalBiomeDtoConfiguration = {
10
10
  [key: string]: unknown;
11
- } | null;
11
+ };
@@ -4,8 +4,12 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  export interface OidcAuthDto {
7
+ /** AppClient public identifier. */
8
+ clientId: string;
9
+ /** Plaintext AppClient secret. Required on EVERY external-auth door, the anonymous one included: "anonymous" describes the subject, never the caller — the App owner controls who may open sessions in its name. */
10
+ clientSecret: string;
7
11
  /** OIDC id_token issued by the upstream identity provider configured for this App. */
8
12
  idToken: string;
9
- /** AppClient id issuing this auth request. */
10
- appClientId: string;
13
+ /** Requested ExecutionEnvironment slug. Defaults to the App’s `defaultZone`, and either way must be in the resolved AudiencePolicy.allowedEnvironments[]. */
14
+ requestedZone?: string;
11
15
  }
@@ -12,4 +12,6 @@ export interface OidcAuthResultDto {
12
12
  sessionId: string;
13
13
  /** Subject ref minted into the token. */
14
14
  subjectRef: string;
15
+ /** ExecutionEnvironment slug the session was minted into. */
16
+ environment: string;
15
17
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * App Runtime API
4
+ * OpenAPI spec version: 0.1.2
5
+ */
6
+ export interface PaginationMeta {
7
+ total?: number;
8
+ page?: number;
9
+ totalPages?: number;
10
+ /** @nullable */
11
+ nextCursor?: string | null;
12
+ /** @nullable */
13
+ previousCursor?: string | null;
14
+ limit?: number;
15
+ hasMore?: boolean;
16
+ }
@@ -7,5 +7,8 @@ import type { AppDto } from './appDto.js';
7
7
  import type { PortalAccessDto } from './portalAccessDto.js';
8
8
  export interface PortalDetailDto {
9
9
  portal: AppDto;
10
+ /** The portal access this read RESOLVED. When `registered` is false this is the org-shared default the read just repaired the record to, not a record that was found. */
10
11
  access: PortalAccessDto;
12
+ /** Whether the PDP held an access record for this portal BEFORE this read. False means it did not — the portal was invisible to every non-admin member, and this read has registered the org-shared default to repair it. Surfaced rather than hidden because substituting the default and saying nothing rendered "shared with the whole organization" for a portal `listVisible` returned for nobody: a claim the product itself contradicted, with no way for an admin to tell. */
13
+ registered: boolean;
11
14
  }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * App Runtime API
4
+ * OpenAPI spec version: 0.1.2
5
+ */
6
+ export type PortalsControllerListParams = {
7
+ /**
8
+ * Page number (1-indexed)
9
+ * @minimum 1
10
+ */
11
+ page?: number;
12
+ /**
13
+ * Items per page
14
+ * @minimum 1
15
+ * @maximum 100
16
+ */
17
+ limit?: number;
18
+ };
@@ -1,11 +1,7 @@
1
+ "use strict";
1
2
  /**
2
3
  * Generated by @xemahq/api-client-generator — do not edit manually.
3
4
  * App Runtime API
4
5
  * OpenAPI spec version: 0.1.2
5
6
  */
6
- /**
7
- * @nullable
8
- */
9
- export type UpdateAudiencePolicyDtoRateLimitPerHourPerSubject = {
10
- [key: string]: unknown;
11
- } | null;
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,4 +9,8 @@ export type ProjectAppsControllerListParams = {
9
9
  */
10
10
  projectId?: string;
11
11
  slug?: string;
12
+ /**
13
+ * Include archived Apps. Default false — an archived App no longer accepts sessions (public ingress and every external-auth flow refuse it), so it is out of the listing unless explicitly asked for.
14
+ */
15
+ includeArchived?: boolean;
12
16
  };
@@ -4,8 +4,10 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  export interface RequestMagicLinkDto {
7
+ /** AppClient public identifier. */
8
+ clientId: string;
9
+ /** Plaintext AppClient secret. Required on EVERY external-auth door, the anonymous one included: "anonymous" describes the subject, never the caller — the App owner controls who may open sessions in its name. */
10
+ clientSecret: string;
7
11
  /** Email address to send the magic-link to. Used as the external subject identifier. */
8
12
  email: string;
9
- /** AppClient id issuing this auth request. */
10
- appClientId: string;
11
13
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Generated by @xemahq/api-client-generator — do not edit manually.
3
+ * App Runtime API
4
+ * OpenAPI spec version: 0.1.2
5
+ */
6
+ import type { PortalAccessDto } from './portalAccessDto.js';
7
+ export interface UnarchivePortalDto {
8
+ access?: PortalAccessDto;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,10 +4,9 @@
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
6
  import type { AudienceUpstreamDto } from './audienceUpstreamDto.js';
7
- import type { UpdateAudiencePolicyDtoRateLimitPerHourPerSubject } from './updateAudiencePolicyDtoRateLimitPerHourPerSubject.js';
8
7
  export interface UpdateAudiencePolicyDto {
9
8
  allowedEnvironments?: string[];
10
9
  authUpstream?: AudienceUpstreamDto | null;
11
- /** @nullable */
12
- rateLimitPerHourPerSubject?: UpdateAudiencePolicyDtoRateLimitPerHourPerSubject;
10
+ rateLimitPerHourPerSubject?: number;
11
+ rateLimitPerHourPerClient?: number;
13
12
  }
@@ -3,21 +3,13 @@
3
3
  * App Runtime API
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
- import type { AppLockfileDto } from './appLockfileDto.js';
7
- import type { BiomeInstallDto } from './biomeInstallDto.js';
8
6
  import type { BrandingConfigDto } from './brandingConfigDto.js';
9
- import type { CapabilityPolicyOverrideDto } from './capabilityPolicyOverrideDto.js';
10
7
  import type { PortalAccessDto } from './portalAccessDto.js';
11
8
  export interface UpdatePortalDto {
12
9
  displayName?: string;
13
10
  defaultZone?: string;
14
11
  branding?: BrandingConfigDto;
15
- lockfile?: AppLockfileDto;
16
- installedBiomes?: BiomeInstallDto[];
17
- capabilityPolicy?: CapabilityPolicyOverrideDto[];
18
- /** @nullable */
19
- subdomain?: string | null;
12
+ /** Whether this App is reachable on a public host. The host itself is DERIVED, never tenant-chosen — this is the switch for WHETHER, not WHERE. */
20
13
  subdomainEnabled?: boolean;
21
- defaultAudience?: string;
22
14
  access?: PortalAccessDto;
23
15
  }
@@ -3,12 +3,13 @@
3
3
  * App Runtime API
4
4
  * OpenAPI spec version: 0.1.2
5
5
  */
6
+ import type { DelegatedSessionActorDto } from './delegatedSessionActorDto.js';
6
7
  import type { TokenClass } from './tokenClass.js';
7
8
  export interface VerifyDelegatedSessionResponseDto {
8
9
  /** Id of the App this delegated session was minted FOR (the owning `App.id`, resolved from the backing session row). A consumer edge MUST bind the session to exactly this app before serving app data. */
9
10
  appId: string;
10
11
  sub: string;
11
- act: string;
12
+ act: DelegatedSessionActorDto;
12
13
  org: string;
13
14
  project: string;
14
15
  session: string;
@@ -12,4 +12,6 @@ export interface VerifyMagicLinkResultDto {
12
12
  sessionId: string;
13
13
  /** Subject ref minted into the token. */
14
14
  subjectRef: string;
15
+ /** ExecutionEnvironment slug the session was minted into. */
16
+ environment: string;
15
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/app-platform-api-client",
3
- "version": "0.3.9",
3
+ "version": "0.3.13",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -20,7 +20,7 @@
20
20
  "service": "app-platform-api",
21
21
  "biome": "app-platform",
22
22
  "target": "server",
23
- "generator": "@xemahq/api-client-generator@0.12.1",
23
+ "generator": "@xemahq/api-client-generator@0.14.1",
24
24
  "source": "openapi.public.json"
25
25
  },
26
26
  "license": "LicenseRef-Xema-BSL-1.1",