@ironcode/vas-lib 2.1.0 → 2.3.0

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 (57) hide show
  1. package/cjs/lib/entity/index.d.ts +5 -0
  2. package/cjs/lib/entity/index.d.ts.map +1 -1
  3. package/cjs/lib/entity/index.js +5 -0
  4. package/cjs/lib/entity/index.js.map +1 -1
  5. package/cjs/lib/entity/vas-access-group.model.d.ts +27 -0
  6. package/cjs/lib/entity/vas-access-group.model.d.ts.map +1 -0
  7. package/cjs/lib/entity/vas-access-group.model.js +68 -0
  8. package/cjs/lib/entity/vas-access-group.model.js.map +1 -0
  9. package/cjs/lib/entity/vas-contact-type.model.d.ts +27 -0
  10. package/cjs/lib/entity/vas-contact-type.model.d.ts.map +1 -0
  11. package/cjs/lib/entity/vas-contact-type.model.js +68 -0
  12. package/cjs/lib/entity/vas-contact-type.model.js.map +1 -0
  13. package/cjs/lib/entity/vas-control.dto.d.ts +1 -0
  14. package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
  15. package/cjs/lib/entity/vas-control.dto.js.map +1 -1
  16. package/cjs/lib/entity/vas-control.model.d.ts +2 -1
  17. package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
  18. package/cjs/lib/entity/vas-control.model.js +7 -4
  19. package/cjs/lib/entity/vas-control.model.js.map +1 -1
  20. package/cjs/lib/entity/vas-job-status.d.ts +2 -0
  21. package/cjs/lib/entity/vas-job-status.d.ts.map +1 -1
  22. package/cjs/lib/entity/vas-job-status.js +18 -0
  23. package/cjs/lib/entity/vas-job-status.js.map +1 -1
  24. package/cjs/lib/entity/vas-job-type.model.d.ts +23 -0
  25. package/cjs/lib/entity/vas-job-type.model.d.ts.map +1 -0
  26. package/cjs/lib/entity/vas-job-type.model.js +62 -0
  27. package/cjs/lib/entity/vas-job-type.model.js.map +1 -0
  28. package/cjs/lib/entity/vas-lookup-type.model.d.ts +23 -0
  29. package/cjs/lib/entity/vas-lookup-type.model.d.ts.map +1 -0
  30. package/cjs/lib/entity/vas-lookup-type.model.js +62 -0
  31. package/cjs/lib/entity/vas-lookup-type.model.js.map +1 -0
  32. package/cjs/lib/entity/vas-membership.model.d.ts +2 -0
  33. package/cjs/lib/entity/vas-membership.model.d.ts.map +1 -1
  34. package/cjs/lib/entity/vas-membership.model.js +29 -0
  35. package/cjs/lib/entity/vas-membership.model.js.map +1 -1
  36. package/cjs/lib/entity/vas-task-type.model.d.ts +23 -0
  37. package/cjs/lib/entity/vas-task-type.model.d.ts.map +1 -0
  38. package/cjs/lib/entity/vas-task-type.model.js +62 -0
  39. package/cjs/lib/entity/vas-task-type.model.js.map +1 -0
  40. package/cjs/lib/entity/vas-user.model.d.ts +1 -0
  41. package/cjs/lib/entity/vas-user.model.d.ts.map +1 -1
  42. package/cjs/lib/entity/vas-user.model.js +8 -0
  43. package/cjs/lib/entity/vas-user.model.js.map +1 -1
  44. package/fesm2022/ironcode-vas-lib.mjs +434 -20
  45. package/fesm2022/ironcode-vas-lib.mjs.map +1 -1
  46. package/lib/entity/index.d.ts +5 -0
  47. package/lib/entity/vas-access-group.model.d.ts +26 -0
  48. package/lib/entity/vas-contact-type.model.d.ts +26 -0
  49. package/lib/entity/vas-control.dto.d.ts +1 -0
  50. package/lib/entity/vas-control.model.d.ts +2 -1
  51. package/lib/entity/vas-job-status.d.ts +2 -0
  52. package/lib/entity/vas-job-type.model.d.ts +22 -0
  53. package/lib/entity/vas-lookup-type.model.d.ts +22 -0
  54. package/lib/entity/vas-membership.model.d.ts +2 -0
  55. package/lib/entity/vas-task-type.model.d.ts +22 -0
  56. package/lib/entity/vas-user.model.d.ts +1 -0
  57. package/package.json +1 -1
