@things-factory/worklist 6.0.27 → 6.0.32
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/client/bootstrap.ts +9 -1
- package/client/components/activity-starter-form.ts +35 -10
- package/client/grist-editor/grist-editor-activity-search-key.ts +79 -0
- package/client/grist-editor/popup-activity-search-keys-input.ts +167 -0
- package/client/pages/activity/activity-list-page.ts +122 -11
- package/client/pages/activity/activity-partial-view.ts +85 -0
- package/client/pages/activity/starter-list-page.ts +1 -0
- package/client/pages/activity-approval/activity-approval-page.ts +6 -6
- package/client/pages/activity-instance/activity-instance-search-page.ts +377 -0
- package/client/pages/activity-instance/activity-instance-view.ts +135 -0
- package/client/pages/activity-store/activity-store-page.ts +1 -1
- package/client/pages/activity-template/activity-template-list-page.ts +29 -1
- package/client/pages/activity-thread/activity-thread-page.ts +8 -3
- package/client/pages/activity-thread/activity-thread-view.ts +102 -0
- package/client/pages/installable-activity/installable-activity-list-page.ts +29 -1
- package/client/pages/todo/approval-waiting-list-page.ts +19 -9
- package/client/pages/todo/done-list-page.ts +344 -0
- package/client/pages/todo/draft-list-page.ts +13 -2
- package/client/pages/todo/todo-list-page.ts +14 -3
- package/client/route.ts +8 -0
- package/client/types/activity-instance-type.ts +123 -0
- package/client/types/activity-instance.ts +124 -0
- package/client/types/activity-model-type.ts +40 -0
- package/client/types/activity-search-key-item-type.ts +9 -0
- package/client/types/activity-thread-type.ts +19 -0
- package/client/types/activity-thread.ts +88 -0
- package/client/types/activity.ts +103 -0
- package/client/{types.js → types/types.ts} +0 -9
- package/dist-client/bootstrap.js +4 -1
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +1 -1
- package/dist-client/components/activity-starter-form.js +34 -9
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/grist-editor/grist-editor-activity-search-key.d.ts +12 -0
- package/dist-client/grist-editor/grist-editor-activity-search-key.js +70 -0
- package/dist-client/grist-editor/grist-editor-activity-search-key.js.map +1 -0
- package/dist-client/grist-editor/popup-activity-search-keys-input.d.ts +17 -0
- package/dist-client/grist-editor/popup-activity-search-keys-input.js +177 -0
- package/dist-client/grist-editor/popup-activity-search-keys-input.js.map +1 -0
- package/dist-client/pages/activity/activity-list-page.d.ts +4 -0
- package/dist-client/pages/activity/activity-list-page.js +121 -11
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-partial-view.d.ts +13 -0
- package/dist-client/pages/activity/activity-partial-view.js +56 -0
- package/dist-client/pages/activity/activity-partial-view.js.map +1 -0
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-approval/activity-approval-page.js +6 -6
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-search-page.d.ts +76 -0
- package/dist-client/pages/activity-instance/activity-instance-search-page.js +371 -0
- package/dist-client/pages/activity-instance/activity-instance-search-page.js.map +1 -0
- package/dist-client/pages/activity-instance/activity-instance-view.d.ts +14 -0
- package/dist-client/pages/activity-instance/activity-instance-view.js +130 -0
- package/dist-client/pages/activity-instance/activity-instance-view.js.map +1 -0
- package/dist-client/pages/activity-store/activity-store-page.js +1 -1
- package/dist-client/pages/activity-store/activity-store-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.js +29 -1
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.js +8 -3
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-view.d.ts +11 -0
- package/dist-client/pages/activity-thread/activity-thread-view.js +103 -0
- package/dist-client/pages/activity-thread/activity-thread-view.js.map +1 -0
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +29 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-waiting-list-page.js +19 -9
- package/dist-client/pages/todo/approval-waiting-list-page.js.map +1 -1
- package/dist-client/pages/todo/done-list-page.d.ts +44 -0
- package/dist-client/pages/todo/done-list-page.js +342 -0
- package/dist-client/pages/todo/done-list-page.js.map +1 -0
- package/dist-client/pages/todo/draft-list-page.js +12 -2
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.js +13 -3
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +6 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types/activity-instance-type.d.ts +76 -0
- package/dist-client/types/activity-instance-type.js +11 -0
- package/dist-client/types/activity-instance-type.js.map +1 -0
- package/dist-client/types/activity-instance.d.ts +70 -0
- package/dist-client/types/activity-instance.js +36 -0
- package/dist-client/types/activity-instance.js.map +1 -0
- package/dist-client/types/activity-model-type.d.ts +31 -0
- package/dist-client/types/activity-model-type.js +18 -0
- package/dist-client/types/activity-model-type.js.map +1 -0
- package/dist-client/types/activity-search-key-item-type.d.ts +6 -0
- package/dist-client/types/activity-search-key-item-type.js +3 -0
- package/dist-client/types/activity-search-key-item-type.js.map +1 -0
- package/dist-client/types/activity-thread-type.d.ts +15 -0
- package/dist-client/types/activity-thread-type.js +7 -0
- package/dist-client/types/activity-thread-type.js.map +1 -0
- package/dist-client/types/activity-thread.d.ts +37 -0
- package/dist-client/types/activity-thread.js +51 -0
- package/dist-client/types/activity-thread.js.map +1 -0
- package/dist-client/types/activity.d.ts +65 -0
- package/dist-client/types/activity.js +35 -0
- package/dist-client/types/activity.js.map +1 -0
- package/dist-client/{types.d.ts → types/types.d.ts} +3 -7
- package/dist-client/{types.js → types/types.js} +0 -8
- package/dist-client/types/types.js.map +1 -0
- package/dist-server/controllers/activity-approval/approve.js +2 -0
- package/dist-server/controllers/activity-approval/approve.js.map +1 -1
- package/dist-server/controllers/activity-approval/reject.js +2 -0
- package/dist-server/controllers/activity-approval/reject.js.map +1 -1
- package/dist-server/controllers/{activity-installation-controller.js → activity-installation/activity-installation-controller.js} +8 -0
- package/dist-server/controllers/activity-installation/activity-installation-controller.js.map +1 -0
- package/dist-server/controllers/activity-installation/call-webhook.js.map +1 -0
- package/dist-server/controllers/activity-instance/abort.js +1 -1
- package/dist-server/controllers/activity-instance/abort.js.map +1 -1
- package/dist-server/controllers/activity-instance/adjust.js +1 -1
- package/dist-server/controllers/activity-instance/adjust.js.map +1 -1
- package/dist-server/controllers/activity-instance/delegate.js +5 -0
- package/dist-server/controllers/activity-instance/delegate.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +16 -1
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +38 -3
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/activity-instance/start.js +1 -1
- package/dist-server/controllers/activity-instance/start.js.map +1 -1
- package/dist-server/controllers/activity-thread/submit.js +1 -1
- package/dist-server/controllers/activity-thread/submit.js.map +1 -1
- package/dist-server/controllers/common.js +72 -25
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/controllers/index.js +1 -1
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +38 -1
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-search-key-item-type.js +28 -0
- package/dist-server/service/activity/activity-search-key-item-type.js.map +1 -0
- package/dist-server/service/activity/activity-type.js +56 -0
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +40 -4
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity-approval/event-subscriber.js +1 -1
- package/dist-server/service/activity-approval/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js +53 -0
- package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-query.js +29 -0
- package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-type.js +16 -0
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +63 -0
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-instance/event-subscriber.js +4 -4
- package/dist-server/service/activity-instance/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-query.js +27 -0
- package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread.js +4 -1
- package/dist-server/service/activity-thread/activity-thread.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity-mutation.js +1 -1
- package/dist-server/service/installable-activity/installable-activity-mutation.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity-query.js +1 -1
- package/dist-server/service/installable-activity/installable-activity-query.js.map +1 -1
- package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/server/controllers/activity-approval/approve.ts +3 -0
- package/server/controllers/activity-approval/reject.ts +3 -0
- package/server/controllers/{activity-installation-controller.ts → activity-installation/activity-installation-controller.ts} +12 -1
- package/server/controllers/activity-instance/abort.ts +1 -1
- package/server/controllers/activity-instance/adjust.ts +1 -1
- package/server/controllers/activity-instance/delegate.ts +9 -1
- package/server/controllers/activity-instance/draft.ts +16 -5
- package/server/controllers/activity-instance/post.ts +54 -6
- package/server/controllers/activity-instance/start.ts +1 -1
- package/server/controllers/activity-thread/submit.ts +1 -0
- package/server/controllers/common.ts +85 -28
- package/server/controllers/index.ts +1 -1
- package/server/service/activity/activity-history.ts +32 -1
- package/server/service/activity/activity-search-key-item-type.ts +16 -0
- package/server/service/activity/activity-type.ts +46 -1
- package/server/service/activity/activity.ts +34 -4
- package/server/service/activity-approval/event-subscriber.ts +1 -1
- package/server/service/activity-instance/activity-instance-history.ts +41 -0
- package/server/service/activity-instance/activity-instance-query.ts +30 -1
- package/server/service/activity-instance/activity-instance-type.ts +12 -0
- package/server/service/activity-instance/activity-instance.ts +49 -0
- package/server/service/activity-instance/event-subscriber.ts +4 -4
- package/server/service/activity-thread/activity-thread-query.ts +24 -0
- package/server/service/activity-thread/activity-thread.ts +6 -3
- package/server/service/installable-activity/installable-activity-mutation.ts +1 -1
- package/server/service/installable-activity/installable-activity-query.ts +1 -1
- package/server/service/installable-activity/installable-activity.ts +3 -1
- package/things-factory.config.js +5 -1
- package/translations/en.json +7 -0
- package/translations/ko.json +7 -0
- package/translations/ms.json +7 -0
- package/translations/zh.json +7 -0
- package/dist-client/types.js.map +0 -1
- package/dist-server/controllers/activity-installation-controller.js.map +0 -1
- package/dist-server/controllers/call-webhook.js.map +0 -1
- /package/dist-server/controllers/{call-webhook.js → activity-installation/call-webhook.js} +0 -0
- /package/server/controllers/{call-webhook.ts → activity-installation/call-webhook.ts} +0 -0
|
@@ -8,6 +8,8 @@ const typeorm_history_1 = require("@operato/typeorm-history");
|
|
|
8
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
9
|
const env_1 = require("@things-factory/env");
|
|
10
10
|
const shell_1 = require("@things-factory/shell");
|
|
11
|
+
const organization_1 = require("@things-factory/organization");
|
|
12
|
+
const activity_instance_1 = require("../activity-instance/activity-instance");
|
|
11
13
|
const activity_1 = require("./activity");
|
|
12
14
|
const activity_model_type_1 = require("./activity-model-type");
|
|
13
15
|
const ORMCONFIG = env_1.config.get('ormconfig', {});
|
|
@@ -72,6 +74,18 @@ tslib_1.__decorate([
|
|
|
72
74
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
75
|
tslib_1.__metadata("design:type", Boolean)
|
|
74
76
|
], ActivityHistory.prototype, "startable", void 0);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({
|
|
79
|
+
nullable: true
|
|
80
|
+
}),
|
|
81
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
82
|
+
tslib_1.__metadata("design:type", String)
|
|
83
|
+
], ActivityHistory.prototype, "schedule", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
86
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
87
|
+
tslib_1.__metadata("design:type", String)
|
|
88
|
+
], ActivityHistory.prototype, "timezone", void 0);
|
|
75
89
|
tslib_1.__decorate([
|
|
76
90
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
77
91
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -119,9 +133,22 @@ tslib_1.__decorate([
|
|
|
119
133
|
(0, typeorm_1.RelationId)((activity) => activity.supervisoryRole),
|
|
120
134
|
tslib_1.__metadata("design:type", String)
|
|
121
135
|
], ActivityHistory.prototype, "supervisoryRoleId", void 0);
|
|
136
|
+
tslib_1.__decorate([
|
|
137
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
138
|
+
(0, type_graphql_1.Field)(type => [activity_instance_1.AssigneeItem], { nullable: true, description: 'Who to resolve for the activity.' }),
|
|
139
|
+
tslib_1.__metadata("design:type", Array)
|
|
140
|
+
], ActivityHistory.prototype, "assignees", void 0);
|
|
141
|
+
tslib_1.__decorate([
|
|
142
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
143
|
+
(0, type_graphql_1.Field)(type => [organization_1.ApprovalLineItem], {
|
|
144
|
+
nullable: true,
|
|
145
|
+
description: 'Approval line for handling the activity.'
|
|
146
|
+
}),
|
|
147
|
+
tslib_1.__metadata("design:type", Array)
|
|
148
|
+
], ActivityHistory.prototype, "approvalLine", void 0);
|
|
122
149
|
tslib_1.__decorate([
|
|
123
150
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
124
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
151
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of UI to be shown when a task is performed' }),
|
|
125
152
|
tslib_1.__metadata("design:type", String)
|
|
126
153
|
], ActivityHistory.prototype, "uiType", void 0);
|
|
127
154
|
tslib_1.__decorate([
|
|
@@ -129,10 +156,20 @@ tslib_1.__decorate([
|
|
|
129
156
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
130
157
|
tslib_1.__metadata("design:type", String)
|
|
131
158
|
], ActivityHistory.prototype, "uiSource", void 0);
|
|
159
|
+
tslib_1.__decorate([
|
|
160
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
161
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of view to be shown when a task is approved' }),
|
|
162
|
+
tslib_1.__metadata("design:type", String)
|
|
163
|
+
], ActivityHistory.prototype, "viewType", void 0);
|
|
132
164
|
tslib_1.__decorate([
|
|
133
165
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
134
166
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
135
167
|
tslib_1.__metadata("design:type", String)
|
|
168
|
+
], ActivityHistory.prototype, "viewSource", void 0);
|
|
169
|
+
tslib_1.__decorate([
|
|
170
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
171
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of report to be shown when a task is approved' }),
|
|
172
|
+
tslib_1.__metadata("design:type", String)
|
|
136
173
|
], ActivityHistory.prototype, "reportType", void 0);
|
|
137
174
|
tslib_1.__decorate([
|
|
138
175
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-history.js","sourceRoot":"","sources":["../../../server/service/activity/activity-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,yCAAmF;AACnF,+DAAyD;AAEzD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAc7B,IAAM,e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B,eAAe;IAZ3B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,uBAAuB,EACvB,CAAC,eAAgC,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,EAC3F,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EACJ,uBAAuB,EACvB,CAAC,eAAgC,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,UAAU,EAAE,eAAe,CAAC,OAAO,CAAC,EACnH,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;GAC7C,eAAe,CAqI3B;AArIY,0CAAe","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { Role, User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain } from '@things-factory/shell'\n\nimport { Activity, ActivityStatus, ActivityType, ActivityUIType } from './activity'\nimport { ActivityModelItem } from './activity-model-type'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_activity_history_0',\n (activityHistory: ActivityHistory) => [activityHistory.originalId, activityHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_activity_history_1',\n (activityHistory: ActivityHistory) => [activityHistory.domain, activityHistory.originalId, activityHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Activity' })\nexport class ActivityHistory implements HistoryEntityInterface<Activity> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((activity: Activity) => activity.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n priority?: number = 1\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n startable?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n standardTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cycleTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n tactTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n leadTime?: number\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n issuerRole?: Role\n\n @RelationId((activity: Activity) => activity.issuerRole)\n issuerRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n assigneeRole?: Role\n\n @RelationId((activity: Activity) => activity.assigneeRole)\n assigneeRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n supervisoryRole?: Role\n\n @RelationId((activity: Activity) => activity.supervisoryRole)\n supervisoryRoleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportSource?: string\n\n @Column()\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((activity: Activity) => activity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((activity: Activity) => activity.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : 'smallint',\n enum: HistoryActionType\n })\n public action!: HistoryActionType\n}\n"]}
|
|
1
|
+
{"version":3,"file":"activity-history.js","sourceRoot":"","sources":["../../../server/service/activity/activity-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAC9C,+DAA+D;AAE/D,8EAAqE;AACrE,yCAAmF;AACnF,+DAAyD;AAEzD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAc7B,IAAM,eAAe,GAArB,MAAM,eAAe;IAArB;QAOL,YAAO,GAAY,CAAC,CAAA;QA+BpB,aAAQ,GAAY,CAAC,CAAA;IA4HvB,CAAC;CAAA,CAAA;AAjKC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;2CACC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAEpB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,C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typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { Role, User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport { AssigneeItem } from '../activity-instance/activity-instance'\nimport { Activity, ActivityStatus, ActivityType, ActivityUIType } from './activity'\nimport { ActivityModelItem } from './activity-model-type'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_activity_history_0',\n (activityHistory: ActivityHistory) => [activityHistory.originalId, activityHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_activity_history_1',\n (activityHistory: ActivityHistory) => [activityHistory.domain, activityHistory.originalId, activityHistory.version],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Activity' })\nexport class ActivityHistory implements HistoryEntityInterface<Activity> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((activity: Activity) => activity.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n priority?: number = 1\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n startable?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n timezone?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n standardTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cycleTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n tactTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n leadTime?: number\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n issuerRole?: Role\n\n @RelationId((activity: Activity) => activity.issuerRole)\n issuerRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n assigneeRole?: Role\n\n @RelationId((activity: Activity) => activity.assigneeRole)\n assigneeRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n supervisoryRole?: Role\n\n @RelationId((activity: Activity) => activity.supervisoryRole)\n supervisoryRoleId?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [AssigneeItem], { nullable: true, description: 'Who to resolve for the activity.' })\n assignees?: AssigneeItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], {\n nullable: true,\n description: 'Approval line for handling the activity.'\n })\n approvalLine?: ApprovalLineItem[]\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of UI to be shown when a task is performed' })\n uiType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of view to be shown when a task is approved' })\n viewType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n viewSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of report to be shown when a task is approved' })\n reportType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportSource?: string\n\n @Column()\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((activity: Activity) => activity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((activity: Activity) => activity.updater)\n updaterId?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : 'smallint',\n enum: HistoryActionType\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActivitySearchKeyItem = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
let ActivitySearchKeyItem = class ActivitySearchKeyItem {
|
|
7
|
+
};
|
|
8
|
+
tslib_1.__decorate([
|
|
9
|
+
(0, type_graphql_1.Field)(),
|
|
10
|
+
tslib_1.__metadata("design:type", String)
|
|
11
|
+
], ActivitySearchKeyItem.prototype, "name", void 0);
|
|
12
|
+
tslib_1.__decorate([
|
|
13
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
14
|
+
tslib_1.__metadata("design:type", String)
|
|
15
|
+
], ActivitySearchKeyItem.prototype, "description", void 0);
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
18
|
+
tslib_1.__metadata("design:type", String)
|
|
19
|
+
], ActivitySearchKeyItem.prototype, "inputKey", void 0);
|
|
20
|
+
tslib_1.__decorate([
|
|
21
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
22
|
+
tslib_1.__metadata("design:type", String)
|
|
23
|
+
], ActivitySearchKeyItem.prototype, "tKey", void 0);
|
|
24
|
+
ActivitySearchKeyItem = tslib_1.__decorate([
|
|
25
|
+
(0, type_graphql_1.ObjectType)({ description: 'Entity for ActivitySearchKeyItem' })
|
|
26
|
+
], ActivitySearchKeyItem);
|
|
27
|
+
exports.ActivitySearchKeyItem = ActivitySearchKeyItem;
|
|
28
|
+
//# sourceMappingURL=activity-search-key-item-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-search-key-item-type.js","sourceRoot":"","sources":["../../../server/service/activity/activity-search-key-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAgD;AAGzC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAYjC,CAAA;AAXC;IAAC,IAAA,oBAAK,GAAE;;mDACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACV;AAEhB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACb;AAXF,qBAAqB;IADjC,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;GACnD,qBAAqB,CAYjC;AAZY,sDAAqB","sourcesContent":["import { Field, ObjectType } from 'type-graphql'\n\n@ObjectType({ description: 'Entity for ActivitySearchKeyItem' })\nexport class ActivitySearchKeyItem {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n inputKey: string\n\n @Field({ nullable: true })\n tKey?: string\n}\n"]}
|
|
@@ -20,6 +20,14 @@ tslib_1.__decorate([
|
|
|
20
20
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
21
21
|
tslib_1.__metadata("design:type", String)
|
|
22
22
|
], NewActivity.prototype, "activityType", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
25
|
+
tslib_1.__metadata("design:type", Array)
|
|
26
|
+
], NewActivity.prototype, "searchKeys", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], NewActivity.prototype, "state", void 0);
|
|
23
31
|
tslib_1.__decorate([
|
|
24
32
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
25
33
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -36,6 +44,10 @@ tslib_1.__decorate([
|
|
|
36
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
37
45
|
tslib_1.__metadata("design:type", String)
|
|
38
46
|
], NewActivity.prototype, "schedule", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
49
|
+
tslib_1.__metadata("design:type", String)
|
|
50
|
+
], NewActivity.prototype, "timezone", void 0);
|
|
39
51
|
tslib_1.__decorate([
|
|
40
52
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
41
53
|
tslib_1.__metadata("design:type", Number)
|
|
@@ -64,6 +76,14 @@ tslib_1.__decorate([
|
|
|
64
76
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
65
77
|
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
66
78
|
], NewActivity.prototype, "supervisoryRole", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
81
|
+
tslib_1.__metadata("design:type", Array)
|
|
82
|
+
], NewActivity.prototype, "assignees", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
85
|
+
tslib_1.__metadata("design:type", Array)
|
|
86
|
+
], NewActivity.prototype, "approvalLine", void 0);
|
|
67
87
|
tslib_1.__decorate([
|
|
68
88
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
69
89
|
tslib_1.__metadata("design:type", String)
|
|
@@ -72,6 +92,14 @@ tslib_1.__decorate([
|
|
|
72
92
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
93
|
tslib_1.__metadata("design:type", String)
|
|
74
94
|
], NewActivity.prototype, "uiSource", void 0);
|
|
95
|
+
tslib_1.__decorate([
|
|
96
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
97
|
+
tslib_1.__metadata("design:type", String)
|
|
98
|
+
], NewActivity.prototype, "viewType", void 0);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
101
|
+
tslib_1.__metadata("design:type", String)
|
|
102
|
+
], NewActivity.prototype, "viewSource", void 0);
|
|
75
103
|
tslib_1.__decorate([
|
|
76
104
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
77
105
|
tslib_1.__metadata("design:type", String)
|
|
@@ -110,6 +138,14 @@ tslib_1.__decorate([
|
|
|
110
138
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
111
139
|
tslib_1.__metadata("design:type", String)
|
|
112
140
|
], ActivityPatch.prototype, "activityType", void 0);
|
|
141
|
+
tslib_1.__decorate([
|
|
142
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
143
|
+
tslib_1.__metadata("design:type", Array)
|
|
144
|
+
], ActivityPatch.prototype, "searchKeys", void 0);
|
|
145
|
+
tslib_1.__decorate([
|
|
146
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
147
|
+
tslib_1.__metadata("design:type", String)
|
|
148
|
+
], ActivityPatch.prototype, "state", void 0);
|
|
113
149
|
tslib_1.__decorate([
|
|
114
150
|
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
115
151
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -126,6 +162,10 @@ tslib_1.__decorate([
|
|
|
126
162
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
127
163
|
tslib_1.__metadata("design:type", String)
|
|
128
164
|
], ActivityPatch.prototype, "schedule", void 0);
|
|
165
|
+
tslib_1.__decorate([
|
|
166
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
167
|
+
tslib_1.__metadata("design:type", String)
|
|
168
|
+
], ActivityPatch.prototype, "timezone", void 0);
|
|
129
169
|
tslib_1.__decorate([
|
|
130
170
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
131
171
|
tslib_1.__metadata("design:type", Number)
|
|
@@ -154,6 +194,14 @@ tslib_1.__decorate([
|
|
|
154
194
|
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
155
195
|
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
156
196
|
], ActivityPatch.prototype, "supervisoryRole", void 0);
|
|
197
|
+
tslib_1.__decorate([
|
|
198
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
199
|
+
tslib_1.__metadata("design:type", Array)
|
|
200
|
+
], ActivityPatch.prototype, "assignees", void 0);
|
|
201
|
+
tslib_1.__decorate([
|
|
202
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
203
|
+
tslib_1.__metadata("design:type", Array)
|
|
204
|
+
], ActivityPatch.prototype, "approvalLine", void 0);
|
|
157
205
|
tslib_1.__decorate([
|
|
158
206
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
159
207
|
tslib_1.__metadata("design:type", String)
|
|
@@ -162,6 +210,14 @@ tslib_1.__decorate([
|
|
|
162
210
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
163
211
|
tslib_1.__metadata("design:type", String)
|
|
164
212
|
], ActivityPatch.prototype, "uiSource", void 0);
|
|
213
|
+
tslib_1.__decorate([
|
|
214
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
215
|
+
tslib_1.__metadata("design:type", String)
|
|
216
|
+
], ActivityPatch.prototype, "viewType", void 0);
|
|
217
|
+
tslib_1.__decorate([
|
|
218
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
219
|
+
tslib_1.__metadata("design:type", String)
|
|
220
|
+
], ActivityPatch.prototype, "viewSource", void 0);
|
|
165
221
|
tslib_1.__decorate([
|
|
166
222
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
167
223
|
tslib_1.__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-type.js","sourceRoot":"","sources":["../../../server/service/activity/activity-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,iDAA+D;
|
|
1
|
+
{"version":3,"file":"activity-type.js","sourceRoot":"","sources":["../../../server/service/activity/activity-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,iDAA+D;AAI/D,yCAAmF;AAK5E,IAAM,WAAW,GAAjB,MAAM,WAAW;CAiFvB,CAAA;AAhFC;IAAC,IAAA,oBAAK,GAAE;;yCACI;AAEZ;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAEpB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACC;AAE3B;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACZ;AAEpC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACJ;AAEtB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACrB;AAE3B;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,E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,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACf;AAEjC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACH;AAEvB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACD;AAEzB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACP;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACC;AAE3B;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACL;AAErB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC3B;AAEtB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;AAnFJ,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAoFzB;AApFY,sCAAa;AAuFnB,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,CAAC;;2CACT;AAEjB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACN;AALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB;AANY,oCAAY","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport { AssigneeItem } from '../activity-instance/activity-instance'\nimport { Activity, ActivityStatus, ActivityType, ActivityUIType } from './activity'\nimport { ActivityModelItem } from './activity-model-type'\nimport { ActivitySearchKeyItem } from './activity-search-key-item-type'\n\n@InputType()\nexport class NewActivity {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field(type => ScalarObject, { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Field(type => ScalarObject, { nullable: true })\n model?: ActivityModelItem[]\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n startable?: boolean\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n standardTime?: number\n\n @Field({ nullable: true })\n cycleTime?: number\n\n @Field({ nullable: true })\n tactTime?: number\n\n @Field({ nullable: true })\n leadTime?: number\n\n @Field(type => ObjectRef, { nullable: true })\n issuerRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: ObjectRef\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class ActivityPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field(type => ScalarObject, { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Field(type => ScalarObject, { nullable: true })\n model?: ActivityModelItem[]\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n startable?: boolean\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n standardTime?: number\n\n @Field({ nullable: true })\n cycleTime?: number\n\n @Field({ nullable: true })\n tactTime?: number\n\n @Field({ nullable: true })\n leadTime?: number\n\n @Field(type => ObjectRef, { nullable: true })\n issuerRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: ObjectRef\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ActivityList {\n @Field(type => [Activity])\n items: Activity[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -6,7 +6,10 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const typeorm_1 = require("typeorm");
|
|
7
7
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
8
|
const shell_1 = require("@things-factory/shell");
|
|
9
|
+
const organization_1 = require("@things-factory/organization");
|
|
10
|
+
const activity_instance_1 = require("../activity-instance/activity-instance");
|
|
9
11
|
const activity_model_type_1 = require("./activity-model-type");
|
|
12
|
+
const activity_search_key_item_type_1 = require("./activity-search-key-item-type");
|
|
10
13
|
var ActivityStatus;
|
|
11
14
|
(function (ActivityStatus) {
|
|
12
15
|
ActivityStatus["Draft"] = "draft";
|
|
@@ -92,6 +95,11 @@ tslib_1.__decorate([
|
|
|
92
95
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
93
96
|
tslib_1.__metadata("design:type", String)
|
|
94
97
|
], Activity.prototype, "state", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
100
|
+
(0, type_graphql_1.Field)(type => [activity_search_key_item_type_1.ActivitySearchKeyItem], { nullable: true }),
|
|
101
|
+
tslib_1.__metadata("design:type", Array)
|
|
102
|
+
], Activity.prototype, "searchKeys", void 0);
|
|
95
103
|
tslib_1.__decorate([
|
|
96
104
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
97
105
|
(0, type_graphql_1.Field)(type => [activity_model_type_1.ActivityModelItem], { nullable: true }),
|
|
@@ -104,7 +112,7 @@ tslib_1.__decorate([
|
|
|
104
112
|
], Activity.prototype, "priority", void 0);
|
|
105
113
|
tslib_1.__decorate([
|
|
106
114
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
107
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
115
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Whether the task can be started arbitrarily by a user with privileges.' }),
|
|
108
116
|
tslib_1.__metadata("design:type", Boolean)
|
|
109
117
|
], Activity.prototype, "startable", void 0);
|
|
110
118
|
tslib_1.__decorate([
|
|
@@ -114,6 +122,11 @@ tslib_1.__decorate([
|
|
|
114
122
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
115
123
|
tslib_1.__metadata("design:type", String)
|
|
116
124
|
], Activity.prototype, "schedule", void 0);
|
|
125
|
+
tslib_1.__decorate([
|
|
126
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
127
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
128
|
+
tslib_1.__metadata("design:type", String)
|
|
129
|
+
], Activity.prototype, "timezone", void 0);
|
|
117
130
|
tslib_1.__decorate([
|
|
118
131
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
119
132
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -145,7 +158,7 @@ tslib_1.__decorate([
|
|
|
145
158
|
], Activity.prototype, "issuerRoleId", void 0);
|
|
146
159
|
tslib_1.__decorate([
|
|
147
160
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.Role, { nullable: true }),
|
|
148
|
-
(0, type_graphql_1.Field)(type => auth_base_1.Role, { nullable: true }),
|
|
161
|
+
(0, type_graphql_1.Field)(type => auth_base_1.Role, { nullable: true, description: 'Roles eligible to pick up activity from the activity bank.' }),
|
|
149
162
|
tslib_1.__metadata("design:type", auth_base_1.Role)
|
|
150
163
|
], Activity.prototype, "assigneeRole", void 0);
|
|
151
164
|
tslib_1.__decorate([
|
|
@@ -154,16 +167,29 @@ tslib_1.__decorate([
|
|
|
154
167
|
], Activity.prototype, "assigneeRoleId", void 0);
|
|
155
168
|
tslib_1.__decorate([
|
|
156
169
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.Role, { nullable: true }),
|
|
157
|
-
(0, type_graphql_1.Field)(type => auth_base_1.Role, { nullable: true }),
|
|
170
|
+
(0, type_graphql_1.Field)(type => auth_base_1.Role, { nullable: true, description: 'The final authority on a given activity.' }),
|
|
158
171
|
tslib_1.__metadata("design:type", auth_base_1.Role)
|
|
159
172
|
], Activity.prototype, "supervisoryRole", void 0);
|
|
160
173
|
tslib_1.__decorate([
|
|
161
174
|
(0, typeorm_1.RelationId)((activity) => activity.supervisoryRole),
|
|
162
175
|
tslib_1.__metadata("design:type", String)
|
|
163
176
|
], Activity.prototype, "supervisoryRoleId", void 0);
|
|
177
|
+
tslib_1.__decorate([
|
|
178
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
179
|
+
(0, type_graphql_1.Field)(type => [activity_instance_1.AssigneeItem], { nullable: true, description: 'Who to resolve for the activity.' }),
|
|
180
|
+
tslib_1.__metadata("design:type", Array)
|
|
181
|
+
], Activity.prototype, "assignees", void 0);
|
|
182
|
+
tslib_1.__decorate([
|
|
183
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
184
|
+
(0, type_graphql_1.Field)(type => [organization_1.ApprovalLineItem], {
|
|
185
|
+
nullable: true,
|
|
186
|
+
description: 'Approval line for handling the activity.'
|
|
187
|
+
}),
|
|
188
|
+
tslib_1.__metadata("design:type", Array)
|
|
189
|
+
], Activity.prototype, "approvalLine", void 0);
|
|
164
190
|
tslib_1.__decorate([
|
|
165
191
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
166
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
192
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of UI to be shown when a task is performed' }),
|
|
167
193
|
tslib_1.__metadata("design:type", String)
|
|
168
194
|
], Activity.prototype, "uiType", void 0);
|
|
169
195
|
tslib_1.__decorate([
|
|
@@ -171,10 +197,20 @@ tslib_1.__decorate([
|
|
|
171
197
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
172
198
|
tslib_1.__metadata("design:type", String)
|
|
173
199
|
], Activity.prototype, "uiSource", void 0);
|
|
200
|
+
tslib_1.__decorate([
|
|
201
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
202
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of view to be shown when a task is approved' }),
|
|
203
|
+
tslib_1.__metadata("design:type", String)
|
|
204
|
+
], Activity.prototype, "viewType", void 0);
|
|
174
205
|
tslib_1.__decorate([
|
|
175
206
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
176
207
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
177
208
|
tslib_1.__metadata("design:type", String)
|
|
209
|
+
], Activity.prototype, "viewSource", void 0);
|
|
210
|
+
tslib_1.__decorate([
|
|
211
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
212
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of report to be shown when a task is approved' }),
|
|
213
|
+
tslib_1.__metadata("design:type", String)
|
|
178
214
|
], Activity.prototype, "reportType", void 0);
|
|
179
215
|
tslib_1.__decorate([
|
|
180
216
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../../server/service/activity/activity.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAUgB;AAEhB,yDAAsD;AACtD,iDAA8C;AAE9C,+DAAyD;AAEzD,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,uCAAqB,CAAA;IACrB,2CAAyB,CAAA;AAC3B,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAED,IAAA,+BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iCAAiC;CAC/C,CAAC,CAAA;AAEF,IAAY,YAWX;AAXD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,8CAA8B,CAAA;IAC9B,iCAAiB,CAAA;IACjB,0CAA0B,CAAA;IAC1B,6BAAa,CAAA;AACf,CAAC,EAXW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAWvB;AAED,IAAA,+BAAgB,EAAC,YAAY,EAAE;IAC7B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,gCAAgC;CAC9C,CAAC,CAAA;AAEF,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;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AI,EAAE,CAAC;sCAC9B,gBAAI;yCAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;AAElB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;yCAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;AAElB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACxB;AArIP,QAAQ;IAJpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClG,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACvH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAsIpB;AAtIY,4BAAQ","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn,\n VersionColumn\n} from 'typeorm'\n\nimport { Role, User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\n\nimport { ActivityModelItem } from './activity-model-type'\n\nexport enum ActivityStatus {\n Draft = 'draft',\n Released = 'released',\n Deprecated = 'deprecated'\n}\n\nregisterEnumType(ActivityStatus, {\n name: 'ActivityStatus',\n description: 'state enumeration of a activity'\n})\n\nexport enum ActivityType {\n Task = 'task',\n Service = 'service',\n Send = 'send',\n Receive = 'receive',\n User = 'user',\n Manual = 'manual',\n BusinessRule = 'business-rule',\n Script = 'script',\n Subprocess = 'sub-process',\n Call = 'call'\n}\n\nregisterEnumType(ActivityType, {\n name: 'ActivityType',\n description: 'type enumeration of a activity'\n})\n\nexport enum ActivityUIType {\n Generated = 'generated',\n Template = 'template',\n Board = 'board',\n CustomElement = 'custom-element',\n Page = 'page',\n External = 'external'\n}\n\nregisterEnumType(ActivityUIType, {\n name: 'ActivityUIType',\n description: 'user-interface type enumeration of a activity'\n})\n\n@Entity()\n@Index('ix_activity_0', (activity: Activity) => [activity.domain, activity.name], { unique: true })\n@Index('ix_activity_1', (activity: Activity) => [activity.domain, activity.state, activity.priority], { unique: false })\n@ObjectType({ description: 'Entity for Activity' })\nexport class Activity {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((activity: Activity) => activity.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n priority?: number = 1\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n startable?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n standardTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cycleTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n tactTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n leadTime?: number\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n issuerRole?: Role\n\n @RelationId((activity: Activity) => activity.issuerRole)\n issuerRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n assigneeRole?: Role\n\n @RelationId((activity: Activity) => activity.assigneeRole)\n assigneeRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n supervisoryRole?: Role\n\n @RelationId((activity: Activity) => activity.supervisoryRole)\n supervisoryRoleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportSource?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User assigned to the client application' })\n client?: User\n\n @RelationId((activity: Activity) => activity.creator)\n clientId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((activity: Activity) => activity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((activity: Activity) => activity.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}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C,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;yCAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;AAElB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACxB;AAhKP,QAAQ;IAJpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClG,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACvH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAiKpB;AAjKY,4BAAQ","sourcesContent":["import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn,\n VersionColumn\n} from 'typeorm'\n\nimport { Role, User } from '@things-factory/auth-base'\nimport { Domain } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport { AssigneeItem } from '../activity-instance/activity-instance'\nimport { ActivityModelItem } from './activity-model-type'\nimport { ActivitySearchKeyItem } from './activity-search-key-item-type'\n\nexport enum ActivityStatus {\n Draft = 'draft',\n Released = 'released',\n Deprecated = 'deprecated'\n}\n\nregisterEnumType(ActivityStatus, {\n name: 'ActivityStatus',\n description: 'state enumeration of a activity'\n})\n\nexport enum ActivityType {\n Task = 'task',\n Service = 'service',\n Send = 'send',\n Receive = 'receive',\n User = 'user',\n Manual = 'manual',\n BusinessRule = 'business-rule',\n Script = 'script',\n Subprocess = 'sub-process',\n Call = 'call'\n}\n\nregisterEnumType(ActivityType, {\n name: 'ActivityType',\n description: 'type enumeration of a activity'\n})\n\nexport enum ActivityUIType {\n Generated = 'generated',\n Template = 'template',\n Board = 'board',\n CustomElement = 'custom-element',\n Page = 'page',\n External = 'external'\n}\n\nregisterEnumType(ActivityUIType, {\n name: 'ActivityUIType',\n description: 'user-interface type enumeration of a activity'\n})\n\n@Entity()\n@Index('ix_activity_0', (activity: Activity) => [activity.domain, activity.name], { unique: true })\n@Index('ix_activity_1', (activity: Activity) => [activity.domain, activity.state, activity.priority], { unique: false })\n@ObjectType({ description: 'Entity for Activity' })\nexport class Activity {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true })\n domain?: Domain\n\n @RelationId((activity: Activity) => activity.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivitySearchKeyItem], { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ActivityModelItem], { nullable: true })\n model?: ActivityModelItem[]\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n priority?: number = 1\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Whether the task can be started arbitrarily by a user with privileges.' })\n startable?: boolean\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n timezone?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n standardTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n cycleTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n tactTime?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n leadTime?: number\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true })\n issuerRole?: Role\n\n @RelationId((activity: Activity) => activity.issuerRole)\n issuerRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true, description: 'Roles eligible to pick up activity from the activity bank.' })\n assigneeRole?: Role\n\n @RelationId((activity: Activity) => activity.assigneeRole)\n assigneeRoleId?: string\n\n @ManyToOne(type => Role, { nullable: true })\n @Field(type => Role, { nullable: true, description: 'The final authority on a given activity.' })\n supervisoryRole?: Role\n\n @RelationId((activity: Activity) => activity.supervisoryRole)\n supervisoryRoleId?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => [AssigneeItem], { nullable: true, description: 'Who to resolve for the activity.' })\n assignees?: AssigneeItem[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => [ApprovalLineItem], {\n nullable: true,\n description: 'Approval line for handling the activity.'\n })\n approvalLine?: ApprovalLineItem[]\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of UI to be shown when a task is performed' })\n uiType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n uiSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of view to be shown when a task is approved' })\n viewType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n viewSource?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of report to be shown when a task is approved' })\n reportType?: ActivityUIType\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n reportSource?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User assigned to the client application' })\n client?: User\n\n @RelationId((activity: Activity) => activity.creator)\n clientId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((activity: Activity) => activity.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((activity: Activity) => activity.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const typeorm_1 = require("typeorm");
|
|
6
6
|
const shell_1 = require("@things-factory/shell");
|
|
7
7
|
const activity_approval_1 = require("./activity-approval");
|
|
8
|
-
const call_webhook_1 = require("../../controllers/call-webhook");
|
|
8
|
+
const call_webhook_1 = require("../../controllers/activity-installation/call-webhook");
|
|
9
9
|
let ActivityApprovalSubscriber = class ActivityApprovalSubscriber {
|
|
10
10
|
listenTo() {
|
|
11
11
|
return activity_approval_1.ActivityApproval;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/activity-approval/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAE9F,iDAAsD;AAEtD,2DAAsD;AACtD,
|
|
1
|
+
{"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/activity-approval/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAE9F,iDAAsD;AAEtD,2DAAsD;AACtD,uFAAkF;AAG3E,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACrC,QAAQ;QACN,OAAO,oCAAgB,CAAA;IACzB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAoC;QACpD,MAAM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import { Domain, pubsub } from '@things-factory/shell'\n\nimport { ActivityApproval } from './activity-approval'\nimport { callWebhook } from '../../controllers/activity-installation/call-webhook'\n\n@EventSubscriber()\nexport class ActivityApprovalSubscriber implements EntitySubscriberInterface<ActivityApproval> {\n listenTo() {\n return ActivityApproval\n }\n\n async afterInsert(event: InsertEvent<ActivityApproval>): Promise<any | void> {\n const { manager: tx, entity } = event\n const activityApproval = await tx.getRepository(ActivityApproval).findOne({\n where: { id: entity.id },\n relations: ['domain', 'activityThread']\n })\n\n pubsub.publish('activity-approval', {\n activityApproval\n })\n\n try {\n callWebhook(activityApproval.domain, 'activity-approval-created', activityApproval, tx)\n } catch (err) {}\n }\n\n async afterUpdate(event: UpdateEvent<ActivityApproval>): Promise<any | void> {\n const { manager: tx, entity } = event\n const activityApproval = await tx.getRepository(ActivityApproval).findOne({\n where: { id: entity.id },\n relations: ['domain', 'activityThread']\n })\n\n pubsub.publish('activity-approval', {\n activityApproval\n })\n\n try {\n callWebhook(activityApproval.domain, 'activity-approval-updated', activityApproval, tx)\n } catch (err) {}\n }\n}\n"]}
|
|
@@ -16,8 +16,22 @@ const DATABASE_TYPE = ORMCONFIG.type;
|
|
|
16
16
|
let ActivityInstanceHistory = class ActivityInstanceHistory {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.version = 1;
|
|
19
|
+
this.key01 = '';
|
|
20
|
+
this.key02 = '';
|
|
21
|
+
this.key03 = '';
|
|
22
|
+
this.key04 = '';
|
|
23
|
+
this.key05 = '';
|
|
19
24
|
this.priority = 1;
|
|
20
25
|
}
|
|
26
|
+
isDelegatable() {
|
|
27
|
+
switch (this.state) {
|
|
28
|
+
case activity_instance_1.ActivityInstanceStatus.Posted:
|
|
29
|
+
case activity_instance_1.ActivityInstanceStatus.Assigned:
|
|
30
|
+
return true;
|
|
31
|
+
default:
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
21
35
|
};
|
|
22
36
|
tslib_1.__decorate([
|
|
23
37
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
@@ -61,6 +75,31 @@ tslib_1.__decorate([
|
|
|
61
75
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
76
|
tslib_1.__metadata("design:type", String)
|
|
63
77
|
], ActivityInstanceHistory.prototype, "adhocType", void 0);
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
|
80
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
81
|
+
tslib_1.__metadata("design:type", String)
|
|
82
|
+
], ActivityInstanceHistory.prototype, "key01", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
|
85
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
86
|
+
tslib_1.__metadata("design:type", String)
|
|
87
|
+
], ActivityInstanceHistory.prototype, "key02", void 0);
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
|
90
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
92
|
+
], ActivityInstanceHistory.prototype, "key03", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
|
95
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
96
|
+
tslib_1.__metadata("design:type", String)
|
|
97
|
+
], ActivityInstanceHistory.prototype, "key04", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ nullable: true, default: '' }),
|
|
100
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
101
|
+
tslib_1.__metadata("design:type", String)
|
|
102
|
+
], ActivityInstanceHistory.prototype, "key05", void 0);
|
|
64
103
|
tslib_1.__decorate([
|
|
65
104
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
66
105
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -154,6 +193,11 @@ tslib_1.__decorate([
|
|
|
154
193
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
155
194
|
tslib_1.__metadata("design:type", Date)
|
|
156
195
|
], ActivityInstanceHistory.prototype, "updatedAt", void 0);
|
|
196
|
+
tslib_1.__decorate([
|
|
197
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
198
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
199
|
+
tslib_1.__metadata("design:type", Date)
|
|
200
|
+
], ActivityInstanceHistory.prototype, "issuedAt", void 0);
|
|
157
201
|
tslib_1.__decorate([
|
|
158
202
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
159
203
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
@@ -187,6 +231,15 @@ tslib_1.__decorate([
|
|
|
187
231
|
(0, typeorm_1.RelationId)((activityInstance) => activityInstance.updater),
|
|
188
232
|
tslib_1.__metadata("design:type", String)
|
|
189
233
|
], ActivityInstanceHistory.prototype, "updaterId", void 0);
|
|
234
|
+
tslib_1.__decorate([
|
|
235
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
236
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
237
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
238
|
+
], ActivityInstanceHistory.prototype, "issuer", void 0);
|
|
239
|
+
tslib_1.__decorate([
|
|
240
|
+
(0, typeorm_1.RelationId)((activityInstance) => activityInstance.issuer),
|
|
241
|
+
tslib_1.__metadata("design:type", String)
|
|
242
|
+
], ActivityInstanceHistory.prototype, "issuerId", void 0);
|
|
190
243
|
tslib_1.__decorate([
|
|
191
244
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
192
245
|
(0, type_graphql_1.Field)({ nullable: true }),
|