@dssp/project 1.0.0-alpha.66 → 1.0.0-alpha.74
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/pages/project/project-detail.d.ts +2 -0
- package/dist-client/pages/project/project-detail.js +96 -31
- package/dist-client/pages/project/project-detail.js.map +1 -1
- package/dist-client/pages/project/project-list.d.ts +7 -0
- package/dist-client/pages/project/project-list.js.map +1 -1
- package/dist-client/pages/project/project-setting-list.d.ts +2 -0
- package/dist-client/pages/project/project-setting-list.js +29 -4
- package/dist-client/pages/project/project-setting-list.js.map +1 -1
- package/dist-client/pages/project/project-update.d.ts +8 -0
- package/dist-client/pages/project/project-update.js +109 -4
- package/dist-client/pages/project/project-update.js.map +1 -1
- package/dist-client/pages/resource/construction-type-management.js +14 -0
- package/dist-client/pages/resource/construction-type-management.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/migrations/1723861466414-seed-codes.js +1 -1
- package/dist-server/migrations/1723861466414-seed-codes.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-query.d.ts +2 -2
- package/dist-server/service/construction-type/construction-type-query.js +5 -10
- package/dist-server/service/construction-type/construction-type-query.js.map +1 -1
- package/dist-server/service/construction-type/construction-type-type.d.ts +1 -0
- package/dist-server/service/construction-type/construction-type-type.js +4 -0
- package/dist-server/service/construction-type/construction-type-type.js.map +1 -1
- package/dist-server/service/construction-type/construction-type.d.ts +1 -0
- package/dist-server/service/construction-type/construction-type.js +5 -0
- package/dist-server/service/construction-type/construction-type.js.map +1 -1
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.d.ts +2 -2
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js +5 -10
- package/dist-server/service/inspection-drawing-type/inspection-drawing-type-query.js.map +1 -1
- package/dist-server/service/manager/manager-query.d.ts +1 -1
- package/dist-server/service/manager/manager-query.js +2 -6
- package/dist-server/service/manager/manager-query.js.map +1 -1
- package/dist-server/service/project/issue-project-code.d.ts +7 -0
- package/dist-server/service/project/issue-project-code.js +27 -0
- package/dist-server/service/project/issue-project-code.js.map +1 -0
- package/dist-server/service/project/project-mutation.d.ts +2 -0
- package/dist-server/service/project/project-mutation.js +90 -6
- package/dist-server/service/project/project-mutation.js.map +1 -1
- package/dist-server/service/project/project-query.d.ts +4 -2
- package/dist-server/service/project/project-query.js +50 -15
- package/dist-server/service/project/project-query.js.map +1 -1
- package/dist-server/service/project/project.d.ts +1 -0
- package/dist-server/service/project/project.js +9 -0
- package/dist-server/service/project/project.js.map +1 -1
- package/dist-server/service/resource/resource-mutation.js +5 -6
- package/dist-server/service/resource/resource-mutation.js.map +1 -1
- package/dist-server/service/resource/resource-query.d.ts +2 -2
- package/dist-server/service/resource/resource-query.js +5 -10
- package/dist-server/service/resource/resource-query.js.map +1 -1
- package/dist-server/service/task-resource/task-resource-query.d.ts +2 -2
- package/dist-server/service/task-resource/task-resource-query.js +4 -9
- package/dist-server/service/task-resource/task-resource-query.js.map +1 -1
- package/dist-server/service/worker-type/worker-type-query.d.ts +2 -2
- package/dist-server/service/worker-type/worker-type-query.js +5 -10
- package/dist-server/service/worker-type/worker-type-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -8,16 +8,13 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
8
8
|
const resource_1 = require("./resource");
|
|
9
9
|
const resource_type_1 = require("./resource-type");
|
|
10
10
|
let ResourceQuery = class ResourceQuery {
|
|
11
|
-
async resource(id
|
|
12
|
-
const { domain } = context.state;
|
|
11
|
+
async resource(id) {
|
|
13
12
|
return await (0, shell_1.getRepository)(resource_1.Resource).findOne({
|
|
14
|
-
where: {
|
|
13
|
+
where: { id }
|
|
15
14
|
});
|
|
16
15
|
}
|
|
17
|
-
async resources(params
|
|
18
|
-
const { domain } = context.state;
|
|
16
|
+
async resources(params) {
|
|
19
17
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
20
|
-
domain,
|
|
21
18
|
params,
|
|
22
19
|
repository: await (0, shell_1.getRepository)(resource_1.Resource),
|
|
23
20
|
searchables: ['name', 'description']
|
|
@@ -40,18 +37,16 @@ tslib_1.__decorate([
|
|
|
40
37
|
(0, type_graphql_1.Directive)('@privilege(category: "project", privilege: "query", domainOwnerGranted: true)'),
|
|
41
38
|
(0, type_graphql_1.Query)(returns => resource_1.Resource, { nullable: true, description: 'To fetch a Resource' }),
|
|
42
39
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
43
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
44
40
|
tslib_1.__metadata("design:type", Function),
|
|
45
|
-
tslib_1.__metadata("design:paramtypes", [String
|
|
41
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
46
42
|
tslib_1.__metadata("design:returntype", Promise)
|
|
47
43
|
], ResourceQuery.prototype, "resource", null);
|
|
48
44
|
tslib_1.__decorate([
|
|
49
45
|
(0, type_graphql_1.Directive)('@privilege(category: "project", privilege: "query", domainOwnerGranted: true)'),
|
|
50
46
|
(0, type_graphql_1.Query)(returns => resource_type_1.ResourceList, { description: 'To fetch multiple Resources' }),
|
|
51
47
|
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
52
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
53
48
|
tslib_1.__metadata("design:type", Function),
|
|
54
|
-
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam
|
|
49
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
55
50
|
tslib_1.__metadata("design:returntype", Promise)
|
|
56
51
|
], ResourceQuery.prototype, "resources", null);
|
|
57
52
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-query.js","sourceRoot":"","sources":["../../../server/service/resource/resource-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAg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,KAAK,CAAC,OAAO,CAAS,QAAkB;QACtC,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAA;IACxE,CAAC;CACF,CAAA;AArCY,sCAAa;AAGlB;IAFL,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,mBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACpE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;;;;6CAIxB;AAIK;IAFL,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,4BAAY,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAC9D,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAS,iBAAS;;8CAUxC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,mBAAQ;;2CAEtC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,mBAAQ;;4CAEvC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAW,mBAAQ;;4CAEvC;wBApCU,aAAa;IADzB,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,aAAa,CAqCzB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Resource } from './resource'\nimport { ResourceList } from './resource-type'\n\n@Resolver(Resource)\nexport class ResourceQuery {\n @Directive('@privilege(category: \"project\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => Resource!, { nullable: true, description: 'To fetch a Resource' })\n async resource(@Arg('id') id: string): Promise<Resource> {\n return await getRepository(Resource).findOne({\n where: { id }\n })\n }\n\n @Directive('@privilege(category: \"project\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => ResourceList, { description: 'To fetch multiple Resources' })\n async resources(@Args() params: ListParam): Promise<ResourceList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(Resource),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() resource: Resource): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: resource.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() resource: Resource): Promise<User> {\n return await getRepository(User).findOneBy({ id: resource.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() resource: Resource): Promise<User> {\n return await getRepository(User).findOneBy({ id: resource.creatorId })\n }\n}\n"]}
|
|
@@ -2,6 +2,6 @@ import { ListParam } from '@things-factory/shell';
|
|
|
2
2
|
import { TaskResource } from './task-resource';
|
|
3
3
|
import { TaskResourceList } from './task-resource-type';
|
|
4
4
|
export declare class TaskResourceQuery {
|
|
5
|
-
taskResource(id: string
|
|
6
|
-
taskResources(params: ListParam
|
|
5
|
+
taskResource(id: string): Promise<TaskResource>;
|
|
6
|
+
taskResources(params: ListParam): Promise<TaskResourceList>;
|
|
7
7
|
}
|
|
@@ -7,16 +7,13 @@ const shell_1 = require("@things-factory/shell");
|
|
|
7
7
|
const task_resource_1 = require("./task-resource");
|
|
8
8
|
const task_resource_type_1 = require("./task-resource-type");
|
|
9
9
|
let TaskResourceQuery = class TaskResourceQuery {
|
|
10
|
-
async taskResource(id
|
|
11
|
-
const { domain } = context.state;
|
|
10
|
+
async taskResource(id) {
|
|
12
11
|
return await (0, shell_1.getRepository)(task_resource_1.TaskResource).findOne({
|
|
13
12
|
where: { id }
|
|
14
13
|
});
|
|
15
14
|
}
|
|
16
|
-
async taskResources(params
|
|
17
|
-
const { domain } = context.state;
|
|
15
|
+
async taskResources(params) {
|
|
18
16
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
19
|
-
domain,
|
|
20
17
|
params,
|
|
21
18
|
repository: await (0, shell_1.getRepository)(task_resource_1.TaskResource),
|
|
22
19
|
searchables: ['name', 'description']
|
|
@@ -30,18 +27,16 @@ tslib_1.__decorate([
|
|
|
30
27
|
(0, type_graphql_1.Directive)('@privilege(category: "project", privilege: "query", domainOwnerGranted: true)'),
|
|
31
28
|
(0, type_graphql_1.Query)(returns => task_resource_1.TaskResource, { nullable: true, description: 'To fetch a TaskResource' }),
|
|
32
29
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
33
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
34
30
|
tslib_1.__metadata("design:type", Function),
|
|
35
|
-
tslib_1.__metadata("design:paramtypes", [String
|
|
31
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
36
32
|
tslib_1.__metadata("design:returntype", Promise)
|
|
37
33
|
], TaskResourceQuery.prototype, "taskResource", null);
|
|
38
34
|
tslib_1.__decorate([
|
|
39
35
|
(0, type_graphql_1.Directive)('@privilege(category: "project", privilege: "query", domainOwnerGranted: true)'),
|
|
40
36
|
(0, type_graphql_1.Query)(returns => task_resource_type_1.TaskResourceList, { description: 'To fetch multiple TaskResources' }),
|
|
41
37
|
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
42
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
43
38
|
tslib_1.__metadata("design:type", Function),
|
|
44
|
-
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam
|
|
39
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
45
40
|
tslib_1.__metadata("design:returntype", Promise)
|
|
46
41
|
], TaskResourceQuery.prototype, "taskResources", null);
|
|
47
42
|
exports.TaskResourceQuery = TaskResourceQuery = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-resource-query.js","sourceRoot":"","sources":["../../../server/service/task-resource/task-resource-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAE9F,iDAAuG;AAEvG,mDAA8C;AAC9C,6DAAuD;AAGhD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGtB,AAAN,KAAK,CAAC,YAAY,CAAY,EAAU
|
|
1
|
+
{"version":3,"file":"task-resource-query.js","sourceRoot":"","sources":["../../../server/service/task-resource/task-resource-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAE9F,iDAAuG;AAEvG,mDAA8C;AAC9C,6DAAuD;AAGhD,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAGtB,AAAN,KAAK,CAAC,YAAY,CAAY,EAAU;QACtC,OAAO,MAAM,IAAA,qBAAa,EAAC,4BAAY,CAAC,CAAC,OAAO,CAAC;YAC/C,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,aAAa,CAAS,MAAiB;QAC3C,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,4BAAY,CAAC;YAC7C,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;CACF,CAAA;AAtBY,8CAAiB;AAGtB;IAFL,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,4BAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;IACxE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;;;;qDAI5B;AAIK;IAFL,IAAA,wBAAS,EAAC,+EAA+E,CAAC;IAC1F,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,qCAAgB,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAClE,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAS,iBAAS;;sDAU5C;4BArBU,iBAAiB;IAD7B,IAAA,uBAAQ,EAAC,4BAAY,CAAC;GACV,iBAAiB,CAsB7B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { TaskResource } from './task-resource'\nimport { TaskResourceList } from './task-resource-type'\n\n@Resolver(TaskResource)\nexport class TaskResourceQuery {\n @Directive('@privilege(category: \"project\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => TaskResource!, { nullable: true, description: 'To fetch a TaskResource' })\n async taskResource(@Arg('id') id: string): Promise<TaskResource> {\n return await getRepository(TaskResource).findOne({\n where: { id }\n })\n }\n\n @Directive('@privilege(category: \"project\", privilege: \"query\", domainOwnerGranted: true)')\n @Query(returns => TaskResourceList, { description: 'To fetch multiple TaskResources' })\n async taskResources(@Args() params: ListParam): Promise<TaskResourceList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(TaskResource),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n}\n"]}
|
|
@@ -3,8 +3,8 @@ import { User } from '@things-factory/auth-base';
|
|
|
3
3
|
import { WorkerType } from './worker-type';
|
|
4
4
|
import { WorkerTypeList } from './worker-type-type';
|
|
5
5
|
export declare class WorkerTypeQuery {
|
|
6
|
-
workerType(id: string
|
|
7
|
-
workerTypes(params: ListParam
|
|
6
|
+
workerType(id: string): Promise<WorkerType>;
|
|
7
|
+
workerTypes(params: ListParam): Promise<WorkerTypeList>;
|
|
8
8
|
domain(workerType: WorkerType): Promise<Domain>;
|
|
9
9
|
updater(workerType: WorkerType): Promise<User>;
|
|
10
10
|
creator(workerType: WorkerType): Promise<User>;
|
|
@@ -8,16 +8,13 @@ const auth_base_1 = require("@things-factory/auth-base");
|
|
|
8
8
|
const worker_type_1 = require("./worker-type");
|
|
9
9
|
const worker_type_type_1 = require("./worker-type-type");
|
|
10
10
|
let WorkerTypeQuery = class WorkerTypeQuery {
|
|
11
|
-
async workerType(id
|
|
12
|
-
const { domain } = context.state;
|
|
11
|
+
async workerType(id) {
|
|
13
12
|
return await (0, shell_1.getRepository)(worker_type_1.WorkerType).findOne({
|
|
14
|
-
where: {
|
|
13
|
+
where: { id }
|
|
15
14
|
});
|
|
16
15
|
}
|
|
17
|
-
async workerTypes(params
|
|
18
|
-
const { domain } = context.state;
|
|
16
|
+
async workerTypes(params) {
|
|
19
17
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
20
|
-
domain,
|
|
21
18
|
params,
|
|
22
19
|
repository: await (0, shell_1.getRepository)(worker_type_1.WorkerType)
|
|
23
20
|
});
|
|
@@ -38,17 +35,15 @@ exports.WorkerTypeQuery = WorkerTypeQuery;
|
|
|
38
35
|
tslib_1.__decorate([
|
|
39
36
|
(0, type_graphql_1.Query)(returns => worker_type_1.WorkerType, { nullable: true, description: 'To fetch a WorkerType' }),
|
|
40
37
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
41
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
42
38
|
tslib_1.__metadata("design:type", Function),
|
|
43
|
-
tslib_1.__metadata("design:paramtypes", [String
|
|
39
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
44
40
|
tslib_1.__metadata("design:returntype", Promise)
|
|
45
41
|
], WorkerTypeQuery.prototype, "workerType", null);
|
|
46
42
|
tslib_1.__decorate([
|
|
47
43
|
(0, type_graphql_1.Query)(returns => worker_type_type_1.WorkerTypeList, { description: 'To fetch multiple WorkerTypes' }),
|
|
48
44
|
tslib_1.__param(0, (0, type_graphql_1.Args)()),
|
|
49
|
-
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
50
45
|
tslib_1.__metadata("design:type", Function),
|
|
51
|
-
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam
|
|
46
|
+
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
|
|
52
47
|
tslib_1.__metadata("design:returntype", Promise)
|
|
53
48
|
], WorkerTypeQuery.prototype, "workerTypes", null);
|
|
54
49
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-type-query.js","sourceRoot":"","sources":["../../../server/service/worker-type/worker-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,+CAA0C;AAC1C,yDAAmD;AAG5C,IAAM,eAAe,GAArB,MAAM,eAAe;IAEpB,AAAN,KAAK,CAAC,UAAU,CAAY,EAAU
|
|
1
|
+
{"version":3,"file":"worker-type-query.js","sourceRoot":"","sources":["../../../server/service/worker-type/worker-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AACnF,iDAAuG;AACvG,yDAAgD;AAChD,+CAA0C;AAC1C,yDAAmD;AAG5C,IAAM,eAAe,GAArB,MAAM,eAAe;IAEpB,AAAN,KAAK,CAAC,UAAU,CAAY,EAAU;QACpC,OAAO,MAAM,IAAA,qBAAa,EAAC,wBAAU,CAAC,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,EAAE,EAA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AAA,mBAAI,GAAE,CAAA;;6CAAS,iBAAS;;kDAS1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;6CAE1C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAa,wBAAU;;8CAE3C;0BAjCU,eAAe;IAD3B,IAAA,uBAAQ,EAAC,wBAAU,CAAC;GACR,eAAe,CAkC3B","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { WorkerType } from './worker-type'\nimport { WorkerTypeList } from './worker-type-type'\n\n@Resolver(WorkerType)\nexport class WorkerTypeQuery {\n @Query(returns => WorkerType!, { nullable: true, description: 'To fetch a WorkerType' })\n async workerType(@Arg('id') id: string): Promise<WorkerType> {\n return await getRepository(WorkerType).findOne({\n where: { id }\n })\n }\n\n @Query(returns => WorkerTypeList, { description: 'To fetch multiple WorkerTypes' })\n async workerTypes(@Args() params: ListParam): Promise<WorkerTypeList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(WorkerType)\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() workerType: WorkerType): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: workerType.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() workerType: WorkerType): Promise<User> {\n return await getRepository(User).findOneBy({ id: workerType.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() workerType: WorkerType): Promise<User> {\n return await getRepository(User).findOneBy({ id: workerType.creatorId })\n }\n}\n"]}
|