@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.
Files changed (221) hide show
  1. package/cjs/lib/entity/index.d.ts +10 -0
  2. package/cjs/lib/entity/index.d.ts.map +1 -1
  3. package/cjs/lib/entity/index.js +10 -0
  4. package/cjs/lib/entity/index.js.map +1 -1
  5. package/cjs/lib/entity/vas-account-object.model.d.ts +3 -1
  6. package/cjs/lib/entity/vas-account-object.model.d.ts.map +1 -1
  7. package/cjs/lib/entity/vas-account-object.model.js +4 -2
  8. package/cjs/lib/entity/vas-account-object.model.js.map +1 -1
  9. package/cjs/lib/entity/vas-base.dto.d.ts +2 -0
  10. package/cjs/lib/entity/vas-base.dto.d.ts.map +1 -1
  11. package/cjs/lib/entity/vas-base.dto.js.map +1 -1
  12. package/cjs/lib/entity/vas-base.model.d.ts +3 -10
  13. package/cjs/lib/entity/vas-base.model.d.ts.map +1 -1
  14. package/cjs/lib/entity/vas-base.model.js +3 -10
  15. package/cjs/lib/entity/vas-base.model.js.map +1 -1
  16. package/cjs/lib/entity/vas-branch.model.d.ts +3 -1
  17. package/cjs/lib/entity/vas-branch.model.d.ts.map +1 -1
  18. package/cjs/lib/entity/vas-branch.model.js +7 -3
  19. package/cjs/lib/entity/vas-branch.model.js.map +1 -1
  20. package/cjs/lib/entity/vas-contact.dto.d.ts +7 -0
  21. package/cjs/lib/entity/vas-contact.dto.d.ts.map +1 -1
  22. package/cjs/lib/entity/vas-contact.dto.js.map +1 -1
  23. package/cjs/lib/entity/vas-contact.model.d.ts +11 -1
  24. package/cjs/lib/entity/vas-contact.model.d.ts.map +1 -1
  25. package/cjs/lib/entity/vas-contact.model.js +24 -3
  26. package/cjs/lib/entity/vas-contact.model.js.map +1 -1
  27. package/cjs/lib/entity/vas-control-type.model.d.ts +5 -9
  28. package/cjs/lib/entity/vas-control-type.model.d.ts.map +1 -1
  29. package/cjs/lib/entity/vas-control-type.model.js +13 -13
  30. package/cjs/lib/entity/vas-control-type.model.js.map +1 -1
  31. package/cjs/lib/entity/vas-control.dto.d.ts +3 -1
  32. package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
  33. package/cjs/lib/entity/vas-control.dto.js.map +1 -1
  34. package/cjs/lib/entity/vas-control.model.d.ts +11 -37
  35. package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
  36. package/cjs/lib/entity/vas-control.model.js +40 -50
  37. package/cjs/lib/entity/vas-control.model.js.map +1 -1
  38. package/cjs/lib/entity/vas-field.model.d.ts +3 -1
  39. package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
  40. package/cjs/lib/entity/vas-field.model.js +7 -3
  41. package/cjs/lib/entity/vas-field.model.js.map +1 -1
  42. package/cjs/lib/entity/vas-file.model.d.ts +4 -2
  43. package/cjs/lib/entity/vas-file.model.d.ts.map +1 -1
  44. package/cjs/lib/entity/vas-file.model.js +9 -5
  45. package/cjs/lib/entity/vas-file.model.js.map +1 -1
  46. package/cjs/lib/entity/vas-fire-user.model.d.ts +6 -1
  47. package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -1
  48. package/cjs/lib/entity/vas-fire-user.model.js +14 -4
  49. package/cjs/lib/entity/vas-fire-user.model.js.map +1 -1
  50. package/cjs/lib/entity/vas-form.dto.d.ts +1 -0
  51. package/cjs/lib/entity/vas-form.dto.d.ts.map +1 -1
  52. package/cjs/lib/entity/vas-form.dto.js.map +1 -1
  53. package/cjs/lib/entity/vas-form.model.d.ts +7 -22
  54. package/cjs/lib/entity/vas-form.model.d.ts.map +1 -1
  55. package/cjs/lib/entity/vas-form.model.js +27 -42
  56. package/cjs/lib/entity/vas-form.model.js.map +1 -1
  57. package/cjs/lib/entity/vas-group.model.d.ts +3 -22
  58. package/cjs/lib/entity/vas-group.model.d.ts.map +1 -1
  59. package/cjs/lib/entity/vas-group.model.js +7 -24
  60. package/cjs/lib/entity/vas-group.model.js.map +1 -1
  61. package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts +6 -0
  62. package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts.map +1 -0
  63. package/cjs/lib/entity/vas-instruction-job-field.dto.js +3 -0
  64. package/cjs/lib/entity/vas-instruction-job-field.dto.js.map +1 -0
  65. package/cjs/lib/entity/vas-instruction-job-field.model.d.ts +23 -0
  66. package/cjs/lib/entity/vas-instruction-job-field.model.d.ts.map +1 -0
  67. package/cjs/lib/entity/vas-instruction-job-field.model.js +46 -0
  68. package/cjs/lib/entity/vas-instruction-job-field.model.js.map +1 -0
  69. package/cjs/lib/entity/vas-instruction-job.dto.d.ts +16 -0
  70. package/cjs/lib/entity/vas-instruction-job.dto.d.ts.map +1 -0
  71. package/cjs/lib/entity/vas-instruction-job.dto.js +3 -0
  72. package/cjs/lib/entity/vas-instruction-job.dto.js.map +1 -0
  73. package/cjs/lib/entity/vas-instruction-job.model.d.ts +58 -0
  74. package/cjs/lib/entity/vas-instruction-job.model.d.ts.map +1 -0
  75. package/cjs/lib/entity/vas-instruction-job.model.js +85 -0
  76. package/cjs/lib/entity/vas-instruction-job.model.js.map +1 -0
  77. package/cjs/lib/entity/vas-instruction-provider.dto.d.ts +9 -0
  78. package/cjs/lib/entity/vas-instruction-provider.dto.d.ts.map +1 -0
  79. package/cjs/lib/entity/vas-instruction-provider.dto.js +3 -0
  80. package/cjs/lib/entity/vas-instruction-provider.dto.js.map +1 -0
  81. package/cjs/lib/entity/vas-instruction-provider.model.d.ts +34 -0
  82. package/cjs/lib/entity/vas-instruction-provider.model.d.ts.map +1 -0
  83. package/cjs/lib/entity/vas-instruction-provider.model.js +62 -0
  84. package/cjs/lib/entity/vas-instruction-provider.model.js.map +1 -0
  85. package/cjs/lib/entity/vas-instruction.dto.d.ts +6 -0
  86. package/cjs/lib/entity/vas-instruction.dto.d.ts.map +1 -0
  87. package/cjs/lib/entity/vas-instruction.dto.js +3 -0
  88. package/cjs/lib/entity/vas-instruction.dto.js.map +1 -0
  89. package/cjs/lib/entity/vas-instruction.model.d.ts +30 -0
  90. package/cjs/lib/entity/vas-instruction.model.d.ts.map +1 -0
  91. package/cjs/lib/entity/vas-instruction.model.js +53 -0
  92. package/cjs/lib/entity/vas-instruction.model.js.map +1 -0
  93. package/cjs/lib/entity/vas-invitation.d.ts +36 -3
  94. package/cjs/lib/entity/vas-invitation.d.ts.map +1 -1
  95. package/cjs/lib/entity/vas-invitation.js +57 -4
  96. package/cjs/lib/entity/vas-invitation.js.map +1 -1
  97. package/cjs/lib/entity/vas-job-data.model.d.ts +3 -12
  98. package/cjs/lib/entity/vas-job-data.model.d.ts.map +1 -1
  99. package/cjs/lib/entity/vas-job-data.model.js +4 -13
  100. package/cjs/lib/entity/vas-job-data.model.js.map +1 -1
  101. package/cjs/lib/entity/vas-job.model.d.ts +8 -37
  102. package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
  103. package/cjs/lib/entity/vas-job.model.js +16 -48
  104. package/cjs/lib/entity/vas-job.model.js.map +1 -1
  105. package/cjs/lib/entity/vas-job.model.spec-data.d.ts +1 -2
  106. package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -1
  107. package/cjs/lib/entity/vas-job.model.spec-data.js +15 -55
  108. package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -1
  109. package/cjs/lib/entity/vas-membership.model.d.ts +3 -1
  110. package/cjs/lib/entity/vas-membership.model.d.ts.map +1 -1
  111. package/cjs/lib/entity/vas-membership.model.js +7 -3
  112. package/cjs/lib/entity/vas-membership.model.js.map +1 -1
  113. package/cjs/lib/entity/vas-note.dto.d.ts +7 -0
  114. package/cjs/lib/entity/vas-note.dto.d.ts.map +1 -0
  115. package/cjs/lib/entity/vas-note.dto.js +3 -0
  116. package/cjs/lib/entity/vas-note.dto.js.map +1 -0
  117. package/cjs/lib/entity/vas-note.model.d.ts +31 -0
  118. package/cjs/lib/entity/vas-note.model.d.ts.map +1 -0
  119. package/cjs/lib/entity/vas-note.model.js +54 -0
  120. package/cjs/lib/entity/vas-note.model.js.map +1 -0
  121. package/cjs/lib/entity/vas-report-layout.model.d.ts +3 -1
  122. package/cjs/lib/entity/vas-report-layout.model.d.ts.map +1 -1
  123. package/cjs/lib/entity/vas-report-layout.model.js +4 -2
  124. package/cjs/lib/entity/vas-report-layout.model.js.map +1 -1
  125. package/cjs/lib/entity/vas-report-request.model.d.ts +3 -1
  126. package/cjs/lib/entity/vas-report-request.model.d.ts.map +1 -1
  127. package/cjs/lib/entity/vas-report-request.model.js +7 -3
  128. package/cjs/lib/entity/vas-report-request.model.js.map +1 -1
  129. package/cjs/lib/entity/vas-report.model.d.ts +5 -3
  130. package/cjs/lib/entity/vas-report.model.d.ts.map +1 -1
  131. package/cjs/lib/entity/vas-report.model.js +10 -12
  132. package/cjs/lib/entity/vas-report.model.js.map +1 -1
  133. package/cjs/lib/entity/vas-restricted-account-object.model.d.ts +3 -1
  134. package/cjs/lib/entity/vas-restricted-account-object.model.d.ts.map +1 -1
  135. package/cjs/lib/entity/vas-restricted-account-object.model.js +4 -2
  136. package/cjs/lib/entity/vas-restricted-account-object.model.js.map +1 -1
  137. package/cjs/lib/entity/vas-user.dto.d.ts +3 -0
  138. package/cjs/lib/entity/vas-user.dto.d.ts.map +1 -1
  139. package/cjs/lib/entity/vas-user.dto.js.map +1 -1
  140. package/cjs/lib/entity/vas-user.model.d.ts +6 -1
  141. package/cjs/lib/entity/vas-user.model.d.ts.map +1 -1
  142. package/cjs/lib/entity/vas-user.model.js +14 -4
  143. package/cjs/lib/entity/vas-user.model.js.map +1 -1
  144. package/cjs/package.json +12 -6
  145. package/esm2020/lib/entity/index.mjs +11 -1
  146. package/esm2020/lib/entity/vas-account-object.model.mjs +5 -3
  147. package/esm2020/lib/entity/vas-base.dto.mjs +1 -1
  148. package/esm2020/lib/entity/vas-base.model.mjs +4 -11
  149. package/esm2020/lib/entity/vas-branch.model.mjs +8 -4
  150. package/esm2020/lib/entity/vas-contact.dto.mjs +1 -1
  151. package/esm2020/lib/entity/vas-contact.model.mjs +44 -4
  152. package/esm2020/lib/entity/vas-control-type.model.mjs +14 -14
  153. package/esm2020/lib/entity/vas-control.dto.mjs +1 -1
  154. package/esm2020/lib/entity/vas-control.model.mjs +45 -51
  155. package/esm2020/lib/entity/vas-field.model.mjs +8 -4
  156. package/esm2020/lib/entity/vas-file.model.mjs +10 -6
  157. package/esm2020/lib/entity/vas-fire-user.model.mjs +15 -5
  158. package/esm2020/lib/entity/vas-form.dto.mjs +1 -1
  159. package/esm2020/lib/entity/vas-form.model.mjs +28 -42
  160. package/esm2020/lib/entity/vas-group.model.mjs +8 -25
  161. package/esm2020/lib/entity/vas-instruction-job-field.dto.mjs +2 -0
  162. package/esm2020/lib/entity/vas-instruction-job-field.model.mjs +42 -0
  163. package/esm2020/lib/entity/vas-instruction-job.dto.mjs +2 -0
  164. package/esm2020/lib/entity/vas-instruction-job.model.mjs +81 -0
  165. package/esm2020/lib/entity/vas-instruction-provider.dto.mjs +2 -0
  166. package/esm2020/lib/entity/vas-instruction-provider.model.mjs +63 -0
  167. package/esm2020/lib/entity/vas-instruction.dto.mjs +2 -0
  168. package/esm2020/lib/entity/vas-instruction.model.mjs +49 -0
  169. package/esm2020/lib/entity/vas-invitation.mjs +60 -4
  170. package/esm2020/lib/entity/vas-job-data.model.mjs +5 -14
  171. package/esm2020/lib/entity/vas-job.model.mjs +17 -49
  172. package/esm2020/lib/entity/vas-membership.model.mjs +8 -4
  173. package/esm2020/lib/entity/vas-note.dto.mjs +2 -0
  174. package/esm2020/lib/entity/vas-note.model.mjs +50 -0
  175. package/esm2020/lib/entity/vas-report-layout.model.mjs +5 -3
  176. package/esm2020/lib/entity/vas-report-request.model.mjs +8 -4
  177. package/esm2020/lib/entity/vas-report.model.mjs +11 -13
  178. package/esm2020/lib/entity/vas-restricted-account-object.model.mjs +5 -3
  179. package/esm2020/lib/entity/vas-user.dto.mjs +1 -1
  180. package/esm2020/lib/entity/vas-user.model.mjs +15 -5
  181. package/fesm2015/ironcode-vas-lib.mjs +626 -329
  182. package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
  183. package/fesm2020/ironcode-vas-lib.mjs +655 -326
  184. package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
  185. package/lib/entity/index.d.ts +10 -0
  186. package/lib/entity/vas-account-object.model.d.ts +3 -1
  187. package/lib/entity/vas-base.dto.d.ts +2 -0
  188. package/lib/entity/vas-base.model.d.ts +3 -10
  189. package/lib/entity/vas-branch.model.d.ts +3 -1
  190. package/lib/entity/vas-contact.dto.d.ts +7 -0
  191. package/lib/entity/vas-contact.model.d.ts +11 -1
  192. package/lib/entity/vas-control-type.model.d.ts +5 -9
  193. package/lib/entity/vas-control.dto.d.ts +3 -1
  194. package/lib/entity/vas-control.model.d.ts +11 -37
  195. package/lib/entity/vas-field.model.d.ts +3 -1
  196. package/lib/entity/vas-file.model.d.ts +4 -2
  197. package/lib/entity/vas-fire-user.model.d.ts +6 -1
  198. package/lib/entity/vas-form.dto.d.ts +1 -0
  199. package/lib/entity/vas-form.model.d.ts +7 -22
  200. package/lib/entity/vas-group.model.d.ts +3 -22
  201. package/lib/entity/vas-instruction-job-field.dto.d.ts +5 -0
  202. package/lib/entity/vas-instruction-job-field.model.d.ts +22 -0
  203. package/lib/entity/vas-instruction-job.dto.d.ts +15 -0
  204. package/lib/entity/vas-instruction-job.model.d.ts +57 -0
  205. package/lib/entity/vas-instruction-provider.dto.d.ts +8 -0
  206. package/lib/entity/vas-instruction-provider.model.d.ts +33 -0
  207. package/lib/entity/vas-instruction.dto.d.ts +5 -0
  208. package/lib/entity/vas-instruction.model.d.ts +29 -0
  209. package/lib/entity/vas-invitation.d.ts +36 -3
  210. package/lib/entity/vas-job-data.model.d.ts +3 -12
  211. package/lib/entity/vas-job.model.d.ts +8 -37
  212. package/lib/entity/vas-membership.model.d.ts +3 -1
  213. package/lib/entity/vas-note.dto.d.ts +6 -0
  214. package/lib/entity/vas-note.model.d.ts +30 -0
  215. package/lib/entity/vas-report-layout.model.d.ts +3 -1
  216. package/lib/entity/vas-report-request.model.d.ts +3 -1
  217. package/lib/entity/vas-report.model.d.ts +5 -3
  218. package/lib/entity/vas-restricted-account-object.model.d.ts +3 -1
  219. package/lib/entity/vas-user.dto.d.ts +3 -0
  220. package/lib/entity/vas-user.model.d.ts +6 -1
  221. 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
