@colijnit/mainapi 1.0.30 → 1.0.31

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 (58) hide show
  1. package/build/enum/activities-object-name.enum.d.ts +3 -0
  2. package/build/enum/activities-object-name.enum.js +7 -0
  3. package/build/enum/activities-operation-name.enum.d.ts +5 -0
  4. package/build/enum/activities-operation-name.enum.js +9 -0
  5. package/build/enum/activity-type.d.ts +9 -0
  6. package/build/enum/activity-type.js +13 -0
  7. package/build/enum/document-method.enum.d.ts +6 -0
  8. package/build/enum/document-method.enum.js +10 -0
  9. package/build/enum/ione-module-name.enum.d.ts +39 -0
  10. package/build/enum/ione-module-name.enum.js +55 -0
  11. package/build/enum/module-name.enum.d.ts +2 -1
  12. package/build/enum/module-name.enum.js +1 -0
  13. package/build/enum/module-navigation-link.d.ts +5 -0
  14. package/build/enum/module-navigation-link.js +2 -0
  15. package/build/enum/relation-kind.d.ts +10 -0
  16. package/build/enum/relation-kind.js +14 -0
  17. package/build/enum/relman-complete-name.d.ts +5 -0
  18. package/build/enum/relman-complete-name.js +2 -0
  19. package/build/enum/transaction-kind.d.ts +13 -0
  20. package/build/enum/transaction-kind.js +17 -0
  21. package/build/enum/workflow-category.enum.d.ts +18 -0
  22. package/build/enum/workflow-category.enum.js +22 -0
  23. package/build/enum/workflow-trigger-type.enum.d.ts +8 -0
  24. package/build/enum/workflow-trigger-type.enum.js +12 -0
  25. package/build/main-api-connection.d.ts +13 -0
  26. package/build/main-api.d.ts +13 -0
  27. package/build/main-api.js +32 -0
  28. package/build/main-auth.d.ts +13 -0
  29. package/build/main-auth.js +159 -0
  30. package/build/main-public.d.ts +13 -0
  31. package/build/main-public.js +42 -0
  32. package/build/model/activity.bo.d.ts +58 -0
  33. package/build/model/activity.bo.js +484 -0
  34. package/build/model/co-document.d.ts +2 -0
  35. package/build/model/co-document.js +4 -0
  36. package/build/model/form-question-response.bo.d.ts +10 -0
  37. package/build/model/form-question-response.bo.js +31 -0
  38. package/build/model/form.bo.d.ts +16 -0
  39. package/build/model/form.bo.js +13 -0
  40. package/build/model/relation-small-object.bo.d.ts +28 -0
  41. package/build/model/relation-small-object.bo.js +63 -0
  42. package/build/model/remark.bo.d.ts +17 -0
  43. package/build/model/remark.bo.js +52 -0
  44. package/build/model/task.bo.d.ts +83 -0
  45. package/build/model/task.bo.js +257 -0
  46. package/build/model/transition.bo.d.ts +5 -0
  47. package/build/model/transition.bo.js +21 -0
  48. package/build/model/work.bo.d.ts +19 -0
  49. package/build/model/work.bo.js +53 -0
  50. package/build/model/workflow-generic-transition.bo.d.ts +22 -0
  51. package/build/model/workflow-generic-transition.bo.js +28 -0
  52. package/build/model/workflow-trigger.bo.d.ts +44 -0
  53. package/build/model/workflow-trigger.bo.js +52 -0
  54. package/build/model/workflow.bo.d.ts +36 -0
  55. package/build/model/workflow.bo.js +151 -0
  56. package/build/utils/time-utils.d.ts +6 -0
  57. package/build/utils/time-utils.js +44 -0
  58. package/package.json +1 -1