@@ -720,6 +720,99 @@ class VasAccountObjectModel extends VasBaseModel {
720
720
  }
721
721
  }
722
722
 
723
+ /**
724
+ * Return an object with only the properties specified by key(s)
725
+ *
726
+ * @param obj object to be processed
727
+ * @param omitKey key or array of keys to be kept
728
+ * @param transform optional function used to transform each value
729
+ */
730
+ const only = (obj, omitKey, transform) => {
731
+ const t = transform || ((obj, key) => obj[key]);
732
+ const omitKeys = Array.isArray(omitKey) ? omitKey : [omitKey];
733
+ return Object.keys(obj).reduce((result, key) => {
734
+ if (omitKeys.includes(key)) {
735
+ result[key] = t(obj, key);
736
+ }
737
+ return result;
738
+ }, {});
739
+ };
740
+
741
+ /**
742
+ * VasAccessGroupModel
743
+ */
744
+ class VasAccessGroupModel extends VasAccountObjectModel {
745
+ id;
746
+ created;
747
+ serverCreated;
748
+ createdBy;
749
+ modified;
750
+ serverModified;
751
+ modifiedBy;
752
+ createdByName;
753
+ modifiedByName;
754
+ account;
755
+ title;
756
+ sequence;
757
+ categoryGroups;
758
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, title, sequence, categoryGroups) {
759
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
760
+ this.id = id;
761
+ this.created = created;
762
+ this.serverCreated = serverCreated;
763
+ this.createdBy = createdBy;
764
+ this.modified = modified;
765
+ this.serverModified = serverModified;
766
+ this.modifiedBy = modifiedBy;
767
+ this.createdByName = createdByName;
768
+ this.modifiedByName = modifiedByName;
769
+ this.account = account;
770
+ this.title = title;
771
+ this.sequence = sequence;
772
+ this.categoryGroups = categoryGroups;
773
+ }
774
+ static empty() {
775
+ return new VasAccessGroupModel('', '', '', '', '', '', '', '', '', '', '', 0, []);
776
+ }
777
+ toDto() {
778
+ return {
779
+ id: this.id,
780
+ created: this.created,
781
+ serverCreated: this.serverCreated,
782
+ createdBy: this.createdBy,
783
+ modified: this.modified,
784
+ serverModified: this.serverModified,
785
+ modifiedBy: this.modifiedBy,
786
+ createdByName: this.createdByName,
787
+ modifiedByName: this.modifiedByName,
788
+ account: this.account,
789
+ title: this.title,
790
+ sequence: this.sequence,
791
+ categoryGroups: this.categoryGroups,
792
+ };
793
+ }
794
+ static fromDto(dto) {
795
+ return new VasAccessGroupModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.title || '', dto.sequence || 0, dto.categoryGroups || []);
796
+ }
797
+ static toApiCreateDto(dto) {
798
+ return only(dto, [
799
+ 'id',
800
+ 'created',
801
+ 'modified',
802
+ 'title',
803
+ 'sequence',
804
+ ]);
805
+ }
806
+ static toApiUpdateDto(dto) {
807
+ return only(dto, [
808
+ 'created',
809
+ 'modified',
810
+ 'title',
811
+ 'sequence',
812
+ ]);
813
+ }
814
+ }
815
+
723
816
  var VasAccountIndexingMode;
