@things-factory/calendar 6.2.170 → 6.2.178
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/attendee/attendee-importer.js.map +1 -1
- package/dist-client/pages/attendee/attendee-list-page.js.map +1 -1
- package/dist-client/pages/calendar/calendar-importer.js.map +1 -1
- package/dist-client/pages/calendar/calendar-list-page.js.map +1 -1
- package/dist-client/pages/calendar/calendar-page.js.map +1 -1
- package/dist-client/pages/event/event-importer.js.map +1 -1
- package/dist-client/pages/event/event-list-page.js.map +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/index.d.ts +3 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/service/attendee/attendee-mutation.d.ts +10 -0
- package/dist-server/service/attendee/attendee-mutation.js +2 -2
- package/dist-server/service/attendee/attendee-mutation.js.map +1 -1
- package/dist-server/service/attendee/attendee-query.d.ts +7 -0
- package/dist-server/service/attendee/attendee-query.js +2 -2
- package/dist-server/service/attendee/attendee-query.js.map +1 -1
- package/dist-server/service/attendee/attendee-type.d.ts +17 -0
- package/dist-server/service/attendee/attendee-type.js +6 -6
- package/dist-server/service/attendee/attendee-type.js.map +1 -1
- package/dist-server/service/attendee/attendee.d.ts +11 -0
- package/dist-server/service/attendee/attendee.js +3 -3
- package/dist-server/service/attendee/attendee.js.map +1 -1
- package/dist-server/service/attendee/index.d.ts +6 -0
- package/dist-server/service/calendar/calendar-mutation.d.ts +10 -0
- package/dist-server/service/calendar/calendar-mutation.js +2 -2
- package/dist-server/service/calendar/calendar-mutation.js.map +1 -1
- package/dist-server/service/calendar/calendar-query.d.ts +11 -0
- package/dist-server/service/calendar/calendar-query.js +2 -2
- package/dist-server/service/calendar/calendar-query.js.map +1 -1
- package/dist-server/service/calendar/calendar-type.d.ts +20 -0
- package/dist-server/service/calendar/calendar-type.js +6 -6
- package/dist-server/service/calendar/calendar-type.js.map +1 -1
- package/dist-server/service/calendar/calendar.d.ts +22 -0
- package/dist-server/service/calendar/calendar.js +3 -3
- package/dist-server/service/calendar/calendar.js.map +1 -1
- package/dist-server/service/calendar/index.d.ts +6 -0
- package/dist-server/service/event/event-mutation.d.ts +10 -0
- package/dist-server/service/event/event-mutation.js +2 -2
- package/dist-server/service/event/event-mutation.js.map +1 -1
- package/dist-server/service/event/event-query.d.ts +10 -0
- package/dist-server/service/event/event-query.js +2 -2
- package/dist-server/service/event/event-query.js.map +1 -1
- package/dist-server/service/event/event-type.d.ts +23 -0
- package/dist-server/service/event/event-type.js +6 -6
- package/dist-server/service/event/event-type.js.map +1 -1
- package/dist-server/service/event/event.d.ts +22 -0
- package/dist-server/service/event/event.js +3 -3
- package/dist-server/service/event/event.js.map +1 -1
- package/dist-server/service/event/index.d.ts +6 -0
- package/dist-server/service/index.d.ts +8 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initMiddlewares(app: any): void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initMiddlewares =
|
|
3
|
+
exports.initMiddlewares = initMiddlewares;
|
|
4
4
|
function initMiddlewares(app) {
|
|
5
5
|
/* can add middlewares into app */
|
|
6
6
|
}
|
|
7
|
-
exports.initMiddlewares = initMiddlewares;
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;AAAA,0CAEC;AAFD,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC","sourcesContent":["export function initMiddlewares(app) {\n /* can add middlewares into app */\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare var migrations: any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare const debug: any;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Attendee } from './attendee';
|
|
2
|
+
import { NewAttendee, AttendeePatch } from './attendee-type';
|
|
3
|
+
export declare class AttendeeMutation {
|
|
4
|
+
createAttendee(attendee: NewAttendee, context: ResolverContext): Promise<Attendee>;
|
|
5
|
+
updateAttendee(id: string, patch: AttendeePatch, context: ResolverContext): Promise<Attendee>;
|
|
6
|
+
updateMultipleAttendee(patches: AttendeePatch[], context: ResolverContext): Promise<Attendee[]>;
|
|
7
|
+
deleteAttendee(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteAttendees(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
importAttendees(attendees: AttendeePatch[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -62,6 +62,7 @@ let AttendeeMutation = class AttendeeMutation {
|
|
|
62
62
|
return true;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
+
exports.AttendeeMutation = AttendeeMutation;
|
|
65
66
|
tslib_1.__decorate([
|
|
66
67
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
67
68
|
(0, type_graphql_1.Mutation)(returns => attendee_1.Attendee, { description: 'To create new Attendee' }),
|
|
@@ -117,8 +118,7 @@ tslib_1.__decorate([
|
|
|
117
118
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
118
119
|
tslib_1.__metadata("design:returntype", Promise)
|
|
119
120
|
], AttendeeMutation.prototype, "importAttendees", null);
|
|
120
|
-
AttendeeMutation = tslib_1.__decorate([
|
|
121
|
+
exports.AttendeeMutation = AttendeeMutation = tslib_1.__decorate([
|
|
121
122
|
(0, type_graphql_1.Resolver)(attendee_1.Attendee)
|
|
122
123
|
], AttendeeMutation);
|
|
123
|
-
exports.AttendeeMutation = AttendeeMutation;
|
|
124
124
|
//# sourceMappingURL=attendee-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendee-mutation.js","sourceRoot":"","sources":["../../../server/service/attendee/attendee-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,yCAAqC;AACrC,mDAA4D;AAGrD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAGrB,AAAN,KAAK,CAAC,cAAc,CAAkB,QAAqB,EAAS,OAAwB;QAC1F,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE5B,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,mBAAQ,CAAC,CAAC,IAAI,mBACvC,QAAQ,EACX,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,cAAc,CACP,EAAU,EACP,KAAoB,EAC3B,OAAwB;QAE/B,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE5B,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,mBAAQ,CAAC,CAAA;QAC7C,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,iCACvB,QAAQ,GACR,KAAK,EACR,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,sBAAsB,CACe,OAAwB,EAC1D,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,C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,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDASP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAE3E,mBAAA,IAAA,kBAAG,EAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,6BAAa,CAAC,CAAC,CAAA;IACzC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDAWP;2BAjHU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,gBAAgB,CAkH5B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Attendee } from './attendee'\nimport { NewAttendee, AttendeePatch } from './attendee-type'\n\n@Resolver(Attendee)\nexport class AttendeeMutation {\n @Directive('@transaction')\n @Mutation(returns => Attendee, { description: 'To create new Attendee' })\n async createAttendee(@Arg('attendee') attendee: NewAttendee, @Ctx() context: ResolverContext): Promise<Attendee> {\n const { tx } = context.state\n\n return await tx.getRepository(Attendee).save({\n ...attendee\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Attendee, { description: 'To modify Attendee information' })\n async updateAttendee(\n @Arg('id') id: string,\n @Arg('patch') patch: AttendeePatch,\n @Ctx() context: ResolverContext\n ): Promise<Attendee> {\n const { tx } = context.state\n\n const repository = tx.getRepository(Attendee)\n const attendee = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...attendee,\n ...patch\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Attendee], { description: \"To modify multiple Attendees' information\" })\n async updateMultipleAttendee(\n @Arg('patches', type => [AttendeePatch]) patches: AttendeePatch[],\n @Ctx() context: ResolverContext\n ): Promise<Attendee[]> {\n const { user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const attendeeRepo = tx.getRepository(Attendee)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await attendeeRepo.save({\n ...newRecord\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const attendee = await attendeeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await attendeeRepo.save({\n ...attendee,\n ...updateRecord\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Attendee' })\n async deleteAttendee(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(Attendee).delete({ id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Attendees' })\n async deleteAttendees(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(Attendee).delete({\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Attendees' })\n async importAttendees(\n @Arg('attendees', type => [AttendeePatch]) attendees: AttendeePatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await Promise.all(\n attendees.map(async (attendee: AttendeePatch) => {\n const createdAttendee: Attendee = await tx.getRepository(Attendee).save({ ...attendee })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListParam } from '@things-factory/shell';
|
|
2
|
+
import { Attendee } from './attendee';
|
|
3
|
+
import { AttendeeList } from './attendee-type';
|
|
4
|
+
export declare class AttendeeQuery {
|
|
5
|
+
attendee(id: string, context: ResolverContext): Promise<Attendee>;
|
|
6
|
+
attendees(params: ListParam, context: ResolverContext): Promise<AttendeeList>;
|
|
7
|
+
}
|
|
@@ -24,6 +24,7 @@ let AttendeeQuery = class AttendeeQuery {
|
|
|
24
24
|
return { items, total };
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
+
exports.AttendeeQuery = AttendeeQuery;
|
|
27
28
|
tslib_1.__decorate([
|
|
28
29
|
(0, type_graphql_1.Query)(returns => attendee_1.Attendee, { nullable: true, description: 'To fetch a Attendee' }),
|
|
29
30
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -40,8 +41,7 @@ tslib_1.__decorate([
|
|
|
40
41
|
tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
|
|
41
42
|
tslib_1.__metadata("design:returntype", Promise)
|
|
42
43
|
], AttendeeQuery.prototype, "attendees", null);
|
|
43
|
-
AttendeeQuery = tslib_1.__decorate([
|
|
44
|
+
exports.AttendeeQuery = AttendeeQuery = tslib_1.__decorate([
|
|
44
45
|
(0, type_graphql_1.Resolver)(attendee_1.Attendee)
|
|
45
46
|
], AttendeeQuery);
|
|
46
|
-
exports.AttendeeQuery = AttendeeQuery;
|
|
47
47
|
//# sourceMappingURL=attendee-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendee-query.js","sourceRoot":"","sources":["../../../server/service/attendee/attendee-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAA+F;AAE/F,yCAAqC;AACrC,mDAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,AAAN,KAAK,CAAC,QAAQ,CAAY,EAAU,EAAS,OAAwB;QACnE,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAA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EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;CACF,CAAA;AAvBY,sCAAa;AAElB;IADL,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;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;6CAI3C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,4BAAY,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAC9D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8CAaxC;wBAtBU,aAAa;IADzB,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,aAAa,CAuBzB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Attendee } from './attendee'\nimport { AttendeeList } from './attendee-type'\n\n@Resolver(Attendee)\nexport class AttendeeQuery {\n @Query(returns => Attendee!, { nullable: true, description: 'To fetch a Attendee' })\n async attendee(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Attendee> {\n return await getRepository(Attendee).findOne({\n where: { id }\n })\n }\n\n @Query(returns => AttendeeList, { description: 'To fetch multiple Attendees' })\n async attendees(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<AttendeeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Attendee),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attendee, AttendeeStatus } from './attendee';
|
|
2
|
+
export declare class NewAttendee {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
state?: AttendeeStatus;
|
|
6
|
+
}
|
|
7
|
+
export declare class AttendeePatch {
|
|
8
|
+
id?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
state?: AttendeeStatus;
|
|
12
|
+
cuFlag?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class AttendeeList {
|
|
15
|
+
items: Attendee[];
|
|
16
|
+
total: number;
|
|
17
|
+
}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const attendee_1 = require("./attendee");
|
|
7
7
|
let NewAttendee = class NewAttendee {
|
|
8
8
|
};
|
|
9
|
+
exports.NewAttendee = NewAttendee;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -18,12 +19,12 @@ tslib_1.__decorate([
|
|
|
18
19
|
(0, type_graphql_1.Field)(type => attendee_1.AttendeeStatus, { nullable: true }),
|
|
19
20
|
tslib_1.__metadata("design:type", String)
|
|
20
21
|
], NewAttendee.prototype, "state", void 0);
|
|
21
|
-
NewAttendee = tslib_1.__decorate([
|
|
22
|
+
exports.NewAttendee = NewAttendee = tslib_1.__decorate([
|
|
22
23
|
(0, type_graphql_1.InputType)()
|
|
23
24
|
], NewAttendee);
|
|
24
|
-
exports.NewAttendee = NewAttendee;
|
|
25
25
|
let AttendeePatch = class AttendeePatch {
|
|
26
26
|
};
|
|
27
|
+
exports.AttendeePatch = AttendeePatch;
|
|
27
28
|
tslib_1.__decorate([
|
|
28
29
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
29
30
|
tslib_1.__metadata("design:type", String)
|
|
@@ -44,12 +45,12 @@ tslib_1.__decorate([
|
|
|
44
45
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
46
|
tslib_1.__metadata("design:type", String)
|
|
46
47
|
], AttendeePatch.prototype, "cuFlag", void 0);
|
|
47
|
-
AttendeePatch = tslib_1.__decorate([
|
|
48
|
+
exports.AttendeePatch = AttendeePatch = tslib_1.__decorate([
|
|
48
49
|
(0, type_graphql_1.InputType)()
|
|
49
50
|
], AttendeePatch);
|
|
50
|
-
exports.AttendeePatch = AttendeePatch;
|
|
51
51
|
let AttendeeList = class AttendeeList {
|
|
52
52
|
};
|
|
53
|
+
exports.AttendeeList = AttendeeList;
|
|
53
54
|
tslib_1.__decorate([
|
|
54
55
|
(0, type_graphql_1.Field)(type => [attendee_1.Attendee]),
|
|
55
56
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -58,8 +59,7 @@ tslib_1.__decorate([
|
|
|
58
59
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
59
60
|
tslib_1.__metadata("design:type", Number)
|
|
60
61
|
], AttendeeList.prototype, "total", void 0);
|
|
61
|
-
AttendeeList = tslib_1.__decorate([
|
|
62
|
+
exports.AttendeeList = AttendeeList = tslib_1.__decorate([
|
|
62
63
|
(0, type_graphql_1.ObjectType)()
|
|
63
64
|
], AttendeeList);
|
|
64
|
-
exports.AttendeeList = AttendeeList;
|
|
65
65
|
//# sourceMappingURL=attendee-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendee-type.js","sourceRoot":"","sources":["../../../server/service/attendee/attendee-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAItF,yCAAqD;AAG9C,IAAM,WAAW,GAAjB,MAAM,WAAW;CASvB,CAAA;
|
|
1
|
+
{"version":3,"file":"attendee-type.js","sourceRoot":"","sources":["../../../server/service/attendee/attendee-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAsF;AAItF,yCAAqD;AAG9C,IAAM,WAAW,GAAjB,MAAM,WAAW;CASvB,CAAA;AATY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yBAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC5B;sBARX,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CASvB;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAezB,CAAA;AAfY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yBAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;wBAdJ,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAezB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,CAAC;;2CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACN;uBALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Attendee, AttendeeStatus } from './attendee'\n\n@InputType()\nexport class NewAttendee {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => AttendeeStatus, { nullable: true })\n state?: AttendeeStatus\n}\n\n@InputType()\nexport class AttendeePatch {\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(type => AttendeeStatus, { nullable: true })\n state?: AttendeeStatus\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class AttendeeList {\n @Field(type => [Attendee])\n items: Attendee[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -10,13 +10,14 @@ var AttendeeStatus;
|
|
|
10
10
|
(function (AttendeeStatus) {
|
|
11
11
|
AttendeeStatus["STATUS_A"] = "STATUS_A";
|
|
12
12
|
AttendeeStatus["STATUS_B"] = "STATUS_B";
|
|
13
|
-
})(AttendeeStatus
|
|
13
|
+
})(AttendeeStatus || (exports.AttendeeStatus = AttendeeStatus = {}));
|
|
14
14
|
(0, type_graphql_1.registerEnumType)(AttendeeStatus, {
|
|
15
15
|
name: 'AttendeeStatus',
|
|
16
16
|
description: 'state enumeration of a attendee'
|
|
17
17
|
});
|
|
18
18
|
let Attendee = class Attendee {
|
|
19
19
|
};
|
|
20
|
+
exports.Attendee = Attendee;
|
|
20
21
|
tslib_1.__decorate([
|
|
21
22
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
22
23
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -38,10 +39,9 @@ tslib_1.__decorate([
|
|
|
38
39
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
40
|
tslib_1.__metadata("design:type", Array)
|
|
40
41
|
], Attendee.prototype, "events", void 0);
|
|
41
|
-
Attendee = tslib_1.__decorate([
|
|
42
|
+
exports.Attendee = Attendee = tslib_1.__decorate([
|
|
42
43
|
(0, typeorm_1.Entity)(),
|
|
43
44
|
(0, typeorm_1.Index)('ix_attendee_0', (attendee) => [attendee.email], { unique: false }),
|
|
44
45
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Attendee' })
|
|
45
46
|
], Attendee);
|
|
46
|
-
exports.Attendee = Attendee;
|
|
47
47
|
//# sourceMappingURL=attendee.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attendee.js","sourceRoot":"","sources":["../../../server/service/attendee/attendee.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAC9F,+CAA2E;AAC3E,qDAAqD;AAErD,0CAAsC;AAEtC,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,
|
|
1
|
+
{"version":3,"file":"attendee.js","sourceRoot":"","sources":["../../../server/service/attendee/attendee.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAC9F,+CAA2E;AAC3E,qDAAqD;AAErD,0CAAsC;AAEtC,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAA,+BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iCAAiC;CAC/C,CAAC,CAAA;AAKK,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAiBpB,CAAA;AAjBY,4BAAQ;AAGV;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oCACC;AAInB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACb;AAIb;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,qCAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC1C;AAKb;IAHC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,aAAK,CAAC;IACvB,IAAA,mBAAS,GAAE;IACX,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACX;mBAhBJ,QAAQ;IAHpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,eAAe,EAAE,CAAC,QAAkB,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IACnF,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAiBpB","sourcesContent":["import { Entity, Index, Column, ManyToMany, JoinTable, PrimaryGeneratedColumn } from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\nimport { GraphQLEmailAddress } from 'graphql-scalars'\n\nimport { Event } from '../event/event'\n\nexport enum AttendeeStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(AttendeeStatus, {\n name: 'AttendeeStatus',\n description: 'state enumeration of a attendee'\n})\n\n@Entity()\n@Index('ix_attendee_0', (attendee: Attendee) => [attendee.email], { unique: false })\n@ObjectType({ description: 'Entity for Attendee' })\nexport class Attendee {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column()\n @Field(type => GraphQLEmailAddress, { nullable: true })\n email: string\n\n @ManyToMany(() => Event)\n @JoinTable()\n @Field({ nullable: true })\n events: Event[]\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Attendee } from './attendee';
|
|
2
|
+
import { AttendeeQuery } from './attendee-query';
|
|
3
|
+
import { AttendeeMutation } from './attendee-mutation';
|
|
4
|
+
export declare const entities: (typeof Attendee)[];
|
|
5
|
+
export declare const resolvers: (typeof AttendeeQuery | typeof AttendeeMutation)[];
|
|
6
|
+
export declare const subscribers: any[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Calendar } from './calendar';
|
|
2
|
+
import { NewCalendar, CalendarPatch } from './calendar-type';
|
|
3
|
+
export declare class CalendarMutation {
|
|
4
|
+
createCalendar(calendar: NewCalendar, context: ResolverContext): Promise<Calendar>;
|
|
5
|
+
updateCalendar(id: string, patch: CalendarPatch, context: ResolverContext): Promise<Calendar>;
|
|
6
|
+
updateMultipleCalendar(patches: CalendarPatch[], context: ResolverContext): Promise<Calendar[]>;
|
|
7
|
+
deleteCalendar(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteCalendars(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
importCalendars(calendars: CalendarPatch[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -64,6 +64,7 @@ let CalendarMutation = class CalendarMutation {
|
|
|
64
64
|
return true;
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
+
exports.CalendarMutation = CalendarMutation;
|
|
67
68
|
tslib_1.__decorate([
|
|
68
69
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
69
70
|
(0, type_graphql_1.Mutation)(returns => calendar_1.Calendar, { description: 'To create new Calendar' }),
|
|
@@ -119,8 +120,7 @@ tslib_1.__decorate([
|
|
|
119
120
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
120
121
|
tslib_1.__metadata("design:returntype", Promise)
|
|
121
122
|
], CalendarMutation.prototype, "importCalendars", null);
|
|
122
|
-
CalendarMutation = tslib_1.__decorate([
|
|
123
|
+
exports.CalendarMutation = CalendarMutation = tslib_1.__decorate([
|
|
123
124
|
(0, type_graphql_1.Resolver)(calendar_1.Calendar)
|
|
124
125
|
], CalendarMutation);
|
|
125
|
-
exports.CalendarMutation = CalendarMutation;
|
|
126
126
|
//# sourceMappingURL=calendar-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|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,IAAA,kBAAG,GAAE,CAAA;;;;8DAwCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;IAC9C,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sDAMjD;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAE3E,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDAUP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAE3E,mBAAA,IAAA,kBAAG,EAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,6BAAa,CAAC,CAAC,CAAA;IACzC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uDAWP;2BA5HU,gBAAgB;IAD5B,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,gBAAgB,CA6H5B","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Calendar } from './calendar'\nimport { NewCalendar, CalendarPatch } from './calendar-type'\n\n@Resolver(Calendar)\nexport class CalendarMutation {\n @Directive('@transaction')\n @Mutation(returns => Calendar, { description: 'To create new Calendar' })\n async createCalendar(@Arg('calendar') calendar: NewCalendar, @Ctx() context: ResolverContext): Promise<Calendar> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Calendar).save({\n ...calendar,\n domain,\n creator: user,\n updater: user\n })\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Calendar, { description: 'To modify Calendar information' })\n async updateCalendar(\n @Arg('id') id: string,\n @Arg('patch') patch: CalendarPatch,\n @Ctx() context: ResolverContext\n ): Promise<Calendar> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Calendar)\n const calendar = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n return await repository.save({\n ...calendar,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Calendar], { description: \"To modify multiple Calendars' information\" })\n async updateMultipleCalendar(\n @Arg('patches', type => [CalendarPatch]) patches: CalendarPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Calendar[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const calendarRepo = tx.getRepository(Calendar)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await calendarRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const calendar = await calendarRepo.findOneBy({ id: updateRecord.id })\n\n const result = await calendarRepo.save({\n ...calendar,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Calendar' })\n async deleteCalendar(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Calendar).delete({ domain: { id: domain.id }, id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Calendars' })\n async deleteCalendars(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Calendar).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Calendars' })\n async importCalendars(\n @Arg('calendars', type => [CalendarPatch]) calendars: CalendarPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n calendars.map(async (calendar: CalendarPatch) => {\n const createdCalendar: Calendar = await tx.getRepository(Calendar).save({ domain, ...calendar })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Calendar } from './calendar';
|
|
4
|
+
import { CalendarList } from './calendar-type';
|
|
5
|
+
export declare class CalendarQuery {
|
|
6
|
+
calendar(id: string, context: ResolverContext): Promise<Calendar>;
|
|
7
|
+
calendars(params: ListParam, context: ResolverContext): Promise<CalendarList>;
|
|
8
|
+
domain(calendar: Calendar): Promise<Domain>;
|
|
9
|
+
updater(calendar: Calendar): Promise<User>;
|
|
10
|
+
creator(calendar: Calendar): Promise<User>;
|
|
11
|
+
}
|
|
@@ -35,6 +35,7 @@ let CalendarQuery = class CalendarQuery {
|
|
|
35
35
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: calendar.creatorId });
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
exports.CalendarQuery = CalendarQuery;
|
|
38
39
|
tslib_1.__decorate([
|
|
39
40
|
(0, type_graphql_1.Query)(returns => calendar_1.Calendar, { nullable: true, description: 'To fetch a Calendar' }),
|
|
40
41
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -72,8 +73,7 @@ tslib_1.__decorate([
|
|
|
72
73
|
tslib_1.__metadata("design:paramtypes", [calendar_1.Calendar]),
|
|
73
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
74
75
|
], CalendarQuery.prototype, "creator", null);
|
|
75
|
-
CalendarQuery = tslib_1.__decorate([
|
|
76
|
+
exports.CalendarQuery = CalendarQuery = tslib_1.__decorate([
|
|
76
77
|
(0, type_graphql_1.Resolver)(calendar_1.Calendar)
|
|
77
78
|
], CalendarQuery);
|
|
78
|
-
exports.CalendarQuery = CalendarQuery;
|
|
79
79
|
//# sourceMappingURL=calendar-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-query.js","sourceRoot":"","sources":["../../../server/service/calendar/calendar-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,yCAAqC;AACrC,mDAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAa;IAElB,AAAN,KAAK,CAAC,QAAQ,CAAY,EAAU,EAAS,OAAwB;QACnE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAS,MAAiB,EAAS,OAAwB;QACxE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,mBAAQ,CAAC;YACzC,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CA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E,CAAA;;;;6CAM3C;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,4BAAY,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IAC9D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;8CAaxC;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;wBAvCU,aAAa;IADzB,IAAA,uBAAQ,EAAC,mBAAQ,CAAC;GACN,aAAa,CAwCzB","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 { Calendar } from './calendar'\nimport { CalendarList } from './calendar-type'\n\n@Resolver(Calendar)\nexport class CalendarQuery {\n @Query(returns => Calendar!, { nullable: true, description: 'To fetch a Calendar' })\n async calendar(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Calendar> {\n const { domain } = context.state\n\n return await getRepository(Calendar).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => CalendarList, { description: 'To fetch multiple Calendars' })\n async calendars(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<CalendarList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Calendar),\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() calendar: Calendar): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: calendar.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() calendar: Calendar): Promise<User> {\n return await getRepository(User).findOneBy({ id: calendar.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() calendar: Calendar): Promise<User> {\n return await getRepository(User).findOneBy({ id: calendar.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Calendar, CalendarStatus } from './calendar';
|
|
2
|
+
export declare class NewCalendar {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
state?: CalendarStatus;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
params?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class CalendarPatch {
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
state?: CalendarStatus;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
cuFlag?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class CalendarList {
|
|
18
|
+
items: Calendar[];
|
|
19
|
+
total: number;
|
|
20
|
+
}
|
|
@@ -6,6 +6,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
6
6
|
const calendar_1 = require("./calendar");
|
|
7
7
|
let NewCalendar = class NewCalendar {
|
|
8
8
|
};
|
|
9
|
+
exports.NewCalendar = NewCalendar;
|
|
9
10
|
tslib_1.__decorate([
|
|
10
11
|
(0, type_graphql_1.Field)(),
|
|
11
12
|
tslib_1.__metadata("design:type", String)
|
|
@@ -26,12 +27,12 @@ tslib_1.__decorate([
|
|
|
26
27
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
27
28
|
tslib_1.__metadata("design:type", String)
|
|
28
29
|
], NewCalendar.prototype, "params", void 0);
|
|
29
|
-
NewCalendar = tslib_1.__decorate([
|
|
30
|
+
exports.NewCalendar = NewCalendar = tslib_1.__decorate([
|
|
30
31
|
(0, type_graphql_1.InputType)()
|
|
31
32
|
], NewCalendar);
|
|
32
|
-
exports.NewCalendar = NewCalendar;
|
|
33
33
|
let CalendarPatch = class CalendarPatch {
|
|
34
34
|
};
|
|
35
|
+
exports.CalendarPatch = CalendarPatch;
|
|
35
36
|
tslib_1.__decorate([
|
|
36
37
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
37
38
|
tslib_1.__metadata("design:type", String)
|
|
@@ -56,12 +57,12 @@ tslib_1.__decorate([
|
|
|
56
57
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
57
58
|
tslib_1.__metadata("design:type", String)
|
|
58
59
|
], CalendarPatch.prototype, "cuFlag", void 0);
|
|
59
|
-
CalendarPatch = tslib_1.__decorate([
|
|
60
|
+
exports.CalendarPatch = CalendarPatch = tslib_1.__decorate([
|
|
60
61
|
(0, type_graphql_1.InputType)()
|
|
61
62
|
], CalendarPatch);
|
|
62
|
-
exports.CalendarPatch = CalendarPatch;
|
|
63
63
|
let CalendarList = class CalendarList {
|
|
64
64
|
};
|
|
65
|
+
exports.CalendarList = CalendarList;
|
|
65
66
|
tslib_1.__decorate([
|
|
66
67
|
(0, type_graphql_1.Field)(type => [calendar_1.Calendar]),
|
|
67
68
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -70,8 +71,7 @@ tslib_1.__decorate([
|
|
|
70
71
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
71
72
|
tslib_1.__metadata("design:type", Number)
|
|
72
73
|
], CalendarList.prototype, "total", void 0);
|
|
73
|
-
CalendarList = tslib_1.__decorate([
|
|
74
|
+
exports.CalendarList = CalendarList = tslib_1.__decorate([
|
|
74
75
|
(0, type_graphql_1.ObjectType)()
|
|
75
76
|
], CalendarList);
|
|
76
|
-
exports.CalendarList = CalendarList;
|
|
77
77
|
//# sourceMappingURL=calendar-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-type.js","sourceRoot":"","sources":["../../../server/service/calendar/calendar-type.ts"],"names":[],"mappings":";;;;AAEA,+CAAsF;AAItF,yCAAqD;AAG9C,IAAM,WAAW,GAAjB,MAAM,WAAW;CAevB,CAAA;
|
|
1
|
+
{"version":3,"file":"calendar-type.js","sourceRoot":"","sources":["../../../server/service/calendar/calendar-type.ts"],"names":[],"mappings":";;;;AAEA,+CAAsF;AAItF,yCAAqD;AAG9C,IAAM,WAAW,GAAjB,MAAM,WAAW;CAevB,CAAA;AAfY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yBAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC5B;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACX;sBAdJ,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAevB;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAkBzB,CAAA;AAlBY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC3B;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yBAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5B;AAGtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACX;wBAjBJ,aAAa;IADzB,IAAA,wBAAS,GAAE;GACC,aAAa,CAkBzB;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAY;CAMxB,CAAA;AANY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAQ,CAAC,CAAC;;2CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;2CACN;uBALF,YAAY;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Calendar, CalendarStatus } from './calendar'\n\n@InputType()\nexport class NewCalendar {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => CalendarStatus, { nullable: true })\n state?: CalendarStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n params?: string\n}\n\n@InputType()\nexport class CalendarPatch {\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(type => CalendarStatus, { nullable: true })\n state?: CalendarStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class CalendarList {\n @Field(type => [Calendar])\n items: Calendar[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
export declare enum CalendarStatus {
|
|
4
|
+
STATUS_A = "STATUS_A",
|
|
5
|
+
STATUS_B = "STATUS_B"
|
|
6
|
+
}
|
|
7
|
+
export declare class Calendar {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
domain?: Domain;
|
|
10
|
+
domainId?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
active?: boolean;
|
|
14
|
+
state?: CalendarStatus;
|
|
15
|
+
params?: string;
|
|
16
|
+
createdAt?: Date;
|
|
17
|
+
updatedAt?: Date;
|
|
18
|
+
creator?: User;
|
|
19
|
+
creatorId?: string;
|
|
20
|
+
updater?: User;
|
|
21
|
+
updaterId?: string;
|
|
22
|
+
}
|
|
@@ -10,13 +10,14 @@ var CalendarStatus;
|
|
|
10
10
|
(function (CalendarStatus) {
|
|
11
11
|
CalendarStatus["STATUS_A"] = "STATUS_A";
|
|
12
12
|
CalendarStatus["STATUS_B"] = "STATUS_B";
|
|
13
|
-
})(CalendarStatus
|
|
13
|
+
})(CalendarStatus || (exports.CalendarStatus = CalendarStatus = {}));
|
|
14
14
|
(0, type_graphql_1.registerEnumType)(CalendarStatus, {
|
|
15
15
|
name: 'CalendarStatus',
|
|
16
16
|
description: 'state enumeration of a calendar'
|
|
17
17
|
});
|
|
18
18
|
let Calendar = class Calendar {
|
|
19
19
|
};
|
|
20
|
+
exports.Calendar = Calendar;
|
|
20
21
|
tslib_1.__decorate([
|
|
21
22
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
22
23
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -84,10 +85,9 @@ tslib_1.__decorate([
|
|
|
84
85
|
(0, typeorm_1.RelationId)((calendar) => calendar.updater),
|
|
85
86
|
tslib_1.__metadata("design:type", String)
|
|
86
87
|
], Calendar.prototype, "updaterId", void 0);
|
|
87
|
-
Calendar = tslib_1.__decorate([
|
|
88
|
+
exports.Calendar = Calendar = tslib_1.__decorate([
|
|
88
89
|
(0, typeorm_1.Entity)(),
|
|
89
90
|
(0, typeorm_1.Index)('ix_calendar_0', (calendar) => [calendar.domain, calendar.name], { unique: true }),
|
|
90
91
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Calendar' })
|
|
91
92
|
], Calendar);
|
|
92
|
-
exports.Calendar = Calendar;
|
|
93
93
|
//# sourceMappingURL=calendar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../server/service/calendar/calendar.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../server/service/calendar/calendar.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAA,+BAAgB,EAAC,cAAc,EAAE;IAC/B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iCAAiC;CAC/C,CAAC,CAAA;AAKK,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAqDpB,CAAA;AArDY,4BAAQ;AAGV;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,I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E,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;yCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;AAIlB;IAFC,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;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;;2CACnC;mBApDP,QAAQ;IAHpB,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,yBAAU,EAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;GACtC,QAAQ,CAqDpB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum CalendarStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(CalendarStatus, {\n name: 'CalendarStatus',\n description: 'state enumeration of a calendar'\n})\n\n@Entity()\n@Index('ix_calendar_0', (calendar: Calendar) => [calendar.domain, calendar.name], { unique: true })\n@ObjectType({ description: 'Entity for Calendar' })\nexport class Calendar {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((calendar: Calendar) => calendar.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 active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: CalendarStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: 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 })\n creator?: User\n\n @RelationId((calendar: Calendar) => calendar.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((calendar: Calendar) => calendar.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Calendar } from './calendar';
|
|
2
|
+
import { CalendarQuery } from './calendar-query';
|
|
3
|
+
import { CalendarMutation } from './calendar-mutation';
|
|
4
|
+
export declare const entities: (typeof Calendar)[];
|
|
5
|
+
export declare const resolvers: (typeof CalendarQuery | typeof CalendarMutation)[];
|
|
6
|
+
export declare const subscribers: any[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Event } from './event';
|
|
2
|
+
import { NewEvent, EventPatch } from './event-type';
|
|
3
|
+
export declare class EventMutation {
|
|
4
|
+
createEvent(event: NewEvent, context: ResolverContext): Promise<Event>;
|
|
5
|
+
updateEvent(id: string, patch: EventPatch, context: ResolverContext): Promise<Event>;
|
|
6
|
+
updateMultipleEvent(patches: EventPatch[], context: ResolverContext): Promise<Event[]>;
|
|
7
|
+
deleteEvent(id: string, context: ResolverContext): Promise<boolean>;
|
|
8
|
+
deleteEvents(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
9
|
+
importEvents(events: EventPatch[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
}
|