@things-factory/inquiry 0.0.0-stage → 10.1.252
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/client/bootstrap.ts +27 -0
- package/client/components/inquiry-thread.ts +277 -0
- package/client/components/inquiry-todo.ts +36 -0
- package/client/components/inquiry-writer.ts +212 -0
- package/client/index.ts +2 -0
- package/client/inquiry-watch.ts +45 -0
- package/client/pages/inquiry-list.ts +218 -0
- package/client/route.ts +8 -0
- package/client/tsconfig.json +13 -0
- package/client/utils/inquiry-api.ts +103 -0
- package/client/utils/inquiry-badge.ts +46 -0
- package/client/utils/inquiry-words.ts +26 -0
- package/dist-client/bootstrap.d.ts +2 -0
- package/dist-client/bootstrap.js +25 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/inquiry-thread.d.ts +28 -0
- package/dist-client/components/inquiry-thread.js +303 -0
- package/dist-client/components/inquiry-thread.js.map +1 -0
- package/dist-client/components/inquiry-todo.d.ts +9 -0
- package/dist-client/components/inquiry-todo.js +43 -0
- package/dist-client/components/inquiry-todo.js.map +1 -0
- package/dist-client/components/inquiry-writer.d.ts +25 -0
- package/dist-client/components/inquiry-writer.js +233 -0
- package/dist-client/components/inquiry-writer.js.map +1 -0
- package/dist-client/index.d.ts +2 -0
- package/dist-client/index.js +3 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/inquiry-watch.d.ts +2 -0
- package/dist-client/inquiry-watch.js +41 -0
- package/dist-client/inquiry-watch.js.map +1 -0
- package/dist-client/pages/inquiry-list.d.ts +56 -0
- package/dist-client/pages/inquiry-list.js +241 -0
- package/dist-client/pages/inquiry-list.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +9 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/utils/inquiry-api.d.ts +73 -0
- package/dist-client/utils/inquiry-api.js +34 -0
- package/dist-client/utils/inquiry-api.js.map +1 -0
- package/dist-client/utils/inquiry-badge.d.ts +4 -0
- package/dist-client/utils/inquiry-badge.js +47 -0
- package/dist-client/utils/inquiry-badge.js.map +1 -0
- package/dist-client/utils/inquiry-words.d.ts +13 -0
- package/dist-client/utils/inquiry-words.js +22 -0
- package/dist-client/utils/inquiry-words.js.map +1 -0
- package/dist-server/attachment-reader.d.ts +1 -0
- package/dist-server/attachment-reader.js +21 -0
- package/dist-server/attachment-reader.js.map +1 -0
- package/dist-server/index.d.ts +2 -0
- package/dist-server/index.js +22 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/inquiry-activity.d.ts +38 -0
- package/dist-server/inquiry-activity.js +38 -0
- package/dist-server/inquiry-activity.js.map +1 -0
- package/dist-server/role-tasks.d.ts +2 -0
- package/dist-server/role-tasks.js +14 -0
- package/dist-server/role-tasks.js.map +1 -0
- package/dist-server/service/index.d.ts +7 -0
- package/dist-server/service/index.js +24 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/inquiry/index.d.ts +4 -0
- package/dist-server/service/inquiry/index.js +8 -0
- package/dist-server/service/inquiry/index.js.map +1 -0
- package/dist-server/service/inquiry/inquiry-resolver.d.ts +29 -0
- package/dist-server/service/inquiry/inquiry-resolver.js +407 -0
- package/dist-server/service/inquiry/inquiry-resolver.js.map +1 -0
- package/dist-server/service/inquiry/inquiry-rules.d.ts +88 -0
- package/dist-server/service/inquiry/inquiry-rules.js +157 -0
- package/dist-server/service/inquiry/inquiry-rules.js.map +1 -0
- package/dist-server/service/inquiry/inquiry-service.d.ts +35 -0
- package/dist-server/service/inquiry/inquiry-service.js +143 -0
- package/dist-server/service/inquiry/inquiry-service.js.map +1 -0
- package/dist-server/service/inquiry/inquiry-types.d.ts +18 -0
- package/dist-server/service/inquiry/inquiry-types.js +69 -0
- package/dist-server/service/inquiry/inquiry-types.js.map +1 -0
- package/dist-server/service/inquiry/inquiry.d.ts +48 -0
- package/dist-server/service/inquiry/inquiry.js +232 -0
- package/dist-server/service/inquiry/inquiry.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +51 -4
- package/server/attachment-reader.ts +18 -0
- package/server/index.ts +18 -0
- package/server/inquiry-activity.ts +35 -0
- package/server/role-tasks.ts +13 -0
- package/server/service/index.ts +19 -0
- package/server/service/inquiry/index.ts +5 -0
- package/server/service/inquiry/inquiry-resolver.ts +321 -0
- package/server/service/inquiry/inquiry-rules.ts +173 -0
- package/server/service/inquiry/inquiry-service.ts +143 -0
- package/server/service/inquiry/inquiry-types.ts +45 -0
- package/server/service/inquiry/inquiry.ts +180 -0
- package/server/tsconfig.json +11 -0
- package/test/inquiry-persistence.test.ts +218 -0
- package/test/inquiry-rules.test.ts +121 -0
- package/test/open-doors.test.ts +44 -0
- package/test/translations.test.ts +53 -0
- package/test/writer-popup-standard.test.ts +40 -0
- package/things-factory.config.js +8 -0
- package/translations/en.json +93 -0
- package/translations/es.json +93 -0
- package/translations/ja.json +93 -0
- package/translations/ko.json +93 -0
- package/translations/ms.json +93 -0
- package/translations/zh.json +93 -0
- package/README.md +0 -3
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InquiryReply = exports.Inquiry = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/*
|
|
6
|
+
* The tables of inquiries (ADR-0184 decisions 1-4): one thread - a question, a bug report or a feature proposal - and
|
|
7
|
+
* its replies. What was on the screen when it was written, and which application, are kept on it.
|
|
8
|
+
*/
|
|
9
|
+
const typeorm_1 = require("typeorm");
|
|
10
|
+
const type_graphql_1 = require("type-graphql");
|
|
11
|
+
const shell_1 = require("@things-factory/shell");
|
|
12
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
13
|
+
let Inquiry = class Inquiry {
|
|
14
|
+
};
|
|
15
|
+
exports.Inquiry = Inquiry;
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
18
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Inquiry id.' }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], Inquiry.prototype, "id", void 0);
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
23
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain the inquiry is in.' }),
|
|
24
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
25
|
+
], Inquiry.prototype, "domain", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.RelationId)((one) => one.domain),
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
29
|
+
], Inquiry.prototype, "domainId", void 0);
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, typeorm_1.Column)(),
|
|
32
|
+
(0, type_graphql_1.Field)({ description: 'QUESTION, BUG or PROPOSAL.' }),
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
34
|
+
], Inquiry.prototype, "kind", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, typeorm_1.Column)(),
|
|
37
|
+
(0, type_graphql_1.Field)({ description: 'The title.' }),
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
39
|
+
], Inquiry.prototype, "title", void 0);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
42
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The body, plain text.' }),
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
44
|
+
], Inquiry.prototype, "body", void 0);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ default: 'RECEIVED' }),
|
|
47
|
+
(0, type_graphql_1.Field)({ description: 'RECEIVED, IN_PROGRESS, ANSWERED, PLANNED, DECLINED or CLOSED - PLANNED and DECLINED for a proposal only.' }),
|
|
48
|
+
tslib_1.__metadata("design:type", String)
|
|
49
|
+
], Inquiry.prototype, "status", void 0);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ default: 'DOMAIN' }),
|
|
52
|
+
(0, type_graphql_1.Field)({ description: 'DOMAIN - everyone of the domain reads it; PRIVATE - its writer and the handlers only.' }),
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
54
|
+
], Inquiry.prototype, "visibility", void 0);
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ length: 2000, nullable: true }),
|
|
57
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The address of the screen it was written from.' }),
|
|
58
|
+
tslib_1.__metadata("design:type", String)
|
|
59
|
+
], Inquiry.prototype, "pageUrl", void 0);
|
|
60
|
+
tslib_1.__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The application it was written in.' }),
|
|
63
|
+
tslib_1.__metadata("design:type", String)
|
|
64
|
+
], Inquiry.prototype, "appName", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
67
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The version of that application.' }),
|
|
68
|
+
tslib_1.__metadata("design:type", String)
|
|
69
|
+
], Inquiry.prototype, "appVersion", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
72
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The handler who took it.' }),
|
|
73
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
74
|
+
], Inquiry.prototype, "assignee", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, typeorm_1.RelationId)((one) => one.assignee),
|
|
77
|
+
tslib_1.__metadata("design:type", String)
|
|
78
|
+
], Inquiry.prototype, "assigneeId", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, typeorm_1.Column)('int', { default: 0 }),
|
|
81
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'How many replies it has.' }),
|
|
82
|
+
tslib_1.__metadata("design:type", Number)
|
|
83
|
+
], Inquiry.prototype, "replyCount", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
86
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When a handler last replied or moved it - the writer sees it as new until they open it.' }),
|
|
87
|
+
tslib_1.__metadata("design:type", Date)
|
|
88
|
+
], Inquiry.prototype, "handlerActivityAt", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
91
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When its writer last opened it.' }),
|
|
92
|
+
tslib_1.__metadata("design:type", Date)
|
|
93
|
+
], Inquiry.prototype, "askerSeenAt", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
96
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was last answered.' }),
|
|
97
|
+
tslib_1.__metadata("design:type", Date)
|
|
98
|
+
], Inquiry.prototype, "answeredAt", void 0);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
101
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was closed.' }),
|
|
102
|
+
tslib_1.__metadata("design:type", Date)
|
|
103
|
+
], Inquiry.prototype, "closedAt", void 0);
|
|
104
|
+
tslib_1.__decorate([
|
|
105
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
106
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "The worklist case that holds the handlers' turn on it, while there is one." }),
|
|
107
|
+
tslib_1.__metadata("design:type", String)
|
|
108
|
+
], Inquiry.prototype, "todoInstanceId", void 0);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
111
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who wrote it.' }),
|
|
112
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
113
|
+
], Inquiry.prototype, "creator", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, typeorm_1.RelationId)((one) => one.creator),
|
|
116
|
+
tslib_1.__metadata("design:type", String)
|
|
117
|
+
], Inquiry.prototype, "creatorId", void 0);
|
|
118
|
+
tslib_1.__decorate([
|
|
119
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
120
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
121
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
122
|
+
], Inquiry.prototype, "updater", void 0);
|
|
123
|
+
tslib_1.__decorate([
|
|
124
|
+
(0, typeorm_1.RelationId)((one) => one.updater),
|
|
125
|
+
tslib_1.__metadata("design:type", String)
|
|
126
|
+
], Inquiry.prototype, "updaterId", void 0);
|
|
127
|
+
tslib_1.__decorate([
|
|
128
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
129
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was written.' }),
|
|
130
|
+
tslib_1.__metadata("design:type", Date)
|
|
131
|
+
], Inquiry.prototype, "createdAt", void 0);
|
|
132
|
+
tslib_1.__decorate([
|
|
133
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
134
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
135
|
+
tslib_1.__metadata("design:type", Date)
|
|
136
|
+
], Inquiry.prototype, "updatedAt", void 0);
|
|
137
|
+
tslib_1.__decorate([
|
|
138
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
139
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
|
|
140
|
+
tslib_1.__metadata("design:type", Date)
|
|
141
|
+
], Inquiry.prototype, "deletedAt", void 0);
|
|
142
|
+
exports.Inquiry = Inquiry = tslib_1.__decorate([
|
|
143
|
+
(0, typeorm_1.Entity)(),
|
|
144
|
+
(0, typeorm_1.Index)('ix_inquiry_0', (one) => [one.domain, one.status]),
|
|
145
|
+
(0, typeorm_1.Index)('ix_inquiry_1', (one) => [one.domain, one.creator]),
|
|
146
|
+
(0, type_graphql_1.ObjectType)({ description: "An inquiry of a domain - a question, a bug report or a feature proposal, answered by the domain's handlers." })
|
|
147
|
+
], Inquiry);
|
|
148
|
+
let InquiryReply = class InquiryReply {
|
|
149
|
+
};
|
|
150
|
+
exports.InquiryReply = InquiryReply;
|
|
151
|
+
tslib_1.__decorate([
|
|
152
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
153
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Reply id.' }),
|
|
154
|
+
tslib_1.__metadata("design:type", String)
|
|
155
|
+
], InquiryReply.prototype, "id", void 0);
|
|
156
|
+
tslib_1.__decorate([
|
|
157
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
158
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { nullable: true, description: 'The domain.' }),
|
|
159
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
160
|
+
], InquiryReply.prototype, "domain", void 0);
|
|
161
|
+
tslib_1.__decorate([
|
|
162
|
+
(0, typeorm_1.RelationId)((one) => one.domain),
|
|
163
|
+
tslib_1.__metadata("design:type", String)
|
|
164
|
+
], InquiryReply.prototype, "domainId", void 0);
|
|
165
|
+
tslib_1.__decorate([
|
|
166
|
+
(0, typeorm_1.ManyToOne)(type => Inquiry, { onDelete: 'CASCADE' }),
|
|
167
|
+
tslib_1.__metadata("design:type", Inquiry)
|
|
168
|
+
], InquiryReply.prototype, "inquiry", void 0);
|
|
169
|
+
tslib_1.__decorate([
|
|
170
|
+
(0, typeorm_1.RelationId)((one) => one.inquiry),
|
|
171
|
+
(0, type_graphql_1.Field)({ description: 'The inquiry.' }),
|
|
172
|
+
tslib_1.__metadata("design:type", String)
|
|
173
|
+
], InquiryReply.prototype, "inquiryId", void 0);
|
|
174
|
+
tslib_1.__decorate([
|
|
175
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
176
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The words, plain text.' }),
|
|
177
|
+
tslib_1.__metadata("design:type", String)
|
|
178
|
+
], InquiryReply.prototype, "body", void 0);
|
|
179
|
+
tslib_1.__decorate([
|
|
180
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
181
|
+
(0, type_graphql_1.Field)({ description: 'From a handler - not the writer.' }),
|
|
182
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
183
|
+
], InquiryReply.prototype, "byHandler", void 0);
|
|
184
|
+
tslib_1.__decorate([
|
|
185
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
186
|
+
(0, type_graphql_1.Field)({ description: 'Sent as the answer.' }),
|
|
187
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
188
|
+
], InquiryReply.prototype, "answer", void 0);
|
|
189
|
+
tslib_1.__decorate([
|
|
190
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
191
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Where it moved the inquiry, when it moved it.' }),
|
|
192
|
+
tslib_1.__metadata("design:type", String)
|
|
193
|
+
], InquiryReply.prototype, "status", void 0);
|
|
194
|
+
tslib_1.__decorate([
|
|
195
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
196
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who wrote it.' }),
|
|
197
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
198
|
+
], InquiryReply.prototype, "creator", void 0);
|
|
199
|
+
tslib_1.__decorate([
|
|
200
|
+
(0, typeorm_1.RelationId)((one) => one.creator),
|
|
201
|
+
tslib_1.__metadata("design:type", String)
|
|
202
|
+
], InquiryReply.prototype, "creatorId", void 0);
|
|
203
|
+
tslib_1.__decorate([
|
|
204
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
205
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'Who changed it last.' }),
|
|
206
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
207
|
+
], InquiryReply.prototype, "updater", void 0);
|
|
208
|
+
tslib_1.__decorate([
|
|
209
|
+
(0, typeorm_1.RelationId)((one) => one.updater),
|
|
210
|
+
tslib_1.__metadata("design:type", String)
|
|
211
|
+
], InquiryReply.prototype, "updaterId", void 0);
|
|
212
|
+
tslib_1.__decorate([
|
|
213
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
214
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'When it was written.' }),
|
|
215
|
+
tslib_1.__metadata("design:type", Date)
|
|
216
|
+
], InquiryReply.prototype, "createdAt", void 0);
|
|
217
|
+
tslib_1.__decorate([
|
|
218
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
219
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Last update timestamp.' }),
|
|
220
|
+
tslib_1.__metadata("design:type", Date)
|
|
221
|
+
], InquiryReply.prototype, "updatedAt", void 0);
|
|
222
|
+
tslib_1.__decorate([
|
|
223
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
224
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Soft delete timestamp.' }),
|
|
225
|
+
tslib_1.__metadata("design:type", Date)
|
|
226
|
+
], InquiryReply.prototype, "deletedAt", void 0);
|
|
227
|
+
exports.InquiryReply = InquiryReply = tslib_1.__decorate([
|
|
228
|
+
(0, typeorm_1.Entity)(),
|
|
229
|
+
(0, typeorm_1.Index)('ix_inquiry_reply_0', (one) => [one.inquiry, one.createdAt]),
|
|
230
|
+
(0, type_graphql_1.ObjectType)({ description: 'One reply on an inquiry - the writer\'s or a handler\'s words, or a move of where it stands.' })
|
|
231
|
+
], InquiryReply);
|
|
232
|
+
//# sourceMappingURL=inquiry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inquiry.js","sourceRoot":"","sources":["../../../server/service/inquiry/inquiry.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,qCAAoJ;AACpJ,+CAAyD;AAEzD,iDAA8C;AAC9C,yDAAgD;AAMzC,IAAM,OAAO,GAAb,MAAM,OAAO;CAoGnB,CAAA;AApGY,0BAAO;AAGT;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;;mCAC/B;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;sCAC/E,cAAM;uCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,GAAY,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;yCACxB;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;;qCACzC;AAIZ;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;;sCACxB;AAIb;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IA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AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;sCACrD,IAAI;+CAAA;AAIhB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;sCACrD,IAAI;+CAAA;uBA3DL,YAAY;IAHxB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,GAAiB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IAChF,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,8FAA8F,EAAE,CAAC;GAC/G,YAAY,CA4DxB","sourcesContent":["/*\n * The tables of inquiries (ADR-0184 decisions 1-4): one thread - a question, a bug report or a feature proposal - and\n * its replies. What was on the screen when it was written, and which application, are kept on it.\n */\nimport { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\nimport { Field, ID, Int, ObjectType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n@Entity()\n@Index('ix_inquiry_0', (one: Inquiry) => [one.domain, one.status])\n@Index('ix_inquiry_1', (one: Inquiry) => [one.domain, one.creator])\n@ObjectType({ description: \"An inquiry of a domain - a question, a bug report or a feature proposal, answered by the domain's handlers.\" })\nexport class Inquiry {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Inquiry id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain the inquiry is in.' })\n domain?: Domain\n\n @RelationId((one: Inquiry) => one.domain)\n domainId?: string\n\n @Column()\n @Field({ description: 'QUESTION, BUG or PROPOSAL.' })\n kind: 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, plain text.' })\n body?: string\n\n @Column({ default: 'RECEIVED' })\n @Field({ description: 'RECEIVED, IN_PROGRESS, ANSWERED, PLANNED, DECLINED or CLOSED - PLANNED and DECLINED for a proposal only.' })\n status: string\n\n @Column({ default: 'DOMAIN' })\n @Field({ description: 'DOMAIN - everyone of the domain reads it; PRIVATE - its writer and the handlers only.' })\n visibility: string\n\n @Column({ length: 2000, nullable: true })\n @Field({ nullable: true, description: 'The address of the screen it was written from.' })\n pageUrl?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The application it was written in.' })\n appName?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The version of that application.' })\n appVersion?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The handler who took it.' })\n assignee?: User\n\n @RelationId((one: Inquiry) => one.assignee)\n assigneeId?: string\n\n @Column('int', { default: 0 })\n @Field(type => Int, { description: 'How many replies it has.' })\n replyCount: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When a handler last replied or moved it - the writer sees it as new until they open it.' })\n handlerActivityAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When its writer last opened it.' })\n askerSeenAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was last answered.' })\n answeredAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When it was closed.' })\n closedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: \"The worklist case that holds the handlers' turn on it, while there is one.\" })\n todoInstanceId?: 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: Inquiry) => 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: Inquiry) => one.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was written.' })\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_inquiry_reply_0', (one: InquiryReply) => [one.inquiry, one.createdAt])\n@ObjectType({ description: 'One reply on an inquiry - the writer\\'s or a handler\\'s words, or a move of where it stands.' })\nexport class InquiryReply {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Reply 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: InquiryReply) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Inquiry, { onDelete: 'CASCADE' })\n inquiry?: Inquiry\n\n @RelationId((one: InquiryReply) => one.inquiry)\n @Field({ description: 'The inquiry.' })\n inquiryId?: string\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'The words, plain text.' })\n body?: string\n\n @Column({ default: false })\n @Field({ description: 'From a handler - not the writer.' })\n byHandler: boolean\n\n @Column({ default: false })\n @Field({ description: 'Sent as the answer.' })\n answer: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Where it moved the inquiry, when it moved it.' })\n status?: 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: InquiryReply) => 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: InquiryReply) => one.updater)\n updaterId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was written.' })\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"]}
|