724
817
  (function (VasAccountIndexingMode) {
725
818
  VasAccountIndexingMode[VasAccountIndexingMode["DISABLED"] = 0] = "DISABLED";
@@ -856,22 +949,79 @@ class VasBranchModel extends VasRestrictedAccountObjectModel {
856
949
  }
857
950
 
858
951
  /**
859
- * Return an object with only the properties specified by key(s)
860
- *
861
- * @param obj object to be processed
862
- * @param omitKey key or array of keys to be kept
863
- * @param transform optional function used to transform each value
952
+ * VasContactTypeModel
864
953
  */
865
- const only = (obj, omitKey, transform) => {
866
- const t = transform || ((obj, key) => obj[key]);
867
- const omitKeys = Array.isArray(omitKey) ? omitKey : [omitKey];
868
- return Object.keys(obj).reduce((result, key) => {
869
- if (omitKeys.includes(key)) {
870
- result[key] = t(obj, key);
871
- }
872
- return result;
873
- }, {});
874
- };
954
+ class VasContactTypeModel extends VasAccountObjectModel {
955
+ id;
956
+ created;
957
+ serverCreated;
958
+ createdBy;
959
+ modified;
960
+ serverModified;
961
+ modifiedBy;
962
+ createdByName;
963
+ modifiedByName;
964
+ account;
965
+ title;
966
+ sequence;
967
+ categoryGroups;
968
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, title, sequence, categoryGroups) {
969
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
970
+ this.id = id;
971
+ this.created = created;
972
+ this.serverCreated = serverCreated;
973
+ this.createdBy = createdBy;
974
+ this.modified = modified;
975
+ this.serverModified = serverModified;
976
+ this.modifiedBy = modifiedBy;
977
+ this.createdByName = createdByName;
978
+ this.modifiedByName = modifiedByName;
979
+ this.account = account;
980
+ this.title = title;
981
+ this.sequence = sequence;
982
+ this.categoryGroups = categoryGroups;
983
+ }
984
+ static empty() {
985
+ return new VasContactTypeModel('', '', '', '', '', '', '', '', '', '', '', 0, []);
986
+ }
987
+ toDto() {
988
+ return {
989
+ id: this.id,
990
+ created: this.created,
991
+ serverCreated: this.serverCreated,
992
+ createdBy: this.createdBy,
993
+ modified: this.modified,
994
+ serverModified: this.serverModified,
995
+ modifiedBy: this.modifiedBy,
996
+ createdByName: this.createdByName,
997
+ modifiedByName: this.modifiedByName,
998
+ account: this.account,
999
+ title: this.title,
1000
+ sequence: this.sequence,
1001
+ categoryGroups: this.categoryGroups,
1002
+ };
1003
+ }
1004
+ static fromDto(dto) {
1005
+ return new VasContactTypeModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.title || '', dto.sequence || 0, dto.categoryGroups || []);
1006
+ }
1007
+ static toApiCreateDto(dto) {
1008
+ return only(dto, [
1009
+ 'id',
1010
+ 'created',
1011
+ 'modified',
1012
+ 'title',
1013
+ 'sequence',
1014
+ ]);
1015
+ }
1016
+ static toApiUpdateDto(dto) {
1017
+ return only(dto, [
1018
+ 'created',
1019
+ 'modified',
1020
+ 'title',
1021
+ 'sequence',
1022
+ ]);
1023
+ }
1024
+ }
875
1025
 
876
1026
  class VasContactModel extends VasRestrictedAccountObjectModel {
877
1027
  id;
@@ -1084,8 +1234,9 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
1084
1234
  config;
1085
1235
  descriptionImage;
1086
1236
  portalEnabled;
1237
+ portalListVisible;
1087
1238
  controlTypeId = '';
1088
- constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled) {
1239
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, config, descriptionImage, portalEnabled, portalListVisible) {
1089
1240
  super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
1090
1241
  this.id = id;
1091
1242
  this.created = created;
@@ -1110,6 +1261,7 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
1110
1261
  this.config = config;
1111
1262
  this.descriptionImage = descriptionImage;
1112
1263
  this.portalEnabled = portalEnabled;
1264
+ this.portalListVisible = portalListVisible;
1113
1265
  if (typeof controlType === 'string') {
1114
1266
  this.controlTypeId = controlType;
1115
1267
  }
@@ -1185,7 +1337,7 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
1185
1337
  // eslint-disable-next-line new-cap
1186
1338
  dto.id || '', 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 || '', typeof dto.config === 'string' ?
1187
1339
  JSON.parse(dto.config || '{}') :
1188
- dto.config, dto.descriptionImage || '', dto.portalEnabled || false);
1340
+ dto.config, dto.descriptionImage || '', dto.portalEnabled || false, dto.portalListVisible || false);
1189
1341
  }
