@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/{chunk-7RGN4E22.cjs → chunk-DD6H5PIF.cjs} +14 -4
- package/dist/chunk-DD6H5PIF.cjs.map +1 -0
- package/dist/{chunk-XJP5WCRZ.js → chunk-OUVD2XJX.js} +14 -4
- package/dist/chunk-OUVD2XJX.js.map +1 -0
- package/dist/index.cjs +96 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +16 -5
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +50 -50
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.js +1 -1
- package/dist/{types-BNsjfU8N.d.cts → types-PzImL4QI.d.cts} +64 -9
- package/dist/{types-BNsjfU8N.d.ts → types-PzImL4QI.d.ts} +64 -9
- package/package.json +1 -1
- package/src/client.ts +5 -3
- package/src/functions/actions.ts +25 -0
- package/src/index.ts +3 -0
- package/src/meta/index.ts +3 -0
- package/src/meta/pages.ts +28 -1
- package/src/meta/types.ts +45 -6
- package/src/types/options.ts +6 -0
- package/dist/chunk-7RGN4E22.cjs.map +0 -1
- package/dist/chunk-XJP5WCRZ.js.map +0 -1
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-
|
|
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
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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
|
-
|
|
820
|
-
|
|
821
|
-
|
|
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",
|