- username: this.username
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,77 @@ 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,
311
350
  };
312
351
  }
352
+ toApiDto(options) {
353
+ return Object.assign(Object.assign({}, super.toApiDto()), { id: this.id, created: this.created || '~', modified: this.modified || '~', accessGroup: this.accessGroup || '~', contactType: this.contactType || '~', name: this.name || '~', email: this.email || '~', mobile: this.mobile || '~', phone: this.phone || '~', address: this.address || '~', address2: this.address2 || '~', address3: this.address3 || '~', billingCode: this.billingCode || '~', business: this.business || '~', fax: this.fax || '~', vatNumber: this.vatNumber || '~', website: this.website || '~' });
354
+ }
313
355
  }
314
356
 
315
357
  /**
316
- * ControlModel
358
+ * VasControlTypeModel
317
359
  */
318
- class VasControlModel extends VasBaseModel {
360
+ class VasControlTypeModel extends VasBaseModel {
361
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, name) {
362
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
363
+ this.id = id;
364
+ this.created = created;
365
+ this.serverCreated = serverCreated;
366
+ this.createdBy = createdBy;
367
+ this.modified = modified;
368
+ this.serverModified = serverModified;
369
+ this.modifiedBy = modifiedBy;
370
+ this.createdByName = createdByName;
371
+ this.modifiedByName = modifiedByName;
372
+ this.name = name;
373
+ }
319
374
  /**
320
- * @param {string} id
321
- * @param {string} created
322
- * @param {string} serverCreated
323
- * @param {string} createdBy
324
- * @param {string} modified
325
- * @param {string} serverModified
326
- * @param {string} modifiedBy
327
- * @param {string} account
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
375
+ * @return VasControlTypeModel
376
+ */
377
+ static empty() {
378
+ return new VasControlTypeModel('', '', '', '', '', '', '', '', '', '');
379
+ }
380
+ /**
381
+ * @param {VasControlTypeDto} dto
382
+ * @return {VasControlTypeModel}
383
+ */
384
+ static fromDto(dto) {
385
+ return new VasControlTypeModel(
386
+ // eslint-disable-next-line new-cap
387
+ dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.name || '');
388
+ }
389
+ /**
390
+ * @return {VasControlTypeDto}
340
391
  */
341
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, _config, descriptionImage) {
342
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
392
+ toDto() {
393
+ return {
394
+ id: this.id,
395
+ created: this.created,
396
+ serverCreated: this.serverCreated,
397
+ createdBy: this.createdBy,
398
+ modified: this.modified,
399
+ serverModified: this.serverModified,
400
+ modifiedBy: this.modifiedBy,
401
+ createdByName: this.createdByName,
402
+ modifiedByName: this.modifiedByName,
403
+ name: this.name
404
+ };
405
+ }
406
+ }
407
+
408
+ /**
409
+ * ControlModel
410
+ */
411
+ class VasControlModel extends VasAccountObjectModel {
412
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled) {
413
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
343
414
  this.id = id;
344
415
  this.created = created;
345
416
  this.serverCreated = serverCreated;
@@ -347,6 +418,8 @@ class VasControlModel extends VasBaseModel {
347
418
  this.modified = modified;
348
419
  this.serverModified = serverModified;
349
420
  this.modifiedBy = modifiedBy;
421
+ this.createdByName = createdByName;
422
+ this.modifiedByName = modifiedByName;
350
423
  this.account = account;
351
424
  this.accessGroup = accessGroup;
352
425
  this.controlType = controlType;
@@ -358,28 +431,20 @@ class VasControlModel extends VasBaseModel {
358
431
  this.sequence = sequence;
359
432
  this.description = description;
360
433
  this.defaultValue = defaultValue;
361
- this._config = _config;
434
+ this.config = config;
362
435
  this.descriptionImage = descriptionImage;
363
- this.controlTypeModel = undefined;
364
- this.configCache = undefined;
365
- }
366
- /**
367
- * The config property is returned from the api as a json string, this getter
368
- * will deserialize it
369
- * @return {T}
370
- */
371
- getConfigModel() {
372
- if (this.configCache !== undefined) {
373
- return this.configCache;
436
+ this.portalEnabled = portalEnabled;
437
+ this.controlTypeId = '';
438
+ if (typeof controlType === 'string') {
439
+ this.controlTypeId = controlType;
440
+ }
441
+ else {
442
+ this.controlTypeId = controlType.id;
374
443
  }
375
- return this.configCache = JSON.parse(this._config);
376
- }
377
- get config() {
378
- return this._config;
379
444
  }
380
- set config(config) {
381
- this._config = config;
382
- this.configCache = undefined;
445
+ get controlTypeName() {
446
+ var _a;
447
+ return ((_a = this.controlType) === null || _a === void 0 ? void 0 : _a.name) || '';
383
448
  }
384
449
  /**
385
450
  * The defaultValue property is returned from the api as a string or number,
@@ -387,8 +452,8 @@ class VasControlModel extends VasBaseModel {
387
452
  * object if the value is a json string
388
453
  */
389
454
  get defaultValueDecoded() {
390
- if (this.defaultValue === '' && this.controlTypeModel) {
391
- switch (this.controlTypeModel.name) {
455
+ if (this.defaultValue === '' && this.controlType) {
456
+ switch (this.controlTypeName) {
392
457
  case 'branch':
393
458
  case 'camera':
394
459
  case 'contact': {
@@ -431,9 +496,20 @@ class VasControlModel extends VasBaseModel {
431
496
  * @return {VasControlModel}
432
497
  */
433
498
  static fromDto(dto) {
499
+ const handleControlType = (c) => {
500
+ if (c === undefined) {
501
+ return VasControlTypeModel.empty();
502
+ }
503
+ else if (typeof c === 'string') {
504
+ return c;
505
+ }
506
+ else {
507
+ return VasControlTypeModel.fromDto(c);
508
+ }
509
+ };
434
510
  return new VasControlModel(
435
511
  // eslint-disable-next-line new-cap
436
- dto.id || UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.controlType || '', dto.group || '', dto.validators || [], dto.name || '', dto.title || '', dto.linkable || false, dto.sequence || 0, dto.description || '', dto.defaultValue || '', dto.config || '{}', dto.descriptionImage || '');
512
+ 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
513
  }
438
514
  /**
439
515
  * @param {string} value
@@ -462,9 +538,11 @@ class VasControlModel extends VasBaseModel {
462
538
  modified: this.modified,
463
539
  serverModified: this.serverModified,
464
540
  modifiedBy: this.modifiedBy,
541
+ createdByName: this.createdByName,
542
+ modifiedByName: this.modifiedByName,
465
543
  account: this.account,
466
544
  accessGroup: this.accessGroup,
467
- controlType: this.controlType,
545
+ controlType: this.controlType.toDto(),
468
546
  group: this.group,
469
547
  validators: this.validators,
470
548
  name: this.name,
@@ -473,60 +551,13 @@ class VasControlModel extends VasBaseModel {
473
551
  sequence: this.sequence,
474
552
  description: this.description,
475
553
  defaultValue: this.defaultValue,
476
- config: this.config,
554
+ config: JSON.stringify(this.config),
477
555
  descriptionImage: this.descriptionImage,
556
+ portalEnabled: this.portalEnabled
478
557
  };
479
558
  }
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() {
520
- return {
521
- id: this.id,
522
- created: this.created,
523
- serverCreated: this.serverCreated,
524
- createdBy: this.createdBy,
525
- modified: this.modified,
526
- serverModified: this.serverModified,
527
- modifiedBy: this.modifiedBy,
528
- name: this.name
529
- };
559
+ toApiDto(options) {
560
+ return Object.assign(Object.assign({}, super.toApiDto()), { title: this.title || '~', name: this.title || '~', portalEnabled: this.portalEnabled });
530
561
  }
531
562
  }
532
563
 
@@ -534,19 +565,8 @@ class VasControlTypeModel extends VasBaseModel {
534
565
  * VasJobDataModel
535
566
  */
536
567
  class VasJobDataModel extends VasAccountObjectModel {
537
- /**
538
- * @param {string} id
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);
568
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job) {
569
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
550
570
  this.id = id;
551
571
  this.created = created;
552
572
  this.serverCreated = serverCreated;
@@ -554,6 +574,8 @@ class VasJobDataModel extends VasAccountObjectModel {
554
574
  this.modified = modified;
555
575
  this.serverModified = serverModified;
556
576
  this.modifiedBy = modifiedBy;
577
+ this.createdByName = createdByName;
578
+ this.modifiedByName = modifiedByName;
557
579
  this.account = account;
558
580
  this.job = job;
559
581
  }
@@ -563,8 +585,8 @@ class VasJobDataModel extends VasAccountObjectModel {
563
585
  * VasFieldModel
564
586
  */
565
587
  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);
588
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, control, fieldJobPointers, value, version) {
589
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
568
590
  this.id = id;
569
591
  this.created = created;
570
592
  this.serverCreated = serverCreated;
@@ -572,6 +594,8 @@ class VasFieldModel extends VasJobDataModel {
572
594
  this.modified = modified;
573
595
  this.serverModified = serverModified;
574
596
  this.modifiedBy = modifiedBy;
597
+ this.createdByName = createdByName;
598
+ this.modifiedByName = modifiedByName;
575
599
  this.account = account;
576
600
  this.job = job;
577
601
  this.control = control;
@@ -584,7 +608,7 @@ class VasFieldModel extends VasJobDataModel {
584
608
  * @return {VasFieldModel}
585
609
  */
586
610
  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);
611
+ 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
612
  }
589
613
  /**
590
614
  * @return {VasFieldDto}
@@ -598,6 +622,8 @@ class VasFieldModel extends VasJobDataModel {
598
622
  modified: this.modified,
599
623
  serverModified: this.serverModified,
600
624
  modifiedBy: this.modifiedBy,
625
+ createdByName: this.createdByName,
626
+ modifiedByName: this.modifiedByName,
601
627
  account: this.account,
602
628
  job: this.job,
603
629
  control: this.control,
@@ -654,8 +680,8 @@ function isFileDto(object) {
654
680
  * VasFileDto
655
681
  */
656
682
  class VasFileModel extends VasJobDataModel {
657
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job, name, fileSize, mimeType, sequence, config, url, controlPath, message, status, uri) {
658
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, job);
683
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, name, fileSize, mimeType, sequence, config, url, controlPath, message, status, uri) {
684
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
659
685
  this.id = id;
660
686
  this.created = created;
661
687
  this.serverCreated = serverCreated;
@@ -663,6 +689,8 @@ class VasFileModel extends VasJobDataModel {
663
689
  this.modified = modified;
664
690
  this.serverModified = serverModified;
665
691
  this.modifiedBy = modifiedBy;
692
+ this.createdByName = createdByName;
693
+ this.modifiedByName = modifiedByName;
666
694
  this.account = account;
667
695
  this.job = job;
668
696
  this.name = name;
@@ -677,7 +705,7 @@ class VasFileModel extends VasJobDataModel {
677
705
  this.uri = uri;
678
706
  }
679
707
  static empty() {
680
- return new VasFileModel('', '', '', '', '', '', '', '', '', '', 0, '', 0, {
708
+ return new VasFileModel('', '', '', '', '', '', '', '', '', '', '', '', 0, '', 0, {
681
709
  displayAs: 'grid',
682
710
  embedLink: false,
683
711
  group: 'photo',
@@ -686,8 +714,8 @@ class VasFileModel extends VasJobDataModel {
686
714
  rotation: 0
687
715
  }, '', '', '', '', '');
688
716
  }
689
- static fromDto(fileDto) {
690
- return new VasFileModel(fileDto.id || UUID.UUID(), fileDto.created || '', fileDto.serverCreated || '', fileDto.createdBy || '', fileDto.modified || '', fileDto.serverModified || '', fileDto.modifiedBy || '', fileDto.account || '', fileDto.job || '', fileDto.name || '', fileDto.fileSize || 0, fileDto.mimeType || '', fileDto.sequence || 0, VasFileModel.parseConfig(fileDto.config), fileDto.url || '', fileDto.controlPath || '', fileDto.message || '', fileDto.status || '', fileDto.uri || '');
717
+ static fromDto(dto) {
718
+ 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 || '');
691
719
  }
692
720
  static parseConfig(config = '') {
693
721
  try {
@@ -716,6 +744,8 @@ class VasFileModel extends VasJobDataModel {
716
744
  modified: this.modified,
717
745
  serverModified: this.serverModified,
718
746
  modifiedBy: this.modifiedBy,
747
+ createdByName: this.createdByName,
748
+ modifiedByName: this.modifiedByName,
719
749
  account: this.account,
720
750
  job: this.job,
721
751
  name: this.name,
@@ -768,29 +798,8 @@ class VasFileModel extends VasJobDataModel {
768
798
  * GroupModel
769
799
  */
770
800
  class VasGroupModel extends VasBaseModel {
771
- /**
772
- * @param {string} id
773
- * @param {string} created
774
- * @param {string} serverCreated
775
- * @param {string} createdBy
776
- * @param {string} modified
777
- * @param {string} serverModified
778
- * @param {string} modifiedBy
779
- * @param {string} account
780
- * @param {string} accessGroup
781
- * @param {string} name
782
- * @param {string} title
783
- * @param {string} description
784
- * @param {number} sequence
785
- * @param {boolean} includeInSummary
786
- * @param {string[]} forms
787
- * @param {string} visibilityControl
788
- * @param {string} visibleIfEquals
789
- * @param {VasControlModel[]} controls
790
- * @param {number} scoreWeight
791
- */
792
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, name, title, description, sequence, includeInSummary, forms, visibilityControl, visibleIfEquals, controls, scoreWeight) {
793
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
801
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, name, title, description, sequence, includeInSummary, forms, visibilityControl, visibleIfEquals, controls, scoreWeight) {
802
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
794
803
  this.id = id;
795
804
  this.created = created;
796
805
  this.serverCreated = serverCreated;
@@ -798,6 +807,8 @@ class VasGroupModel extends VasBaseModel {
798
807
  this.modified = modified;
799
808
  this.serverModified = serverModified;
800
809
  this.modifiedBy = modifiedBy;
810
+ this.createdByName = createdByName;
811
+ this.modifiedByName = modifiedByName;
801
812
  this.account = account;
802
813
  this.accessGroup = accessGroup;
803
814
  this.name = name;
@@ -818,7 +829,7 @@ class VasGroupModel extends VasBaseModel {
818
829
  static fromDto(dto) {
819
830
  return new VasGroupModel(
820
831
  // eslint-disable-next-line new-cap
821
- 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 || [])
832
+ 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 || [])
822
833
  .filter(control => control.name.startsWith('fields.'))
823
834
  .sort((a, b) => a.sequence - b.sequence)
824
835
  .map(c => VasControlModel.fromDto(c)), dto.scoreWeight || 1);
@@ -851,6 +862,8 @@ class VasGroupModel extends VasBaseModel {
851
862
  modified: this.modified,
852
863
  serverModified: this.serverModified,
853
864
  modifiedBy: this.modifiedBy,
865
+ createdByName: this.createdByName,
866
+ modifiedByName: this.modifiedByName,
854
867
  account: this.account,
855
868
  accessGroup: this.accessGroup,
856
869
  name: this.name,
@@ -871,28 +884,8 @@ class VasGroupModel extends VasBaseModel {
871
884
  * VasFormModel
872
885
  */
873
886
  class VasFormModel extends VasRestrictedAccountObjectModel {
874
- /**
875
- * @param {string} id
876
- * @param {string} created
877
- * @param {string} serverCreated
878
- * @param {string} createdBy
879
- * @param {string} modified
880
- * @param {string} serverModified
881
- * @param {string} modifiedBy
882
- * @param {string} account
883
- * @param {string} accessGroup
884
- * @param {string} jobType
885
- * @param {string} title
886
- * @param {string} description
887
- * @param {VasGroupModel[]} groups
888
- * @param {string} dynamicDescriptor
889
- * @param {string} indexName
890
- * @param {string} pipelineName
891
- * @param {string} config
892
- * @param {boolean} geoLocationEnabled
893
- */
894
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, jobType, title, description, groups, dynamicDescriptor, indexName, pipelineName, config, geoLocationEnabled) {
895
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
887
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, jobType, title, description, groups, dynamicDescriptor, indexName, pipelineName, config, geoLocationEnabled, filesEnabled) {
888
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
896
889
  this.id = id;
897
890
  this.created = created;
898
891
  this.serverCreated = serverCreated;
@@ -900,6 +893,8 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
900
893
  this.modified = modified;
901
894
  this.serverModified = serverModified;
902
895
  this.modifiedBy = modifiedBy;
896
+ this.createdByName = createdByName;
897
+ this.modifiedByName = modifiedByName;
903
898
  this.account = account;
904
899
  this.accessGroup = accessGroup;
905
900
  this.jobType = jobType;
@@ -911,6 +906,7 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
911
906
  this.pipelineName = pipelineName;
912
907
  this.config = config;
913
908
  this.geoLocationEnabled = geoLocationEnabled;
909
+ this.filesEnabled = filesEnabled;
914
910
  }
915
911
  /**
916
912
  * Returns the name of this form in a "safe" way, i.e. no spaces, special
@@ -931,6 +927,8 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
931
927
  * @param {VasFormDto} formDto
932
928
  * @param {Array<VasControlTypeDto>} controlTypeDtos
933
929
  * @return {VasFormModel}
930
+ * @deprecated vas-rest has been updated to inline control types into the
931
+ * control so this method is no longer required. use VasFormModel.fromDto()
934
932
  */
935
933
  static fromApiResponse(formDto, controlTypeDtos) {
936
934
  const controlTypeModels = controlTypeDtos
@@ -940,32 +938,30 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
940
938
  .forEach(group => {
941
939
  group.controls
942
940
  .forEach(control => {
943
- control.controlTypeModel = controlTypeModels
944
- .find(ct => ct.id === control.controlType);
941
+ // Note that we are forcing types here. This is because we have
942
+ // updated the typings for ControlModel and ControlDto to reflect
943
+ // the fact that VASREST is updating the response from certain
944
+ // controllers to inline ControlType into the Control. Consumers of
945
+ // the library will know what version of the API they are consuming
946
+ // so can decide when to migrate away from fromApiResponse, and can
947
+ // use fromDto instead
948
+ control.controlType = controlTypeModels
949
+ .find(ct => ct.id === (control.controlTypeId));
945
950
  });
946
951
  });
947
952
  return formModel;
948
953
  }
954
+ static empty() {
955
+ return VasFormModel.fromDto({});
956
+ }
949
957
  /**
950
958
  * @param {VasFormDto} dto
951
959
  * @return {VasFormModel}
952
960
  */
953
961
  static fromDto(dto) {
954
- 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 || [])
962
+ 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 || [])
955
963
  .sort((a, b) => a.sequence - b.sequence)
956
- .map(g => VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config || '', dto.geoLocationEnabled || false);
957
- }
958
- addControlTypesToControl(controlTypes) {
959
- const controlTypeModels = controlTypes
960
- .map(ct => VasControlTypeModel.fromDto(ct));
961
- this.groups
962
- .forEach(group => {
963
- group.controls
964
- .forEach(control => {
965
- control.controlTypeModel = controlTypeModels
966
- .find(ctm => ctm.id === control.controlType);
967
- });
968
- });
964
+ .map(g => VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config || '', dto.geoLocationEnabled || false, dto.filesEnabled || false);
969
965
  }
970
966
  /**
971
967
  * @param {string} id
@@ -1010,8 +1006,7 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
1010
1006
  const paths = [];
1011
1007
  this.groups.forEach(group => {
1012
1008
  group.controls.forEach(control => {
1013
- var _a;
1014
- if (((_a = control.controlTypeModel) === null || _a === void 0 ? void 0 : _a.name) !== 'camera') {
1009
+ if (control.controlTypeName !== 'camera') {
1015
1010
  return;
1016
1011
  }
1017
1012
  paths.push([group.name, control.safeName]);
@@ -1049,6 +1044,8 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
1049
1044
  modified: this.modified,
1050
1045
  serverModified: this.serverModified,
1051
1046
  modifiedBy: this.modifiedBy,
1047
+ createdByName: this.createdByName,
1048
+ modifiedByName: this.modifiedByName,
1052
1049
  account: this.account,
1053
1050
  accessGroup: this.accessGroup,
1054
1051
  jobType: this.jobType,
@@ -1059,14 +1056,23 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
1059
1056
  indexName: this.indexName,
1060
1057
  pipelineName: this.pipelineName,
1061
1058
  config: this.config,
1062
- geoLocationEnabled: this.geoLocationEnabled
1059
+ geoLocationEnabled: this.geoLocationEnabled,
1060
+ filesEnabled: this.filesEnabled
1063
1061
  };
1064
1062
  }
1065
1063
  }
1066
1064
 
1065
+ var VasInvitationTypeEnum;
1066
+ (function (VasInvitationTypeEnum) {
1067
+ VasInvitationTypeEnum["TYPE_VAS_DESKTOP"] = "vas-desktop";
1068
+ VasInvitationTypeEnum["TYPE_VAS_MOBILE"] = "vas-mobile";
1069
+ VasInvitationTypeEnum["TYPE_VAS_PORTAL"] = "vas-portal";
1070
+ VasInvitationTypeEnum["TYPE_P2C_DESKTOP"] = "p2c-desktop";
1071
+ VasInvitationTypeEnum["TYPE_P2C_MOBILE"] = "p2c-mobile";
1072
+ })(VasInvitationTypeEnum || (VasInvitationTypeEnum = {}));
1067
1073
  class VasInvitationModel extends VasAccountObjectModel {
1068
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, secret) {
1069
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
1074
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, secret, type, accessGroups, contactTypes, jobStatuses, jobTypes, lookupTypes, taskTypes, instructionProviders) {
1075
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
1070
1076
  this.id = id;
1071
1077
  this.created = created;
1072
1078
  this.serverCreated = serverCreated;
@@ -1074,8 +1080,18 @@ class VasInvitationModel extends VasAccountObjectModel {
1074
1080
  this.modified = modified;
1075
1081
  this.serverModified = serverModified;
1076
1082
  this.modifiedBy = modifiedBy;
1083
+ this.createdByName = createdByName;
1084
+ this.modifiedByName = modifiedByName;
1077
1085
  this.account = account;
1078
1086
  this.secret = secret;
1087
+ this.type = type;
1088
+ this.accessGroups = accessGroups;
1089
+ this.contactTypes = contactTypes;
1090
+ this.jobStatuses = jobStatuses;
1091
+ this.jobTypes = jobTypes;
1092
+ this.lookupTypes = lookupTypes;
1093
+ this.taskTypes = taskTypes;
1094
+ this.instructionProviders = instructionProviders;
1079
1095
  }
1080
1096
  toDto() {
1081
1097
  return {
@@ -1086,12 +1102,372 @@ class VasInvitationModel extends VasAccountObjectModel {
1086
1102
  modified: this.modified,
1087
1103
  serverModified: this.serverModified,
1088
1104
  modifiedBy: this.modifiedBy,
1105
+ createdByName: this.createdByName,
1106
+ modifiedByName: this.modifiedByName,
1089
1107
  account: this.account,
1090
1108
  secret: this.secret,
1109
+ type: this.type,
1110
+ accessGroups: this.accessGroups,
1111
+ contactTypes: this.contactTypes,
1112
+ jobStatuses: this.jobStatuses,
1113
+ jobTypes: this.jobTypes,
1114
+ lookupTypes: this.lookupTypes,
1115
+ taskTypes: this.taskTypes,
1116
+ instructionProviders: this.instructionProviders,
1091
1117
  };
1092
1118
  }
1093
1119
  static fromDto(dto) {
1094
- return new VasInvitationModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.secret || '');
1120
+ 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 || []);
1121
+ }
1122
+ toApiDto(options) {
1123
+ const dto = Object.assign(Object.assign({}, super.toApiDto()), { type: this.type });
1124
+ if (this.accessGroups.length) {
1125
+ dto['accessGroups'] = this.accessGroups.map(d => d.id);
1126
+ }
1127
+ if (this.contactTypes.length) {
1128
+ dto['contactTypes'] = this.contactTypes.map(d => d.id);
1129
+ }
1130
+ if (this.jobStatuses.length) {
1131
+ dto['jobStatuses'] = this.jobStatuses.map(d => d.id);
1132
+ }
1133
+ if (this.jobTypes.length) {
1134
+ dto['jobTypes'] = this.jobTypes.map(d => d.id);
1135
+ }
1136
+ if (this.lookupTypes.length) {
1137
+ dto['lookupTypes'] = this.lookupTypes.map(d => d.id);
1138
+ }
1139
+ if (this.taskTypes.length) {
1140
+ dto['taskTypes'] = this.taskTypes.map(d => d.id);
1141
+ }
1142
+ if (this.instructionProviders.length) {
1143
+ dto['instructionProviders'] = this.instructionProviders.map(d => d.id);
1144
+ }
1145
+ return dto;
1146
+ }
1147
+ }
1148
+
1149
+ /**
1150
+ * VasNoteModel
1151
+ */
1152
+ class VasNoteModel extends VasJobDataModel {
1153
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, content, sensitive) {
1154
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
1155
+ this.id = id;
1156
+ this.created = created;
1157
+ this.serverCreated = serverCreated;
1158
+ this.createdBy = createdBy;
1159
+ this.modified = modified;
1160
+ this.serverModified = serverModified;
1161
+ this.modifiedBy = modifiedBy;
1162
+ this.createdByName = createdByName;
1163
+ this.modifiedByName = modifiedByName;
1164
+ this.account = account;
1165
+ this.job = job;
1166
+ this.content = content;
1167
+ this.sensitive = sensitive;
1168
+ }
1169
+ /**
1170
+ * @param dto VasNoteDto
1171
+ * @return VasNoteModel
1172
+ */
1173
+ static fromDto(dto) {
1174
+ 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);
1175
+ }
1176
+ /**
1177
+ * @returns VasNoteDto
1178
+ */
1179
+ toDto() {
1180
+ return {
1181
+ id: this.id,
1182
+ created: this.created,
1183
+ serverCreated: this.serverCreated,
1184
+ createdBy: this.createdBy,
1185
+ modified: this.modified,
1186
+ serverModified: this.serverModified,
1187
+ modifiedBy: this.modifiedBy,
1188
+ createdByName: this.createdByName,
1189
+ modifiedByName: this.modifiedByName,
1190
+ account: this.account,
1191
+ job: this.job,
1192
+ content: this.content,
1193
+ sensitive: this.sensitive,
1194
+ };
1195
+ }
1196
+ }
1197
+
1198
+ /**
1199
+ * VasInstructionJobFieldModel
1200
+ */
1201
+ class VasInstructionJobFieldModel extends VasBaseModel {
1202
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, value, name) {
1203
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
1204
+ this.id = id;
1205
+ this.created = created;
1206
+ this.serverCreated = serverCreated;
1207
+ this.createdBy = createdBy;
1208
+ this.modified = modified;
1209
+ this.serverModified = serverModified;
1210
+ this.modifiedBy = modifiedBy;
1211
+ this.createdByName = createdByName;
1212
+ this.modifiedByName = modifiedByName;
1213
+ this.value = value;
1214
+ this.name = name;
1215
+ }
1216
+ static empty() {
1217
+ return new VasInstructionJobFieldModel('', '', '', '', '', '', '', '', '', '', '');
1218
+ }
1219
+ static fromDto(dto) {
1220
+ 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 || '');
1221
+ }
1222
+ toDto() {
1223
+ return {
1224
+ id: this.id,
1225
+ created: this.created,
1226
+ serverCreated: this.serverCreated,
1227
+ createdBy: this.createdBy,
1228
+ modified: this.modified,
1229
+ serverModified: this.serverModified,
1230
+ modifiedBy: this.modifiedBy,
1231
+ createdByName: this.createdByName,
1232
+ modifiedByName: this.modifiedByName,
1233
+ value: this.value,
1234
+ name: this.name,
1235
+ };
1236
+ }
1237
+ }
1238
+
1239
+ class VasReportModel extends VasJobDataModel {
1240
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, reportLayoutId, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId) {
1241
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
1242
+ this.id = id;
1243
+ this.created = created;
1244
+ this.serverCreated = serverCreated;
1245
+ this.createdBy = createdBy;
1246
+ this.modified = modified;
1247
+ this.serverModified = serverModified;
1248
+ this.modifiedBy = modifiedBy;
1249
+ this.createdByName = createdByName;
1250
+ this.modifiedByName = modifiedByName;
1251
+ this.account = account;
1252
+ this.job = job;
1253
+ this.reportLayoutId = reportLayoutId;
1254
+ this.title = title;
1255
+ this.sendEmail = sendEmail;
1256
+ this.message = message;
1257
+ this.attempted = attempted;
1258
+ this.completed = completed;
1259
+ this.succeeded = succeeded;
1260
+ this.attempts = attempts;
1261
+ this.notificationId = notificationId;
1262
+ }
1263
+ static empty() {
1264
+ return VasReportModel.fromDto({});
1265
+ }
1266
+ static fromDto(dto) {
1267
+ 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 || '');
1268
+ }
1269
+ toDto() {
1270
+ return {
1271
+ id: this.id,
1272
+ created: this.created,
1273
+ serverCreated: this.serverCreated,
1274
+ createdBy: this.createdBy,
1275
+ modified: this.modified,
1276
+ serverModified: this.serverModified,
1277
+ modifiedBy: this.modifiedBy,
1278
+ createdByName: this.createdByName,
1279
+ modifiedByName: this.modifiedByName,
1280
+ account: this.account,
1281
+ job: this.job,
1282
+ reportLayoutId: this.reportLayoutId,
1283
+ title: this.title,
1284
+ sendEmail: this.sendEmail,
1285
+ message: this.message,
1286
+ attempted: this.attempted,
1287
+ completed: this.completed,
1288
+ succeeded: this.succeeded,
1289
+ attempts: this.attempts,
1290
+ notificationId: this.notificationId,
1291
+ };
1292
+ }
1293
+ }
1294
+
1295
+ /**
1296
+ * VasNoteModel
1297
+ */
1298
+ class VasInstructionJobModel extends VasBaseModel {
1299
+ /**
1300
+ * @param id id
1301
+ * @param created created
1302
+ * @param serverCreated serverCreated
1303
+ * @param createdBy createdBy
1304
+ * @param modified modified
1305
+ * @param serverModified serverModified
1306
+ * @param modifiedBy modifiedBy
1307
+ * @param reference reference
1308
+ * @param jobStatus jobStatus
1309
+ * @param createdByName createdByName
1310
+ * @param modifiedByName modifiedByName
1311
+ * @param notes notes
1312
+ * @param fields fields
1313
+ * @param files files
1314
+ * @param reports reports
1315
+ */
1316
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, reference, jobStatus, notes, fields, files, reports) {
1317
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
1318
+ this.id = id;
1319
+ this.created = created;
1320
+ this.serverCreated = serverCreated;
1321
+ this.createdBy = createdBy;
1322
+ this.modified = modified;
1323
+ this.serverModified = serverModified;
1324
+ this.modifiedBy = modifiedBy;
1325
+ this.createdByName = createdByName;
1326
+ this.modifiedByName = modifiedByName;
1327
+ this.reference = reference;
1328
+ this.jobStatus = jobStatus;
1329
+ this.notes = notes;
1330
+ this.fields = fields;
1331
+ this.files = files;
1332
+ this.reports = reports;
1333
+ }
1334
+ /**
1335
+ * @return empty VasInstructionJobModel
1336
+ */
1337
+ static empty() {
1338
+ return new VasInstructionJobModel('', '', '', '', '', '', '', '', '', '', '', [], [], [], []);
1339
+ }
1340
+ /**
1341
+ * @param dto VasInstructionDto
1342
+ * @return VasInstructionModel
1343
+ */
1344
+ static fromDto(dto) {
1345
+ 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)));
1346
+ }
1347
+ /**
1348
+ * @returns VasNoteDto
1349
+ */
1350
+ toDto() {
1351
+ return {
1352
+ id: this.id,
1353
+ created: this.created,
1354
+ serverCreated: this.serverCreated,
1355
+ createdBy: this.createdBy,
1356
+ modified: this.modified,
1357
+ serverModified: this.serverModified,
1358
+ modifiedBy: this.modifiedBy,
1359
+ reference: this.reference,
1360
+ jobStatus: this.jobStatus,
1361
+ createdByName: this.createdByName,
1362
+ modifiedByName: this.modifiedByName,
1363
+ notes: this.notes.map(m => m.toDto()),
1364
+ fields: this.fields.map(m => m.toDto()),
1365
+ files: this.files.map(m => m.toDto()),
1366
+ reports: this.reports.map(m => m.toDto()),
1367
+ };
1368
+ }
1369
+ }
1370
+
1371
+ /**
1372
+ * VasNoteModel
1373
+ */
1374
+ class VasInstructionModel extends VasAccountObjectModel {
1375
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job) {
1376
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
1377
+ this.id = id;
1378
+ this.created = created;
1379
+ this.serverCreated = serverCreated;
1380
+ this.createdBy = createdBy;
1381
+ this.modified = modified;
1382
+ this.serverModified = serverModified;
1383
+ this.modifiedBy = modifiedBy;
1384
+ this.createdByName = createdByName;
1385
+ this.modifiedByName = modifiedByName;
1386
+ this.account = account;
1387
+ this.job = job;
1388
+ }
1389
+ /**
1390
+ * @param dto VasInstructionDto
1391
+ * @return VasInstructionModel
1392
+ */
1393
+ static fromDto(dto) {
1394
+ 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 ?
1395
+ VasInstructionJobModel.fromDto(dto.job) :
1396
+ VasInstructionJobModel.empty());
1397
+ }
1398
+ /**
1399
+ * @returns VasNoteDto
1400
+ */
1401
+ toDto() {
1402
+ return {
1403
+ id: this.id,
1404
+ created: this.created,
1405
+ serverCreated: this.serverCreated,
1406
+ createdBy: this.createdBy,
1407
+ modified: this.modified,
1408
+ serverModified: this.serverModified,
1409
+ modifiedBy: this.modifiedBy,
1410
+ createdByName: this.createdByName,
1411
+ modifiedByName: this.modifiedByName,
1412
+ account: this.account,
1413
+ job: this.job.toDto()
1414
+ };
1415
+ }
1416
+ }
1417
+
1418
+ /**
1419
+ * VasInstructionProviderModel
1420
+ */
1421
+ class VasInstructionProviderModel extends VasAccountObjectModel {
1422
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, form, title, secret, portalEnabled) {
1423
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
1424
+ this.id = id;
1425
+ this.created = created;
1426
+ this.serverCreated = serverCreated;
1427
+ this.createdBy = createdBy;
1428
+ this.modified = modified;
1429
+ this.serverModified = serverModified;
1430
+ this.modifiedBy = modifiedBy;
1431
+ this.createdByName = createdByName;
1432
+ this.modifiedByName = modifiedByName;
1433
+ this.account = account;
1434
+ this.form = form;
1435
+ this.title = title;
1436
+ this.secret = secret;
1437
+ this.portalEnabled = portalEnabled;
1438
+ }
1439
+ /**
1440
+ * @param dto VasInstructionDto
1441
+ * @return VasInstructionModel
1442
+ */
1443
+ static fromDto(dto) {
1444
+ 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 ?
1445
+ VasFormModel.fromDto(dto.form) :
1446
+ VasFormModel.empty(), dto.title || '', dto.secret || '', dto.portalEnabled || false);
1447
+ }
1448
+ /**
1449
+ * @returns VasNoteDto
1450
+ */
1451
+ toDto() {
1452
+ return {
1453
+ id: this.id,
1454
+ created: this.created,
1455
+ serverCreated: this.serverCreated,
1456
+ createdBy: this.createdBy,
1457
+ modified: this.modified,
1458
+ serverModified: this.serverModified,
1459
+ modifiedBy: this.modifiedBy,
1460
+ createdByName: this.createdByName,
1461
+ modifiedByName: this.modifiedByName,
1462
+ account: this.account,
1463
+ form: this.form.toDto(),
1464
+ title: this.title,
1465
+ secret: this.secret,
1466
+ portalEnabled: this.portalEnabled
1467
+ };
1468
+ }
1469
+ toApiDto(options) {
1470
+ return Object.assign(Object.assign({}, super.toApiDto(options)), { title: this.title, form: this.form.id, portalEnabled: this.portalEnabled });
1095
1471
  }
1096
1472
  }
1097
1473
 
@@ -1179,34 +1555,8 @@ const isArrayString = (value) => {
1179
1555
  * JobModel
1180
1556
  */
1181
1557
  class VasJobModel extends VasRestrictedAccountObjectModel {
1182
- /**
1183
- * @param id
1184
- * @param created
1185
- * @param serverCreated
1186
- * @param createdBy
1187
- * @param modified
1188
- * @param serverModified
1189
- * @param modifiedBy
1190
- * @param account
1191
- * @param accessGroup
1192
- * @param reference
1193
- * @param jobDate
1194
- * @param jobStatus
1195
- * @param jobType
1196
- * @param assigneeId
1197
- * @param formId
1198
- * @param timeZoneOffset
1199
- * @param pendingFields
1200
- * @param childModified
1201
- * @param version
1202
- * @param fields
1203
- * @param files,
1204
- * @param createdByDisplayName
1205
- * @param modifiedByDisplayName
1206
- * @param geoLocation
1207
- */
1208
- 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) {
1209
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
1558
+ 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) {
1559
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
1210
1560
  this.id = id;
1211
1561
  this.created = created;
1212
1562
  this.serverCreated = serverCreated;
@@ -1214,6 +1564,8 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
1214
1564
  this.modified = modified;
1215
1565
  this.serverModified = serverModified;
1216
1566
  this.modifiedBy = modifiedBy;
1567
+ this.createdByName = createdByName;
1568
+ this.modifiedByName = modifiedByName;
1217
1569
  this.account = account;
1218
1570
  this.accessGroup = accessGroup;
1219
1571
  this.reference = reference;
@@ -1260,23 +1612,15 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
1260
1612
  * @return {VasJobModel}
1261
1613
  */
1262
1614
  static empty() {
1263
- return new VasJobModel(
1264
- // eslint-disable-next-line new-cap
1265
- UUID.UUID(), '', '', '', '', '', '', '', '', '', '', '', '', '', '', moment$1().utcOffset(), 0, '', 0, [], [], '', '', getEmptyGeoLocation());
1615
+ return new VasJobModel('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', moment$1().utcOffset(), 0, '', 0, [], [], '', '', getEmptyGeoLocation());
1266
1616
  }
1267
- /**
1268
- * @param {VasJobDto} jobDto
1269
- * @return {VasJobModel}
1270
- */
1271
- static fromDto(jobDto) {
1272
- const model = new VasJobModel(
1273
- // eslint-disable-next-line new-cap
1274
- 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());
1617
+ static fromDto(dto) {
1618
+ 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());
1275
1619
  const emptyKeys = model.staticProperties;
1276
1620
  Object
1277
- .keys(jobDto)
1621
+ .keys(dto)
1278
1622
  .filter(key => emptyKeys.indexOf(key) === -1)
1279
- .forEach((key) => model.$this[key] = jobDto[key]);
1623
+ .forEach((key) => model.$this[key] = dto[key]);
1280
1624
  return model;
1281
1625
  }
1282
1626
  /**
@@ -1295,11 +1639,10 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
1295
1639
  return fields;
1296
1640
  }
1297
1641
  /**
1298
- * Will return an object whose keys are the names of all fields in the job but
1299
- * with the "fields." part removed. This method is similar to `getFields`
1300
- * except that this method will only return values that are set whereas
1301
- * `getFields` will return a property regardless (because it uses the form to
1302
- * drive the logic)
1642
+ * Will return an object whose keys are the names of all fields in the job.
1643
+ * This method is similar to `getFields` except that this method will only
1644
+ * return values where a value was set, as opposed to `getFields` which
1645
+ * return a property regardless (because it uses the form to drive the logic)
1303
1646
  * @return {Record<string, VasFieldDtoValue>}
1304
1647
  */
1305
1648
  getFields2() {
@@ -1309,8 +1652,7 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
1309
1652
  Object
1310
1653
  .keys(this.$this[groupName])
1311
1654
  .forEach(controlName => {
1312
- const controlNameShort = controlName.replace(/fields\./, '');
1313
- fields[controlNameShort] = this.getValueByPath([groupName, controlName]);
1655
+ fields[controlName] = this.getValueByPath([groupName, controlName]);
1314
1656
  });
1315
1657
  }, {});
1316
1658
  return fields;
@@ -1531,6 +1873,8 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
1531
1873
  modifiedBy: this.modifiedBy,
1532
1874
  serverCreated: this.serverCreated,
1533
1875
  serverModified: this.serverModified,
1876
+ createdByName: this.createdByName,
1877
+ modifiedByName: this.modifiedByName,
1534
1878
  account: this.account,
1535
1879
  accessGroup: this.accessGroup,
1536
1880
  reference: this.reference,
@@ -1662,8 +2006,8 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
1662
2006
  * VasMembershipModel
1663
2007
  */
1664
2008
  class VasMembershipModel extends VasAccountObjectModel {
1665
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, user, admin, lookupTypes, contactTypes, accessGroups, jobStatuses, jobTypes, taskTypes) {
1666
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
2009
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, user, admin, lookupTypes, contactTypes, accessGroups, jobStatuses, jobTypes, taskTypes) {
2010
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
1667
2011
  this.id = id;
1668
2012
  this.created = created;
1669
2013
  this.serverCreated = serverCreated;
@@ -1671,6 +2015,8 @@ class VasMembershipModel extends VasAccountObjectModel {
1671
2015
  this.modified = modified;
1672
2016
  this.serverModified = serverModified;
1673
2017
  this.modifiedBy = modifiedBy;
2018
+ this.createdByName = createdByName;
2019
+ this.modifiedByName = modifiedByName;
1674
2020
  this.account = account;
1675
2021
  this.user = user;
1676
2022
  this.admin = admin;
@@ -1690,7 +2036,7 @@ class VasMembershipModel extends VasAccountObjectModel {
1690
2036
  static fromDto(dto) {
1691
2037
  return new VasMembershipModel(
1692
2038
  // eslint-disable-next-line new-cap
1693
- 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 || []);
2039
+ 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 || []);
1694
2040
  }
1695
2041
  toDto() {
1696
2042
  return {
@@ -1701,6 +2047,8 @@ class VasMembershipModel extends VasAccountObjectModel {
1701
2047
  modified: this.modified,
1702
2048
  serverModified: this.serverModified,
1703
2049
  modifiedBy: this.modifiedBy,
2050
+ createdByName: this.createdByName,
2051
+ modifiedByName: this.modifiedByName,
1704
2052
  account: this.account,
1705
2053
  user: this.user,
1706
2054
  admin: this.admin,
@@ -1714,66 +2062,9 @@ class VasMembershipModel extends VasAccountObjectModel {
1714
2062
  }
1715
2063
  }
1716
2064
 
1717
- class VasReportModel extends VasJobDataModel {
1718
- constructor(id, created, createdBy, modified, modifiedBy, serverCreated, serverModified, account, job, reportLayoutId, title, sendEmail, message, attempted, completed, succeeded, attempts, notificationId) {
1719
- super(id, created, createdBy, modified, modifiedBy, serverCreated, serverModified, account, job);
1720
- this.id = id;
1721
- this.created = created;
1722
- this.createdBy = createdBy;
1723
- this.modified = modified;
1724
- this.modifiedBy = modifiedBy;
1725
- this.serverCreated = serverCreated;
1726
- this.serverModified = serverModified;
1727
- this.account = account;
1728
- this.job = job;
1729
- this.reportLayoutId = reportLayoutId;
1730
- this.title = title;
1731
- this.sendEmail = sendEmail;
1732
- this.message = message;
1733
- this.attempted = attempted;
1734
- this.completed = completed;
1735
- this.succeeded = succeeded;
1736
- this.attempts = attempts;
1737
- this.notificationId = notificationId;
1738
- }
1739
- static empty() {
1740
- return VasReportModel.fromDto({
1741
- // eslint-disable-next-line new-cap
1742
- id: UUID.UUID()
1743
- });
1744
- }
1745
- static fromDto(dto) {
1746
- return new VasReportModel(
1747
- // eslint-disable-next-line new-cap
1748
- 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 || '');
1749
- }
1750
- toDto() {
1751
- return {
1752
- id: this.id,
1753
- created: this.created,
1754
- serverCreated: this.serverCreated,
1755
- createdBy: this.createdBy,
1756
- modified: this.modified,
1757
- serverModified: this.serverModified,
1758
- modifiedBy: this.modifiedBy,
1759
- account: this.account,
1760
- job: this.job,
1761
- reportLayoutId: this.reportLayoutId,
1762
- title: this.title,
1763
- sendEmail: this.sendEmail,
1764
- message: this.message,
1765
- attempted: this.attempted,
1766
- completed: this.completed,
1767
- succeeded: this.succeeded,
1768
- attempts: this.attempts,
1769
- notificationId: this.notificationId,
1770
- };
1771
- }
1772
- }
1773
-
1774
2065
  class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
1775
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, jobType, title, description, entryPoint) {
1776
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
2066
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, jobType, title, description, entryPoint) {
2067
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
1777
2068
  this.id = id;
1778
2069
  this.created = created;
1779
2070
  this.serverCreated = serverCreated;
@@ -1781,6 +2072,8 @@ class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
1781
2072
  this.modified = modified;
1782
2073
  this.serverModified = serverModified;
1783
2074
  this.modifiedBy = modifiedBy;
2075
+ this.createdByName = createdByName;
2076
+ this.modifiedByName = modifiedByName;
1784
2077
  this.account = account;
1785
2078
  this.accessGroup = accessGroup;
1786
2079
  this.jobType = jobType;
@@ -1791,8 +2084,8 @@ class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
1791
2084
  }
1792
2085
 
1793
2086
  class VasReportRequestModel extends VasAccountObjectModel {
1794
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, error, jobId, title, url, reportId) {
1795
- super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account);
2087
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, error, jobId, title, url, reportId) {
2088
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
1796
2089
  this.id = id;
1797
2090
  this.created = created;
1798
2091
  this.serverCreated = serverCreated;
@@ -1800,6 +2093,8 @@ class VasReportRequestModel extends VasAccountObjectModel {
1800
2093
  this.modified = modified;
1801
2094
  this.serverModified = serverModified;
1802
2095
  this.modifiedBy = modifiedBy;
2096
+ this.createdByName = createdByName;
2097
+ this.modifiedByName = modifiedByName;
1803
2098
  this.account = account;
1804
2099
  this.error = error;
1805
2100
  this.jobId = jobId;
@@ -1808,7 +2103,7 @@ class VasReportRequestModel extends VasAccountObjectModel {
1808
2103
  this.reportId = reportId;
1809
2104
  }
1810
2105
  static fromDto(dto) {
1811
- 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 || '');
2106
+ 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 || '');
1812
2107
  }
1813
2108
  toDto() {
1814
2109
  return {
@@ -1819,6 +2114,8 @@ class VasReportRequestModel extends VasAccountObjectModel {
1819
2114
  modified: this.modified,
1820
2115
  serverModified: this.serverModified,
1821
2116
  modifiedBy: this.modifiedBy,
2117
+ createdByName: this.createdByName,
2118
+ modifiedByName: this.modifiedByName,
1822
2119
  account: this.account,
1823
2120
  error: this.error,
1824
2121
  jobId: this.jobId,
@@ -1833,5 +2130,5 @@ class VasReportRequestModel extends VasAccountObjectModel {
1833
2130
  * Generated bundle index. Do not edit.
1834
2131
  */
1835
2132
 
1836
- 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 };
2133
+ 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 };
1837
2134
  //# sourceMappingURL=ironcode-vas-lib.mjs.map