openxiangda 1.0.40 → 1.0.42

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.
@@ -10,6 +10,15 @@ interface FieldPermissionDto {
10
10
  label: string;
11
11
  value: "FORM_FILED_EDIT" | "FORM_FILED_VIEW" | "FORM_FILED_HIDDEN";
12
12
  }
13
+ type FieldAccessLevel = "edit" | "readonly" | "hidden";
14
+ interface FieldAccessPolicyItemDto {
15
+ fieldId: string;
16
+ access: FieldAccessLevel;
17
+ }
18
+ interface FieldAccessPolicyDto {
19
+ defaultAccess: FieldAccessLevel;
20
+ fields?: FieldAccessPolicyItemDto[];
21
+ }
13
22
  type ViewFieldPermissionValue = "FORM_FILED_EDIT" | "FORM_FILED_VIEW" | "FORM_FILED_HIDDEN";
14
23
  interface DataPermissionRuleDto {
15
24
  field: string;
@@ -49,6 +58,7 @@ interface PageRouteInfo {
49
58
  interface PageDepartmentInfo {
50
59
  id?: string;
51
60
  name?: string;
61
+ externalId?: string | null;
52
62
  }
53
63
  interface PageDepartmentRecord extends PageDepartmentInfo {
54
64
  id: string;
@@ -84,6 +94,8 @@ interface PageUserInfo {
84
94
  email?: string | null;
85
95
  avatar?: string | null;
86
96
  departments?: PageDepartmentInfo[];
97
+ affiliatedDepartmentId?: string | null;
98
+ affiliatedDepartment?: PageDepartmentInfo | null;
87
99
  tenantId: string;
88
100
  isGuest?: boolean;
89
101
  userType?: PageUserType;
@@ -535,6 +547,7 @@ interface FormPermissionGroup {
535
547
  dataScope?: "all" | "self";
536
548
  operations?: string[];
537
549
  fieldPermissions?: FieldPermissionDto[];
550
+ fieldAccessPolicy?: FieldAccessPolicyDto | null;
538
551
  dataPermission?: DataPermissionDto;
539
552
  createdAt?: string;
540
553
  updatedAt?: string;
@@ -553,6 +566,7 @@ interface CreateFormPermissionGroupDto {
553
566
  dataScope?: "all" | "self";
554
567
  operations?: string[];
555
568
  fieldPermissions?: FieldPermissionDto[];
569
+ fieldAccessPolicy?: FieldAccessPolicyDto | null;
556
570
  dataPermission?: DataPermissionDto;
557
571
  }
558
572
  interface UpdateFormPermissionGroupDto {
@@ -564,6 +578,7 @@ interface UpdateFormPermissionGroupDto {
564
578
  dataScope?: "all" | "self";
565
579
  operations?: string[];
566
580
  fieldPermissions?: FieldPermissionDto[];
581
+ fieldAccessPolicy?: FieldAccessPolicyDto | null;
567
582
  dataPermission?: DataPermissionDto;
568
583
  }
569
584
  interface QueryFormPermissionGroupDto {
@@ -914,6 +929,7 @@ interface CurrentUserState {
914
929
  isInternalUser: boolean;
915
930
  displayName: string;
916
931
  primaryDepartment: NonNullable<PageUserInfo["departments"]>[number] | null;
932
+ affiliatedDepartment: PageUserInfo["affiliatedDepartment"] | null;
917
933
  }
918
934
  declare const useCurrentUser: () => CurrentUserState;
919
935
 
@@ -965,4 +981,4 @@ declare const usePageRoute: () => PageRouteInfo;
965
981
 
966
982
  declare const usePageSdk: () => PageSdk;
967
983
 
968
- export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, 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 DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type DataViewStatsParams, 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 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 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, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
984
+ export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, 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 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 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 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, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
@@ -10,6 +10,15 @@ interface FieldPermissionDto {
10
10
  label: string;
11
11
  value: "FORM_FILED_EDIT" | "FORM_FILED_VIEW" | "FORM_FILED_HIDDEN";
12
12
  }
13
+ type FieldAccessLevel = "edit" | "readonly" | "hidden";
14
+ interface FieldAccessPolicyItemDto {
15
+ fieldId: string;
16
+ access: FieldAccessLevel;
17
+ }
18
+ interface FieldAccessPolicyDto {
19
+ defaultAccess: FieldAccessLevel;
20
+ fields?: FieldAccessPolicyItemDto[];
21
+ }
13
22
  type ViewFieldPermissionValue = "FORM_FILED_EDIT" | "FORM_FILED_VIEW" | "FORM_FILED_HIDDEN";
14
23
  interface DataPermissionRuleDto {
15
24
  field: string;
@@ -49,6 +58,7 @@ interface PageRouteInfo {
49
58
  interface PageDepartmentInfo {
50
59
  id?: string;
51
60
  name?: string;
61
+ externalId?: string | null;
52
62
  }
53
63
  interface PageDepartmentRecord extends PageDepartmentInfo {
54
64
  id: string;
@@ -84,6 +94,8 @@ interface PageUserInfo {
84
94
  email?: string | null;
85
95
  avatar?: string | null;
86
96
  departments?: PageDepartmentInfo[];
97
+ affiliatedDepartmentId?: string | null;
98
+ affiliatedDepartment?: PageDepartmentInfo | null;
87
99
  tenantId: string;
88
100
  isGuest?: boolean;
89
101
  userType?: PageUserType;
@@ -535,6 +547,7 @@ interface FormPermissionGroup {
535
547
  dataScope?: "all" | "self";
536
548
  operations?: string[];
537
549
  fieldPermissions?: FieldPermissionDto[];
550
+ fieldAccessPolicy?: FieldAccessPolicyDto | null;
538
551
  dataPermission?: DataPermissionDto;
539
552
  createdAt?: string;
540
553
  updatedAt?: string;
@@ -553,6 +566,7 @@ interface CreateFormPermissionGroupDto {
553
566
  dataScope?: "all" | "self";
554
567
  operations?: string[];
555
568
  fieldPermissions?: FieldPermissionDto[];
569
+ fieldAccessPolicy?: FieldAccessPolicyDto | null;
556
570
  dataPermission?: DataPermissionDto;
557
571
  }
558
572
  interface UpdateFormPermissionGroupDto {
@@ -564,6 +578,7 @@ interface UpdateFormPermissionGroupDto {
564
578
  dataScope?: "all" | "self";
565
579
  operations?: string[];
566
580
  fieldPermissions?: FieldPermissionDto[];
581
+ fieldAccessPolicy?: FieldAccessPolicyDto | null;
567
582
  dataPermission?: DataPermissionDto;
568
583
  }
569
584
  interface QueryFormPermissionGroupDto {
@@ -914,6 +929,7 @@ interface CurrentUserState {
914
929
  isInternalUser: boolean;
915
930
  displayName: string;
916
931
  primaryDepartment: NonNullable<PageUserInfo["departments"]>[number] | null;
932
+ affiliatedDepartment: PageUserInfo["affiliatedDepartment"] | null;
917
933
  }
918
934
  declare const useCurrentUser: () => CurrentUserState;
919
935
 
@@ -965,4 +981,4 @@ declare const usePageRoute: () => PageRouteInfo;
965
981
 
966
982
  declare const usePageSdk: () => PageSdk;
967
983
 
968
- export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, 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 DataManagementConfigParams, type DataManagementFilterState, type DataPermissionConditionDto, type DataPermissionDto, type DataPermissionRuleDto, type DataViewQueryParams, type DataViewQueryResult, type DataViewStatsParams, 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 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 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, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
984
+ export { type ApiPermissionListParams, type ApproveTaskParams, type AssignPermissionsParams, type AssignRolesParams, type AuthLogoutRedirectOptions, type BatchAddUsersToRoleParams, type BatchSendNotificationByTypeParams, 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 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 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 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, createPageSdk, createReactPage, useCurrentUser, useDataSource, useFormViewPermissions, useMessage, useModal, useNavigation, usePageContext, usePageProps, usePageRoute, usePageSdk };
@@ -2228,7 +2228,8 @@ var useCurrentUser = () => {
2228
2228
  isGuest,
2229
2229
  isInternalUser: !isGuest,
2230
2230
  displayName: user.name || user.username || user.id,
2231
- primaryDepartment: user.departments?.[0] || null
2231
+ primaryDepartment: user.departments?.[0] || null,
2232
+ affiliatedDepartment: user.affiliatedDepartment || null
2232
2233
  };
2233
2234
  }, [user]);
2234
2235
  };