1190
1342
  /**
1191
1343
  * @param {any} value the value to be parsed
@@ -1229,7 +1381,8 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
1229
1381
  defaultValue: this.defaultValue,
1230
1382
  config: JSON.stringify(this.config),
1231
1383
  descriptionImage: this.descriptionImage,
1232
- portalEnabled: this.portalEnabled
1384
+ portalEnabled: this.portalEnabled,
1385
+ portalListVisible: this.portalListVisible
1233
1386
  };
1234
1387
  }
1235
1388
  toApiDto(options) {
@@ -1245,7 +1398,8 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
1245
1398
  controlType: this.controlType.id,
1246
1399
  group: this.group,
1247
1400
  validators: this.validators,
1248
- linkable: this.linkable
1401
+ linkable: this.linkable,
1402
+ portalListVisible: this.portalListVisible
1249
1403
  };
1250
1404
  }
1251
1405
  static toApiPatchDto(item) {
@@ -1263,6 +1417,7 @@ class VasControlModel extends VasRestrictedAccountObjectModel {
1263
1417
  'group',
1264
1418
  'validators',
1265
1419
  'linkable',
1420
+ 'portalListVisible'
1266
1421
  ]);
1267
1422
  }
1268
1423
  }
@@ -1642,6 +1797,13 @@ class VasUserModel extends VasBaseModel {
1642
1797
  instructionProviders: this.instructionProviders
1643
1798
  };
1644
1799
  }
1800
+ static toApiPatchDto(dto) {
1801
+ return only(dto, [
1802
+ 'created',
1803
+ 'modified',
1804
+ 'name',
1805
+ ]);
1806
+ }
1645
1807
  }
1646
1808
 
1647
1809
  class VasFireUserModel extends VasUserModel {
@@ -2999,6 +3161,92 @@ class VasJobStatusModel extends VasAccountObjectModel {
2999
3161
  closed: this.closed,
3000
3162
  };
3001
3163
  }
3164
+ static toApiCreateDto(dto) {
3165
+ return only(dto, [
3166
+ 'id',
3167
+ 'created',
3168
+ 'modified',
3169
+ 'title',
3170
+ 'sequence',
3171
+ ]);
3172
+ }
3173
+ static toApiUpdateDto(dto) {
3174
+ return only(dto, [
3175
+ 'created',
3176
+ 'modified',
3177
+ 'title',
3178
+ 'sequence',
3179
+ ]);
3180
+ }
3181
+ }
3182
+
3183
+ class VasJobTypeModel extends VasAccountObjectModel {
3184
+ id;
3185
+ created;
3186
+ serverCreated;
3187
+ createdBy;
3188
+ modified;
3189
+ serverModified;
3190
+ modifiedBy;
3191
+ createdByName;
3192
+ modifiedByName;
3193
+ account;
3194
+ title;
3195
+ sequence;
3196
+ categoryGroups;
3197
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, title, sequence, categoryGroups) {
3198
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
3199
+ this.id = id;
3200
+ this.created = created;
3201
+ this.serverCreated = serverCreated;
3202
+ this.createdBy = createdBy;
3203
+ this.modified = modified;
3204
+ this.serverModified = serverModified;
3205
+ this.modifiedBy = modifiedBy;
3206
+ this.createdByName = createdByName;
3207
+ this.modifiedByName = modifiedByName;
3208
+ this.account = account;
3209
+ this.title = title;
3210
+ this.sequence = sequence;
3211
+ this.categoryGroups = categoryGroups;
3212
+ }
3213
+ static fromDto(dto) {
3214
+ return new VasJobTypeModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.title || '', dto.sequence || 0, dto.categoryGroups || []);
3215
+ }
3216
+ toDto() {
3217
+ return {
3218
+ id: this.id,
3219
+ created: this.created,
3220
+ serverCreated: this.serverCreated,
3221
+ createdBy: this.createdBy,
3222
+ modified: this.modified,
3223
+ serverModified: this.serverModified,
3224
+ modifiedBy: this.modifiedBy,
3225
+ createdByName: this.createdByName,
3226
+ modifiedByName: this.modifiedByName,
3227
+ account: this.account,
3228
+ title: this.title,
3229
+ sequence: this.sequence,
3230
+ categoryGroups: this.categoryGroups,
3231
+ };
3232
+ }
3233
+ static toApiCreateDto(dto) {
3234
+ return only(dto, [
3235
+ 'id',
3236
+ 'created',
3237
+ 'modified',
3238
+ 'title',
3239
+ 'sequence',
3240
+ ]);
3241
+ }
3242
+ static toApiUpdateDto(dto) {
3243
+ return only(dto, [
3244
+ 'created',
3245
+ 'modified',
3246
+ 'title',
3247
+ 'sequence',
3248
+ ]);
3249
+ }
3002
3250
  }
3003
3251
 
3004
3252
  /**
@@ -3631,6 +3879,75 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
3631
3879
  }
3632
3880
  }
3633
3881
 
3882
+ class VasLookupTypeModel extends VasAccountObjectModel {
3883
+ id;
3884
+ created;
3885
+ serverCreated;
3886
+ createdBy;
3887
+ modified;
3888
+ serverModified;
3889
+ modifiedBy;
3890
+ createdByName;
3891
+ modifiedByName;
3892
+ account;
3893
+ title;
3894
+ sequence;
3895
+ categoryGroups;
3896
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, title, sequence, categoryGroups) {
3897
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
3898
+ this.id = id;
3899
+ this.created = created;
3900
+ this.serverCreated = serverCreated;
3901
+ this.createdBy = createdBy;
3902
+ this.modified = modified;
3903
+ this.serverModified = serverModified;
3904
+ this.modifiedBy = modifiedBy;
3905
+ this.createdByName = createdByName;
3906
+ this.modifiedByName = modifiedByName;
3907
+ this.account = account;
3908
+ this.title = title;
3909
+ this.sequence = sequence;
3910
+ this.categoryGroups = categoryGroups;
3911
+ }
3912
+ static fromDto(dto) {
3913
+ return new VasLookupTypeModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.title || '', dto.sequence || 0, dto.categoryGroups || []);
3914
+ }
3915
+ toDto() {
3916
+ return {
3917
+ id: this.id,
3918
+ created: this.created,
3919
+ serverCreated: this.serverCreated,
3920
+ createdBy: this.createdBy,
3921
+ modified: this.modified,
3922
+ serverModified: this.serverModified,
3923
+ modifiedBy: this.modifiedBy,
3924
+ createdByName: this.createdByName,
3925
+ modifiedByName: this.modifiedByName,
3926
+ account: this.account,
3927
+ title: this.title,
3928
+ sequence: this.sequence,
3929
+ categoryGroups: this.categoryGroups,
3930
+ };
3931
+ }
3932
+ static toApiCreateDto(dto) {
3933
+ return only(dto, [
3934
+ 'id',
3935
+ 'created',
3936
+ 'modified',
3937
+ 'title',
3938
+ 'sequence',
3939
+ ]);
3940
+ }
3941
+ static toApiUpdateDto(dto) {
3942
+ return only(dto, [
3943
+ 'created',
3944
+ 'modified',
3945
+ 'title',
3946
+ 'sequence',
3947
+ ]);
3948
+ }
3949
+ }
3950
+
3634
3951
  /**
3635
3952
  * VasLookupModel
3636
3953
  */
