openxiangda 1.0.149 → 1.0.151

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.
@@ -1,5 +1,5 @@
1
1
  import { PageContext, PageInfo, PageBridgeApi } from './react.mjs';
2
- export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFileAccessTicketOptions, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FileAccessTicketAction, FileAccessTicketResult, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, 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, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, PublicStorageAction, PublicStorageGrant, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, 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, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
2
+ export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFileAccessTicketOptions, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FileAccessTicketAction, FileAccessTicketResult, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, 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, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, PublicStorageAction, PublicStorageGrant, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeAuthGuard, RuntimeAuthGuardProps, RuntimeAuthState, RuntimeAuthStatus, 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, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
3
3
  import React__default from 'react';
4
4
  import { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-BOCARAvP.mjs';
5
5
  export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-CLMqf79O.mjs';
@@ -1,5 +1,5 @@
1
1
  import { PageContext, PageInfo, PageBridgeApi } from './react.js';
2
- export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFileAccessTicketOptions, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FileAccessTicketAction, FileAccessTicketResult, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, 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, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, PublicStorageAction, PublicStorageGrant, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, 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, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.js';
2
+ export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFileAccessTicketOptions, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FileAccessTicketAction, FileAccessTicketResult, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, 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, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, PublicStorageAction, PublicStorageGrant, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeAuthGuard, RuntimeAuthGuardProps, RuntimeAuthState, RuntimeAuthStatus, 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, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.js';
3
3
  import React__default from 'react';
4
4
  import { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-BOCARAvP.js';
5
5
  export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-DhpRKmlp.js';
@@ -5555,14 +5555,14 @@ var useAuth = (options = {}) => {
5555
5555
  () => createAuthClient({
5556
5556
  appType: options.appType || runtime.appType,
5557
5557
  servicePrefix: options.servicePrefix || runtime.servicePrefix,
5558
- fetchImpl: options.fetchImpl || runtime.fetchImpl
5558
+ fetchImpl: options.fetchImpl || runtime.baseFetchImpl
5559
5559
  }),
5560
5560
  [
5561
5561
  options.appType,
5562
5562
  options.fetchImpl,
5563
5563
  options.servicePrefix,
5564
5564
  runtime.appType,
5565
- runtime.fetchImpl,
5565
+ runtime.baseFetchImpl,
5566
5566
  runtime.servicePrefix
5567
5567
  ]
5568
5568
  );
@@ -5841,7 +5841,19 @@ var LoginPage = ({
5841
5841
  };
5842
5842
  async function handleSuccess(data) {
5843
5843
  await onSuccess?.(data);
5844
- await runtime.reload();
5844
+ const accessToken = data.accessToken || data.token;
5845
+ const accessTokenOptions = {
5846
+ expiresAt: data.accessTokenExpiresAt
5847
+ };
5848
+ if (accessToken) {
5849
+ runtime.setAccessToken(accessToken, accessTokenOptions);
5850
+ }
5851
+ await runtime.reload(
5852
+ accessToken ? {
5853
+ accessToken,
5854
+ accessTokenOptions
5855
+ } : void 0
5856
+ );
5845
5857
  if (redirectOnSuccess && typeof window !== "undefined") {
5846
5858
  window.location.replace(
5847
5859
  redirectUrl || getCallbackUrl() || `/view/${auth.client.appType}`
@@ -6125,27 +6137,125 @@ var OpenXiangdaProvider = ({
6125
6137
  () => appType || resolveAppTypeFromLocation(),
6126
6138
  [appType]
6127
6139
  );
6128
- const [accessToken, setAccessTokenState] = useState9(null);
6140
+ const [, setAccessTokenState] = useState9(null);
6141
+ const [authState, setAuthState] = useState9({
6142
+ status: "unknown",
6143
+ error: null
6144
+ });
6129
6145
  const accessTokenRef = useRef5(null);
6130
- const setAccessToken = useCallback8(
6146
+ const refreshRequestRef = useRef5(null);
6147
+ const applyAccessToken = useCallback8(
6131
6148
  (nextAccessToken, options = {}) => {
6132
6149
  if (!nextAccessToken && options.clearIfToken && accessTokenRef.current?.token !== options.clearIfToken) {
6133
- return;
6150
+ return accessTokenRef.current;
6134
6151
  }
6135
6152
  const normalizedAccessToken = nextAccessToken || null;
6136
6153
  const nextState = normalizedAccessToken ? {
6137
6154
  token: normalizedAccessToken,
6138
6155
  scope: options.scope || "default",
6139
- path: options.path || null
6156
+ path: options.path || null,
6157
+ expiresAt: options.expiresAt
6140
6158
  } : null;
6141
6159
  accessTokenRef.current = nextState;
6142
6160
  setAccessTokenState(nextState);
6161
+ return nextState;
6143
6162
  },
6144
6163
  []
6145
6164
  );
6165
+ const setAccessToken = useCallback8(
6166
+ (nextAccessToken, options = {}) => {
6167
+ const previousState = accessTokenRef.current;
6168
+ const nextState = applyAccessToken(nextAccessToken, options);
6169
+ if (nextState) {
6170
+ if (nextState.scope === "public") return;
6171
+ setAuthState({
6172
+ status: "authenticated",
6173
+ error: null
6174
+ });
6175
+ } else if (previousState?.scope !== "public") {
6176
+ setAuthState({ status: "unauthenticated", error: null });
6177
+ }
6178
+ },
6179
+ [applyAccessToken]
6180
+ );
6181
+ const markUnauthenticated = useCallback8(
6182
+ (error) => {
6183
+ const runtimeError = normalizeRuntimeError(error);
6184
+ applyAccessToken(null);
6185
+ setAuthState({ status: "unauthenticated", error: runtimeError });
6186
+ },
6187
+ [applyAccessToken]
6188
+ );
6189
+ const refreshAccessToken = useCallback8(async () => {
6190
+ if (!resolvedAppType) return null;
6191
+ if (!refreshRequestRef.current) {
6192
+ setAuthState((prev) => ({ ...prev, status: "refreshing", error: null }));
6193
+ refreshRequestRef.current = (async () => {
6194
+ const response = await resolvedFetch(
6195
+ buildServiceUrl3(
6196
+ servicePrefix,
6197
+ `/openxiangda-api/v1/apps/${encodeURIComponent(
6198
+ resolvedAppType
6199
+ )}/auth/refresh`
6200
+ ),
6201
+ {
6202
+ method: "POST",
6203
+ credentials: "include",
6204
+ headers: {
6205
+ accept: "application/json",
6206
+ "content-type": "application/json"
6207
+ },
6208
+ body: "{}"
6209
+ }
6210
+ );
6211
+ const payload = await readJsonPayload(response);
6212
+ if (isRuntimeEnvelopeFailure(response, payload)) {
6213
+ throw createRuntimeHttpError(
6214
+ response,
6215
+ payload,
6216
+ payload?.message || `Token refresh failed: ${response.status}`
6217
+ );
6218
+ }
6219
+ const data = unwrapRuntimePayload(payload);
6220
+ const nextAccessToken = getRecordString(data, "accessToken") || getRecordString(data, "token");
6221
+ if (!nextAccessToken) {
6222
+ throw createRuntimeError({
6223
+ type: "unauthenticated",
6224
+ status: response.status,
6225
+ code: getRecordValue3(payload, "code"),
6226
+ message: "Token refresh response missing accessToken",
6227
+ payload
6228
+ });
6229
+ }
6230
+ const nextState = applyAccessToken(nextAccessToken, {
6231
+ expiresAt: getRecordNumber(data, "accessTokenExpiresAt")
6232
+ });
6233
+ setAuthState({
6234
+ status: "authenticated",
6235
+ error: null,
6236
+ refreshedAt: Date.now()
6237
+ });
6238
+ return nextState;
6239
+ })().catch((error) => {
6240
+ const runtimeError = normalizeRuntimeError(error);
6241
+ applyAccessToken(null);
6242
+ setAuthState({ status: "unauthenticated", error: runtimeError });
6243
+ throw runtimeError;
6244
+ }).finally(() => {
6245
+ refreshRequestRef.current = null;
6246
+ });
6247
+ }
6248
+ return refreshRequestRef.current;
6249
+ }, [applyAccessToken, resolvedAppType, resolvedFetch, servicePrefix]);
6146
6250
  const authorizedFetch = useMemo11(
6147
- () => createAuthorizedFetch(resolvedFetch, accessToken),
6148
- [accessToken, resolvedFetch]
6251
+ () => createAuthorizedFetch({
6252
+ appType: resolvedAppType,
6253
+ baseFetch: resolvedFetch,
6254
+ accessTokenRef,
6255
+ markUnauthenticated,
6256
+ refreshAccessToken
6257
+ }),
6258
+ [markUnauthenticated, refreshAccessToken, resolvedAppType, resolvedFetch]
6149
6259
  );
6150
6260
  const getAuthHeaders = useCallback8(() => {
6151
6261
  const state2 = accessTokenRef.current;
@@ -6171,13 +6281,13 @@ var OpenXiangdaProvider = ({
6171
6281
  return;
6172
6282
  }
6173
6283
  setState((prev) => ({ ...prev, loading: true, error: null }));
6174
- const requestFetch = options.accessToken !== void 0 ? createAuthorizedFetch(
6284
+ const requestFetch = options.accessToken !== void 0 ? createAccessTokenFetch(
6175
6285
  resolvedFetch,
6176
6286
  createAccessTokenState(
6177
6287
  options.accessToken || null,
6178
6288
  options.accessTokenOptions
6179
6289
  )
6180
- ) : createAuthorizedFetch(resolvedFetch, accessTokenRef.current);
6290
+ ) : authorizedFetch;
6181
6291
  try {
6182
6292
  const response = await requestFetch(
6183
6293
  buildServiceUrl3(
@@ -6199,19 +6309,29 @@ var OpenXiangdaProvider = ({
6199
6309
  payload?.message || `Runtime bootstrap failed: ${response.status}`
6200
6310
  );
6201
6311
  }
6312
+ const nextData = payload?.data || null;
6202
6313
  setState({
6203
- data: payload?.data || null,
6314
+ data: nextData,
6204
6315
  loading: false,
6205
6316
  error: null
6206
6317
  });
6318
+ if (isAuthenticatedBootstrap(nextData)) {
6319
+ setAuthState(
6320
+ (prev) => prev.status === "authenticated" ? prev : { status: "authenticated", error: null }
6321
+ );
6322
+ }
6207
6323
  } catch (error) {
6324
+ const runtimeError = normalizeRuntimeError(error);
6208
6325
  setState({
6209
6326
  data: null,
6210
6327
  loading: false,
6211
- error: normalizeRuntimeError(error)
6328
+ error: runtimeError
6212
6329
  });
6330
+ if (runtimeError.type === "unauthenticated") {
6331
+ setAuthState({ status: "unauthenticated", error: runtimeError });
6332
+ }
6213
6333
  }
6214
- }, [resolvedAppType, resolvedFetch, servicePrefix]);
6334
+ }, [authorizedFetch, resolvedAppType, resolvedFetch, servicePrefix]);
6215
6335
  useEffect9(() => {
6216
6336
  void reload();
6217
6337
  }, [reload]);
@@ -6222,6 +6342,7 @@ var OpenXiangdaProvider = ({
6222
6342
  servicePrefix,
6223
6343
  fetchImpl: authorizedFetch,
6224
6344
  baseFetchImpl: resolvedFetch,
6345
+ authState,
6225
6346
  getAuthHeaders,
6226
6347
  reload,
6227
6348
  setAccessToken
@@ -6233,7 +6354,8 @@ var OpenXiangdaProvider = ({
6233
6354
  resolvedAppType,
6234
6355
  resolvedFetch,
6235
6356
  servicePrefix,
6236
- state
6357
+ state,
6358
+ authState
6237
6359
  ]
6238
6360
  );
6239
6361
  return /* @__PURE__ */ jsx10(OpenXiangdaRuntimeContext.Provider, { value, children });
@@ -6500,7 +6622,7 @@ var useRuntimeAuth = () => {
6500
6622
  buildServiceUrl3(runtime.servicePrefix, "/api/sso/status"),
6501
6623
  { domain }
6502
6624
  );
6503
- const statusResponse = await runtime.fetchImpl(statusUrl, {
6625
+ const statusResponse = await runtime.baseFetchImpl(statusUrl, {
6504
6626
  credentials: "include",
6505
6627
  headers: { accept: "application/json" }
6506
6628
  });
@@ -6511,7 +6633,7 @@ var useRuntimeAuth = () => {
6511
6633
  enabled && (sso.forceLogin ?? sso.autoRedirect ?? true)
6512
6634
  );
6513
6635
  if (shouldUseSso) {
6514
- const loginUrlResponse = await runtime.fetchImpl(
6636
+ const loginUrlResponse = await runtime.baseFetchImpl(
6515
6637
  withQuery(buildServiceUrl3(runtime.servicePrefix, "/api/sso/login-url"), {
6516
6638
  domain,
6517
6639
  redirectUri,
@@ -6535,7 +6657,7 @@ var useRuntimeAuth = () => {
6535
6657
  }
6536
6658
  return attachCallback("/platform/login", redirectUri);
6537
6659
  },
6538
- [runtime.data?.app, runtime.fetchImpl, runtime.servicePrefix]
6660
+ [runtime.baseFetchImpl, runtime.data?.app, runtime.servicePrefix]
6539
6661
  );
6540
6662
  const redirectToLogin = useCallback8(
6541
6663
  async (options = {}) => {
@@ -6552,7 +6674,7 @@ var useRuntimeAuth = () => {
6552
6674
  [resolveLoginUrl2]
6553
6675
  );
6554
6676
  const logout = useCallback8(async () => {
6555
- const response = await runtime.fetchImpl(
6677
+ const response = await runtime.baseFetchImpl(
6556
6678
  buildServiceUrl3(runtime.servicePrefix, "/api/auth/logout"),
6557
6679
  {
6558
6680
  method: "POST",
@@ -6568,8 +6690,9 @@ var useRuntimeAuth = () => {
6568
6690
  payload?.message || `Logout failed: ${response.status}`
6569
6691
  );
6570
6692
  }
6693
+ runtime.setAccessToken(null);
6571
6694
  return payload;
6572
- }, [runtime.fetchImpl, runtime.servicePrefix]);
6695
+ }, [runtime.baseFetchImpl, runtime.servicePrefix, runtime.setAccessToken]);
6573
6696
  const logoutAndRedirect = useCallback8(
6574
6697
  async (options = {}) => {
6575
6698
  try {
@@ -6581,19 +6704,93 @@ var useRuntimeAuth = () => {
6581
6704
  },
6582
6705
  [logout, redirectToLogin]
6583
6706
  );
6584
- return {
6585
- logout,
6586
- logoutAndRedirect,
6587
- redirectToLogin,
6588
- resolveLoginUrl: resolveLoginUrl2
6589
- };
6707
+ return useMemo11(
6708
+ () => ({
6709
+ logout,
6710
+ logoutAndRedirect,
6711
+ redirectToLogin,
6712
+ resolveLoginUrl: resolveLoginUrl2
6713
+ }),
6714
+ [logout, logoutAndRedirect, redirectToLogin, resolveLoginUrl2]
6715
+ );
6716
+ };
6717
+ var RuntimeAuthGuard = ({
6718
+ children,
6719
+ fallback = null,
6720
+ disabled = false,
6721
+ excludedPaths = [],
6722
+ ...redirectOptions
6723
+ }) => {
6724
+ const runtime = useOpenXiangda();
6725
+ const auth = useRuntimeAuth();
6726
+ const redirectedRef = useRef5(false);
6727
+ const currentPath = getCurrentPathname2();
6728
+ const excluded = isRuntimeAuthGuardExcluded(
6729
+ currentPath,
6730
+ runtime.appType,
6731
+ excludedPaths
6732
+ );
6733
+ const shouldRedirect = !disabled && !excluded && !runtime.loading && (runtime.authState.status === "unauthenticated" || runtime.error?.type === "unauthenticated");
6734
+ useEffect9(() => {
6735
+ if (!shouldRedirect || redirectedRef.current) return;
6736
+ redirectedRef.current = true;
6737
+ void auth.redirectToLogin({
6738
+ ...redirectOptions,
6739
+ redirectUri: redirectOptions.redirectUri || getCurrentHref4()
6740
+ }).catch(() => {
6741
+ redirectedRef.current = false;
6742
+ });
6743
+ }, [
6744
+ auth,
6745
+ redirectOptions.domain,
6746
+ redirectOptions.loginUrl,
6747
+ redirectOptions.redirectUri,
6748
+ redirectOptions.replace,
6749
+ shouldRedirect
6750
+ ]);
6751
+ if (excluded) return /* @__PURE__ */ jsx10(Fragment5, { children });
6752
+ if (shouldRedirect) return /* @__PURE__ */ jsx10(Fragment5, { children: fallback });
6753
+ return /* @__PURE__ */ jsx10(Fragment5, { children });
6590
6754
  };
6591
6755
  var buildServiceUrl3 = (servicePrefix, path) => {
6592
6756
  const prefix = servicePrefix.endsWith("/") ? servicePrefix.slice(0, -1) : servicePrefix;
6593
6757
  const suffix = path.startsWith("/") ? path : `/${path}`;
6594
6758
  return `${prefix}${suffix}`;
6595
6759
  };
6596
- var createAuthorizedFetch = (baseFetch, accessToken) => {
6760
+ var createAuthorizedFetch = ({
6761
+ appType,
6762
+ baseFetch,
6763
+ accessTokenRef,
6764
+ refreshAccessToken,
6765
+ markUnauthenticated
6766
+ }) => (async (input, init = {}) => {
6767
+ const currentTokenState = accessTokenRef.current;
6768
+ const response = await createAccessTokenFetch(
6769
+ baseFetch,
6770
+ currentTokenState
6771
+ )(input, init);
6772
+ if (!shouldAttemptAuthRefresh({
6773
+ appType,
6774
+ input,
6775
+ init,
6776
+ tokenState: currentTokenState
6777
+ })) {
6778
+ return response;
6779
+ }
6780
+ if (!await isUnauthenticatedResponse(response)) return response;
6781
+ try {
6782
+ const refreshedTokenState = await refreshAccessToken();
6783
+ if (!refreshedTokenState) return response;
6784
+ return await createAccessTokenFetch(
6785
+ baseFetch,
6786
+ refreshedTokenState
6787
+ )(input, init);
6788
+ } catch (error) {
6789
+ markUnauthenticated(error);
6790
+ return response;
6791
+ }
6792
+ });
6793
+ var createAccessTokenFetch = (baseFetch, accessToken) => {
6597
6794
  if (!accessToken) return baseFetch;
6598
6795
  return ((input, init = {}) => {
6599
6796
  const token = resolveAccessTokenForCurrentRoute(accessToken);
@@ -6611,8 +6808,53 @@ var createAuthorizedFetch = (baseFetch, accessToken) => {
6611
6808
  var createAccessTokenState = (accessToken, options = {}) => accessToken ? {
6612
6809
  token: accessToken,
6613
6810
  scope: options.scope || "default",
6614
- path: options.path || null
6811
+ path: options.path || null,
6812
+ expiresAt: options.expiresAt
6615
6813
  } : null;
6814
+ var shouldAttemptAuthRefresh = ({
6815
+ appType,
6816
+ input,
6817
+ init,
6818
+ tokenState
6819
+ }) => {
6820
+ if (!appType) return false;
6821
+ if (tokenState?.scope === "public") return false;
6822
+ if (isPublicRoutePath(normalizeRoutePath(getCurrentPathname2()))) return false;
6823
+ if (hasAuthorizationHeader(init?.headers)) return false;
6824
+ const pathname = getFetchInputPathname(input);
6825
+ if (!pathname) return false;
6826
+ if (/\/openxiangda-api\/v1\/apps\/[^/]+\/auth(?:\/|$)/.test(pathname)) {
6827
+ return false;
6828
+ }
6829
+ if (/\/openxiangda-api\/v1\/apps\/[^/]+\/public\/session(?:\/|$)/.test(pathname)) {
6830
+ return false;
6831
+ }
6832
+ if (/\/openxiangda-api\/v1\/auth(?:\/|$)/.test(pathname)) return false;
6833
+ if (/\/api\/auth\/logout(?:\/|$)/.test(pathname)) return false;
6834
+ if (/\/api\/sso(?:\/|$)/.test(pathname)) return false;
6835
+ return true;
6836
+ };
6837
+ var isUnauthenticatedResponse = async (response) => {
6838
+ if (response.status === 401) return true;
6839
+ const payload = await readJsonPayload(response.clone());
6840
+ const code = getRecordValue3(payload, "code");
6841
+ return classifyRuntimeError(response.status, code) === "unauthenticated";
6842
+ };
6843
+ var hasAuthorizationHeader = (headers) => {
6844
+ if (!headers) return false;
6845
+ const normalized = new Headers(headers);
6846
+ return normalized.has("authorization");
6847
+ };
6848
+ var getFetchInputPathname = (input) => {
6849
+ const text = typeof input === "string" ? input : input instanceof URL ? input.toString() : typeof Request !== "undefined" && input instanceof Request ? input.url : String(input || "");
6850
+ if (!text) return "";
6851
+ try {
6852
+ const base = typeof window !== "undefined" ? window.location.origin : "http://localhost";
6853
+ return new URL(text, base).pathname;
6854
+ } catch {
6855
+ return text.split(/[?#]/, 1)[0] || "";
6856
+ }
6857
+ };
6616
6858
  var resolveAccessTokenForCurrentRoute = (accessToken) => {
6617
6859
  if (accessToken.scope !== "public") return accessToken.token;
6618
6860
  const scopedPath = normalizeRoutePath(accessToken.path);
@@ -6797,6 +7039,31 @@ var getRecordString = (value, key) => {
6797
7039
  const result = getRecordValue3(value, key);
6798
7040
  return typeof result === "string" ? result : void 0;
6799
7041
  };
7042
+ var getRecordNumber = (value, key) => {
7043
+ const result = getRecordValue3(value, key);
7044
+ const numberValue = Number(result);
7045
+ return Number.isFinite(numberValue) ? numberValue : void 0;
7046
+ };
7047
+ var unwrapRuntimePayload = (payload) => {
7048
+ if (!payload || typeof payload !== "object") return payload;
7049
+ const record = payload;
7050
+ return "data" in record ? record.data : payload;
7051
+ };
7052
+ var isAuthenticatedBootstrap = (value) => {
7053
+ if (!value || typeof value !== "object") return false;
7054
+ const user = toRuntimeRecord(getRecordValue3(value, "user"));
7055
+ if (!getRecordValue3(user, "id") && !getRecordValue3(user, "username")) {
7056
+ return false;
7057
+ }
7058
+ return !getRecordValue3(user, "publicAccess");
7059
+ };
7060
+ var isRuntimeAuthGuardExcluded = (path, appType, excludedPaths) => {
7061
+ const normalizedPath = normalizeRoutePath(path);
7062
+ if (isPublicRoutePath(normalizedPath)) return true;
7063
+ const loginPath = normalizeRoutePath(`/view/${encodeURIComponent(appType)}/login`);
7064
+ if (appType && normalizedPath === loginPath) return true;
7065
+ return excludedPaths.map((item) => normalizeRoutePath(item)).some((item) => item && normalizedPath === item);
7066
+ };
6800
7067
  var resolveAppTypeFromLocation = () => {
6801
7068
  if (typeof window === "undefined") return "";
6802
7069
  const segments = window.location.pathname.split("/").filter(Boolean);
@@ -17230,7 +17497,7 @@ async function fetchRuntimeFormData(api, appType, params) {
17230
17497
  order: order ? JSON.stringify(order) : void 0
17231
17498
  }
17232
17499
  });
17233
- const payload = unwrapRuntimePayload(response);
17500
+ const payload = unwrapRuntimePayload2(response);
17234
17501
  const data = Array.isArray(payload?.data) ? payload.data : Array.isArray(payload) ? payload : [];
17235
17502
  return {
17236
17503
  data,
@@ -17287,7 +17554,7 @@ function FormProvider({
17287
17554
  let cancelled = false;
17288
17555
  api.getUserById("current").then((payload) => {
17289
17556
  if (cancelled || !payload) return;
17290
- const currentUser = normalizeUser(unwrapRuntimePayload(payload));
17557
+ const currentUser = normalizeUser(unwrapRuntimePayload2(payload));
17291
17558
  const departments = normalizeDepartmentArray(currentUser.departments);
17292
17559
  const currentDepartment = departments[0];
17293
17560
  const currentUserManagers = normalizeUserArray(
@@ -17684,7 +17951,7 @@ function needsCurrentUserRuntime(shortcutType) {
17684
17951
  ].includes(shortcutType)
17685
17952
  );
17686
17953
  }
17687
- function unwrapRuntimePayload(payload) {
17954
+ function unwrapRuntimePayload2(payload) {
17688
17955
  return payload?.data || payload?.result || payload?.user || payload;
17689
17956
  }
17690
17957
  function isBlankFormValue(value) {
@@ -19639,7 +19906,7 @@ var DraftManager = ({
19639
19906
  // packages/sdk/src/components/templates/FormSubmitTemplate.tsx
19640
19907
  import { Fragment as Fragment14, jsx as jsx96, jsxs as jsxs47 } from "react/jsx-runtime";
19641
19908
  var SUPERVISOR_APPROVER_TYPE = "ext_target_approval_department_supervisor";
19642
- var unwrapRuntimePayload2 = (value) => value?.data ?? value?.result ?? value;
19909
+ var unwrapRuntimePayload3 = (value) => value?.data ?? value?.result ?? value;
19643
19910
  var normalizeSubmitFormType = (value) => {
19644
19911
  const raw = String(value || "").toLowerCase();
19645
19912
  return raw === "process" || raw === "flow" ? "process" : "form";
@@ -19836,7 +20103,7 @@ var InnerFormContent = ({
19836
20103
  return departmentId;
19837
20104
  }
19838
20105
  const runtimeUser = schema.runtime?.currentUser;
19839
- const loadedUser = runtimeUser || unwrapRuntimePayload2(await api.getUserById("current"));
20106
+ const loadedUser = runtimeUser || unwrapRuntimePayload3(await api.getUserById("current"));
19840
20107
  const departments = normalizeDepartmentOptions(loadedUser?.departments);
19841
20108
  if (departments.length === 0) {
19842
20109
  message4.error("\u5F53\u524D\u8D26\u53F7\u672A\u5206\u914D\u90E8\u95E8\uFF0C\u65E0\u6CD5\u53D1\u8D77\u4E3B\u7BA1\u5BA1\u6279\u6D41\u7A0B");
@@ -22815,7 +23082,7 @@ var downloadBlobResponse = async (response, fallbackName) => {
22815
23082
  anchor.remove();
22816
23083
  window.URL.revokeObjectURL(url);
22817
23084
  };
22818
- var unwrapRuntimePayload3 = (payload) => {
23085
+ var unwrapRuntimePayload4 = (payload) => {
22819
23086
  const data = payload?.data?.result ?? payload?.result ?? payload?.data ?? payload;
22820
23087
  return data?.items || data?.list || data?.data || data?.records || data || [];
22821
23088
  };
@@ -22914,14 +23181,14 @@ function AsyncEntityFilterSelect({
22914
23181
  method: "get",
22915
23182
  params: keyword ? { keyword, pageSize: 20 } : { pageSize: 20 }
22916
23183
  });
22917
- rows = unwrapRuntimePayload3(response);
23184
+ rows = unwrapRuntimePayload4(response);
22918
23185
  }
22919
23186
  } else {
22920
23187
  const response = await api.request({
22921
23188
  url: keyword ? "/department/list" : "/department/root",
22922
23189
  method: "get"
22923
23190
  });
22924
- rows = unwrapRuntimePayload3(response);
23191
+ rows = unwrapRuntimePayload4(response);
22925
23192
  if (keyword) {
22926
23193
  const normalizedKeyword = keyword.toLowerCase();
22927
23194
  rows = rows.filter(
@@ -24707,7 +24974,7 @@ var getDetailBasePath = (appType, formUuid, formType) => {
24707
24974
  const detailType = isProcessKind("data-manage-list", formType) ? "processDetail" : "formDetail";
24708
24975
  return `/view/${appType}/${detailType}/${formUuid}`;
24709
24976
  };
24710
- var unwrapRuntimePayload4 = (payload) => payload?.data ?? payload?.result ?? payload;
24977
+ var unwrapRuntimePayload5 = (payload) => payload?.data ?? payload?.result ?? payload;
24711
24978
  var formatFileSize2 = (size) => {
24712
24979
  const value = Number(size || 0);
24713
24980
  if (!value) return "0 B";
@@ -24788,7 +25055,7 @@ var OnlyOfficePreview = ({
24788
25055
  url: configUrl || `/file/onlyoffice/config/${encodeURIComponent(ticket)}`,
24789
25056
  method: "get"
24790
25057
  });
24791
- const payload = unwrapRuntimePayload4(response);
25058
+ const payload = unwrapRuntimePayload5(response);
24792
25059
  const scriptUrl = `${String(payload.documentServerUrl || "").replace(
24793
25060
  /\/+$/,
24794
25061
  ""
@@ -24846,7 +25113,7 @@ var BuiltinFilePreview = ({
24846
25113
  method: "get"
24847
25114
  });
24848
25115
  if (!disposed) {
24849
- setMetadata(unwrapRuntimePayload4(response));
25116
+ setMetadata(unwrapRuntimePayload5(response));
24850
25117
  }
24851
25118
  } catch (currentError) {
24852
25119
  if (!disposed) {
@@ -24886,7 +25153,7 @@ var BuiltinFilePreview = ({
24886
25153
  try {
24887
25154
  const response = await request({ url, method: "get" });
24888
25155
  if (!disposed) {
24889
- setPayload(unwrapRuntimePayload4(response));
25156
+ setPayload(unwrapRuntimePayload5(response));
24890
25157
  }
24891
25158
  } catch (currentError) {
24892
25159
  if (!disposed) {
@@ -25264,6 +25531,7 @@ export {
25264
25531
  ProcessTimeline,
25265
25532
  PublicAccessClientError,
25266
25533
  PublicAccessGate,
25534
+ RuntimeAuthGuard,
25267
25535
  createAuthClient,
25268
25536
  createBrowserPageBridge,
25269
25537
  createBrowserPageContext,