@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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef } from './types-BNsjfU8N.cjs';
2
- export { d as App, e as AppSchema, f as AppService, g as AttributeSchema, h as AttributeType, i as AuditFieldsSchema, C as ClientOptions, j as Column, k as ColumnSchema, l as ComparisonOperator, m as Component, n as ComponentSchema, o as ComponentService, p as CreateAppRequest, q as CreateComponentRequest, r as CreateEntityRequest, s as CreateListRequest, t as CreateListViewRequest, u as CreateMenuConfigurationRequest, v as CreatePageRequest, w as CreateVariableRequest, x as CurrencyAttributeMeta, y as CurrencyAttributeMetaSchema, z as CurrencySymbolSide, B as CurrencyValue, D as DEFAULT_OPTIONS, E as DEFAULT_PAGE_SIZE, G as DONE, H as DeployModuleRequest, I as Done, J as Entity, K as EntitySchema, M as EntityService, N as EntityWithSchema, O as EntityWithSchemaSchema, Q as FileAttributeMeta, R as FileRefSchema, S as FilterElement, T as FilterElementSchema, V as FilterGroup, W as FilterGroupSchema, X as List, Y as ListAppsOptions, Z as ListComponentsOptions, _ as ListEntitiesOptions, $ as ListFn, a0 as ListListViewsOptions, a1 as ListListsOptions, a2 as ListMenuConfigurationsOptions, a3 as ListModulesOptions, a4 as ListPagesOptions, a5 as ListSchema, a6 as ListService, a7 as ListVariablesOptions, a8 as ListView, a9 as ListViewSchema, aa as ListViewService, ab as LogicalOperator, ac as MenuConfiguration, ad as MenuConfigurationSchema, ae as MenuConfigurationService, af as MenuItem, ag as MenuItemSchema, ah as MenuItemType, ai as MetaClient, aj as MetaListOptions, ak as Module, al as ModuleSchema, am as ModuleService, an as ModuleStatus, ao as OnDeleteAction, ap as OnDeleteActionSchema, aq as PLATFORM_ATTRIBUTE_NAMES, ar as PLATFORM_USER_ID, as as Page, at as PageAction, au as PageActionSchema, av as PageLayout, aw as PageLayoutSchema, ax as PageSchema, ay as PageService, az as RelationAttributeMeta, aA as RelationAttributeMetaSchema, aB as RequestOptions, aC as ResolvedClientOptions, aD as ResponseMeta, aE as ResponseMetaSchema, aF as SortConfig, aG as SortConfigSchema, aH as SortDirection, aI as Timestamps, aJ as TokenProvider, aK as UpdateAppRequest, aL as UpdateComponentRequest, aM as UpdateEntityRequest, aN as UpdateListRequest, aO as UpdateListViewRequest, aP as UpdateMenuConfigurationRequest, aQ as UpdatePageRequest, aR as UpdateVariableRequest, aS as UserRefSchema, aT as UserType, aU as Variable, aV as VariableSchema, aW as VariableService, aX as allCurrencyCodes, aY as createIterator, aZ as createListResultSchema, a_ as currencyLabel, a$ as currencySymbol, b0 as currencySymbolSide, b1 as formatAmount, b2 as formatMoney, b3 as isPlatformAttributeName, b4 as localeNumberSeparators, b5 as parseAmount, b6 as parseCurrencyMeta, b7 as parseFileMeta, b8 as parseRelationMeta, b9 as platformAttributes, ba as resolveOptions } from './types-BNsjfU8N.cjs';
1
+ import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef } from './types-PzImL4QI.cjs';
2
+ export { d as App, e as AppSchema, f as AppService, g as AttributeSchema, h as AttributeType, i as AuditFieldsSchema, C as ClientOptions, j as Column, k as ColumnSchema, l as ComparisonOperator, m as Component, n as ComponentSchema, o as ComponentService, p as CreateAppRequest, q as CreateComponentRequest, r as CreateEntityRequest, s as CreateListRequest, t as CreateListViewRequest, u as CreateMenuConfigurationRequest, v as CreatePageRequest, w as CreateVariableRequest, x as CurrencyAttributeMeta, y as CurrencyAttributeMetaSchema, z as CurrencySymbolSide, B as CurrencyValue, D as DEFAULT_OPTIONS, E as DEFAULT_PAGE_SIZE, G as DONE, H as DeployModuleRequest, I as Done, J as Entity, K as EntitySchema, M as EntityService, N as EntityWithSchema, O as EntityWithSchemaSchema, Q as FileAttributeMeta, R as FileRefSchema, S as FilterElement, T as FilterElementSchema, V as FilterGroup, W as FilterGroupSchema, X as List, Y as ListAppsOptions, Z as ListComponentsOptions, _ as ListEntitiesOptions, $ as ListFn, a0 as ListListViewsOptions, a1 as ListListsOptions, a2 as ListMenuConfigurationsOptions, a3 as ListModulesOptions, a4 as ListPagesOptions, a5 as ListSchema, a6 as ListService, a7 as ListVariablesOptions, a8 as ListView, a9 as ListViewSchema, aa as ListViewService, ab as LogicalOperator, ac as MenuConfiguration, ad as MenuConfigurationSchema, ae as MenuConfigurationService, af as MenuItem, ag as MenuItemSchema, ah as MenuItemType, ai as MetaClient, aj as MetaListOptions, ak as Module, al as ModuleSchema, am as ModuleService, an as ModuleStatus, ao as OnDeleteAction, ap as OnDeleteActionSchema, aq as PLATFORM_ATTRIBUTE_NAMES, ar as PLATFORM_USER_ID, as as Page, at as PageAction, au as PageActionSchema, av as PageLayout, aw as PageLayoutSchema, ax as PageSchema, ay as PageService, az as PageType, aA as PublicPageComponent, aB as PublicPageResponse, aC as RelationAttributeMeta, aD as RelationAttributeMetaSchema, aE as RequestOptions, aF as ResolvedClientOptions, aG as ResponseMeta, aH as ResponseMetaSchema, aI as SortConfig, aJ as SortConfigSchema, aK as SortDirection, aL as Timestamps, aM as TokenProvider, aN as UpdateAppRequest, aO as UpdateComponentRequest, aP as UpdateEntityRequest, aQ as UpdateListRequest, aR as UpdateListViewRequest, aS as UpdateMenuConfigurationRequest, aT as UpdatePageRequest, aU as UpdateVariableRequest, aV as UserRefSchema, aW as UserType, aX as Variable, aY as VariableSchema, aZ as VariableService, a_ as allCurrencyCodes, a$ as createIterator, b0 as createListResultSchema, b1 as currencyLabel, b2 as currencySymbol, b3 as currencySymbolSide, b4 as formatAmount, b5 as formatMoney, b6 as isPlatformAttributeName, b7 as localeNumberSeparators, b8 as parseAmount, b9 as parseCurrencyMeta, ba as parseFileMeta, bb as parseRelationMeta, bc as platformAttributes, bd as resolveOptions } from './types-PzImL4QI.cjs';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -3432,6 +3432,16 @@ interface ActionService {
3432
3432
  * timeouts (504, `TIMEOUT`), traps (500, `TRAP`), or other failure kinds.
3433
3433
  */
3434
3434
  invokeGlobal(slug: string, params: Record<string, unknown>): Promise<unknown>;
3435
+ /**
3436
+ * Invokes a PUBLIC (`is_public`) global action without authentication — no
3437
+ * Authorization header is sent. This is the only data path available to
3438
+ * components on a public page. The action runs server-side as its creator
3439
+ * (org + user injected via a machine token); non-public actions 404.
3440
+ *
3441
+ * @param orgId - Org id (public routes carry the org in the path — there is
3442
+ * no token to scope from)
3443
+ */
3444
+ invokePublic(orgId: string, slug: string, params: Record<string, unknown>): Promise<unknown>;
3435
3445
  /**
3436
3446
  * Invokes an entity-scoped action against a specific record. Returns the
3437
3447
  * unwrapped `result` payload.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef } from './types-BNsjfU8N.js';
2
- export { d as App, e as AppSchema, f as AppService, g as AttributeSchema, h as AttributeType, i as AuditFieldsSchema, C as ClientOptions, j as Column, k as ColumnSchema, l as ComparisonOperator, m as Component, n as ComponentSchema, o as ComponentService, p as CreateAppRequest, q as CreateComponentRequest, r as CreateEntityRequest, s as CreateListRequest, t as CreateListViewRequest, u as CreateMenuConfigurationRequest, v as CreatePageRequest, w as CreateVariableRequest, x as CurrencyAttributeMeta, y as CurrencyAttributeMetaSchema, z as CurrencySymbolSide, B as CurrencyValue, D as DEFAULT_OPTIONS, E as DEFAULT_PAGE_SIZE, G as DONE, H as DeployModuleRequest, I as Done, J as Entity, K as EntitySchema, M as EntityService, N as EntityWithSchema, O as EntityWithSchemaSchema, Q as FileAttributeMeta, R as FileRefSchema, S as FilterElement, T as FilterElementSchema, V as FilterGroup, W as FilterGroupSchema, X as List, Y as ListAppsOptions, Z as ListComponentsOptions, _ as ListEntitiesOptions, $ as ListFn, a0 as ListListViewsOptions, a1 as ListListsOptions, a2 as ListMenuConfigurationsOptions, a3 as ListModulesOptions, a4 as ListPagesOptions, a5 as ListSchema, a6 as ListService, a7 as ListVariablesOptions, a8 as ListView, a9 as ListViewSchema, aa as ListViewService, ab as LogicalOperator, ac as MenuConfiguration, ad as MenuConfigurationSchema, ae as MenuConfigurationService, af as MenuItem, ag as MenuItemSchema, ah as MenuItemType, ai as MetaClient, aj as MetaListOptions, ak as Module, al as ModuleSchema, am as ModuleService, an as ModuleStatus, ao as OnDeleteAction, ap as OnDeleteActionSchema, aq as PLATFORM_ATTRIBUTE_NAMES, ar as PLATFORM_USER_ID, as as Page, at as PageAction, au as PageActionSchema, av as PageLayout, aw as PageLayoutSchema, ax as PageSchema, ay as PageService, az as RelationAttributeMeta, aA as RelationAttributeMetaSchema, aB as RequestOptions, aC as ResolvedClientOptions, aD as ResponseMeta, aE as ResponseMetaSchema, aF as SortConfig, aG as SortConfigSchema, aH as SortDirection, aI as Timestamps, aJ as TokenProvider, aK as UpdateAppRequest, aL as UpdateComponentRequest, aM as UpdateEntityRequest, aN as UpdateListRequest, aO as UpdateListViewRequest, aP as UpdateMenuConfigurationRequest, aQ as UpdatePageRequest, aR as UpdateVariableRequest, aS as UserRefSchema, aT as UserType, aU as Variable, aV as VariableSchema, aW as VariableService, aX as allCurrencyCodes, aY as createIterator, aZ as createListResultSchema, a_ as currencyLabel, a$ as currencySymbol, b0 as currencySymbolSide, b1 as formatAmount, b2 as formatMoney, b3 as isPlatformAttributeName, b4 as localeNumberSeparators, b5 as parseAmount, b6 as parseCurrencyMeta, b7 as parseFileMeta, b8 as parseRelationMeta, b9 as platformAttributes, ba as resolveOptions } from './types-BNsjfU8N.js';
1
+ import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef } from './types-PzImL4QI.js';
2
+ export { d as App, e as AppSchema, f as AppService, g as AttributeSchema, h as AttributeType, i as AuditFieldsSchema, C as ClientOptions, j as Column, k as ColumnSchema, l as ComparisonOperator, m as Component, n as ComponentSchema, o as ComponentService, p as CreateAppRequest, q as CreateComponentRequest, r as CreateEntityRequest, s as CreateListRequest, t as CreateListViewRequest, u as CreateMenuConfigurationRequest, v as CreatePageRequest, w as CreateVariableRequest, x as CurrencyAttributeMeta, y as CurrencyAttributeMetaSchema, z as CurrencySymbolSide, B as CurrencyValue, D as DEFAULT_OPTIONS, E as DEFAULT_PAGE_SIZE, G as DONE, H as DeployModuleRequest, I as Done, J as Entity, K as EntitySchema, M as EntityService, N as EntityWithSchema, O as EntityWithSchemaSchema, Q as FileAttributeMeta, R as FileRefSchema, S as FilterElement, T as FilterElementSchema, V as FilterGroup, W as FilterGroupSchema, X as List, Y as ListAppsOptions, Z as ListComponentsOptions, _ as ListEntitiesOptions, $ as ListFn, a0 as ListListViewsOptions, a1 as ListListsOptions, a2 as ListMenuConfigurationsOptions, a3 as ListModulesOptions, a4 as ListPagesOptions, a5 as ListSchema, a6 as ListService, a7 as ListVariablesOptions, a8 as ListView, a9 as ListViewSchema, aa as ListViewService, ab as LogicalOperator, ac as MenuConfiguration, ad as MenuConfigurationSchema, ae as MenuConfigurationService, af as MenuItem, ag as MenuItemSchema, ah as MenuItemType, ai as MetaClient, aj as MetaListOptions, ak as Module, al as ModuleSchema, am as ModuleService, an as ModuleStatus, ao as OnDeleteAction, ap as OnDeleteActionSchema, aq as PLATFORM_ATTRIBUTE_NAMES, ar as PLATFORM_USER_ID, as as Page, at as PageAction, au as PageActionSchema, av as PageLayout, aw as PageLayoutSchema, ax as PageSchema, ay as PageService, az as PageType, aA as PublicPageComponent, aB as PublicPageResponse, aC as RelationAttributeMeta, aD as RelationAttributeMetaSchema, aE as RequestOptions, aF as ResolvedClientOptions, aG as ResponseMeta, aH as ResponseMetaSchema, aI as SortConfig, aJ as SortConfigSchema, aK as SortDirection, aL as Timestamps, aM as TokenProvider, aN as UpdateAppRequest, aO as UpdateComponentRequest, aP as UpdateEntityRequest, aQ as UpdateListRequest, aR as UpdateListViewRequest, aS as UpdateMenuConfigurationRequest, aT as UpdatePageRequest, aU as UpdateVariableRequest, aV as UserRefSchema, aW as UserType, aX as Variable, aY as VariableSchema, aZ as VariableService, a_ as allCurrencyCodes, a$ as createIterator, b0 as createListResultSchema, b1 as currencyLabel, b2 as currencySymbol, b3 as currencySymbolSide, b4 as formatAmount, b5 as formatMoney, b6 as isPlatformAttributeName, b7 as localeNumberSeparators, b8 as parseAmount, b9 as parseCurrencyMeta, ba as parseFileMeta, bb as parseRelationMeta, bc as platformAttributes, bd as resolveOptions } from './types-PzImL4QI.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -3432,6 +3432,16 @@ interface ActionService {
3432
3432
  * timeouts (504, `TIMEOUT`), traps (500, `TRAP`), or other failure kinds.
3433
3433
  */
3434
3434
  invokeGlobal(slug: string, params: Record<string, unknown>): Promise<unknown>;
3435
+ /**
3436
+ * Invokes a PUBLIC (`is_public`) global action without authentication — no
3437
+ * Authorization header is sent. This is the only data path available to
3438
+ * components on a public page. The action runs server-side as its creator
3439
+ * (org + user injected via a machine token); non-public actions 404.
3440
+ *
3441
+ * @param orgId - Org id (public routes carry the org in the path — there is
3442
+ * no token to scope from)
3443
+ */
3444
+ invokePublic(orgId: string, slug: string, params: Record<string, unknown>): Promise<unknown>;
3435
3445
  /**
3436
3446
  * Invokes an entity-scoped action against a specific record. Returns the
3437
3447
  * unwrapped `result` payload.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { AuditFieldsSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-XJP5WCRZ.js';
2
- export { AppSchema, AttributeSchema, AuditFieldsSchema, ColumnSchema, ComponentSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, EntitySchema, EntityWithSchemaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListSchema, ListViewSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-XJP5WCRZ.js';
1
+ import { AuditFieldsSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-OUVD2XJX.js';
2
+ export { AppSchema, AttributeSchema, AuditFieldsSchema, ColumnSchema, ComponentSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, EntitySchema, EntityWithSchemaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListSchema, ListViewSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-OUVD2XJX.js';
3
3
  import { z } from 'zod';
4
4
  import { fetchEventSource } from '@microsoft/fetch-event-source';
5
5
 
@@ -816,9 +816,11 @@ var ProteosClient = class {
816
816
  ...this.options.headers,
817
817
  ...requestOptions?.headers
818
818
  });
819
- const token = await this.getToken();
820
- if (token) {
821
- headers.set("Authorization", `Bearer ${token}`);
819
+ if (!requestOptions?.skipAuth) {
820
+ const token = await this.getToken();
821
+ if (token) {
822
+ headers.set("Authorization", `Bearer ${token}`);
823
+ }
822
824
  }
823
825
  return headers;
824
826
  }
@@ -1610,6 +1612,15 @@ var ActionServiceImpl = class {
1610
1612
  );
1611
1613
  return response.result;
1612
1614
  }
1615
+ async invokePublic(orgId, slug, params) {
1616
+ const response = await this.client.request(
1617
+ "POST",
1618
+ `/functions/v1/public/orgs/${encodeURIComponent(orgId)}/actions/${encodeURIComponent(slug)}/invoke`,
1619
+ params,
1620
+ { skipAuth: true }
1621
+ );
1622
+ return response.result;
1623
+ }
1613
1624
  async invokeEntity(entitySlug, recordId, slug, params) {
1614
1625
  const response = await this.client.request(
1615
1626
  "POST",