@@ -3795,6 +4112,34 @@ class VasMembershipModel extends VasAccountObjectModel {
3795
4112
  taskTypes: this.taskTypes
3796
4113
  };
3797
4114
  }
4115
+ static toApiCreateDto(dto) {
4116
+ return only(dto, [
4117
+ 'id',
4118
+ 'created',
4119
+ 'modified',
4120
+ 'user',
4121
+ 'admin',
4122
+ 'lookupTypes',
4123
+ 'contactTypes',
4124
+ 'accessGroups',
4125
+ 'jobStatuses',
4126
+ 'jobTypes',
4127
+ 'taskTypes',
4128
+ ]);
4129
+ }
4130
+ static toApiUpdateDto(dto) {
4131
+ return only(dto, [
4132
+ 'created',
4133
+ 'modified',
4134
+ 'admin',
4135
+ 'lookupTypes',
4136
+ 'contactTypes',
4137
+ 'accessGroups',
4138
+ 'jobStatuses',
4139
+ 'jobTypes',
4140
+ 'taskTypes',
4141
+ ]);
4142
+ }
3798
4143
  }
3799
4144
 
3800
4145
  class VasReportLayoutModel extends VasRestrictedAccountObjectModel {
@@ -3891,6 +4236,75 @@ class VasReportRequestModel extends VasAccountObjectModel {
3891
4236
  }
3892
4237
  }
3893
4238
 
