@things-factory/worklist-client 8.0.0 → 9.0.0-beta.3
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/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/client/bootstrap.ts +0 -1
- package/client/index.ts +0 -0
- package/client/pages/work-center/work-center-importer.ts +0 -87
- package/client/pages/work-center/work-center-list-page.ts +0 -323
- package/client/pages/work-center/work-center-page.ts +0 -95
- package/client/route.ts +0 -7
- package/client/tsconfig.json +0 -13
- package/server/controllers/activity-registry.ts +0 -17
- package/server/controllers/graphql-client.ts +0 -67
- package/server/controllers/index.ts +0 -4
- package/server/controllers/webhooks/decorators.ts +0 -18
- package/server/controllers/webhooks/index.ts +0 -30
- package/server/controllers/work-center/connect-work-center.ts +0 -15
- package/server/controllers/work-center/get-work-center.ts +0 -9
- package/server/controllers/work-center/index.ts +0 -2
- package/server/controllers/worklist-api/assign-activity-thread.ts +0 -3
- package/server/controllers/worklist-api/draft-activity-instance.ts +0 -3
- package/server/controllers/worklist-api/get-activity-list.ts +0 -3
- package/server/controllers/worklist-api/get-activity.ts +0 -3
- package/server/controllers/worklist-api/get-todo-list.ts +0 -4
- package/server/controllers/worklist-api/index.ts +0 -8
- package/server/controllers/worklist-api/register-activity.ts +0 -3
- package/server/controllers/worklist-api/unregister-activity.ts +0 -3
- package/server/controllers/worklist-api/update-activity.ts +0 -3
- package/server/index.ts +0 -3
- package/server/routes.ts +0 -46
- package/server/service/activity/activity-model-type.ts +0 -106
- package/server/service/activity/activity-mutation.ts +0 -85
- package/server/service/activity/activity-query.ts +0 -64
- package/server/service/activity/activity-type.ts +0 -134
- package/server/service/activity/activity.ts +0 -133
- package/server/service/activity/index.ts +0 -6
- package/server/service/index.ts +0 -36
- package/server/service/work-center/event-subscriber.ts +0 -17
- package/server/service/work-center/index.ts +0 -9
- package/server/service/work-center/work-center-history.ts +0 -120
- package/server/service/work-center/work-center-mutation.ts +0 -198
- package/server/service/work-center/work-center-query.ts +0 -65
- package/server/service/work-center/work-center-type.ts +0 -61
- package/server/service/work-center/work-center.ts +0 -75
- package/server/tsconfig.json +0 -10
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Domain, getRepository } from '@things-factory/shell'
|
|
2
|
-
import { Oauth2Client } from '@things-factory/oauth2-client'
|
|
3
|
-
|
|
4
|
-
export async function connectWorkCenter(domain: Domain) {
|
|
5
|
-
const client = await getRepository(Oauth2Client).findOneBy({
|
|
6
|
-
domain: { id: domain.id },
|
|
7
|
-
authUrl: 'https://gangsters.hatiolab.com/oauth/authorize'
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
if (client) {
|
|
11
|
-
return client
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// TODO else..
|
|
15
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Domain, getRepository } from '@things-factory/shell'
|
|
2
|
-
import { Oauth2Client } from '@things-factory/oauth2-client'
|
|
3
|
-
|
|
4
|
-
export async function getWorkCenter(domain: Domain): Promise<Oauth2Client> {
|
|
5
|
-
return await getRepository(Oauth2Client).findOneBy({
|
|
6
|
-
domain: { id: domain.id },
|
|
7
|
-
authUrl: 'https://gangsters.hatiolab.com/oauth/authorize'
|
|
8
|
-
})
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './assign-activity-thread'
|
|
2
|
-
export * from './draft-activity-instance'
|
|
3
|
-
export * from './get-activity-list'
|
|
4
|
-
export * from './get-activity'
|
|
5
|
-
export * from './get-todo-list'
|
|
6
|
-
export * from './register-activity'
|
|
7
|
-
export * from './unregister-activity'
|
|
8
|
-
export * from './update-activity'
|
package/server/index.ts
DELETED
package/server/routes.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { WorklistWebhook } from './controllers/webhooks'
|
|
2
|
-
|
|
3
|
-
process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
|
|
4
|
-
globalPublicRouter.post('/worklist-client', async (context, next) => {
|
|
5
|
-
var { req } = context
|
|
6
|
-
var { tag, domain, data } = req
|
|
7
|
-
|
|
8
|
-
const center = WorklistWebhook.getWorkCenter(domain.id)
|
|
9
|
-
|
|
10
|
-
switch (tag) {
|
|
11
|
-
case 'activity-approval':
|
|
12
|
-
WorklistWebhook.onActivityApprovalUpdated(center, data)
|
|
13
|
-
break
|
|
14
|
-
case 'activity-thread':
|
|
15
|
-
WorklistWebhook.onActivityThreadUpdated(center, data)
|
|
16
|
-
break
|
|
17
|
-
case 'activity-instance':
|
|
18
|
-
WorklistWebhook.onActivityInstanceUpdated(center, data)
|
|
19
|
-
break
|
|
20
|
-
default:
|
|
21
|
-
WorklistWebhook.echo(center, data)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
context.type = 'text/plain'
|
|
25
|
-
context.status = 200
|
|
26
|
-
context.body = 'OK'
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
process.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {
|
|
31
|
-
/*
|
|
32
|
-
* can add global private routes to application (auth required, tenancy not required)
|
|
33
|
-
*/
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {
|
|
37
|
-
/*
|
|
38
|
-
* can add domain public routes to application (auth not required, tenancy required)
|
|
39
|
-
*/
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
process.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {
|
|
43
|
-
/*
|
|
44
|
-
* can add domain private routes to application (auth required, tenancy required)
|
|
45
|
-
*/
|
|
46
|
-
})
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { Field, InputType, Int, ObjectType, registerEnumType } from 'type-graphql'
|
|
2
|
-
|
|
3
|
-
import { ScalarObject } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
export enum ActivityModelItemInoutType {
|
|
6
|
-
in = 'in',
|
|
7
|
-
out = 'out',
|
|
8
|
-
inout = 'inout'
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
registerEnumType(ActivityModelItemInoutType, {
|
|
12
|
-
name: 'ActivityModelItemInoutType',
|
|
13
|
-
description: 'inout enumeration of a activity-model-item'
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export enum ActivityModelItemType {
|
|
17
|
-
number = 'number',
|
|
18
|
-
text = 'text',
|
|
19
|
-
textarea = 'textarea',
|
|
20
|
-
boolean = 'boolean',
|
|
21
|
-
select = 'select',
|
|
22
|
-
file = 'file'
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
registerEnumType(ActivityModelItemType, {
|
|
26
|
-
name: 'ActivityModelItemType',
|
|
27
|
-
description: 'data type enumeration of a activity-model-item'
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
@ObjectType({ description: 'Entity for ActivityModelItem' })
|
|
31
|
-
export class ActivityModelItem {
|
|
32
|
-
@Field()
|
|
33
|
-
name: string
|
|
34
|
-
|
|
35
|
-
@Field({ nullable: true })
|
|
36
|
-
description?: string
|
|
37
|
-
|
|
38
|
-
@Field({ nullable: true })
|
|
39
|
-
tag?: string
|
|
40
|
-
|
|
41
|
-
@Field({ nullable: true })
|
|
42
|
-
active?: boolean
|
|
43
|
-
|
|
44
|
-
@Field({ nullable: true })
|
|
45
|
-
hidden?: boolean
|
|
46
|
-
|
|
47
|
-
@Field({ nullable: true })
|
|
48
|
-
mandatory?: boolean
|
|
49
|
-
|
|
50
|
-
@Field(type => ActivityModelItemInoutType, { nullable: true })
|
|
51
|
-
inout?: ActivityModelItemInoutType
|
|
52
|
-
|
|
53
|
-
@Field({ nullable: true })
|
|
54
|
-
type?: ActivityModelItemType
|
|
55
|
-
|
|
56
|
-
@Field(type => ScalarObject, { nullable: true })
|
|
57
|
-
options?: { [option: string]: any }
|
|
58
|
-
|
|
59
|
-
@Field({ nullable: true })
|
|
60
|
-
unit?: string
|
|
61
|
-
|
|
62
|
-
@Field(type => [Int], { nullable: true })
|
|
63
|
-
quantifier: number[]
|
|
64
|
-
|
|
65
|
-
@Field(type => ScalarObject, { nullable: true })
|
|
66
|
-
spec?: { [key: string]: any }
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@InputType()
|
|
70
|
-
export class ActivityModelItemPatch {
|
|
71
|
-
@Field({ nullable: true })
|
|
72
|
-
name?: string
|
|
73
|
-
|
|
74
|
-
@Field({ nullable: true })
|
|
75
|
-
description?: string
|
|
76
|
-
|
|
77
|
-
@Field({ nullable: true })
|
|
78
|
-
tag?: string
|
|
79
|
-
|
|
80
|
-
@Field(type => ActivityModelItemInoutType, { nullable: true })
|
|
81
|
-
inout?: ActivityModelItemInoutType
|
|
82
|
-
|
|
83
|
-
@Field(type => ActivityModelItemType, { nullable: true })
|
|
84
|
-
type?: ActivityModelItemType
|
|
85
|
-
|
|
86
|
-
@Field(type => ScalarObject, { nullable: true })
|
|
87
|
-
options?: { [option: string]: any }
|
|
88
|
-
|
|
89
|
-
@Field({ nullable: true })
|
|
90
|
-
unit?: string
|
|
91
|
-
|
|
92
|
-
@Field(type => [Int], { nullable: true })
|
|
93
|
-
quantifier: number[]
|
|
94
|
-
|
|
95
|
-
@Field({ nullable: true })
|
|
96
|
-
active?: boolean
|
|
97
|
-
|
|
98
|
-
@Field({ nullable: true })
|
|
99
|
-
mandatory?: boolean
|
|
100
|
-
|
|
101
|
-
@Field({ nullable: true })
|
|
102
|
-
hidden?: boolean
|
|
103
|
-
|
|
104
|
-
@Field(type => ScalarObject, { nullable: true })
|
|
105
|
-
spec?: { [key: string]: any }
|
|
106
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'
|
|
2
|
-
|
|
3
|
-
import { Activity } from './activity'
|
|
4
|
-
import { ActivityPatch, NewActivity } from './activity-type'
|
|
5
|
-
|
|
6
|
-
@Resolver(Activity)
|
|
7
|
-
export class ActivityMutation {
|
|
8
|
-
@Directive('@transaction')
|
|
9
|
-
@Mutation(returns => Activity, { description: 'To create new Activity' })
|
|
10
|
-
async createActivity(@Arg('activity') activity: NewActivity, @Ctx() context: ResolverContext): Promise<Activity> {
|
|
11
|
-
const { domain, user, tx } = context.state
|
|
12
|
-
|
|
13
|
-
// WorkCenter를 찾는다.
|
|
14
|
-
// WorkCenter에 graphql createActivity를 호출한다.
|
|
15
|
-
return
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@Directive('@transaction')
|
|
19
|
-
@Mutation(returns => Activity, { description: 'To modify Activity information' })
|
|
20
|
-
async updateActivity(
|
|
21
|
-
@Arg('id') id: string,
|
|
22
|
-
@Arg('patch') patch: ActivityPatch,
|
|
23
|
-
@Ctx() context: ResolverContext
|
|
24
|
-
): Promise<Activity> {
|
|
25
|
-
const { domain, user, tx } = context.state
|
|
26
|
-
|
|
27
|
-
// workcenter의 토큰을 가져온다.
|
|
28
|
-
// remote graphql의 activity query를 호출한다.
|
|
29
|
-
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@Directive('@transaction')
|
|
34
|
-
@Mutation(returns => [Activity], { description: "To modify multiple Activities' information" })
|
|
35
|
-
async updateMultipleActivity(
|
|
36
|
-
@Arg('patches', type => [ActivityPatch]) patches: ActivityPatch[],
|
|
37
|
-
@Ctx() context: ResolverContext
|
|
38
|
-
): Promise<Activity[]> {
|
|
39
|
-
const { domain, user, tx } = context.state
|
|
40
|
-
|
|
41
|
-
// workcenter의 토큰을 가져온다.
|
|
42
|
-
// remote graphql의 activity query를 호출한다.
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@Directive('@transaction')
|
|
48
|
-
@Mutation(returns => Boolean, { description: 'To delete Activity' })
|
|
49
|
-
async deleteActivity(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {
|
|
50
|
-
const { domain, tx } = context.state
|
|
51
|
-
|
|
52
|
-
// workcenter의 토큰을 가져온다.
|
|
53
|
-
// remote graphql의 activity query를 호출한다.
|
|
54
|
-
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@Directive('@transaction')
|
|
59
|
-
@Mutation(returns => Boolean, { description: 'To delete multiple Activities' })
|
|
60
|
-
async deleteActivities(
|
|
61
|
-
@Arg('ids', type => [String]) ids: string[],
|
|
62
|
-
@Ctx() context: ResolverContext
|
|
63
|
-
): Promise<boolean> {
|
|
64
|
-
const { domain, tx } = context.state
|
|
65
|
-
|
|
66
|
-
// workcenter의 토큰을 가져온다.
|
|
67
|
-
// remote graphql의 activity query를 호출한다.
|
|
68
|
-
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@Directive('@transaction')
|
|
73
|
-
@Mutation(returns => Boolean, { description: 'To import multiple Activities' })
|
|
74
|
-
async importActivities(
|
|
75
|
-
@Arg('activities', type => [ActivityPatch]) activities: ActivityPatch[],
|
|
76
|
-
@Ctx() context: ResolverContext
|
|
77
|
-
): Promise<boolean> {
|
|
78
|
-
const { domain, tx } = context.state
|
|
79
|
-
|
|
80
|
-
// workcenter의 토큰을 가져온다.
|
|
81
|
-
// remote graphql의 activity query를 호출한다.
|
|
82
|
-
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Arg, Args, Ctx, Query, Resolver } from 'type-graphql'
|
|
2
|
-
|
|
3
|
-
import { getRepository, ListParam } from '@things-factory/shell'
|
|
4
|
-
|
|
5
|
-
import { Activity } from './activity'
|
|
6
|
-
import { ActivityList } from './activity-type'
|
|
7
|
-
import { ActivityRegistry } from '../../controllers/activity-registry'
|
|
8
|
-
import { WorkCenter } from '../work-center/work-center'
|
|
9
|
-
|
|
10
|
-
@Resolver(Activity)
|
|
11
|
-
export class ActivityQuery {
|
|
12
|
-
@Query(returns => Activity!, { nullable: true, description: 'To fetch a Activity' })
|
|
13
|
-
async registeredActivity(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Activity> {
|
|
14
|
-
const { domain } = context.state
|
|
15
|
-
|
|
16
|
-
return ActivityRegistry.get(id)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Query(returns => ActivityList, { description: 'To fetch multiple Activities' })
|
|
20
|
-
async registeredActivities(
|
|
21
|
-
@Args(type => ListParam) params: ListParam,
|
|
22
|
-
@Ctx() context: ResolverContext
|
|
23
|
-
): Promise<ActivityList> {
|
|
24
|
-
const { domain } = context.state
|
|
25
|
-
|
|
26
|
-
const activities = ActivityRegistry.list()
|
|
27
|
-
|
|
28
|
-
return { items: activities, total: activities.length }
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Query(returns => Activity!, { nullable: true, description: 'To fetch a Activity' })
|
|
32
|
-
async activity(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Activity> {
|
|
33
|
-
const { domain } = context.state
|
|
34
|
-
|
|
35
|
-
const workCenter = await getRepository(WorkCenter).findOne({
|
|
36
|
-
where: { domain: { id: domain.id }, id }
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
// workcenter의 토큰을 가져온다.
|
|
40
|
-
// remote graphql의 activity query를 호출한다.
|
|
41
|
-
|
|
42
|
-
return
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@Query(returns => Activity!, { nullable: true, description: 'To fetch a Activity by name' })
|
|
46
|
-
async activityByName(@Arg('name') name: string, @Ctx() context: ResolverContext): Promise<Activity> {
|
|
47
|
-
const { domain } = context.state
|
|
48
|
-
|
|
49
|
-
// workcenter의 토큰을 가져온다.
|
|
50
|
-
// remote graphql의 activity query를 호출한다.
|
|
51
|
-
|
|
52
|
-
return
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Query(returns => ActivityList, { description: 'To fetch multiple Activities' })
|
|
56
|
-
async activities(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<ActivityList> {
|
|
57
|
-
const { domain } = context.state
|
|
58
|
-
|
|
59
|
-
// workcenter의 토큰을 가져온다.
|
|
60
|
-
// remote graphql의 activity query를 호출한다.
|
|
61
|
-
|
|
62
|
-
return
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'
|
|
2
|
-
import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
|
|
3
|
-
import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'
|
|
4
|
-
|
|
5
|
-
import { ObjectRef, ScalarObject } from '@things-factory/shell'
|
|
6
|
-
|
|
7
|
-
import { Activity, ActivityType, ActivityUIType } from './activity'
|
|
8
|
-
import { ActivityModelItem } from './activity-model-type'
|
|
9
|
-
|
|
10
|
-
@InputType()
|
|
11
|
-
export class NewActivity {
|
|
12
|
-
@Field()
|
|
13
|
-
name: string
|
|
14
|
-
|
|
15
|
-
@Field({ nullable: true })
|
|
16
|
-
description?: string
|
|
17
|
-
|
|
18
|
-
@Field({ nullable: true })
|
|
19
|
-
activityType?: ActivityType
|
|
20
|
-
|
|
21
|
-
@Field(type => ScalarObject, { nullable: true })
|
|
22
|
-
model?: ActivityModelItem[]
|
|
23
|
-
|
|
24
|
-
@Field({ nullable: true })
|
|
25
|
-
priority?: number
|
|
26
|
-
|
|
27
|
-
@Field({ nullable: true })
|
|
28
|
-
startable?: boolean
|
|
29
|
-
|
|
30
|
-
@Field({ nullable: true })
|
|
31
|
-
schedule?: string
|
|
32
|
-
|
|
33
|
-
@Field({ nullable: true })
|
|
34
|
-
standardTime?: number
|
|
35
|
-
|
|
36
|
-
@Field(type => ObjectRef, { nullable: true })
|
|
37
|
-
issuerRole?: ObjectRef
|
|
38
|
-
|
|
39
|
-
@Field(type => ObjectRef, { nullable: true })
|
|
40
|
-
assigneeRole?: ObjectRef
|
|
41
|
-
|
|
42
|
-
@Field(type => ObjectRef, { nullable: true })
|
|
43
|
-
supervisoryRole?: ObjectRef
|
|
44
|
-
|
|
45
|
-
@Field({ nullable: true })
|
|
46
|
-
uiType?: ActivityUIType
|
|
47
|
-
|
|
48
|
-
@Field({ nullable: true })
|
|
49
|
-
uiSource?: string
|
|
50
|
-
|
|
51
|
-
@Field({ nullable: true })
|
|
52
|
-
viewType?: ActivityUIType
|
|
53
|
-
|
|
54
|
-
@Field({ nullable: true })
|
|
55
|
-
viewSource?: string
|
|
56
|
-
|
|
57
|
-
@Field({ nullable: true })
|
|
58
|
-
reportType?: ActivityUIType
|
|
59
|
-
|
|
60
|
-
@Field({ nullable: true })
|
|
61
|
-
reportSource?: string
|
|
62
|
-
|
|
63
|
-
@Field({ nullable: true })
|
|
64
|
-
active?: boolean
|
|
65
|
-
|
|
66
|
-
@Field(type => GraphQLUpload, { nullable: true })
|
|
67
|
-
thumbnail?: FileUpload
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@InputType()
|
|
71
|
-
export class ActivityPatch {
|
|
72
|
-
@Field(type => ID, { nullable: true })
|
|
73
|
-
id?: string
|
|
74
|
-
|
|
75
|
-
@Field({ nullable: true })
|
|
76
|
-
name?: string
|
|
77
|
-
|
|
78
|
-
@Field({ nullable: true })
|
|
79
|
-
description?: string
|
|
80
|
-
|
|
81
|
-
@Field({ nullable: true })
|
|
82
|
-
activityType?: ActivityType
|
|
83
|
-
|
|
84
|
-
@Field(type => ScalarObject, { nullable: true })
|
|
85
|
-
model?: ActivityModelItem[]
|
|
86
|
-
|
|
87
|
-
@Field({ nullable: true })
|
|
88
|
-
priority?: number
|
|
89
|
-
|
|
90
|
-
@Field({ nullable: true })
|
|
91
|
-
startable?: boolean
|
|
92
|
-
|
|
93
|
-
@Field({ nullable: true })
|
|
94
|
-
schedule?: string
|
|
95
|
-
|
|
96
|
-
@Field({ nullable: true })
|
|
97
|
-
standardTime?: number
|
|
98
|
-
|
|
99
|
-
@Field(type => ObjectRef, { nullable: true })
|
|
100
|
-
issuerRole?: ObjectRef
|
|
101
|
-
|
|
102
|
-
@Field(type => ObjectRef, { nullable: true })
|
|
103
|
-
assigneeRole?: ObjectRef
|
|
104
|
-
|
|
105
|
-
@Field(type => ObjectRef, { nullable: true })
|
|
106
|
-
supervisoryRole?: ObjectRef
|
|
107
|
-
|
|
108
|
-
@Field({ nullable: true })
|
|
109
|
-
uiType?: ActivityUIType
|
|
110
|
-
|
|
111
|
-
@Field({ nullable: true })
|
|
112
|
-
uiSource?: string
|
|
113
|
-
|
|
114
|
-
@Field({ nullable: true })
|
|
115
|
-
reportType?: ActivityUIType
|
|
116
|
-
|
|
117
|
-
@Field({ nullable: true })
|
|
118
|
-
reportSource?: string
|
|
119
|
-
|
|
120
|
-
@Field(type => GraphQLUpload, { nullable: true })
|
|
121
|
-
thumbnail?: FileUpload
|
|
122
|
-
|
|
123
|
-
@Field({ nullable: true })
|
|
124
|
-
cuFlag?: string
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@ObjectType()
|
|
128
|
-
export class ActivityList {
|
|
129
|
-
@Field(type => [Activity])
|
|
130
|
-
items: Activity[]
|
|
131
|
-
|
|
132
|
-
@Field(type => Int)
|
|
133
|
-
total: number
|
|
134
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { Field, ID, ObjectType, registerEnumType } from 'type-graphql'
|
|
2
|
-
|
|
3
|
-
import { Role, User } from '@things-factory/auth-base'
|
|
4
|
-
import { Domain } from '@things-factory/shell'
|
|
5
|
-
|
|
6
|
-
import { ActivityModelItem } from './activity-model-type'
|
|
7
|
-
|
|
8
|
-
export enum ActivityStatus {
|
|
9
|
-
Draft = 'draft',
|
|
10
|
-
Released = 'released',
|
|
11
|
-
Deprecated = 'deprecated'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
registerEnumType(ActivityStatus, {
|
|
15
|
-
name: 'ActivityStatus',
|
|
16
|
-
description: 'state enumeration of a activity'
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export enum ActivityType {
|
|
20
|
-
Task = 'task',
|
|
21
|
-
Service = 'service',
|
|
22
|
-
Send = 'send',
|
|
23
|
-
Receive = 'receive',
|
|
24
|
-
User = 'user',
|
|
25
|
-
Manual = 'manual',
|
|
26
|
-
BusinessRule = 'business-rule',
|
|
27
|
-
Script = 'script',
|
|
28
|
-
Subprocess = 'sub-process',
|
|
29
|
-
Call = 'call'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
registerEnumType(ActivityType, {
|
|
33
|
-
name: 'ActivityType',
|
|
34
|
-
description: 'type enumeration of a activity'
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
export enum ActivityUIType {
|
|
38
|
-
Generated = 'generated',
|
|
39
|
-
Template = 'template',
|
|
40
|
-
Board = 'board',
|
|
41
|
-
CustomElement = 'custom-element',
|
|
42
|
-
Page = 'page',
|
|
43
|
-
External = 'external'
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
registerEnumType(ActivityUIType, {
|
|
47
|
-
name: 'ActivityUIType',
|
|
48
|
-
description: 'user-interface type enumeration of a activity'
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
@ObjectType({ description: 'Entity for Activity' })
|
|
52
|
-
export class Activity {
|
|
53
|
-
@Field(type => ID)
|
|
54
|
-
readonly id: string
|
|
55
|
-
|
|
56
|
-
@Field({ nullable: true })
|
|
57
|
-
version?: number = 1
|
|
58
|
-
|
|
59
|
-
@Field(type => Domain, { nullable: true })
|
|
60
|
-
domain?: Domain
|
|
61
|
-
|
|
62
|
-
@Field({ nullable: true })
|
|
63
|
-
name?: string
|
|
64
|
-
|
|
65
|
-
@Field({ nullable: true })
|
|
66
|
-
description?: string
|
|
67
|
-
|
|
68
|
-
@Field({ nullable: true })
|
|
69
|
-
activityType?: ActivityType
|
|
70
|
-
|
|
71
|
-
@Field({ nullable: true })
|
|
72
|
-
state?: ActivityStatus
|
|
73
|
-
|
|
74
|
-
@Field(type => [ActivityModelItem], { nullable: true })
|
|
75
|
-
model?: ActivityModelItem[]
|
|
76
|
-
|
|
77
|
-
@Field({ nullable: true })
|
|
78
|
-
priority?: number = 1
|
|
79
|
-
|
|
80
|
-
@Field({ nullable: true })
|
|
81
|
-
startable?: boolean
|
|
82
|
-
|
|
83
|
-
@Field({ nullable: true })
|
|
84
|
-
schedule?: string
|
|
85
|
-
|
|
86
|
-
@Field({ nullable: true })
|
|
87
|
-
standardTime?: number
|
|
88
|
-
|
|
89
|
-
@Field(type => Role, { nullable: true })
|
|
90
|
-
issuerRole?: Role
|
|
91
|
-
|
|
92
|
-
@Field(type => Role, { nullable: true })
|
|
93
|
-
assigneeRole?: Role
|
|
94
|
-
|
|
95
|
-
@Field(type => Role, { nullable: true })
|
|
96
|
-
supervisoryRole?: Role
|
|
97
|
-
|
|
98
|
-
@Field({ nullable: true })
|
|
99
|
-
uiType?: ActivityUIType
|
|
100
|
-
|
|
101
|
-
@Field({ nullable: true })
|
|
102
|
-
uiSource?: string
|
|
103
|
-
|
|
104
|
-
@Field({ nullable: true })
|
|
105
|
-
viewType?: ActivityUIType
|
|
106
|
-
|
|
107
|
-
@Field({ nullable: true })
|
|
108
|
-
viewSource?: string
|
|
109
|
-
|
|
110
|
-
@Field({ nullable: true })
|
|
111
|
-
reportType?: ActivityUIType
|
|
112
|
-
|
|
113
|
-
@Field({ nullable: true })
|
|
114
|
-
reportSource?: string
|
|
115
|
-
|
|
116
|
-
@Field({ nullable: true })
|
|
117
|
-
createdAt?: Date
|
|
118
|
-
|
|
119
|
-
@Field({ nullable: true })
|
|
120
|
-
updatedAt?: Date
|
|
121
|
-
|
|
122
|
-
@Field(type => User, { nullable: true, description: 'User assigned to the client application' })
|
|
123
|
-
client?: User
|
|
124
|
-
|
|
125
|
-
@Field(type => User, { nullable: true })
|
|
126
|
-
creator?: User
|
|
127
|
-
|
|
128
|
-
@Field(type => User, { nullable: true })
|
|
129
|
-
updater?: User
|
|
130
|
-
|
|
131
|
-
@Field(type => String, { nullable: true })
|
|
132
|
-
thumbnail?: string
|
|
133
|
-
}
|