@things-factory/gallery 10.1.248 → 10.1.249

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.
Files changed (75) hide show
  1. package/dist-client/bootstrap.d.ts +2 -0
  2. package/dist-client/bootstrap.js +26 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/components/gallery-forms.d.ts +31 -0
  5. package/dist-client/components/gallery-forms.js +223 -0
  6. package/dist-client/components/gallery-forms.js.map +1 -0
  7. package/dist-client/components/gallery-saver-setting-let.d.ts +11 -0
  8. package/dist-client/components/gallery-saver-setting-let.js +81 -0
  9. package/dist-client/components/gallery-saver-setting-let.js.map +1 -0
  10. package/dist-client/components/gallery-show.d.ts +46 -0
  11. package/dist-client/components/gallery-show.js +316 -0
  12. package/dist-client/components/gallery-show.js.map +1 -0
  13. package/dist-client/components/gallery-uploader.d.ts +57 -0
  14. package/dist-client/components/gallery-uploader.js +624 -0
  15. package/dist-client/components/gallery-uploader.js.map +1 -0
  16. package/dist-client/components/gallery-viewer.d.ts +30 -0
  17. package/dist-client/components/gallery-viewer.js +429 -0
  18. package/dist-client/components/gallery-viewer.js.map +1 -0
  19. package/dist-client/index.d.ts +1 -0
  20. package/dist-client/index.js +2 -0
  21. package/dist-client/index.js.map +1 -0
  22. package/dist-client/pages/gallery-page.d.ts +54 -0
  23. package/dist-client/pages/gallery-page.js +590 -0
  24. package/dist-client/pages/gallery-page.js.map +1 -0
  25. package/dist-client/route.d.ts +1 -0
  26. package/dist-client/route.js +9 -0
  27. package/dist-client/route.js.map +1 -0
  28. package/dist-client/tsconfig.tsbuildinfo +1 -0
  29. package/dist-client/utils/gallery-api.d.ts +99 -0
  30. package/dist-client/utils/gallery-api.js +46 -0
  31. package/dist-client/utils/gallery-api.js.map +1 -0
  32. package/dist-client/utils/gallery-badge.d.ts +4 -0
  33. package/dist-client/utils/gallery-badge.js +45 -0
  34. package/dist-client/utils/gallery-badge.js.map +1 -0
  35. package/dist-client/utils/gallery-saver.d.ts +6 -0
  36. package/dist-client/utils/gallery-saver.js +69 -0
  37. package/dist-client/utils/gallery-saver.js.map +1 -0
  38. package/dist-client/utils/gallery-words.d.ts +7 -0
  39. package/dist-client/utils/gallery-words.js +20 -0
  40. package/dist-client/utils/gallery-words.js.map +1 -0
  41. package/dist-client/utils/photo-prep.d.ts +10 -0
  42. package/dist-client/utils/photo-prep.js +102 -0
  43. package/dist-client/utils/photo-prep.js.map +1 -0
  44. package/dist-server/attachment-reader.d.ts +1 -0
  45. package/dist-server/attachment-reader.js +13 -0
  46. package/dist-server/attachment-reader.js.map +1 -0
  47. package/dist-server/index.d.ts +1 -0
  48. package/dist-server/index.js +11 -0
  49. package/dist-server/index.js.map +1 -0
  50. package/dist-server/role-tasks.d.ts +2 -0
  51. package/dist-server/role-tasks.js +15 -0
  52. package/dist-server/role-tasks.js.map +1 -0
  53. package/dist-server/service/gallery/gallery-resolver.d.ts +29 -0
  54. package/dist-server/service/gallery/gallery-resolver.js +613 -0
  55. package/dist-server/service/gallery/gallery-resolver.js.map +1 -0
  56. package/dist-server/service/gallery/gallery-rules.d.ts +90 -0
  57. package/dist-server/service/gallery/gallery-rules.js +182 -0
  58. package/dist-server/service/gallery/gallery-rules.js.map +1 -0
  59. package/dist-server/service/gallery/gallery-service.d.ts +37 -0
  60. package/dist-server/service/gallery/gallery-service.js +234 -0
  61. package/dist-server/service/gallery/gallery-service.js.map +1 -0
  62. package/dist-server/service/gallery/gallery-types.d.ts +65 -0
  63. package/dist-server/service/gallery/gallery-types.js +239 -0
  64. package/dist-server/service/gallery/gallery-types.js.map +1 -0
  65. package/dist-server/service/gallery/gallery.d.ts +84 -0
  66. package/dist-server/service/gallery/gallery.js +335 -0
  67. package/dist-server/service/gallery/gallery.js.map +1 -0
  68. package/dist-server/service/gallery/index.d.ts +4 -0
  69. package/dist-server/service/gallery/index.js +8 -0
  70. package/dist-server/service/gallery/index.js.map +1 -0
  71. package/dist-server/service/index.d.ts +7 -0
  72. package/dist-server/service/index.js +23 -0
  73. package/dist-server/service/index.js.map +1 -0
  74. package/dist-server/tsconfig.tsbuildinfo +1 -0
  75. package/package.json +2 -2
