openxiangda 1.0.77 → 1.0.79
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/README.md +3 -1
- package/lib/cli.js +330 -11
- package/openxiangda-skills/SKILL.md +11 -9
- package/openxiangda-skills/references/automation-v3.md +17 -1
- package/openxiangda-skills/references/connector-resources.md +4 -1
- package/openxiangda-skills/references/data-views.md +23 -9
- package/openxiangda-skills/references/pages/page-sdk.md +15 -0
- package/openxiangda-skills/references/resource-manifest-cheatsheet.md +92 -19
- package/openxiangda-skills/references/workflow-v3.md +17 -1
- package/openxiangda-skills/skills/openxiangda-app/SKILL.md +7 -5
- package/openxiangda-skills/skills/openxiangda-core/SKILL.md +7 -4
- package/openxiangda-skills/skills/openxiangda-form/SKILL.md +9 -9
- package/openxiangda-skills/skills/openxiangda-inspect/SKILL.md +2 -2
- package/openxiangda-skills/skills/openxiangda-page/SKILL.md +19 -16
- package/openxiangda-skills/skills/openxiangda-permission-settings/SKILL.md +4 -4
- package/openxiangda-skills/skills/openxiangda-workflow-automation/SKILL.md +27 -8
- package/package.json +1 -1
- package/packages/sdk/dist/runtime/index.cjs +20 -0
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +18 -1
- package/packages/sdk/dist/runtime/index.d.ts +18 -1
- package/packages/sdk/dist/runtime/index.mjs +20 -0
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/templates/sy-lowcode-app-workspace/scripts/build-js-code.mjs +8 -2
- package/templates/sy-lowcode-app-workspace/tsconfig.js-code-nodes.json +5 -1
|
@@ -345,8 +345,22 @@ interface DataViewStatsParams extends DataViewQueryParams {
|
|
|
345
345
|
}
|
|
346
346
|
interface DataViewQueryResult<TItem = unknown> extends PageListResult<TItem> {
|
|
347
347
|
pageSize: number;
|
|
348
|
+
storageMode?: "materialized" | "live";
|
|
348
349
|
lastRefreshedAt?: string | null;
|
|
349
350
|
}
|
|
351
|
+
interface FunctionInvokeParams<TInput = unknown> {
|
|
352
|
+
appType?: string;
|
|
353
|
+
input?: TInput;
|
|
354
|
+
}
|
|
355
|
+
interface FunctionInvokeResult<TResult = unknown> {
|
|
356
|
+
invocationId: string;
|
|
357
|
+
functionCode: string;
|
|
358
|
+
result: TResult;
|
|
359
|
+
output?: TResult;
|
|
360
|
+
variables?: Record<string, unknown>;
|
|
361
|
+
logs?: unknown[];
|
|
362
|
+
duration?: number;
|
|
363
|
+
}
|
|
350
364
|
interface FormExportParams extends FormAdvancedSearchParams {
|
|
351
365
|
exportAll?: "y" | "n";
|
|
352
366
|
embedImages?: "y" | "n";
|
|
@@ -899,6 +913,9 @@ interface PageSdk {
|
|
|
899
913
|
query<T = unknown>(code: string, params?: DataViewQueryParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
|
|
900
914
|
stats<T = unknown>(code: string, params?: DataViewStatsParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
|
|
901
915
|
};
|
|
916
|
+
function: {
|
|
917
|
+
invoke<TResult = unknown, TInput = unknown>(code: string, params?: FunctionInvokeParams<TInput>): Promise<PageApiResponse<FunctionInvokeResult<TResult>>>;
|
|
918
|
+
};
|
|
902
919
|
notification: {
|
|
903
920
|
sendByType<T = SendNotificationResult>(params: SendNotificationByTypeParams): Promise<PageApiResponse<T>>;
|
|
904
921
|
batchSendByType<T = SendNotificationResult>(params: BatchSendNotificationByTypeParams): Promise<PageApiResponse<T>>;
|
|
@@ -1149,4 +1166,4 @@ interface NormalizeRuntimeFormSchemaOptions {
|
|
|
1149
1166
|
declare const extractFieldsFromComponentsTree: (componentsTree: any) => FieldDefinition[];
|
|
1150
1167
|
declare const normalizeRuntimeFormSchema: (payload: any, options: NormalizeRuntimeFormSchemaOptions) => FormSchema | undefined;
|
|
1151
1168
|
|
|
1152
|
-
export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type CustomPageModule, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type DataViewStatsParams, type FieldAccessLevel, type FieldAccessPolicyDto, type FieldAccessPolicyItemDto, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, createPageSdk, createReactPage, extractFieldsFromComponentsTree, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
|
|
1169
|
+
export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type CustomPageModule, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type DataViewStatsParams, type FieldAccessLevel, type FieldAccessPolicyDto, type FieldAccessPolicyItemDto, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type FunctionInvokeParams, type FunctionInvokeResult, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, createPageSdk, createReactPage, extractFieldsFromComponentsTree, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
|
|
@@ -345,8 +345,22 @@ interface DataViewStatsParams extends DataViewQueryParams {
|
|
|
345
345
|
}
|
|
346
346
|
interface DataViewQueryResult<TItem = unknown> extends PageListResult<TItem> {
|
|
347
347
|
pageSize: number;
|
|
348
|
+
storageMode?: "materialized" | "live";
|
|
348
349
|
lastRefreshedAt?: string | null;
|
|
349
350
|
}
|
|
351
|
+
interface FunctionInvokeParams<TInput = unknown> {
|
|
352
|
+
appType?: string;
|
|
353
|
+
input?: TInput;
|
|
354
|
+
}
|
|
355
|
+
interface FunctionInvokeResult<TResult = unknown> {
|
|
356
|
+
invocationId: string;
|
|
357
|
+
functionCode: string;
|
|
358
|
+
result: TResult;
|
|
359
|
+
output?: TResult;
|
|
360
|
+
variables?: Record<string, unknown>;
|
|
361
|
+
logs?: unknown[];
|
|
362
|
+
duration?: number;
|
|
363
|
+
}
|
|
350
364
|
interface FormExportParams extends FormAdvancedSearchParams {
|
|
351
365
|
exportAll?: "y" | "n";
|
|
352
366
|
embedImages?: "y" | "n";
|
|
@@ -899,6 +913,9 @@ interface PageSdk {
|
|
|
899
913
|
query<T = unknown>(code: string, params?: DataViewQueryParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
|
|
900
914
|
stats<T = unknown>(code: string, params?: DataViewStatsParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
|
|
901
915
|
};
|
|
916
|
+
function: {
|
|
917
|
+
invoke<TResult = unknown, TInput = unknown>(code: string, params?: FunctionInvokeParams<TInput>): Promise<PageApiResponse<FunctionInvokeResult<TResult>>>;
|
|
918
|
+
};
|
|
902
919
|
notification: {
|
|
903
920
|
sendByType<T = SendNotificationResult>(params: SendNotificationByTypeParams): Promise<PageApiResponse<T>>;
|
|
904
921
|
batchSendByType<T = SendNotificationResult>(params: BatchSendNotificationByTypeParams): Promise<PageApiResponse<T>>;
|
|
@@ -1149,4 +1166,4 @@ interface NormalizeRuntimeFormSchemaOptions {
|
|
|
1149
1166
|
declare const extractFieldsFromComponentsTree: (componentsTree: any) => FieldDefinition[];
|
|
1150
1167
|
declare const normalizeRuntimeFormSchema: (payload: any, options: NormalizeRuntimeFormSchemaOptions) => FormSchema | undefined;
|
|
1151
1168
|
|
|
1152
|
-
export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type CustomPageModule, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type DataViewStatsParams, type FieldAccessLevel, type FieldAccessPolicyDto, type FieldAccessPolicyItemDto, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, createPageSdk, createReactPage, extractFieldsFromComponentsTree, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
|
|
1169
|
+
export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type ChangeUserRoleParams, type ConnectorCallParams, type ConnectorInvokeParams, type ConnectorInvokeResult, type ConnectorRequestBodyType, type ConnectorResponseType, type CreateApiPermissionParams, type CreateFormPermissionGroupDto, type CreatePagePermissionGroupDto, type CreateRoleParams, type CreateUiPermissionParams, type CreateUserParams, type CurrentUserDepartmentParents, type CustomPageEntryConfig, type CustomPageEntryMode, type CustomPageModule, type DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type DataViewStatsParams, type FieldAccessLevel, type FieldAccessPolicyDto, type FieldAccessPolicyItemDto, type FieldPermissionDto, type FindNotificationConfigParams, type FormAdvancedSearchParams, type FormChangeRecordParams, type FormCreateParams, type FormExportParams, type FormGetDetailParams, type FormImportParams, type FormPermissionGroup, type FormRemoveParams, type FormSearchParams, type FormUpdateParams, type FunctionInvokeParams, type FunctionInvokeResult, type GetParentDepartmentsOptions, type GetProcessInstanceParams, type GetUserRolesParams, type ImportExportRecordDownloadParams, type ImportExportRecordQuery, type InstanceStatus, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, type NotificationChannel, type NotificationChannelConfig, type NotificationChannelsConfig, type NotificationConfigLevel, type NotificationMessageRecord, type NotificationTemplate, type NotificationTemplatePreview, type NotificationTypeConfig, type PageApiPermissionRecord, type PageApiResponse, type PageAppInfo, type PageBinaryResponse, type PageBridgeApi, type PageContext, type PageDataManagementConfig, type PageDataSourceDescriptor, type PageDepartmentInfo, type PageDepartmentRecord, type PageHttpMethod, type PageInfo, type PageListResult, type PageMessageApi, type PageModalApi, type PageNavigationApi, type PageOffsetListResult, type PagePermissionGroup, type PagePermissionInfo, PageProvider, type PageQueryValue, type PageRequestOptions, type PageRoleRecord, type PageRouteInfo, type PageScope, type PageSdk, type PageSdkError, type PageSdkMeta, type PageTransportDownloadPayload, type PageTransportRequestPayload, type PageUiPermissionRecord, type PageUiPermissionType, type PageUserInfo, type PageUserRecord, type PageUserType, type PreviewNotificationTemplateParams, type ProcessApproveAction, type QueryFormPermissionGroupDto, type QueryPagePermissionGroupDto, type RoleListParams, type RoleUsersParams, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, type SaveDataManagementConfigParams, type SearchComponentName, type SearchExpression, type SearchFieldKey, type SearchGroup, type SearchLogic, type SearchOperator, type SearchRule, type SearchSortItem, type SearchSystemField, type SendNotificationByTypeParams, type SendNotificationResult, type SubFormRule, type SwitchAppRoleParams, type SwitchPlatformRoleParams, type TerminateProcessInstanceParams, type TriggerCallbackTaskParams, type UiPermissionListParams, type UpdateApiPermissionParams, type UpdateFormPermissionGroupDto, type UpdatePagePermissionGroupDto, type UpdateRoleParams, type UpdateUiPermissionParams, type UpdateUserParams, type UserListParams, type UserMenuPermissionsResponse, type ValidateUserParams, type ViewFieldPermissionValue, type ViewOperationPermission, type ViewPermissionSummary, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, createPageSdk, createReactPage, extractFieldsFromComponentsTree, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
|
|
@@ -1993,6 +1993,25 @@ var createPageSdk = (context) => {
|
|
|
1993
1993
|
});
|
|
1994
1994
|
}
|
|
1995
1995
|
};
|
|
1996
|
+
const appFunction = {
|
|
1997
|
+
invoke: (code, params = {}) => {
|
|
1998
|
+
const functionCode = String(code || "").trim();
|
|
1999
|
+
if (!functionCode) {
|
|
2000
|
+
throw new Error("\u5E94\u7528\u51FD\u6570 code \u4E0D\u80FD\u4E3A\u7A7A");
|
|
2001
|
+
}
|
|
2002
|
+
return request({
|
|
2003
|
+
path: buildAppPath(
|
|
2004
|
+
context,
|
|
2005
|
+
params.appType,
|
|
2006
|
+
`/v1/functions/${encodePathSegment(functionCode)}/invoke.json`
|
|
2007
|
+
),
|
|
2008
|
+
method: "post",
|
|
2009
|
+
body: {
|
|
2010
|
+
input: params.input
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
1996
2015
|
const notification = {
|
|
1997
2016
|
sendByType: (params) => request({
|
|
1998
2017
|
path: buildOpenXiangdaAppPath(
|
|
@@ -2058,6 +2077,7 @@ var createPageSdk = (context) => {
|
|
|
2058
2077
|
process: process2,
|
|
2059
2078
|
notification,
|
|
2060
2079
|
dataView,
|
|
2080
|
+
function: appFunction,
|
|
2061
2081
|
dataSource: {
|
|
2062
2082
|
run: async (name, params = {}) => {
|
|
2063
2083
|
const descriptor = (context.page.dataSources || []).find(
|