@ironcode/vas-lib 0.0.40 → 1.0.1
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/cjs/lib/entity/index.d.ts +10 -0
- package/cjs/lib/entity/index.d.ts.map +1 -1
- package/cjs/lib/entity/index.js +10 -0
- package/cjs/lib/entity/index.js.map +1 -1
- package/cjs/lib/entity/vas-account-object.model.d.ts +3 -1
- package/cjs/lib/entity/vas-account-object.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-account-object.model.js +4 -2
- package/cjs/lib/entity/vas-account-object.model.js.map +1 -1
- package/cjs/lib/entity/vas-base.dto.d.ts +2 -0
- package/cjs/lib/entity/vas-base.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-base.dto.js.map +1 -1
- package/cjs/lib/entity/vas-base.model.d.ts +3 -10
- package/cjs/lib/entity/vas-base.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-base.model.js +3 -10
- package/cjs/lib/entity/vas-base.model.js.map +1 -1
- package/cjs/lib/entity/vas-branch.model.d.ts +3 -1
- package/cjs/lib/entity/vas-branch.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-branch.model.js +7 -3
- package/cjs/lib/entity/vas-branch.model.js.map +1 -1
- package/cjs/lib/entity/vas-contact.dto.d.ts +7 -0
- package/cjs/lib/entity/vas-contact.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-contact.dto.js.map +1 -1
- package/cjs/lib/entity/vas-contact.model.d.ts +11 -1
- package/cjs/lib/entity/vas-contact.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-contact.model.js +24 -3
- package/cjs/lib/entity/vas-contact.model.js.map +1 -1
- package/cjs/lib/entity/vas-control-type.model.d.ts +5 -9
- package/cjs/lib/entity/vas-control-type.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control-type.model.js +13 -13
- package/cjs/lib/entity/vas-control-type.model.js.map +1 -1
- package/cjs/lib/entity/vas-control.dto.d.ts +3 -1
- package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.dto.js.map +1 -1
- package/cjs/lib/entity/vas-control.model.d.ts +11 -37
- package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.model.js +40 -50
- package/cjs/lib/entity/vas-control.model.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.d.ts +3 -1
- package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-field.model.js +7 -3
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-file.model.d.ts +4 -2
- package/cjs/lib/entity/vas-file.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-file.model.js +9 -5
- package/cjs/lib/entity/vas-file.model.js.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts +6 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.js +14 -4
- package/cjs/lib/entity/vas-fire-user.model.js.map +1 -1
- package/cjs/lib/entity/vas-form.dto.d.ts +1 -0
- package/cjs/lib/entity/vas-form.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form.dto.js.map +1 -1
- package/cjs/lib/entity/vas-form.model.d.ts +7 -22
- package/cjs/lib/entity/vas-form.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form.model.js +27 -42
- package/cjs/lib/entity/vas-form.model.js.map +1 -1
- package/cjs/lib/entity/vas-group.model.d.ts +3 -22
- package/cjs/lib/entity/vas-group.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-group.model.js +7 -24
- package/cjs/lib/entity/vas-group.model.js.map +1 -1
- package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts +6 -0
- package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job-field.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction-job-field.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.d.ts +23 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.js +46 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.dto.d.ts +16 -0
- package/cjs/lib/entity/vas-instruction-job.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction-job.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.model.d.ts +58 -0
- package/cjs/lib/entity/vas-instruction-job.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.model.js +85 -0
- package/cjs/lib/entity/vas-instruction-job.model.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.d.ts +9 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.model.d.ts +34 -0
- package/cjs/lib/entity/vas-instruction-provider.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.model.js +62 -0
- package/cjs/lib/entity/vas-instruction-provider.model.js.map +1 -0
- package/cjs/lib/entity/vas-instruction.dto.d.ts +6 -0
- package/cjs/lib/entity/vas-instruction.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction.model.d.ts +30 -0
- package/cjs/lib/entity/vas-instruction.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction.model.js +53 -0
- package/cjs/lib/entity/vas-instruction.model.js.map +1 -0
- package/cjs/lib/entity/vas-invitation.d.ts +36 -3
- package/cjs/lib/entity/vas-invitation.d.ts.map +1 -1
- package/cjs/lib/entity/vas-invitation.js +57 -4
- package/cjs/lib/entity/vas-invitation.js.map +1 -1
- package/cjs/lib/entity/vas-job-data.model.d.ts +3 -12
- package/cjs/lib/entity/vas-job-data.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job-data.model.js +4 -13
- package/cjs/lib/entity/vas-job-data.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.d.ts +8 -37
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +16 -48
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts +1 -2
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.js +15 -55
- package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -1
- package/cjs/lib/entity/vas-membership.model.d.ts +3 -1
- package/cjs/lib/entity/vas-membership.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-membership.model.js +7 -3
- package/cjs/lib/entity/vas-membership.model.js.map +1 -1
- package/cjs/lib/entity/vas-note.dto.d.ts +7 -0
- package/cjs/lib/entity/vas-note.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-note.dto.js +3 -0
- package/cjs/lib/entity/vas-note.dto.js.map +1 -0
- package/cjs/lib/entity/vas-note.model.d.ts +31 -0
- package/cjs/lib/entity/vas-note.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-note.model.js +54 -0
- package/cjs/lib/entity/vas-note.model.js.map +1 -0
- package/cjs/lib/entity/vas-report-layout.model.d.ts +3 -1
- package/cjs/lib/entity/vas-report-layout.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report-layout.model.js +4 -2
- package/cjs/lib/entity/vas-report-layout.model.js.map +1 -1
- package/cjs/lib/entity/vas-report-request.model.d.ts +3 -1
- package/cjs/lib/entity/vas-report-request.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report-request.model.js +7 -3
- package/cjs/lib/entity/vas-report-request.model.js.map +1 -1
- package/cjs/lib/entity/vas-report.model.d.ts +5 -3
- package/cjs/lib/entity/vas-report.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report.model.js +10 -12
- package/cjs/lib/entity/vas-report.model.js.map +1 -1
- package/cjs/lib/entity/vas-restricted-account-object.model.d.ts +3 -1
- package/cjs/lib/entity/vas-restricted-account-object.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-restricted-account-object.model.js +4 -2
- package/cjs/lib/entity/vas-restricted-account-object.model.js.map +1 -1
- package/cjs/lib/entity/vas-user.dto.d.ts +3 -0
- package/cjs/lib/entity/vas-user.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-user.dto.js.map +1 -1
- package/cjs/lib/entity/vas-user.model.d.ts +6 -1
- package/cjs/lib/entity/vas-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-user.model.js +14 -4
- package/cjs/lib/entity/vas-user.model.js.map +1 -1
- package/cjs/package.json +12 -6
- package/esm2020/lib/entity/index.mjs +11 -1
- package/esm2020/lib/entity/vas-account-object.model.mjs +5 -3
- package/esm2020/lib/entity/vas-base.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-base.model.mjs +4 -11
- package/esm2020/lib/entity/vas-branch.model.mjs +8 -4
- package/esm2020/lib/entity/vas-contact.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-contact.model.mjs +44 -4
- package/esm2020/lib/entity/vas-control-type.model.mjs +14 -14
- package/esm2020/lib/entity/vas-control.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-control.model.mjs +45 -51
- package/esm2020/lib/entity/vas-field.model.mjs +8 -4
- package/esm2020/lib/entity/vas-file.model.mjs +10 -6
- package/esm2020/lib/entity/vas-fire-user.model.mjs +15 -5
- package/esm2020/lib/entity/vas-form.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-form.model.mjs +28 -42
- package/esm2020/lib/entity/vas-group.model.mjs +8 -25
- package/esm2020/lib/entity/vas-instruction-job-field.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction-job-field.model.mjs +42 -0
- package/esm2020/lib/entity/vas-instruction-job.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction-job.model.mjs +81 -0
- package/esm2020/lib/entity/vas-instruction-provider.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction-provider.model.mjs +63 -0
- package/esm2020/lib/entity/vas-instruction.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction.model.mjs +49 -0
- package/esm2020/lib/entity/vas-invitation.mjs +60 -4
- package/esm2020/lib/entity/vas-job-data.model.mjs +5 -14
- package/esm2020/lib/entity/vas-job.model.mjs +17 -49
- package/esm2020/lib/entity/vas-membership.model.mjs +8 -4
- package/esm2020/lib/entity/vas-note.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-note.model.mjs +50 -0
- package/esm2020/lib/entity/vas-report-layout.model.mjs +5 -3
- package/esm2020/lib/entity/vas-report-request.model.mjs +8 -4
- package/esm2020/lib/entity/vas-report.model.mjs +11 -13
- package/esm2020/lib/entity/vas-restricted-account-object.model.mjs +5 -3
- package/esm2020/lib/entity/vas-user.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-user.model.mjs +15 -5
- package/fesm2015/ironcode-vas-lib.mjs +626 -329
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
- package/fesm2020/ironcode-vas-lib.mjs +655 -326
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/index.d.ts +10 -0
- package/lib/entity/vas-account-object.model.d.ts +3 -1
- package/lib/entity/vas-base.dto.d.ts +2 -0
- package/lib/entity/vas-base.model.d.ts +3 -10
- package/lib/entity/vas-branch.model.d.ts +3 -1
- package/lib/entity/vas-contact.dto.d.ts +7 -0
- package/lib/entity/vas-contact.model.d.ts +11 -1
- package/lib/entity/vas-control-type.model.d.ts +5 -9
- package/lib/entity/vas-control.dto.d.ts +3 -1
- package/lib/entity/vas-control.model.d.ts +11 -37
- package/lib/entity/vas-field.model.d.ts +3 -1
- package/lib/entity/vas-file.model.d.ts +4 -2
- package/lib/entity/vas-fire-user.model.d.ts +6 -1
- package/lib/entity/vas-form.dto.d.ts +1 -0
- package/lib/entity/vas-form.model.d.ts +7 -22
- package/lib/entity/vas-group.model.d.ts +3 -22
- package/lib/entity/vas-instruction-job-field.dto.d.ts +5 -0
- package/lib/entity/vas-instruction-job-field.model.d.ts +22 -0
- package/lib/entity/vas-instruction-job.dto.d.ts +15 -0
- package/lib/entity/vas-instruction-job.model.d.ts +57 -0
- package/lib/entity/vas-instruction-provider.dto.d.ts +8 -0
- package/lib/entity/vas-instruction-provider.model.d.ts +33 -0
- package/lib/entity/vas-instruction.dto.d.ts +5 -0
- package/lib/entity/vas-instruction.model.d.ts +29 -0
- package/lib/entity/vas-invitation.d.ts +36 -3
- package/lib/entity/vas-job-data.model.d.ts +3 -12
- package/lib/entity/vas-job.model.d.ts +8 -37
- package/lib/entity/vas-membership.model.d.ts +3 -1
- package/lib/entity/vas-note.dto.d.ts +6 -0
- package/lib/entity/vas-note.model.d.ts +30 -0
- package/lib/entity/vas-report-layout.model.d.ts +3 -1
- package/lib/entity/vas-report-request.model.d.ts +3 -1
- package/lib/entity/vas-report.model.d.ts +5 -3
- package/lib/entity/vas-restricted-account-object.model.d.ts +3 -1
- package/lib/entity/vas-user.dto.d.ts +3 -0
- package/lib/entity/vas-user.model.d.ts +6 -1
- package/package.json +1 -1
|
@@ -22,16 +22,7 @@ var VasControlConfigDirection;
|
|
|
22
22
|
* BaseEntityModel
|
|
23
23
|
*/
|
|
24
24
|
class VasBaseModel {
|
|
25
|
-
|
|
26
|
-
* @param {string} id
|
|
27
|
-
* @param {string} created
|
|
28
|
-
* @param {string} serverCreated
|
|
29
|
-
* @param {string} createdBy
|
|
30
|
-
* @param {string} modified
|
|
31
|
-
* @param {string} serverModified
|
|
32
|
-
* @param {string} modifiedBy
|
|
33
|
-
*/
|
|
34
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy) {
|
|
25
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName) {
|
|
35
26
|
this.id = id;
|
|
36
27
|
this.created = created;
|
|
37
28
|
this.serverCreated = serverCreated;
|
|
@@ -39,12 +30,14 @@ class VasBaseModel {
|
|
|
39
30
|
this.modified = modified;
|
|
40
31
|
this.serverModified = serverModified;
|
|
41
32
|
this.modifiedBy = modifiedBy;
|
|
33
|
+
this.createdByName = createdByName;
|
|
34
|
+
this.modifiedByName = modifiedByName;
|
|
42
35
|
}
|
|
43
36
|
}
|
|
44
37
|
|
|
45
38
|
class VasUserModel extends VasBaseModel {
|
|
46
|
-
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', email, username) {
|
|
47
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
39
|
+
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', createdByName, modifiedByName, email, name, username, memberships, instructionProviders) {
|
|
40
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
48
41
|
this.id = id;
|
|
49
42
|
this.created = created;
|
|
50
43
|
this.serverCreated = serverCreated;
|
|
@@ -52,11 +45,16 @@ class VasUserModel extends VasBaseModel {
|
|
|
52
45
|
this.modified = modified;
|
|
53
46
|
this.serverModified = serverModified;
|
|
54
47
|
this.modifiedBy = modifiedBy;
|
|
48
|
+
this.createdByName = createdByName;
|
|
49
|
+
this.modifiedByName = modifiedByName;
|
|
55
50
|
this.email = email;
|
|
51
|
+
this.name = name;
|
|
56
52
|
this.username = username;
|
|
53
|
+
this.memberships = memberships;
|
|
54
|
+
this.instructionProviders = instructionProviders;
|
|
57
55
|
}
|
|
58
56
|
static fromDto(dto) {
|
|
59
|
-
return new VasUserModel(dto.id, dto.created, dto.serverCreated, dto.createdBy, dto.modified, dto.serverModified, dto.modifiedBy, dto.email, dto.username);
|
|
57
|
+
return new VasUserModel(dto.id, dto.created, dto.serverCreated, dto.createdBy, dto.modified, dto.serverModified, dto.modifiedBy, dto.createdByName || '', dto.modifiedByName || '', dto.email, dto.name, dto.username, dto.memberships, dto.instructionProviders);
|
|
60
58
|
}
|
|
61
59
|
toDto() {
|
|
62
60
|
return {
|
|
@@ -67,15 +65,20 @@ class VasUserModel extends VasBaseModel {
|
|
|
67
65
|
modified: this.modified,
|
|
68
66
|
serverModified: this.serverModified,
|
|
69
67
|
modifiedBy: this.modifiedBy,
|
|
68
|
+
createdByName: this.createdByName,
|
|
69
|
+
modifiedByName: this.modifiedByName,
|
|
70
70
|
email: this.email,
|
|
71
|
-
|
|
71
|
+
name: this.name,
|
|
72
|
+
username: this.username,
|
|
73
|
+
memberships: this.memberships,
|
|
74
|
+
instructionProviders: this.instructionProviders
|
|
72
75
|
};
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
class VasFireUserModel extends VasUserModel {
|
|
77
|
-
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', email, username, accounts, tokens, topics, language, displayName) {
|
|
78
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, email, username);
|
|
80
|
+
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', createdByName, modifiedByName, email, name, username, memberships, instructionProviders, accounts, tokens, topics, language, displayName) {
|
|
81
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, email, name, username, memberships, instructionProviders);
|
|
79
82
|
this.id = id;
|
|
80
83
|
this.created = created;
|
|
81
84
|
this.serverCreated = serverCreated;
|
|
@@ -83,8 +86,13 @@ class VasFireUserModel extends VasUserModel {
|
|
|
83
86
|
this.modified = modified;
|
|
84
87
|
this.serverModified = serverModified;
|
|
85
88
|
this.modifiedBy = modifiedBy;
|
|
89
|
+
this.createdByName = createdByName;
|
|
90
|
+
this.modifiedByName = modifiedByName;
|
|
86
91
|
this.email = email;
|
|
92
|
+
this.name = name;
|
|
87
93
|
this.username = username;
|
|
94
|
+
this.memberships = memberships;
|
|
95
|
+
this.instructionProviders = instructionProviders;
|
|
88
96
|
this.accounts = accounts;
|
|
89
97
|
this.tokens = tokens;
|
|
90
98
|
this.topics = topics;
|
|
@@ -92,10 +100,10 @@ class VasFireUserModel extends VasUserModel {
|
|
|
92
100
|
this.displayName = displayName;
|
|
93
101
|
}
|
|
94
102
|
static fromDto(dto) {
|
|
95
|
-
return new VasFireUserModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.email || '', dto.username || '', dto.accounts || {}, dto.tokens || [], dto.topics || [], dto.language || '', dto.displayName || '');
|
|
103
|
+
return new VasFireUserModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.email || '', dto.name || '', dto.username || '', dto.memberships || [], dto.instructionProviders || [], dto.accounts || {}, dto.tokens || [], dto.topics || [], dto.language || '', dto.displayName || '');
|
|
96
104
|
}
|
|
97
105
|
static newUser(uid, displayName, email) {
|
|
98
|
-
return new VasFireUserModel(uid, moment().toISOString(), moment().toISOString(), uid, moment().toISOString(), moment().toISOString(), uid, email, email, {}, [], [], '', displayName);
|
|
106
|
+
return new VasFireUserModel(uid, moment().toISOString(), moment().toISOString(), uid, moment().toISOString(), moment().toISOString(), uid, '', '', email, displayName, email, [], [], {}, [], [], '', displayName);
|
|
99
107
|
}
|
|
100
108
|
toDto() {
|
|
101
109
|
return {
|
|
@@ -106,8 +114,13 @@ class VasFireUserModel extends VasUserModel {
|
|
|
106
114
|
modified: this.modified,
|
|
107
115
|
serverModified: this.serverModified,
|
|
108
116
|
modifiedBy: this.modifiedBy,
|
|
117
|
+
createdByName: this.createdByName,
|
|
118
|
+
modifiedByName: this.modifiedByName,
|
|
109
119
|
email: this.email,
|
|
120
|
+
name: this.name,
|
|
110
121
|
username: this.username,
|
|
122
|
+
memberships: this.memberships,
|
|
123
|
+
instructionProviders: this.instructionProviders,
|
|
111
124
|
accounts: this.accounts,
|
|
112
125
|
tokens: this.tokens,
|
|
113
126
|
topics: this.topics,
|
|
@@ -171,8 +184,8 @@ var VasAccountIndexingMode;
|
|
|
171
184
|
})(VasAccountIndexingMode || (VasAccountIndexingMode = {}));
|
|
172
185
|
|
|
173
186
|
class VasAccountObjectModel extends VasBaseModel {
|
|
174
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account) {
|
|
175
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
187
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account) {
|
|
188
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
176
189
|
this.id = id;
|
|
177
190
|
this.created = created;
|
|
178
191
|
this.serverCreated = serverCreated;
|
|
@@ -180,6 +193,8 @@ class VasAccountObjectModel extends VasBaseModel {
|
|
|
180
193
|
this.modified = modified;
|
|
181
194
|
this.serverModified = serverModified;
|
|
182
195
|
this.modifiedBy = modifiedBy;
|
|
196
|
+
this.createdByName = createdByName;
|
|
197
|
+
this.modifiedByName = modifiedByName;
|
|
183
198
|
this.account = account;
|
|
184
199
|
}
|
|
185
200
|
toApiDto(options) {
|
|
@@ -192,8 +207,8 @@ class VasAccountObjectModel extends VasBaseModel {
|
|
|
192
207
|
}
|
|
193
208
|
|
|
194
209
|
class VasRestrictedAccountObjectModel extends VasAccountObjectModel {
|
|
195
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup) {
|
|
196
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
|
|
210
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup) {
|
|
211
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
197
212
|
this.id = id;
|
|
198
213
|
this.created = created;
|
|
199
214
|
this.serverCreated = serverCreated;
|
|
@@ -201,14 +216,16 @@ class VasRestrictedAccountObjectModel extends VasAccountObjectModel {
|
|
|
201
216
|
this.modified = modified;
|
|
202
217
|
this.serverModified = serverModified;
|
|
203
218
|
this.modifiedBy = modifiedBy;
|
|
219
|
+
this.createdByName = createdByName;
|
|
220
|
+
this.modifiedByName = modifiedByName;
|
|
204
221
|
this.account = account;
|
|
205
222
|
this.accessGroup = accessGroup;
|
|
206
223
|
}
|
|
207
224
|
}
|
|
208
225
|
|
|
209
226
|
class VasBranchModel extends VasRestrictedAccountObjectModel {
|
|
210
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, branchType, storeCode, address, city, postcode, email, locationManager, areaManager, regionalDirector, salesManager, cluster, hourWeekdays, hourSaturday, hourSunday, exceptions, active) {
|
|
211
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
227
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, branchType, storeCode, address, city, postcode, email, locationManager, areaManager, regionalDirector, salesManager, cluster, hourWeekdays, hourSaturday, hourSunday, exceptions, active) {
|
|
228
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
212
229
|
this.id = id;
|
|
213
230
|
this.created = created;
|
|
214
231
|
this.serverCreated = serverCreated;
|
|
@@ -216,6 +233,8 @@ class VasBranchModel extends VasRestrictedAccountObjectModel {
|
|
|
216
233
|
this.modified = modified;
|
|
217
234
|
this.serverModified = serverModified;
|
|
218
235
|
this.modifiedBy = modifiedBy;
|
|
236
|
+
this.createdByName = createdByName;
|
|
237
|
+
this.modifiedByName = modifiedByName;
|
|
219
238
|
this.account = account;
|
|
220
239
|
this.accessGroup = accessGroup;
|
|
221
240
|
this.branchType = branchType;
|
|
@@ -236,7 +255,7 @@ class VasBranchModel extends VasRestrictedAccountObjectModel {
|
|
|
236
255
|
this.active = active;
|
|
237
256
|
}
|
|
238
257
|
static fromDto(dto) {
|
|
239
|
-
return new VasBranchModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.branchType || '', dto.storeCode || '', dto.address || '', dto.city || '', dto.postcode || '', dto.email || '', dto.locationManager || undefined, dto.areaManager || undefined, dto.regionalDirector || undefined, dto.salesManager || undefined, dto.cluster || '', dto.hourWeekdays || [], dto.hourSaturday || [], dto.hourSunday || [], dto.exceptions || '', dto.active || true);
|
|
258
|
+
return new VasBranchModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.branchType || '', dto.storeCode || '', dto.address || '', dto.city || '', dto.postcode || '', dto.email || '', dto.locationManager || undefined, dto.areaManager || undefined, dto.regionalDirector || undefined, dto.salesManager || undefined, dto.cluster || '', dto.hourWeekdays || [], dto.hourSaturday || [], dto.hourSunday || [], dto.exceptions || '', dto.active || true);
|
|
240
259
|
}
|
|
241
260
|
toDto() {
|
|
242
261
|
return {
|
|
@@ -247,6 +266,8 @@ class VasBranchModel extends VasRestrictedAccountObjectModel {
|
|
|
247
266
|
modified: this.modified,
|
|
248
267
|
serverModified: this.serverModified,
|
|
249
268
|
modifiedBy: this.modifiedBy,
|
|
269
|
+
createdByName: this.createdByName,
|
|
270
|
+
modifiedByName: this.modifiedByName,
|
|
250
271
|
account: this.account,
|
|
251
272
|
accessGroup: this.accessGroup,
|
|
252
273
|
branchType: this.branchType,
|
|
@@ -270,8 +291,8 @@ class VasBranchModel extends VasRestrictedAccountObjectModel {
|
|
|
270
291
|
}
|
|
271
292
|
|
|
272
293
|
class VasContactModel extends VasRestrictedAccountObjectModel {
|
|
273
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, contactType, name, email, mobile, phone, address) {
|
|
274
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
294
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, contactType, name, email, mobile, phone, address, address2, address3, billingCode, business, fax, vatNumber, website) {
|
|
295
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
275
296
|
this.id = id;
|
|
276
297
|
this.created = created;
|
|
277
298
|
this.serverCreated = serverCreated;
|
|
@@ -279,6 +300,8 @@ class VasContactModel extends VasRestrictedAccountObjectModel {
|
|
|
279
300
|
this.modified = modified;
|
|
280
301
|
this.serverModified = serverModified;
|
|
281
302
|
this.modifiedBy = modifiedBy;
|
|
303
|
+
this.createdByName = createdByName;
|
|
304
|
+
this.modifiedByName = modifiedByName;
|
|
282
305
|
this.account = account;
|
|
283
306
|
this.accessGroup = accessGroup;
|
|
284
307
|
this.contactType = contactType;
|
|
@@ -287,9 +310,16 @@ class VasContactModel extends VasRestrictedAccountObjectModel {
|
|
|
287
310
|
this.mobile = mobile;
|
|
288
311
|
this.phone = phone;
|
|
289
312
|
this.address = address;
|
|
313
|
+
this.address2 = address2;
|
|
314
|
+
this.address3 = address3;
|
|
315
|
+
this.billingCode = billingCode;
|
|
316
|
+
this.business = business;
|
|
317
|
+
this.fax = fax;
|
|
318
|
+
this.vatNumber = vatNumber;
|
|
319
|
+
this.website = website;
|
|
290
320
|
}
|
|
291
321
|
static fromDto(dto) {
|
|
292
|
-
return new VasContactModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.contactType || '', dto.name || '', dto.email || '', dto.mobile || '', dto.phone || '', dto.address || '');
|
|
322
|
+
return new VasContactModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.contactType || '', dto.name || '', dto.email || '', dto.mobile || '', dto.phone || '', dto.address || '', dto.address2 || '', dto.address3 || '', dto.billingCode || '', dto.business || '', dto.fax || '', dto.vatNumber || '', dto.website || '');
|
|
293
323
|
}
|
|
294
324
|
toDto() {
|
|
295
325
|
return {
|
|
@@ -300,6 +330,8 @@ class VasContactModel extends VasRestrictedAccountObjectModel {
|
|
|
300
330
|
modified: this.modified,
|
|
301
331
|
serverModified: this.serverModified,
|
|
302
332
|
modifiedBy: this.modifiedBy,
|
|
333
|
+
createdByName: this.createdByName,
|
|
334
|
+
modifiedByName: this.modifiedByName,
|
|
303
335
|
account: this.account,
|
|
304
336
|
accessGroup: this.accessGroup,
|
|
305
337
|
contactType: this.contactType,
|
|
@@ -308,38 +340,96 @@ class VasContactModel extends VasRestrictedAccountObjectModel {
|
|
|
308
340
|
mobile: this.mobile,
|
|
309
341
|
phone: this.phone,
|
|
310
342
|
address: this.address,
|
|
343
|
+
address2: this.address2,
|
|
344
|
+
address3: this.address3,
|
|
345
|
+
billingCode: this.billingCode,
|
|
346
|
+
business: this.business,
|
|
347
|
+
fax: this.fax,
|
|
348
|
+
vatNumber: this.vatNumber,
|
|
349
|
+
website: this.website,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
toApiDto(options) {
|
|
353
|
+
return {
|
|
354
|
+
...super.toApiDto(),
|
|
355
|
+
id: this.id,
|
|
356
|
+
created: this.created || '~',
|
|
357
|
+
modified: this.modified || '~',
|
|
358
|
+
accessGroup: this.accessGroup || '~',
|
|
359
|
+
contactType: this.contactType || '~',
|
|
360
|
+
name: this.name || '~',
|
|
361
|
+
email: this.email || '~',
|
|
362
|
+
mobile: this.mobile || '~',
|
|
363
|
+
phone: this.phone || '~',
|
|
364
|
+
address: this.address || '~',
|
|
365
|
+
address2: this.address2 || '~',
|
|
366
|
+
address3: this.address3 || '~',
|
|
367
|
+
billingCode: this.billingCode || '~',
|
|
368
|
+
business: this.business || '~',
|
|
369
|
+
fax: this.fax || '~',
|
|
370
|
+
vatNumber: this.vatNumber || '~',
|
|
371
|
+
website: this.website || '~',
|
|
311
372
|
};
|
|
312
373
|
}
|
|
313
374
|
}
|
|
314
375
|
|
|
315
376
|
/**
|
|
316
|
-
*
|
|
377
|
+
* VasControlTypeModel
|
|
317
378
|
*/
|
|
318
|
-
class
|
|
379
|
+
class VasControlTypeModel extends VasBaseModel {
|
|
380
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, name) {
|
|
381
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
382
|
+
this.id = id;
|
|
383
|
+
this.created = created;
|
|
384
|
+
this.serverCreated = serverCreated;
|
|
385
|
+
this.createdBy = createdBy;
|
|
386
|
+
this.modified = modified;
|
|
387
|
+
this.serverModified = serverModified;
|
|
388
|
+
this.modifiedBy = modifiedBy;
|
|
389
|
+
this.createdByName = createdByName;
|
|
390
|
+
this.modifiedByName = modifiedByName;
|
|
391
|
+
this.name = name;
|
|
392
|
+
}
|
|
319
393
|
/**
|
|
320
|
-
* @
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
* @param {
|
|
327
|
-
* @
|
|
328
|
-
* @param {string} accessGroup
|
|
329
|
-
* @param {string} controlType
|
|
330
|
-
* @param {string} group
|
|
331
|
-
* @param {string[]} validators
|
|
332
|
-
* @param {string} name
|
|
333
|
-
* @param {string} title
|
|
334
|
-
* @param {boolean} linkable
|
|
335
|
-
* @param {number} sequence
|
|
336
|
-
* @param {string} description
|
|
337
|
-
* @param {string} defaultValue
|
|
338
|
-
* @param {object} config
|
|
339
|
-
* @param {string} descriptionImage
|
|
394
|
+
* @return VasControlTypeModel
|
|
395
|
+
*/
|
|
396
|
+
static empty() {
|
|
397
|
+
return new VasControlTypeModel('', '', '', '', '', '', '', '', '', '');
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* @param {VasControlTypeDto} dto
|
|
401
|
+
* @return {VasControlTypeModel}
|
|
340
402
|
*/
|
|
341
|
-
|
|
342
|
-
|
|
403
|
+
static fromDto(dto) {
|
|
404
|
+
return new VasControlTypeModel(
|
|
405
|
+
// eslint-disable-next-line new-cap
|
|
406
|
+
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.name || '');
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* @return {VasControlTypeDto}
|
|
410
|
+
*/
|
|
411
|
+
toDto() {
|
|
412
|
+
return {
|
|
413
|
+
id: this.id,
|
|
414
|
+
created: this.created,
|
|
415
|
+
serverCreated: this.serverCreated,
|
|
416
|
+
createdBy: this.createdBy,
|
|
417
|
+
modified: this.modified,
|
|
418
|
+
serverModified: this.serverModified,
|
|
419
|
+
modifiedBy: this.modifiedBy,
|
|
420
|
+
createdByName: this.createdByName,
|
|
421
|
+
modifiedByName: this.modifiedByName,
|
|
422
|
+
name: this.name
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* ControlModel
|
|
429
|
+
*/
|
|
430
|
+
class VasControlModel extends VasAccountObjectModel {
|
|
431
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled) {
|
|
432
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
343
433
|
this.id = id;
|
|
344
434
|
this.created = created;
|
|
345
435
|
this.serverCreated = serverCreated;
|
|
@@ -347,6 +437,8 @@ class VasControlModel extends VasBaseModel {
|
|
|
347
437
|
this.modified = modified;
|
|
348
438
|
this.serverModified = serverModified;
|
|
349
439
|
this.modifiedBy = modifiedBy;
|
|
440
|
+
this.createdByName = createdByName;
|
|
441
|
+
this.modifiedByName = modifiedByName;
|
|
350
442
|
this.account = account;
|
|
351
443
|
this.accessGroup = accessGroup;
|
|
352
444
|
this.controlType = controlType;
|
|
@@ -358,28 +450,19 @@ class VasControlModel extends VasBaseModel {
|
|
|
358
450
|
this.sequence = sequence;
|
|
359
451
|
this.description = description;
|
|
360
452
|
this.defaultValue = defaultValue;
|
|
361
|
-
this.
|
|
453
|
+
this.config = config;
|
|
362
454
|
this.descriptionImage = descriptionImage;
|
|
363
|
-
this.
|
|
364
|
-
this.
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
*/
|
|
371
|
-
getConfigModel() {
|
|
372
|
-
if (this.configCache !== undefined) {
|
|
373
|
-
return this.configCache;
|
|
455
|
+
this.portalEnabled = portalEnabled;
|
|
456
|
+
this.controlTypeId = '';
|
|
457
|
+
if (typeof controlType === 'string') {
|
|
458
|
+
this.controlTypeId = controlType;
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
this.controlTypeId = controlType.id;
|
|
374
462
|
}
|
|
375
|
-
return this.configCache = JSON.parse(this._config);
|
|
376
|
-
}
|
|
377
|
-
get config() {
|
|
378
|
-
return this._config;
|
|
379
463
|
}
|
|
380
|
-
|
|
381
|
-
this.
|
|
382
|
-
this.configCache = undefined;
|
|
464
|
+
get controlTypeName() {
|
|
465
|
+
return this.controlType?.name || '';
|
|
383
466
|
}
|
|
384
467
|
/**
|
|
385
468
|
* The defaultValue property is returned from the api as a string or number,
|
|
@@ -387,8 +470,8 @@ class VasControlModel extends VasBaseModel {
|
|
|
387
470
|
* object if the value is a json string
|
|
388
471
|
*/
|
|
389
472
|
get defaultValueDecoded() {
|
|
390
|
-
if (this.defaultValue === '' && this.
|
|
391
|
-
switch (this.
|
|
473
|
+
if (this.defaultValue === '' && this.controlType) {
|
|
474
|
+
switch (this.controlTypeName) {
|
|
392
475
|
case 'branch':
|
|
393
476
|
case 'camera':
|
|
394
477
|
case 'contact': {
|
|
@@ -431,9 +514,20 @@ class VasControlModel extends VasBaseModel {
|
|
|
431
514
|
* @return {VasControlModel}
|
|
432
515
|
*/
|
|
433
516
|
static fromDto(dto) {
|
|
517
|
+
const handleControlType = (c) => {
|
|
518
|
+
if (c === undefined) {
|
|
519
|
+
return VasControlTypeModel.empty();
|
|
520
|
+
}
|
|
521
|
+
else if (typeof c === 'string') {
|
|
522
|
+
return c;
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
return VasControlTypeModel.fromDto(c);
|
|
526
|
+
}
|
|
527
|
+
};
|
|
434
528
|
return new VasControlModel(
|
|
435
529
|
// eslint-disable-next-line new-cap
|
|
436
|
-
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.
|
|
530
|
+
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', handleControlType(dto.controlType), dto.group || '', dto.validators || [], dto.name || '', dto.title || '', dto.linkable || false, dto.sequence || 0, dto.description || '', dto.defaultValue || '', JSON.parse(dto.config || '{}'), dto.descriptionImage || '', dto.portalEnabled || false);
|
|
437
531
|
}
|
|
438
532
|
/**
|
|
439
533
|
* @param {string} value
|
|
@@ -462,9 +556,11 @@ class VasControlModel extends VasBaseModel {
|
|
|
462
556
|
modified: this.modified,
|
|
463
557
|
serverModified: this.serverModified,
|
|
464
558
|
modifiedBy: this.modifiedBy,
|
|
559
|
+
createdByName: this.createdByName,
|
|
560
|
+
modifiedByName: this.modifiedByName,
|
|
465
561
|
account: this.account,
|
|
466
562
|
accessGroup: this.accessGroup,
|
|
467
|
-
controlType: this.controlType,
|
|
563
|
+
controlType: this.controlType.toDto(),
|
|
468
564
|
group: this.group,
|
|
469
565
|
validators: this.validators,
|
|
470
566
|
name: this.name,
|
|
@@ -473,59 +569,17 @@ class VasControlModel extends VasBaseModel {
|
|
|
473
569
|
sequence: this.sequence,
|
|
474
570
|
description: this.description,
|
|
475
571
|
defaultValue: this.defaultValue,
|
|
476
|
-
config: this.config,
|
|
572
|
+
config: JSON.stringify(this.config),
|
|
477
573
|
descriptionImage: this.descriptionImage,
|
|
574
|
+
portalEnabled: this.portalEnabled
|
|
478
575
|
};
|
|
479
576
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* VasControlTypeModel
|
|
484
|
-
*/
|
|
485
|
-
class VasControlTypeModel extends VasBaseModel {
|
|
486
|
-
/**
|
|
487
|
-
* @param {string} id
|
|
488
|
-
* @param {string} created
|
|
489
|
-
* @param {string} serverCreated
|
|
490
|
-
* @param {string} createdBy
|
|
491
|
-
* @param {string} modified
|
|
492
|
-
* @param {string} serverModified
|
|
493
|
-
* @param {string} modifiedBy
|
|
494
|
-
* @param {string} name
|
|
495
|
-
*/
|
|
496
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, name) {
|
|
497
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
498
|
-
this.id = id;
|
|
499
|
-
this.created = created;
|
|
500
|
-
this.serverCreated = serverCreated;
|
|
501
|
-
this.createdBy = createdBy;
|
|
502
|
-
this.modified = modified;
|
|
503
|
-
this.serverModified = serverModified;
|
|
504
|
-
this.modifiedBy = modifiedBy;
|
|
505
|
-
this.name = name;
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* @param {VasControlTypeDto} dto
|
|
509
|
-
* @return {VasControlTypeModel}
|
|
510
|
-
*/
|
|
511
|
-
static fromDto(dto) {
|
|
512
|
-
return new VasControlTypeModel(
|
|
513
|
-
// eslint-disable-next-line new-cap
|
|
514
|
-
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.name || '');
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* @return {VasControlTypeDto}
|
|
518
|
-
*/
|
|
519
|
-
toDto() {
|
|
577
|
+
toApiDto(options) {
|
|
520
578
|
return {
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
modified: this.modified,
|
|
526
|
-
serverModified: this.serverModified,
|
|
527
|
-
modifiedBy: this.modifiedBy,
|
|
528
|
-
name: this.name
|
|
579
|
+
...super.toApiDto(),
|
|
580
|
+
title: this.title || '~',
|
|
581
|
+
name: this.title || '~',
|
|
582
|
+
portalEnabled: this.portalEnabled,
|
|
529
583
|
};
|
|
530
584
|
}
|
|
531
585
|
}
|
|
@@ -534,19 +588,8 @@ class VasControlTypeModel extends VasBaseModel {
|
|
|
534
588
|
* VasJobDataModel
|
|
535
589
|
*/
|
|
536
590
|
class VasJobDataModel extends VasAccountObjectModel {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
* @param {string} created
|
|
540
|
-
* @param {string} serverCreated
|
|
541
|
-
* @param {string} createdBy
|
|
542
|
-
* @param {string} modified
|
|
543
|
-
* @param {string} serverModified
|
|
544
|
-
* @param {string} modifiedBy
|
|
545
|
-
* @param {string} account
|
|
546
|
-
* @param {string} job
|
|
547
|
-
*/
|
|
548
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job) {
|
|
549
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
|
|
591
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job) {
|
|
592
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
550
593
|
this.id = id;
|
|
551
594
|
this.created = created;
|
|
552
595
|
this.serverCreated = serverCreated;
|
|
@@ -554,6 +597,8 @@ class VasJobDataModel extends VasAccountObjectModel {
|
|
|
554
597
|
this.modified = modified;
|
|
555
598
|
this.serverModified = serverModified;
|
|
556
599
|
this.modifiedBy = modifiedBy;
|
|
600
|
+
this.createdByName = createdByName;
|
|
601
|
+
this.modifiedByName = modifiedByName;
|
|
557
602
|
this.account = account;
|
|
558
603
|
this.job = job;
|
|
559
604
|
}
|
|
@@ -563,8 +608,8 @@ class VasJobDataModel extends VasAccountObjectModel {
|
|
|
563
608
|
* VasFieldModel
|
|
564
609
|
*/
|
|
565
610
|
class VasFieldModel extends VasJobDataModel {
|
|
566
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job, control, fieldJobPointers, value, version) {
|
|
567
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job);
|
|
611
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, control, fieldJobPointers, value, version) {
|
|
612
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
568
613
|
this.id = id;
|
|
569
614
|
this.created = created;
|
|
570
615
|
this.serverCreated = serverCreated;
|
|
@@ -572,6 +617,8 @@ class VasFieldModel extends VasJobDataModel {
|
|
|
572
617
|
this.modified = modified;
|
|
573
618
|
this.serverModified = serverModified;
|
|
574
619
|
this.modifiedBy = modifiedBy;
|
|
620
|
+
this.createdByName = createdByName;
|
|
621
|
+
this.modifiedByName = modifiedByName;
|
|
575
622
|
this.account = account;
|
|
576
623
|
this.job = job;
|
|
577
624
|
this.control = control;
|
|
@@ -584,7 +631,7 @@ class VasFieldModel extends VasJobDataModel {
|
|
|
584
631
|
* @return {VasFieldModel}
|
|
585
632
|
*/
|
|
586
633
|
static fromDto(fieldDto) {
|
|
587
|
-
return new VasFieldModel(fieldDto.id || UUID.UUID(), fieldDto.created || '', fieldDto.serverCreated || '', fieldDto.createdBy || '', fieldDto.modified || '', fieldDto.serverModified || '', fieldDto.modifiedBy || '', fieldDto.account || '', fieldDto.job || '', fieldDto.control || '', fieldDto.fieldJobPointers || [], fieldDto.value || '', fieldDto.version || 0);
|
|
634
|
+
return new VasFieldModel(fieldDto.id || UUID.UUID(), fieldDto.created || '', fieldDto.serverCreated || '', fieldDto.createdBy || '', fieldDto.modified || '', fieldDto.serverModified || '', fieldDto.modifiedBy || '', fieldDto.createdByName || '', fieldDto.modifiedByName || '', fieldDto.account || '', fieldDto.job || '', fieldDto.control || '', fieldDto.fieldJobPointers || [], fieldDto.value || '', fieldDto.version || 0);
|
|
588
635
|
}
|
|
589
636
|
/**
|
|
590
637
|
* @return {VasFieldDto}
|
|
@@ -598,6 +645,8 @@ class VasFieldModel extends VasJobDataModel {
|
|
|
598
645
|
modified: this.modified,
|
|
599
646
|
serverModified: this.serverModified,
|
|
600
647
|
modifiedBy: this.modifiedBy,
|
|
648
|
+
createdByName: this.createdByName,
|
|
649
|
+
modifiedByName: this.modifiedByName,
|
|
601
650
|
account: this.account,
|
|
602
651
|
job: this.job,
|
|
603
652
|
control: this.control,
|
|
@@ -658,8 +707,8 @@ function isFileDto(object) {
|
|
|
658
707
|
* VasFileDto
|
|
659
708
|
*/
|
|
660
709
|
class VasFileModel extends VasJobDataModel {
|
|
661
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job, name, fileSize, mimeType, sequence, config, url, controlPath, message, status, uri) {
|
|
662
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job);
|
|
710
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, name, fileSize, mimeType, sequence, config, url, controlPath, message, status, uri) {
|
|
711
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
663
712
|
this.id = id;
|
|
664
713
|
this.created = created;
|
|
665
714
|
this.serverCreated = serverCreated;
|
|
@@ -667,6 +716,8 @@ class VasFileModel extends VasJobDataModel {
|
|
|
667
716
|
this.modified = modified;
|
|
668
717
|
this.serverModified = serverModified;
|
|
669
718
|
this.modifiedBy = modifiedBy;
|
|
719
|
+
this.createdByName = createdByName;
|
|
720
|
+
this.modifiedByName = modifiedByName;
|
|
670
721
|
this.account = account;
|
|
671
722
|
this.job = job;
|
|
672
723
|
this.name = name;
|
|
@@ -681,7 +732,7 @@ class VasFileModel extends VasJobDataModel {
|
|
|
681
732
|
this.uri = uri;
|
|
682
733
|
}
|
|
683
734
|
static empty() {
|
|
684
|
-
return new VasFileModel('', '', '', '', '', '', '', '', '', '', 0, '', 0, {
|
|
735
|
+
return new VasFileModel('', '', '', '', '', '', '', '', '', '', '', '', 0, '', 0, {
|
|
685
736
|
displayAs: 'grid',
|
|
686
737
|
embedLink: false,
|
|
687
738
|
group: 'photo',
|
|
@@ -690,8 +741,8 @@ class VasFileModel extends VasJobDataModel {
|
|
|
690
741
|
rotation: 0
|
|
691
742
|
}, '', '', '', '', '');
|
|
692
743
|
}
|
|
693
|
-
static fromDto(
|
|
694
|
-
return new VasFileModel(
|
|
744
|
+
static fromDto(dto) {
|
|
745
|
+
return new VasFileModel(dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.name || '', dto.fileSize || 0, dto.mimeType || '', dto.sequence || 0, VasFileModel.parseConfig(dto.config), dto.url || '', dto.controlPath || '', dto.message || '', dto.status || '', dto.uri || '');
|
|
695
746
|
}
|
|
696
747
|
static parseConfig(config = '') {
|
|
697
748
|
try {
|
|
@@ -720,6 +771,8 @@ class VasFileModel extends VasJobDataModel {
|
|
|
720
771
|
modified: this.modified,
|
|
721
772
|
serverModified: this.serverModified,
|
|
722
773
|
modifiedBy: this.modifiedBy,
|
|
774
|
+
createdByName: this.createdByName,
|
|
775
|
+
modifiedByName: this.modifiedByName,
|
|
723
776
|
account: this.account,
|
|
724
777
|
job: this.job,
|
|
725
778
|
name: this.name,
|
|
@@ -778,29 +831,8 @@ class VasFileModel extends VasJobDataModel {
|
|
|
778
831
|
* GroupModel
|
|
779
832
|
*/
|
|
780
833
|
class VasGroupModel extends VasBaseModel {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
* @param {string} created
|
|
784
|
-
* @param {string} serverCreated
|
|
785
|
-
* @param {string} createdBy
|
|
786
|
-
* @param {string} modified
|
|
787
|
-
* @param {string} serverModified
|
|
788
|
-
* @param {string} modifiedBy
|
|
789
|
-
* @param {string} account
|
|
790
|
-
* @param {string} accessGroup
|
|
791
|
-
* @param {string} name
|
|
792
|
-
* @param {string} title
|
|
793
|
-
* @param {string} description
|
|
794
|
-
* @param {number} sequence
|
|
795
|
-
* @param {boolean} includeInSummary
|
|
796
|
-
* @param {string[]} forms
|
|
797
|
-
* @param {string} visibilityControl
|
|
798
|
-
* @param {string} visibleIfEquals
|
|
799
|
-
* @param {VasControlModel[]} controls
|
|
800
|
-
* @param {number} scoreWeight
|
|
801
|
-
*/
|
|
802
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, name, title, description, sequence, includeInSummary, forms, visibilityControl, visibleIfEquals, controls, scoreWeight) {
|
|
803
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
834
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, name, title, description, sequence, includeInSummary, forms, visibilityControl, visibleIfEquals, controls, scoreWeight) {
|
|
835
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
804
836
|
this.id = id;
|
|
805
837
|
this.created = created;
|
|
806
838
|
this.serverCreated = serverCreated;
|
|
@@ -808,6 +840,8 @@ class VasGroupModel extends VasBaseModel {
|
|
|
808
840
|
this.modified = modified;
|
|
809
841
|
this.serverModified = serverModified;
|
|
810
842
|
this.modifiedBy = modifiedBy;
|
|
843
|
+
this.createdByName = createdByName;
|
|
844
|
+
this.modifiedByName = modifiedByName;
|
|
811
845
|
this.account = account;
|
|
812
846
|
this.accessGroup = accessGroup;
|
|
813
847
|
this.name = name;
|
|
@@ -828,7 +862,7 @@ class VasGroupModel extends VasBaseModel {
|
|
|
828
862
|
static fromDto(dto) {
|
|
829
863
|
return new VasGroupModel(
|
|
830
864
|
// eslint-disable-next-line new-cap
|
|
831
|
-
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.name || '', dto.title || '', dto.description || '', dto.sequence || 0, dto.includeInSummary || false, dto.forms || [], dto.visibilityControl || '', dto.visibleIfEquals || '', (dto.controls || [])
|
|
865
|
+
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.name || '', dto.title || '', dto.description || '', dto.sequence || 0, dto.includeInSummary || false, dto.forms || [], dto.visibilityControl || '', dto.visibleIfEquals || '', (dto.controls || [])
|
|
832
866
|
.filter(control => control.name.startsWith('fields.'))
|
|
833
867
|
.sort((a, b) => a.sequence - b.sequence)
|
|
834
868
|
.map(c => VasControlModel.fromDto(c)), dto.scoreWeight || 1);
|
|
@@ -861,6 +895,8 @@ class VasGroupModel extends VasBaseModel {
|
|
|
861
895
|
modified: this.modified,
|
|
862
896
|
serverModified: this.serverModified,
|
|
863
897
|
modifiedBy: this.modifiedBy,
|
|
898
|
+
createdByName: this.createdByName,
|
|
899
|
+
modifiedByName: this.modifiedByName,
|
|
864
900
|
account: this.account,
|
|
865
901
|
accessGroup: this.accessGroup,
|
|
866
902
|
name: this.name,
|
|
@@ -881,28 +917,8 @@ class VasGroupModel extends VasBaseModel {
|
|
|
881
917
|
* VasFormModel
|
|
882
918
|
*/
|
|
883
919
|
class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
* @param {string} created
|
|
887
|
-
* @param {string} serverCreated
|
|
888
|
-
* @param {string} createdBy
|
|
889
|
-
* @param {string} modified
|
|
890
|
-
* @param {string} serverModified
|
|
891
|
-
* @param {string} modifiedBy
|
|
892
|
-
* @param {string} account
|
|
893
|
-
* @param {string} accessGroup
|
|
894
|
-
* @param {string} jobType
|
|
895
|
-
* @param {string} title
|
|
896
|
-
* @param {string} description
|
|
897
|
-
* @param {VasGroupModel[]} groups
|
|
898
|
-
* @param {string} dynamicDescriptor
|
|
899
|
-
* @param {string} indexName
|
|
900
|
-
* @param {string} pipelineName
|
|
901
|
-
* @param {string} config
|
|
902
|
-
* @param {boolean} geoLocationEnabled
|
|
903
|
-
*/
|
|
904
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, jobType, title, description, groups, dynamicDescriptor, indexName, pipelineName, config, geoLocationEnabled) {
|
|
905
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
920
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, jobType, title, description, groups, dynamicDescriptor, indexName, pipelineName, config, geoLocationEnabled, filesEnabled) {
|
|
921
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
906
922
|
this.id = id;
|
|
907
923
|
this.created = created;
|
|
908
924
|
this.serverCreated = serverCreated;
|
|
@@ -910,6 +926,8 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
910
926
|
this.modified = modified;
|
|
911
927
|
this.serverModified = serverModified;
|
|
912
928
|
this.modifiedBy = modifiedBy;
|
|
929
|
+
this.createdByName = createdByName;
|
|
930
|
+
this.modifiedByName = modifiedByName;
|
|
913
931
|
this.account = account;
|
|
914
932
|
this.accessGroup = accessGroup;
|
|
915
933
|
this.jobType = jobType;
|
|
@@ -921,6 +939,7 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
921
939
|
this.pipelineName = pipelineName;
|
|
922
940
|
this.config = config;
|
|
923
941
|
this.geoLocationEnabled = geoLocationEnabled;
|
|
942
|
+
this.filesEnabled = filesEnabled;
|
|
924
943
|
}
|
|
925
944
|
/**
|
|
926
945
|
* Returns the name of this form in a "safe" way, i.e. no spaces, special
|
|
@@ -941,6 +960,8 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
941
960
|
* @param {VasFormDto} formDto
|
|
942
961
|
* @param {Array<VasControlTypeDto>} controlTypeDtos
|
|
943
962
|
* @return {VasFormModel}
|
|
963
|
+
* @deprecated vas-rest has been updated to inline control types into the
|
|
964
|
+
* control so this method is no longer required. use VasFormModel.fromDto()
|
|
944
965
|
*/
|
|
945
966
|
static fromApiResponse(formDto, controlTypeDtos) {
|
|
946
967
|
const controlTypeModels = controlTypeDtos
|
|
@@ -950,32 +971,30 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
950
971
|
.forEach(group => {
|
|
951
972
|
group.controls
|
|
952
973
|
.forEach(control => {
|
|
953
|
-
|
|
954
|
-
|
|
974
|
+
// Note that we are forcing types here. This is because we have
|
|
975
|
+
// updated the typings for ControlModel and ControlDto to reflect
|
|
976
|
+
// the fact that VASREST is updating the response from certain
|
|
977
|
+
// controllers to inline ControlType into the Control. Consumers of
|
|
978
|
+
// the library will know what version of the API they are consuming
|
|
979
|
+
// so can decide when to migrate away from fromApiResponse, and can
|
|
980
|
+
// use fromDto instead
|
|
981
|
+
control.controlType = controlTypeModels
|
|
982
|
+
.find(ct => ct.id === (control.controlTypeId));
|
|
955
983
|
});
|
|
956
984
|
});
|
|
957
985
|
return formModel;
|
|
958
986
|
}
|
|
987
|
+
static empty() {
|
|
988
|
+
return VasFormModel.fromDto({});
|
|
989
|
+
}
|
|
959
990
|
/**
|
|
960
991
|
* @param {VasFormDto} dto
|
|
961
992
|
* @return {VasFormModel}
|
|
962
993
|
*/
|
|
963
994
|
static fromDto(dto) {
|
|
964
|
-
return new VasFormModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.jobType || '', dto.title || '', dto.description || '', (dto.groups || [])
|
|
995
|
+
return new VasFormModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.jobType || '', dto.title || '', dto.description || '', (dto.groups || [])
|
|
965
996
|
.sort((a, b) => a.sequence - b.sequence)
|
|
966
|
-
.map(g => VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config || '', dto.geoLocationEnabled || false);
|
|
967
|
-
}
|
|
968
|
-
addControlTypesToControl(controlTypes) {
|
|
969
|
-
const controlTypeModels = controlTypes
|
|
970
|
-
.map(ct => VasControlTypeModel.fromDto(ct));
|
|
971
|
-
this.groups
|
|
972
|
-
.forEach(group => {
|
|
973
|
-
group.controls
|
|
974
|
-
.forEach(control => {
|
|
975
|
-
control.controlTypeModel = controlTypeModels
|
|
976
|
-
.find(ctm => ctm.id === control.controlType);
|
|
977
|
-
});
|
|
978
|
-
});
|
|
997
|
+
.map(g => VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config || '', dto.geoLocationEnabled || false, dto.filesEnabled || false);
|
|
979
998
|
}
|
|
980
999
|
/**
|
|
981
1000
|
* @param {string} id
|
|
@@ -1020,7 +1039,7 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
1020
1039
|
const paths = [];
|
|
1021
1040
|
this.groups.forEach(group => {
|
|
1022
1041
|
group.controls.forEach(control => {
|
|
1023
|
-
if (control.
|
|
1042
|
+
if (control.controlTypeName !== 'camera') {
|
|
1024
1043
|
return;
|
|
1025
1044
|
}
|
|
1026
1045
|
paths.push([group.name, control.safeName]);
|
|
@@ -1058,6 +1077,8 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
1058
1077
|
modified: this.modified,
|
|
1059
1078
|
serverModified: this.serverModified,
|
|
1060
1079
|
modifiedBy: this.modifiedBy,
|
|
1080
|
+
createdByName: this.createdByName,
|
|
1081
|
+
modifiedByName: this.modifiedByName,
|
|
1061
1082
|
account: this.account,
|
|
1062
1083
|
accessGroup: this.accessGroup,
|
|
1063
1084
|
jobType: this.jobType,
|
|
@@ -1068,14 +1089,23 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
1068
1089
|
indexName: this.indexName,
|
|
1069
1090
|
pipelineName: this.pipelineName,
|
|
1070
1091
|
config: this.config,
|
|
1071
|
-
geoLocationEnabled: this.geoLocationEnabled
|
|
1092
|
+
geoLocationEnabled: this.geoLocationEnabled,
|
|
1093
|
+
filesEnabled: this.filesEnabled
|
|
1072
1094
|
};
|
|
1073
1095
|
}
|
|
1074
1096
|
}
|
|
1075
1097
|
|
|
1098
|
+
var VasInvitationTypeEnum;
|
|
1099
|
+
(function (VasInvitationTypeEnum) {
|
|
1100
|
+
VasInvitationTypeEnum["TYPE_VAS_DESKTOP"] = "vas-desktop";
|
|
1101
|
+
VasInvitationTypeEnum["TYPE_VAS_MOBILE"] = "vas-mobile";
|
|
1102
|
+
VasInvitationTypeEnum["TYPE_VAS_PORTAL"] = "vas-portal";
|
|
1103
|
+
VasInvitationTypeEnum["TYPE_P2C_DESKTOP"] = "p2c-desktop";
|
|
1104
|
+
VasInvitationTypeEnum["TYPE_P2C_MOBILE"] = "p2c-mobile";
|
|
1105
|
+
})(VasInvitationTypeEnum || (VasInvitationTypeEnum = {}));
|
|
1076
1106
|
class VasInvitationModel extends VasAccountObjectModel {
|
|
1077
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, secret) {
|
|
1078
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
|
|
1107
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, secret, type, accessGroups, contactTypes, jobStatuses, jobTypes, lookupTypes, taskTypes, instructionProviders) {
|
|
1108
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
1079
1109
|
this.id = id;
|
|
1080
1110
|
this.created = created;
|
|
1081
1111
|
this.serverCreated = serverCreated;
|
|
@@ -1083,8 +1113,18 @@ class VasInvitationModel extends VasAccountObjectModel {
|
|
|
1083
1113
|
this.modified = modified;
|
|
1084
1114
|
this.serverModified = serverModified;
|
|
1085
1115
|
this.modifiedBy = modifiedBy;
|
|
1116
|
+
this.createdByName = createdByName;
|
|
1117
|
+
this.modifiedByName = modifiedByName;
|
|
1086
1118
|
this.account = account;
|
|
1087
1119
|
this.secret = secret;
|
|
1120
|
+
this.type = type;
|
|
1121
|
+
this.accessGroups = accessGroups;
|
|
1122
|
+
this.contactTypes = contactTypes;
|
|
1123
|
+
this.jobStatuses = jobStatuses;
|
|
1124
|
+
this.jobTypes = jobTypes;
|
|
1125
|
+
this.lookupTypes = lookupTypes;
|
|
1126
|
+
this.taskTypes = taskTypes;
|
|
1127
|
+
this.instructionProviders = instructionProviders;
|
|
1088
1128
|
}
|
|
1089
1129
|
toDto() {
|
|
1090
1130
|
return {
|
|
@@ -1095,12 +1135,380 @@ class VasInvitationModel extends VasAccountObjectModel {
|
|
|
1095
1135
|
modified: this.modified,
|
|
1096
1136
|
serverModified: this.serverModified,
|
|
1097
1137
|
modifiedBy: this.modifiedBy,
|
|
1138
|
+
createdByName: this.createdByName,
|
|
1139
|
+
modifiedByName: this.modifiedByName,
|
|
1098
1140
|
account: this.account,
|
|
1099
1141
|
secret: this.secret,
|
|
1142
|
+
type: this.type,
|
|
1143
|
+
accessGroups: this.accessGroups,
|
|
1144
|
+
contactTypes: this.contactTypes,
|
|
1145
|
+
jobStatuses: this.jobStatuses,
|
|
1146
|
+
jobTypes: this.jobTypes,
|
|
1147
|
+
lookupTypes: this.lookupTypes,
|
|
1148
|
+
taskTypes: this.taskTypes,
|
|
1149
|
+
instructionProviders: this.instructionProviders,
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
static fromDto(dto) {
|
|
1153
|
+
return new VasInvitationModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.secret || '', dto.type || VasInvitationTypeEnum.TYPE_VAS_PORTAL, dto.accessGroups || [], dto.contactTypes || [], dto.jobStatuses || [], dto.jobTypes || [], dto.lookupTypes || [], dto.taskTypes || [], dto.instructionProviders || []);
|
|
1154
|
+
}
|
|
1155
|
+
toApiDto(options) {
|
|
1156
|
+
const dto = {
|
|
1157
|
+
...super.toApiDto(),
|
|
1158
|
+
type: this.type
|
|
1100
1159
|
};
|
|
1160
|
+
if (this.accessGroups.length) {
|
|
1161
|
+
dto['accessGroups'] = this.accessGroups.map(d => d.id);
|
|
1162
|
+
}
|
|
1163
|
+
if (this.contactTypes.length) {
|
|
1164
|
+
dto['contactTypes'] = this.contactTypes.map(d => d.id);
|
|
1165
|
+
}
|
|
1166
|
+
if (this.jobStatuses.length) {
|
|
1167
|
+
dto['jobStatuses'] = this.jobStatuses.map(d => d.id);
|
|
1168
|
+
}
|
|
1169
|
+
if (this.jobTypes.length) {
|
|
1170
|
+
dto['jobTypes'] = this.jobTypes.map(d => d.id);
|
|
1171
|
+
}
|
|
1172
|
+
if (this.lookupTypes.length) {
|
|
1173
|
+
dto['lookupTypes'] = this.lookupTypes.map(d => d.id);
|
|
1174
|
+
}
|
|
1175
|
+
if (this.taskTypes.length) {
|
|
1176
|
+
dto['taskTypes'] = this.taskTypes.map(d => d.id);
|
|
1177
|
+
}
|
|
1178
|
+
if (this.instructionProviders.length) {
|
|
1179
|
+
dto['instructionProviders'] = this.instructionProviders.map(d => d.id);
|
|
1180
|
+
}
|
|
1181
|
+
return dto;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* VasNoteModel
|
|
1187
|
+
*/
|
|
1188
|
+
class VasNoteModel extends VasJobDataModel {
|
|
1189
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, content, sensitive) {
|
|
1190
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
1191
|
+
this.id = id;
|
|
1192
|
+
this.created = created;
|
|
1193
|
+
this.serverCreated = serverCreated;
|
|
1194
|
+
this.createdBy = createdBy;
|
|
1195
|
+
this.modified = modified;
|
|
1196
|
+
this.serverModified = serverModified;
|
|
1197
|
+
this.modifiedBy = modifiedBy;
|
|
1198
|
+
this.createdByName = createdByName;
|
|
1199
|
+
this.modifiedByName = modifiedByName;
|
|
1200
|
+
this.account = account;
|
|
1201
|
+
this.job = job;
|
|
1202
|
+
this.content = content;
|
|
1203
|
+
this.sensitive = sensitive;
|
|
1101
1204
|
}
|
|
1205
|
+
/**
|
|
1206
|
+
* @param dto VasNoteDto
|
|
1207
|
+
* @return VasNoteModel
|
|
1208
|
+
*/
|
|
1102
1209
|
static fromDto(dto) {
|
|
1103
|
-
return new
|
|
1210
|
+
return new VasNoteModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.content || '', dto.sensitive || false);
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @returns VasNoteDto
|
|
1214
|
+
*/
|
|
1215
|
+
toDto() {
|
|
1216
|
+
return {
|
|
1217
|
+
id: this.id,
|
|
1218
|
+
created: this.created,
|
|
1219
|
+
serverCreated: this.serverCreated,
|
|
1220
|
+
createdBy: this.createdBy,
|
|
1221
|
+
modified: this.modified,
|
|
1222
|
+
serverModified: this.serverModified,
|
|
1223
|
+
modifiedBy: this.modifiedBy,
|
|
1224
|
+
createdByName: this.createdByName,
|
|
1225
|
+
modifiedByName: this.modifiedByName,
|
|
1226
|
+
account: this.account,
|
|
1227
|
+
job: this.job,
|
|
1228
|
+
content: this.content,
|
|
1229
|
+
sensitive: this.sensitive,
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* VasInstructionJobFieldModel
|
|
1236
|
+
*/
|
|
1237
|
+
class VasInstructionJobFieldModel extends VasBaseModel {
|
|
1238
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, value, name) {
|
|
1239
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
1240
|
+
this.id = id;
|
|
1241
|
+
this.created = created;
|
|
1242
|
+
this.serverCreated = serverCreated;
|
|
1243
|
+
this.createdBy = createdBy;
|
|
1244
|
+
this.modified = modified;
|
|
1245
|
+
this.serverModified = serverModified;
|
|
1246
|
+
this.modifiedBy = modifiedBy;
|
|
1247
|
+
this.createdByName = createdByName;
|
|
1248
|
+
this.modifiedByName = modifiedByName;
|
|
1249
|
+
this.value = value;
|
|
1250
|
+
this.name = name;
|
|
1251
|
+
}
|
|
1252
|
+
static empty() {
|
|
1253
|
+
return new VasInstructionJobFieldModel('', '', '', '', '', '', '', '', '', '', '');
|
|
1254
|
+
}
|
|
1255
|
+
static fromDto(dto) {
|
|
1256
|
+
return new VasInstructionJobFieldModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.value || '', dto.name || '');
|
|
1257
|
+
}
|
|
1258
|
+
toDto() {
|
|
1259
|
+
return {
|
|
1260
|
+
id: this.id,
|
|
1261
|
+
created: this.created,
|
|
1262
|
+
serverCreated: this.serverCreated,
|
|
1263
|
+
createdBy: this.createdBy,
|
|
1264
|
+
modified: this.modified,
|
|
1265
|
+
serverModified: this.serverModified,
|
|
1266
|
+
modifiedBy: this.modifiedBy,
|
|
1267
|
+
createdByName: this.createdByName,
|
|
1268
|
+
modifiedByName: this.modifiedByName,
|
|
1269
|
+
value: this.value,
|
|
1270
|
+
name: this.name,
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
class VasReportModel extends VasJobDataModel {
|
|
1276
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, reportLayoutId, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId) {
|
|
1277
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
1278
|
+
this.id = id;
|
|
1279
|
+
this.created = created;
|
|
1280
|
+
this.serverCreated = serverCreated;
|
|
1281
|
+
this.createdBy = createdBy;
|
|
1282
|
+
this.modified = modified;
|
|
1283
|
+
this.serverModified = serverModified;
|
|
1284
|
+
this.modifiedBy = modifiedBy;
|
|
1285
|
+
this.createdByName = createdByName;
|
|
1286
|
+
this.modifiedByName = modifiedByName;
|
|
1287
|
+
this.account = account;
|
|
1288
|
+
this.job = job;
|
|
1289
|
+
this.reportLayoutId = reportLayoutId;
|
|
1290
|
+
this.title = title;
|
|
1291
|
+
this.sendEmail = sendEmail;
|
|
1292
|
+
this.message = message;
|
|
1293
|
+
this.attempted = attempted;
|
|
1294
|
+
this.completed = completed;
|
|
1295
|
+
this.succeeded = succeeded;
|
|
1296
|
+
this.attempts = attempts;
|
|
1297
|
+
this.notificationId = notificationId;
|
|
1298
|
+
}
|
|
1299
|
+
static empty() {
|
|
1300
|
+
return VasReportModel.fromDto({});
|
|
1301
|
+
}
|
|
1302
|
+
static fromDto(dto) {
|
|
1303
|
+
return new VasReportModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job || '', dto.reportLayoutId || '', dto.title || '', dto.sendEmail || '', dto.message || '', dto.attempted || '', dto.completed || '', dto.succeeded || '', dto.attempts || 0, dto.notificationId || '');
|
|
1304
|
+
}
|
|
1305
|
+
toDto() {
|
|
1306
|
+
return {
|
|
1307
|
+
id: this.id,
|
|
1308
|
+
created: this.created,
|
|
1309
|
+
serverCreated: this.serverCreated,
|
|
1310
|
+
createdBy: this.createdBy,
|
|
1311
|
+
modified: this.modified,
|
|
1312
|
+
serverModified: this.serverModified,
|
|
1313
|
+
modifiedBy: this.modifiedBy,
|
|
1314
|
+
createdByName: this.createdByName,
|
|
1315
|
+
modifiedByName: this.modifiedByName,
|
|
1316
|
+
account: this.account,
|
|
1317
|
+
job: this.job,
|
|
1318
|
+
reportLayoutId: this.reportLayoutId,
|
|
1319
|
+
title: this.title,
|
|
1320
|
+
sendEmail: this.sendEmail,
|
|
1321
|
+
message: this.message,
|
|
1322
|
+
attempted: this.attempted,
|
|
1323
|
+
completed: this.completed,
|
|
1324
|
+
succeeded: this.succeeded,
|
|
1325
|
+
attempts: this.attempts,
|
|
1326
|
+
notificationId: this.notificationId,
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* VasNoteModel
|
|
1333
|
+
*/
|
|
1334
|
+
class VasInstructionJobModel extends VasBaseModel {
|
|
1335
|
+
/**
|
|
1336
|
+
* @param id id
|
|
1337
|
+
* @param created created
|
|
1338
|
+
* @param serverCreated serverCreated
|
|
1339
|
+
* @param createdBy createdBy
|
|
1340
|
+
* @param modified modified
|
|
1341
|
+
* @param serverModified serverModified
|
|
1342
|
+
* @param modifiedBy modifiedBy
|
|
1343
|
+
* @param reference reference
|
|
1344
|
+
* @param jobStatus jobStatus
|
|
1345
|
+
* @param createdByName createdByName
|
|
1346
|
+
* @param modifiedByName modifiedByName
|
|
1347
|
+
* @param notes notes
|
|
1348
|
+
* @param fields fields
|
|
1349
|
+
* @param files files
|
|
1350
|
+
* @param reports reports
|
|
1351
|
+
*/
|
|
1352
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, reference, jobStatus, notes, fields, files, reports) {
|
|
1353
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
1354
|
+
this.id = id;
|
|
1355
|
+
this.created = created;
|
|
1356
|
+
this.serverCreated = serverCreated;
|
|
1357
|
+
this.createdBy = createdBy;
|
|
1358
|
+
this.modified = modified;
|
|
1359
|
+
this.serverModified = serverModified;
|
|
1360
|
+
this.modifiedBy = modifiedBy;
|
|
1361
|
+
this.createdByName = createdByName;
|
|
1362
|
+
this.modifiedByName = modifiedByName;
|
|
1363
|
+
this.reference = reference;
|
|
1364
|
+
this.jobStatus = jobStatus;
|
|
1365
|
+
this.notes = notes;
|
|
1366
|
+
this.fields = fields;
|
|
1367
|
+
this.files = files;
|
|
1368
|
+
this.reports = reports;
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* @return empty VasInstructionJobModel
|
|
1372
|
+
*/
|
|
1373
|
+
static empty() {
|
|
1374
|
+
return new VasInstructionJobModel('', '', '', '', '', '', '', '', '', '', '', [], [], [], []);
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* @param dto VasInstructionDto
|
|
1378
|
+
* @return VasInstructionModel
|
|
1379
|
+
*/
|
|
1380
|
+
static fromDto(dto) {
|
|
1381
|
+
return new VasInstructionJobModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.reference || '', dto.jobStatus || '', dto.createdByName || '', dto.modifiedByName || '', (dto.notes || []).map(d => VasNoteModel.fromDto(d)), (dto.fields || []).map(d => VasInstructionJobFieldModel.fromDto(d)), (dto.files || []).map(d => VasFileModel.fromDto(d)), (dto.reports || []).map(d => VasReportModel.fromDto(d)));
|
|
1382
|
+
}
|
|
1383
|
+
/**
|
|
1384
|
+
* @returns VasNoteDto
|
|
1385
|
+
*/
|
|
1386
|
+
toDto() {
|
|
1387
|
+
return {
|
|
1388
|
+
id: this.id,
|
|
1389
|
+
created: this.created,
|
|
1390
|
+
serverCreated: this.serverCreated,
|
|
1391
|
+
createdBy: this.createdBy,
|
|
1392
|
+
modified: this.modified,
|
|
1393
|
+
serverModified: this.serverModified,
|
|
1394
|
+
modifiedBy: this.modifiedBy,
|
|
1395
|
+
reference: this.reference,
|
|
1396
|
+
jobStatus: this.jobStatus,
|
|
1397
|
+
createdByName: this.createdByName,
|
|
1398
|
+
modifiedByName: this.modifiedByName,
|
|
1399
|
+
notes: this.notes.map(m => m.toDto()),
|
|
1400
|
+
fields: this.fields.map(m => m.toDto()),
|
|
1401
|
+
files: this.files.map(m => m.toDto()),
|
|
1402
|
+
reports: this.reports.map(m => m.toDto()),
|
|
1403
|
+
};
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* VasNoteModel
|
|
1409
|
+
*/
|
|
1410
|
+
class VasInstructionModel extends VasAccountObjectModel {
|
|
1411
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job) {
|
|
1412
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
1413
|
+
this.id = id;
|
|
1414
|
+
this.created = created;
|
|
1415
|
+
this.serverCreated = serverCreated;
|
|
1416
|
+
this.createdBy = createdBy;
|
|
1417
|
+
this.modified = modified;
|
|
1418
|
+
this.serverModified = serverModified;
|
|
1419
|
+
this.modifiedBy = modifiedBy;
|
|
1420
|
+
this.createdByName = createdByName;
|
|
1421
|
+
this.modifiedByName = modifiedByName;
|
|
1422
|
+
this.account = account;
|
|
1423
|
+
this.job = job;
|
|
1424
|
+
}
|
|
1425
|
+
/**
|
|
1426
|
+
* @param dto VasInstructionDto
|
|
1427
|
+
* @return VasInstructionModel
|
|
1428
|
+
*/
|
|
1429
|
+
static fromDto(dto) {
|
|
1430
|
+
return new VasInstructionModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.job ?
|
|
1431
|
+
VasInstructionJobModel.fromDto(dto.job) :
|
|
1432
|
+
VasInstructionJobModel.empty());
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* @returns VasNoteDto
|
|
1436
|
+
*/
|
|
1437
|
+
toDto() {
|
|
1438
|
+
return {
|
|
1439
|
+
id: this.id,
|
|
1440
|
+
created: this.created,
|
|
1441
|
+
serverCreated: this.serverCreated,
|
|
1442
|
+
createdBy: this.createdBy,
|
|
1443
|
+
modified: this.modified,
|
|
1444
|
+
serverModified: this.serverModified,
|
|
1445
|
+
modifiedBy: this.modifiedBy,
|
|
1446
|
+
createdByName: this.createdByName,
|
|
1447
|
+
modifiedByName: this.modifiedByName,
|
|
1448
|
+
account: this.account,
|
|
1449
|
+
job: this.job.toDto()
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* VasInstructionProviderModel
|
|
1456
|
+
*/
|
|
1457
|
+
class VasInstructionProviderModel extends VasAccountObjectModel {
|
|
1458
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, form, title, secret, portalEnabled) {
|
|
1459
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
1460
|
+
this.id = id;
|
|
1461
|
+
this.created = created;
|
|
1462
|
+
this.serverCreated = serverCreated;
|
|
1463
|
+
this.createdBy = createdBy;
|
|
1464
|
+
this.modified = modified;
|
|
1465
|
+
this.serverModified = serverModified;
|
|
1466
|
+
this.modifiedBy = modifiedBy;
|
|
1467
|
+
this.createdByName = createdByName;
|
|
1468
|
+
this.modifiedByName = modifiedByName;
|
|
1469
|
+
this.account = account;
|
|
1470
|
+
this.form = form;
|
|
1471
|
+
this.title = title;
|
|
1472
|
+
this.secret = secret;
|
|
1473
|
+
this.portalEnabled = portalEnabled;
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* @param dto VasInstructionDto
|
|
1477
|
+
* @return VasInstructionModel
|
|
1478
|
+
*/
|
|
1479
|
+
static fromDto(dto) {
|
|
1480
|
+
return new VasInstructionProviderModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.form ?
|
|
1481
|
+
VasFormModel.fromDto(dto.form) :
|
|
1482
|
+
VasFormModel.empty(), dto.title || '', dto.secret || '', dto.portalEnabled || false);
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* @returns VasNoteDto
|
|
1486
|
+
*/
|
|
1487
|
+
toDto() {
|
|
1488
|
+
return {
|
|
1489
|
+
id: this.id,
|
|
1490
|
+
created: this.created,
|
|
1491
|
+
serverCreated: this.serverCreated,
|
|
1492
|
+
createdBy: this.createdBy,
|
|
1493
|
+
modified: this.modified,
|
|
1494
|
+
serverModified: this.serverModified,
|
|
1495
|
+
modifiedBy: this.modifiedBy,
|
|
1496
|
+
createdByName: this.createdByName,
|
|
1497
|
+
modifiedByName: this.modifiedByName,
|
|
1498
|
+
account: this.account,
|
|
1499
|
+
form: this.form.toDto(),
|
|
1500
|
+
title: this.title,
|
|
1501
|
+
secret: this.secret,
|
|
1502
|
+
portalEnabled: this.portalEnabled
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
toApiDto(options) {
|
|
1506
|
+
return {
|
|
1507
|
+
...super.toApiDto(options),
|
|
1508
|
+
title: this.title,
|
|
1509
|
+
form: this.form.id,
|
|
1510
|
+
portalEnabled: this.portalEnabled
|
|
1511
|
+
};
|
|
1104
1512
|
}
|
|
1105
1513
|
}
|
|
1106
1514
|
|
|
@@ -1188,34 +1596,8 @@ const isArrayString = (value) => {
|
|
|
1188
1596
|
* JobModel
|
|
1189
1597
|
*/
|
|
1190
1598
|
class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
* @param created
|
|
1194
|
-
* @param serverCreated
|
|
1195
|
-
* @param createdBy
|
|
1196
|
-
* @param modified
|
|
1197
|
-
* @param serverModified
|
|
1198
|
-
* @param modifiedBy
|
|
1199
|
-
* @param account
|
|
1200
|
-
* @param accessGroup
|
|
1201
|
-
* @param reference
|
|
1202
|
-
* @param jobDate
|
|
1203
|
-
* @param jobStatus
|
|
1204
|
-
* @param jobType
|
|
1205
|
-
* @param assigneeId
|
|
1206
|
-
* @param formId
|
|
1207
|
-
* @param timeZoneOffset
|
|
1208
|
-
* @param pendingFields
|
|
1209
|
-
* @param childModified
|
|
1210
|
-
* @param version
|
|
1211
|
-
* @param fields
|
|
1212
|
-
* @param files,
|
|
1213
|
-
* @param createdByDisplayName
|
|
1214
|
-
* @param modifiedByDisplayName
|
|
1215
|
-
* @param geoLocation
|
|
1216
|
-
*/
|
|
1217
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, reference, jobDate, jobStatus, jobType, assigneeId, formId, timeZoneOffset, pendingFields, childModified, version, fields, files, createdByDisplayName, modifiedByDisplayName, geoLocation) {
|
|
1218
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
1599
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, reference, jobDate, jobStatus, jobType, assigneeId, formId, timeZoneOffset, pendingFields, childModified, version, fields, files, createdByDisplayName, modifiedByDisplayName, geoLocation) {
|
|
1600
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
1219
1601
|
this.id = id;
|
|
1220
1602
|
this.created = created;
|
|
1221
1603
|
this.serverCreated = serverCreated;
|
|
@@ -1223,6 +1605,8 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1223
1605
|
this.modified = modified;
|
|
1224
1606
|
this.serverModified = serverModified;
|
|
1225
1607
|
this.modifiedBy = modifiedBy;
|
|
1608
|
+
this.createdByName = createdByName;
|
|
1609
|
+
this.modifiedByName = modifiedByName;
|
|
1226
1610
|
this.account = account;
|
|
1227
1611
|
this.accessGroup = accessGroup;
|
|
1228
1612
|
this.reference = reference;
|
|
@@ -1269,23 +1653,15 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1269
1653
|
* @return {VasJobModel}
|
|
1270
1654
|
*/
|
|
1271
1655
|
static empty() {
|
|
1272
|
-
return new VasJobModel(
|
|
1273
|
-
// eslint-disable-next-line new-cap
|
|
1274
|
-
UUID.UUID(), '', '', '', '', '', '', '', '', '', '', '', '', '', '', moment$1().utcOffset(), 0, '', 0, [], [], '', '', getEmptyGeoLocation());
|
|
1656
|
+
return new VasJobModel('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', moment$1().utcOffset(), 0, '', 0, [], [], '', '', getEmptyGeoLocation());
|
|
1275
1657
|
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
* @return {VasJobModel}
|
|
1279
|
-
*/
|
|
1280
|
-
static fromDto(jobDto) {
|
|
1281
|
-
const model = new VasJobModel(
|
|
1282
|
-
// eslint-disable-next-line new-cap
|
|
1283
|
-
jobDto.id || UUID.UUID(), jobDto.created || '', jobDto.serverCreated || '', jobDto.createdBy || '', jobDto.modified || '', jobDto.serverModified || '', jobDto.modifiedBy || '', jobDto.account || '', jobDto.accessGroup || '', jobDto.reference || '', jobDto.jobDate || '', jobDto.jobStatus || '', jobDto.jobType || '', jobDto.assigneeId || '', jobDto.formId || '', jobDto.timeZoneOffset || moment$1().utcOffset(), jobDto.pendingFields || 0, jobDto.childModified || '', jobDto.version || 0, jobDto.fields || [], jobDto.files || [], jobDto.createdByDisplayName || '', jobDto.modifiedByDisplayName || '', jobDto.geoLocation || getEmptyGeoLocation());
|
|
1658
|
+
static fromDto(dto) {
|
|
1659
|
+
const model = new VasJobModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.reference || '', dto.jobDate || '', dto.jobStatus || '', dto.jobType || '', dto.assigneeId || '', dto.formId || '', dto.timeZoneOffset || moment$1().utcOffset(), dto.pendingFields || 0, dto.childModified || '', dto.version || 0, dto.fields || [], dto.files || [], dto.createdByDisplayName || '', dto.modifiedByDisplayName || '', dto.geoLocation || getEmptyGeoLocation());
|
|
1284
1660
|
const emptyKeys = model.staticProperties;
|
|
1285
1661
|
Object
|
|
1286
|
-
.keys(
|
|
1662
|
+
.keys(dto)
|
|
1287
1663
|
.filter(key => emptyKeys.indexOf(key) === -1)
|
|
1288
|
-
.forEach((key) => model.$this[key] =
|
|
1664
|
+
.forEach((key) => model.$this[key] = dto[key]);
|
|
1289
1665
|
return model;
|
|
1290
1666
|
}
|
|
1291
1667
|
/**
|
|
@@ -1304,11 +1680,10 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1304
1680
|
return fields;
|
|
1305
1681
|
}
|
|
1306
1682
|
/**
|
|
1307
|
-
* Will return an object whose keys are the names of all fields in the job
|
|
1308
|
-
*
|
|
1309
|
-
*
|
|
1310
|
-
*
|
|
1311
|
-
* drive the logic)
|
|
1683
|
+
* Will return an object whose keys are the names of all fields in the job.
|
|
1684
|
+
* This method is similar to `getFields` except that this method will only
|
|
1685
|
+
* return values where a value was set, as opposed to `getFields` which
|
|
1686
|
+
* return a property regardless (because it uses the form to drive the logic)
|
|
1312
1687
|
* @return {Record<string, VasFieldDtoValue>}
|
|
1313
1688
|
*/
|
|
1314
1689
|
getFields2() {
|
|
@@ -1318,8 +1693,7 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1318
1693
|
Object
|
|
1319
1694
|
.keys(this.$this[groupName])
|
|
1320
1695
|
.forEach(controlName => {
|
|
1321
|
-
|
|
1322
|
-
fields[controlNameShort] = this.getValueByPath([groupName, controlName]);
|
|
1696
|
+
fields[controlName] = this.getValueByPath([groupName, controlName]);
|
|
1323
1697
|
});
|
|
1324
1698
|
}, {});
|
|
1325
1699
|
return fields;
|
|
@@ -1540,6 +1914,8 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1540
1914
|
modifiedBy: this.modifiedBy,
|
|
1541
1915
|
serverCreated: this.serverCreated,
|
|
1542
1916
|
serverModified: this.serverModified,
|
|
1917
|
+
createdByName: this.createdByName,
|
|
1918
|
+
modifiedByName: this.modifiedByName,
|
|
1543
1919
|
account: this.account,
|
|
1544
1920
|
accessGroup: this.accessGroup,
|
|
1545
1921
|
reference: this.reference,
|
|
@@ -1682,8 +2058,8 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1682
2058
|
* VasMembershipModel
|
|
1683
2059
|
*/
|
|
1684
2060
|
class VasMembershipModel extends VasAccountObjectModel {
|
|
1685
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, user, admin, lookupTypes, contactTypes, accessGroups, jobStatuses, jobTypes, taskTypes) {
|
|
1686
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
|
|
2061
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, user, admin, lookupTypes, contactTypes, accessGroups, jobStatuses, jobTypes, taskTypes) {
|
|
2062
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
1687
2063
|
this.id = id;
|
|
1688
2064
|
this.created = created;
|
|
1689
2065
|
this.serverCreated = serverCreated;
|
|
@@ -1691,6 +2067,8 @@ class VasMembershipModel extends VasAccountObjectModel {
|
|
|
1691
2067
|
this.modified = modified;
|
|
1692
2068
|
this.serverModified = serverModified;
|
|
1693
2069
|
this.modifiedBy = modifiedBy;
|
|
2070
|
+
this.createdByName = createdByName;
|
|
2071
|
+
this.modifiedByName = modifiedByName;
|
|
1694
2072
|
this.account = account;
|
|
1695
2073
|
this.user = user;
|
|
1696
2074
|
this.admin = admin;
|
|
@@ -1710,7 +2088,7 @@ class VasMembershipModel extends VasAccountObjectModel {
|
|
|
1710
2088
|
static fromDto(dto) {
|
|
1711
2089
|
return new VasMembershipModel(
|
|
1712
2090
|
// eslint-disable-next-line new-cap
|
|
1713
|
-
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.user || '', dto.admin || false, dto.lookupTypes || [], dto.contactTypes || [], dto.accessGroups || [], dto.jobStatuses || [], dto.jobTypes || [], dto.taskTypes || []);
|
|
2091
|
+
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.user || '', dto.admin || false, dto.lookupTypes || [], dto.contactTypes || [], dto.accessGroups || [], dto.jobStatuses || [], dto.jobTypes || [], dto.taskTypes || []);
|
|
1714
2092
|
}
|
|
1715
2093
|
toDto() {
|
|
1716
2094
|
return {
|
|
@@ -1721,6 +2099,8 @@ class VasMembershipModel extends VasAccountObjectModel {
|
|
|
1721
2099
|
modified: this.modified,
|
|
1722
2100
|
serverModified: this.serverModified,
|
|
1723
2101
|
modifiedBy: this.modifiedBy,
|
|
2102
|
+
createdByName: this.createdByName,
|
|
2103
|
+
modifiedByName: this.modifiedByName,
|
|
1724
2104
|
account: this.account,
|
|
1725
2105
|
user: this.user,
|
|
1726
2106
|
admin: this.admin,
|
|
@@ -1734,66 +2114,9 @@ class VasMembershipModel extends VasAccountObjectModel {
|
|
|
1734
2114
|
}
|
|
1735
2115
|
}
|
|
1736
2116
|
|
|
1737
|
-
class VasReportModel extends VasJobDataModel {
|
|
1738
|
-
constructor(id, created, createdBy, modified, modifiedBy, serverCreated, serverModified, account, job, reportLayoutId, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId) {
|
|
1739
|
-
super(id, created, createdBy, modified, modifiedBy, serverCreated, serverModified, account, job);
|
|
1740
|
-
this.id = id;
|
|
1741
|
-
this.created = created;
|
|
1742
|
-
this.createdBy = createdBy;
|
|
1743
|
-
this.modified = modified;
|
|
1744
|
-
this.modifiedBy = modifiedBy;
|
|
1745
|
-
this.serverCreated = serverCreated;
|
|
1746
|
-
this.serverModified = serverModified;
|
|
1747
|
-
this.account = account;
|
|
1748
|
-
this.job = job;
|
|
1749
|
-
this.reportLayoutId = reportLayoutId;
|
|
1750
|
-
this.title = title;
|
|
1751
|
-
this.sendEmail = sendEmail;
|
|
1752
|
-
this.message = message;
|
|
1753
|
-
this.attempted = attempted;
|
|
1754
|
-
this.completed = completed;
|
|
1755
|
-
this.succeeded = succeeded;
|
|
1756
|
-
this.attempts = attempts;
|
|
1757
|
-
this.notificationId = notificationId;
|
|
1758
|
-
}
|
|
1759
|
-
static empty() {
|
|
1760
|
-
return VasReportModel.fromDto({
|
|
1761
|
-
// eslint-disable-next-line new-cap
|
|
1762
|
-
id: UUID.UUID()
|
|
1763
|
-
});
|
|
1764
|
-
}
|
|
1765
|
-
static fromDto(dto) {
|
|
1766
|
-
return new VasReportModel(
|
|
1767
|
-
// eslint-disable-next-line new-cap
|
|
1768
|
-
dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.job || '', dto.reportLayoutId || '', dto.title || '', dto.sendEmail || '', dto.message || '', dto.attempted || '', dto.completed || '', dto.succeeded || '', dto.attempts || 0, dto.notificationId || '');
|
|
1769
|
-
}
|
|
1770
|
-
toDto() {
|
|
1771
|
-
return {
|
|
1772
|
-
id: this.id,
|
|
1773
|
-
created: this.created,
|
|
1774
|
-
serverCreated: this.serverCreated,
|
|
1775
|
-
createdBy: this.createdBy,
|
|
1776
|
-
modified: this.modified,
|
|
1777
|
-
serverModified: this.serverModified,
|
|
1778
|
-
modifiedBy: this.modifiedBy,
|
|
1779
|
-
account: this.account,
|
|
1780
|
-
job: this.job,
|
|
1781
|
-
reportLayoutId: this.reportLayoutId,
|
|
1782
|
-
title: this.title,
|
|
1783
|
-
sendEmail: this.sendEmail,
|
|
1784
|
-
message: this.message,
|
|
1785
|
-
attempted: this.attempted,
|
|
1786
|
-
completed: this.completed,
|
|
1787
|
-
succeeded: this.succeeded,
|
|
1788
|
-
attempts: this.attempts,
|
|
1789
|
-
notificationId: this.notificationId,
|
|
1790
|
-
};
|
|
1791
|
-
}
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
2117
|
class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
|
|
1795
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, jobType, title, description, entryPoint) {
|
|
1796
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
2118
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, jobType, title, description, entryPoint) {
|
|
2119
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
1797
2120
|
this.id = id;
|
|
1798
2121
|
this.created = created;
|
|
1799
2122
|
this.serverCreated = serverCreated;
|
|
@@ -1801,6 +2124,8 @@ class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
|
|
|
1801
2124
|
this.modified = modified;
|
|
1802
2125
|
this.serverModified = serverModified;
|
|
1803
2126
|
this.modifiedBy = modifiedBy;
|
|
2127
|
+
this.createdByName = createdByName;
|
|
2128
|
+
this.modifiedByName = modifiedByName;
|
|
1804
2129
|
this.account = account;
|
|
1805
2130
|
this.accessGroup = accessGroup;
|
|
1806
2131
|
this.jobType = jobType;
|
|
@@ -1811,8 +2136,8 @@ class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
|
|
|
1811
2136
|
}
|
|
1812
2137
|
|
|
1813
2138
|
class VasReportRequestModel extends VasAccountObjectModel {
|
|
1814
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, error, jobId, title, url, reportId) {
|
|
1815
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
|
|
2139
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, error, jobId, title, url, reportId) {
|
|
2140
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
1816
2141
|
this.id = id;
|
|
1817
2142
|
this.created = created;
|
|
1818
2143
|
this.serverCreated = serverCreated;
|
|
@@ -1820,6 +2145,8 @@ class VasReportRequestModel extends VasAccountObjectModel {
|
|
|
1820
2145
|
this.modified = modified;
|
|
1821
2146
|
this.serverModified = serverModified;
|
|
1822
2147
|
this.modifiedBy = modifiedBy;
|
|
2148
|
+
this.createdByName = createdByName;
|
|
2149
|
+
this.modifiedByName = modifiedByName;
|
|
1823
2150
|
this.account = account;
|
|
1824
2151
|
this.error = error;
|
|
1825
2152
|
this.jobId = jobId;
|
|
@@ -1828,7 +2155,7 @@ class VasReportRequestModel extends VasAccountObjectModel {
|
|
|
1828
2155
|
this.reportId = reportId;
|
|
1829
2156
|
}
|
|
1830
2157
|
static fromDto(dto) {
|
|
1831
|
-
return new VasReportRequestModel(dto.id || UUID.UUID(), dto.created || moment$1().toISOString(), dto.serverCreated || '', dto.createdBy || '', dto.modified || moment$1().toISOString(), dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.error || '', dto.jobId || '', dto.title || '', dto.url || '', dto.reportId || '');
|
|
2158
|
+
return new VasReportRequestModel(dto.id || UUID.UUID(), dto.created || moment$1().toISOString(), dto.serverCreated || '', dto.createdBy || '', dto.modified || moment$1().toISOString(), dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.error || '', dto.jobId || '', dto.title || '', dto.url || '', dto.reportId || '');
|
|
1832
2159
|
}
|
|
1833
2160
|
toDto() {
|
|
1834
2161
|
return {
|
|
@@ -1839,6 +2166,8 @@ class VasReportRequestModel extends VasAccountObjectModel {
|
|
|
1839
2166
|
modified: this.modified,
|
|
1840
2167
|
serverModified: this.serverModified,
|
|
1841
2168
|
modifiedBy: this.modifiedBy,
|
|
2169
|
+
createdByName: this.createdByName,
|
|
2170
|
+
modifiedByName: this.modifiedByName,
|
|
1842
2171
|
account: this.account,
|
|
1843
2172
|
error: this.error,
|
|
1844
2173
|
jobId: this.jobId,
|
|
@@ -1853,5 +2182,5 @@ class VasReportRequestModel extends VasAccountObjectModel {
|
|
|
1853
2182
|
* Generated bundle index. Do not edit.
|
|
1854
2183
|
*/
|
|
1855
2184
|
|
|
1856
|
-
export { VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormModel, VasGroupModel, VasInvitationModel, VasJobDataModel, VasJobModel, VasMembershipModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasUserModel, getEmptyGeoLocation, isCameraControlValueV1, isFileDto };
|
|
2185
|
+
export { VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormModel, VasGroupModel, VasInstructionJobFieldModel, VasInstructionJobModel, VasInstructionModel, VasInstructionProviderModel, VasInvitationModel, VasInvitationTypeEnum, VasJobDataModel, VasJobModel, VasMembershipModel, VasNoteModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasUserModel, getEmptyGeoLocation, isCameraControlValueV1, isFileDto };
|
|
1857
2186
|
//# sourceMappingURL=ironcode-vas-lib.mjs.map
|