4239
+ class VasTaskTypeModel extends VasAccountObjectModel {
4240
+ id;
4241
+ created;
4242
+ serverCreated;
4243
+ createdBy;
4244
+ modified;
4245
+ serverModified;
4246
+ modifiedBy;
4247
+ createdByName;
4248
+ modifiedByName;
4249
+ account;
4250
+ title;
4251
+ sequence;
4252
+ categoryGroups;
4253
+ constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, title, sequence, categoryGroups) {
4254
+ super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
4255
+ this.id = id;
4256
+ this.created = created;
4257
+ this.serverCreated = serverCreated;
4258
+ this.createdBy = createdBy;
4259
+ this.modified = modified;
4260
+ this.serverModified = serverModified;
4261
+ this.modifiedBy = modifiedBy;
4262
+ this.createdByName = createdByName;
4263
+ this.modifiedByName = modifiedByName;
4264
+ this.account = account;
4265
+ this.title = title;
4266
+ this.sequence = sequence;
4267
+ this.categoryGroups = categoryGroups;
4268
+ }
4269
+ static fromDto(dto) {
4270
+ return new VasTaskTypeModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.title || '', dto.sequence || 0, dto.categoryGroups || []);
4271
+ }
4272
+ toDto() {
4273
+ return {
4274
+ id: this.id,
4275
+ created: this.created,
4276
+ serverCreated: this.serverCreated,
4277
+ createdBy: this.createdBy,
4278
+ modified: this.modified,
4279
+ serverModified: this.serverModified,
4280
+ modifiedBy: this.modifiedBy,
4281
+ createdByName: this.createdByName,
4282
+ modifiedByName: this.modifiedByName,
4283
+ account: this.account,
4284
+ title: this.title,
4285
+ sequence: this.sequence,
4286
+ categoryGroups: this.categoryGroups,
4287
+ };
4288
+ }
4289
+ static toApiCreateDto(dto) {
4290
+ return only(dto, [
4291
+ 'id',
4292
+ 'created',
4293
+ 'modified',
4294
+ 'title',
4295
+ 'sequence',
4296
+ ]);
4297
+ }
4298
+ static toApiUpdateDto(dto) {
4299
+ return only(dto, [
4300
+ 'created',
4301
+ 'modified',
4302
+ 'title',
4303
+ 'sequence',
4304
+ ]);
4305
+ }
4306
+ }
4307
+
3894
4308
  /**
3895
4309
  * VasTaskModel
3896
4310
  */
@@ -4072,5 +4486,5 @@ class VasVehicleModel extends VasAccountObjectModel {
4072
4486
  * Generated bundle index. Do not edit.
4073
4487
  */
4074
4488
 
4075
- export { VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormConfigModel, VasFormModel, VasGroupModel, VasInstructionJobFieldModel, VasInstructionJobModel, VasInstructionModel, VasInstructionProviderModel, VasInvitationModel, VasInvitationTypeEnum, VasJobActionControlsStepModel, VasJobActionEmailFormStepModel, VasJobActionInstructionStepModel, VasJobActionModel, VasJobActionNotePromptStepModel, VasJobActionSetDatetimeStepModel, VasJobActionSetJobStatusStepModel, VasJobActionSetValueStepModel, VasJobActionWebhookStepModel, VasJobCopyModel, VasJobDataModel, VasJobEmailModel, VasJobModel, VasJobStatusModel, VasLookupModel, VasMembershipModel, VasNoteModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasTaskModel, VasUserModel, VasVehicleModel, getEmptyGeoLocation, isCameraControlValueV1, isFileDto, isJobAutomationStep, isJobControlsStep, isJobEmailFormStep, isJobInstructionStep, isJobNotePromptStep, isJobSetDatetimeStep, isJobSetJobStatusStep, isJobSetValueStep, isJobWebhookStep, prepareFieldApiValue, stepModelFactory };
4489
+ export { VasAccessGroupModel, VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasContactTypeModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormConfigModel, VasFormModel, VasGroupModel, VasInstructionJobFieldModel, VasInstructionJobModel, VasInstructionModel, VasInstructionProviderModel, VasInvitationModel, VasInvitationTypeEnum, VasJobActionControlsStepModel, VasJobActionEmailFormStepModel, VasJobActionInstructionStepModel, VasJobActionModel, VasJobActionNotePromptStepModel, VasJobActionSetDatetimeStepModel, VasJobActionSetJobStatusStepModel, VasJobActionSetValueStepModel, VasJobActionWebhookStepModel, VasJobCopyModel, VasJobDataModel, VasJobEmailModel, VasJobModel, VasJobStatusModel, VasJobTypeModel, VasLookupModel, VasLookupTypeModel, VasMembershipModel, VasNoteModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasTaskModel, VasTaskTypeModel, VasUserModel, VasVehicleModel, getEmptyGeoLocation, isCameraControlValueV1, isFileDto, isJobAutomationStep, isJobControlsStep, isJobEmailFormStep, isJobInstructionStep, isJobNotePromptStep, isJobSetDatetimeStep, isJobSetJobStatusStep, isJobSetValueStep, isJobWebhookStep, prepareFieldApiValue, stepModelFactory };
4076
4490
  //# sourceMappingURL=ironcode-vas-lib.mjs.map