openxiangda 1.0.86 → 1.0.88

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 (31) hide show
  1. package/README.md +30 -0
  2. package/lib/cli.js +391 -0
  3. package/openxiangda-skills/SKILL.md +5 -1
  4. package/openxiangda-skills/references/architecture-design.md +29 -0
  5. package/openxiangda-skills/references/openxiangda-api.md +109 -3
  6. package/openxiangda-skills/references/pages/page-sdk.md +35 -0
  7. package/openxiangda-skills/references/permissions-settings.md +39 -2
  8. package/openxiangda-skills/references/resource-manifest-cheatsheet.md +72 -4
  9. package/package.json +1 -1
  10. package/packages/sdk/dist/runtime/index.cjs +3624 -3394
  11. package/packages/sdk/dist/runtime/index.cjs.map +1 -1
  12. package/packages/sdk/dist/runtime/index.d.mts +4 -1001
  13. package/packages/sdk/dist/runtime/index.d.ts +4 -1001
  14. package/packages/sdk/dist/runtime/index.mjs +3083 -2855
  15. package/packages/sdk/dist/runtime/index.mjs.map +1 -1
  16. package/packages/sdk/dist/runtime/react.cjs +2826 -121
  17. package/packages/sdk/dist/runtime/react.cjs.map +1 -1
  18. package/packages/sdk/dist/runtime/react.d.mts +1400 -2
  19. package/packages/sdk/dist/runtime/react.d.ts +1400 -2
  20. package/packages/sdk/dist/runtime/react.mjs +2782 -89
  21. package/packages/sdk/dist/runtime/react.mjs.map +1 -1
  22. package/templates/openxiangda-react-spa/AGENTS.md +29 -0
  23. package/templates/openxiangda-react-spa/src/app/router.tsx +21 -1
  24. package/templates/openxiangda-react-spa/src/pages/public/PublicRegisterPage.tsx +15 -0
  25. package/templates/openxiangda-react-spa/src/resources/permissions/page-groups/public-visitor.json +8 -0
  26. package/templates/openxiangda-react-spa/src/resources/public-access/public-register.json +14 -0
  27. package/templates/openxiangda-react-spa/src/resources/routes/public-register.json +8 -0
  28. package/templates/openxiangda-react-spa/tsconfig.app.json +1 -1
  29. package/templates/openxiangda-react-spa/vite.config.ts +1 -1
  30. package/packages/sdk/dist/openxiangdaProvider-CaXMpsnK.d.mts +0 -328
  31. package/packages/sdk/dist/openxiangdaProvider-CaXMpsnK.d.ts +0 -328
