@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
|
@@ -62,6 +62,7 @@ let EventMutation = class EventMutation {
|
|
|
62
62
|
return true;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
+
exports.EventMutation = EventMutation;
|
|
65
66
|
tslib_1.__decorate([
|
|
66
67
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
67
68
|
(0, type_graphql_1.Mutation)(returns => event_1.Event, { description: 'To create new Event' }),
|
|
@@ -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
|
], EventMutation.prototype, "importEvents", null);
|
|
120
|
-
EventMutation = tslib_1.__decorate([
|
|
121
|
+
exports.EventMutation = EventMutation = tslib_1.__decorate([
|
|
121
122
|
(0, type_graphql_1.Resolver)(event_1.Event)
|
|
122
123
|
], EventMutation);
|
|
123
|
-
exports.EventMutation = EventMutation;
|
|
124
124
|
//# sourceMappingURL=event-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-mutation.js","sourceRoot":"","sources":["../../../server/service/event/event-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,mCAA+B;AAC/B,6CAAmD;AAG5C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,WAAW,CAAe,KAAe,EAAS,OAAwB;QAC9E,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,OAAO,MAAM,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAC,IAAI,iCACpC,KAAK,KACR,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,WAAW,CACJ,EAAU,EACP,KAAiB,EACxB,OAAwB;QAE/B,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAElC,MAAM,UAAU,GAAG,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YACrC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,KAAK,GACL,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,mBAAmB,CACe,OAAqB,EACpD,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,M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AAW,EAAE,2BAA2B,EAAE,CAAC;IACvD,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAAiB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAQrE;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAExE,mBAAA,IAAA,kBAAG,EAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,uBAAU,CAAC,CAAC,CAAA;IACnC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;iDAWP;wBApHU,aAAa;IADzB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,aAAa,CAqHzB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { Event } from './event'\nimport { NewEvent, EventPatch } from './event-type'\n\n@Resolver(Event)\nexport class EventMutation {\n @Directive('@transaction')\n @Mutation(returns => Event, { description: 'To create new Event' })\n async createEvent(@Arg('event') event: NewEvent, @Ctx() context: ResolverContext): Promise<Event> {\n const { user, tx } = context.state\n\n return await tx.getRepository(Event).save({\n ...event,\n creator: user,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => Event, { description: 'To modify Event information' })\n async updateEvent(\n @Arg('id') id: string,\n @Arg('patch') patch: EventPatch,\n @Ctx() context: ResolverContext\n ): Promise<Event> {\n const { user, tx } = context.state\n\n const repository = tx.getRepository(Event)\n const event = await repository.findOne({\n where: { id }\n })\n\n return await repository.save({\n ...event,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Event], { description: \"To modify multiple Events' information\" })\n async updateMultipleEvent(\n @Arg('patches', type => [EventPatch]) patches: EventPatch[],\n @Ctx() context: ResolverContext\n ): Promise<Event[]> {\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 eventRepo = tx.getRepository(Event)\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 eventRepo.save({\n ...newRecord,\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 event = await eventRepo.findOneBy({ id: updateRecord.id })\n\n const result = await eventRepo.save({\n ...event,\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 Event' })\n async deleteEvent(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(Event).delete({ id })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Events' })\n async deleteEvents(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { tx } = context.state\n\n await tx.getRepository(Event).delete({\n id: In(ids)\n })\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Events' })\n async importEvents(\n @Arg('events', type => [EventPatch]) events: EventPatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { tx } = context.state\n\n await Promise.all(\n events.map(async (event: EventPatch) => {\n const createdEvent: Event = await tx.getRepository(Event).save({ ...event })\n })\n )\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListParam } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { Event } from './event';
|
|
4
|
+
import { EventList } from './event-type';
|
|
5
|
+
export declare class EventQuery {
|
|
6
|
+
event(id: string, context: ResolverContext): Promise<Event>;
|
|
7
|
+
events(params: ListParam, context: ResolverContext): Promise<EventList>;
|
|
8
|
+
updater(event: Event): Promise<User>;
|
|
9
|
+
creator(event: Event): Promise<User>;
|
|
10
|
+
}
|
|
@@ -29,6 +29,7 @@ let EventQuery = class EventQuery {
|
|
|
29
29
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: event.creatorId });
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
exports.EventQuery = EventQuery;
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
(0, type_graphql_1.Query)(returns => event_1.Event, { nullable: true, description: 'To fetch a Event' }),
|
|
34
35
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
@@ -59,8 +60,7 @@ tslib_1.__decorate([
|
|
|
59
60
|
tslib_1.__metadata("design:paramtypes", [event_1.Event]),
|
|
60
61
|
tslib_1.__metadata("design:returntype", Promise)
|
|
61
62
|
], EventQuery.prototype, "creator", null);
|
|
62
|
-
EventQuery = tslib_1.__decorate([
|
|
63
|
+
exports.EventQuery = EventQuery = tslib_1.__decorate([
|
|
63
64
|
(0, type_graphql_1.Resolver)(event_1.Event)
|
|
64
65
|
], EventQuery);
|
|
65
|
-
exports.EventQuery = EventQuery;
|
|
66
66
|
//# sourceMappingURL=event-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-query.js","sourceRoot":"","sources":["../../../server/service/event/event-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAA+F;AAC/F,yDAAgD;AAChD,mCAA+B;AAC/B,6CAAwC;AAGjC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU,EAAS,OAAwB;QAChE,OAAO,MAAM,IAAA,qBAAa,EAAC,aAAK,CAAC,CAAC,OAAO,CAAC;Y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ACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;qBA7BU,UAAU;IADtB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,UAAU,CA8BtB","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 { Event } from './event'\nimport { EventList } from './event-type'\n\n@Resolver(Event)\nexport class EventQuery {\n @Query(returns => Event!, { nullable: true, description: 'To fetch a Event' })\n async event(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Event> {\n return await getRepository(Event).findOne({\n where: { id }\n })\n }\n\n @Query(returns => EventList, { description: 'To fetch multiple Events' })\n async events(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<EventList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(Event),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => User)\n async updater(@Root() event: Event): Promise<User> {\n return await getRepository(User).findOneBy({ id: event.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() event: Event): Promise<User> {\n return await getRepository(User).findOneBy({ id: event.creatorId })\n }\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { FileUpload } from 'graphql-upload/GraphQLUpload.js';
|
|
2
|
+
import { Event, EventStatus } from './event';
|
|
3
|
+
export declare class NewEvent {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
state?: EventStatus;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
params?: string;
|
|
9
|
+
thumbnail?: FileUpload;
|
|
10
|
+
}
|
|
11
|
+
export declare class EventPatch {
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
state?: EventStatus;
|
|
16
|
+
active?: boolean;
|
|
17
|
+
thumbnail?: FileUpload;
|
|
18
|
+
cuFlag?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class EventList {
|
|
21
|
+
items: Event[];
|
|
22
|
+
total: number;
|
|
23
|
+
}
|
|
@@ -7,6 +7,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
7
7
|
const event_1 = require("./event");
|
|
8
8
|
let NewEvent = class NewEvent {
|
|
9
9
|
};
|
|
10
|
+
exports.NewEvent = NewEvent;
|
|
10
11
|
tslib_1.__decorate([
|
|
11
12
|
(0, type_graphql_1.Field)(),
|
|
12
13
|
tslib_1.__metadata("design:type", String)
|
|
@@ -31,12 +32,12 @@ tslib_1.__decorate([
|
|
|
31
32
|
(0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true }),
|
|
32
33
|
tslib_1.__metadata("design:type", Object)
|
|
33
34
|
], NewEvent.prototype, "thumbnail", void 0);
|
|
34
|
-
NewEvent = tslib_1.__decorate([
|
|
35
|
+
exports.NewEvent = NewEvent = tslib_1.__decorate([
|
|
35
36
|
(0, type_graphql_1.InputType)()
|
|
36
37
|
], NewEvent);
|
|
37
|
-
exports.NewEvent = NewEvent;
|
|
38
38
|
let EventPatch = class EventPatch {
|
|
39
39
|
};
|
|
40
|
+
exports.EventPatch = EventPatch;
|
|
40
41
|
tslib_1.__decorate([
|
|
41
42
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
42
43
|
tslib_1.__metadata("design:type", String)
|
|
@@ -65,12 +66,12 @@ tslib_1.__decorate([
|
|
|
65
66
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
66
67
|
tslib_1.__metadata("design:type", String)
|
|
67
68
|
], EventPatch.prototype, "cuFlag", void 0);
|
|
68
|
-
EventPatch = tslib_1.__decorate([
|
|
69
|
+
exports.EventPatch = EventPatch = tslib_1.__decorate([
|
|
69
70
|
(0, type_graphql_1.InputType)()
|
|
70
71
|
], EventPatch);
|
|
71
|
-
exports.EventPatch = EventPatch;
|
|
72
72
|
let EventList = class EventList {
|
|
73
73
|
};
|
|
74
|
+
exports.EventList = EventList;
|
|
74
75
|
tslib_1.__decorate([
|
|
75
76
|
(0, type_graphql_1.Field)(type => [event_1.Event]),
|
|
76
77
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -79,8 +80,7 @@ tslib_1.__decorate([
|
|
|
79
80
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
80
81
|
tslib_1.__metadata("design:type", Number)
|
|
81
82
|
], EventList.prototype, "total", void 0);
|
|
82
|
-
EventList = tslib_1.__decorate([
|
|
83
|
+
exports.EventList = EventList = tslib_1.__decorate([
|
|
83
84
|
(0, type_graphql_1.ObjectType)()
|
|
84
85
|
], EventList);
|
|
85
|
-
exports.EventList = EventList;
|
|
86
86
|
//# sourceMappingURL=event-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-type.js","sourceRoot":"","sources":["../../../server/service/event/event-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAsF;AAItF,mCAA4C;AAGrC,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAkBpB,CAAA;
|
|
1
|
+
{"version":3,"file":"event-type.js","sourceRoot":"","sources":["../../../server/service/event/event-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAsF;AAItF,mCAA4C;AAGrC,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAkBpB,CAAA;AAlBY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,GAAE;;sCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,mBA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,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,aAAK,CAAC,CAAC;;wCACT;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wCACN;oBALF,SAAS;IADrB,IAAA,yBAAU,GAAE;GACA,SAAS,CAMrB","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 { Event, EventStatus } from './event'\n\n@InputType()\nexport class NewEvent {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => EventStatus, { nullable: true })\n state?: EventStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n params?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class EventPatch {\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 => EventStatus, { nullable: true })\n state?: EventStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class EventList {\n @Field(type => [Event])\n items: Event[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Attendee } from '../attendee/attendee';
|
|
3
|
+
export declare enum EventStatus {
|
|
4
|
+
STATUS_A = "STATUS_A",
|
|
5
|
+
STATUS_B = "STATUS_B"
|
|
6
|
+
}
|
|
7
|
+
export declare class Event {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
startDateTime: Date;
|
|
12
|
+
endDateTime: Date;
|
|
13
|
+
location: string;
|
|
14
|
+
attendees: Attendee[];
|
|
15
|
+
state?: EventStatus;
|
|
16
|
+
createdAt?: Date;
|
|
17
|
+
updatedAt?: Date;
|
|
18
|
+
creator?: User;
|
|
19
|
+
creatorId?: string;
|
|
20
|
+
updater?: User;
|
|
21
|
+
updaterId?: string;
|
|
22
|
+
}
|
|
@@ -10,13 +10,14 @@ var EventStatus;
|
|
|
10
10
|
(function (EventStatus) {
|
|
11
11
|
EventStatus["STATUS_A"] = "STATUS_A";
|
|
12
12
|
EventStatus["STATUS_B"] = "STATUS_B";
|
|
13
|
-
})(EventStatus
|
|
13
|
+
})(EventStatus || (exports.EventStatus = EventStatus = {}));
|
|
14
14
|
(0, type_graphql_1.registerEnumType)(EventStatus, {
|
|
15
15
|
name: 'EventStatus',
|
|
16
16
|
description: 'state enumeration of a event'
|
|
17
17
|
});
|
|
18
18
|
let Event = class Event {
|
|
19
19
|
};
|
|
20
|
+
exports.Event = Event;
|
|
20
21
|
tslib_1.__decorate([
|
|
21
22
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
22
23
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -86,9 +87,8 @@ tslib_1.__decorate([
|
|
|
86
87
|
(0, typeorm_1.RelationId)((event) => event.updater),
|
|
87
88
|
tslib_1.__metadata("design:type", String)
|
|
88
89
|
], Event.prototype, "updaterId", void 0);
|
|
89
|
-
Event = tslib_1.__decorate([
|
|
90
|
+
exports.Event = Event = tslib_1.__decorate([
|
|
90
91
|
(0, typeorm_1.Entity)(),
|
|
91
92
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Event' })
|
|
92
93
|
], Event);
|
|
93
|
-
exports.Event = Event;
|
|
94
94
|
//# sourceMappingURL=event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../server/service/event/event.ts"],"names":[],"mappings":";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BAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;sCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;wCAC1B;gBAtDP,KAAK;IAFjB,IAAA,gBAAM,GAAE;IACR,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;GACnC,KAAK,CAuDjB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n ManyToMany,\n JoinTable,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Attendee } from '../attendee/attendee'\n\nexport enum EventStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(EventStatus, {\n name: 'EventStatus',\n description: 'state enumeration of a event'\n})\n\n@Entity()\n@ObjectType({ description: 'Entity for Event' })\nexport class Event {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: 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({ type: 'datetime' })\n @Field({ nullable: true })\n startDateTime: Date\n\n @Column({ type: 'datetime' })\n @Field({ nullable: true })\n endDateTime: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n location: string\n\n @ManyToMany(() => Attendee)\n @JoinTable()\n @Field(type => [Attendee], { nullable: true })\n attendees: Attendee[]\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: EventStatus\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((event: Event) => event.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((event: Event) => event.updater)\n updaterId?: string\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Event } from './event';
|
|
2
|
+
import { EventQuery } from './event-query';
|
|
3
|
+
import { EventMutation } from './event-mutation';
|
|
4
|
+
export declare const entities: (typeof Event)[];
|
|
5
|
+
export declare const resolvers: (typeof EventQuery | typeof EventMutation)[];
|
|
6
|
+
export declare const subscribers: any[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './attendee/attendee';
|
|
2
|
+
export * from './event/event';
|
|
3
|
+
export * from './calendar/calendar';
|
|
4
|
+
export declare const entities: (typeof import("./event/event").Event | typeof import("./attendee/attendee").Attendee | typeof import("./calendar/calendar").Calendar)[];
|
|
5
|
+
export declare const subscribers: any[];
|
|
6
|
+
export declare const schema: {
|
|
7
|
+
resolverClasses: (typeof import("./attendee/attendee-query").AttendeeQuery | typeof import("./attendee/attendee-mutation").AttendeeMutation | typeof import("./event/event-query").EventQuery | typeof import("./event/event-mutation").EventMutation | typeof import("./calendar/calendar-query").CalendarQuery | typeof import("./calendar/calendar-mutation").CalendarMutation)[];
|
|
8
|
+
};
|