@ironcode/vas-lib 0.0.18 → 0.0.20

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 (31) hide show
  1. package/cjs/lib/entity/vas-control.dto.d.ts +1 -0
  2. package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
  3. package/cjs/lib/entity/vas-control.dto.js.map +1 -1
  4. package/cjs/lib/entity/vas-control.model.d.ts +3 -1
  5. package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
  6. package/cjs/lib/entity/vas-control.model.js +11 -3
  7. package/cjs/lib/entity/vas-control.model.js.map +1 -1
  8. package/cjs/lib/entity/vas-field.model.d.ts +1 -2
  9. package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
  10. package/cjs/lib/entity/vas-field.model.js +3 -11
  11. package/cjs/lib/entity/vas-field.model.js.map +1 -1
  12. package/cjs/lib/entity/vas-job.model.d.ts +10 -48
  13. package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
  14. package/cjs/lib/entity/vas-job.model.js +10 -71
  15. package/cjs/lib/entity/vas-job.model.js.map +1 -1
  16. package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -1
  17. package/cjs/lib/entity/vas-job.model.spec-data.js +1 -0
  18. package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -1
  19. package/esm2020/lib/entity/vas-control.dto.mjs +1 -1
  20. package/esm2020/lib/entity/vas-control.model.mjs +12 -4
  21. package/esm2020/lib/entity/vas-field.model.mjs +4 -12
  22. package/esm2020/lib/entity/vas-job.model.mjs +11 -72
  23. package/fesm2015/ironcode-vas-lib.mjs +24 -85
  24. package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
  25. package/fesm2020/ironcode-vas-lib.mjs +24 -85
  26. package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
  27. package/lib/entity/vas-control.dto.d.ts +1 -0
  28. package/lib/entity/vas-control.model.d.ts +3 -1
  29. package/lib/entity/vas-field.model.d.ts +1 -2
  30. package/lib/entity/vas-job.model.d.ts +10 -48
  31. package/package.json +1 -1
@@ -101,53 +101,15 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
101
101
  /**
102
102
  * This method will hydrate the `fields` property of the model. The reason for
103
103
  * this is that we have different ways to store the field data. One way, is
104
- * we store them as dynamic properties of the job e.g. job.foo.bar, the other
105
- * is in an array of Field. The former is nice to work with in clients,
106
- * whereas the latter more suited to relational database.
107
- *
108
- * A) job with dynamic properties, e.g.
109
- * {
110
- * id: <guid>,
111
- * reference: "something"
112
- * <other static job properties>...
113
- * foo: {
114
- * bar: "value"
115
- * }
116
- * }
117
- *
118
- * B) job with array of Field
119
- * {
120
- * id: <guid>,
121
- * reference: "something"
122
- * <other static job properties>...
123
- * <will not have dynamic properties>...
124
- * fields: [
125
- * {
126
- * id: <guid>,
127
- * <other field properties>,
128
- * value: "value"
129
- * }
130
- * ]
131
- * }
132
- *
133
- * What this method does is given a VasJobModel that has been populated with
134
- * a VasJobDto in form B (i.e. `.fields` are populated - usually from a VASAPI
135
- * response), hydrate the dynamic properties of the model. NOTE: knowledge of
136
- * the Form that was used to crate the Job is required because it will contain
137
- * the Groups, which names are used in the hydrating
138
- *
139
- * @param {VasFormModel} formModel the VasFormModel that was used to create
140
- * the job
141
- * @return {void}
142
- */
143
- hydrateDynamicProps(formModel: VasFormModel): void;
144
- /**
145
- * This method will hydrate the `fields` property of the model. The reason for
146
- * this is that we have different ways to store the field data. One way, is
147
- * we store them as dynamic properties of the job e.g. job.foo.bar, the other
148
- * is in an array of Field. The former is nice to work with in clients,
149
- * whereas the latter more suited to relational database.
150
- *
104
+ * we store them as dynamic properties of the job. For example job.foo.bar,
105
+ * where `foo` is the name of a Group, and `bar` is the name of a control.
106
+ * Thus, when we create a job using a form in the client, the job object will
107
+ * have its static properties (id, account, reference etc), and also a number
108
+ * of dynamic properties determined by the Groups and Controls. This kind of
109
+ * object is nice to work with in certain circumstances. However, the api
110
+ * works differently. In the API a Job is a record, and references a number of
111
+ * Field records. Each Field stores the value. Comparing these two models we
112
+ * have:
151
113
  * A) job with dynamic properties, e.g.
152
114
  * {
153
115
  * id: <guid>,
@@ -214,7 +176,7 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
214
176
  * be generated, or to reuse an existing one from the map.
215
177
  * @param {Array<string>} controlNames if a value is provided, it will be used
216
178
  * to filter the fields that are returned.
217
- * @return {void}
179
+ * @return {Array<VasFieldDto>}
218
180
  */
219
181
  hydrateFields(formModel: VasFormModel, controlFieldIdMap?: Map<string, string>, controlNames?: Array<string>): void;
220
182
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironcode/vas-lib",
3
- "version": "0.0.18",
3
+ "version": "0.0.20+rc1",
4
4
  "peerDependencies": {
5
5
  "angular2-uuid": "^1.1.1",
6
6
  "moment": "^2.0.0"