@@ -1,1006 +1,9 @@
1
- export { A as AppAuthClient, a as AuthClientError, b as AuthClientOptions, c as AuthMethod, d as AuthMethodType, e as AuthTokenData, f as AuthUser, D as DingTalkLoginInput, G as GuestLoginInput, L as LoginMethodsResult, g as LoginPage, h as LoginPageProps, O as OpenXiangdaProvider, i as OpenXiangdaProviderProps, P as PasswordLoginInput, j as PermissionBoundary, k as PermissionBoundaryFallback, l as PermissionBoundaryFallbackState, m as PermissionBoundaryProps, n as PhoneCodeInput, o as PhoneCodeLoginInput, p as PhoneCodeRegisterInput, q as PhoneCodeSendResult, R as RefreshInput, r as ResolveLoginUrlInput, s as RouteAccessResult, t as RuntimeBootstrap, u as RuntimeErrorSnapshot, v as RuntimeErrorType, x as RuntimeLogoutOptions, y as RuntimeMenuItem, z as RuntimePagePermissions, B as RuntimeRedirectLoginOptions, C as RuntimeRequestError, E as RuntimeRequestState, F as RuntimeResolveLoginOptions, S as SsoLoginUrlInput, H as SsoLoginUrlResult, U as UseAuthOptions, I as UseCanAccessRouteInput, J as UseLoginMethodsState, K as createAuthClient, M as useAppMenus, N as useAuth, Q as useCanAccessRoute, T as useLoginMethods, V as useOpenXiangda, W as usePermission, X as useRuntimeAuth, Y as useRuntimeBootstrap } from '../openxiangdaProvider-CaXMpsnK.mjs';
2
- import React__default, { Dispatch, SetStateAction } from 'react';
1
+ import { PageContext, PageInfo, PageBridgeApi } from './react.mjs';
2
+ export { ApiPermissionListParams, AppAuthClient, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthClientError, AuthClientOptions, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormExportParams, FormGetDetailParams, FormImportParams, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InstanceStatus, LoginMethodsResult, LoginPage, LoginPageProps, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, OpenXiangdaProvider, OpenXiangdaProviderProps, PageApiPermissionRecord, PageApiResponse, PageAppInfo, PageBinaryResponse, PageDataManagementConfig, PageDataSourceDescriptor, PageDepartmentInfo, PageDepartmentRecord, PageHttpMethod, PageListResult, PageMessageApi, PageModalApi, PageNavigationApi, PageOffsetListResult, PagePermissionGroup, PagePermissionInfo, PageProvider, PageQueryValue, PageRequestOptions, PageRoleRecord, PageRouteInfo, PageScope, PageSdk, PageSdkError, PageSdkMeta, PageTransportDownloadPayload, PageTransportRequestPayload, PageUiPermissionRecord, PageUiPermissionType, PageUserInfo, PageUserRecord, PageUserType, PasswordLoginInput, PermissionBoundary, PermissionBoundaryFallback, PermissionBoundaryFallbackState, PermissionBoundaryProps, PhoneCodeInput, PhoneCodeLoginInput, PhoneCodeRegisterInput, PhoneCodeSendResult, PreviewNotificationTemplateParams, ProcessApproveAction, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResolveLoginUrlInput, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeBootstrap, RuntimeErrorSnapshot, RuntimeErrorType, RuntimeLogoutOptions, RuntimeMenuItem, RuntimePagePermissions, RuntimeRedirectLoginOptions, RuntimeRequestError, RuntimeRequestState, RuntimeResolveLoginOptions, SaveDataManagementConfigParams, SearchComponentName, SearchExpression, SearchFieldKey, SearchGroup, SearchLogic, SearchOperator, SearchRule, SearchSortItem, SearchSystemField, SendNotificationByTypeParams, SendNotificationResult, SsoLoginUrlInput, SsoLoginUrlResult, SubFormRule, SwitchAppRoleParams, SwitchPlatformRoleParams, TerminateProcessInstanceParams, TriggerCallbackTaskParams, UiPermissionListParams, UpdateApiPermissionParams, UpdateFormPermissionGroupDto, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import React__default from 'react';
4
5
  import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-U26h_FIh.mjs';
5
6
 
6
- type PageQueryValue = string | string[];
7
- type PageHttpMethod = "get" | "post" | "put" | "delete" | "patch";
8
- type PageScope = "platform" | "app";
9
- type PageUiPermissionType = "route" | "button";
10
- interface FieldPermissionDto {
11
- componentName: string;
12
- fieldName: string;
13
- label: string;
14
- value: "FORM_FILED_EDIT" | "FORM_FILED_VIEW" | "FORM_FILED_HIDDEN";
15
- }
16
- type FieldAccessLevel = "edit" | "readonly" | "hidden";
17
- interface FieldAccessPolicyItemDto {
18
- fieldId: string;
19
- access: FieldAccessLevel;
20
- }
21
- interface FieldAccessPolicyDto {
22
- defaultAccess: FieldAccessLevel;
23
- fields?: FieldAccessPolicyItemDto[];
24
- }
25
- type ViewFieldPermissionValue = "FORM_FILED_EDIT" | "FORM_FILED_VIEW" | "FORM_FILED_HIDDEN";
26
- interface DataPermissionRuleDto {
27
- field: string;
28
- componentType?: string;
29
- op: string;
30
- value: unknown;
31
- }
32
- interface DataPermissionConditionDto {
33
- logic: "AND" | "OR";
34
- rules?: DataPermissionRuleDto[];
35
- conditions?: DataPermissionConditionDto[];
36
- }
37
- interface DataPermissionDto {
38
- type: "condition" | "sql";
39
- condition?: DataPermissionConditionDto;
40
- logic?: "AND" | "OR";
41
- rules?: DataPermissionRuleDto[];
42
- expression?: string;
43
- }
44
- type SearchLogic = "AND" | "OR";
45
- type SearchOperator = "EQ" | "NEQ" | "LIKE" | "ILIKE" | "MATCH" | "CONTAINS" | "NOT_CONTAINS" | "IN" | "IS_NULL" | "IS_NOT_NULL" | "GT" | "GTE" | "GE" | "LT" | "LTE" | "LE" | "BETWEEN" | "EXISTS" | "NOT_EXISTS" | "PATH_EQ" | string;
46
- type SearchComponentName = "TextField" | "TextareaField" | "EditorField" | "SerialNumberField" | "NumberField" | "DateField" | "CascadeDateField" | "SelectField" | "RadioField" | "MultiSelectField" | "CheckboxField" | "CascadeSelectField" | "DepartmentSelectField" | "EmployeeSelectField" | "UserSelectField" | "JSONField" | "SubFormField" | string;
47
- type SearchSystemField = "createTime" | "modifiedTime" | "processInstanceId" | "processInstanceTitle" | "originator" | "originatorName" | "originatorCorp" | "created_at" | "updated_at" | "form_instance_id" | "instance_title" | "created_by" | "created_by_name" | "created_by_department_id";
48
- type SearchFieldKey = SearchSystemField | string;
49
- type InstanceStatus = "pending" | "running" | "completed" | "terminated" | "waiting" | "withdrawn";
50
- interface PageAppInfo {
51
- appType: string;
52
- tenantId: string;
53
- }
54
- interface PageRouteInfo {
55
- pathname: string;
56
- fullPath: string;
57
- params: Record<string, string | undefined>;
58
- query: Record<string, PageQueryValue>;
59
- hash: string;
60
- }
61
- interface PageDepartmentInfo {
62
- id?: string;
63
- name?: string;
64
- externalId?: string | null;
65
- }
66
- interface PageDepartmentRecord extends PageDepartmentInfo {
67
- id: string;
68
- parentId?: string | null;
69
- key?: string;
70
- title?: string;
71
- hasChildren?: boolean;
72
- isLeaf?: boolean;
73
- children?: PageDepartmentRecord[];
74
- supervisorUserIds?: string[];
75
- supervisors?: Array<{
76
- id: string;
77
- name: string;
78
- }>;
79
- createdAt?: string | Date;
80
- updatedAt?: string | Date;
81
- [key: string]: unknown;
82
- }
83
- interface GetParentDepartmentsOptions {
84
- includeSelf?: boolean;
85
- }
86
- interface CurrentUserDepartmentParents {
87
- department: PageDepartmentInfo;
88
- parents: PageDepartmentRecord[];
89
- }
90
- type PageUserType = "normal" | "guest";
91
- interface PageUserInfo {
92
- id: string;
93
- username: string;
94
- name?: string;
95
- jobNumber?: string;
96
- phone?: string | null;
97
- email?: string | null;
98
- avatar?: string | null;
99
- departments?: PageDepartmentInfo[];
100
- affiliatedDepartmentId?: string | null;
101
- affiliatedDepartment?: PageDepartmentInfo | null;
102
- tenantId: string;
103
- isGuest?: boolean;
104
- userType?: PageUserType;
105
- [key: string]: unknown;
106
- }
107
- interface PagePermissionInfo {
108
- canView: boolean;
109
- hasFullAccess: boolean;
110
- [key: string]: unknown;
111
- }
112
- interface SearchSortItem {
113
- id: string;
114
- isAsc: "y" | "n";
115
- }
116
- interface SearchRule {
117
- key: SearchFieldKey;
118
- componentName?: Exclude<SearchComponentName, "SubFormField">;
119
- operator?: Exclude<SearchOperator, "EXISTS" | "NOT_EXISTS">;
120
- value?: unknown;
121
- type?: string;
122
- }
123
- interface SearchGroup {
124
- logic?: SearchLogic;
125
- rules?: Array<SearchRule | SubFormRule>;
126
- conditions?: SearchGroup[];
127
- }
128
- interface SubFormRule {
129
- key: string;
130
- componentName: "SubFormField";
131
- operator?: "EXISTS" | "NOT_EXISTS" | "IS_NULL" | "IS_NOT_NULL";
132
- value?: SearchGroup;
133
- type?: string;
134
- }
135
- type SearchExpression = SearchRule | SubFormRule | Array<SearchRule | SubFormRule> | Array<Record<string, unknown>> | SearchGroup | Record<string, unknown>;
136
- interface PageDataSourceDescriptor {
137
- key: string;
138
- type: string;
139
- formUuid?: string;
140
- fields?: string[];
141
- permission?: "read" | "write" | string;
142
- defaultFilter?: SearchExpression | string;
143
- [key: string]: unknown;
144
- }
145
- type CustomPageEntryMode = "app-shell" | "plain-page";
146
- interface CustomPageEntryConfig {
147
- mode?: CustomPageEntryMode | string;
148
- hidePlatformNav?: boolean;
149
- defaultRoute?: string;
150
- [key: string]: unknown;
151
- }
152
- interface PageInfo {
153
- id: string;
154
- code: string;
155
- name: string;
156
- type: string;
157
- rendererType: string;
158
- routeKey: string;
159
- legacyFormUuid?: string;
160
- status: string;
161
- props: Record<string, unknown>;
162
- route: Record<string, unknown> | object;
163
- entry?: CustomPageEntryConfig;
164
- dataSources: PageDataSourceDescriptor[];
165
- capabilities: Record<string, unknown>;
166
- version?: string;
167
- buildId?: string;
168
- [key: string]: unknown;
169
- }
170
- interface PageMessageApi {
171
- success(text: string): void;
172
- error(text: string): void;
173
- warning(text: string): void;
174
- info(text: string): void;
175
- loading(text: string): () => void;
176
- }
177
- interface PageModalApi {
178
- confirm(input: {
179
- title: string;
180
- content: string;
181
- }): Promise<boolean>;
182
- }
183
- interface PageNavigationApi {
184
- /**
185
- * pageKey accepts legacy formUuid, routeKey, or pageCode.
186
- * Custom pages should prefer routeKey/pageCode over hard-coded legacy formUuid.
187
- */
188
- pushPage(pageKey: string, query?: Record<string, unknown>): void;
189
- replacePage(pageKey: string, query?: Record<string, unknown>): void;
190
- pushRoute(route: string, query?: Record<string, unknown>): void;
191
- replaceRoute(route: string, query?: Record<string, unknown>): void;
192
- updateQuery(query: Record<string, unknown>): void;
193
- setHash(hash: string): void;
194
- back(): void;
195
- }
196
- interface PageBridgeApi {
197
- invoke<T = unknown>(method: string, payload?: unknown): Promise<T>;
198
- subscribe?(event: string, listener: (payload: unknown) => void): () => void;
199
- }
200
- interface PageSdkMeta {
201
- packageName?: string;
202
- version?: string | null;
203
- supportedBridgeMethods?: string[];
204
- }
205
- interface PageApiResponse<TResult = unknown, TRaw = TResult> {
206
- code: number;
207
- success: boolean;
208
- message?: string;
209
- result: TResult | null;
210
- data?: TRaw;
211
- raw?: unknown;
212
- }
213
- interface PageBinaryResponse {
214
- blob: Blob;
215
- fileName?: string;
216
- contentType?: string;
217
- headers?: Record<string, string | undefined>;
218
- raw?: unknown;
219
- }
220
- interface PageListResult<TItem = unknown> {
221
- currentPage: number;
222
- data: TItem[];
223
- totalCount: number;
224
- }
225
- interface PageOffsetListResult<TItem = unknown> {
226
- items: TItem[];
227
- total: number;
228
- page: number;
229
- limit: number;
230
- }
231
- interface PageContext {
232
- protocolVersion: string;
233
- app: PageAppInfo;
234
- page: PageInfo;
235
- user: PageUserInfo;
236
- route: PageRouteInfo;
237
- env: Record<string, unknown>;
238
- permissions: PagePermissionInfo;
239
- capabilities: string[];
240
- ui: {
241
- message: PageMessageApi;
242
- modal: PageModalApi;
243
- };
244
- navigation: PageNavigationApi;
245
- bridge: PageBridgeApi;
246
- sdk?: PageSdkMeta;
247
- }
248
- interface PageRequestOptions<TQuery = Record<string, unknown>, TBody = unknown> {
249
- path: string;
250
- method: PageHttpMethod;
251
- query?: TQuery;
252
- body?: TBody;
253
- headers?: Record<string, string>;
254
- }
255
- interface PageTransportRequestPayload<TBody = unknown> {
256
- path: string;
257
- method: PageHttpMethod;
258
- query?: string;
259
- body?: TBody;
260
- headers?: Record<string, string>;
261
- }
262
- interface PageTransportDownloadPayload<TBody = unknown> {
263
- path: string;
264
- method: PageHttpMethod;
265
- query?: string;
266
- body?: TBody;
267
- headers?: Record<string, string>;
268
- }
269
- interface PageSdkError extends Error {
270
- method?: string;
271
- path?: string;
272
- response?: PageApiResponse<unknown>;
273
- raw?: unknown;
274
- }
275
- interface FormGetDetailParams {
276
- formUuid: string;
277
- formInstId?: string;
278
- formInstanceId?: string;
279
- appType?: string;
280
- }
281
- interface FormCreateParams {
282
- formUuid: string;
283
- appType?: string;
284
- data: Record<string, unknown>;
285
- }
286
- interface FormUpdateParams {
287
- formUuid: string;
288
- appType?: string;
289
- formInstId?: string;
290
- formInstanceId?: string;
291
- data?: Record<string, unknown>;
292
- updateFormDataJson?: string;
293
- }
294
- interface FormRemoveParams {
295
- formUuid: string;
296
- appType?: string;
297
- formInstId?: string;
298
- formInstanceId?: string;
299
- }
300
- interface FormChangeRecordParams {
301
- formUuid: string;
302
- appType?: string;
303
- formInstId?: string;
304
- formInstanceId?: string;
305
- page?: number;
306
- pageSize?: number;
307
- }
308
- interface FormSearchParams {
309
- formUuid: string;
310
- appType?: string;
311
- search?: SearchExpression;
312
- currentPage?: number;
313
- pageSize?: number;
314
- originatorId?: string;
315
- createFrom?: string;
316
- createTo?: string;
317
- modifiedFrom?: string;
318
- modifiedTo?: string;
319
- dynamicOrder?: string | SearchSortItem;
320
- instanceStatus?: InstanceStatus;
321
- }
322
- interface FormAdvancedSearchParams {
323
- formUuid: string;
324
- appType?: string;
325
- filters?: SearchExpression;
326
- conditionType?: SearchLogic;
327
- searchKeyWord?: string;
328
- currentPage?: number;
329
- pageSize?: number;
330
- order?: SearchSortItem | SearchSortItem[];
331
- instanceStatus?: InstanceStatus;
332
- }
333
- interface DataViewQueryParams {
334
- appType?: string;
335
- fields?: string[];
336
- filters?: SearchExpression | string;
337
- conditionType?: SearchLogic;
338
- searchKeyWord?: string;
339
- currentPage?: number;
340
- pageSize?: number;
341
- order?: SearchSortItem | SearchSortItem[];
342
- }
343
- interface DataViewStatsParams extends DataViewQueryParams {
344
- having?: SearchExpression | string;
345
- }
346
- interface DataViewQueryResult<TItem = unknown> extends PageListResult<TItem> {
347
- pageSize: number;
348
- storageMode?: "materialized" | "live";
349
- lastRefreshedAt?: string | null;
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
- }
364
- interface FormExportParams extends FormAdvancedSearchParams {
365
- exportAll?: "y" | "n";
366
- embedImages?: "y" | "n";
367
- exportFields?: string[];
368
- }
369
- interface FormImportParams {
370
- formUuid: string;
371
- appType?: string;
372
- fileBase64: string;
373
- fileName?: string;
374
- }
375
- interface ImportExportRecordQuery {
376
- formUuid: string;
377
- appType?: string;
378
- currentPage?: number;
379
- pageSize?: number;
380
- }
381
- interface ImportExportRecordDownloadParams {
382
- appType?: string;
383
- recordId: string;
384
- }
385
- interface DataManagementFilterState {
386
- filters?: SearchExpression;
387
- conditionType?: SearchLogic;
388
- searchKeyWord?: string;
389
- }
390
- interface PageDataManagementConfig {
391
- sort?: SearchSortItem[];
392
- showFields?: string[];
393
- filter?: DataManagementFilterState;
394
- widths?: Record<string, number>;
395
- lockFieldIds?: string[];
396
- lineHeight?: number;
397
- [key: string]: unknown;
398
- }
399
- interface DataManagementConfigParams {
400
- formUuid: string;
401
- appType?: string;
402
- }
403
- interface SaveDataManagementConfigParams extends DataManagementConfigParams {
404
- config: PageDataManagementConfig;
405
- }
406
- interface PageUserRecord extends PageUserInfo {
407
- phone?: string | null;
408
- email?: string | null;
409
- avatar?: string | null;
410
- status?: string;
411
- createdAt?: string;
412
- updatedAt?: string;
413
- validFrom?: string | null;
414
- validTo?: string | null;
415
- }
416
- interface CreateUserParams {
417
- id?: string;
418
- username?: string;
419
- password?: string;
420
- phone?: string;
421
- email?: string;
422
- name: string;
423
- avatar?: string;
424
- departmentIds?: string[];
425
- validFrom?: string | Date | null;
426
- validTo?: string | Date | null;
427
- }
428
- interface UpdateUserParams extends Partial<CreateUserParams> {
429
- id: string;
430
- }
431
- interface UserListParams {
432
- ids?: string[];
433
- departmentIds?: string[];
434
- name?: string;
435
- username?: string;
436
- phone?: string;
437
- email?: string;
438
- page?: number;
439
- pageSize?: number;
440
- }
441
- interface ValidateUserParams {
442
- username: string;
443
- password: string;
444
- }
445
- interface PageRoleRecord {
446
- id: string;
447
- name: string;
448
- code: string;
449
- scope: PageScope;
450
- appType?: string;
451
- description?: string;
452
- createdAt?: string;
453
- updatedAt?: string;
454
- }
455
- interface CreateRoleParams {
456
- name: string;
457
- code: string;
458
- scope: PageScope;
459
- appType?: string;
460
- description?: string;
461
- }
462
- type UpdateRoleParams = Partial<CreateRoleParams>;
463
- interface RoleListParams {
464
- appType?: string;
465
- name?: string;
466
- code?: string;
467
- page?: number;
468
- limit?: number;
469
- scope?: PageScope;
470
- }
471
- interface RoleUsersParams {
472
- page?: number;
473
- limit?: number;
474
- keyword?: string;
475
- }
476
- interface AssignRolesParams {
477
- userId: string;
478
- roleIds: string[];
479
- }
480
- interface ChangeUserRoleParams {
481
- userId: string;
482
- roleId: string;
483
- }
484
- interface BatchAddUsersToRoleParams {
485
- roleId: string;
486
- userIds: string[];
487
- }
488
- interface GetUserRolesParams {
489
- scope?: PageScope;
490
- appType?: string;
491
- }
492
- interface SwitchPlatformRoleParams {
493
- roleId: string;
494
- }
495
- interface SwitchAppRoleParams {
496
- roleId: string;
497
- appType?: string;
498
- }
499
- interface PageApiPermissionRecord {
500
- id: string;
501
- name: string;
502
- code: string;
503
- scope: PageScope;
504
- method?: "GET" | "POST" | "PUT" | "DELETE" | "ANY";
505
- path?: string;
506
- appType?: string;
507
- description?: string;
508
- parentId?: string;
509
- children?: PageApiPermissionRecord[];
510
- }
511
- interface PageUiPermissionRecord {
512
- id: string;
513
- name: string;
514
- code: string;
515
- type: PageUiPermissionType;
516
- scope: PageScope;
517
- appType?: string;
518
- description?: string;
519
- parentId?: string;
520
- children?: PageUiPermissionRecord[];
521
- }
522
- interface CreateApiPermissionParams {
523
- name: string;
524
- code: string;
525
- scope: PageScope;
526
- method?: "GET" | "POST" | "PUT" | "DELETE" | "ANY";
527
- path: string;
528
- description?: string;
529
- parentId?: string;
530
- appType?: string;
531
- }
532
- type UpdateApiPermissionParams = Partial<CreateApiPermissionParams>;
533
- interface ApiPermissionListParams {
534
- code?: string;
535
- scope?: PageScope;
536
- appType?: string;
537
- page?: number;
538
- limit?: number;
539
- }
540
- interface AssignPermissionsParams {
541
- roleId: string;
542
- permissionIds: string[];
543
- }
544
- interface CreateUiPermissionParams {
545
- name: string;
546
- code: string;
547
- type: PageUiPermissionType;
548
- scope: PageScope;
549
- appType?: string;
550
- description?: string;
551
- parentId?: string;
552
- }
553
- type UpdateUiPermissionParams = Partial<CreateUiPermissionParams>;
554
- interface UiPermissionListParams extends ApiPermissionListParams {
555
- type?: PageUiPermissionType;
556
- }
557
- interface FormPermissionGroup {
558
- id: string;
559
- appType: string;
560
- formUuid: string;
561
- name: string;
562
- type: "submit" | "view";
563
- roles: string[];
564
- dataScope?: "all" | "self";
565
- operations?: string[];
566
- fieldPermissions?: FieldPermissionDto[];
567
- fieldAccessPolicy?: FieldAccessPolicyDto | null;
568
- dataPermission?: DataPermissionDto;
569
- createdAt?: string;
570
- updatedAt?: string;
571
- }
572
- type ViewOperationPermission = "view" | "edit" | "delete" | "change_records" | "workflow";
573
- interface ViewPermissionSummary {
574
- fieldPermissions: Record<string, ViewFieldPermissionValue>;
575
- operations: ViewOperationPermission[];
576
- }
577
- interface CreateFormPermissionGroupDto {
578
- appType: string;
579
- formUuid: string;
580
- name: string;
581
- type: "submit" | "view";
582
- roles: string[];
583
- dataScope?: "all" | "self";
584
- operations?: string[];
585
- fieldPermissions?: FieldPermissionDto[];
586
- fieldAccessPolicy?: FieldAccessPolicyDto | null;
587
- dataPermission?: DataPermissionDto;
588
- }
589
- interface UpdateFormPermissionGroupDto {
590
- appType?: string;
591
- formUuid?: string;
592
- name?: string;
593
- type?: "submit" | "view";
594
- roles?: string[];
595
- dataScope?: "all" | "self";
596
- operations?: string[];
597
- fieldPermissions?: FieldPermissionDto[];
598
- fieldAccessPolicy?: FieldAccessPolicyDto | null;
599
- dataPermission?: DataPermissionDto;
600
- }
601
- interface QueryFormPermissionGroupDto {
602
- appType?: string;
603
- formUuid?: string;
604
- type?: "submit" | "view";
605
- name?: string;
606
- page?: number;
607
- limit?: number;
608
- }
609
- interface PagePermissionGroup {
610
- id: string;
611
- appType: string;
612
- name: string;
613
- roles: string[];
614
- menuFormUuids: string[];
615
- createdAt?: string;
616
- updatedAt?: string;
617
- }
618
- interface CreatePagePermissionGroupDto {
619
- appType: string;
620
- name: string;
621
- roles: string[];
622
- menuFormUuids: string[];
623
- }
624
- interface UpdatePagePermissionGroupDto {
625
- appType?: string;
626
- name?: string;
627
- roles?: string[];
628
- menuFormUuids?: string[];
629
- }
630
- interface QueryPagePermissionGroupDto {
631
- appType?: string;
632
- name?: string;
633
- page?: number;
634
- limit?: number;
635
- }
636
- interface UserMenuPermissionsResponse {
637
- appType: string;
638
- menuFormUuids: string[];
639
- hasFullAccess: boolean;
640
- }
641
- type NotificationChannel = "inapp" | "email" | "dingding" | "wechat" | "thirdparty_todo";
642
- interface SendNotificationByTypeParams {
643
- notificationType: string;
644
- recipientId: string;
645
- appType?: string;
646
- formUuid?: string;
647
- payload: Record<string, unknown>;
648
- channels?: NotificationChannel[];
649
- }
650
- interface BatchSendNotificationByTypeParams {
651
- notificationType: string;
652
- appType?: string;
653
- formUuid?: string;
654
- recipients: Array<{
655
- recipientId: string;
656
- payload: Record<string, unknown>;
657
- channels?: NotificationChannel[];
658
- }>;
659
- }
660
- interface NotificationChannelConfig {
661
- enabled?: boolean;
662
- title?: string;
663
- content?: string;
664
- config?: Record<string, unknown>;
665
- [key: string]: unknown;
666
- }
667
- interface NotificationChannelsConfig {
668
- inapp?: NotificationChannelConfig;
669
- email?: NotificationChannelConfig;
670
- dingding?: NotificationChannelConfig;
671
- wechat?: NotificationChannelConfig;
672
- thirdparty_todo?: NotificationChannelConfig;
673
- [key: string]: NotificationChannelConfig | undefined;
674
- }
675
- type NotificationConfigLevel = "platform" | "app" | "form";
676
- interface NotificationTemplate {
677
- id?: string;
678
- code: string;
679
- name: string;
680
- content?: string;
681
- description?: string;
682
- level?: NotificationConfigLevel;
683
- appType?: string;
684
- formUuid?: string;
685
- priority?: number;
686
- enabled?: boolean;
687
- variables?: string[];
688
- channelsConfig?: NotificationChannelsConfig;
689
- [key: string]: unknown;
690
- }
691
- interface NotificationTypeConfig {
692
- id?: string;
693
- notificationType: string;
694
- level?: NotificationConfigLevel;
695
- appType?: string;
696
- formUuid?: string;
697
- templateId?: string;
698
- template?: NotificationTemplate;
699
- enabled?: boolean;
700
- priority?: number;
701
- description?: string;
702
- [key: string]: unknown;
703
- }
704
- interface PreviewNotificationTemplateParams {
705
- appType?: string;
706
- templateId?: string;
707
- templateCode?: string;
708
- code?: string;
709
- level?: "app" | "form";
710
- formUuid?: string;
711
- payload?: Record<string, unknown>;
712
- }
713
- interface NotificationTemplatePreview {
714
- defaultContent?: string;
715
- channelPreviews?: Record<string, string>;
716
- enabledChannels?: Array<NotificationChannel | string>;
717
- [key: string]: unknown;
718
- }
719
- interface FindNotificationConfigParams {
720
- appType?: string;
721
- formUuid?: string;
722
- }
723
- interface NotificationMessageRecord {
724
- id?: string;
725
- messageId?: string;
726
- channel?: NotificationChannel | string;
727
- status?: "pending" | "sent" | "failed" | string;
728
- recipientId?: string;
729
- [key: string]: unknown;
730
- }
731
- interface SendNotificationResult {
732
- messages: NotificationMessageRecord[];
733
- }
734
- type ProcessApproveAction = "approved" | "rejected" | "returned";
735
- interface GetProcessInstanceParams {
736
- appType?: string;
737
- instanceId: string;
738
- }
739
- interface TerminateProcessInstanceParams {
740
- appType?: string;
741
- processInstanceId: string;
742
- reason?: string;
743
- }
744
- interface ApproveTaskParams {
745
- instanceId: string;
746
- action: ProcessApproveAction;
747
- comments?: string;
748
- formUuid: string;
749
- appType?: string;
750
- updateFormDataJson?: string;
751
- }
752
- interface TriggerCallbackTaskParams {
753
- appType?: string;
754
- taskId: string;
755
- payload?: unknown;
756
- }
757
- type ConnectorRequestBodyType = "json" | "form-data" | "x-www-form-urlencoded" | "text" | "raw";
758
- type ConnectorResponseType = "json" | "text" | "binary";
759
- interface ConnectorInvokeParams<TBody = unknown> {
760
- appType?: string;
761
- connector: string;
762
- api: string;
763
- pathParams?: Record<string, unknown>;
764
- query?: Record<string, unknown>;
765
- body?: TBody;
766
- headers?: Record<string, string>;
767
- requestBodyType?: ConnectorRequestBodyType;
768
- responseType?: ConnectorResponseType;
769
- }
770
- interface ConnectorInvokeResult<TResult = unknown> {
771
- status: number;
772
- duration: number;
773
- data: TResult;
774
- headers?: Record<string, unknown>;
775
- contentType?: string;
776
- encoding?: "base64";
777
- }
778
- interface ConnectorCallParams<TBody = unknown> extends Omit<ConnectorInvokeParams<TBody>, "connector" | "api"> {
779
- }
780
- interface AuthLogoutRedirectOptions {
781
- loginUrl?: string;
782
- callbackUrl?: string;
783
- callbackParamName?: string;
784
- replace?: boolean;
785
- continueOnLogoutError?: boolean;
786
- fallback?: "reload" | "none";
787
- redirect?: (url: string) => void;
788
- }
789
- interface PageSdk {
790
- context: PageContext;
791
- request<TResult = unknown, TRaw = TResult>(options: PageRequestOptions): Promise<PageApiResponse<TResult, TRaw>>;
792
- download(options: PageRequestOptions): Promise<PageBinaryResponse>;
793
- transport: {
794
- request<TResult = unknown, TRaw = TResult>(options: PageRequestOptions): Promise<PageApiResponse<TResult, TRaw>>;
795
- download(options: PageRequestOptions): Promise<PageBinaryResponse>;
796
- };
797
- auth: {
798
- logout<T = boolean>(): Promise<PageApiResponse<T>>;
799
- logoutAndRedirect<T = boolean>(options?: AuthLogoutRedirectOptions): Promise<PageApiResponse<T> | null>;
800
- };
801
- connector: {
802
- invoke<TResult = unknown, TBody = unknown>(params: ConnectorInvokeParams<TBody>): Promise<PageApiResponse<ConnectorInvokeResult<TResult>>>;
803
- call<TResult = unknown, TBody = unknown>(name: string, params?: ConnectorCallParams<TBody>): Promise<PageApiResponse<ConnectorInvokeResult<TResult>>>;
804
- download<TBody = unknown>(params: ConnectorInvokeParams<TBody>): Promise<PageBinaryResponse>;
805
- };
806
- form: {
807
- getDetail<T = unknown>(params: FormGetDetailParams): Promise<PageApiResponse<T>>;
808
- create<T = unknown, TRaw = unknown>(params: FormCreateParams): Promise<PageApiResponse<T, TRaw>>;
809
- update<T = unknown, TRaw = unknown>(params: FormUpdateParams): Promise<PageApiResponse<T, TRaw>>;
810
- remove<T = unknown, TRaw = unknown>(params: FormRemoveParams): Promise<PageApiResponse<T, TRaw>>;
811
- getChangeRecords<T = unknown>(params: FormChangeRecordParams): Promise<PageApiResponse<T>>;
812
- search<T = unknown>(params: FormSearchParams): Promise<PageApiResponse<PageListResult<T>>>;
813
- searchIds<T = string>(params: FormSearchParams): Promise<PageApiResponse<PageListResult<T>>>;
814
- advancedSearch<T = unknown>(params: FormAdvancedSearchParams): Promise<PageApiResponse<PageListResult<T>>>;
815
- advancedExport(params: FormExportParams): Promise<PageBinaryResponse>;
816
- downloadImportTemplate(params: DataManagementConfigParams): Promise<PageBinaryResponse>;
817
- importPreview<T = unknown>(params: FormImportParams): Promise<PageApiResponse<T>>;
818
- importExcel<T = unknown>(params: FormImportParams): Promise<PageApiResponse<T>>;
819
- getImportRecords<T = unknown>(params: ImportExportRecordQuery): Promise<PageApiResponse<T>>;
820
- getExportRecords<T = unknown>(params: ImportExportRecordQuery): Promise<PageApiResponse<T>>;
821
- downloadImportSource(params: ImportExportRecordDownloadParams): Promise<PageBinaryResponse>;
822
- downloadImportFailed(params: ImportExportRecordDownloadParams): Promise<PageBinaryResponse>;
823
- downloadExportRecord(params: ImportExportRecordDownloadParams): Promise<PageBinaryResponse>;
824
- getDataManagementConfig<T = PageDataManagementConfig | null>(params: DataManagementConfigParams): Promise<PageApiResponse<T>>;
825
- saveDataManagementConfig<T = PageDataManagementConfig>(params: SaveDataManagementConfigParams): Promise<PageApiResponse<T>>;
826
- };
827
- user: {
828
- create<T = PageUserRecord>(params: CreateUserParams): Promise<PageApiResponse<T>>;
829
- update<T = PageUserRecord>(params: UpdateUserParams): Promise<PageApiResponse<T>>;
830
- remove<T = boolean>(id: string): Promise<PageApiResponse<T>>;
831
- get<T = PageUserRecord>(id?: string): Promise<PageApiResponse<T>>;
832
- getCurrent<T = PageUserRecord>(): Promise<PageApiResponse<T>>;
833
- getByUsername<T = PageUserRecord>(username: string): Promise<PageApiResponse<T>>;
834
- list<T = PageOffsetListResult<PageUserRecord>>(params?: UserListParams): Promise<PageApiResponse<T>>;
835
- search<T = PageUserRecord[]>(keyword?: string): Promise<PageApiResponse<T>>;
836
- listAll<T = PageUserRecord[]>(): Promise<PageApiResponse<T>>;
837
- listByDepartment<T = PageUserRecord[]>(departmentId: string): Promise<PageApiResponse<T>>;
838
- validate<T = unknown>(params: ValidateUserParams): Promise<PageApiResponse<T>>;
839
- };
840
- department: {
841
- getParentDepartments<T = PageDepartmentRecord[]>(departmentId: string, options?: GetParentDepartmentsOptions): Promise<PageApiResponse<T>>;
842
- getCurrentUserParentDepartments(options?: GetParentDepartmentsOptions): Promise<CurrentUserDepartmentParents[]>;
843
- };
844
- role: {
845
- create<T = PageRoleRecord>(params: CreateRoleParams): Promise<PageApiResponse<T>>;
846
- update<T = PageRoleRecord>(id: string, params: UpdateRoleParams): Promise<PageApiResponse<T>>;
847
- remove<T = boolean>(id: string): Promise<PageApiResponse<T>>;
848
- get<T = PageRoleRecord | null>(id: string): Promise<PageApiResponse<T>>;
849
- list<T = PageOffsetListResult<PageRoleRecord>>(params?: RoleListParams): Promise<PageApiResponse<T>>;
850
- listUsers<T = PageOffsetListResult<PageUserRecord>>(roleId: string, params?: RoleUsersParams): Promise<PageApiResponse<T>>;
851
- assignRoles<T = PageUserRecord>(params: AssignRolesParams): Promise<PageApiResponse<T>>;
852
- addUserRole<T = boolean>(params: ChangeUserRoleParams): Promise<PageApiResponse<T>>;
853
- removeUserRole<T = boolean>(params: ChangeUserRoleParams): Promise<PageApiResponse<T>>;
854
- batchAddUsers<T = unknown>(params: BatchAddUsersToRoleParams): Promise<PageApiResponse<T>>;
855
- getMyRoles<T = PageRoleRecord[]>(params?: GetUserRolesParams): Promise<PageApiResponse<T>>;
856
- getCurrentRole<T = PageRoleRecord | null>(params?: GetUserRolesParams): Promise<PageApiResponse<T>>;
857
- switchPlatformRole<T = boolean>(params: SwitchPlatformRoleParams): Promise<PageApiResponse<T>>;
858
- switchAppRole<T = boolean>(params: SwitchAppRoleParams): Promise<PageApiResponse<T>>;
859
- };
860
- permission: {
861
- formGroup: {
862
- create<T = FormPermissionGroup>(params: CreateFormPermissionGroupDto): Promise<PageApiResponse<T>>;
863
- update<T = FormPermissionGroup>(id: string, params: UpdateFormPermissionGroupDto): Promise<PageApiResponse<T>>;
864
- remove<T = boolean>(id: string): Promise<PageApiResponse<T>>;
865
- get<T = FormPermissionGroup | null>(id: string): Promise<PageApiResponse<T>>;
866
- list<T = PageOffsetListResult<FormPermissionGroup>>(params?: QueryFormPermissionGroupDto): Promise<PageApiResponse<T>>;
867
- getViewFieldPermissions<T = Record<string, ViewFieldPermissionValue>>(params: {
868
- appType?: string;
869
- formUuid: string;
870
- }): Promise<PageApiResponse<T>>;
871
- getViewPermissionSummary<T = ViewPermissionSummary>(params: {
872
- appType?: string;
873
- formUuid: string;
874
- }): Promise<PageApiResponse<T>>;
875
- };
876
- pageGroup: {
877
- create<T = PagePermissionGroup>(params: CreatePagePermissionGroupDto): Promise<PageApiResponse<T>>;
878
- update<T = PagePermissionGroup>(id: string, params: UpdatePagePermissionGroupDto): Promise<PageApiResponse<T>>;
879
- remove<T = boolean>(id: string): Promise<PageApiResponse<T>>;
880
- get<T = PagePermissionGroup | null>(id: string): Promise<PageApiResponse<T>>;
881
- list<T = PageOffsetListResult<PagePermissionGroup>>(params?: QueryPagePermissionGroupDto): Promise<PageApiResponse<T>>;
882
- getUserMenuPermissions<T = UserMenuPermissionsResponse>(appType?: string): Promise<PageApiResponse<T>>;
883
- };
884
- api: {
885
- create<T = PageApiPermissionRecord>(params: CreateApiPermissionParams): Promise<PageApiResponse<T>>;
886
- update<T = PageApiPermissionRecord>(id: string, params: UpdateApiPermissionParams): Promise<PageApiResponse<T>>;
887
- remove<T = boolean>(id: string): Promise<PageApiResponse<T>>;
888
- list<T = PageOffsetListResult<PageApiPermissionRecord>>(params?: ApiPermissionListParams): Promise<PageApiResponse<T>>;
889
- assign<T = boolean>(params: AssignPermissionsParams): Promise<PageApiResponse<T>>;
890
- getByRole<T = PageApiPermissionRecord[]>(roleId: string): Promise<PageApiResponse<T>>;
891
- getRolesByPermission<T = PageRoleRecord[]>(permissionId: string): Promise<PageApiResponse<T>>;
892
- };
893
- ui: {
894
- create<T = PageUiPermissionRecord>(params: CreateUiPermissionParams): Promise<PageApiResponse<T>>;
895
- update<T = PageUiPermissionRecord>(id: string, params: UpdateUiPermissionParams): Promise<PageApiResponse<T>>;
896
- remove<T = boolean>(id: string): Promise<PageApiResponse<T>>;
897
- list<T = PageOffsetListResult<PageUiPermissionRecord>>(params?: UiPermissionListParams): Promise<PageApiResponse<T>>;
898
- assign<T = boolean>(params: AssignPermissionsParams): Promise<PageApiResponse<T>>;
899
- getMyPlatform<T = PageUiPermissionRecord[]>(): Promise<PageApiResponse<T>>;
900
- getMyApp<T = PageUiPermissionRecord[]>(appType?: string): Promise<PageApiResponse<T>>;
901
- };
902
- };
903
- process: {
904
- getInstance<T = unknown>(params: GetProcessInstanceParams): Promise<PageApiResponse<T>>;
905
- terminateInstance<T = unknown>(params: TerminateProcessInstanceParams): Promise<PageApiResponse<T>>;
906
- approveTask<T = unknown>(params: ApproveTaskParams): Promise<PageApiResponse<T>>;
907
- triggerCallbackTask<T = unknown>(params: TriggerCallbackTaskParams): Promise<PageApiResponse<T>>;
908
- };
909
- dataSource: {
910
- run<TResult = unknown, TRaw = TResult>(name: string, params?: Record<string, unknown>): Promise<PageApiResponse<TResult, TRaw>>;
911
- };
912
- dataView: {
913
- query<T = unknown>(code: string, params?: DataViewQueryParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
914
- stats<T = unknown>(code: string, params?: DataViewStatsParams): Promise<PageApiResponse<DataViewQueryResult<T>>>;
915
- };
916
- function: {
917
- invoke<TResult = unknown, TInput = unknown>(code: string, params?: FunctionInvokeParams<TInput>): Promise<PageApiResponse<FunctionInvokeResult<TResult>>>;
918
- };
919
- notification: {
920
- sendByType<T = SendNotificationResult>(params: SendNotificationByTypeParams): Promise<PageApiResponse<T>>;
921
- batchSendByType<T = SendNotificationResult>(params: BatchSendNotificationByTypeParams): Promise<PageApiResponse<T>>;
922
- findConfig<T = NotificationTypeConfig | null>(notificationType: string, params?: FindNotificationConfigParams): Promise<PageApiResponse<T>>;
923
- previewTemplate<T = NotificationTemplatePreview>(params: PreviewNotificationTemplateParams): Promise<PageApiResponse<T>>;
924
- };
925
- navigation: PageNavigationApi;
926
- ui: PageContext["ui"];
927
- }
928
-
929
- declare const createPageSdk: (context: PageContext) => PageSdk;
930
-
931
- declare const createReactPage: (AppComponent: React__default.ComponentType) => {
932
- mount: (el: HTMLElement, context: PageContext) => void;
933
- update: (el: HTMLElement, context: PageContext) => void;
934
- unmount: () => void;
935
- };
936
-
937
- interface PageProviderProps {
938
- context: PageContext;
939
- children: React__default.ReactNode;
940
- }
941
- declare const PageProvider: React__default.FC<PageProviderProps>;
942
-
943
- interface CurrentUserState {
944
- user: PageUserInfo & {
945
- userType: PageUserType;
946
- isGuest: boolean;
947
- };
948
- isGuest: boolean;
949
- isInternalUser: boolean;
950
- displayName: string;
951
- primaryDepartment: NonNullable<PageUserInfo["departments"]>[number] | null;
952
- affiliatedDepartment: PageUserInfo["affiliatedDepartment"] | null;
953
- }
954
- declare const useCurrentUser: () => CurrentUserState;
955
-
956
- interface UseDataSourceOptions<TResult = unknown, TData = TResult, TParams extends Record<string, unknown> = Record<string, unknown>> {
957
- params?: TParams;
958
- immediate?: boolean;
959
- transform?: (result: TResult, response: PageApiResponse<TResult>) => TData;
960
- }
961
- interface UseDataSourceResult<TResult = unknown, TData = TResult, TParams extends Record<string, unknown> = Record<string, unknown>> {
962
- response: PageApiResponse<TResult> | null;
963
- result: TResult | null;
964
- data: TData | null;
965
- loading: boolean;
966
- error: Error | null;
967
- refresh: (params?: TParams) => Promise<PageApiResponse<TResult> | null>;
968
- run: (params?: TParams) => Promise<PageApiResponse<TResult> | null>;
969
- setResponse: Dispatch<SetStateAction<PageApiResponse<TResult> | null>>;
970
- setResult: Dispatch<SetStateAction<TResult | null>>;
971
- setData: Dispatch<SetStateAction<TData | null>>;
972
- }
973
- declare const useDataSource: <TResult = unknown, TData = TResult, TParams extends Record<string, unknown> = Record<string, unknown>>(name: string, options?: UseDataSourceOptions<TResult, TData, TParams>) => UseDataSourceResult<TResult, TData, TParams>;
974
-
975
- interface UseFormViewPermissionsOptions {
976
- appType?: string;
977
- immediate?: boolean;
978
- }
979
- interface UseFormViewPermissionsState {
980
- summary: ViewPermissionSummary;
981
- response: PageApiResponse<ViewPermissionSummary> | null;
982
- loading: boolean;
983
- error: Error | null;
984
- refresh: () => Promise<PageApiResponse<ViewPermissionSummary> | null>;
985
- can: (operation: ViewOperationPermission) => boolean;
986
- getFieldPermission: (fieldName: string) => ViewFieldPermissionValue | null;
987
- }
988
- declare const useFormViewPermissions: (formUuid: string, options?: UseFormViewPermissionsOptions) => UseFormViewPermissionsState;
989
-
990
- declare const useMessage: () => PageMessageApi;
991
-
992
- declare const useModal: () => PageModalApi;
993
-
994
- declare const useNavigation: () => PageNavigationApi;
995
-
996
- declare const usePageContext: () => PageContext;
997
-
998
- declare const usePageProps: <T extends object = Record<string, unknown>>() => T;
999
-
1000
- declare const usePageRoute: () => PageRouteInfo;
1001
-
1002
- declare const usePageSdk: () => PageSdk;
1003
-
1004
7
  type RuntimeCssIsolation = "none" | "namespace" | "shadow";
1005
8
  interface RuntimeHostBootstrap {
1006
9
  app: PageContext["app"];
@@ -1166,4 +169,4 @@ interface NormalizeRuntimeFormSchemaOptions {
1166
169
  declare const extractFieldsFromComponentsTree: (componentsTree: any) => FieldDefinition[];
1167
170
  declare const normalizeRuntimeFormSchema: (payload: any, options: NormalizeRuntimeFormSchemaOptions) => FormSchema | undefined;
1168
171
 
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 };
172
+ export { 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 CustomPageModule, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, PageBridgeApi, PageContext, PageInfo, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, extractFieldsFromComponentsTree, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets };