@things-factory/announcement 10.1.248 → 10.1.250
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/announcement-watch.d.ts +6 -0
- package/dist-client/announcement-watch.js +105 -0
- package/dist-client/announcement-watch.js.map +1 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +8 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/announcement-popup.d.ts +20 -0
- package/dist-client/components/announcement-popup.js +98 -0
- package/dist-client/components/announcement-popup.js.map +1 -0
- package/dist-client/components/announcement-receipts.d.ts +30 -0
- package/dist-client/components/announcement-receipts.js +220 -0
- package/dist-client/components/announcement-receipts.js.map +1 -0
- package/dist-client/components/announcement-sheet.d.ts +17 -0
- package/dist-client/components/announcement-sheet.js +224 -0
- package/dist-client/components/announcement-sheet.js.map +1 -0
- package/dist-client/components/audience-picker.d.ts +32 -0
- package/dist-client/components/audience-picker.js +229 -0
- package/dist-client/components/audience-picker.js.map +1 -0
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/announcement-editor.d.ts +59 -0
- package/dist-client/pages/announcement-editor.js +523 -0
- package/dist-client/pages/announcement-editor.js.map +1 -0
- package/dist-client/pages/announcement-list.d.ts +54 -0
- package/dist-client/pages/announcement-list.js +209 -0
- package/dist-client/pages/announcement-list.js.map +1 -0
- package/dist-client/pages/announcement-manage-list.d.ts +46 -0
- package/dist-client/pages/announcement-manage-list.js +115 -0
- package/dist-client/pages/announcement-manage-list.js.map +1 -0
- package/dist-client/pages/announcement-view.d.ts +30 -0
- package/dist-client/pages/announcement-view.js +182 -0
- package/dist-client/pages/announcement-view.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +18 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/utils/announcement-api.d.ts +149 -0
- package/dist-client/utils/announcement-api.js +52 -0
- package/dist-client/utils/announcement-api.js.map +1 -0
- package/dist-client/utils/announcement-badge.d.ts +4 -0
- package/dist-client/utils/announcement-badge.js +47 -0
- package/dist-client/utils/announcement-badge.js.map +1 -0
- package/dist-client/utils/announcement-words.d.ts +11 -0
- package/dist-client/utils/announcement-words.js +23 -0
- package/dist-client/utils/announcement-words.js.map +1 -0
- package/dist-server/announcement-read.d.ts +6 -0
- package/dist-server/announcement-read.js +45 -0
- package/dist-server/announcement-read.js.map +1 -0
- package/dist-server/attachment-reader.d.ts +1 -0
- package/dist-server/attachment-reader.js +13 -0
- package/dist-server/attachment-reader.js.map +1 -0
- package/dist-server/index.d.ts +2 -0
- package/dist-server/index.js +20 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/role-tasks.d.ts +2 -0
- package/dist-server/role-tasks.js +13 -0
- package/dist-server/role-tasks.js.map +1 -0
- package/dist-server/service/announcement/announcement-resolver.d.ts +38 -0
- package/dist-server/service/announcement/announcement-resolver.js +664 -0
- package/dist-server/service/announcement/announcement-resolver.js.map +1 -0
- package/dist-server/service/announcement/announcement-rules.d.ts +150 -0
- package/dist-server/service/announcement/announcement-rules.js +227 -0
- package/dist-server/service/announcement/announcement-rules.js.map +1 -0
- package/dist-server/service/announcement/announcement-service.d.ts +54 -0
- package/dist-server/service/announcement/announcement-service.js +248 -0
- package/dist-server/service/announcement/announcement-service.js.map +1 -0
- package/dist-server/service/announcement/announcement-types.d.ts +54 -0
- package/dist-server/service/announcement/announcement-types.js +203 -0
- package/dist-server/service/announcement/announcement-types.js.map +1 -0
- package/dist-server/service/announcement/announcement.d.ts +124 -0
- package/dist-server/service/announcement/announcement.js +462 -0
- package/dist-server/service/announcement/announcement.js.map +1 -0
- package/dist-server/service/announcement/index.d.ts +4 -0
- package/dist-server/service/announcement/index.js +8 -0
- package/dist-server/service/announcement/index.js.map +1 -0
- package/dist-server/service/index.d.ts +7 -0
- package/dist-server/service/index.js +23 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
/** Where an announcement stands. An announcement past its end is still PUBLISHED - it is a past one, read from the list of past ones. */
|
|
4
|
+
export declare enum AnnouncementStatus {
|
|
5
|
+
/** Being written - only its writer sees it. */
|
|
6
|
+
DRAFT = "DRAFT",
|
|
7
|
+
/** Published to start later - published and told when its start comes. */
|
|
8
|
+
SCHEDULED = "SCHEDULED",
|
|
9
|
+
/** Out to its audience. */
|
|
10
|
+
PUBLISHED = "PUBLISHED",
|
|
11
|
+
/** Taken back, with the reason - no longer shown to its audience. */
|
|
12
|
+
WITHDRAWN = "WITHDRAWN"
|
|
13
|
+
}
|
|
14
|
+
/** How much an announcement asks of the reader's attention - the list puts the urgent and important ones first. */
|
|
15
|
+
export declare enum AnnouncementImportance {
|
|
16
|
+
NORMAL = "NORMAL",
|
|
17
|
+
IMPORTANT = "IMPORTANT",
|
|
18
|
+
URGENT = "URGENT"
|
|
19
|
+
}
|
|
20
|
+
export declare class Announcement {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
domain?: Domain;
|
|
23
|
+
domainId?: string;
|
|
24
|
+
title: string;
|
|
25
|
+
body?: string;
|
|
26
|
+
category: string;
|
|
27
|
+
importance: AnnouncementImportance;
|
|
28
|
+
status: AnnouncementStatus;
|
|
29
|
+
startsAt?: Date;
|
|
30
|
+
endsAt?: Date;
|
|
31
|
+
pinned: boolean;
|
|
32
|
+
rank: number;
|
|
33
|
+
requiresAcknowledgement: boolean;
|
|
34
|
+
acknowledgeBy?: Date;
|
|
35
|
+
popup: boolean;
|
|
36
|
+
sendEmail: boolean;
|
|
37
|
+
deliveries?: {
|
|
38
|
+
at: string;
|
|
39
|
+
kind: string;
|
|
40
|
+
receivers: number;
|
|
41
|
+
email: {
|
|
42
|
+
sent: number;
|
|
43
|
+
failed: number;
|
|
44
|
+
};
|
|
45
|
+
teams: {
|
|
46
|
+
sent: number;
|
|
47
|
+
failed: number;
|
|
48
|
+
};
|
|
49
|
+
failed?: boolean;
|
|
50
|
+
}[];
|
|
51
|
+
links?: {
|
|
52
|
+
label: string;
|
|
53
|
+
url: string;
|
|
54
|
+
}[];
|
|
55
|
+
version: number;
|
|
56
|
+
publishedAt?: Date;
|
|
57
|
+
publisher?: User;
|
|
58
|
+
publisherId?: string;
|
|
59
|
+
audienceSize?: number;
|
|
60
|
+
withdrawnAt?: Date;
|
|
61
|
+
withdrawReason?: string;
|
|
62
|
+
creator?: User;
|
|
63
|
+
creatorId?: string;
|
|
64
|
+
updater?: User;
|
|
65
|
+
updaterId?: string;
|
|
66
|
+
createdAt?: Date;
|
|
67
|
+
updatedAt?: Date;
|
|
68
|
+
deletedAt?: Date;
|
|
69
|
+
}
|
|
70
|
+
export declare class AnnouncementAudience {
|
|
71
|
+
readonly id: string;
|
|
72
|
+
domain?: Domain;
|
|
73
|
+
domainId?: string;
|
|
74
|
+
announcement?: Announcement;
|
|
75
|
+
announcementId?: string;
|
|
76
|
+
scope: string;
|
|
77
|
+
targetId: string;
|
|
78
|
+
targetName?: string;
|
|
79
|
+
creator?: User;
|
|
80
|
+
creatorId?: string;
|
|
81
|
+
updater?: User;
|
|
82
|
+
updaterId?: string;
|
|
83
|
+
createdAt?: Date;
|
|
84
|
+
updatedAt?: Date;
|
|
85
|
+
deletedAt?: Date;
|
|
86
|
+
}
|
|
87
|
+
export declare class AnnouncementReceipt {
|
|
88
|
+
readonly id: string;
|
|
89
|
+
domain?: Domain;
|
|
90
|
+
domainId?: string;
|
|
91
|
+
announcement?: Announcement;
|
|
92
|
+
announcementId?: string;
|
|
93
|
+
user?: User;
|
|
94
|
+
userId?: string;
|
|
95
|
+
listed: boolean;
|
|
96
|
+
notifiedAt?: Date;
|
|
97
|
+
readAt?: Date;
|
|
98
|
+
acknowledgedAt?: Date;
|
|
99
|
+
creator?: User;
|
|
100
|
+
creatorId?: string;
|
|
101
|
+
updater?: User;
|
|
102
|
+
updaterId?: string;
|
|
103
|
+
createdAt?: Date;
|
|
104
|
+
updatedAt?: Date;
|
|
105
|
+
deletedAt?: Date;
|
|
106
|
+
}
|
|
107
|
+
export declare class AnnouncementRevision {
|
|
108
|
+
readonly id: string;
|
|
109
|
+
domain?: Domain;
|
|
110
|
+
domainId?: string;
|
|
111
|
+
announcement?: Announcement;
|
|
112
|
+
announcementId?: string;
|
|
113
|
+
version: number;
|
|
114
|
+
title: string;
|
|
115
|
+
body?: string;
|
|
116
|
+
rest?: Record<string, unknown>;
|
|
117
|
+
creator?: User;
|
|
118
|
+
creatorId?: string;
|
|
119
|
+
updater?: User;
|
|
120
|
+
updaterId?: string;
|
|
121
|
+
createdAt?: Date;
|
|
122
|
+
updatedAt?: Date;
|
|
123
|
+
deletedAt?: Date;
|
|
124
|
+
}
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnnouncementRevision = exports.AnnouncementReceipt = exports.AnnouncementAudience = exports.Announcement = exports.AnnouncementImportance = exports.AnnouncementStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/*
|
|
6
|
+
* The tables of announcements (ADR-0163 decisions 1-4): an announcement, whom it is addressed to, each person's reading
|
|
7
|
+
* of it, and the versions it went through after it was published. Whom it reaches and who read it are kept here -
|
|
8
|
+
* the inbox, web push and the popup only tell of it.
|
|
9
|
+
*/
|
|
10
|
+
const typeorm_1 = require("typeorm");
|
|
11
|
+
const type_graphql_1 = require("type-graphql");
|
|
12
|
+
const graphql_scalars_1 = require("graphql-scalars");
|
|
13
|
+
const shell_1 = require("@things-factory/shell");
|
|
14
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
15
|
+
/** Where an announcement stands. An announcement past its end is still PUBLISHED - it is a past one, read from the list of past ones. */
|
|
16
|
+
var AnnouncementStatus;
|
|
17
|
+
(function (AnnouncementStatus) {
|
|
18
|
+
/** Being written - only its writer sees it. */
|
|
19
|
+
AnnouncementStatus["DRAFT"] = "DRAFT";
|
|
20
|
+
/** Published to start later - published and told when its start comes. */
|
|
21
|
+
AnnouncementStatus["SCHEDULED"] = "SCHEDULED";
|
|
22
|
+
/** Out to its audience. */
|
|
23
|
+
AnnouncementStatus["PUBLISHED"] = "PUBLISHED";
|
|
24
|
+
/** Taken back, with the reason - no longer shown to its audience. */
|
|
25
|
+
AnnouncementStatus["WITHDRAWN"] = "WITHDRAWN";
|
|
26
|
+
})(AnnouncementStatus || (exports.AnnouncementStatus = AnnouncementStatus = {}));
|
|
27
|
+
(0, type_graphql_1.registerEnumType)(AnnouncementStatus, { name: 'AnnouncementStatus', description: 'Where an announcement stands: draft, scheduled, published or withdrawn.' });
|
|
28
|
+
/** How much an announcement asks of the reader's attention - the list puts the urgent and important ones first. */
|
|
29
|
+
var AnnouncementImportance;
|
|
30
|
+
(function (AnnouncementImportance) {
|
|
31
|
+
AnnouncementImportance["NORMAL"] = "NORMAL";
|
|
32
|
+
AnnouncementImportance["IMPORTANT"] = "IMPORTANT";
|
|
33
|
+
AnnouncementImportance["URGENT"] = "URGENT";
|
|
34
|
+
})(AnnouncementImportance || (exports.AnnouncementImportance = AnnouncementImportance = {}));
|
|
35
|
+
(0, type_graphql_1.registerEnumType)(AnnouncementImportance, { name: 'AnnouncementImportance', description: 'How much an announcement asks of the reader: normal, important or urgent.' });
|
|
36
|
+
let Announcement = class Announcement {
|
|
37
|
+
};
|
|
38
|
+
exports.Announcement = Announcement;
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
41
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Announcement id.' }),
|
|
42
|
+
tslib_1.__metadata("design:type", String)
|
|
43
|
+
], Announcement.prototype, "id", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
46
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain the announcement is in.' }),
|
|
47
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
48
|
+
], Announcement.prototype, "domain", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.RelationId)((one) => one.domain),
|
|
51
|
+
tslib_1.__metadata("design:type", String)
|
|
52
|
+
], Announcement.prototype, "domainId", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.Column)(),
|
|
55
|
+
(0, type_graphql_1.Field)({ description: 'The title.' }),
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
57
|
+
], Announcement.prototype, "title", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The body, in Markdown.' }),
|
|
61
|
+
tslib_1.__metadata("design:type", String)
|
|
62
|
+
], Announcement.prototype, "body", void 0);
|
|
63
|
+
tslib_1.__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ default: 'GENERAL' }),
|
|
65
|
+
(0, type_graphql_1.Field)({ description: 'The kind of announcement - one of the codes this module declares.' }),
|
|
66
|
+
tslib_1.__metadata("design:type", String)
|
|
67
|
+
], Announcement.prototype, "category", void 0);
|
|
68
|
+
tslib_1.__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ default: AnnouncementImportance.NORMAL }),
|
|
70
|
+
(0, type_graphql_1.Field)(type => AnnouncementImportance, { description: 'Normal, important or urgent.' }),
|
|
71
|
+
tslib_1.__metadata("design:type", String)
|
|
72
|
+
], Announcement.prototype, "importance", void 0);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ default: AnnouncementStatus.DRAFT }),
|
|
75
|
+
(0, type_graphql_1.Field)(type => AnnouncementStatus, { description: 'Draft, scheduled, published or withdrawn.' }),
|
|
76
|
+
tslib_1.__metadata("design:type", String)
|
|
77
|
+
], Announcement.prototype, "status", void 0);
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
80
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it starts to be shown - empty publishes it at once.' }),
|
|
81
|
+
tslib_1.__metadata("design:type", Date)
|
|
82
|
+
], Announcement.prototype, "startsAt", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
85
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it stops being a current one - empty keeps it current.' }),
|
|
86
|
+
tslib_1.__metadata("design:type", Date)
|
|
87
|
+
], Announcement.prototype, "endsAt", void 0);
|
|
88
|
+
tslib_1.__decorate([
|
|
89
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
90
|
+
(0, type_graphql_1.Field)({ description: 'Kept on top of the list while it is current.' }),
|
|
91
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
92
|
+
], Announcement.prototype, "pinned", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.Column)('int', { default: 12 }),
|
|
95
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: "Its place in the readers' list - pinned first, then urgent, important and normal (announcement-rules rankOf)." }),
|
|
96
|
+
tslib_1.__metadata("design:type", Number)
|
|
97
|
+
], Announcement.prototype, "rank", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
100
|
+
(0, type_graphql_1.Field)({ description: 'Each reader is asked to acknowledge it, apart from reading it.' }),
|
|
101
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
102
|
+
], Announcement.prototype, "requiresAcknowledgement", void 0);
|
|
103
|
+
tslib_1.__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
105
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day by which the readers are asked to acknowledge it.' }),
|
|
106
|
+
tslib_1.__metadata("design:type", Date)
|
|
107
|
+
], Announcement.prototype, "acknowledgeBy", void 0);
|
|
108
|
+
tslib_1.__decorate([
|
|
109
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
110
|
+
(0, type_graphql_1.Field)({ description: 'Shown in a popup to its readers - once, or until acknowledged when it asks for that.' }),
|
|
111
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
112
|
+
], Announcement.prototype, "popup", void 0);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
115
|
+
(0, type_graphql_1.Field)({ description: 'Sent by mail too - where the domain has turned mail on (notification Notice::email).' }),
|
|
116
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
117
|
+
], Announcement.prototype, "sendEmail", void 0);
|
|
118
|
+
tslib_1.__decorate([
|
|
119
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
120
|
+
(0, type_graphql_1.Field)(type => graphql_scalars_1.GraphQLJSON, {
|
|
121
|
+
nullable: true,
|
|
122
|
+
description: 'Each time its people were told - [{ at, kind: published | changed | reminder, receivers, email: { sent, failed }, teams: { sent, failed } }], the newest last.'
|
|
123
|
+
}),
|
|
124
|
+
tslib_1.__metadata("design:type", Array)
|
|
125
|
+
], Announcement.prototype, "deliveries", void 0);
|
|
126
|
+
tslib_1.__decorate([
|
|
127
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
128
|
+
(0, type_graphql_1.Field)(type => graphql_scalars_1.GraphQLJSON, { nullable: true, description: 'Screens it points to - [{ label, url }], a screen of the application or an https address.' }),
|
|
129
|
+
tslib_1.__metadata("design:type", Array)
|
|
130
|
+
], Announcement.prototype, "links", void 0);
|
|
131
|
+
tslib_1.__decorate([
|
|
132
|
+
(0, typeorm_1.Column)('int', { default: 1 }),
|
|
133
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The version - one more each time it is changed after it was published.' }),
|
|
134
|
+
tslib_1.__metadata("design:type", Number)
|
|
135
|
+
], Announcement.prototype, "version", void 0);
|
|
136
|
+
tslib_1.__decorate([
|
|
137
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
138
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it went out to its audience.' }),
|
|
139
|
+
tslib_1.__metadata("design:type", Date)
|
|
140
|
+
], Announcement.prototype, "publishedAt", void 0);
|
|
141
|
+
tslib_1.__decorate([
|
|
142
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
143
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who published it.' }),
|
|
144
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
145
|
+
], Announcement.prototype, "publisher", void 0);
|
|
146
|
+
tslib_1.__decorate([
|
|
147
|
+
(0, typeorm_1.RelationId)((one) => one.publisher),
|
|
148
|
+
tslib_1.__metadata("design:type", String)
|
|
149
|
+
], Announcement.prototype, "publisherId", void 0);
|
|
150
|
+
tslib_1.__decorate([
|
|
151
|
+
(0, typeorm_1.Column)('int', { nullable: true }),
|
|
152
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'How many people it was addressed to - counted when it went out, and again when its audience changed.' }),
|
|
153
|
+
tslib_1.__metadata("design:type", Number)
|
|
154
|
+
], Announcement.prototype, "audienceSize", void 0);
|
|
155
|
+
tslib_1.__decorate([
|
|
156
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
157
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was withdrawn.' }),
|
|
158
|
+
tslib_1.__metadata("design:type", Date)
|
|
159
|
+
], Announcement.prototype, "withdrawnAt", void 0);
|
|
160
|
+
tslib_1.__decorate([
|
|
161
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
162
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Why it was withdrawn.' }),
|
|
163
|
+
tslib_1.__metadata("design:type", String)
|
|
164
|
+
], Announcement.prototype, "withdrawReason", void 0);
|
|
165
|
+
tslib_1.__decorate([
|
|
166
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
167
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who wrote it.' }),
|
|
168
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
169
|
+
], Announcement.prototype, "creator", void 0);
|
|
170
|
+
tslib_1.__decorate([
|
|
171
|
+
(0, typeorm_1.RelationId)((one) => one.creator),
|
|
172
|
+
tslib_1.__metadata("design:type", String)
|
|
173
|
+
], Announcement.prototype, "creatorId", void 0);
|
|
174
|
+
tslib_1.__decorate([
|
|
175
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
176
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
177
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
178
|
+
], Announcement.prototype, "updater", void 0);
|
|
179
|
+
tslib_1.__decorate([
|
|
180
|
+
(0, typeorm_1.RelationId)((one) => one.updater),
|
|
181
|
+
tslib_1.__metadata("design:type", String)
|
|
182
|
+
], Announcement.prototype, "updaterId", void 0);
|
|
183
|
+
tslib_1.__decorate([
|
|
184
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
185
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp.' }),
|
|
186
|
+
tslib_1.__metadata("design:type", Date)
|
|
187
|
+
], Announcement.prototype, "createdAt", void 0);
|
|
188
|
+
tslib_1.__decorate([
|
|
189
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
190
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
191
|
+
tslib_1.__metadata("design:type", Date)
|
|
192
|
+
], Announcement.prototype, "updatedAt", void 0);
|
|
193
|
+
tslib_1.__decorate([
|
|
194
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
195
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
|
|
196
|
+
tslib_1.__metadata("design:type", Date)
|
|
197
|
+
], Announcement.prototype, "deletedAt", void 0);
|
|
198
|
+
exports.Announcement = Announcement = tslib_1.__decorate([
|
|
199
|
+
(0, typeorm_1.Entity)(),
|
|
200
|
+
(0, typeorm_1.Index)('ix_announcement_0', (one) => [one.domain, one.status, one.startsAt]),
|
|
201
|
+
(0, type_graphql_1.ObjectType)({ description: 'An announcement of a domain - written once, addressed to an audience, read and acknowledged by each of its people.' })
|
|
202
|
+
], Announcement);
|
|
203
|
+
let AnnouncementAudience = class AnnouncementAudience {
|
|
204
|
+
};
|
|
205
|
+
exports.AnnouncementAudience = AnnouncementAudience;
|
|
206
|
+
tslib_1.__decorate([
|
|
207
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
208
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Target id.' }),
|
|
209
|
+
tslib_1.__metadata("design:type", String)
|
|
210
|
+
], AnnouncementAudience.prototype, "id", void 0);
|
|
211
|
+
tslib_1.__decorate([
|
|
212
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
213
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain.' }),
|
|
214
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
215
|
+
], AnnouncementAudience.prototype, "domain", void 0);
|
|
216
|
+
tslib_1.__decorate([
|
|
217
|
+
(0, typeorm_1.RelationId)((one) => one.domain),
|
|
218
|
+
tslib_1.__metadata("design:type", String)
|
|
219
|
+
], AnnouncementAudience.prototype, "domainId", void 0);
|
|
220
|
+
tslib_1.__decorate([
|
|
221
|
+
(0, typeorm_1.ManyToOne)(type => Announcement, { onDelete: 'CASCADE' }),
|
|
222
|
+
tslib_1.__metadata("design:type", Announcement)
|
|
223
|
+
], AnnouncementAudience.prototype, "announcement", void 0);
|
|
224
|
+
tslib_1.__decorate([
|
|
225
|
+
(0, typeorm_1.RelationId)((one) => one.announcement),
|
|
226
|
+
(0, type_graphql_1.Field)({ description: 'The announcement.' }),
|
|
227
|
+
tslib_1.__metadata("design:type", String)
|
|
228
|
+
], AnnouncementAudience.prototype, "announcementId", void 0);
|
|
229
|
+
tslib_1.__decorate([
|
|
230
|
+
(0, typeorm_1.Column)(),
|
|
231
|
+
(0, type_graphql_1.Field)({ description: 'DOMAIN, DEPARTMENT, ROLE or USER.' }),
|
|
232
|
+
tslib_1.__metadata("design:type", String)
|
|
233
|
+
], AnnouncementAudience.prototype, "scope", void 0);
|
|
234
|
+
tslib_1.__decorate([
|
|
235
|
+
(0, typeorm_1.Column)(),
|
|
236
|
+
(0, type_graphql_1.Field)({ description: 'The domain, department, role or user id.' }),
|
|
237
|
+
tslib_1.__metadata("design:type", String)
|
|
238
|
+
], AnnouncementAudience.prototype, "targetId", void 0);
|
|
239
|
+
tslib_1.__decorate([
|
|
240
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
241
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Its name when it was given - shown to the writer.' }),
|
|
242
|
+
tslib_1.__metadata("design:type", String)
|
|
243
|
+
], AnnouncementAudience.prototype, "targetName", void 0);
|
|
244
|
+
tslib_1.__decorate([
|
|
245
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
246
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who gave it.' }),
|
|
247
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
248
|
+
], AnnouncementAudience.prototype, "creator", void 0);
|
|
249
|
+
tslib_1.__decorate([
|
|
250
|
+
(0, typeorm_1.RelationId)((one) => one.creator),
|
|
251
|
+
tslib_1.__metadata("design:type", String)
|
|
252
|
+
], AnnouncementAudience.prototype, "creatorId", void 0);
|
|
253
|
+
tslib_1.__decorate([
|
|
254
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
255
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
256
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
257
|
+
], AnnouncementAudience.prototype, "updater", void 0);
|
|
258
|
+
tslib_1.__decorate([
|
|
259
|
+
(0, typeorm_1.RelationId)((one) => one.updater),
|
|
260
|
+
tslib_1.__metadata("design:type", String)
|
|
261
|
+
], AnnouncementAudience.prototype, "updaterId", void 0);
|
|
262
|
+
tslib_1.__decorate([
|
|
263
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
264
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp.' }),
|
|
265
|
+
tslib_1.__metadata("design:type", Date)
|
|
266
|
+
], AnnouncementAudience.prototype, "createdAt", void 0);
|
|
267
|
+
tslib_1.__decorate([
|
|
268
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
269
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
270
|
+
tslib_1.__metadata("design:type", Date)
|
|
271
|
+
], AnnouncementAudience.prototype, "updatedAt", void 0);
|
|
272
|
+
tslib_1.__decorate([
|
|
273
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
274
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the target was taken off.' }),
|
|
275
|
+
tslib_1.__metadata("design:type", Date)
|
|
276
|
+
], AnnouncementAudience.prototype, "deletedAt", void 0);
|
|
277
|
+
exports.AnnouncementAudience = AnnouncementAudience = tslib_1.__decorate([
|
|
278
|
+
(0, typeorm_1.Entity)(),
|
|
279
|
+
(0, typeorm_1.Index)('ix_announcement_audience_0', (one) => [one.announcement, one.scope, one.targetId], { unique: true, where: '"deleted_at" IS NULL' }),
|
|
280
|
+
(0, typeorm_1.Index)('ix_announcement_audience_1', (one) => [one.domain, one.scope, one.targetId]),
|
|
281
|
+
(0, type_graphql_1.ObjectType)({ description: 'One target of an announcement - the domain, a department with those under it, a role or a person (organization audience).' })
|
|
282
|
+
], AnnouncementAudience);
|
|
283
|
+
let AnnouncementReceipt = class AnnouncementReceipt {
|
|
284
|
+
};
|
|
285
|
+
exports.AnnouncementReceipt = AnnouncementReceipt;
|
|
286
|
+
tslib_1.__decorate([
|
|
287
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
288
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Receipt id.' }),
|
|
289
|
+
tslib_1.__metadata("design:type", String)
|
|
290
|
+
], AnnouncementReceipt.prototype, "id", void 0);
|
|
291
|
+
tslib_1.__decorate([
|
|
292
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
293
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain.' }),
|
|
294
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
295
|
+
], AnnouncementReceipt.prototype, "domain", void 0);
|
|
296
|
+
tslib_1.__decorate([
|
|
297
|
+
(0, typeorm_1.RelationId)((one) => one.domain),
|
|
298
|
+
tslib_1.__metadata("design:type", String)
|
|
299
|
+
], AnnouncementReceipt.prototype, "domainId", void 0);
|
|
300
|
+
tslib_1.__decorate([
|
|
301
|
+
(0, typeorm_1.ManyToOne)(type => Announcement, { onDelete: 'CASCADE' }),
|
|
302
|
+
tslib_1.__metadata("design:type", Announcement)
|
|
303
|
+
], AnnouncementReceipt.prototype, "announcement", void 0);
|
|
304
|
+
tslib_1.__decorate([
|
|
305
|
+
(0, typeorm_1.RelationId)((one) => one.announcement),
|
|
306
|
+
(0, type_graphql_1.Field)({ description: 'The announcement.' }),
|
|
307
|
+
tslib_1.__metadata("design:type", String)
|
|
308
|
+
], AnnouncementReceipt.prototype, "announcementId", void 0);
|
|
309
|
+
tslib_1.__decorate([
|
|
310
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User),
|
|
311
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The reader.' }),
|
|
312
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
313
|
+
], AnnouncementReceipt.prototype, "user", void 0);
|
|
314
|
+
tslib_1.__decorate([
|
|
315
|
+
(0, typeorm_1.RelationId)((one) => one.user),
|
|
316
|
+
(0, type_graphql_1.Field)({ description: 'The reader user id.' }),
|
|
317
|
+
tslib_1.__metadata("design:type", String)
|
|
318
|
+
], AnnouncementReceipt.prototype, "userId", void 0);
|
|
319
|
+
tslib_1.__decorate([
|
|
320
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
321
|
+
(0, type_graphql_1.Field)({ description: 'Whether the person is on its roster - addressed when it went out or when its audience changed; one who came to it later is not.' }),
|
|
322
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
323
|
+
], AnnouncementReceipt.prototype, "listed", void 0);
|
|
324
|
+
tslib_1.__decorate([
|
|
325
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
326
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the person was last told of it.' }),
|
|
327
|
+
tslib_1.__metadata("design:type", Date)
|
|
328
|
+
], AnnouncementReceipt.prototype, "notifiedAt", void 0);
|
|
329
|
+
tslib_1.__decorate([
|
|
330
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
331
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the person first read it.' }),
|
|
332
|
+
tslib_1.__metadata("design:type", Date)
|
|
333
|
+
], AnnouncementReceipt.prototype, "readAt", void 0);
|
|
334
|
+
tslib_1.__decorate([
|
|
335
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
336
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When the person acknowledged it.' }),
|
|
337
|
+
tslib_1.__metadata("design:type", Date)
|
|
338
|
+
], AnnouncementReceipt.prototype, "acknowledgedAt", void 0);
|
|
339
|
+
tslib_1.__decorate([
|
|
340
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
341
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who made the row - the publisher for the roster, the reader otherwise.' }),
|
|
342
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
343
|
+
], AnnouncementReceipt.prototype, "creator", void 0);
|
|
344
|
+
tslib_1.__decorate([
|
|
345
|
+
(0, typeorm_1.RelationId)((one) => one.creator),
|
|
346
|
+
tslib_1.__metadata("design:type", String)
|
|
347
|
+
], AnnouncementReceipt.prototype, "creatorId", void 0);
|
|
348
|
+
tslib_1.__decorate([
|
|
349
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
350
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
351
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
352
|
+
], AnnouncementReceipt.prototype, "updater", void 0);
|
|
353
|
+
tslib_1.__decorate([
|
|
354
|
+
(0, typeorm_1.RelationId)((one) => one.updater),
|
|
355
|
+
tslib_1.__metadata("design:type", String)
|
|
356
|
+
], AnnouncementReceipt.prototype, "updaterId", void 0);
|
|
357
|
+
tslib_1.__decorate([
|
|
358
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
359
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp.' }),
|
|
360
|
+
tslib_1.__metadata("design:type", Date)
|
|
361
|
+
], AnnouncementReceipt.prototype, "createdAt", void 0);
|
|
362
|
+
tslib_1.__decorate([
|
|
363
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
364
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
365
|
+
tslib_1.__metadata("design:type", Date)
|
|
366
|
+
], AnnouncementReceipt.prototype, "updatedAt", void 0);
|
|
367
|
+
tslib_1.__decorate([
|
|
368
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
369
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
|
|
370
|
+
tslib_1.__metadata("design:type", Date)
|
|
371
|
+
], AnnouncementReceipt.prototype, "deletedAt", void 0);
|
|
372
|
+
exports.AnnouncementReceipt = AnnouncementReceipt = tslib_1.__decorate([
|
|
373
|
+
(0, typeorm_1.Entity)(),
|
|
374
|
+
(0, typeorm_1.Index)('ix_announcement_receipt_0', (one) => [one.announcement, one.user], { unique: true, where: '"deleted_at" IS NULL' }),
|
|
375
|
+
(0, typeorm_1.Index)('ix_announcement_receipt_1', (one) => [one.domain, one.user]),
|
|
376
|
+
(0, type_graphql_1.ObjectType)({ description: "One person's reading of an announcement - whether they were addressed when it went out, when they read it and when they acknowledged it." })
|
|
377
|
+
], AnnouncementReceipt);
|
|
378
|
+
let AnnouncementRevision = class AnnouncementRevision {
|
|
379
|
+
};
|
|
380
|
+
exports.AnnouncementRevision = AnnouncementRevision;
|
|
381
|
+
tslib_1.__decorate([
|
|
382
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
383
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Revision id.' }),
|
|
384
|
+
tslib_1.__metadata("design:type", String)
|
|
385
|
+
], AnnouncementRevision.prototype, "id", void 0);
|
|
386
|
+
tslib_1.__decorate([
|
|
387
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
388
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain.' }),
|
|
389
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
390
|
+
], AnnouncementRevision.prototype, "domain", void 0);
|
|
391
|
+
tslib_1.__decorate([
|
|
392
|
+
(0, typeorm_1.RelationId)((one) => one.domain),
|
|
393
|
+
tslib_1.__metadata("design:type", String)
|
|
394
|
+
], AnnouncementRevision.prototype, "domainId", void 0);
|
|
395
|
+
tslib_1.__decorate([
|
|
396
|
+
(0, typeorm_1.ManyToOne)(type => Announcement, { onDelete: 'CASCADE' }),
|
|
397
|
+
tslib_1.__metadata("design:type", Announcement)
|
|
398
|
+
], AnnouncementRevision.prototype, "announcement", void 0);
|
|
399
|
+
tslib_1.__decorate([
|
|
400
|
+
(0, typeorm_1.RelationId)((one) => one.announcement),
|
|
401
|
+
(0, type_graphql_1.Field)({ description: 'The announcement.' }),
|
|
402
|
+
tslib_1.__metadata("design:type", String)
|
|
403
|
+
], AnnouncementRevision.prototype, "announcementId", void 0);
|
|
404
|
+
tslib_1.__decorate([
|
|
405
|
+
(0, typeorm_1.Column)('int'),
|
|
406
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The version.' }),
|
|
407
|
+
tslib_1.__metadata("design:type", Number)
|
|
408
|
+
], AnnouncementRevision.prototype, "version", void 0);
|
|
409
|
+
tslib_1.__decorate([
|
|
410
|
+
(0, typeorm_1.Column)(),
|
|
411
|
+
(0, type_graphql_1.Field)({ description: 'The title of this version.' }),
|
|
412
|
+
tslib_1.__metadata("design:type", String)
|
|
413
|
+
], AnnouncementRevision.prototype, "title", void 0);
|
|
414
|
+
tslib_1.__decorate([
|
|
415
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
416
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The body of this version.' }),
|
|
417
|
+
tslib_1.__metadata("design:type", String)
|
|
418
|
+
], AnnouncementRevision.prototype, "body", void 0);
|
|
419
|
+
tslib_1.__decorate([
|
|
420
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
421
|
+
(0, type_graphql_1.Field)(type => graphql_scalars_1.GraphQLJSON, { nullable: true, description: 'The rest of this version - kind, importance, period, flags, links and audience.' }),
|
|
422
|
+
tslib_1.__metadata("design:type", Object)
|
|
423
|
+
], AnnouncementRevision.prototype, "rest", void 0);
|
|
424
|
+
tslib_1.__decorate([
|
|
425
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
426
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who made this version.' }),
|
|
427
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
428
|
+
], AnnouncementRevision.prototype, "creator", void 0);
|
|
429
|
+
tslib_1.__decorate([
|
|
430
|
+
(0, typeorm_1.RelationId)((one) => one.creator),
|
|
431
|
+
tslib_1.__metadata("design:type", String)
|
|
432
|
+
], AnnouncementRevision.prototype, "creatorId", void 0);
|
|
433
|
+
tslib_1.__decorate([
|
|
434
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
435
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
436
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
437
|
+
], AnnouncementRevision.prototype, "updater", void 0);
|
|
438
|
+
tslib_1.__decorate([
|
|
439
|
+
(0, typeorm_1.RelationId)((one) => one.updater),
|
|
440
|
+
tslib_1.__metadata("design:type", String)
|
|
441
|
+
], AnnouncementRevision.prototype, "updaterId", void 0);
|
|
442
|
+
tslib_1.__decorate([
|
|
443
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
444
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Creation timestamp.' }),
|
|
445
|
+
tslib_1.__metadata("design:type", Date)
|
|
446
|
+
], AnnouncementRevision.prototype, "createdAt", void 0);
|
|
447
|
+
tslib_1.__decorate([
|
|
448
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
449
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
450
|
+
tslib_1.__metadata("design:type", Date)
|
|
451
|
+
], AnnouncementRevision.prototype, "updatedAt", void 0);
|
|
452
|
+
tslib_1.__decorate([
|
|
453
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
454
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
|
|
455
|
+
tslib_1.__metadata("design:type", Date)
|
|
456
|
+
], AnnouncementRevision.prototype, "deletedAt", void 0);
|
|
457
|
+
exports.AnnouncementRevision = AnnouncementRevision = tslib_1.__decorate([
|
|
458
|
+
(0, typeorm_1.Entity)(),
|
|
459
|
+
(0, typeorm_1.Index)('ix_announcement_revision_0', (one) => [one.announcement, one.version], { unique: true, where: '"deleted_at" IS NULL' }),
|
|
460
|
+
(0, type_graphql_1.ObjectType)({ description: 'One version of a published announcement - what it said and whom it was addressed to.' })
|
|
461
|
+
], AnnouncementRevision);
|
|
462
|
+
//# sourceMappingURL=announcement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announcement.js","sourceRoot":"","sources":["../../../server/service/announcement/announcement.ts"],"names":[],"mappings":";;;;AAAA;;;;GAIG;AACH,qCAAoJ;AACpJ,+CAA2E;AAC3E,qDAA6C;AAE7C,iDAA8C;AAC9C,yDAAgD;AAEhD,yIAAyI;AACzI,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,+CAA+C;IAC/C,qCAAe,CAAA;IACf,0EAA0E;IAC1E,6CAAuB,CAAA;IACvB,2BAA2B;IAC3B,6CAAuB,CAAA;IACvB,qEAAqE;IACrE,6CAAuB,CAAA;AACzB,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B;AAED,IAAA,+BAAgB,EAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,yEAAyE,EAAE,CAAC,CAAA;AAE5J,mHAAmH;AACnH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,iDAAuB,CAAA;IACvB,2CAAiB,CAAA;AACnB,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC;AAED,IAAA,+BAAgB,EAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,WAAW,EAAE,2EAA2E,EAAE,CAAC,CAAA;AAK/J,IAAM,YAAY,GAAl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AC,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;IACpJ,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sFAAsF,EAAE,CAAC;GACvG,oBAAoB,CA4DhC","sourcesContent":["/*\n * The tables of announcements (ADR-0163 decisions 1-4): an announcement, whom it is addressed to, each person's reading\n * of it, and the versions it went through after it was published. Whom it reaches and who read it are kept here -\n * the inbox, web push and the popup only tell of it.\n */\nimport { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\nimport { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\nimport { GraphQLJSON } from 'graphql-scalars'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n/** Where an announcement stands. An announcement past its end is still PUBLISHED - it is a past one, read from the list of past ones. */\nexport enum AnnouncementStatus {\n /** Being written - only its writer sees it. */\n DRAFT = 'DRAFT',\n /** Published to start later - published and told when its start comes. */\n SCHEDULED = 'SCHEDULED',\n /** Out to its audience. */\n PUBLISHED = 'PUBLISHED',\n /** Taken back, with the reason - no longer shown to its audience. */\n WITHDRAWN = 'WITHDRAWN'\n}\n\nregisterEnumType(AnnouncementStatus, { name: 'AnnouncementStatus', description: 'Where an announcement stands: draft, scheduled, published or withdrawn.' })\n\n/** How much an announcement asks of the reader's attention - the list puts the urgent and important ones first. */\nexport enum AnnouncementImportance {\n NORMAL = 'NORMAL',\n IMPORTANT = 'IMPORTANT',\n URGENT = 'URGENT'\n}\n\nregisterEnumType(AnnouncementImportance, { name: 'AnnouncementImportance', description: 'How much an announcement asks of the reader: normal, important or urgent.' })\n\n@Entity()\n@Index('ix_announcement_0', (one: Announcement) => [one.domain, one.status, one.startsAt])\n@ObjectType({ description: 'An announcement of a domain - written once, addressed to an audience, read and acknowledged by each of its people.' })\nexport class Announcement {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Announcement id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain the announcement is in.' })\n domain?: Domain\n\n @RelationId((one: Announcement) => one.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'The title.' })\n title: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'The body, in Markdown.' })\n body?: string\n\n @Column({ default: 'GENERAL' })\n @Field({ description: 'The kind of announcement - one of the codes this module declares.' })\n category: string\n\n @Column({ default: AnnouncementImportance.NORMAL })\n @Field(type => AnnouncementImportance, { description: 'Normal, important or urgent.' })\n importance: AnnouncementImportance\n\n @Column({ default: AnnouncementStatus.DRAFT })\n @Field(type => AnnouncementStatus, { description: 'Draft, scheduled, published or withdrawn.' })\n status: AnnouncementStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it starts to be shown - empty publishes it at once.' })\n startsAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it stops being a current one - empty keeps it current.' })\n endsAt?: Date\n\n @Column({ default: false })\n @Field({ description: 'Kept on top of the list while it is current.' })\n pinned: boolean\n\n @Column('int', { default: 12 })\n @Field(type => Int, { description: \"Its place in the readers' list - pinned first, then urgent, important and normal (announcement-rules rankOf).\" })\n rank: number\n\n @Column({ default: false })\n @Field({ description: 'Each reader is asked to acknowledge it, apart from reading it.' })\n requiresAcknowledgement: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The day by which the readers are asked to acknowledge it.' })\n acknowledgeBy?: Date\n\n @Column({ default: false })\n @Field({ description: 'Shown in a popup to its readers - once, or until acknowledged when it asks for that.' })\n popup: boolean\n\n @Column({ default: false })\n @Field({ description: 'Sent by mail too - where the domain has turned mail on (notification Notice::email).' })\n sendEmail: boolean\n\n @Column('simple-json', { nullable: true })\n @Field(type => GraphQLJSON, {\n nullable: true,\n description: 'Each time its people were told - [{ at, kind: published | changed | reminder, receivers, email: { sent, failed }, teams: { sent, failed } }], the newest last.'\n })\n deliveries?: { at: string; kind: string; receivers: number; email: { sent: number; failed: number }; teams: { sent: number; failed: number }; failed?: boolean }[]\n\n @Column('simple-json', { nullable: true })\n @Field(type => GraphQLJSON, { nullable: true, description: 'Screens it points to - [{ label, url }], a screen of the application or an https address.' })\n links?: { label: string; url: string }[]\n\n @Column('int', { default: 1 })\n @Field(type => Int, { description: 'The version - one more each time it is changed after it was published.' })\n version: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it went out to its audience.' })\n publishedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who published it.' })\n publisher?: User\n\n @RelationId((one: Announcement) => one.publisher)\n publisherId?: string\n\n @Column('int', { nullable: true })\n @Field(type => Int, { nullable: true, description: 'How many people it was addressed to - counted when it went out, and again when its audience changed.' })\n audienceSize?: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was withdrawn.' })\n withdrawnAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Why it was withdrawn.' })\n withdrawReason?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who wrote it.' })\n creator?: User\n\n @RelationId((one: Announcement) => 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: Announcement) => one.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'Creation timestamp.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'Last update timestamp.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'Soft delete timestamp.' })\n deletedAt?: Date\n}\n\n@Entity()\n@Index('ix_announcement_audience_0', (one: AnnouncementAudience) => [one.announcement, one.scope, one.targetId], { unique: true, where: '\"deleted_at\" IS NULL' })\n@Index('ix_announcement_audience_1', (one: AnnouncementAudience) => [one.domain, one.scope, one.targetId])\n@ObjectType({ description: 'One target of an announcement - the domain, a department with those under it, a role or a person (organization audience).' })\nexport class AnnouncementAudience {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Target id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain.' })\n domain?: Domain\n\n @RelationId((one: AnnouncementAudience) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Announcement, { onDelete: 'CASCADE' })\n announcement?: Announcement\n\n @RelationId((one: AnnouncementAudience) => one.announcement)\n @Field({ description: 'The announcement.' })\n announcementId?: string\n\n @Column()\n @Field({ description: 'DOMAIN, DEPARTMENT, ROLE or USER.' })\n scope: string\n\n @Column()\n @Field({ description: 'The domain, department, role or user id.' })\n targetId: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Its name when it was given - shown to the writer.' })\n targetName?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who gave it.' })\n creator?: User\n\n @RelationId((one: AnnouncementAudience) => 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: AnnouncementAudience) => one.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'Creation timestamp.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'Last update timestamp.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When the target was taken off.' })\n deletedAt?: Date\n}\n\n@Entity()\n@Index('ix_announcement_receipt_0', (one: AnnouncementReceipt) => [one.announcement, one.user], { unique: true, where: '\"deleted_at\" IS NULL' })\n@Index('ix_announcement_receipt_1', (one: AnnouncementReceipt) => [one.domain, one.user])\n@ObjectType({ description: \"One person's reading of an announcement - whether they were addressed when it went out, when they read it and when they acknowledged it.\" })\nexport class AnnouncementReceipt {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Receipt id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain.' })\n domain?: Domain\n\n @RelationId((one: AnnouncementReceipt) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Announcement, { onDelete: 'CASCADE' })\n announcement?: Announcement\n\n @RelationId((one: AnnouncementReceipt) => one.announcement)\n @Field({ description: 'The announcement.' })\n announcementId?: string\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true, description: 'The reader.' })\n user?: User\n\n @RelationId((one: AnnouncementReceipt) => one.user)\n @Field({ description: 'The reader user id.' })\n userId?: string\n\n @Column({ default: false })\n @Field({ description: 'Whether the person is on its roster - addressed when it went out or when its audience changed; one who came to it later is not.' })\n listed: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When the person was last told of it.' })\n notifiedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When the person first read it.' })\n readAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When the person acknowledged it.' })\n acknowledgedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who made the row - the publisher for the roster, the reader otherwise.' })\n creator?: User\n\n @RelationId((one: AnnouncementReceipt) => 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: AnnouncementReceipt) => one.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'Creation timestamp.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'Last update timestamp.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'Soft delete timestamp.' })\n deletedAt?: Date\n}\n\n@Entity()\n@Index('ix_announcement_revision_0', (one: AnnouncementRevision) => [one.announcement, one.version], { unique: true, where: '\"deleted_at\" IS NULL' })\n@ObjectType({ description: 'One version of a published announcement - what it said and whom it was addressed to.' })\nexport class AnnouncementRevision {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Revision id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain.' })\n domain?: Domain\n\n @RelationId((one: AnnouncementRevision) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Announcement, { onDelete: 'CASCADE' })\n announcement?: Announcement\n\n @RelationId((one: AnnouncementRevision) => one.announcement)\n @Field({ description: 'The announcement.' })\n announcementId?: string\n\n @Column('int')\n @Field(type => Int, { description: 'The version.' })\n version: number\n\n @Column()\n @Field({ description: 'The title of this version.' })\n title: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'The body of this version.' })\n body?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => GraphQLJSON, { nullable: true, description: 'The rest of this version - kind, importance, period, flags, links and audience.' })\n rest?: Record<string, unknown>\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who made this version.' })\n creator?: User\n\n @RelationId((one: AnnouncementRevision) => 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: AnnouncementRevision) => one.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'Creation timestamp.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'Last update timestamp.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'Soft delete timestamp.' })\n deletedAt?: Date\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Announcement, AnnouncementAudience, AnnouncementReceipt, AnnouncementRevision } from './announcement';
|
|
2
|
+
import { AnnouncementResolver } from './announcement-resolver';
|
|
3
|
+
export declare const entities: (typeof Announcement | typeof AnnouncementAudience | typeof AnnouncementReceipt | typeof AnnouncementRevision)[];
|
|
4
|
+
export declare const resolvers: (typeof AnnouncementResolver)[];
|