@@ -0,0 +1,484 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Activity = void 0;
13
+ const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
14
+ const activity_type_1 = require("../enum/activity-type");
15
+ const date_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/date-field.decorator");
16
+ const complex_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/complex-field.decorator");
17
+ const workflow_bo_1 = require("./workflow.bo");
18
+ const task_bo_1 = require("./task.bo");
19
+ const work_bo_1 = require("./work.bo");
20
+ const no_db_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/no-db-field.decorator");
21
+ const is_nill_function_1 = require("@colijnit/ioneconnector/build/utils/function/is-nill.function");
22
+ const relation_small_object_bo_1 = require("./relation-small-object.bo");
23
+ const remark_bo_1 = require("./remark.bo");
24
+ const transition_bo_1 = require("./transition.bo");
25
+ const form_bo_1 = require("./form.bo");
26
+ const ione_module_name_enum_1 = require("../enum/ione-module-name.enum");
27
+ class Activity extends business_object_1.BusinessObject {
28
+ constructor() {
29
+ super();
30
+ this.isNew = false;
31
+ this.editting = false;
32
+ }
33
+ get activityTypeSecondary() {
34
+ return this.activityType === activity_type_1.ActivityType.Work ? "WORK2" : this.activityType;
35
+ }
36
+ get IsRemark() {
37
+ return this.activityType === activity_type_1.ActivityType.Remark;
38
+ }
39
+ get IsWorkflowStatus() {
40
+ return this.activityType === activity_type_1.ActivityType.WorkflowStatus;
41
+ }
42
+ get IsWork() {
43
+ return this.activityType === activity_type_1.ActivityType.Work;
44
+ }
45
+ get IsTask() {
46
+ return this.activityType === activity_type_1.ActivityType.Task || this.activityType === activity_type_1.ActivityType.WorkflowTask;
47
+ }
48
+ get IsStateChange() {
49
+ return this.activityType === activity_type_1.ActivityType.StateChange;
50
+ }
51
+ get IsForm() {
52
+ return this.activityType === activity_type_1.ActivityType.Form;
53
+ }
54
+ get link() {
55
+ if (this.activityType === activity_type_1.ActivityType.WorkflowStatus) {
56
+ return this.workflow ? { module: (this.workflow.table === "ABSENCE_FILE" ? ione_module_name_enum_1.IOneModuleName.AbsenceFile : null), id: this.workflow.key } : undefined;
57
+ }
58
+ }
59
+ get linkDescription() {
60
+ if (this.activityType === activity_type_1.ActivityType.WorkflowStatus) {
61
+ return this.workflow && this.workflow.workflowProcessDescription;
62
+ }
63
+ else {
64
+ return "";
65
+ }
66
+ }
67
+ get name() {
68
+ switch (this.activityType) {
69
+ case activity_type_1.ActivityType.WorkflowStatus:
70
+ return this.workflow && this.workflow.name;
71
+ case activity_type_1.ActivityType.Task:
72
+ case activity_type_1.ActivityType.WorkflowTask:
73
+ return this.task && this.task.name;
74
+ case activity_type_1.ActivityType.Form:
75
+ return this.form && this.form.formName;
76
+ default:
77
+ return "";
78
+ }
79
+ }
80
+ get creationDateTime() {
81
+ switch (this.activityType) {
82
+ case activity_type_1.ActivityType.Remark:
83
+ return this.remark && this.remark.dateTime;
84
+ case activity_type_1.ActivityType.Work:
85
+ return this.work && this.work.dateTime;
86
+ case activity_type_1.ActivityType.Task:
87
+ case activity_type_1.ActivityType.WorkflowTask:
88
+ return this.task && this.task.creationDateTime;
89
+ default:
90
+ return null;
91
+ }
92
+ }
93
+ get creationDateTimeAsNumber() {
94
+ const creation = this.creationDateTime;
95
+ return (is_nill_function_1.isNill(creation)) ? null : creation.getTime();
96
+ }
97
+ get deadlineDateTimeAsNumber() {
98
+ const date = this.deadlineDateTime;
99
+ return (is_nill_function_1.isNill(date)) ? null : date.getTime();
100
+ }
101
+ get linkLabel() {
102
+ switch (this.activityType) {
103
+ case activity_type_1.ActivityType.WorkflowStatus:
104
+ return this.workflow && this.workflow.linkLabel;
105
+ case activity_type_1.ActivityType.Task:
106
+ case activity_type_1.ActivityType.WorkflowTask:
107
+ return "OPEN_TASK";
108
+ case activity_type_1.ActivityType.Form:
109
+ return "OPEN_FORM";
110
+ default:
111
+ return "";
112
+ }
113
+ }
114
+ get subDescription() {
115
+ switch (this.activityType) {
116
+ case activity_type_1.ActivityType.Remark:
117
+ return this.remark && this.remark.remark;
118
+ case activity_type_1.ActivityType.WorkflowStatus:
119
+ return this.workflow && this.workflow.description;
120
+ case activity_type_1.ActivityType.StateChange:
121
+ return this.stateChange && this.stateChange.workflowDescription;
122
+ case activity_type_1.ActivityType.Work:
123
+ return this.work && this.work.workDescription;
124
+ case activity_type_1.ActivityType.Task:
125
+ case activity_type_1.ActivityType.WorkflowTask:
126
+ return this.task && this.task.description;
127
+ case activity_type_1.ActivityType.Form:
128
+ return this.form && this.form.formName;
129
+ default:
130
+ return "";
131
+ }
132
+ }
133
+ get label() {
134
+ switch (this.activityType) {
135
+ case activity_type_1.ActivityType.WorkflowStatus:
136
+ return this.workflow && this.workflow.state;
137
+ case activity_type_1.ActivityType.StateChange:
138
+ return this.stateChange.workflowEnded ? "WORKFLOW_ENDED" : this.activityTitle;
139
+ default:
140
+ return "";
141
+ }
142
+ }
143
+ get canEdit() {
144
+ switch (this.activityType) {
145
+ case activity_type_1.ActivityType.Form:
146
+ case activity_type_1.ActivityType.Remark:
147
+ case activity_type_1.ActivityType.Task:
148
+ case activity_type_1.ActivityType.Work:
149
+ return true;
150
+ default:
151
+ return false;
152
+ }
153
+ }
154
+ get documents() {
155
+ switch (this.activityType) {
156
+ case activity_type_1.ActivityType.Remark:
157
+ return this.remark && this.remark.documents;
158
+ case activity_type_1.ActivityType.Work:
159
+ return this.work && this.work.documents;
160
+ case activity_type_1.ActivityType.Task:
161
+ case activity_type_1.ActivityType.WorkflowTask:
162
+ return this.task && this.task.documents;
163
+ default:
164
+ return [];
165
+ }
166
+ }
167
+ get time() {
168
+ switch (this.activityType) {
169
+ case activity_type_1.ActivityType.Work:
170
+ return this.work && this.work.workedTime;
171
+ case activity_type_1.ActivityType.Task:
172
+ case activity_type_1.ActivityType.WorkflowTask:
173
+ return this.task && this.task.workedTime;
174
+ default:
175
+ return null;
176
+ }
177
+ }
178
+ get executiveName() {
179
+ switch (this.activityType) {
180
+ case activity_type_1.ActivityType.Task:
181
+ case activity_type_1.ActivityType.WorkflowTask:
182
+ return this.task && this.task.executive && this.task.executive.displayName;
183
+ default:
184
+ return "";
185
+ }
186
+ }
187
+ get authorName() {
188
+ switch (this.activityType) {
189
+ case activity_type_1.ActivityType.Remark:
190
+ return this.remark && this.remark.author && this.remark.author.displayName;
191
+ case activity_type_1.ActivityType.Work:
192
+ return this.work && this.work.executive && this.work.executive.displayName;
193
+ case activity_type_1.ActivityType.Task:
194
+ case activity_type_1.ActivityType.WorkflowTask:
195
+ return this.task && this.task.reporter && this.task.reporter.displayName;
196
+ default:
197
+ return "";
198
+ }
199
+ }
200
+ get executive() {
201
+ switch (this.activityType) {
202
+ case activity_type_1.ActivityType.Work:
203
+ return this.work && this.work.executive;
204
+ case activity_type_1.ActivityType.Task:
205
+ case activity_type_1.ActivityType.WorkflowTask:
206
+ return this.task && this.task.executive;
207
+ default:
208
+ return null;
209
+ }
210
+ }
211
+ get author() {
212
+ switch (this.activityType) {
213
+ case activity_type_1.ActivityType.Remark:
214
+ return this.remark && this.remark.author;
215
+ case activity_type_1.ActivityType.Work:
216
+ return this.work && this.work.executive;
217
+ case activity_type_1.ActivityType.Task:
218
+ case activity_type_1.ActivityType.WorkflowTask:
219
+ return this.task && this.task.reporter;
220
+ default:
221
+ return null;
222
+ }
223
+ }
224
+ get classType() {
225
+ switch (this.activityType) {
226
+ case activity_type_1.ActivityType.Remark:
227
+ return remark_bo_1.Remark;
228
+ case activity_type_1.ActivityType.Work:
229
+ return work_bo_1.Work;
230
+ case activity_type_1.ActivityType.Task:
231
+ case activity_type_1.ActivityType.WorkflowTask:
232
+ return task_bo_1.Task;
233
+ default:
234
+ return null;
235
+ }
236
+ }
237
+ get executionDateTime() {
238
+ if (this.task && this.task.getId()) {
239
+ return this.task.executionDateTime;
240
+ }
241
+ return null;
242
+ }
243
+ get overDue() {
244
+ if (this.deadlineDateTime) {
245
+ return this.deadlineDateTime.getTime() < new Date().getTime();
246
+ }
247
+ return false;
248
+ }
249
+ updateSubDescription(text) {
250
+ switch (this.activityType) {
251
+ case activity_type_1.ActivityType.Remark:
252
+ if (this.remark) {
253
+ this.remark.remark = text;
254
+ }
255
+ break;
256
+ case activity_type_1.ActivityType.WorkflowStatus:
257
+ if (this.stateChange) {
258
+ this.stateChange.workflowDescription = text;
259
+ }
260
+ break;
261
+ case activity_type_1.ActivityType.Work:
262
+ if (this.work) {
263
+ this.work.workDescription = text;
264
+ }
265
+ break;
266
+ case activity_type_1.ActivityType.Task:
267
+ case activity_type_1.ActivityType.WorkflowTask:
268
+ if (this.task) {
269
+ this.task.description = text;
270
+ }
271
+ break;
272
+ }
273
+ }
274
+ canUploadDocuments() {
275
+ switch (this.activityType) {
276
+ case activity_type_1.ActivityType.Remark:
277
+ case activity_type_1.ActivityType.Task:
278
+ case activity_type_1.ActivityType.Work:
279
+ case activity_type_1.ActivityType.WorkflowTask:
280
+ return true;
281
+ default:
282
+ return false;
283
+ }
284
+ }
285
+ getId() {
286
+ switch (this.activityType) {
287
+ case activity_type_1.ActivityType.Remark:
288
+ return this.remark && this.remark.getId();
289
+ case activity_type_1.ActivityType.WorkflowStatus:
290
+ return this.workflow && this.workflow.getId();
291
+ case activity_type_1.ActivityType.Work:
292
+ return this.work && this.work.getId();
293
+ case activity_type_1.ActivityType.Task:
294
+ case activity_type_1.ActivityType.WorkflowTask:
295
+ return this.task && this.task.getId();
296
+ case activity_type_1.ActivityType.Form:
297
+ return this.form && this.form.getId();
298
+ default:
299
+ return "";
300
+ }
301
+ }
302
+ getBaseContent() {
303
+ switch (this.activityType) {
304
+ case activity_type_1.ActivityType.Remark:
305
+ return this.remark;
306
+ case activity_type_1.ActivityType.WorkflowStatus:
307
+ return this.workflow;
308
+ case activity_type_1.ActivityType.Work:
309
+ return this.work;
310
+ case activity_type_1.ActivityType.Task:
311
+ case activity_type_1.ActivityType.WorkflowTask:
312
+ return this.task;
313
+ case activity_type_1.ActivityType.Form:
314
+ return this.form;
315
+ default:
316
+ return undefined;
317
+ }
318
+ }
319
+ }
320
+ __decorate([
321
+ date_field_decorator_1.DateField(),
322
+ __metadata("design:type", Date)
323
+ ], Activity.prototype, "lastActionDateTime", void 0);
324
+ __decorate([
325
+ date_field_decorator_1.DateField(),
326
+ __metadata("design:type", Date)
327
+ ], Activity.prototype, "targetDateTime", void 0);
328
+ __decorate([
329
+ date_field_decorator_1.DateField(),
330
+ __metadata("design:type", Date)
331
+ ], Activity.prototype, "deadlineDateTime", void 0);
332
+ __decorate([
333
+ complex_field_decorator_1.ComplexField(workflow_bo_1.Workflow),
334
+ __metadata("design:type", workflow_bo_1.Workflow)
335
+ ], Activity.prototype, "workflow", void 0);
336
+ __decorate([
337
+ complex_field_decorator_1.ComplexField(task_bo_1.Task),
338
+ __metadata("design:type", task_bo_1.Task)
339
+ ], Activity.prototype, "task", void 0);
340
+ __decorate([
341
+ complex_field_decorator_1.ComplexField(transition_bo_1.Transition),
342
+ __metadata("design:type", transition_bo_1.Transition)
343
+ ], Activity.prototype, "stateChange", void 0);
344
+ __decorate([
345
+ complex_field_decorator_1.ComplexField(remark_bo_1.Remark),
346
+ __metadata("design:type", remark_bo_1.Remark)
347
+ ], Activity.prototype, "remark", void 0);
348
+ __decorate([
349
+ complex_field_decorator_1.ComplexField(work_bo_1.Work),
350
+ __metadata("design:type", work_bo_1.Work)
351
+ ], Activity.prototype, "work", void 0);
352
+ __decorate([
353
+ complex_field_decorator_1.ComplexField(form_bo_1.Form),
354
+ __metadata("design:type", form_bo_1.Form)
355
+ ], Activity.prototype, "form", void 0);
356
+ __decorate([
357
+ no_db_field_decorator_1.NoDbField(),
358
+ __metadata("design:type", Boolean)
359
+ ], Activity.prototype, "isNew", void 0);
360
+ __decorate([
361
+ no_db_field_decorator_1.NoDbField(),
362
+ __metadata("design:type", Boolean)
363
+ ], Activity.prototype, "editting", void 0);
364
+ __decorate([
365
+ no_db_field_decorator_1.NoDbField(),
366
+ __metadata("design:type", String),
367
+ __metadata("design:paramtypes", [])
368
+ ], Activity.prototype, "activityTypeSecondary", null);
369
+ __decorate([
370
+ no_db_field_decorator_1.NoDbField(),
371
+ __metadata("design:type", Boolean),
372
+ __metadata("design:paramtypes", [])
373
+ ], Activity.prototype, "IsRemark", null);
374
+ __decorate([
375
+ no_db_field_decorator_1.NoDbField(),
376
+ __metadata("design:type", Boolean),
377
+ __metadata("design:paramtypes", [])
378
+ ], Activity.prototype, "IsWorkflowStatus", null);
379
+ __decorate([
380
+ no_db_field_decorator_1.NoDbField(),
381
+ __metadata("design:type", Boolean),
382
+ __metadata("design:paramtypes", [])
383
+ ], Activity.prototype, "IsWork", null);
384
+ __decorate([
385
+ no_db_field_decorator_1.NoDbField(),
386
+ __metadata("design:type", Boolean),
387
+ __metadata("design:paramtypes", [])
388
+ ], Activity.prototype, "IsTask", null);
389
+ __decorate([
390
+ no_db_field_decorator_1.NoDbField(),
391
+ __metadata("design:type", Boolean),
392
+ __metadata("design:paramtypes", [])
393
+ ], Activity.prototype, "IsStateChange", null);
394
+ __decorate([
395
+ no_db_field_decorator_1.NoDbField(),
396
+ __metadata("design:type", Boolean),
397
+ __metadata("design:paramtypes", [])
398
+ ], Activity.prototype, "IsForm", null);
399
+ __decorate([
400
+ no_db_field_decorator_1.NoDbField(),
401
+ __metadata("design:type", Object),
402
+ __metadata("design:paramtypes", [])
403
+ ], Activity.prototype, "link", null);
404
+ __decorate([
405
+ no_db_field_decorator_1.NoDbField(),
406
+ __metadata("design:type", String),
407
+ __metadata("design:paramtypes", [])
408
+ ], Activity.prototype, "linkDescription", null);
409
+ __decorate([
410
+ no_db_field_decorator_1.NoDbField(),
411
+ __metadata("design:type", String),
412
+ __metadata("design:paramtypes", [])
413
+ ], Activity.prototype, "name", null);
414
+ __decorate([
415
+ no_db_field_decorator_1.NoDbField(),
416
+ __metadata("design:type", Date),
417
+ __metadata("design:paramtypes", [])
418
+ ], Activity.prototype, "creationDateTime", null);
419
+ __decorate([
420
+ no_db_field_decorator_1.NoDbField(),
421
+ __metadata("design:type", Number),
422
+ __metadata("design:paramtypes", [])
423
+ ], Activity.prototype, "creationDateTimeAsNumber", null);
424
+ __decorate([
425
+ no_db_field_decorator_1.NoDbField(),
426
+ __metadata("design:type", Number),
427
+ __metadata("design:paramtypes", [])
428
+ ], Activity.prototype, "deadlineDateTimeAsNumber", null);
429
+ __decorate([
430
+ no_db_field_decorator_1.NoDbField(),
431
+ __metadata("design:type", String),
432
+ __metadata("design:paramtypes", [])
433
+ ], Activity.prototype, "linkLabel", null);
434
+ __decorate([
435
+ no_db_field_decorator_1.NoDbField(),
436
+ __metadata("design:type", String),
437
+ __metadata("design:paramtypes", [])
438
+ ], Activity.prototype, "subDescription", null);
439
+ __decorate([
440
+ no_db_field_decorator_1.NoDbField(),
441
+ __metadata("design:type", String),
442
+ __metadata("design:paramtypes", [])
443
+ ], Activity.prototype, "label", null);
444
+ __decorate([
445
+ no_db_field_decorator_1.NoDbField(),
446
+ __metadata("design:type", Boolean),
447
+ __metadata("design:paramtypes", [])
448
+ ], Activity.prototype, "canEdit", null);
449
+ __decorate([
450
+ no_db_field_decorator_1.NoDbField(),
451
+ __metadata("design:type", Array),
452
+ __metadata("design:paramtypes", [])
453
+ ], Activity.prototype, "documents", null);
454
+ __decorate([
455
+ no_db_field_decorator_1.NoDbField(),
456
+ __metadata("design:type", Number),
457
+ __metadata("design:paramtypes", [])
458
+ ], Activity.prototype, "time", null);
459
+ __decorate([
460
+ no_db_field_decorator_1.NoDbField(),
461
+ __metadata("design:type", String),
462
+ __metadata("design:paramtypes", [])
463
+ ], Activity.prototype, "executiveName", null);
464
+ __decorate([
465
+ no_db_field_decorator_1.NoDbField(),
466
+ __metadata("design:type", String),
467
+ __metadata("design:paramtypes", [])
468
+ ], Activity.prototype, "authorName", null);
469
+ __decorate([
470
+ no_db_field_decorator_1.NoDbField(),
471
+ __metadata("design:type", relation_small_object_bo_1.RelationSmallObject),
472
+ __metadata("design:paramtypes", [])
473
+ ], Activity.prototype, "executive", null);
474
+ __decorate([
475
+ no_db_field_decorator_1.NoDbField(),
476
+ __metadata("design:type", relation_small_object_bo_1.RelationSmallObject),
477
+ __metadata("design:paramtypes", [])
478
+ ], Activity.prototype, "author", null);
479
+ __decorate([
480
+ no_db_field_decorator_1.NoDbField(),
481
+ __metadata("design:type", Object),
482
+ __metadata("design:paramtypes", [])
483
+ ], Activity.prototype, "classType", null);
484
+ exports.Activity = Activity;
@@ -22,6 +22,7 @@ export declare class CoDocument extends BusinessObject {
22
22
  documentType: CoDocumentType;
23
23
  mimeType: string;
24
24
  publication: number;
25
+ reports: number;
25
26
  fileSize: string;
26
27
  fileType: FileType;
27
28
  isLoaded: boolean;
@@ -48,6 +49,7 @@ export declare class CoDocument extends BusinessObject {
48
49
  get bodyAsDataUri(): string;
49
50
  get documentBodyAsDataUri(): string;
50
51
  get thumbnailBodyAsDataUri(): string;
52
+ get isAvatar(): boolean;
51
53
  private _documentBody;
52
54
  private _documentId;
53
55
  readonly documentBodyChange: Subject<string>;
@@ -24,6 +24,7 @@ const file_type_internal_enum_1 = require("../enum/file-type-internal.enum");
24
24
  const complex_array_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/complex-array.decorator");
25
25
  const object_right_type_enum_1 = require("@colijnit/ioneconnector/build/enum/object-right-type.enum");
26
26
  const file_utils_1 = require("../utils/file-utils");
27
+ const co_document_image_display_kind_enum_1 = require("../enum/co-document-image-display-kind.enum");
27
28
  class CoDocument extends business_object_1.BusinessObject {
28
29
  constructor(rawData = {}) {
29
30
  super();
@@ -97,6 +98,9 @@ class CoDocument extends business_object_1.BusinessObject {
97
98
  return "";
98
99
  }
99
100
  }
101
+ get isAvatar() {
102
+ return this.imageDisplayKind === co_document_image_display_kind_enum_1.CoDocumentImageDisplayKind.Avatar;
103
+ }
100
104
  get readonly() {
101
105
  return this.rightLevel === object_right_type_enum_1.ObjectRightType.ReadOnly;
102
106
  }
@@ -0,0 +1,10 @@
1
+ import { BusinessObject } from "@colijnit/ioneconnector/build/model/business-object";
2
+ export declare class FormQuestionResponse extends BusinessObject {
3
+ responseId: number;
4
+ questionId: number;
5
+ response: string;
6
+ dateResponse: Date;
7
+ timeResponse: Date;
8
+ constructor();
9
+ getId(): number;
10
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FormQuestionResponse = void 0;
13
+ const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
14
+ const date_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/date-field.decorator");
15
+ class FormQuestionResponse extends business_object_1.BusinessObject {
16
+ constructor() {
17
+ super();
18
+ }
19
+ getId() {
20
+ return this.responseId;
21
+ }
22
+ }
23
+ __decorate([
24
+ date_field_decorator_1.DateField(),
25
+ __metadata("design:type", Date)
26
+ ], FormQuestionResponse.prototype, "dateResponse", void 0);
27
+ __decorate([
28
+ date_field_decorator_1.DateField(),
29
+ __metadata("design:type", Date)
30
+ ], FormQuestionResponse.prototype, "timeResponse", void 0);
31
+ exports.FormQuestionResponse = FormQuestionResponse;
@@ -0,0 +1,16 @@
1
+ import { BusinessObject } from "@colijnit/ioneconnector/build/model/business-object";
2
+ import { TransactionKind } from "../enum/transaction-kind";
3
+ import { FormQuestionResponse } from "./form-question-response.bo";
4
+ export declare class Form extends BusinessObject {
5
+ formId: number;
6
+ formName: string;
7
+ key: string;
8
+ questionResponses: FormQuestionResponse[];
9
+ responseId: number;
10
+ table: string;
11
+ transId: number;
12
+ transNr: string;
13
+ transType: TransactionKind;
14
+ getId(): number;
15
+ setId(value: number): void;
16
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Form = void 0;
4
+ const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
5
+ class Form extends business_object_1.BusinessObject {
6
+ getId() {
7
+ return this.responseId;
8
+ }
9
+ setId(value) {
10
+ this.responseId = value;
11
+ }
12
+ }
13
+ exports.Form = Form;
@@ -0,0 +1,28 @@
1
+ import { BusinessObject } from "@colijnit/ioneconnector/build/model/business-object";
2
+ import { CoDocument } from "./co-document";
3
+ import { RelationKind } from "../enum/relation-kind";
4
+ import { RelmanCompleteName } from "../enum/relman-complete-name";
5
+ export declare class RelationSmallObject extends BusinessObject {
6
+ relationId: number;
7
+ firstName: string;
8
+ familyName: string;
9
+ initials: string;
10
+ prefix: string;
11
+ title: string;
12
+ relationNr: any;
13
+ relationType: RelationKind;
14
+ image: CoDocument;
15
+ capacity: number;
16
+ get displayName(): string;
17
+ setUpdatedDisplayName(relationObject: RelmanCompleteName): void;
18
+ get displayInitials(): string;
19
+ get avatarThumbnail(): string;
20
+ set avatarThumbnail(avatarThumbnail: string);
21
+ set avatarImage(avatarDoc: CoDocument);
22
+ get avatarImage(): CoDocument;
23
+ get avatarImageUri(): string;
24
+ get imageDocId(): number;
25
+ constructor();
26
+ getId(): number;
27
+ setId(value: number): void;
28
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RelationSmallObject = void 0;
13
+ const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
14
+ const complex_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/complex-field.decorator");
15
+ const co_document_1 = require("./co-document");
16
+ const business_object_utils_1 = require("@colijnit/ioneconnector/build/utils/business-object-utils");
17
+ class RelationSmallObject extends business_object_1.BusinessObject {
18
+ constructor() {
19
+ super();
20
+ }
21
+ get displayName() {
22
+ return business_object_utils_1.BusinessObjectUtils.GetDisplayName(this.firstName, this.prefix, this.familyName);
23
+ }
24
+ setUpdatedDisplayName(relationObject) {
25
+ this.firstName = relationObject.firstName;
26
+ this.familyName = relationObject.familyName;
27
+ this.prefix = relationObject.prefix;
28
+ }
29
+ get displayInitials() {
30
+ return business_object_utils_1.BusinessObjectUtils.GetDisplayInitials(this.firstName, this.familyName);
31
+ }
32
+ get avatarThumbnail() {
33
+ return this.image ? this.image.thumbnailBodyAsDataUri : "";
34
+ }
35
+ set avatarThumbnail(avatarThumbnail) {
36
+ if (this.image) {
37
+ this.image.thumbnailBody = avatarThumbnail;
38
+ }
39
+ }
40
+ set avatarImage(avatarDoc) {
41
+ this.image = avatarDoc;
42
+ }
43
+ get avatarImage() {
44
+ return this.image;
45
+ }
46
+ get avatarImageUri() {
47
+ return this.avatarImage ? this.avatarImage.thumbnailBodyAsDataUri : "";
48
+ }
49
+ get imageDocId() {
50
+ return this.image ? this.image.documentId : null;
51
+ }
52
+ getId() {
53
+ return this.relationId;
54
+ }
55
+ setId(value) {
56
+ this.relationId = value;
57
+ }
58
+ }
59
+ __decorate([
60
+ complex_field_decorator_1.ComplexField(co_document_1.CoDocument),
61
+ __metadata("design:type", co_document_1.CoDocument)
62
+ ], RelationSmallObject.prototype, "image", void 0);
63
+ exports.RelationSmallObject = RelationSmallObject;