@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.
- package/cjs/lib/entity/vas-control.dto.d.ts +1 -0
- package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.dto.js.map +1 -1
- package/cjs/lib/entity/vas-control.model.d.ts +3 -1
- package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.model.js +11 -3
- package/cjs/lib/entity/vas-control.model.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.d.ts +1 -2
- package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-field.model.js +3 -11
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.d.ts +10 -48
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +10 -71
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.js +1 -0
- package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -1
- package/esm2020/lib/entity/vas-control.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-control.model.mjs +12 -4
- package/esm2020/lib/entity/vas-field.model.mjs +4 -12
- package/esm2020/lib/entity/vas-job.model.mjs +11 -72
- package/fesm2015/ironcode-vas-lib.mjs +24 -85
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
- package/fesm2020/ironcode-vas-lib.mjs +24 -85
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/vas-control.dto.d.ts +1 -0
- package/lib/entity/vas-control.model.d.ts +3 -1
- package/lib/entity/vas-field.model.d.ts +1 -2
- package/lib/entity/vas-job.model.d.ts +10 -48
- 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
|
|
105
|
-
* is
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
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 {
|
|
179
|
+
* @return {Array<VasFieldDto>}
|
|
218
180
|
*/
|
|
219
181
|
hydrateFields(formModel: VasFormModel, controlFieldIdMap?: Map<string, string>, controlNames?: Array<string>): void;
|
|
220
182
|
/**
|