@tachybase/plugin-workflow-approval 0.23.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +14 -0
- package/LICENSE +201 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/h5/ApprovalBlockInitializer.d.ts +8 -0
- package/dist/client/h5/ApprovalSettings.d.ts +2 -0
- package/dist/client/h5/collection/ApprovalTodos.d.ts +105 -0
- package/dist/client/h5/collection/Approvals.collection.d.ts +85 -0
- package/dist/client/h5/collection/FlowNodes.collection.d.ts +38 -0
- package/dist/client/h5/collection/UserJobs.collection.d.ts +141 -0
- package/dist/client/h5/collection/Workflows.collection.d.ts +30 -0
- package/dist/client/h5/collection/approvalCarbonCopy.collection.d.ts +156 -0
- package/dist/client/h5/collection/notice.collection.d.ts +131 -0
- package/dist/client/h5/component/ApprovalProcess.view.d.ts +2 -0
- package/dist/client/h5/component/ApprovalReachDataType.d.ts +2 -0
- package/dist/client/h5/component/ApprovalTemplateType.d.ts +2 -0
- package/dist/client/h5/constants.d.ts +159 -0
- package/dist/client/h5/context/ApprovalExecution.d.ts +3 -0
- package/dist/client/h5/context/FormBlock.d.ts +2 -0
- package/dist/client/h5/context/SchemaComponent.d.ts +5 -0
- package/dist/client/h5/context/WithActionEnabled.d.ts +3 -0
- package/dist/client/h5/index.d.ts +6 -0
- package/dist/client/h5/initiations/InitiationsBlock.d.ts +5 -0
- package/dist/client/h5/initiations/component/ApprovalItem.d.ts +2 -0
- package/dist/client/h5/initiations/component/ApprovalStatus.d.ts +2 -0
- package/dist/client/h5/initiations/component/InitiationsItem.d.ts +3 -0
- package/dist/client/h5/initiations/component/UserInitiationsItem.d.ts +3 -0
- package/dist/client/h5/initiations/component/ViewActionInitiationsContent.d.ts +10 -0
- package/dist/client/h5/initiations/component/ViewActionUserInitiationsContent.d.ts +3 -0
- package/dist/client/h5/initiations/config/LauncherActionConfig.d.ts +2 -0
- package/dist/client/h5/initiations/config/LauncherActionConfigComponent.d.ts +2 -0
- package/dist/client/h5/initiations/hook/useActionResubmit.d.ts +3 -0
- package/dist/client/h5/initiations/hook/useCreateSubmit.d.ts +3 -0
- package/dist/client/h5/initiations/hook/useDestroyAction.d.ts +3 -0
- package/dist/client/h5/initiations/hook/useFormBlockProps.d.ts +3 -0
- package/dist/client/h5/initiations/hook/useUpadteSubmit.d.ts +3 -0
- package/dist/client/h5/initiations/hook/useWithdrawAction.d.ts +3 -0
- package/dist/client/h5/initiations/provider/ActionBar.d.ts +1 -0
- package/dist/client/h5/initiations/provider/ActionResubmit.provider.d.ts +1 -0
- package/dist/client/h5/initiations/provider/ApplyActionStatus.d.ts +3 -0
- package/dist/client/h5/initiations/provider/Resubmit.provider.d.ts +10 -0
- package/dist/client/h5/initiations/provider/WithdrawAction.d.ts +3 -0
- package/dist/client/h5/locale.d.ts +7 -0
- package/dist/client/h5/todos/TodosBlock.d.ts +3 -0
- package/dist/client/h5/todos/component/TabApplicantType.d.ts +2 -0
- package/dist/client/h5/todos/component/TabApprovalItem.d.ts +3 -0
- package/dist/client/h5/todos/component/TabApprovalType.d.ts +2 -0
- package/dist/client/h5/todos/component/TabDuplicateItem.d.ts +3 -0
- package/dist/client/h5/todos/component/TabExecutedItem.d.ts +3 -0
- package/dist/client/h5/todos/component/TabPendingItem.d.ts +3 -0
- package/dist/client/h5/todos/component/TabProcessedItem.d.ts +3 -0
- package/dist/client/h5/todos/component/ViewActionTodosContent.d.ts +3 -0
- package/dist/client/h5/todos/component/ViewTodosDetailsContent.d.ts +2 -0
- package/dist/client/h5/todos/component/ViewTodosUserJobsContent.d.ts +6 -0
- package/dist/client/h5/todos/component/ViewTodosWorkflowNoticeContent.d.ts +3 -0
- package/dist/client/h5/todos/componentSchema.d.ts +32 -0
- package/dist/client/h5/todos/hook/useApprovalDetailBlockProps.d.ts +3 -0
- package/dist/client/h5/todos/hook/useApprovalFormBlockProps.d.ts +3 -0
- package/dist/client/h5/todos/hook/useDestroyAction.d.ts +3 -0
- package/dist/client/h5/todos/hook/useFormBlockProps.d.ts +9 -0
- package/dist/client/h5/todos/hook/usePropsNoticeDetail.d.ts +3 -0
- package/dist/client/h5/todos/hook/useSubmit.d.ts +6 -0
- package/dist/client/h5/todos/interface/interface.d.ts +139 -0
- package/dist/client/h5/todos/provider/ActionBarProvider.d.ts +3 -0
- package/dist/client/h5/todos/provider/ApplyActionStatus.d.ts +3 -0
- package/dist/client/h5/todos/provider/ApprovalAction.d.ts +9 -0
- package/dist/client/h5/todos/provider/ApprovalFormBlock.d.ts +2 -0
- package/dist/client/h5/todos/provider/FormBlockProvider.d.ts +2 -0
- package/dist/client/h5/todos/provider/ManualActionStatusProvider.d.ts +6 -0
- package/dist/client/h5/todos/provider/WithdrawAction.d.ts +3 -0
- package/dist/client/h5/todos/provider/todosContext.d.ts +2 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +183 -0
- package/dist/client/pc/collections/approvalCarbonCopy.d.ts +156 -0
- package/dist/client/pc/collections/approvalRecords.d.ts +131 -0
- package/dist/client/pc/collections/approvals.d.ts +109 -0
- package/dist/client/pc/collections/flowNodes.d.ts +38 -0
- package/dist/client/pc/collections/workflows.d.ts +41 -0
- package/dist/client/pc/common/FormBlock.provider.d.ts +2 -0
- package/dist/client/pc/configuration/Approval.setting.d.ts +8 -0
- package/dist/client/pc/configuration/ApprovalPane.component.d.ts +2 -0
- package/dist/client/pc/configuration/ApprovalPane.schema.d.ts +651 -0
- package/dist/client/pc/configuration/instruction-approval/Approval.node.d.ts +152 -0
- package/dist/client/pc/configuration/instruction-approval/ApprovalNode.component.d.ts +4 -0
- package/dist/client/pc/configuration/instruction-approval/ApproverConfig.context.d.ts +1 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/SkipApproval.schema.d.ts +14 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/SkipApproval.view.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/VC.AssigneesAddition.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/VC.AssigneesSelect.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/VC.ContentTooltip.d.ts +5 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/VC.NegotiationConfig.d.ts +5 -0
- package/dist/client/pc/configuration/instruction-approval/approval-config/VC.SchemaConfigButtonApprover.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/ApprovalUpdateForm.provider.d.ts +1 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/ApproverAddBlock.initializer.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/ApproverBlock.view.d.ts +5 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/ApproverInterface.schema.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/Iz.ApproverActionConfig.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/Pd.ActionBarProvider.d.ts +1 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/Pd.ApprovalActionProvider.d.ts +1 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/Pd.SchemaConfigButtonContext.d.ts +1 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/VC.ApprovalActionConfig.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/VC.ApprovalFormBlockProvider.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/VC.ApproverAddBlock.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/VC.ApproverAddBlockKit.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/approver-interface/useApprovalFormBlockProps.d.ts +3 -0
- package/dist/client/pc/configuration/instruction-approval/forms/AddActionButton.setting.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-approval/forms/Approval.options.d.ts +42 -0
- package/dist/client/pc/configuration/instruction-approval/forms/FormBlock.factory.d.ts +6 -0
- package/dist/client/pc/configuration/instruction-approval/forms/update.d.ts +28 -0
- package/dist/client/pc/configuration/instruction-approval/kit.d.ts +5 -0
- package/dist/client/pc/configuration/instruction-approval/utils.d.ts +1 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/ApprovalCarbonCopy.instruction.d.ts +76 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/config-items/AddNotifiedPerson.view.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/config-items/ConfigButtonNotice.view.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/config-items/SelectNotifiedPerson.view.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/kit.d.ts +5 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/show-interface/CarbonCopyDetail.block.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/show-interface/CarbonCopyDetail.initializer.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/show-interface/CarbonCopyDetail.schema.d.ts +6 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/show-interface/CarbonCopyDetailContainer.schema.d.ts +2 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/show-interface/style.d.ts +3 -0
- package/dist/client/pc/configuration/instruction-carbon-copy/style.d.ts +5 -0
- package/dist/client/pc/configuration/plugin.d.ts +5 -0
- package/dist/client/pc/configuration/trigger/Approval.trigger.d.ts +121 -0
- package/dist/client/pc/configuration/trigger/ConfigButton.view.d.ts +2 -0
- package/dist/client/pc/configuration/trigger/launcher-interface/LauncherActionConfig.component.d.ts +3 -0
- package/dist/client/pc/configuration/trigger/launcher-interface/LauncherActionConfig.initializer.d.ts +2 -0
- package/dist/client/pc/configuration/trigger/launcher-interface/LauncherAddBlockButton.initializer.d.ts +2 -0
- package/dist/client/pc/configuration/trigger/launcher-interface/LauncherBlockButton.component.d.ts +2 -0
- package/dist/client/pc/configuration/trigger/launcher-interface/LauncherInterface.schema.d.ts +2 -0
- package/dist/client/pc/configuration/trigger/launcher-interface/SchemaAddBlock.component.d.ts +5 -0
- package/dist/client/pc/configuration/trigger/plugin.d.ts +6 -0
- package/dist/client/pc/constants.d.ts +91 -0
- package/dist/client/pc/index.d.ts +5 -0
- package/dist/client/pc/locale.d.ts +7 -0
- package/dist/client/pc/usage/block/ApprovalBlock.initializer.d.ts +70 -0
- package/dist/client/pc/usage/block/BlockInitItem.provider.d.ts +5 -0
- package/dist/client/pc/usage/block/BlockInitItem.schema.d.ts +21 -0
- package/dist/client/pc/usage/block/BlockInitItem.view.d.ts +2 -0
- package/dist/client/pc/usage/block/InitiateApplication.component.d.ts +6 -0
- package/dist/client/pc/usage/block/carbon-copy/CarbonCopyBlock.provider.d.ts +5 -0
- package/dist/client/pc/usage/block/carbon-copy/CarbonCopyCenter.schema.d.ts +2 -0
- package/dist/client/pc/usage/block/common/ApprovalExecution.provider.d.ts +6 -0
- package/dist/client/pc/usage/block/common/FlowContext.provider.d.ts +6 -0
- package/dist/client/pc/usage/block/common/FuzzySearch.component.d.ts +2 -0
- package/dist/client/pc/usage/block/common/SchemaComponent.provider.d.ts +5 -0
- package/dist/client/pc/usage/block/common/useHandleRefresh.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/ApprovalStatus.context.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/CheckContent.component.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/CheckContent.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/CheckContent.schema.d.ts +45 -0
- package/dist/client/pc/usage/block/initiations/CheckContent.view.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/CheckLink.schema.d.ts +24 -0
- package/dist/client/pc/usage/block/initiations/CheckLink.view.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/TableInitiated.d.ts +6 -0
- package/dist/client/pc/usage/block/initiations/TableInitiated.schema.d.ts +182 -0
- package/dist/client/pc/usage/block/initiations/WithdrawAction.provider.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/apply-button/ActionBar.provider.d.ts +1 -0
- package/dist/client/pc/usage/block/initiations/apply-button/ActionStatus.provider.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/apply-button/ActionWithdraw.provider.d.ts +1 -0
- package/dist/client/pc/usage/block/initiations/apply-button/ApplyButton.component.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/apply-button/ApplyButton.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/apply-button/ApplyButton.view.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/apply-button/hooks/useActionResubmit.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/apply-button/hooks/useSubmitCreate.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/apply-button/hooks/useWithdrawAction.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/hooks/useActionResubmit.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/hooks/useDestroyAction.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/hooks/useFormBlockProps.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/hooks/useSubmitUpdate.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/hooks/useWithdrawAction.d.ts +3 -0
- package/dist/client/pc/usage/block/initiations/providers/ActionBar.provider.d.ts +1 -0
- package/dist/client/pc/usage/block/initiations/providers/ActionResubmit.provider.d.ts +1 -0
- package/dist/client/pc/usage/block/initiations/providers/ApplyActionStatus.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/initiations/providers/Record.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/plugin.d.ts +5 -0
- package/dist/client/pc/usage/block/todos/CheckContent.component.d.ts +2 -0
- package/dist/client/pc/usage/block/todos/CheckContent.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/todos/CheckContent.schema.d.ts +40 -0
- package/dist/client/pc/usage/block/todos/CheckContent.view.d.ts +2 -0
- package/dist/client/pc/usage/block/todos/CheckLink.schema.d.ts +19 -0
- package/dist/client/pc/usage/block/todos/CheckLink.view.d.ts +2 -0
- package/dist/client/pc/usage/block/todos/TableTodos.d.ts +6 -0
- package/dist/client/pc/usage/block/todos/TableTodos.schema.d.ts +195 -0
- package/dist/client/pc/usage/block/todos/hooks/useApprovalDetailBlockProps.d.ts +3 -0
- package/dist/client/pc/usage/block/todos/hooks/useApprovalFormBlockProps.d.ts +3 -0
- package/dist/client/pc/usage/block/todos/hooks/useSubmit.d.ts +3 -0
- package/dist/client/pc/usage/block/todos/providers/ActionBar.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/todos/providers/ApprovalAction.provider.d.ts +10 -0
- package/dist/client/pc/usage/block/todos/providers/ApprovalExecutions.provider.d.ts +28 -0
- package/dist/client/pc/usage/block/todos/providers/ApprovalFormBlock.provider.d.ts +2 -0
- package/dist/client/pc/usage/block/todos/providers/ApprovalUpdateForm.provider.d.ts +1 -0
- package/dist/client/pc/usage/common/ApprovalData.provider.d.ts +5 -0
- package/dist/client/pc/usage/common/ApprovalProcess.view.d.ts +2 -0
- package/dist/client/pc/usage/common/Resubmit.provider.d.ts +10 -0
- package/dist/client/pc/usage/common/WithActionEnabled.provider.d.ts +3 -0
- package/dist/client/pc/usage/common/approval-columns/approvalStatus.column.d.ts +3 -0
- package/dist/client/pc/usage/common/approval-columns/lastNode.column.d.ts +2 -0
- package/dist/client/pc/usage/common/approval-columns/node.column.d.ts +1 -0
- package/dist/client/pc/usage/common/approval-columns/status.column.d.ts +3 -0
- package/dist/client/pc/usage/common/approval-columns/summary.column.d.ts +2 -0
- package/dist/client/pc/usage/common/approval-columns/user.column.d.ts +1 -0
- package/dist/client/pc/usage/common/approval-columns/workflow.column.d.ts +2 -0
- package/dist/client/pc/usage/common/notice-columns/column.action.d.ts +2 -0
- package/dist/client/pc/usage/common/notice-columns/column.node.d.ts +1 -0
- package/dist/client/pc/usage/common/notice-columns/column.status.d.ts +8 -0
- package/dist/client/pc/usage/common/notice-columns/column.user.d.ts +1 -0
- package/dist/client/pc/usage/common/notice-columns/column.workflow.d.ts +2 -0
- package/dist/client/pc/usage/common/notice-show-detail/NoticeDetail.provider.d.ts +5 -0
- package/dist/client/pc/usage/common/notice-show-detail/NoticeDetail.schema.d.ts +2 -0
- package/dist/client/pc/usage/common/notice-show-detail/contexts/MyComponent.context.d.ts +9 -0
- package/dist/client/pc/usage/common/notice-show-detail/contexts/WorkflowNotice.context.d.ts +4 -0
- package/dist/client/pc/usage/common/notice-show-detail/hooks/usePropsNoticeDetail.d.ts +3 -0
- package/dist/client/pc/usage/common/plugin.d.ts +4 -0
- package/dist/client/pc/usage/common/process-columns/index.d.ts +44 -0
- package/dist/client/pc/usage/common/process-columns/renderDetail.d.ts +2 -0
- package/dist/client/pc/usage/common/process-columns/renderStatus.d.ts +2 -0
- package/dist/client/pc/usage/common/process-columns/renderTaskNode.d.ts +2 -0
- package/dist/client/pc/usage/common/style.d.ts +4 -0
- package/dist/client/pc/usage/common/tools.d.ts +1 -0
- package/dist/client/pc/usage/plugin.d.ts +5 -0
- package/dist/client/pc/usage/record-block/RecordApprovals.decorator.d.ts +5 -0
- package/dist/client/pc/usage/record-block/RecordApprovals.initializer.d.ts +2 -0
- package/dist/client/pc/usage/record-block/RecordApprovals.schema.d.ts +110 -0
- package/dist/client/pc/usage/record-block/RecordApprovals.view.d.ts +2 -0
- package/dist/client/pc/usage/record-block/plugin.d.ts +6 -0
- package/dist/common/collection-name.d.ts +4 -0
- package/dist/common/collection-name.js +36 -0
- package/dist/externalVersion.js +19 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +311 -0
- package/dist/locale/zh-CN.json +388 -0
- package/dist/server/actions/approvalCarbonCopy.d.ts +3 -0
- package/dist/server/actions/approvalCarbonCopy.js +71 -0
- package/dist/server/actions/approvalRecords.d.ts +4 -0
- package/dist/server/actions/approvalRecords.js +111 -0
- package/dist/server/actions/approvals.d.ts +8 -0
- package/dist/server/actions/approvals.js +275 -0
- package/dist/server/actions/index.d.ts +3 -0
- package/dist/server/actions/index.js +48 -0
- package/dist/server/actions/workflows.d.ts +3 -0
- package/dist/server/actions/workflows.js +49 -0
- package/dist/server/collections/approvalCarbonCopy.d.ts +2 -0
- package/dist/server/collections/approvalCarbonCopy.js +87 -0
- package/dist/server/collections/approvalExecutions.d.ts +2 -0
- package/dist/server/collections/approvalExecutions.js +70 -0
- package/dist/server/collections/approvalRecords.d.ts +2 -0
- package/dist/server/collections/approvalRecords.js +88 -0
- package/dist/server/collections/approvals.d.ts +2 -0
- package/dist/server/collections/approvals.js +96 -0
- package/dist/server/constants/error-code.d.ts +22 -0
- package/dist/server/constants/error-code.js +48 -0
- package/dist/server/constants/status.d.ts +20 -0
- package/dist/server/constants/status.js +46 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/instructions/Approval.d.ts +9 -0
- package/dist/server/instructions/Approval.js +220 -0
- package/dist/server/instructions/ApprovalCarbonCopy.d.ts +8 -0
- package/dist/server/instructions/ApprovalCarbonCopy.js +99 -0
- package/dist/server/instructions/tools.d.ts +11 -0
- package/dist/server/instructions/tools.js +139 -0
- package/dist/server/plugin.d.ts +12 -0
- package/dist/server/plugin.js +89 -0
- package/dist/server/tools.d.ts +11 -0
- package/dist/server/tools.js +70 -0
- package/dist/server/triggers/Approval.d.ts +23 -0
- package/dist/server/triggers/Approval.js +313 -0
- package/dist/server/triggers/tools.d.ts +12 -0
- package/dist/server/triggers/tools.js +44 -0
- package/dist/server/utils.d.ts +1 -0
- package/dist/server/utils.js +39 -0
- package/package.json +45 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var approvals_exports = {};
|
|
29
|
+
__export(approvals_exports, {
|
|
30
|
+
approvals: () => approvals
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(approvals_exports);
|
|
33
|
+
var import_actions = __toESM(require("@tachybase/actions"));
|
|
34
|
+
var import_data_source = require("@tachybase/data-source");
|
|
35
|
+
var import_database = require("@tachybase/database");
|
|
36
|
+
var import_module_workflow = require("@tachybase/module-workflow");
|
|
37
|
+
var import_status = require("../constants/status");
|
|
38
|
+
var import_tools = require("../tools");
|
|
39
|
+
const approvals = {
|
|
40
|
+
async create(context, next) {
|
|
41
|
+
const { status, collectionName, data, workflowId } = context.action.params.values ?? {};
|
|
42
|
+
const [dataSourceName, cName] = (0, import_data_source.parseCollectionName)(collectionName);
|
|
43
|
+
const dataSource = context.app.dataSourceManager.dataSources.get(dataSourceName);
|
|
44
|
+
if (!dataSource) {
|
|
45
|
+
return context.throw(400, `Data source "${dataSourceName}" not found`);
|
|
46
|
+
}
|
|
47
|
+
const collection = dataSource.collectionManager.getCollection(cName);
|
|
48
|
+
if (!collection) {
|
|
49
|
+
return context.throw(400, `Collection "${cName}" not found`);
|
|
50
|
+
}
|
|
51
|
+
const workflow = await context.db.getRepository("workflows").findOne({
|
|
52
|
+
filterByTk: workflowId
|
|
53
|
+
});
|
|
54
|
+
if (!(workflow == null ? void 0 : workflow.enabled)) {
|
|
55
|
+
return context.throw(400, "Current workflow not found or disabled, please refresh and try again");
|
|
56
|
+
}
|
|
57
|
+
if (status !== import_status.APPROVAL_STATUS.DRAFT) {
|
|
58
|
+
context.action.mergeParams({
|
|
59
|
+
values: {
|
|
60
|
+
status: import_status.APPROVAL_STATUS.SUBMITTED
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const { repository, model } = collection;
|
|
65
|
+
const values = await repository.create({
|
|
66
|
+
values: {
|
|
67
|
+
...(0, import_database.traverseJSON)(data, { collection }),
|
|
68
|
+
createdBy: context.state.currentUser.id,
|
|
69
|
+
updatedBy: context.state.currentUser.id
|
|
70
|
+
},
|
|
71
|
+
context
|
|
72
|
+
});
|
|
73
|
+
const instance = values.get();
|
|
74
|
+
const summary = (0, import_tools.getSummary)({
|
|
75
|
+
summaryConfig: workflow.config.summary,
|
|
76
|
+
data: {
|
|
77
|
+
...instance,
|
|
78
|
+
...data
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
Object.keys(model.associations).forEach((key) => {
|
|
82
|
+
delete instance[key];
|
|
83
|
+
});
|
|
84
|
+
context.action.mergeParams({
|
|
85
|
+
values: {
|
|
86
|
+
collectionName,
|
|
87
|
+
data: instance,
|
|
88
|
+
dataKey: values[collection.filterTargetKey],
|
|
89
|
+
workflowKey: workflow.key,
|
|
90
|
+
applicantRoleName: context.state.currentRole,
|
|
91
|
+
summary
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
return import_actions.default.create(context, next);
|
|
95
|
+
},
|
|
96
|
+
async update(context, next) {
|
|
97
|
+
const { collectionName, data, status, updateAssociationValues, summaryConfig } = context.action.params.values ?? {};
|
|
98
|
+
const [dataSourceName, cName] = (0, import_data_source.parseCollectionName)(collectionName);
|
|
99
|
+
const dataSource = context.app.dataSourceManager.dataSources.get(dataSourceName);
|
|
100
|
+
const collection = dataSource.collectionManager.getCollection(cName);
|
|
101
|
+
const [target] = await collection.repository.update({
|
|
102
|
+
filterByTk: data[collection.filterTargetKey],
|
|
103
|
+
values: data,
|
|
104
|
+
updateAssociationValues
|
|
105
|
+
});
|
|
106
|
+
const summary = (0, import_tools.getSummary)({
|
|
107
|
+
summaryConfig,
|
|
108
|
+
data
|
|
109
|
+
});
|
|
110
|
+
context.action.mergeParams({
|
|
111
|
+
values: {
|
|
112
|
+
status: status ?? import_status.APPROVAL_STATUS.SUBMITTED,
|
|
113
|
+
data,
|
|
114
|
+
applicantRoleName: context.state.currentRole,
|
|
115
|
+
summary
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return import_actions.default.update(context, next);
|
|
119
|
+
},
|
|
120
|
+
// NOTE: 和 create 逻辑雷同, 但是 因为原本的 create 并非纯操作, 因此拷贝一份以便方便改动
|
|
121
|
+
async resubmit(context, next) {
|
|
122
|
+
const { status, collectionName, data, workflowId, collectionAppends } = context.action.params.values ?? {};
|
|
123
|
+
const [dataSourceName, cName] = (0, import_data_source.parseCollectionName)(collectionName);
|
|
124
|
+
const dataSource = context.app.dataSourceManager.dataSources.get(dataSourceName);
|
|
125
|
+
if (!dataSource) {
|
|
126
|
+
return context.throw(400, `Data source "${dataSourceName}" not found`);
|
|
127
|
+
}
|
|
128
|
+
const collection = dataSource.collectionManager.getCollection(cName);
|
|
129
|
+
if (!collection) {
|
|
130
|
+
return context.throw(400, `Collection "${cName}" not found`);
|
|
131
|
+
}
|
|
132
|
+
const workflow = await context.db.getRepository("workflows").findOne({
|
|
133
|
+
filterByTk: workflowId
|
|
134
|
+
});
|
|
135
|
+
if (!(workflow == null ? void 0 : workflow.enabled)) {
|
|
136
|
+
return context.throw(400, "Current workflow not found or disabled, please refresh and try again");
|
|
137
|
+
}
|
|
138
|
+
const { repository, model } = collection;
|
|
139
|
+
const values = await repository.create({
|
|
140
|
+
values: {
|
|
141
|
+
...data,
|
|
142
|
+
createdBy: context.state.currentUser.id,
|
|
143
|
+
updatedBy: context.state.currentUser.id
|
|
144
|
+
},
|
|
145
|
+
context
|
|
146
|
+
});
|
|
147
|
+
const instance = values.get();
|
|
148
|
+
const valuesWithAppends = await repository.findOne({
|
|
149
|
+
filterByTk: values.id,
|
|
150
|
+
appends: [...collectionAppends]
|
|
151
|
+
});
|
|
152
|
+
const summary = (0, import_tools.getSummary)({
|
|
153
|
+
summaryConfig: workflow.config.summary,
|
|
154
|
+
data: valuesWithAppends
|
|
155
|
+
});
|
|
156
|
+
Object.keys(model.associations).forEach((key) => {
|
|
157
|
+
delete instance[key];
|
|
158
|
+
});
|
|
159
|
+
context.action.mergeParams({
|
|
160
|
+
values: {
|
|
161
|
+
collectionName,
|
|
162
|
+
data: instance,
|
|
163
|
+
dataKey: values[collection.filterTargetKey],
|
|
164
|
+
workflowKey: workflow.key,
|
|
165
|
+
applicantRoleName: context.state.currentRole,
|
|
166
|
+
summary
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
return import_actions.default.create(context, next);
|
|
170
|
+
},
|
|
171
|
+
async destroy(context, next) {
|
|
172
|
+
const {
|
|
173
|
+
filterByTk,
|
|
174
|
+
values: { status }
|
|
175
|
+
} = context.action.params ?? {};
|
|
176
|
+
if (status !== import_status.APPROVAL_STATUS.DRAFT) {
|
|
177
|
+
return context.throw(400);
|
|
178
|
+
}
|
|
179
|
+
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
180
|
+
const approval = await repository.findOne({
|
|
181
|
+
filterByTk,
|
|
182
|
+
filter: {
|
|
183
|
+
createdById: context.state.currentUser.id
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
if (!approval) {
|
|
187
|
+
return context.throw(404);
|
|
188
|
+
}
|
|
189
|
+
return import_actions.default.destroy(context, next);
|
|
190
|
+
},
|
|
191
|
+
async withdraw(context, next) {
|
|
192
|
+
var _a;
|
|
193
|
+
const { filterByTk } = context.action.params;
|
|
194
|
+
const repository = import_actions.utils.getRepositoryFromParams(context);
|
|
195
|
+
const approval = await repository.findOne({
|
|
196
|
+
filterByTk,
|
|
197
|
+
appends: ["workflow"],
|
|
198
|
+
except: ["workflow.options"]
|
|
199
|
+
});
|
|
200
|
+
if (!approval) {
|
|
201
|
+
return context.throw(404);
|
|
202
|
+
}
|
|
203
|
+
if (approval.createdById !== ((_a = context.state.currentUser) == null ? void 0 : _a.id)) {
|
|
204
|
+
return context.throw(403);
|
|
205
|
+
}
|
|
206
|
+
if (approval.status !== import_status.APPROVAL_STATUS.SUBMITTED || !approval.workflow.config.withdrawable) {
|
|
207
|
+
return context.throw(400);
|
|
208
|
+
}
|
|
209
|
+
const [execution] = await approval.getExecutions({
|
|
210
|
+
where: {
|
|
211
|
+
status: import_module_workflow.EXECUTION_STATUS.STARTED
|
|
212
|
+
},
|
|
213
|
+
limit: 1
|
|
214
|
+
});
|
|
215
|
+
execution.workflow = approval.workflow;
|
|
216
|
+
const jobs = await context.db.sequelize.transaction(async (transaction) => {
|
|
217
|
+
const records = await approval.getRecords({
|
|
218
|
+
where: {
|
|
219
|
+
executionId: execution.id
|
|
220
|
+
},
|
|
221
|
+
include: [
|
|
222
|
+
{
|
|
223
|
+
association: "job",
|
|
224
|
+
where: {
|
|
225
|
+
status: import_module_workflow.JOB_STATUS.PENDING
|
|
226
|
+
},
|
|
227
|
+
required: true
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
transaction
|
|
231
|
+
});
|
|
232
|
+
await context.db.getRepository("approvalRecords").destroy({
|
|
233
|
+
filter: {
|
|
234
|
+
id: records.map((record) => record.id)
|
|
235
|
+
},
|
|
236
|
+
transaction
|
|
237
|
+
});
|
|
238
|
+
const jobsMap = records.reduce((map, record) => {
|
|
239
|
+
if (!map.has(record.job.id)) {
|
|
240
|
+
record.job.execution = execution;
|
|
241
|
+
record.job.latestUserJob = record.get();
|
|
242
|
+
record.job.latestUserJob.approval = approval;
|
|
243
|
+
map.set(record.job.id, record.job);
|
|
244
|
+
}
|
|
245
|
+
return map;
|
|
246
|
+
}, /* @__PURE__ */ new Map());
|
|
247
|
+
return Array.from(jobsMap.values());
|
|
248
|
+
});
|
|
249
|
+
context.body = approval;
|
|
250
|
+
context.status = 202;
|
|
251
|
+
await next();
|
|
252
|
+
await execution.update({
|
|
253
|
+
status: import_module_workflow.EXECUTION_STATUS.CANCELED
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
async listCentralized(context, next) {
|
|
257
|
+
const centralizedApprovalFlow = await context.db.getRepository("workflows").find({
|
|
258
|
+
filter: {
|
|
259
|
+
type: "approval",
|
|
260
|
+
"config.centralized": true
|
|
261
|
+
},
|
|
262
|
+
fields: ["id"]
|
|
263
|
+
});
|
|
264
|
+
context.action.mergeParams({
|
|
265
|
+
filter: {
|
|
266
|
+
workflowId: centralizedApprovalFlow.map((item) => item.id)
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
return await import_actions.default.list(context, next);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
273
|
+
0 && (module.exports = {
|
|
274
|
+
approvals
|
|
275
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var actions_exports = {};
|
|
19
|
+
__export(actions_exports, {
|
|
20
|
+
init: () => init
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(actions_exports);
|
|
23
|
+
var import_collection_name = require("../../common/collection-name");
|
|
24
|
+
var import_approvalCarbonCopy = require("./approvalCarbonCopy");
|
|
25
|
+
var import_approvalRecords = require("./approvalRecords");
|
|
26
|
+
var import_approvals = require("./approvals");
|
|
27
|
+
var import_workflows = require("./workflows");
|
|
28
|
+
function make(name, mod) {
|
|
29
|
+
return Object.keys(mod).reduce(
|
|
30
|
+
(result, key) => ({
|
|
31
|
+
...result,
|
|
32
|
+
[`${name}:${key}`]: mod[key]
|
|
33
|
+
}),
|
|
34
|
+
{}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function init({ app }) {
|
|
38
|
+
app.actions({
|
|
39
|
+
...make("workflows", import_workflows.workflows),
|
|
40
|
+
...make("approvals", import_approvals.approvals),
|
|
41
|
+
...make("approvalRecords", import_approvalRecords.approvalRecords),
|
|
42
|
+
...make(import_collection_name.COLLECTION_NAME_APPROVAL_CARBON_COPY, import_approvalCarbonCopy.approvalCarbonCopy)
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
init
|
|
48
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var workflows_exports = {};
|
|
29
|
+
__export(workflows_exports, {
|
|
30
|
+
workflows: () => workflows
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(workflows_exports);
|
|
33
|
+
var import_actions = __toESM(require("@tachybase/actions"));
|
|
34
|
+
const workflows = {
|
|
35
|
+
async listApprovalFlows(context, next) {
|
|
36
|
+
context.action.mergeParams({
|
|
37
|
+
filter: {
|
|
38
|
+
type: "approval",
|
|
39
|
+
enabled: true
|
|
40
|
+
// TODO: 仅显示当前用户有权限的流程
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return import_actions.default.list(context, next);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
workflows
|
|
49
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var approvalCarbonCopy_exports = {};
|
|
19
|
+
__export(approvalCarbonCopy_exports, {
|
|
20
|
+
default: () => approvalCarbonCopy_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(approvalCarbonCopy_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var import_collection_name = require("../../common/collection-name");
|
|
25
|
+
var approvalCarbonCopy_default = (0, import_database.defineCollection)({
|
|
26
|
+
namespace: "workflow.approvalCarbonCopy",
|
|
27
|
+
dumpRules: "required",
|
|
28
|
+
name: import_collection_name.COLLECTION_NAME_APPROVAL_CARBON_COPY,
|
|
29
|
+
createdBy: true,
|
|
30
|
+
updatedBy: true,
|
|
31
|
+
fields: [
|
|
32
|
+
{
|
|
33
|
+
type: "string",
|
|
34
|
+
name: "collectionName"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "string",
|
|
38
|
+
name: "index"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "string",
|
|
42
|
+
name: "dataKey"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "belongsTo",
|
|
46
|
+
name: "approval"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: "integer",
|
|
50
|
+
name: "status"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: "belongsTo",
|
|
54
|
+
name: "user",
|
|
55
|
+
target: "users"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "belongsTo",
|
|
59
|
+
name: "workflow",
|
|
60
|
+
onDelete: "CASCADE"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "belongsTo",
|
|
64
|
+
name: "execution"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: "belongsTo",
|
|
68
|
+
name: "node",
|
|
69
|
+
target: "flow_nodes"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: "belongsTo",
|
|
73
|
+
name: "job",
|
|
74
|
+
target: "jobs"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "jsonb",
|
|
78
|
+
name: "summary",
|
|
79
|
+
defaultValue: {}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: "jsonb",
|
|
83
|
+
name: "snapshot",
|
|
84
|
+
defaultValue: {}
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var approvalExecutions_exports = {};
|
|
19
|
+
__export(approvalExecutions_exports, {
|
|
20
|
+
default: () => approvalExecutions_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(approvalExecutions_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var approvalExecutions_default = (0, import_database.defineCollection)({
|
|
25
|
+
namespace: "workflow.approvalExecutions",
|
|
26
|
+
dumpRules: "required",
|
|
27
|
+
name: "approvalExecutions",
|
|
28
|
+
fields: [
|
|
29
|
+
{
|
|
30
|
+
type: "string",
|
|
31
|
+
name: "collectionName"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: "bigInt",
|
|
35
|
+
name: "id",
|
|
36
|
+
primaryKey: true,
|
|
37
|
+
autoIncrement: true
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: "belongsTo",
|
|
41
|
+
name: "approval",
|
|
42
|
+
foreignKey: "approvalId",
|
|
43
|
+
primaryKey: false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "belongsTo",
|
|
47
|
+
name: "execution",
|
|
48
|
+
foreignKey: "executionId",
|
|
49
|
+
primaryKey: false
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: "integer",
|
|
53
|
+
name: "status"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: "jsonb",
|
|
57
|
+
name: "snapshot"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: "jsonb",
|
|
61
|
+
name: "summary",
|
|
62
|
+
defaultValue: {}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "hasMany",
|
|
66
|
+
name: "records",
|
|
67
|
+
target: "approvalRecords"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var approvalRecords_exports = {};
|
|
19
|
+
__export(approvalRecords_exports, {
|
|
20
|
+
default: () => approvalRecords_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(approvalRecords_exports);
|
|
23
|
+
var import_database = require("@tachybase/database");
|
|
24
|
+
var approvalRecords_default = (0, import_database.defineCollection)({
|
|
25
|
+
namespace: "workflow.approvalRecords",
|
|
26
|
+
dumpRules: "required",
|
|
27
|
+
name: "approvalRecords",
|
|
28
|
+
createdBy: true,
|
|
29
|
+
fields: [
|
|
30
|
+
{
|
|
31
|
+
type: "string",
|
|
32
|
+
name: "collectionName"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "belongsTo",
|
|
36
|
+
name: "approval"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: "belongsTo",
|
|
40
|
+
name: "approvalExecution"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "belongsTo",
|
|
44
|
+
name: "user",
|
|
45
|
+
target: "users"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "belongsTo",
|
|
49
|
+
name: "job",
|
|
50
|
+
target: "jobs"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: "belongsTo",
|
|
54
|
+
name: "execution"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "belongsTo",
|
|
58
|
+
name: "node",
|
|
59
|
+
target: "flow_nodes"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: "belongsTo",
|
|
63
|
+
name: "workflow"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: "string",
|
|
67
|
+
name: "index"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: "integer",
|
|
71
|
+
name: "status"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: "jsonb",
|
|
75
|
+
name: "snapshot",
|
|
76
|
+
defaultValue: {}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: "jsonb",
|
|
80
|
+
name: "summary",
|
|
81
|
+
defaultValue: {}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: "text",
|
|
85
|
+
name: "comment"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
});
|