@@ -0,0 +1,84 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { Event } from '@things-factory/calendar';
3
+ import { Domain } from '@things-factory/shell';
4
+ /** Where a post lives. The company's is seen by everyone of the domain; the person's own by them, and by everyone once shared. */
5
+ export declare enum GallerySpace {
6
+ /** The company's - events, workshops and work. */
7
+ COMPANY = "COMPANY",
8
+ /** The person's own - their days, hobbies and pets. */
9
+ PERSONAL = "PERSONAL"
10
+ }
11
+ export declare class GalleryPost {
12
+ readonly id: string;
13
+ domain?: Domain;
14
+ domainId?: string;
15
+ space: GallerySpace;
16
+ shared: boolean;
17
+ caption?: string;
18
+ takenAt: Date;
19
+ tags?: string[];
20
+ event?: Event;
21
+ eventId?: string;
22
+ likeCount: number;
23
+ hiddenAt?: Date;
24
+ hiddenReason?: string;
25
+ hiddenBy?: User;
26
+ hiddenById?: string;
27
+ createdAt?: Date;
28
+ updatedAt?: Date;
29
+ deletedAt?: Date;
30
+ creator?: User;
31
+ creatorId?: string;
32
+ updater?: User;
33
+ updaterId?: string;
34
+ }
35
+ export declare class GalleryLike {
36
+ readonly id: string;
37
+ domain?: Domain;
38
+ domainId?: string;
39
+ post?: GalleryPost;
40
+ postId?: string;
41
+ user?: User;
42
+ userId?: string;
43
+ createdAt?: Date;
44
+ updatedAt?: Date;
45
+ deletedAt?: Date;
46
+ creator?: User;
47
+ creatorId?: string;
48
+ updater?: User;
49
+ updaterId?: string;
50
+ }
51
+ /**
52
+ * A calendar event whose gallery is open - opened by a moderator making the event from the gallery, or by the first post
53
+ * linked to it. Everyone of the domain may post to an open event (ADR-0165 사용자 판정 1).
54
+ */
55
+ export declare class GalleryEvent {
56
+ readonly id: string;
57
+ domain?: Domain;
58
+ domainId?: string;
59
+ event?: Event;
60
+ eventId?: string;
61
+ createdAt?: Date;
62
+ updatedAt?: Date;
63
+ deletedAt?: Date;
64
+ creator?: User;
65
+ creatorId?: string;
66
+ updater?: User;
67
+ updaterId?: string;
68
+ }
69
+ /** When a person last opened the gallery - the menu counts the posts that came after. */
70
+ export declare class GalleryVisit {
71
+ readonly id: string;
72
+ domain?: Domain;
73
+ domainId?: string;
74
+ user?: User;
75
+ userId?: string;
76
+ seenAt: Date;
77
+ createdAt?: Date;
78
+ updatedAt?: Date;
79
+ deletedAt?: Date;
80
+ creator?: User;
81
+ creatorId?: string;
82
+ updater?: User;
83
+ updaterId?: string;
84
+ }
@@ -0,0 +1,335 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GalleryVisit = exports.GalleryEvent = exports.GalleryLike = exports.GalleryPost = exports.GallerySpace = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /*
6
+ * The tables of the gallery (ADR-0165 decisions 2, 4-6): a post of photos, a like, an event its gallery is open for,
7
+ * and when a person last looked. The photos themselves are attachments hung on the post (`refType: 'Gallery Post'`);
8
+ * an event is calendar's.
9
+ */
10
+ const typeorm_1 = require("typeorm");
11
+ const type_graphql_1 = require("type-graphql");
12
+ const auth_base_1 = require("@things-factory/auth-base");
13
+ const calendar_1 = require("@things-factory/calendar");
14
+ const shell_1 = require("@things-factory/shell");
15
+ /** Where a post lives. The company's is seen by everyone of the domain; the person's own by them, and by everyone once shared. */
16
+ var GallerySpace;
17
+ (function (GallerySpace) {
18
+ /** The company's - events, workshops and work. */
19
+ GallerySpace["COMPANY"] = "COMPANY";
20
+ /** The person's own - their days, hobbies and pets. */
21
+ GallerySpace["PERSONAL"] = "PERSONAL";
22
+ })(GallerySpace || (exports.GallerySpace = GallerySpace = {}));
23
+ (0, type_graphql_1.registerEnumType)(GallerySpace, {
24
+ name: 'GallerySpace',
25
+ description: "Where a gallery post lives: the company's gallery or the person's own."
26
+ });
27
+ let GalleryPost = class GalleryPost {
28
+ };
29
+ exports.GalleryPost = GalleryPost;
30
+ tslib_1.__decorate([
31
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
32
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Post id.' }),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], GalleryPost.prototype, "id", void 0);
35
+ tslib_1.__decorate([
36
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
37
+ (0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain the post is in.' }),
38
+ tslib_1.__metadata("design:type", shell_1.Domain)
39
+ ], GalleryPost.prototype, "domain", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.RelationId)((one) => one.domain),
42
+ tslib_1.__metadata("design:type", String)
43
+ ], GalleryPost.prototype, "domainId", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.Column)({ default: GallerySpace.COMPANY }),
46
+ (0, type_graphql_1.Field)(type => GallerySpace, { description: "The company's gallery or the person's own." }),
47
+ tslib_1.__metadata("design:type", String)
48
+ ], GalleryPost.prototype, "space", void 0);
49
+ tslib_1.__decorate([
50
+ (0, typeorm_1.Column)({ default: false }),
51
+ (0, type_graphql_1.Field)({ description: "Whether a post of the person's own gallery is open to everyone of the domain; the company's always is." }),
52
+ tslib_1.__metadata("design:type", Boolean)
53
+ ], GalleryPost.prototype, "shared", void 0);
54
+ tslib_1.__decorate([
55
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
56
+ (0, type_graphql_1.Field)({ nullable: true, description: 'A short caption, plain text.' }),
57
+ tslib_1.__metadata("design:type", String)
58
+ ], GalleryPost.prototype, "caption", void 0);
59
+ tslib_1.__decorate([
60
+ (0, typeorm_1.Column)(),
61
+ (0, type_graphql_1.Field)({ description: 'When the photos were taken - from the first photo, or when it was posted.' }),
62
+ tslib_1.__metadata("design:type", Date)
63
+ ], GalleryPost.prototype, "takenAt", void 0);
64
+ tslib_1.__decorate([
65
+ (0, typeorm_1.Column)('simple-json', { nullable: true }),
66
+ (0, type_graphql_1.Field)(type => [String], { nullable: true, description: 'The tags, without the # mark.' }),
67
+ tslib_1.__metadata("design:type", Array)
68
+ ], GalleryPost.prototype, "tags", void 0);
69
+ tslib_1.__decorate([
70
+ (0, typeorm_1.ManyToOne)(type => calendar_1.Event, { nullable: true }),
71
+ tslib_1.__metadata("design:type", calendar_1.Event)
72
+ ], GalleryPost.prototype, "event", void 0);
73
+ tslib_1.__decorate([
74
+ (0, typeorm_1.RelationId)((one) => one.event),
75
+ tslib_1.__metadata("design:type", String)
76
+ ], GalleryPost.prototype, "eventId", void 0);
77
+ tslib_1.__decorate([
78
+ (0, typeorm_1.Column)('int', { default: 0 }),
79
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'How many people like it.' }),
80
+ tslib_1.__metadata("design:type", Number)
81
+ ], GalleryPost.prototype, "likeCount", void 0);
82
+ tslib_1.__decorate([
83
+ (0, typeorm_1.Column)({ nullable: true }),
84
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When a moderator hid it; hidden, only its owner and the moderators see it.' }),
85
+ tslib_1.__metadata("design:type", Date)
86
+ ], GalleryPost.prototype, "hiddenAt", void 0);
87
+ tslib_1.__decorate([
88
+ (0, typeorm_1.Column)({ nullable: true }),
89
+ tslib_1.__metadata("design:type", String)
90
+ ], GalleryPost.prototype, "hiddenReason", void 0);
91
+ tslib_1.__decorate([
92
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
93
+ tslib_1.__metadata("design:type", auth_base_1.User)
94
+ ], GalleryPost.prototype, "hiddenBy", void 0);
95
+ tslib_1.__decorate([
96
+ (0, typeorm_1.RelationId)((one) => one.hiddenBy),
97
+ tslib_1.__metadata("design:type", String)
98
+ ], GalleryPost.prototype, "hiddenById", void 0);
99
+ tslib_1.__decorate([
100
+ (0, typeorm_1.CreateDateColumn)(),
101
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it was posted.' }),
102
+ tslib_1.__metadata("design:type", Date)
103
+ ], GalleryPost.prototype, "createdAt", void 0);
104
+ tslib_1.__decorate([
105
+ (0, typeorm_1.UpdateDateColumn)(),
106
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When it last changed.' }),
107
+ tslib_1.__metadata("design:type", Date)
108
+ ], GalleryPost.prototype, "updatedAt", void 0);
109
+ tslib_1.__decorate([
110
+ (0, typeorm_1.DeleteDateColumn)(),
111
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When its owner deleted it.' }),
112
+ tslib_1.__metadata("design:type", Date)
113
+ ], GalleryPost.prototype, "deletedAt", void 0);
114
+ tslib_1.__decorate([
115
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
116
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who posted it - the owner.' }),
117
+ tslib_1.__metadata("design:type", auth_base_1.User)
118
+ ], GalleryPost.prototype, "creator", void 0);
119
+ tslib_1.__decorate([
120
+ (0, typeorm_1.RelationId)((one) => one.creator),
121
+ tslib_1.__metadata("design:type", String)
122
+ ], GalleryPost.prototype, "creatorId", void 0);
123
+ tslib_1.__decorate([
124
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
125
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
126
+ tslib_1.__metadata("design:type", auth_base_1.User)
127
+ ], GalleryPost.prototype, "updater", void 0);
128
+ tslib_1.__decorate([
129
+ (0, typeorm_1.RelationId)((one) => one.updater),
130
+ tslib_1.__metadata("design:type", String)
131
+ ], GalleryPost.prototype, "updaterId", void 0);
132
+ exports.GalleryPost = GalleryPost = tslib_1.__decorate([
133
+ (0, typeorm_1.Entity)(),
134
+ (0, typeorm_1.Index)('ix_gallery_post_0', (one) => [one.domain, one.createdAt]),
135
+ (0, typeorm_1.Index)('ix_gallery_post_1', (one) => [one.domain, one.event]),
136
+ (0, typeorm_1.Index)('ix_gallery_post_2', (one) => [one.domain, one.creator]),
137
+ (0, type_graphql_1.ObjectType)({
138
+ description: "A post of the gallery - one or more photos, a short caption and tags; the company's seen by everyone of the domain."
139
+ })
140
+ ], GalleryPost);
141
+ let GalleryLike = class GalleryLike {
142
+ };
143
+ exports.GalleryLike = GalleryLike;
144
+ tslib_1.__decorate([
145
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
146
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Like id.' }),
147
+ tslib_1.__metadata("design:type", String)
148
+ ], GalleryLike.prototype, "id", void 0);
149
+ tslib_1.__decorate([
150
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
151
+ tslib_1.__metadata("design:type", shell_1.Domain)
152
+ ], GalleryLike.prototype, "domain", void 0);
153
+ tslib_1.__decorate([
154
+ (0, typeorm_1.RelationId)((one) => one.domain),
155
+ tslib_1.__metadata("design:type", String)
156
+ ], GalleryLike.prototype, "domainId", void 0);
157
+ tslib_1.__decorate([
158
+ (0, typeorm_1.ManyToOne)(type => GalleryPost, { onDelete: 'CASCADE' }),
159
+ tslib_1.__metadata("design:type", GalleryPost)
160
+ ], GalleryLike.prototype, "post", void 0);
161
+ tslib_1.__decorate([
162
+ (0, typeorm_1.RelationId)((one) => one.post),
163
+ tslib_1.__metadata("design:type", String)
164
+ ], GalleryLike.prototype, "postId", void 0);
165
+ tslib_1.__decorate([
166
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User),
167
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who likes it.' }),
168
+ tslib_1.__metadata("design:type", auth_base_1.User)
169
+ ], GalleryLike.prototype, "user", void 0);
170
+ tslib_1.__decorate([
171
+ (0, typeorm_1.RelationId)((one) => one.user),
172
+ tslib_1.__metadata("design:type", String)
173
+ ], GalleryLike.prototype, "userId", void 0);
174
+ tslib_1.__decorate([
175
+ (0, typeorm_1.CreateDateColumn)(),
176
+ (0, type_graphql_1.Field)({ nullable: true, description: 'When they liked it.' }),
177
+ tslib_1.__metadata("design:type", Date)
178
+ ], GalleryLike.prototype, "createdAt", void 0);
179
+ tslib_1.__decorate([
180
+ (0, typeorm_1.UpdateDateColumn)(),
181
+ tslib_1.__metadata("design:type", Date)
182
+ ], GalleryLike.prototype, "updatedAt", void 0);
183
+ tslib_1.__decorate([
184
+ (0, typeorm_1.DeleteDateColumn)(),
185
+ tslib_1.__metadata("design:type", Date)
186
+ ], GalleryLike.prototype, "deletedAt", void 0);
187
+ tslib_1.__decorate([
188
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
189
+ tslib_1.__metadata("design:type", auth_base_1.User)
190
+ ], GalleryLike.prototype, "creator", void 0);
191
+ tslib_1.__decorate([
192
+ (0, typeorm_1.RelationId)((one) => one.creator),
193
+ tslib_1.__metadata("design:type", String)
194
+ ], GalleryLike.prototype, "creatorId", void 0);
195
+ tslib_1.__decorate([
196
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
197
+ tslib_1.__metadata("design:type", auth_base_1.User)
198
+ ], GalleryLike.prototype, "updater", void 0);
199
+ tslib_1.__decorate([
200
+ (0, typeorm_1.RelationId)((one) => one.updater),
201
+ tslib_1.__metadata("design:type", String)
202
+ ], GalleryLike.prototype, "updaterId", void 0);
203
+ exports.GalleryLike = GalleryLike = tslib_1.__decorate([
204
+ (0, typeorm_1.Entity)(),
205
+ (0, typeorm_1.Index)('ix_gallery_like_0', (one) => [one.post, one.user], { unique: true, where: '"deleted_at" IS NULL' }),
206
+ (0, type_graphql_1.ObjectType)({ description: 'One person liking one gallery post.' })
207
+ ], GalleryLike);
208
+ /**
209
+ * A calendar event whose gallery is open - opened by a moderator making the event from the gallery, or by the first post
210
+ * linked to it. Everyone of the domain may post to an open event (ADR-0165 사용자 판정 1).
211
+ */
212
+ let GalleryEvent = class GalleryEvent {
213
+ };
214
+ exports.GalleryEvent = GalleryEvent;
215
+ tslib_1.__decorate([
216
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
217
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Gallery event id.' }),
218
+ tslib_1.__metadata("design:type", String)
219
+ ], GalleryEvent.prototype, "id", void 0);
220
+ tslib_1.__decorate([
221
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
222
+ tslib_1.__metadata("design:type", shell_1.Domain)
223
+ ], GalleryEvent.prototype, "domain", void 0);
224
+ tslib_1.__decorate([
225
+ (0, typeorm_1.RelationId)((one) => one.domain),
226
+ tslib_1.__metadata("design:type", String)
227
+ ], GalleryEvent.prototype, "domainId", void 0);
228
+ tslib_1.__decorate([
229
+ (0, typeorm_1.ManyToOne)(type => calendar_1.Event, { onDelete: 'CASCADE' }),
230
+ tslib_1.__metadata("design:type", calendar_1.Event)
231
+ ], GalleryEvent.prototype, "event", void 0);
232
+ tslib_1.__decorate([
233
+ (0, typeorm_1.RelationId)((one) => one.event),
234
+ tslib_1.__metadata("design:type", String)
235
+ ], GalleryEvent.prototype, "eventId", void 0);
236
+ tslib_1.__decorate([
237
+ (0, typeorm_1.CreateDateColumn)(),
238
+ tslib_1.__metadata("design:type", Date)
239
+ ], GalleryEvent.prototype, "createdAt", void 0);
240
+ tslib_1.__decorate([
241
+ (0, typeorm_1.UpdateDateColumn)(),
242
+ tslib_1.__metadata("design:type", Date)
243
+ ], GalleryEvent.prototype, "updatedAt", void 0);
244
+ tslib_1.__decorate([
245
+ (0, typeorm_1.DeleteDateColumn)(),
246
+ tslib_1.__metadata("design:type", Date)
247
+ ], GalleryEvent.prototype, "deletedAt", void 0);
248
+ tslib_1.__decorate([
249
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
250
+ tslib_1.__metadata("design:type", auth_base_1.User)
251
+ ], GalleryEvent.prototype, "creator", void 0);
252
+ tslib_1.__decorate([
253
+ (0, typeorm_1.RelationId)((one) => one.creator),
254
+ tslib_1.__metadata("design:type", String)
255
+ ], GalleryEvent.prototype, "creatorId", void 0);
256
+ tslib_1.__decorate([
257
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
258
+ tslib_1.__metadata("design:type", auth_base_1.User)
259
+ ], GalleryEvent.prototype, "updater", void 0);
260
+ tslib_1.__decorate([
261
+ (0, typeorm_1.RelationId)((one) => one.updater),
262
+ tslib_1.__metadata("design:type", String)
263
+ ], GalleryEvent.prototype, "updaterId", void 0);
264
+ exports.GalleryEvent = GalleryEvent = tslib_1.__decorate([
265
+ (0, typeorm_1.Entity)(),
266
+ (0, typeorm_1.Index)('ix_gallery_event_0', (one) => [one.domain, one.event], {
267
+ unique: true,
268
+ where: '"deleted_at" IS NULL'
269
+ }),
270
+ (0, type_graphql_1.ObjectType)({ description: 'A calendar event whose gallery is open to everyone of the domain.' })
271
+ ], GalleryEvent);
272
+ /** When a person last opened the gallery - the menu counts the posts that came after. */
273
+ let GalleryVisit = class GalleryVisit {
274
+ };
275
+ exports.GalleryVisit = GalleryVisit;
276
+ tslib_1.__decorate([
277
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
278
+ tslib_1.__metadata("design:type", String)
279
+ ], GalleryVisit.prototype, "id", void 0);
280
+ tslib_1.__decorate([
281
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
282
+ tslib_1.__metadata("design:type", shell_1.Domain)
283
+ ], GalleryVisit.prototype, "domain", void 0);
284
+ tslib_1.__decorate([
285
+ (0, typeorm_1.RelationId)((one) => one.domain),
286
+ tslib_1.__metadata("design:type", String)
287
+ ], GalleryVisit.prototype, "domainId", void 0);
288
+ tslib_1.__decorate([
289
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User),
290
+ tslib_1.__metadata("design:type", auth_base_1.User)
291
+ ], GalleryVisit.prototype, "user", void 0);
292
+ tslib_1.__decorate([
293
+ (0, typeorm_1.RelationId)((one) => one.user),
294
+ tslib_1.__metadata("design:type", String)
295
+ ], GalleryVisit.prototype, "userId", void 0);
296
+ tslib_1.__decorate([
297
+ (0, typeorm_1.Column)(),
298
+ tslib_1.__metadata("design:type", Date)
299
+ ], GalleryVisit.prototype, "seenAt", void 0);
300
+ tslib_1.__decorate([
301
+ (0, typeorm_1.CreateDateColumn)(),
302
+ tslib_1.__metadata("design:type", Date)
303
+ ], GalleryVisit.prototype, "createdAt", void 0);
304
+ tslib_1.__decorate([
305
+ (0, typeorm_1.UpdateDateColumn)(),
306
+ tslib_1.__metadata("design:type", Date)
307
+ ], GalleryVisit.prototype, "updatedAt", void 0);
308
+ tslib_1.__decorate([
309
+ (0, typeorm_1.DeleteDateColumn)(),
310
+ tslib_1.__metadata("design:type", Date)
311
+ ], GalleryVisit.prototype, "deletedAt", void 0);
312
+ tslib_1.__decorate([
313
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
314
+ tslib_1.__metadata("design:type", auth_base_1.User)
315
+ ], GalleryVisit.prototype, "creator", void 0);
316
+ tslib_1.__decorate([
317
+ (0, typeorm_1.RelationId)((one) => one.creator),
318
+ tslib_1.__metadata("design:type", String)
319
+ ], GalleryVisit.prototype, "creatorId", void 0);
320
+ tslib_1.__decorate([
321
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
322
+ tslib_1.__metadata("design:type", auth_base_1.User)
323
+ ], GalleryVisit.prototype, "updater", void 0);
324
+ tslib_1.__decorate([
325
+ (0, typeorm_1.RelationId)((one) => one.updater),
326
+ tslib_1.__metadata("design:type", String)
327
+ ], GalleryVisit.prototype, "updaterId", void 0);
328
+ exports.GalleryVisit = GalleryVisit = tslib_1.__decorate([
329
+ (0, typeorm_1.Entity)(),
330
+ (0, typeorm_1.Index)('ix_gallery_visit_0', (one) => [one.domain, one.user], {
331
+ unique: true,
332
+ where: '"deleted_at" IS NULL'
333
+ })
334
+ ], GalleryVisit);
335
+ //# sourceMappingURL=gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../server/service/gallery/gallery.ts"],"names":[],"mappings":";;;;AAAA;;;;GAIG;AACH,qCAUgB;AAChB,+CAA2E;AAE3E,yDAAgD;AAChD,u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AAC,OAAO,CAAC;;+CAC7B;AAGlB;IADC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAClC,gBAAI;6CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,GAAiB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;;+CAC7B;uBAtCP,YAAY;IALxB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,GAAiB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE;QAC1E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;GACW,YAAY,CAuCxB","sourcesContent":["/*\n * The tables of the gallery (ADR-0165 decisions 2, 4-6): a post of photos, a like, an event its gallery is open for,\n * and when a person last looked. The photos themselves are attachments hung on the post (`refType: 'Gallery Post'`);\n * an event is calendar's.\n */\nimport {\n Column,\n CreateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Event } from '@things-factory/calendar'\nimport { Domain } from '@things-factory/shell'\n\n/** Where a post lives. The company's is seen by everyone of the domain; the person's own by them, and by everyone once shared. */\nexport enum GallerySpace {\n /** The company's - events, workshops and work. */\n COMPANY = 'COMPANY',\n /** The person's own - their days, hobbies and pets. */\n PERSONAL = 'PERSONAL'\n}\n\nregisterEnumType(GallerySpace, {\n name: 'GallerySpace',\n description: \"Where a gallery post lives: the company's gallery or the person's own.\"\n})\n\n@Entity()\n@Index('ix_gallery_post_0', (one: GalleryPost) => [one.domain, one.createdAt])\n@Index('ix_gallery_post_1', (one: GalleryPost) => [one.domain, one.event])\n@Index('ix_gallery_post_2', (one: GalleryPost) => [one.domain, one.creator])\n@ObjectType({\n description: \"A post of the gallery - one or more photos, a short caption and tags; the company's seen by everyone of the domain.\"\n})\nexport class GalleryPost {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Post id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain the post is in.' })\n domain?: Domain\n\n @RelationId((one: GalleryPost) => one.domain)\n domainId?: string\n\n @Column({ default: GallerySpace.COMPANY })\n @Field(type => GallerySpace, { description: \"The company's gallery or the person's own.\" })\n space: GallerySpace\n\n /* A post of the own gallery is the person's alone until they share it (2026-10-31, the user) - private by default. */\n @Column({ default: false })\n @Field({ description: \"Whether a post of the person's own gallery is open to everyone of the domain; the company's always is.\" })\n shared: boolean\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'A short caption, plain text.' })\n caption?: string\n\n @Column()\n @Field({ description: 'When the photos were taken - from the first photo, or when it was posted.' })\n takenAt: Date\n\n @Column('simple-json', { nullable: true })\n @Field(type => [String], { nullable: true, description: 'The tags, without the # mark.' })\n tags?: string[]\n\n /* Read as its name, time and place (GalleryEventFacts) - the post's field never hands out the calendar's event. */\n @ManyToOne(type => Event, { nullable: true })\n event?: Event\n\n @RelationId((one: GalleryPost) => one.event)\n eventId?: string\n\n @Column('int', { default: 0 })\n @Field(type => Int, { description: 'How many people like it.' })\n likeCount: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When a moderator hid it; hidden, only its owner and the moderators see it.' })\n hiddenAt?: Date\n\n @Column({ nullable: true })\n hiddenReason?: string\n\n @ManyToOne(type => User, { nullable: true })\n hiddenBy?: User\n\n @RelationId((one: GalleryPost) => one.hiddenBy)\n hiddenById?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was posted.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When it last changed.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When its owner deleted it.' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who posted it - the owner.' })\n creator?: User\n\n @RelationId((one: GalleryPost) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who changed it last.' })\n updater?: User\n\n @RelationId((one: GalleryPost) => one.updater)\n updaterId?: string\n}\n\n@Entity()\n@Index('ix_gallery_like_0', (one: GalleryLike) => [one.post, one.user], { unique: true, where: '\"deleted_at\" IS NULL' })\n@ObjectType({ description: 'One person liking one gallery post.' })\nexport class GalleryLike {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Like id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryLike) => one.domain)\n domainId?: string\n\n @ManyToOne(type => GalleryPost, { onDelete: 'CASCADE' })\n post?: GalleryPost\n\n @RelationId((one: GalleryLike) => one.post)\n postId?: string\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true, description: 'Who likes it.' })\n user?: User\n\n @RelationId((one: GalleryLike) => one.user)\n userId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When they liked it.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryLike) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryLike) => one.updater)\n updaterId?: string\n}\n\n/**\n * A calendar event whose gallery is open - opened by a moderator making the event from the gallery, or by the first post\n * linked to it. Everyone of the domain may post to an open event (ADR-0165 사용자 판정 1).\n */\n@Entity()\n@Index('ix_gallery_event_0', (one: GalleryEvent) => [one.domain, one.event], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: 'A calendar event whose gallery is open to everyone of the domain.' })\nexport class GalleryEvent {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Gallery event id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryEvent) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Event, { onDelete: 'CASCADE' })\n event?: Event\n\n @RelationId((one: GalleryEvent) => one.event)\n eventId?: string\n\n @CreateDateColumn()\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryEvent) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryEvent) => one.updater)\n updaterId?: string\n}\n\n/** When a person last opened the gallery - the menu counts the posts that came after. */\n@Entity()\n@Index('ix_gallery_visit_0', (one: GalleryVisit) => [one.domain, one.user], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\nexport class GalleryVisit {\n @PrimaryGeneratedColumn('uuid')\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryVisit) => one.domain)\n domainId?: string\n\n @ManyToOne(type => User)\n user?: User\n\n @RelationId((one: GalleryVisit) => one.user)\n userId?: string\n\n @Column()\n seenAt: Date\n\n @CreateDateColumn()\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryVisit) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryVisit) => one.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import { GalleryEvent, GalleryLike, GalleryVisit } from './gallery';
2
+ import { GalleryResolver } from './gallery-resolver';
3
+ export declare const entities: (typeof GalleryLike | typeof GalleryEvent | typeof GalleryVisit)[];
4
+ export declare const resolvers: (typeof GalleryResolver)[];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const gallery_1 = require("./gallery");
5
+ const gallery_resolver_1 = require("./gallery-resolver");
6
+ exports.entities = [gallery_1.GalleryPost, gallery_1.GalleryLike, gallery_1.GalleryEvent, gallery_1.GalleryVisit];
7
+ exports.resolvers = [gallery_resolver_1.GalleryResolver];
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/gallery/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgF;AAChF,yDAAoD;AAEvC,QAAA,QAAQ,GAAG,CAAC,qBAAW,EAAE,qBAAW,EAAE,sBAAY,EAAE,sBAAY,CAAC,CAAA;AACjE,QAAA,SAAS,GAAG,CAAC,kCAAe,CAAC,CAAA","sourcesContent":["import { GalleryEvent, GalleryLike, GalleryPost, GalleryVisit } from './gallery'\nimport { GalleryResolver } from './gallery-resolver'\n\nexport const entities = [GalleryPost, GalleryLike, GalleryEvent, GalleryVisit]\nexport const resolvers = [GalleryResolver]\n"]}
@@ -0,0 +1,7 @@
1
+ export * from './gallery/gallery';
2
+ export * from './gallery/gallery-rules';
3
+ export { GALLERY_REF_TYPE, visiblePost } from './gallery/gallery-service';
4
+ export declare const entities: (typeof import("./gallery/gallery").GalleryLike | typeof import("./gallery/gallery").GalleryEvent | typeof import("./gallery/gallery").GalleryVisit)[];
5
+ export declare const schema: {
6
+ resolverClasses: typeof import("./gallery/gallery-resolver").GalleryResolver[];
7
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.schema = exports.entities = exports.visiblePost = exports.GALLERY_REF_TYPE = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /* EXPORT ENTITY TYPES */
6
+ tslib_1.__exportStar(require("./gallery/gallery"), exports);
7
+ tslib_1.__exportStar(require("./gallery/gallery-rules"), exports);
8
+ var gallery_service_1 = require("./gallery/gallery-service");
9
+ Object.defineProperty(exports, "GALLERY_REF_TYPE", { enumerable: true, get: function () { return gallery_service_1.GALLERY_REF_TYPE; } });
10
+ Object.defineProperty(exports, "visiblePost", { enumerable: true, get: function () { return gallery_service_1.visiblePost; } });
11
+ /* IMPORT ENTITIES AND RESOLVERS */
12
+ const gallery_1 = require("./gallery");
13
+ exports.entities = [
14
+ /* ENTITIES */
15
+ ...gallery_1.entities
16
+ ];
17
+ exports.schema = {
18
+ resolverClasses: [
19
+ /* RESOLVER CLASSES */
20
+ ...gallery_1.resolvers
21
+ ]
22
+ };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,4DAAiC;AACjC,kEAAuC;AACvC,6DAAyE;AAAhE,mHAAA,gBAAgB,OAAA;AAAE,8GAAA,WAAW,OAAA;AAEtC,mCAAmC;AACnC,uCAAsF;AAEzE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,kBAAe;CACnB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,GAAG,mBAAgB;KACpB;CACF,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './gallery/gallery'\nexport * from './gallery/gallery-rules'\nexport { GALLERY_REF_TYPE, visiblePost } from './gallery/gallery-service'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as GalleryEntities, resolvers as GalleryResolvers } from './gallery'\n\nexport const entities = [\n /* ENTITIES */\n ...GalleryEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...GalleryResolvers\n ]\n}\n"]}