@things-factory/worklist 6.0.28 → 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/pages/activity/activity-list-page.ts +48 -0
- package/client/pages/activity/activity-partial-view.ts +3 -0
- package/client/pages/activity-approval/activity-approval-page.ts +6 -6
- package/client/pages/activity-template/activity-template-list-page.ts +28 -0
- package/client/pages/installable-activity/installable-activity-list-page.ts +28 -0
- package/client/pages/todo/approval-waiting-list-page.ts +7 -7
- package/client/pages/todo/done-list-page.ts +344 -0
- package/client/route.ts +4 -0
- package/client/types/activity.ts +6 -0
- package/dist-client/pages/activity/activity-list-page.js +48 -0
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-partial-view.js +1 -1
- package/dist-client/pages/activity/activity-partial-view.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-template/activity-template-list-page.js +28 -0
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/installable-activity/installable-activity-list-page.js +28 -0
- package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
- package/dist-client/pages/todo/approval-waiting-list-page.js +7 -7
- 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/route.d.ts +1 -1
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/types/activity.d.ts +3 -0
- package/dist-client/types/activity.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +6 -1
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +2 -2
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/common.js +11 -3
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +23 -1
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +24 -0
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +17 -2
- package/dist-server/service/activity/activity.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 +10 -0
- package/dist-server/service/activity-instance/activity-instance.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/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/server/controllers/activity-instance/draft.ts +4 -2
- package/server/controllers/activity-instance/post.ts +2 -2
- package/server/service/activity/activity-history.ts +19 -1
- package/server/service/activity/activity-type.ts +18 -0
- package/server/service/activity/activity.ts +14 -2
- package/server/service/activity-instance/activity-instance-type.ts +12 -0
- package/server/service/activity-instance/activity-instance.ts +8 -0
- package/server/service/activity-thread/activity-thread-query.ts +24 -0
- package/things-factory.config.js +1 -0
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/dist-client/types.d.ts +0 -19
- package/dist-client/types.js +0 -38
- package/dist-client/types.js.map +0 -1
- package/dist-server/controllers/activity-extension-controller.js +0 -11
- package/dist-server/controllers/activity-extension-controller.js.map +0 -1
- package/dist-server/controllers/activity-installation/callback-registry.js +0 -21
- package/dist-server/controllers/activity-installation/callback-registry.js.map +0 -1
- package/dist-server/controllers/activity-installation-controller.js +0 -17
- package/dist-server/controllers/activity-installation-controller.js.map +0 -1
- package/dist-server/controllers/call-webhook.js +0 -41
- package/dist-server/controllers/call-webhook.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/worklist",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.32",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,12 +27,13 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@operato/graphql": "^1.0.0",
|
|
29
29
|
"@operato/grist-editor": "^1.0.0",
|
|
30
|
-
"@things-factory/attachment-base": "^6.0.
|
|
31
|
-
"@things-factory/auth-base": "^6.0.
|
|
32
|
-
"@things-factory/board-service": "^6.0.
|
|
33
|
-
"@things-factory/context-ui": "^6.0.
|
|
34
|
-
"@things-factory/organization": "^6.0.
|
|
35
|
-
"@things-factory/shell": "^6.0.
|
|
30
|
+
"@things-factory/attachment-base": "^6.0.32",
|
|
31
|
+
"@things-factory/auth-base": "^6.0.32",
|
|
32
|
+
"@things-factory/board-service": "^6.0.32",
|
|
33
|
+
"@things-factory/context-ui": "^6.0.32",
|
|
34
|
+
"@things-factory/organization": "^6.0.32",
|
|
35
|
+
"@things-factory/shell": "^6.0.32",
|
|
36
|
+
"moment-timezone": "^0.5.40"
|
|
36
37
|
},
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "1b7b1eb2d2e1c0823ec69ee8160790c5da62072c"
|
|
38
39
|
}
|
|
@@ -64,8 +64,10 @@ export async function draft(
|
|
|
64
64
|
|
|
65
65
|
return await tx.getRepository(ActivityInstance).save({
|
|
66
66
|
activityType: activity.activityType,
|
|
67
|
-
uiType: activity.uiType,
|
|
68
|
-
uiSource: activity.uiSource,
|
|
67
|
+
// uiType: activity.uiType,
|
|
68
|
+
// uiSource: activity.uiSource,
|
|
69
|
+
// viewType: activity.viewType,
|
|
70
|
+
// viewSource: activity.viewSource,
|
|
69
71
|
assigneeRole: activity.assigneeRole,
|
|
70
72
|
supervisoryRole: activity.supervisoryRole,
|
|
71
73
|
...activityInstance,
|
|
@@ -52,8 +52,8 @@ export async function post(
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
activityInstance.activityType = activity.activityType
|
|
55
|
-
activityInstance.uiType = activity.uiType
|
|
56
|
-
activityInstance.uiSource = activity.uiSource
|
|
55
|
+
// activityInstance.uiType = activity.uiType
|
|
56
|
+
// activityInstance.uiSource = activity.uiSource
|
|
57
57
|
activityInstance.assigneeRole = activity.assigneeRole
|
|
58
58
|
activityInstance.supervisoryRole = activity.supervisoryRole
|
|
59
59
|
|
|
@@ -75,6 +75,16 @@ export class ActivityHistory implements HistoryEntityInterface<Activity> {
|
|
|
75
75
|
@Field({ nullable: true })
|
|
76
76
|
startable?: boolean
|
|
77
77
|
|
|
78
|
+
@Column({
|
|
79
|
+
nullable: true
|
|
80
|
+
})
|
|
81
|
+
@Field({ nullable: true })
|
|
82
|
+
schedule?: string
|
|
83
|
+
|
|
84
|
+
@Column({ nullable: true })
|
|
85
|
+
@Field({ nullable: true })
|
|
86
|
+
timezone?: string
|
|
87
|
+
|
|
78
88
|
@Column({ nullable: true })
|
|
79
89
|
@Field({ nullable: true })
|
|
80
90
|
standardTime?: number
|
|
@@ -124,15 +134,23 @@ export class ActivityHistory implements HistoryEntityInterface<Activity> {
|
|
|
124
134
|
approvalLine?: ApprovalLineItem[]
|
|
125
135
|
|
|
126
136
|
@Column({ nullable: true })
|
|
127
|
-
@Field({ nullable: true })
|
|
137
|
+
@Field({ nullable: true, description: 'The type of UI to be shown when a task is performed' })
|
|
128
138
|
uiType?: ActivityUIType
|
|
129
139
|
|
|
130
140
|
@Column({ nullable: true })
|
|
131
141
|
@Field({ nullable: true })
|
|
132
142
|
uiSource?: string
|
|
133
143
|
|
|
144
|
+
@Column({ nullable: true })
|
|
145
|
+
@Field({ nullable: true, description: 'The type of view to be shown when a task is approved' })
|
|
146
|
+
viewType?: ActivityUIType
|
|
147
|
+
|
|
134
148
|
@Column({ nullable: true })
|
|
135
149
|
@Field({ nullable: true })
|
|
150
|
+
viewSource?: string
|
|
151
|
+
|
|
152
|
+
@Column({ nullable: true })
|
|
153
|
+
@Field({ nullable: true, description: 'The type of report to be shown when a task is approved' })
|
|
136
154
|
reportType?: ActivityUIType
|
|
137
155
|
|
|
138
156
|
@Column({ nullable: true })
|
|
@@ -39,6 +39,9 @@ export class NewActivity {
|
|
|
39
39
|
@Field({ nullable: true })
|
|
40
40
|
schedule?: string
|
|
41
41
|
|
|
42
|
+
@Field({ nullable: true })
|
|
43
|
+
timezone?: string
|
|
44
|
+
|
|
42
45
|
@Field({ nullable: true })
|
|
43
46
|
standardTime?: number
|
|
44
47
|
|
|
@@ -72,6 +75,12 @@ export class NewActivity {
|
|
|
72
75
|
@Field({ nullable: true })
|
|
73
76
|
uiSource?: string
|
|
74
77
|
|
|
78
|
+
@Field({ nullable: true })
|
|
79
|
+
viewType?: ActivityUIType
|
|
80
|
+
|
|
81
|
+
@Field({ nullable: true })
|
|
82
|
+
viewSource?: string
|
|
83
|
+
|
|
75
84
|
@Field({ nullable: true })
|
|
76
85
|
reportType?: ActivityUIType
|
|
77
86
|
|
|
@@ -117,6 +126,9 @@ export class ActivityPatch {
|
|
|
117
126
|
@Field({ nullable: true })
|
|
118
127
|
schedule?: string
|
|
119
128
|
|
|
129
|
+
@Field({ nullable: true })
|
|
130
|
+
timezone?: string
|
|
131
|
+
|
|
120
132
|
@Field({ nullable: true })
|
|
121
133
|
standardTime?: number
|
|
122
134
|
|
|
@@ -150,6 +162,12 @@ export class ActivityPatch {
|
|
|
150
162
|
@Field({ nullable: true })
|
|
151
163
|
uiSource?: string
|
|
152
164
|
|
|
165
|
+
@Field({ nullable: true })
|
|
166
|
+
viewType?: ActivityUIType
|
|
167
|
+
|
|
168
|
+
@Field({ nullable: true })
|
|
169
|
+
viewSource?: string
|
|
170
|
+
|
|
153
171
|
@Field({ nullable: true })
|
|
154
172
|
reportType?: ActivityUIType
|
|
155
173
|
|
|
@@ -111,7 +111,7 @@ export class Activity {
|
|
|
111
111
|
priority?: number = 1
|
|
112
112
|
|
|
113
113
|
@Column({ nullable: true })
|
|
114
|
-
@Field({ nullable: true })
|
|
114
|
+
@Field({ nullable: true, description: 'Whether the task can be started arbitrarily by a user with privileges.' })
|
|
115
115
|
startable?: boolean
|
|
116
116
|
|
|
117
117
|
@Column({
|
|
@@ -120,6 +120,10 @@ export class Activity {
|
|
|
120
120
|
@Field({ nullable: true })
|
|
121
121
|
schedule?: string
|
|
122
122
|
|
|
123
|
+
@Column({ nullable: true })
|
|
124
|
+
@Field({ nullable: true })
|
|
125
|
+
timezone?: string
|
|
126
|
+
|
|
123
127
|
@Column({ nullable: true })
|
|
124
128
|
@Field({ nullable: true })
|
|
125
129
|
standardTime?: number
|
|
@@ -169,15 +173,23 @@ export class Activity {
|
|
|
169
173
|
approvalLine?: ApprovalLineItem[]
|
|
170
174
|
|
|
171
175
|
@Column({ nullable: true })
|
|
172
|
-
@Field({ nullable: true })
|
|
176
|
+
@Field({ nullable: true, description: 'The type of UI to be shown when a task is performed' })
|
|
173
177
|
uiType?: ActivityUIType
|
|
174
178
|
|
|
175
179
|
@Column({ nullable: true })
|
|
176
180
|
@Field({ nullable: true })
|
|
177
181
|
uiSource?: string
|
|
178
182
|
|
|
183
|
+
@Column({ nullable: true })
|
|
184
|
+
@Field({ nullable: true, description: 'The type of view to be shown when a task is approved' })
|
|
185
|
+
viewType?: ActivityUIType
|
|
186
|
+
|
|
179
187
|
@Column({ nullable: true })
|
|
180
188
|
@Field({ nullable: true })
|
|
189
|
+
viewSource?: string
|
|
190
|
+
|
|
191
|
+
@Column({ nullable: true })
|
|
192
|
+
@Field({ nullable: true, description: 'The type of report to be shown when a task is approved' })
|
|
181
193
|
reportType?: ActivityUIType
|
|
182
194
|
|
|
183
195
|
@Column({ nullable: true })
|
|
@@ -50,6 +50,12 @@ export class NewActivityInstance {
|
|
|
50
50
|
@Field({ nullable: true })
|
|
51
51
|
uiSource?: string
|
|
52
52
|
|
|
53
|
+
@Field({ nullable: true })
|
|
54
|
+
viewType?: ActivityUIType
|
|
55
|
+
|
|
56
|
+
@Field({ nullable: true })
|
|
57
|
+
viewSource?: string
|
|
58
|
+
|
|
53
59
|
@Field(type => ObjectRef, { nullable: true })
|
|
54
60
|
supervisoryRole?: Role
|
|
55
61
|
|
|
@@ -110,6 +116,12 @@ export class ActivityInstancePost {
|
|
|
110
116
|
@Field({ nullable: true })
|
|
111
117
|
uiSource?: string
|
|
112
118
|
|
|
119
|
+
@Field({ nullable: true })
|
|
120
|
+
viewType?: ActivityUIType
|
|
121
|
+
|
|
122
|
+
@Field({ nullable: true })
|
|
123
|
+
viewSource?: string
|
|
124
|
+
|
|
113
125
|
@Field(type => ObjectRef, { nullable: true })
|
|
114
126
|
supervisoryRole?: Role
|
|
115
127
|
|
|
@@ -123,6 +123,14 @@ export class ActivityInstance {
|
|
|
123
123
|
@Field({ nullable: true })
|
|
124
124
|
uiSource?: string
|
|
125
125
|
|
|
126
|
+
@Column({ nullable: true })
|
|
127
|
+
@Field({ nullable: true })
|
|
128
|
+
viewType?: ActivityUIType
|
|
129
|
+
|
|
130
|
+
@Column({ nullable: true })
|
|
131
|
+
@Field({ nullable: true })
|
|
132
|
+
viewSource?: string
|
|
133
|
+
|
|
126
134
|
@Column({ nullable: true, default: 1 })
|
|
127
135
|
@Field({ nullable: true })
|
|
128
136
|
priority?: number = 1
|
|
@@ -66,6 +66,30 @@ export class ActivityThreadQuery {
|
|
|
66
66
|
return { items, total }
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
@Query(returns => ActivityThreadList, { description: 'To fetch the tasks(ActivityThreads) which has done by me' })
|
|
70
|
+
async doneList(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ActivityThreadList> {
|
|
71
|
+
var { domain, user } = context.state
|
|
72
|
+
|
|
73
|
+
const status = [ActivityThreadStatus.Ended, ActivityThreadStatus.Aborted]
|
|
74
|
+
|
|
75
|
+
const [items, total] = await getQueryBuilderFromListParams({
|
|
76
|
+
repository: getRepository(ActivityThread),
|
|
77
|
+
params,
|
|
78
|
+
domain,
|
|
79
|
+
alias: 'at',
|
|
80
|
+
searchables: ['name', 'description'],
|
|
81
|
+
filtersMap: {
|
|
82
|
+
name: { columnName: 'name', relationColumn: 'activityInstance' },
|
|
83
|
+
description: { columnName: 'description', relationColumn: 'activityInstance' }
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
.andWhere('at.state IN (:...status)', { status })
|
|
87
|
+
.andWhere('at.assignee = :user', { user: user.id })
|
|
88
|
+
.getManyAndCount()
|
|
89
|
+
|
|
90
|
+
return { items, total }
|
|
91
|
+
}
|
|
92
|
+
|
|
69
93
|
@FieldResolver(type => User)
|
|
70
94
|
async assignee(@Root() activityThread: ActivityThread): Promise<User> {
|
|
71
95
|
return activityThread.assigneeId
|
package/things-factory.config.js
CHANGED
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
{ tagname: 'pickable-list-page', page: 'pickable-list' },
|
|
11
11
|
{ tagname: 'assigned-list-page', page: 'assigned-list' },
|
|
12
12
|
{ tagname: 'todo-list-page', page: 'todo-list' },
|
|
13
|
+
{ tagname: 'done-list-page', page: 'done-list' },
|
|
13
14
|
{ tagname: 'approval-waiting-list-page', page: 'approval-waiting-list' },
|
|
14
15
|
{ tagname: 'draft-list-page', page: 'draft-list' },
|
|
15
16
|
{ tagname: 'starter-list-page', page: 'starter-list' },
|
package/translations/en.json
CHANGED
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"field.spec": "spec",
|
|
38
38
|
"field.standard-time": "ST(sec)",
|
|
39
39
|
"field.startable": "startable",
|
|
40
|
+
"field.started-at": "started at",
|
|
40
41
|
"field.status": "status",
|
|
41
42
|
"field.supervisory-role": "supervisory role",
|
|
42
43
|
"field.tact-time": "TT(sec)",
|
|
43
44
|
"field.tag": "tag name",
|
|
45
|
+
"field.terminated-at": "terminated at",
|
|
44
46
|
"field.ui-type": "UI type",
|
|
45
47
|
"field.ui-source": "UI source",
|
|
46
48
|
"field.unit": "unit",
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"title.activity template list": "activity template list",
|
|
75
77
|
"title.approval waiting list": "approval waiting list",
|
|
76
78
|
"title.assigned list": "assigned list",
|
|
79
|
+
"title.done list": "done list",
|
|
77
80
|
"title.draft list": "draft list",
|
|
78
81
|
"title.installable activity list": "installable activity list",
|
|
79
82
|
"title.todo list": "todo list"
|
package/translations/ko.json
CHANGED
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"field.spec": "명세",
|
|
38
38
|
"field.standard-time": "ST(초)",
|
|
39
39
|
"field.startable": "시작 가능 업무",
|
|
40
|
+
"field.started-at": "시작 시간",
|
|
40
41
|
"field.status": "상태",
|
|
41
42
|
"field.supervisory-role": "관리자 역할",
|
|
42
43
|
"field.tact-time": "TT(초)",
|
|
43
44
|
"field.tag": "태그이름",
|
|
45
|
+
"field.terminated-at": "완료 시간",
|
|
44
46
|
"field.ui-type": "화면 타입",
|
|
45
47
|
"field.ui-source": "화면 소스",
|
|
46
48
|
"field.unit": "단위",
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"title.activity template list": "업무 템플릿",
|
|
75
77
|
"title.approval waiting list": "승인 대기 리스트",
|
|
76
78
|
"title.assigned list": "나의 연관 업무 현황",
|
|
79
|
+
"title.done list": "완료한 업무",
|
|
77
80
|
"title.draft list": "작성중인 업무",
|
|
78
81
|
"title.installable activity list": "설치 가능 업무",
|
|
79
82
|
"title.todo list": "나의 할일 리스트"
|
package/translations/ms.json
CHANGED
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"field.spec": "spec",
|
|
38
38
|
"field.standard-time": "ST(sec)",
|
|
39
39
|
"field.startable": "startable",
|
|
40
|
+
"field.started-at": "[ms] started at",
|
|
40
41
|
"field.status": "keadaan",
|
|
41
42
|
"field.supervisory-role": "supervisory role",
|
|
42
43
|
"field.tact-time": "TT(sec)",
|
|
43
44
|
"field.tag": "[ms] tag name",
|
|
45
|
+
"field.terminated-at": "[ms] terminated at",
|
|
44
46
|
"field.ui-type": "UI type",
|
|
45
47
|
"field.ui-source": "UI source",
|
|
46
48
|
"field.unit": "[ms] unit",
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"title.activity template list": "activity template list",
|
|
75
77
|
"title.approval waiting list": "approval waiting list",
|
|
76
78
|
"title.assigned list": "assigned list",
|
|
79
|
+
"title.done list": "done list",
|
|
77
80
|
"title.draft list": "draft list",
|
|
78
81
|
"title.installable activity list": "installable activity list",
|
|
79
82
|
"title.todo list": "todo list"
|
package/translations/zh.json
CHANGED
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"field.report-source": "report source",
|
|
38
38
|
"field.standard-time": "ST(sec)",
|
|
39
39
|
"field.startable": "startable",
|
|
40
|
+
"field.started-at": "[zh] started at",
|
|
40
41
|
"field.status": "状态",
|
|
41
42
|
"field.supervisory-role": "supervisory role",
|
|
42
43
|
"field.tact-time": "TT(sec)",
|
|
43
44
|
"field.tag": "[zh] tag name",
|
|
45
|
+
"field.terminated-at": "[zh] terminated at",
|
|
44
46
|
"field.ui-type": "UI type",
|
|
45
47
|
"field.ui-source": "UI source",
|
|
46
48
|
"field.unit": "[zh] unit",
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"title.activity template list": "activity template list",
|
|
75
77
|
"title.approval waiting list": "approval waiting list",
|
|
76
78
|
"title.assigned list": "assigned list",
|
|
79
|
+
"title.done list": "done list",
|
|
77
80
|
"title.draft list": "draft list",
|
|
78
81
|
"title.installable activity list": "installable activity list",
|
|
79
82
|
"title.todo list": "todo list"
|
package/dist-client/types.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export const ActivityInstanceStatus: {
|
|
2
|
-
display: string;
|
|
3
|
-
value: string;
|
|
4
|
-
}[];
|
|
5
|
-
export const Priorities: ({
|
|
6
|
-
display: string;
|
|
7
|
-
value: string;
|
|
8
|
-
} | {
|
|
9
|
-
display: string;
|
|
10
|
-
value: number;
|
|
11
|
-
})[];
|
|
12
|
-
export const ActivityUITypes: {
|
|
13
|
-
display: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}[];
|
|
16
|
-
export const ActivityTypes: {
|
|
17
|
-
display: string;
|
|
18
|
-
value: string;
|
|
19
|
-
}[];
|
package/dist-client/types.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export const ActivityInstanceStatus = [
|
|
2
|
-
{ display: '', value: '' },
|
|
3
|
-
{ display: 'posted', value: 'posted' },
|
|
4
|
-
{ display: 'Assigned', value: 'assigned' },
|
|
5
|
-
{ display: 'Started', value: 'started' },
|
|
6
|
-
{ display: 'Ended', value: 'ended' },
|
|
7
|
-
{ display: 'Aborted', value: 'aborted' }
|
|
8
|
-
];
|
|
9
|
-
export const Priorities = [
|
|
10
|
-
{ display: '', value: '' },
|
|
11
|
-
{ display: 'Emergency', value: 3 },
|
|
12
|
-
{ display: 'Important', value: 2 },
|
|
13
|
-
{ display: 'Normal', value: 1 },
|
|
14
|
-
{ display: 'Low', value: 0 }
|
|
15
|
-
];
|
|
16
|
-
export const ActivityUITypes = [
|
|
17
|
-
{ display: '', value: '' },
|
|
18
|
-
{ display: 'Generated', value: 'generated' },
|
|
19
|
-
{ display: 'Template', value: 'template' },
|
|
20
|
-
{ display: 'Board', value: 'board' },
|
|
21
|
-
{ display: 'CustomElement', value: 'custom-element' },
|
|
22
|
-
{ display: 'Page', value: 'page' },
|
|
23
|
-
{ display: 'External URL', value: 'external' }
|
|
24
|
-
];
|
|
25
|
-
export const ActivityTypes = [
|
|
26
|
-
{ display: '', value: '' },
|
|
27
|
-
{ display: 'Task', value: 'task' },
|
|
28
|
-
{ display: 'Service', value: 'service' },
|
|
29
|
-
{ display: 'Send', value: 'send' },
|
|
30
|
-
{ display: 'Receive', value: 'receive' },
|
|
31
|
-
{ display: 'User', value: 'user' },
|
|
32
|
-
{ display: 'Manual', value: 'manual' },
|
|
33
|
-
{ display: 'BusinessRule', value: 'business-rule' },
|
|
34
|
-
{ display: 'Script', value: 'script' },
|
|
35
|
-
{ display: 'Subprocess', value: 'sub-process' },
|
|
36
|
-
{ display: 'Call', value: 'call' }
|
|
37
|
-
];
|
|
38
|
-
//# sourceMappingURL=types.js.map
|
package/dist-client/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../client/types.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1B,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IAC1C,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACpC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CACzC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1B,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE;IAClC,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE;IAClC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;IAC/B,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;CAC7B,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1B,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IAC5C,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IAC1C,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACpC,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAClC,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE;CAC/C,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1B,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAClC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAClC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAClC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtC,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE;IACnD,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtC,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE;IAC/C,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CACnC,CAAA","sourcesContent":["export const ActivityInstanceStatus = [\n { display: '', value: '' },\n { display: 'posted', value: 'posted' },\n { display: 'Assigned', value: 'assigned' },\n { display: 'Started', value: 'started' },\n { display: 'Ended', value: 'ended' },\n { display: 'Aborted', value: 'aborted' }\n]\n\nexport const Priorities = [\n { display: '', value: '' },\n { display: 'Emergency', value: 3 },\n { display: 'Important', value: 2 },\n { display: 'Normal', value: 1 },\n { display: 'Low', value: 0 }\n]\n\nexport const ActivityUITypes = [\n { display: '', value: '' },\n { display: 'Generated', value: 'generated' },\n { display: 'Template', value: 'template' },\n { display: 'Board', value: 'board' },\n { display: 'CustomElement', value: 'custom-element' },\n { display: 'Page', value: 'page' },\n { display: 'External URL', value: 'external' }\n]\n\nexport const ActivityTypes = [\n { display: '', value: '' },\n { display: 'Task', value: 'task' },\n { display: 'Service', value: 'service' },\n { display: 'Send', value: 'send' },\n { display: 'Receive', value: 'receive' },\n { display: 'User', value: 'user' },\n { display: 'Manual', value: 'manual' },\n { display: 'BusinessRule', value: 'business-rule' },\n { display: 'Script', value: 'script' },\n { display: 'Subprocess', value: 'sub-process' },\n { display: 'Call', value: 'call' }\n]\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActivityExtensionController = void 0;
|
|
4
|
-
class ActivityExtensionController {
|
|
5
|
-
static registerActivityExtensionType(type, controller) {
|
|
6
|
-
ActivityExtensionController.types[type] = controller;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.ActivityExtensionController = ActivityExtensionController;
|
|
10
|
-
ActivityExtensionController.types = {};
|
|
11
|
-
//# sourceMappingURL=activity-extension-controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-extension-controller.js","sourceRoot":"","sources":["../../server/controllers/activity-extension-controller.ts"],"names":[],"mappings":";;;AAMA,MAAa,2BAA2B;IAEtC,MAAM,CAAC,6BAA6B,CAAC,IAAY,EAAE,UAAuC;QACxF,2BAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAAA;IACtD,CAAC;;AAJH,kEAKC;AAJQ,iCAAK,GAAG,EAAE,CAAA","sourcesContent":["import { Activity } from '../service/activity/activity'\n\nexport interface ActivityProvider {\n getActivity(id: string): Activity\n}\n\nexport class ActivityExtensionController {\n static types = {}\n static registerActivityExtensionType(type: string, controller: ActivityExtensionController) {\n ActivityExtensionController.types[type] = controller\n }\n}\n"]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CallbackSystem = void 0;
|
|
4
|
-
class CallbackSystem {
|
|
5
|
-
static register(name, callback) {
|
|
6
|
-
CallbackSystem.registry[name] = callback;
|
|
7
|
-
}
|
|
8
|
-
static unregister(name) {
|
|
9
|
-
delete CallbackSystem.registry[name];
|
|
10
|
-
}
|
|
11
|
-
static callback(name, content) {
|
|
12
|
-
const callback = CallbackSystem.registry[name];
|
|
13
|
-
if (!callback) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
callback.callback(content);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.CallbackSystem = CallbackSystem;
|
|
20
|
-
CallbackSystem.registry = {};
|
|
21
|
-
//# sourceMappingURL=callback-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callback-registry.js","sourceRoot":"","sources":["../../../server/controllers/activity-installation/callback-registry.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAGzB,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,QAAa;QACzC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAA;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,IAAY;QAC5B,OAAO,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,OAAY;QACxC,MAAM,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC9C,IAAI,CAAC,QAAQ,EAAE;YACb,OAAM;SACP;QAED,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,CAAC;;AAlBH,wCAmBC;AAlBQ,uBAAQ,GAAG,EAAE,CAAA","sourcesContent":["export class CallbackSystem {\n static registry = {}\n\n static register(name: string, callback: any) {\n CallbackSystem.registry[name] = callback\n }\n\n static unregister(name: string) {\n delete CallbackSystem.registry[name]\n }\n\n static callback(name: string, content: any) {\n const callback = CallbackSystem.registry[name]\n if (!callback) {\n return\n }\n\n callback.callback(content)\n }\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActivityInstallations = void 0;
|
|
4
|
-
class ActivityInstallations {
|
|
5
|
-
static installActivityTemplate(template) {
|
|
6
|
-
ActivityInstallations.templates[template.name] = template;
|
|
7
|
-
}
|
|
8
|
-
static get(name) {
|
|
9
|
-
return ActivityInstallations.templates[name];
|
|
10
|
-
}
|
|
11
|
-
static list() {
|
|
12
|
-
return Object.values(ActivityInstallations.templates);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.ActivityInstallations = ActivityInstallations;
|
|
16
|
-
ActivityInstallations.templates = {};
|
|
17
|
-
//# sourceMappingURL=activity-installation-controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-installation-controller.js","sourceRoot":"","sources":["../../server/controllers/activity-installation-controller.ts"],"names":[],"mappings":";;;AAEA,MAAa,qBAAqB;IAGhC,MAAM,CAAC,uBAAuB,CAAC,QAA6B;QAC1D,qBAAqB,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAA;IAC3D,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,IAAY;QACrB,OAAO,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,CAAC,IAAI;QACT,OAAO,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAA;IACvD,CAAC;;AAbH,sDAcC;AAbQ,+BAAS,GAA4C,EAAE,CAAA","sourcesContent":["import { InstallableActivity } from '../service/installable-activity/installable-activity'\n\nexport class ActivityInstallations {\n static templates: { [name: string]: InstallableActivity } = {}\n\n static installActivityTemplate(template: InstallableActivity) {\n ActivityInstallations.templates[template.name] = template\n }\n\n static get(name: string): InstallableActivity {\n return ActivityInstallations.templates[name]\n }\n\n static list(): InstallableActivity[] {\n return Object.values(ActivityInstallations.templates)\n }\n}\n"]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callWebhook = void 0;
|
|
4
|
-
const auth_base_1 = require("@things-factory/auth-base");
|
|
5
|
-
const shell_1 = require("@things-factory/shell");
|
|
6
|
-
async function callWebhook(domain, tag, data, tx) {
|
|
7
|
-
/*
|
|
8
|
-
TODO webhook callback의 다양한 subscription 조건을 지원한다.
|
|
9
|
-
- activity의 client에 해당하는 application
|
|
10
|
-
- activityInstance의 starter에 해당하는 application
|
|
11
|
-
- 모든 이벤트를 받고자하는 application
|
|
12
|
-
- 특정 activity들의 이벤트를 받고자하는 application
|
|
13
|
-
*/
|
|
14
|
-
const applications = await (tx ? tx.getRepository(auth_base_1.Application) : (0, shell_1.getRepository)(auth_base_1.Application)).findBy({
|
|
15
|
-
domain: { id: domain.id }
|
|
16
|
-
});
|
|
17
|
-
const options = {
|
|
18
|
-
method: 'post',
|
|
19
|
-
headers: {
|
|
20
|
-
'x-things-factory-domain': domain.name,
|
|
21
|
-
'Content-Type': 'application/json'
|
|
22
|
-
},
|
|
23
|
-
body: {
|
|
24
|
-
tag,
|
|
25
|
-
data
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
try {
|
|
29
|
-
applications
|
|
30
|
-
.filter(app => app.webhook)
|
|
31
|
-
.every(app => {
|
|
32
|
-
const webhook = app.webhook;
|
|
33
|
-
fetch(webhook, options);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
catch (err) {
|
|
37
|
-
console.error(err);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.callWebhook = callWebhook;
|
|
41
|
-
//# sourceMappingURL=call-webhook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"call-webhook.js","sourceRoot":"","sources":["../../server/controllers/call-webhook.ts"],"names":[],"mappings":";;;AACA,yDAAuD;AACvD,iDAA6D;AAEtD,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,GAAW,EAAE,IAAS,EAAE,EAAkB;IAC1F;;;;;;MAME;IAEF,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,uBAAW,CAAC,CAAC,CAAC,CAAC,IAAA,qBAAa,EAAC,uBAAW,CAAC,CAAC,CAAC,MAAM,CAAC;QAClG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE;KAC1B,CAAC,CAAA;IACF,MAAM,OAAO,GAAG;QACd,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,yBAAyB,EAAE,MAAM,CAAC,IAAI;YACtC,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE;YACJ,GAAG;YACH,IAAI;SACE;KACT,CAAA;IAED,IAAI;QACF,YAAY;aACT,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;aAC1B,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;YAE3B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACzB,CAAC,CAAC,CAAA;KACL;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;KACnB;AACH,CAAC;AAnCD,kCAmCC","sourcesContent":["import { EntityManager } from 'typeorm'\nimport { Application } from '@things-factory/auth-base'\nimport { Domain, getRepository } from '@things-factory/shell'\n\nexport async function callWebhook(domain: Domain, tag: string, data: any, tx?: EntityManager) {\n /* \n TODO webhook callback의 다양한 subscription 조건을 지원한다. \n - activity의 client에 해당하는 application\n - activityInstance의 starter에 해당하는 application\n - 모든 이벤트를 받고자하는 application\n - 특정 activity들의 이벤트를 받고자하는 application\n */\n\n const applications = await (tx ? tx.getRepository(Application) : getRepository(Application)).findBy({\n domain: { id: domain.id }\n })\n const options = {\n method: 'post',\n headers: {\n 'x-things-factory-domain': domain.name,\n 'Content-Type': 'application/json'\n },\n body: {\n tag,\n data\n } as any\n }\n\n try {\n applications\n .filter(app => app.webhook)\n .every(app => {\n const webhook = app.webhook\n\n fetch(webhook, options)\n })\n } catch (err) {\n console.error(err)\n }\n}\n"]}
|