@proteos/sdk 0.20.5 → 0.21.0

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.
@@ -71,6 +71,12 @@ declare function resolveOptions(options: ClientOptions): ResolvedClientOptions;
71
71
  interface RequestOptions {
72
72
  /** Request timeout in milliseconds (overrides client default) */
73
73
  timeout?: number;
74
+ /**
75
+ * Skip attaching the Authorization header. Only meaningful for the public,
76
+ * unauthenticated endpoints (`/meta/v1/public/*`, `/functions/v1/public/*`)
77
+ * — every other endpoint 401s without a bearer.
78
+ */
79
+ skipAuth?: boolean;
74
80
  /** Additional headers for this request */
75
81
  headers?: Record<string, string>;
76
82
  /** AbortSignal for request cancellation */
@@ -1070,6 +1076,17 @@ interface PageService {
1070
1076
  * @throws {ProteosError} If page not found (404)
1071
1077
  */
1072
1078
  get(slug: string): Promise<Page>;
1079
+ /**
1080
+ * Gets a PUBLIC page (type='public') without authentication — no
1081
+ * Authorization header is sent. Returns the page plus the props_schema of
1082
+ * every component its layout references. Non-public pages 404
1083
+ * (indistinguishable from absent).
1084
+ *
1085
+ * @param orgId - Org id (public routes carry the org in the path — there is
1086
+ * no token to scope from)
1087
+ * @param slug - Page slug
1088
+ */
1089
+ getPublic(orgId: string, slug: string): Promise<PublicPageResponse>;
1073
1090
  /**
1074
1091
  * Creates a new page.
1075
1092
  *
@@ -2404,6 +2421,13 @@ interface Component extends AuditFields {
2404
2421
  source_file_id: string;
2405
2422
  /** The component's JSON Schema, driving the page-designer props editor + runtime validation. `null` until set. */
2406
2423
  props_schema: Record<string, unknown> | null;
2424
+ /**
2425
+ * Opts the compiled bundle into UNAUTHENTICATED serving. Public
2426
+ * (type='public') pages may only reference public components (enforced at
2427
+ * page save), and a public component's only platform reach at runtime is
2428
+ * `functions.actions.invokePublic`.
2429
+ */
2430
+ is_public: boolean;
2407
2431
  }
2408
2432
  declare const ComponentSchema: z.ZodObject<{
2409
2433
  created_at: z.ZodString;
@@ -2436,6 +2460,7 @@ declare const ComponentSchema: z.ZodObject<{
2436
2460
  bundle_file_id: z.ZodString;
2437
2461
  source_file_id: z.ZodString;
2438
2462
  props_schema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2463
+ is_public: z.ZodDefault<z.ZodBoolean>;
2439
2464
  }, "strip", z.ZodTypeAny, {
2440
2465
  name: string;
2441
2466
  created_at: string;
@@ -2454,6 +2479,7 @@ declare const ComponentSchema: z.ZodObject<{
2454
2479
  bundle_file_id: string;
2455
2480
  source_file_id: string;
2456
2481
  props_schema: Record<string, unknown> | null;
2482
+ is_public: boolean;
2457
2483
  }, {
2458
2484
  name: string;
2459
2485
  created_at: string;
@@ -2472,6 +2498,7 @@ declare const ComponentSchema: z.ZodObject<{
2472
2498
  bundle_file_id: string;
2473
2499
  source_file_id: string;
2474
2500
  props_schema: Record<string, unknown> | null;
2501
+ is_public?: boolean | undefined;
2475
2502
  }>;
2476
2503
  /**
2477
2504
  * Options for listing components.
@@ -2492,6 +2519,8 @@ interface CreateComponentRequest {
2492
2519
  bundle_file_id?: string;
2493
2520
  source_file_id?: string;
2494
2521
  props_schema?: Record<string, unknown>;
2522
+ /** See {@link Component.is_public}. Manifest-driven: omitting it sets false. */
2523
+ is_public?: boolean;
2495
2524
  }
2496
2525
  /**
2497
2526
  * Request to update a component.
@@ -2502,6 +2531,7 @@ interface UpdateComponentRequest {
2502
2531
  bundle_file_id?: string;
2503
2532
  source_file_id?: string;
2504
2533
  props_schema?: Record<string, unknown>;
2534
+ is_public?: boolean;
2505
2535
  }
2506
2536
  /**
2507
2537
  * List column definition.
@@ -2865,12 +2895,19 @@ declare const PageActionSchema: z.ZodObject<{
2865
2895
  action: string;
2866
2896
  }>;
2867
2897
  /**
2868
- * Page type. `record` pages render against a single record of `entity_slug`;
2869
- * `platform` pages are standalone (no record context — e.g. a dashboard
2870
- * launched from a menu item). `external` is reserved for a future chromeless
2871
- * variant and is not yet accepted by the API.
2898
+ * Page type encodes what the page binds to and how it is served (chrome +
2899
+ * auth posture both follow from it):
2900
+ *
2901
+ * - `record`: rendered against a single record of `entity_slug`; app chrome;
2902
+ * authenticated.
2903
+ * - `platform`: standalone, no record context (e.g. a dashboard launched from
2904
+ * a menu item); app chrome; authenticated.
2905
+ * - `kiosk`: standalone, NO app chrome (bare page at `/k/…`); authenticated.
2906
+ * - `public`: standalone, NO app chrome (bare page at `/p/…`);
2907
+ * UNAUTHENTICATED — the layout is world-readable and its components may only
2908
+ * call `is_public` global actions.
2872
2909
  */
2873
- type PageType = 'record' | 'platform';
2910
+ type PageType = 'record' | 'platform' | 'kiosk' | 'public';
2874
2911
  /**
2875
2912
  * Page configuration. A `record` page is the detail-page shape for a single
2876
2913
  * entity; a `platform` page is standalone (no entity, no record).
@@ -2916,7 +2953,7 @@ declare const PageSchema: z.ZodObject<{
2916
2953
  slug: z.ZodString;
2917
2954
  name: z.ZodString;
2918
2955
  module_slug: z.ZodString;
2919
- type: z.ZodEnum<["record", "platform"]>;
2956
+ type: z.ZodEnum<["record", "platform", "kiosk", "public"]>;
2920
2957
  entity_slug: z.ZodOptional<z.ZodString>;
2921
2958
  actions: z.ZodArray<z.ZodObject<{
2922
2959
  label: z.ZodString;
@@ -2965,7 +3002,7 @@ declare const PageSchema: z.ZodObject<{
2965
3002
  } | undefined;
2966
3003
  }>;
2967
3004
  }, "strip", z.ZodTypeAny, {
2968
- type: "platform" | "record";
3005
+ type: "platform" | "record" | "kiosk" | "public";
2969
3006
  name: string;
2970
3007
  created_at: string;
2971
3008
  updated_at: string;
@@ -2995,7 +3032,7 @@ declare const PageSchema: z.ZodObject<{
2995
3032
  };
2996
3033
  entity_slug?: string | undefined;
2997
3034
  }, {
2998
- type: "platform" | "record";
3035
+ type: "platform" | "record" | "kiosk" | "public";
2999
3036
  name: string;
3000
3037
  created_at: string;
3001
3038
  updated_at: string;
@@ -3025,6 +3062,24 @@ declare const PageSchema: z.ZodObject<{
3025
3062
  };
3026
3063
  entity_slug?: string | undefined;
3027
3064
  }>;
3065
+ /**
3066
+ * Component metadata slice riding on the public page payload — just the slug
3067
+ * and props schema (deliberately not the full Component: this is served
3068
+ * unauthenticated).
3069
+ */
3070
+ interface PublicPageComponent {
3071
+ slug: string;
3072
+ props_schema?: Record<string, unknown>;
3073
+ }
3074
+ /**
3075
+ * Payload of the unauthenticated `GET /meta/v1/public/orgs/{orgId}/pages/{slug}`:
3076
+ * the page plus the props_schema of every component its layout references, so
3077
+ * a public renderer needs no follow-up authenticated calls.
3078
+ */
3079
+ interface PublicPageResponse {
3080
+ page: Page;
3081
+ components: PublicPageComponent[];
3082
+ }
3028
3083
  /**
3029
3084
  * Options for listing pages.
3030
3085
  */
@@ -3296,4 +3351,4 @@ interface UpdateAppRequest {
3296
3351
  icon_slug?: string;
3297
3352
  }
3298
3353
 
3299
- export { type ListFn as $, type AuditFields as A, type CurrencyValue as B, type ClientOptions as C, DEFAULT_OPTIONS as D, DEFAULT_PAGE_SIZE as E, type FileRef as F, DONE as G, type DeployModuleRequest as H, type Done as I, type Entity as J, EntitySchema as K, type ListOptions as L, type EntityService as M, type EntityWithSchema as N, EntityWithSchemaSchema as O, PageIterator as P, type FileAttributeMeta as Q, FileRefSchema as R, type FilterElement as S, FilterElementSchema as T, type UserRef as U, type FilterGroup as V, FilterGroupSchema as W, type List as X, type ListAppsOptions as Y, type ListComponentsOptions as Z, type ListEntitiesOptions as _, type Attribute as a, currencySymbol as a$, type ListListViewsOptions as a0, type ListListsOptions as a1, type ListMenuConfigurationsOptions as a2, type ListModulesOptions as a3, type ListPagesOptions as a4, ListSchema as a5, type ListService as a6, type ListVariablesOptions as a7, type ListView as a8, ListViewSchema as a9, RelationAttributeMetaSchema as aA, type RequestOptions as aB, type ResolvedClientOptions as aC, type ResponseMeta as aD, ResponseMetaSchema as aE, type SortConfig as aF, SortConfigSchema as aG, type SortDirection as aH, type Timestamps as aI, type TokenProvider as aJ, type UpdateAppRequest as aK, type UpdateComponentRequest as aL, type UpdateEntityRequest as aM, type UpdateListRequest as aN, type UpdateListViewRequest as aO, type UpdateMenuConfigurationRequest as aP, type UpdatePageRequest as aQ, type UpdateVariableRequest as aR, UserRefSchema as aS, type UserType as aT, type Variable as aU, VariableSchema as aV, type VariableService as aW, allCurrencyCodes as aX, createIterator as aY, createListResultSchema as aZ, currencyLabel as a_, type ListViewService as aa, type LogicalOperator as ab, type MenuConfiguration as ac, MenuConfigurationSchema as ad, type MenuConfigurationService as ae, type MenuItem as af, MenuItemSchema as ag, MenuItemType as ah, MetaClient as ai, type MetaListOptions as aj, type Module as ak, ModuleSchema as al, type ModuleService as am, type ModuleStatus as an, type OnDeleteAction as ao, OnDeleteActionSchema as ap, PLATFORM_ATTRIBUTE_NAMES as aq, PLATFORM_USER_ID as ar, type Page as as, type PageAction as at, PageActionSchema as au, type PageLayout as av, PageLayoutSchema as aw, PageSchema as ax, type PageService as ay, type RelationAttributeMeta as az, type ListResult as b, currencySymbolSide as b0, formatAmount as b1, formatMoney as b2, isPlatformAttributeName as b3, localeNumberSeparators as b4, parseAmount as b5, parseCurrencyMeta as b6, parseFileMeta as b7, parseRelationMeta as b8, platformAttributes as b9, type PageLayoutSidePanel as bA, PageLayoutSidePanelSchema as bB, type RelatedListElement as bC, type ResponsiveSizing as bD, type RowElement as bE, type SectionElement as bF, type SizeValue as bG, SizeValueSchema as bH, type SizingProps as bI, type StringAttributeMeta as bJ, type StringFormat as bK, type TabsElement as bL, type TextElement as bM, type TextVariant as bN, type UserAttributeMeta as bO, UserAttributeMetaSchema as bP, isBuiltInControl as bQ, lookupCompatibleControls as bR, lookupControls as bS, lookupPrimaryControl as bT, parseUserMeta as bU, resolveOptions as ba, type ArrayAttributeMeta as bb, type AttributeForLookup as bc, type AttributeMeta as bd, BUILT_IN_CONTROLS as be, type BuiltInControlSlug as bf, type ColumnElement as bg, type CommonProps as bh, type ComponentElement as bi, type ControlBucket as bj, type DatetimeAttributeMeta as bk, type DatetimeFormat as bl, type DividerElement as bm, type EnumAttributeMeta as bn, type EnumValue as bo, type FieldElement as bp, FileAttributeMetaSchema as bq, type LayoutAlign as br, type LayoutElement as bs, LayoutElementSchema as bt, LayoutElementType as bu, type LayoutGap as bv, type LayoutJustify as bw, type LayoutTab as bx, type NumberAttributeMeta as by, type ObjectAttributeMeta as bz, ProteosClient as c, type App as d, AppSchema as e, type AppService as f, AttributeSchema as g, type AttributeType as h, AuditFieldsSchema as i, type Column as j, ColumnSchema as k, type ComparisonOperator as l, type Component as m, ComponentSchema as n, type ComponentService as o, type CreateAppRequest as p, type CreateComponentRequest as q, type CreateEntityRequest as r, type CreateListRequest as s, type CreateListViewRequest as t, type CreateMenuConfigurationRequest as u, type CreatePageRequest as v, type CreateVariableRequest as w, type CurrencyAttributeMeta as x, CurrencyAttributeMetaSchema as y, type CurrencySymbolSide as z };
3354
+ export { type ListFn as $, type AuditFields as A, type CurrencyValue as B, type ClientOptions as C, DEFAULT_OPTIONS as D, DEFAULT_PAGE_SIZE as E, type FileRef as F, DONE as G, type DeployModuleRequest as H, type Done as I, type Entity as J, EntitySchema as K, type ListOptions as L, type EntityService as M, type EntityWithSchema as N, EntityWithSchemaSchema as O, PageIterator as P, type FileAttributeMeta as Q, FileRefSchema as R, type FilterElement as S, FilterElementSchema as T, type UserRef as U, type FilterGroup as V, FilterGroupSchema as W, type List as X, type ListAppsOptions as Y, type ListComponentsOptions as Z, type ListEntitiesOptions as _, type Attribute as a, createIterator as a$, type ListListViewsOptions as a0, type ListListsOptions as a1, type ListMenuConfigurationsOptions as a2, type ListModulesOptions as a3, type ListPagesOptions as a4, ListSchema as a5, type ListService as a6, type ListVariablesOptions as a7, type ListView as a8, ListViewSchema as a9, type PublicPageComponent as aA, type PublicPageResponse as aB, type RelationAttributeMeta as aC, RelationAttributeMetaSchema as aD, type RequestOptions as aE, type ResolvedClientOptions as aF, type ResponseMeta as aG, ResponseMetaSchema as aH, type SortConfig as aI, SortConfigSchema as aJ, type SortDirection as aK, type Timestamps as aL, type TokenProvider as aM, type UpdateAppRequest as aN, type UpdateComponentRequest as aO, type UpdateEntityRequest as aP, type UpdateListRequest as aQ, type UpdateListViewRequest as aR, type UpdateMenuConfigurationRequest as aS, type UpdatePageRequest as aT, type UpdateVariableRequest as aU, UserRefSchema as aV, type UserType as aW, type Variable as aX, VariableSchema as aY, type VariableService as aZ, allCurrencyCodes as a_, type ListViewService as aa, type LogicalOperator as ab, type MenuConfiguration as ac, MenuConfigurationSchema as ad, type MenuConfigurationService as ae, type MenuItem as af, MenuItemSchema as ag, MenuItemType as ah, MetaClient as ai, type MetaListOptions as aj, type Module as ak, ModuleSchema as al, type ModuleService as am, type ModuleStatus as an, type OnDeleteAction as ao, OnDeleteActionSchema as ap, PLATFORM_ATTRIBUTE_NAMES as aq, PLATFORM_USER_ID as ar, type Page as as, type PageAction as at, PageActionSchema as au, type PageLayout as av, PageLayoutSchema as aw, PageSchema as ax, type PageService as ay, type PageType as az, type ListResult as b, createListResultSchema as b0, currencyLabel as b1, currencySymbol as b2, currencySymbolSide as b3, formatAmount as b4, formatMoney as b5, isPlatformAttributeName as b6, localeNumberSeparators as b7, parseAmount as b8, parseCurrencyMeta as b9, type LayoutTab as bA, type NumberAttributeMeta as bB, type ObjectAttributeMeta as bC, type PageLayoutSidePanel as bD, PageLayoutSidePanelSchema as bE, type RelatedListElement as bF, type ResponsiveSizing as bG, type RowElement as bH, type SectionElement as bI, type SizeValue as bJ, SizeValueSchema as bK, type SizingProps as bL, type StringAttributeMeta as bM, type StringFormat as bN, type TabsElement as bO, type TextElement as bP, type TextVariant as bQ, type UserAttributeMeta as bR, UserAttributeMetaSchema as bS, isBuiltInControl as bT, lookupCompatibleControls as bU, lookupControls as bV, lookupPrimaryControl as bW, parseUserMeta as bX, parseFileMeta as ba, parseRelationMeta as bb, platformAttributes as bc, resolveOptions as bd, type ArrayAttributeMeta as be, type AttributeForLookup as bf, type AttributeMeta as bg, BUILT_IN_CONTROLS as bh, type BuiltInControlSlug as bi, type ColumnElement as bj, type CommonProps as bk, type ComponentElement as bl, type ControlBucket as bm, type DatetimeAttributeMeta as bn, type DatetimeFormat as bo, type DividerElement as bp, type EnumAttributeMeta as bq, type EnumValue as br, type FieldElement as bs, FileAttributeMetaSchema as bt, type LayoutAlign as bu, type LayoutElement as bv, LayoutElementSchema as bw, LayoutElementType as bx, type LayoutGap as by, type LayoutJustify as bz, ProteosClient as c, type App as d, AppSchema as e, type AppService as f, AttributeSchema as g, type AttributeType as h, AuditFieldsSchema as i, type Column as j, ColumnSchema as k, type ComparisonOperator as l, type Component as m, ComponentSchema as n, type ComponentService as o, type CreateAppRequest as p, type CreateComponentRequest as q, type CreateEntityRequest as r, type CreateListRequest as s, type CreateListViewRequest as t, type CreateMenuConfigurationRequest as u, type CreatePageRequest as v, type CreateVariableRequest as w, type CurrencyAttributeMeta as x, CurrencyAttributeMetaSchema as y, type CurrencySymbolSide as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteos/sdk",
3
- "version": "0.20.5",
3
+ "version": "0.21.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "TypeScript SDK for the Proteos platform",
6
6
  "repository": {
package/src/client.ts CHANGED
@@ -91,9 +91,11 @@ export class ProteosClient {
91
91
  ...requestOptions?.headers,
92
92
  })
93
93
 
94
- const token = await this.getToken()
95
- if (token) {
96
- headers.set('Authorization', `Bearer ${token}`)
94
+ if (!requestOptions?.skipAuth) {
95
+ const token = await this.getToken()
96
+ if (token) {
97
+ headers.set('Authorization', `Bearer ${token}`)
98
+ }
97
99
  }
98
100
 
99
101
  return headers
@@ -40,6 +40,17 @@ export interface ActionService {
40
40
  */
41
41
  invokeGlobal(slug: string, params: Record<string, unknown>): Promise<unknown>
42
42
 
43
+ /**
44
+ * Invokes a PUBLIC (`is_public`) global action without authentication — no
45
+ * Authorization header is sent. This is the only data path available to
46
+ * components on a public page. The action runs server-side as its creator
47
+ * (org + user injected via a machine token); non-public actions 404.
48
+ *
49
+ * @param orgId - Org id (public routes carry the org in the path — there is
50
+ * no token to scope from)
51
+ */
52
+ invokePublic(orgId: string, slug: string, params: Record<string, unknown>): Promise<unknown>
53
+
43
54
  /**
44
55
  * Invokes an entity-scoped action against a specific record. Returns the
45
56
  * unwrapped `result` payload.
@@ -79,6 +90,20 @@ export class ActionServiceImpl implements ActionService {
79
90
  return response.result
80
91
  }
81
92
 
93
+ async invokePublic(
94
+ orgId: string,
95
+ slug: string,
96
+ params: Record<string, unknown>,
97
+ ): Promise<unknown> {
98
+ const response = await this.client.request<InvokeActionResponse>(
99
+ 'POST',
100
+ `/functions/v1/public/orgs/${encodeURIComponent(orgId)}/actions/${encodeURIComponent(slug)}/invoke`,
101
+ params,
102
+ { skipAuth: true },
103
+ )
104
+ return response.result
105
+ }
106
+
82
107
  async invokeEntity(
83
108
  entitySlug: string,
84
109
  recordId: string,
package/src/index.ts CHANGED
@@ -439,6 +439,9 @@ export type {
439
439
  // Page types
440
440
  Page,
441
441
  PageAction,
442
+ PageType,
443
+ PublicPageComponent,
444
+ PublicPageResponse,
442
445
  PageLayout,
443
446
  PageService,
444
447
  // Relation attribute meta
package/src/meta/index.ts CHANGED
@@ -171,6 +171,9 @@ export type {
171
171
  // Page types
172
172
  Page,
173
173
  PageAction,
174
+ PageType,
175
+ PublicPageComponent,
176
+ PublicPageResponse,
174
177
  // Relation attribute meta
175
178
  RelationAttributeMeta,
176
179
  SortConfig,
package/src/meta/pages.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import type { ProteosClient } from '../client.js'
2
2
  import { PageIterator } from '../iterator.js'
3
3
  import type { ListResult } from '../types/common.js'
4
- import type { CreatePageRequest, ListPagesOptions, Page, UpdatePageRequest } from './types.js'
4
+ import type {
5
+ CreatePageRequest,
6
+ ListPagesOptions,
7
+ Page,
8
+ PublicPageResponse,
9
+ UpdatePageRequest,
10
+ } from './types.js'
5
11
 
6
12
  const PAGES_BASE_PATH = '/meta/v1/pages'
7
13
 
@@ -32,6 +38,18 @@ export interface PageService {
32
38
  */
33
39
  get(slug: string): Promise<Page>
34
40
 
41
+ /**
42
+ * Gets a PUBLIC page (type='public') without authentication — no
43
+ * Authorization header is sent. Returns the page plus the props_schema of
44
+ * every component its layout references. Non-public pages 404
45
+ * (indistinguishable from absent).
46
+ *
47
+ * @param orgId - Org id (public routes carry the org in the path — there is
48
+ * no token to scope from)
49
+ * @param slug - Page slug
50
+ */
51
+ getPublic(orgId: string, slug: string): Promise<PublicPageResponse>
52
+
35
53
  /**
36
54
  * Creates a new page.
37
55
  *
@@ -88,6 +106,15 @@ export class PageServiceImpl implements PageService {
88
106
  return this.client.request<Page>('GET', `${PAGES_BASE_PATH}/${slug}`)
89
107
  }
90
108
 
109
+ async getPublic(orgId: string, slug: string): Promise<PublicPageResponse> {
110
+ return this.client.request<PublicPageResponse>(
111
+ 'GET',
112
+ `/meta/v1/public/orgs/${encodeURIComponent(orgId)}/pages/${encodeURIComponent(slug)}`,
113
+ undefined,
114
+ { skipAuth: true },
115
+ )
116
+ }
117
+
91
118
  async create(request: CreatePageRequest): Promise<Page> {
92
119
  return this.client.request<Page>('POST', PAGES_BASE_PATH, request)
93
120
  }
package/src/meta/types.ts CHANGED
@@ -641,6 +641,13 @@ export interface Component extends AuditFields {
641
641
  source_file_id: string
642
642
  /** The component's JSON Schema, driving the page-designer props editor + runtime validation. `null` until set. */
643
643
  props_schema: Record<string, unknown> | null
644
+ /**
645
+ * Opts the compiled bundle into UNAUTHENTICATED serving. Public
646
+ * (type='public') pages may only reference public components (enforced at
647
+ * page save), and a public component's only platform reach at runtime is
648
+ * `functions.actions.invokePublic`.
649
+ */
650
+ is_public: boolean
644
651
  }
645
652
 
646
653
  export const ComponentSchema = AuditFieldsSchema.extend({
@@ -650,7 +657,9 @@ export const ComponentSchema = AuditFieldsSchema.extend({
650
657
  module_slug: z.string(),
651
658
  bundle_file_id: z.string(),
652
659
  source_file_id: z.string(),
660
+ // default(false): rows serialized before the flag existed lack the field.
653
661
  props_schema: z.record(z.unknown()).nullable(),
662
+ is_public: z.boolean().default(false),
654
663
  })
655
664
 
656
665
  /**
@@ -673,6 +682,8 @@ export interface CreateComponentRequest {
673
682
  bundle_file_id?: string
674
683
  source_file_id?: string
675
684
  props_schema?: Record<string, unknown>
685
+ /** See {@link Component.is_public}. Manifest-driven: omitting it sets false. */
686
+ is_public?: boolean
676
687
  }
677
688
 
678
689
  /**
@@ -684,6 +695,7 @@ export interface UpdateComponentRequest {
684
695
  bundle_file_id?: string
685
696
  source_file_id?: string
686
697
  props_schema?: Record<string, unknown>
698
+ is_public?: boolean
687
699
  }
688
700
 
689
701
  // ============================================================================
@@ -886,14 +898,21 @@ export const PageActionSchema = z.object({
886
898
  })
887
899
 
888
900
  /**
889
- * Page type. `record` pages render against a single record of `entity_slug`;
890
- * `platform` pages are standalone (no record context — e.g. a dashboard
891
- * launched from a menu item). `external` is reserved for a future chromeless
892
- * variant and is not yet accepted by the API.
901
+ * Page type encodes what the page binds to and how it is served (chrome +
902
+ * auth posture both follow from it):
903
+ *
904
+ * - `record`: rendered against a single record of `entity_slug`; app chrome;
905
+ * authenticated.
906
+ * - `platform`: standalone, no record context (e.g. a dashboard launched from
907
+ * a menu item); app chrome; authenticated.
908
+ * - `kiosk`: standalone, NO app chrome (bare page at `/k/…`); authenticated.
909
+ * - `public`: standalone, NO app chrome (bare page at `/p/…`);
910
+ * UNAUTHENTICATED — the layout is world-readable and its components may only
911
+ * call `is_public` global actions.
893
912
  */
894
- export type PageType = 'record' | 'platform'
913
+ export type PageType = 'record' | 'platform' | 'kiosk' | 'public'
895
914
 
896
- export const PageTypeSchema = z.enum(['record', 'platform'])
915
+ export const PageTypeSchema = z.enum(['record', 'platform', 'kiosk', 'public'])
897
916
 
898
917
  /**
899
918
  * Page configuration. A `record` page is the detail-page shape for a single
@@ -924,6 +943,26 @@ export const PageSchema = AuditFieldsSchema.extend({
924
943
  layout: PageLayoutSchema,
925
944
  })
926
945
 
946
+ /**
947
+ * Component metadata slice riding on the public page payload — just the slug
948
+ * and props schema (deliberately not the full Component: this is served
949
+ * unauthenticated).
950
+ */
951
+ export interface PublicPageComponent {
952
+ slug: string
953
+ props_schema?: Record<string, unknown>
954
+ }
955
+
956
+ /**
957
+ * Payload of the unauthenticated `GET /meta/v1/public/orgs/{orgId}/pages/{slug}`:
958
+ * the page plus the props_schema of every component its layout references, so
959
+ * a public renderer needs no follow-up authenticated calls.
960
+ */
961
+ export interface PublicPageResponse {
962
+ page: Page
963
+ components: PublicPageComponent[]
964
+ }
965
+
927
966
  /**
928
967
  * Options for listing pages.
929
968
  */
@@ -88,6 +88,12 @@ export function resolveOptions(options: ClientOptions): ResolvedClientOptions {
88
88
  export interface RequestOptions {
89
89
  /** Request timeout in milliseconds (overrides client default) */
90
90
  timeout?: number
91
+ /**
92
+ * Skip attaching the Authorization header. Only meaningful for the public,
93
+ * unauthenticated endpoints (`/meta/v1/public/*`, `/functions/v1/public/*`)
94
+ * — every other endpoint 401s without a bearer.
95
+ */
96
+ skipAuth?: boolean
91
97
  /** Additional headers for this request */
92
98
  headers?: Record<string, string>
93
99
  /** AbortSignal for request cancellation */