@salesforce/lds-adapters-industries-assessment 1.124.2 → 1.124.4

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 (33) hide show
  1. package/dist/es/es2018/industries-assessment.js +1641 -1641
  2. package/dist/{types → es/es2018/types}/src/generated/adapters/adapter-utils.d.ts +66 -66
  3. package/dist/{types → es/es2018/types}/src/generated/adapters/getAssessmentEnvelope.d.ts +26 -26
  4. package/dist/{types → es/es2018/types}/src/generated/adapters/postAssessmentContextSearch.d.ts +16 -16
  5. package/dist/{types → es/es2018/types}/src/generated/adapters/postAssessmentEnvelope.d.ts +15 -15
  6. package/dist/{types → es/es2018/types}/src/generated/artifacts/main.d.ts +3 -3
  7. package/dist/{types → es/es2018/types}/src/generated/artifacts/sfdc.d.ts +5 -5
  8. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectAssessmentsAssessmentenvelopes.d.ts +15 -15
  9. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectAssessmentsAssessmentElementsByContextId.d.ts +16 -16
  10. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectAssessmentsAssessmentenvelopes.d.ts +13 -13
  11. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentContextSearchInputRepresentation.d.ts +41 -41
  12. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentContextSearchResultRepresentation.d.ts +52 -52
  13. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentContextSearchWrapperInputRepresentation.d.ts +30 -30
  14. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeGetResultRepresentation.d.ts +36 -36
  15. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeInputRepresentation.d.ts +47 -47
  16. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeItemsListOutputRepresentation.d.ts +35 -35
  17. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeItemsListRepresentation.d.ts +29 -29
  18. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeItemsRepresentation.d.ts +35 -35
  19. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeOutputRepresentation.d.ts +39 -39
  20. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeRepresentation.d.ts +33 -33
  21. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeResultRepresentation.d.ts +45 -45
  22. package/dist/{types → es/es2018/types}/src/generated/types/AssessmentEnvelopeWrapperInputRepresentation.d.ts +29 -29
  23. package/dist/{types → es/es2018/types}/src/generated/types/DerivedFiltersInputRepresentation.d.ts +32 -32
  24. package/dist/{types → es/es2018/types}/src/generated/types/FilterCriteriaRepresentation.d.ts +35 -35
  25. package/dist/{types → es/es2018/types}/src/generated/types/RecordOffsetRepresentation.d.ts +32 -32
  26. package/dist/{types → es/es2018/types}/src/generated/types/RecordsRepresentation.d.ts +41 -41
  27. package/dist/{types → es/es2018/types}/src/generated/types/SortOptionRepresentation.d.ts +32 -32
  28. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  29. package/package.json +5 -5
  30. package/sfdc/index.d.ts +1 -1
  31. package/sfdc/index.js +1671 -1671
  32. package/dist/umd/es2018/industries-assessment.js +0 -1698
  33. package/dist/umd/es5/industries-assessment.js +0 -1709
@@ -6,1683 +6,1683 @@
6
6
 
7
7
  import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
8
8
 
9
- const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
- const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
11
- const { isArray: ArrayIsArray$1 } = Array;
12
- /**
13
- * Validates an adapter config is well-formed.
14
- * @param config The config to validate.
15
- * @param adapter The adapter validation configuration.
16
- * @param oneOf The keys the config must contain at least one of.
17
- * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
- */
19
- function validateConfig(config, adapter, oneOf) {
20
- const { displayName } = adapter;
21
- const { required, optional, unsupported } = adapter.parameters;
22
- if (config === undefined ||
23
- required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
- throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
- }
26
- if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
- throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
- }
29
- if (unsupported !== undefined &&
30
- unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
- throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
- }
33
- const supported = required.concat(optional);
34
- if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
35
- throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
- }
37
- }
38
- function untrustedIsObject(untrusted) {
39
- return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
- }
41
- function areRequiredParametersPresent(config, configPropertyNames) {
42
- return configPropertyNames.parameters.required.every(req => req in config);
43
- }
44
- const snapshotRefreshOptions = {
45
- overrides: {
46
- headers: {
47
- 'Cache-Control': 'no-cache',
48
- },
49
- }
50
- };
9
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
+ const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
11
+ const { isArray: ArrayIsArray$1 } = Array;
12
+ /**
13
+ * Validates an adapter config is well-formed.
14
+ * @param config The config to validate.
15
+ * @param adapter The adapter validation configuration.
16
+ * @param oneOf The keys the config must contain at least one of.
17
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
+ */
19
+ function validateConfig(config, adapter, oneOf) {
20
+ const { displayName } = adapter;
21
+ const { required, optional, unsupported } = adapter.parameters;
22
+ if (config === undefined ||
23
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
+ }
26
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
+ }
29
+ if (unsupported !== undefined &&
30
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
+ }
33
+ const supported = required.concat(optional);
34
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
35
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
+ }
37
+ }
38
+ function untrustedIsObject(untrusted) {
39
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
+ }
41
+ function areRequiredParametersPresent(config, configPropertyNames) {
42
+ return configPropertyNames.parameters.required.every(req => req in config);
43
+ }
44
+ const snapshotRefreshOptions = {
45
+ overrides: {
46
+ headers: {
47
+ 'Cache-Control': 'no-cache',
48
+ },
49
+ }
50
+ };
51
51
  const keyPrefix = 'assessment';
52
52
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
- const { isArray: ArrayIsArray } = Array;
55
- const { stringify: JSONStringify } = JSON;
56
- function equalsArray(a, b, equalsItem) {
57
- const aLength = a.length;
58
- const bLength = b.length;
59
- if (aLength !== bLength) {
60
- return false;
61
- }
62
- for (let i = 0; i < aLength; i++) {
63
- if (equalsItem(a[i], b[i]) === false) {
64
- return false;
65
- }
66
- }
67
- return true;
68
- }
69
- function deepFreeze$3(value) {
70
- // No need to freeze primitives
71
- if (typeof value !== 'object' || value === null) {
72
- return;
73
- }
74
- if (ArrayIsArray(value)) {
75
- for (let i = 0, len = value.length; i < len; i += 1) {
76
- deepFreeze$3(value[i]);
77
- }
78
- }
79
- else {
80
- const keys = ObjectKeys(value);
81
- for (let i = 0, len = keys.length; i < len; i += 1) {
82
- deepFreeze$3(value[keys[i]]);
83
- }
84
- }
85
- ObjectFreeze(value);
86
- }
87
- function createLink(ref) {
88
- return {
89
- __ref: serializeStructuredKey(ref),
90
- };
53
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
+ const { isArray: ArrayIsArray } = Array;
55
+ const { stringify: JSONStringify } = JSON;
56
+ function equalsArray(a, b, equalsItem) {
57
+ const aLength = a.length;
58
+ const bLength = b.length;
59
+ if (aLength !== bLength) {
60
+ return false;
61
+ }
62
+ for (let i = 0; i < aLength; i++) {
63
+ if (equalsItem(a[i], b[i]) === false) {
64
+ return false;
65
+ }
66
+ }
67
+ return true;
68
+ }
69
+ function deepFreeze$3(value) {
70
+ // No need to freeze primitives
71
+ if (typeof value !== 'object' || value === null) {
72
+ return;
73
+ }
74
+ if (ArrayIsArray(value)) {
75
+ for (let i = 0, len = value.length; i < len; i += 1) {
76
+ deepFreeze$3(value[i]);
77
+ }
78
+ }
79
+ else {
80
+ const keys = ObjectKeys(value);
81
+ for (let i = 0, len = keys.length; i < len; i += 1) {
82
+ deepFreeze$3(value[keys[i]]);
83
+ }
84
+ }
85
+ ObjectFreeze(value);
86
+ }
87
+ function createLink(ref) {
88
+ return {
89
+ __ref: serializeStructuredKey(ref),
90
+ };
91
91
  }
92
92
 
93
- function validate$a(obj, path = 'AssessmentEnvelopeInputRepresentation') {
94
- const v_error = (() => {
95
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
96
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
97
- }
98
- if (obj.account !== undefined) {
99
- const obj_account = obj.account;
100
- const path_account = path + '.account';
101
- let obj_account_union0 = null;
102
- const obj_account_union0_error = (() => {
103
- if (typeof obj_account !== 'string') {
104
- return new TypeError('Expected "string" but received "' + typeof obj_account + '" (at "' + path_account + '")');
105
- }
106
- })();
107
- if (obj_account_union0_error != null) {
108
- obj_account_union0 = obj_account_union0_error.message;
109
- }
110
- let obj_account_union1 = null;
111
- const obj_account_union1_error = (() => {
112
- if (obj_account !== null) {
113
- return new TypeError('Expected "null" but received "' + typeof obj_account + '" (at "' + path_account + '")');
114
- }
115
- })();
116
- if (obj_account_union1_error != null) {
117
- obj_account_union1 = obj_account_union1_error.message;
118
- }
119
- if (obj_account_union0 && obj_account_union1) {
120
- let message = 'Object doesn\'t match union (at "' + path_account + '")';
121
- message += '\n' + obj_account_union0.split('\n').map((line) => '\t' + line).join('\n');
122
- message += '\n' + obj_account_union1.split('\n').map((line) => '\t' + line).join('\n');
123
- return new TypeError(message);
124
- }
125
- }
126
- const obj_assessmentEnvelopeItems = obj.assessmentEnvelopeItems;
127
- const path_assessmentEnvelopeItems = path + '.assessmentEnvelopeItems';
128
- if (!ArrayIsArray(obj_assessmentEnvelopeItems)) {
129
- return new TypeError('Expected "array" but received "' + typeof obj_assessmentEnvelopeItems + '" (at "' + path_assessmentEnvelopeItems + '")');
130
- }
131
- for (let i = 0; i < obj_assessmentEnvelopeItems.length; i++) {
132
- const obj_assessmentEnvelopeItems_item = obj_assessmentEnvelopeItems[i];
133
- const path_assessmentEnvelopeItems_item = path_assessmentEnvelopeItems + '[' + i + ']';
134
- if (typeof obj_assessmentEnvelopeItems_item !== 'object' || ArrayIsArray(obj_assessmentEnvelopeItems_item) || obj_assessmentEnvelopeItems_item === null) {
135
- return new TypeError('Expected "object" but received "' + typeof obj_assessmentEnvelopeItems_item + '" (at "' + path_assessmentEnvelopeItems_item + '")');
136
- }
137
- }
138
- if (obj.contact !== undefined) {
139
- const obj_contact = obj.contact;
140
- const path_contact = path + '.contact';
141
- let obj_contact_union0 = null;
142
- const obj_contact_union0_error = (() => {
143
- if (typeof obj_contact !== 'string') {
144
- return new TypeError('Expected "string" but received "' + typeof obj_contact + '" (at "' + path_contact + '")');
145
- }
146
- })();
147
- if (obj_contact_union0_error != null) {
148
- obj_contact_union0 = obj_contact_union0_error.message;
149
- }
150
- let obj_contact_union1 = null;
151
- const obj_contact_union1_error = (() => {
152
- if (obj_contact !== null) {
153
- return new TypeError('Expected "null" but received "' + typeof obj_contact + '" (at "' + path_contact + '")');
154
- }
155
- })();
156
- if (obj_contact_union1_error != null) {
157
- obj_contact_union1 = obj_contact_union1_error.message;
158
- }
159
- if (obj_contact_union0 && obj_contact_union1) {
160
- let message = 'Object doesn\'t match union (at "' + path_contact + '")';
161
- message += '\n' + obj_contact_union0.split('\n').map((line) => '\t' + line).join('\n');
162
- message += '\n' + obj_contact_union1.split('\n').map((line) => '\t' + line).join('\n');
163
- return new TypeError(message);
164
- }
165
- }
166
- const obj_expirationDateTime = obj.expirationDateTime;
167
- const path_expirationDateTime = path + '.expirationDateTime';
168
- let obj_expirationDateTime_union0 = null;
169
- const obj_expirationDateTime_union0_error = (() => {
170
- if (typeof obj_expirationDateTime !== 'string') {
171
- return new TypeError('Expected "string" but received "' + typeof obj_expirationDateTime + '" (at "' + path_expirationDateTime + '")');
172
- }
173
- })();
174
- if (obj_expirationDateTime_union0_error != null) {
175
- obj_expirationDateTime_union0 = obj_expirationDateTime_union0_error.message;
176
- }
177
- let obj_expirationDateTime_union1 = null;
178
- const obj_expirationDateTime_union1_error = (() => {
179
- if (obj_expirationDateTime !== null) {
180
- return new TypeError('Expected "null" but received "' + typeof obj_expirationDateTime + '" (at "' + path_expirationDateTime + '")');
181
- }
182
- })();
183
- if (obj_expirationDateTime_union1_error != null) {
184
- obj_expirationDateTime_union1 = obj_expirationDateTime_union1_error.message;
185
- }
186
- if (obj_expirationDateTime_union0 && obj_expirationDateTime_union1) {
187
- let message = 'Object doesn\'t match union (at "' + path_expirationDateTime + '")';
188
- message += '\n' + obj_expirationDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
189
- message += '\n' + obj_expirationDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
190
- return new TypeError(message);
191
- }
192
- const obj_name = obj.name;
193
- const path_name = path + '.name';
194
- let obj_name_union0 = null;
195
- const obj_name_union0_error = (() => {
196
- if (typeof obj_name !== 'string') {
197
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
198
- }
199
- })();
200
- if (obj_name_union0_error != null) {
201
- obj_name_union0 = obj_name_union0_error.message;
202
- }
203
- let obj_name_union1 = null;
204
- const obj_name_union1_error = (() => {
205
- if (obj_name !== null) {
206
- return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
207
- }
208
- })();
209
- if (obj_name_union1_error != null) {
210
- obj_name_union1 = obj_name_union1_error.message;
211
- }
212
- if (obj_name_union0 && obj_name_union1) {
213
- let message = 'Object doesn\'t match union (at "' + path_name + '")';
214
- message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
215
- message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
216
- return new TypeError(message);
217
- }
218
- if (obj.requestReference !== undefined) {
219
- const obj_requestReference = obj.requestReference;
220
- const path_requestReference = path + '.requestReference';
221
- let obj_requestReference_union0 = null;
222
- const obj_requestReference_union0_error = (() => {
223
- if (typeof obj_requestReference !== 'string') {
224
- return new TypeError('Expected "string" but received "' + typeof obj_requestReference + '" (at "' + path_requestReference + '")');
225
- }
226
- })();
227
- if (obj_requestReference_union0_error != null) {
228
- obj_requestReference_union0 = obj_requestReference_union0_error.message;
229
- }
230
- let obj_requestReference_union1 = null;
231
- const obj_requestReference_union1_error = (() => {
232
- if (obj_requestReference !== null) {
233
- return new TypeError('Expected "null" but received "' + typeof obj_requestReference + '" (at "' + path_requestReference + '")');
234
- }
235
- })();
236
- if (obj_requestReference_union1_error != null) {
237
- obj_requestReference_union1 = obj_requestReference_union1_error.message;
238
- }
239
- if (obj_requestReference_union0 && obj_requestReference_union1) {
240
- let message = 'Object doesn\'t match union (at "' + path_requestReference + '")';
241
- message += '\n' + obj_requestReference_union0.split('\n').map((line) => '\t' + line).join('\n');
242
- message += '\n' + obj_requestReference_union1.split('\n').map((line) => '\t' + line).join('\n');
243
- return new TypeError(message);
244
- }
245
- }
246
- const obj_status = obj.status;
247
- const path_status = path + '.status';
248
- let obj_status_union0 = null;
249
- const obj_status_union0_error = (() => {
250
- if (typeof obj_status !== 'string') {
251
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
252
- }
253
- })();
254
- if (obj_status_union0_error != null) {
255
- obj_status_union0 = obj_status_union0_error.message;
256
- }
257
- let obj_status_union1 = null;
258
- const obj_status_union1_error = (() => {
259
- if (obj_status !== null) {
260
- return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
261
- }
262
- })();
263
- if (obj_status_union1_error != null) {
264
- obj_status_union1 = obj_status_union1_error.message;
265
- }
266
- if (obj_status_union0 && obj_status_union1) {
267
- let message = 'Object doesn\'t match union (at "' + path_status + '")';
268
- message += '\n' + obj_status_union0.split('\n').map((line) => '\t' + line).join('\n');
269
- message += '\n' + obj_status_union1.split('\n').map((line) => '\t' + line).join('\n');
270
- return new TypeError(message);
271
- }
272
- })();
273
- return v_error === undefined ? null : v_error;
93
+ function validate$a(obj, path = 'AssessmentEnvelopeInputRepresentation') {
94
+ const v_error = (() => {
95
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
96
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
97
+ }
98
+ if (obj.account !== undefined) {
99
+ const obj_account = obj.account;
100
+ const path_account = path + '.account';
101
+ let obj_account_union0 = null;
102
+ const obj_account_union0_error = (() => {
103
+ if (typeof obj_account !== 'string') {
104
+ return new TypeError('Expected "string" but received "' + typeof obj_account + '" (at "' + path_account + '")');
105
+ }
106
+ })();
107
+ if (obj_account_union0_error != null) {
108
+ obj_account_union0 = obj_account_union0_error.message;
109
+ }
110
+ let obj_account_union1 = null;
111
+ const obj_account_union1_error = (() => {
112
+ if (obj_account !== null) {
113
+ return new TypeError('Expected "null" but received "' + typeof obj_account + '" (at "' + path_account + '")');
114
+ }
115
+ })();
116
+ if (obj_account_union1_error != null) {
117
+ obj_account_union1 = obj_account_union1_error.message;
118
+ }
119
+ if (obj_account_union0 && obj_account_union1) {
120
+ let message = 'Object doesn\'t match union (at "' + path_account + '")';
121
+ message += '\n' + obj_account_union0.split('\n').map((line) => '\t' + line).join('\n');
122
+ message += '\n' + obj_account_union1.split('\n').map((line) => '\t' + line).join('\n');
123
+ return new TypeError(message);
124
+ }
125
+ }
126
+ const obj_assessmentEnvelopeItems = obj.assessmentEnvelopeItems;
127
+ const path_assessmentEnvelopeItems = path + '.assessmentEnvelopeItems';
128
+ if (!ArrayIsArray(obj_assessmentEnvelopeItems)) {
129
+ return new TypeError('Expected "array" but received "' + typeof obj_assessmentEnvelopeItems + '" (at "' + path_assessmentEnvelopeItems + '")');
130
+ }
131
+ for (let i = 0; i < obj_assessmentEnvelopeItems.length; i++) {
132
+ const obj_assessmentEnvelopeItems_item = obj_assessmentEnvelopeItems[i];
133
+ const path_assessmentEnvelopeItems_item = path_assessmentEnvelopeItems + '[' + i + ']';
134
+ if (typeof obj_assessmentEnvelopeItems_item !== 'object' || ArrayIsArray(obj_assessmentEnvelopeItems_item) || obj_assessmentEnvelopeItems_item === null) {
135
+ return new TypeError('Expected "object" but received "' + typeof obj_assessmentEnvelopeItems_item + '" (at "' + path_assessmentEnvelopeItems_item + '")');
136
+ }
137
+ }
138
+ if (obj.contact !== undefined) {
139
+ const obj_contact = obj.contact;
140
+ const path_contact = path + '.contact';
141
+ let obj_contact_union0 = null;
142
+ const obj_contact_union0_error = (() => {
143
+ if (typeof obj_contact !== 'string') {
144
+ return new TypeError('Expected "string" but received "' + typeof obj_contact + '" (at "' + path_contact + '")');
145
+ }
146
+ })();
147
+ if (obj_contact_union0_error != null) {
148
+ obj_contact_union0 = obj_contact_union0_error.message;
149
+ }
150
+ let obj_contact_union1 = null;
151
+ const obj_contact_union1_error = (() => {
152
+ if (obj_contact !== null) {
153
+ return new TypeError('Expected "null" but received "' + typeof obj_contact + '" (at "' + path_contact + '")');
154
+ }
155
+ })();
156
+ if (obj_contact_union1_error != null) {
157
+ obj_contact_union1 = obj_contact_union1_error.message;
158
+ }
159
+ if (obj_contact_union0 && obj_contact_union1) {
160
+ let message = 'Object doesn\'t match union (at "' + path_contact + '")';
161
+ message += '\n' + obj_contact_union0.split('\n').map((line) => '\t' + line).join('\n');
162
+ message += '\n' + obj_contact_union1.split('\n').map((line) => '\t' + line).join('\n');
163
+ return new TypeError(message);
164
+ }
165
+ }
166
+ const obj_expirationDateTime = obj.expirationDateTime;
167
+ const path_expirationDateTime = path + '.expirationDateTime';
168
+ let obj_expirationDateTime_union0 = null;
169
+ const obj_expirationDateTime_union0_error = (() => {
170
+ if (typeof obj_expirationDateTime !== 'string') {
171
+ return new TypeError('Expected "string" but received "' + typeof obj_expirationDateTime + '" (at "' + path_expirationDateTime + '")');
172
+ }
173
+ })();
174
+ if (obj_expirationDateTime_union0_error != null) {
175
+ obj_expirationDateTime_union0 = obj_expirationDateTime_union0_error.message;
176
+ }
177
+ let obj_expirationDateTime_union1 = null;
178
+ const obj_expirationDateTime_union1_error = (() => {
179
+ if (obj_expirationDateTime !== null) {
180
+ return new TypeError('Expected "null" but received "' + typeof obj_expirationDateTime + '" (at "' + path_expirationDateTime + '")');
181
+ }
182
+ })();
183
+ if (obj_expirationDateTime_union1_error != null) {
184
+ obj_expirationDateTime_union1 = obj_expirationDateTime_union1_error.message;
185
+ }
186
+ if (obj_expirationDateTime_union0 && obj_expirationDateTime_union1) {
187
+ let message = 'Object doesn\'t match union (at "' + path_expirationDateTime + '")';
188
+ message += '\n' + obj_expirationDateTime_union0.split('\n').map((line) => '\t' + line).join('\n');
189
+ message += '\n' + obj_expirationDateTime_union1.split('\n').map((line) => '\t' + line).join('\n');
190
+ return new TypeError(message);
191
+ }
192
+ const obj_name = obj.name;
193
+ const path_name = path + '.name';
194
+ let obj_name_union0 = null;
195
+ const obj_name_union0_error = (() => {
196
+ if (typeof obj_name !== 'string') {
197
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
198
+ }
199
+ })();
200
+ if (obj_name_union0_error != null) {
201
+ obj_name_union0 = obj_name_union0_error.message;
202
+ }
203
+ let obj_name_union1 = null;
204
+ const obj_name_union1_error = (() => {
205
+ if (obj_name !== null) {
206
+ return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
207
+ }
208
+ })();
209
+ if (obj_name_union1_error != null) {
210
+ obj_name_union1 = obj_name_union1_error.message;
211
+ }
212
+ if (obj_name_union0 && obj_name_union1) {
213
+ let message = 'Object doesn\'t match union (at "' + path_name + '")';
214
+ message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
215
+ message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
216
+ return new TypeError(message);
217
+ }
218
+ if (obj.requestReference !== undefined) {
219
+ const obj_requestReference = obj.requestReference;
220
+ const path_requestReference = path + '.requestReference';
221
+ let obj_requestReference_union0 = null;
222
+ const obj_requestReference_union0_error = (() => {
223
+ if (typeof obj_requestReference !== 'string') {
224
+ return new TypeError('Expected "string" but received "' + typeof obj_requestReference + '" (at "' + path_requestReference + '")');
225
+ }
226
+ })();
227
+ if (obj_requestReference_union0_error != null) {
228
+ obj_requestReference_union0 = obj_requestReference_union0_error.message;
229
+ }
230
+ let obj_requestReference_union1 = null;
231
+ const obj_requestReference_union1_error = (() => {
232
+ if (obj_requestReference !== null) {
233
+ return new TypeError('Expected "null" but received "' + typeof obj_requestReference + '" (at "' + path_requestReference + '")');
234
+ }
235
+ })();
236
+ if (obj_requestReference_union1_error != null) {
237
+ obj_requestReference_union1 = obj_requestReference_union1_error.message;
238
+ }
239
+ if (obj_requestReference_union0 && obj_requestReference_union1) {
240
+ let message = 'Object doesn\'t match union (at "' + path_requestReference + '")';
241
+ message += '\n' + obj_requestReference_union0.split('\n').map((line) => '\t' + line).join('\n');
242
+ message += '\n' + obj_requestReference_union1.split('\n').map((line) => '\t' + line).join('\n');
243
+ return new TypeError(message);
244
+ }
245
+ }
246
+ const obj_status = obj.status;
247
+ const path_status = path + '.status';
248
+ let obj_status_union0 = null;
249
+ const obj_status_union0_error = (() => {
250
+ if (typeof obj_status !== 'string') {
251
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
252
+ }
253
+ })();
254
+ if (obj_status_union0_error != null) {
255
+ obj_status_union0 = obj_status_union0_error.message;
256
+ }
257
+ let obj_status_union1 = null;
258
+ const obj_status_union1_error = (() => {
259
+ if (obj_status !== null) {
260
+ return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
261
+ }
262
+ })();
263
+ if (obj_status_union1_error != null) {
264
+ obj_status_union1 = obj_status_union1_error.message;
265
+ }
266
+ if (obj_status_union0 && obj_status_union1) {
267
+ let message = 'Object doesn\'t match union (at "' + path_status + '")';
268
+ message += '\n' + obj_status_union0.split('\n').map((line) => '\t' + line).join('\n');
269
+ message += '\n' + obj_status_union1.split('\n').map((line) => '\t' + line).join('\n');
270
+ return new TypeError(message);
271
+ }
272
+ })();
273
+ return v_error === undefined ? null : v_error;
274
274
  }
275
275
 
276
- const VERSION$6 = "a3782c06460d6c648c725cfab29d83b3";
277
- function validate$9(obj, path = 'AssessmentEnvelopeItemsListRepresentation') {
278
- const v_error = (() => {
279
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
280
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
281
- }
282
- const obj_id = obj.id;
283
- const path_id = path + '.id';
284
- let obj_id_union0 = null;
285
- const obj_id_union0_error = (() => {
286
- if (typeof obj_id !== 'string') {
287
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
288
- }
289
- })();
290
- if (obj_id_union0_error != null) {
291
- obj_id_union0 = obj_id_union0_error.message;
292
- }
293
- let obj_id_union1 = null;
294
- const obj_id_union1_error = (() => {
295
- if (obj_id !== null) {
296
- return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
297
- }
298
- })();
299
- if (obj_id_union1_error != null) {
300
- obj_id_union1 = obj_id_union1_error.message;
301
- }
302
- if (obj_id_union0 && obj_id_union1) {
303
- let message = 'Object doesn\'t match union (at "' + path_id + '")';
304
- message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
305
- message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
306
- return new TypeError(message);
307
- }
308
- })();
309
- return v_error === undefined ? null : v_error;
310
- }
311
- const select$9 = function AssessmentEnvelopeItemsListRepresentationSelect() {
312
- return {
313
- kind: 'Fragment',
314
- version: VERSION$6,
315
- private: [],
316
- selections: [
317
- {
318
- name: 'id',
319
- kind: 'Scalar'
320
- }
321
- ]
322
- };
323
- };
324
- function equals$6(existing, incoming) {
325
- const existing_id = existing.id;
326
- const incoming_id = incoming.id;
327
- if (!(existing_id === incoming_id)) {
328
- return false;
329
- }
330
- return true;
276
+ const VERSION$6 = "a3782c06460d6c648c725cfab29d83b3";
277
+ function validate$9(obj, path = 'AssessmentEnvelopeItemsListRepresentation') {
278
+ const v_error = (() => {
279
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
280
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
281
+ }
282
+ const obj_id = obj.id;
283
+ const path_id = path + '.id';
284
+ let obj_id_union0 = null;
285
+ const obj_id_union0_error = (() => {
286
+ if (typeof obj_id !== 'string') {
287
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
288
+ }
289
+ })();
290
+ if (obj_id_union0_error != null) {
291
+ obj_id_union0 = obj_id_union0_error.message;
292
+ }
293
+ let obj_id_union1 = null;
294
+ const obj_id_union1_error = (() => {
295
+ if (obj_id !== null) {
296
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
297
+ }
298
+ })();
299
+ if (obj_id_union1_error != null) {
300
+ obj_id_union1 = obj_id_union1_error.message;
301
+ }
302
+ if (obj_id_union0 && obj_id_union1) {
303
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
304
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
305
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
306
+ return new TypeError(message);
307
+ }
308
+ })();
309
+ return v_error === undefined ? null : v_error;
310
+ }
311
+ const select$9 = function AssessmentEnvelopeItemsListRepresentationSelect() {
312
+ return {
313
+ kind: 'Fragment',
314
+ version: VERSION$6,
315
+ private: [],
316
+ selections: [
317
+ {
318
+ name: 'id',
319
+ kind: 'Scalar'
320
+ }
321
+ ]
322
+ };
323
+ };
324
+ function equals$6(existing, incoming) {
325
+ const existing_id = existing.id;
326
+ const incoming_id = incoming.id;
327
+ if (!(existing_id === incoming_id)) {
328
+ return false;
329
+ }
330
+ return true;
331
331
  }
332
332
 
333
- const VERSION$5 = "ab49eca219417dfaf0dd968d35ce3b21";
334
- function validate$8(obj, path = 'AssessmentEnvelopeRepresentation') {
335
- const v_error = (() => {
336
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
337
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
338
- }
339
- const obj_assessmentEnvelopeItems = obj.assessmentEnvelopeItems;
340
- const path_assessmentEnvelopeItems = path + '.assessmentEnvelopeItems';
341
- if (!ArrayIsArray(obj_assessmentEnvelopeItems)) {
342
- return new TypeError('Expected "array" but received "' + typeof obj_assessmentEnvelopeItems + '" (at "' + path_assessmentEnvelopeItems + '")');
343
- }
344
- for (let i = 0; i < obj_assessmentEnvelopeItems.length; i++) {
345
- const obj_assessmentEnvelopeItems_item = obj_assessmentEnvelopeItems[i];
346
- const path_assessmentEnvelopeItems_item = path_assessmentEnvelopeItems + '[' + i + ']';
347
- const referencepath_assessmentEnvelopeItems_itemValidationError = validate$9(obj_assessmentEnvelopeItems_item, path_assessmentEnvelopeItems_item);
348
- if (referencepath_assessmentEnvelopeItems_itemValidationError !== null) {
349
- let message = 'Object doesn\'t match AssessmentEnvelopeItemsListRepresentation (at "' + path_assessmentEnvelopeItems_item + '")\n';
350
- message += referencepath_assessmentEnvelopeItems_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
351
- return new TypeError(message);
352
- }
353
- }
354
- const obj_id = obj.id;
355
- const path_id = path + '.id';
356
- let obj_id_union0 = null;
357
- const obj_id_union0_error = (() => {
358
- if (typeof obj_id !== 'string') {
359
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
360
- }
361
- })();
362
- if (obj_id_union0_error != null) {
363
- obj_id_union0 = obj_id_union0_error.message;
364
- }
365
- let obj_id_union1 = null;
366
- const obj_id_union1_error = (() => {
367
- if (obj_id !== null) {
368
- return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
369
- }
370
- })();
371
- if (obj_id_union1_error != null) {
372
- obj_id_union1 = obj_id_union1_error.message;
373
- }
374
- if (obj_id_union0 && obj_id_union1) {
375
- let message = 'Object doesn\'t match union (at "' + path_id + '")';
376
- message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
377
- message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
378
- return new TypeError(message);
379
- }
380
- })();
381
- return v_error === undefined ? null : v_error;
382
- }
383
- const select$8 = function AssessmentEnvelopeRepresentationSelect() {
384
- const { selections: AssessmentEnvelopeItemsListRepresentation__selections, opaque: AssessmentEnvelopeItemsListRepresentation__opaque, } = select$9();
385
- return {
386
- kind: 'Fragment',
387
- version: VERSION$5,
388
- private: [],
389
- selections: [
390
- {
391
- name: 'assessmentEnvelopeItems',
392
- kind: 'Object',
393
- plural: true,
394
- selections: AssessmentEnvelopeItemsListRepresentation__selections
395
- },
396
- {
397
- name: 'id',
398
- kind: 'Scalar'
399
- }
400
- ]
401
- };
402
- };
403
- function equals$5(existing, incoming) {
404
- const existing_assessmentEnvelopeItems = existing.assessmentEnvelopeItems;
405
- const incoming_assessmentEnvelopeItems = incoming.assessmentEnvelopeItems;
406
- const equals_assessmentEnvelopeItems_items = equalsArray(existing_assessmentEnvelopeItems, incoming_assessmentEnvelopeItems, (existing_assessmentEnvelopeItems_item, incoming_assessmentEnvelopeItems_item) => {
407
- if (!(equals$6(existing_assessmentEnvelopeItems_item, incoming_assessmentEnvelopeItems_item))) {
408
- return false;
409
- }
410
- });
411
- if (equals_assessmentEnvelopeItems_items === false) {
412
- return false;
413
- }
414
- const existing_id = existing.id;
415
- const incoming_id = incoming.id;
416
- if (!(existing_id === incoming_id)) {
417
- return false;
418
- }
419
- return true;
333
+ const VERSION$5 = "ab49eca219417dfaf0dd968d35ce3b21";
334
+ function validate$8(obj, path = 'AssessmentEnvelopeRepresentation') {
335
+ const v_error = (() => {
336
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
337
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
338
+ }
339
+ const obj_assessmentEnvelopeItems = obj.assessmentEnvelopeItems;
340
+ const path_assessmentEnvelopeItems = path + '.assessmentEnvelopeItems';
341
+ if (!ArrayIsArray(obj_assessmentEnvelopeItems)) {
342
+ return new TypeError('Expected "array" but received "' + typeof obj_assessmentEnvelopeItems + '" (at "' + path_assessmentEnvelopeItems + '")');
343
+ }
344
+ for (let i = 0; i < obj_assessmentEnvelopeItems.length; i++) {
345
+ const obj_assessmentEnvelopeItems_item = obj_assessmentEnvelopeItems[i];
346
+ const path_assessmentEnvelopeItems_item = path_assessmentEnvelopeItems + '[' + i + ']';
347
+ const referencepath_assessmentEnvelopeItems_itemValidationError = validate$9(obj_assessmentEnvelopeItems_item, path_assessmentEnvelopeItems_item);
348
+ if (referencepath_assessmentEnvelopeItems_itemValidationError !== null) {
349
+ let message = 'Object doesn\'t match AssessmentEnvelopeItemsListRepresentation (at "' + path_assessmentEnvelopeItems_item + '")\n';
350
+ message += referencepath_assessmentEnvelopeItems_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
351
+ return new TypeError(message);
352
+ }
353
+ }
354
+ const obj_id = obj.id;
355
+ const path_id = path + '.id';
356
+ let obj_id_union0 = null;
357
+ const obj_id_union0_error = (() => {
358
+ if (typeof obj_id !== 'string') {
359
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
360
+ }
361
+ })();
362
+ if (obj_id_union0_error != null) {
363
+ obj_id_union0 = obj_id_union0_error.message;
364
+ }
365
+ let obj_id_union1 = null;
366
+ const obj_id_union1_error = (() => {
367
+ if (obj_id !== null) {
368
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
369
+ }
370
+ })();
371
+ if (obj_id_union1_error != null) {
372
+ obj_id_union1 = obj_id_union1_error.message;
373
+ }
374
+ if (obj_id_union0 && obj_id_union1) {
375
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
376
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
377
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
378
+ return new TypeError(message);
379
+ }
380
+ })();
381
+ return v_error === undefined ? null : v_error;
382
+ }
383
+ const select$8 = function AssessmentEnvelopeRepresentationSelect() {
384
+ const { selections: AssessmentEnvelopeItemsListRepresentation__selections, opaque: AssessmentEnvelopeItemsListRepresentation__opaque, } = select$9();
385
+ return {
386
+ kind: 'Fragment',
387
+ version: VERSION$5,
388
+ private: [],
389
+ selections: [
390
+ {
391
+ name: 'assessmentEnvelopeItems',
392
+ kind: 'Object',
393
+ plural: true,
394
+ selections: AssessmentEnvelopeItemsListRepresentation__selections
395
+ },
396
+ {
397
+ name: 'id',
398
+ kind: 'Scalar'
399
+ }
400
+ ]
401
+ };
402
+ };
403
+ function equals$5(existing, incoming) {
404
+ const existing_assessmentEnvelopeItems = existing.assessmentEnvelopeItems;
405
+ const incoming_assessmentEnvelopeItems = incoming.assessmentEnvelopeItems;
406
+ const equals_assessmentEnvelopeItems_items = equalsArray(existing_assessmentEnvelopeItems, incoming_assessmentEnvelopeItems, (existing_assessmentEnvelopeItems_item, incoming_assessmentEnvelopeItems_item) => {
407
+ if (!(equals$6(existing_assessmentEnvelopeItems_item, incoming_assessmentEnvelopeItems_item))) {
408
+ return false;
409
+ }
410
+ });
411
+ if (equals_assessmentEnvelopeItems_items === false) {
412
+ return false;
413
+ }
414
+ const existing_id = existing.id;
415
+ const incoming_id = incoming.id;
416
+ if (!(existing_id === incoming_id)) {
417
+ return false;
418
+ }
419
+ return true;
420
420
  }
421
421
 
422
- const VERSION$4 = "7e489c5236b75eb23da3679e0a4afc5a";
423
- function validate$7(obj, path = 'AssessmentEnvelopeResultRepresentation') {
424
- const v_error = (() => {
425
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
426
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
427
- }
428
- const obj_assessmentEnvelope = obj.assessmentEnvelope;
429
- const path_assessmentEnvelope = path + '.assessmentEnvelope';
430
- const referencepath_assessmentEnvelopeValidationError = validate$8(obj_assessmentEnvelope, path_assessmentEnvelope);
431
- if (referencepath_assessmentEnvelopeValidationError !== null) {
432
- let message = 'Object doesn\'t match AssessmentEnvelopeRepresentation (at "' + path_assessmentEnvelope + '")\n';
433
- message += referencepath_assessmentEnvelopeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
434
- return new TypeError(message);
435
- }
436
- const obj_isSuccess = obj.isSuccess;
437
- const path_isSuccess = path + '.isSuccess';
438
- if (typeof obj_isSuccess !== 'boolean') {
439
- return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
440
- }
441
- const obj_message = obj.message;
442
- const path_message = path + '.message';
443
- let obj_message_union0 = null;
444
- const obj_message_union0_error = (() => {
445
- if (typeof obj_message !== 'string') {
446
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
447
- }
448
- })();
449
- if (obj_message_union0_error != null) {
450
- obj_message_union0 = obj_message_union0_error.message;
451
- }
452
- let obj_message_union1 = null;
453
- const obj_message_union1_error = (() => {
454
- if (obj_message !== null) {
455
- return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
456
- }
457
- })();
458
- if (obj_message_union1_error != null) {
459
- obj_message_union1 = obj_message_union1_error.message;
460
- }
461
- if (obj_message_union0 && obj_message_union1) {
462
- let message = 'Object doesn\'t match union (at "' + path_message + '")';
463
- message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
464
- message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
465
- return new TypeError(message);
466
- }
467
- })();
468
- return v_error === undefined ? null : v_error;
469
- }
470
- const RepresentationType$2 = 'AssessmentEnvelopeResultRepresentation';
471
- function keyBuilder$3(luvio, config) {
472
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.isSuccess;
473
- }
474
- function keyBuilderFromType$1(luvio, object) {
475
- const keyParams = {
476
- isSuccess: object.isSuccess
477
- };
478
- return keyBuilder$3(luvio, keyParams);
479
- }
480
- function normalize$2(input, existing, path, luvio, store, timestamp) {
481
- return input;
482
- }
483
- const select$7 = function AssessmentEnvelopeResultRepresentationSelect() {
484
- const { selections: AssessmentEnvelopeRepresentation__selections, opaque: AssessmentEnvelopeRepresentation__opaque, } = select$8();
485
- return {
486
- kind: 'Fragment',
487
- version: VERSION$4,
488
- private: [],
489
- selections: [
490
- {
491
- name: 'assessmentEnvelope',
492
- kind: 'Object',
493
- selections: AssessmentEnvelopeRepresentation__selections
494
- },
495
- {
496
- name: 'isSuccess',
497
- kind: 'Scalar'
498
- },
499
- {
500
- name: 'message',
501
- kind: 'Scalar'
502
- }
503
- ]
504
- };
505
- };
506
- function equals$4(existing, incoming) {
507
- const existing_isSuccess = existing.isSuccess;
508
- const incoming_isSuccess = incoming.isSuccess;
509
- if (!(existing_isSuccess === incoming_isSuccess)) {
510
- return false;
511
- }
512
- const existing_assessmentEnvelope = existing.assessmentEnvelope;
513
- const incoming_assessmentEnvelope = incoming.assessmentEnvelope;
514
- if (!(equals$5(existing_assessmentEnvelope, incoming_assessmentEnvelope))) {
515
- return false;
516
- }
517
- const existing_message = existing.message;
518
- const incoming_message = incoming.message;
519
- if (!(existing_message === incoming_message)) {
520
- return false;
521
- }
522
- return true;
523
- }
524
- const ingest$2 = function AssessmentEnvelopeResultRepresentationIngest(input, path, luvio, store, timestamp) {
525
- if (process.env.NODE_ENV !== 'production') {
526
- const validateError = validate$7(input);
527
- if (validateError !== null) {
528
- throw validateError;
529
- }
530
- }
531
- const key = keyBuilderFromType$1(luvio, input);
532
- const existingRecord = store.readEntry(key);
533
- const ttlToUse = path.ttl !== undefined ? path.ttl : 6000;
534
- let incomingRecord = normalize$2(input, store.readEntry(key), {
535
- fullPath: key,
536
- parent: path.parent,
537
- propertyName: path.propertyName,
538
- ttl: ttlToUse
539
- });
540
- if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
541
- luvio.storePublish(key, incomingRecord);
542
- }
543
- if (ttlToUse !== undefined) {
544
- const storeMetadataParams = {
545
- ttl: ttlToUse,
546
- namespace: "assessment",
547
- version: VERSION$4,
548
- representationName: RepresentationType$2,
549
- };
550
- luvio.publishStoreMetadata(key, storeMetadataParams);
551
- }
552
- return createLink(key);
553
- };
554
- function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
555
- const rootKeySet = new StoreKeyMap();
556
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
557
- const rootKey = keyBuilderFromType$1(luvio, input);
558
- rootKeySet.set(rootKey, {
559
- namespace: keyPrefix,
560
- representationName: RepresentationType$2,
561
- mergeable: false
562
- });
563
- return rootKeySet;
422
+ const VERSION$4 = "7e489c5236b75eb23da3679e0a4afc5a";
423
+ function validate$7(obj, path = 'AssessmentEnvelopeResultRepresentation') {
424
+ const v_error = (() => {
425
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
426
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
427
+ }
428
+ const obj_assessmentEnvelope = obj.assessmentEnvelope;
429
+ const path_assessmentEnvelope = path + '.assessmentEnvelope';
430
+ const referencepath_assessmentEnvelopeValidationError = validate$8(obj_assessmentEnvelope, path_assessmentEnvelope);
431
+ if (referencepath_assessmentEnvelopeValidationError !== null) {
432
+ let message = 'Object doesn\'t match AssessmentEnvelopeRepresentation (at "' + path_assessmentEnvelope + '")\n';
433
+ message += referencepath_assessmentEnvelopeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
434
+ return new TypeError(message);
435
+ }
436
+ const obj_isSuccess = obj.isSuccess;
437
+ const path_isSuccess = path + '.isSuccess';
438
+ if (typeof obj_isSuccess !== 'boolean') {
439
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
440
+ }
441
+ const obj_message = obj.message;
442
+ const path_message = path + '.message';
443
+ let obj_message_union0 = null;
444
+ const obj_message_union0_error = (() => {
445
+ if (typeof obj_message !== 'string') {
446
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
447
+ }
448
+ })();
449
+ if (obj_message_union0_error != null) {
450
+ obj_message_union0 = obj_message_union0_error.message;
451
+ }
452
+ let obj_message_union1 = null;
453
+ const obj_message_union1_error = (() => {
454
+ if (obj_message !== null) {
455
+ return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
456
+ }
457
+ })();
458
+ if (obj_message_union1_error != null) {
459
+ obj_message_union1 = obj_message_union1_error.message;
460
+ }
461
+ if (obj_message_union0 && obj_message_union1) {
462
+ let message = 'Object doesn\'t match union (at "' + path_message + '")';
463
+ message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
464
+ message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
465
+ return new TypeError(message);
466
+ }
467
+ })();
468
+ return v_error === undefined ? null : v_error;
469
+ }
470
+ const RepresentationType$2 = 'AssessmentEnvelopeResultRepresentation';
471
+ function keyBuilder$3(luvio, config) {
472
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.isSuccess;
473
+ }
474
+ function keyBuilderFromType$1(luvio, object) {
475
+ const keyParams = {
476
+ isSuccess: object.isSuccess
477
+ };
478
+ return keyBuilder$3(luvio, keyParams);
479
+ }
480
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
481
+ return input;
482
+ }
483
+ const select$7 = function AssessmentEnvelopeResultRepresentationSelect() {
484
+ const { selections: AssessmentEnvelopeRepresentation__selections, opaque: AssessmentEnvelopeRepresentation__opaque, } = select$8();
485
+ return {
486
+ kind: 'Fragment',
487
+ version: VERSION$4,
488
+ private: [],
489
+ selections: [
490
+ {
491
+ name: 'assessmentEnvelope',
492
+ kind: 'Object',
493
+ selections: AssessmentEnvelopeRepresentation__selections
494
+ },
495
+ {
496
+ name: 'isSuccess',
497
+ kind: 'Scalar'
498
+ },
499
+ {
500
+ name: 'message',
501
+ kind: 'Scalar'
502
+ }
503
+ ]
504
+ };
505
+ };
506
+ function equals$4(existing, incoming) {
507
+ const existing_isSuccess = existing.isSuccess;
508
+ const incoming_isSuccess = incoming.isSuccess;
509
+ if (!(existing_isSuccess === incoming_isSuccess)) {
510
+ return false;
511
+ }
512
+ const existing_assessmentEnvelope = existing.assessmentEnvelope;
513
+ const incoming_assessmentEnvelope = incoming.assessmentEnvelope;
514
+ if (!(equals$5(existing_assessmentEnvelope, incoming_assessmentEnvelope))) {
515
+ return false;
516
+ }
517
+ const existing_message = existing.message;
518
+ const incoming_message = incoming.message;
519
+ if (!(existing_message === incoming_message)) {
520
+ return false;
521
+ }
522
+ return true;
523
+ }
524
+ const ingest$2 = function AssessmentEnvelopeResultRepresentationIngest(input, path, luvio, store, timestamp) {
525
+ if (process.env.NODE_ENV !== 'production') {
526
+ const validateError = validate$7(input);
527
+ if (validateError !== null) {
528
+ throw validateError;
529
+ }
530
+ }
531
+ const key = keyBuilderFromType$1(luvio, input);
532
+ const existingRecord = store.readEntry(key);
533
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 6000;
534
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
535
+ fullPath: key,
536
+ parent: path.parent,
537
+ propertyName: path.propertyName,
538
+ ttl: ttlToUse
539
+ });
540
+ if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
541
+ luvio.storePublish(key, incomingRecord);
542
+ }
543
+ if (ttlToUse !== undefined) {
544
+ const storeMetadataParams = {
545
+ ttl: ttlToUse,
546
+ namespace: "assessment",
547
+ version: VERSION$4,
548
+ representationName: RepresentationType$2,
549
+ };
550
+ luvio.publishStoreMetadata(key, storeMetadataParams);
551
+ }
552
+ return createLink(key);
553
+ };
554
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
555
+ const rootKeySet = new StoreKeyMap();
556
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
557
+ const rootKey = keyBuilderFromType$1(luvio, input);
558
+ rootKeySet.set(rootKey, {
559
+ namespace: keyPrefix,
560
+ representationName: RepresentationType$2,
561
+ mergeable: false
562
+ });
563
+ return rootKeySet;
564
564
  }
565
565
 
566
- function select$6(luvio, params) {
567
- return select$7();
568
- }
569
- function getResponseCacheKeys$2(luvio, resourceParams, response) {
570
- return getTypeCacheKeys$2(luvio, response);
571
- }
572
- function ingestSuccess$2(luvio, resourceParams, response) {
573
- const { body } = response;
574
- const key = keyBuilderFromType$1(luvio, body);
575
- luvio.storeIngest(key, ingest$2, body);
576
- const snapshot = luvio.storeLookup({
577
- recordId: key,
578
- node: select$6(),
579
- variables: {},
580
- });
581
- if (process.env.NODE_ENV !== 'production') {
582
- if (snapshot.state !== 'Fulfilled') {
583
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
584
- }
585
- }
586
- return snapshot;
587
- }
588
- function createResourceRequest$2(config) {
589
- const headers = {};
590
- return {
591
- baseUri: '/services/data/v58.0',
592
- basePath: '/connect/assessments/assessmentenvelopes',
593
- method: 'post',
594
- body: config.body,
595
- urlParams: {},
596
- queryParams: {},
597
- headers,
598
- priority: 'normal',
599
- };
566
+ function select$6(luvio, params) {
567
+ return select$7();
568
+ }
569
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
570
+ return getTypeCacheKeys$2(luvio, response);
571
+ }
572
+ function ingestSuccess$2(luvio, resourceParams, response) {
573
+ const { body } = response;
574
+ const key = keyBuilderFromType$1(luvio, body);
575
+ luvio.storeIngest(key, ingest$2, body);
576
+ const snapshot = luvio.storeLookup({
577
+ recordId: key,
578
+ node: select$6(),
579
+ variables: {},
580
+ });
581
+ if (process.env.NODE_ENV !== 'production') {
582
+ if (snapshot.state !== 'Fulfilled') {
583
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
584
+ }
585
+ }
586
+ return snapshot;
587
+ }
588
+ function createResourceRequest$2(config) {
589
+ const headers = {};
590
+ return {
591
+ baseUri: '/services/data/v58.0',
592
+ basePath: '/connect/assessments/assessmentenvelopes',
593
+ method: 'post',
594
+ body: config.body,
595
+ urlParams: {},
596
+ queryParams: {},
597
+ headers,
598
+ priority: 'normal',
599
+ };
600
600
  }
601
601
 
602
- const postAssessmentEnvelope_ConfigPropertyNames = {
603
- displayName: 'postAssessmentEnvelope',
604
- parameters: {
605
- required: ['AssessmentEnvelopeData'],
606
- optional: []
607
- }
608
- };
609
- function createResourceParams$2(config) {
610
- const resourceParams = {
611
- body: {
612
- AssessmentEnvelopeData: config.AssessmentEnvelopeData
613
- }
614
- };
615
- return resourceParams;
616
- }
617
- function typeCheckConfig$2(untrustedConfig) {
618
- const config = {};
619
- const untrustedConfig_AssessmentEnvelopeData = untrustedConfig.AssessmentEnvelopeData;
620
- const referenceAssessmentEnvelopeInputRepresentationValidationError = validate$a(untrustedConfig_AssessmentEnvelopeData);
621
- if (referenceAssessmentEnvelopeInputRepresentationValidationError === null) {
622
- config.AssessmentEnvelopeData = untrustedConfig_AssessmentEnvelopeData;
623
- }
624
- return config;
625
- }
626
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
627
- if (!untrustedIsObject(untrustedConfig)) {
628
- return null;
629
- }
630
- if (process.env.NODE_ENV !== 'production') {
631
- validateConfig(untrustedConfig, configPropertyNames);
632
- }
633
- const config = typeCheckConfig$2(untrustedConfig);
634
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
635
- return null;
636
- }
637
- return config;
638
- }
639
- function buildNetworkSnapshot$2(luvio, config, options) {
640
- const resourceParams = createResourceParams$2(config);
641
- const request = createResourceRequest$2(resourceParams);
642
- return luvio.dispatchResourceRequest(request, options)
643
- .then((response) => {
644
- return luvio.handleSuccessResponse(() => {
645
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
646
- return luvio.storeBroadcast().then(() => snapshot);
647
- }, () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
648
- }, (response) => {
649
- deepFreeze$3(response);
650
- throw response;
651
- });
652
- }
653
- const postAssessmentEnvelopeAdapterFactory = (luvio) => {
654
- return function postAssessmentEnvelope(untrustedConfig) {
655
- const config = validateAdapterConfig$2(untrustedConfig, postAssessmentEnvelope_ConfigPropertyNames);
656
- // Invalid or incomplete config
657
- if (config === null) {
658
- throw new Error('Invalid config for "postAssessmentEnvelope"');
659
- }
660
- return buildNetworkSnapshot$2(luvio, config);
661
- };
602
+ const postAssessmentEnvelope_ConfigPropertyNames = {
603
+ displayName: 'postAssessmentEnvelope',
604
+ parameters: {
605
+ required: ['AssessmentEnvelopeData'],
606
+ optional: []
607
+ }
608
+ };
609
+ function createResourceParams$2(config) {
610
+ const resourceParams = {
611
+ body: {
612
+ AssessmentEnvelopeData: config.AssessmentEnvelopeData
613
+ }
614
+ };
615
+ return resourceParams;
616
+ }
617
+ function typeCheckConfig$2(untrustedConfig) {
618
+ const config = {};
619
+ const untrustedConfig_AssessmentEnvelopeData = untrustedConfig.AssessmentEnvelopeData;
620
+ const referenceAssessmentEnvelopeInputRepresentationValidationError = validate$a(untrustedConfig_AssessmentEnvelopeData);
621
+ if (referenceAssessmentEnvelopeInputRepresentationValidationError === null) {
622
+ config.AssessmentEnvelopeData = untrustedConfig_AssessmentEnvelopeData;
623
+ }
624
+ return config;
625
+ }
626
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
627
+ if (!untrustedIsObject(untrustedConfig)) {
628
+ return null;
629
+ }
630
+ if (process.env.NODE_ENV !== 'production') {
631
+ validateConfig(untrustedConfig, configPropertyNames);
632
+ }
633
+ const config = typeCheckConfig$2(untrustedConfig);
634
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
635
+ return null;
636
+ }
637
+ return config;
638
+ }
639
+ function buildNetworkSnapshot$2(luvio, config, options) {
640
+ const resourceParams = createResourceParams$2(config);
641
+ const request = createResourceRequest$2(resourceParams);
642
+ return luvio.dispatchResourceRequest(request, options)
643
+ .then((response) => {
644
+ return luvio.handleSuccessResponse(() => {
645
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
646
+ return luvio.storeBroadcast().then(() => snapshot);
647
+ }, () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
648
+ }, (response) => {
649
+ deepFreeze$3(response);
650
+ throw response;
651
+ });
652
+ }
653
+ const postAssessmentEnvelopeAdapterFactory = (luvio) => {
654
+ return function postAssessmentEnvelope(untrustedConfig) {
655
+ const config = validateAdapterConfig$2(untrustedConfig, postAssessmentEnvelope_ConfigPropertyNames);
656
+ // Invalid or incomplete config
657
+ if (config === null) {
658
+ throw new Error('Invalid config for "postAssessmentEnvelope"');
659
+ }
660
+ return buildNetworkSnapshot$2(luvio, config);
661
+ };
662
662
  };
663
663
 
664
- function validate$6(obj, path = 'AssessmentEnvelopeItemsListOutputRepresentation') {
665
- const v_error = (() => {
666
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
667
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
668
- }
669
- if (obj.id !== undefined) {
670
- const obj_id = obj.id;
671
- const path_id = path + '.id';
672
- if (typeof obj_id !== 'string') {
673
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
674
- }
675
- }
676
- if (obj.omniProcessId !== undefined) {
677
- const obj_omniProcessId = obj.omniProcessId;
678
- const path_omniProcessId = path + '.omniProcessId';
679
- if (typeof obj_omniProcessId !== 'string') {
680
- return new TypeError('Expected "string" but received "' + typeof obj_omniProcessId + '" (at "' + path_omniProcessId + '")');
681
- }
682
- }
683
- const obj_status = obj.status;
684
- const path_status = path + '.status';
685
- if (typeof obj_status !== 'string') {
686
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
687
- }
688
- })();
689
- return v_error === undefined ? null : v_error;
690
- }
691
- function deepFreeze$2(input) {
692
- ObjectFreeze(input);
664
+ function validate$6(obj, path = 'AssessmentEnvelopeItemsListOutputRepresentation') {
665
+ const v_error = (() => {
666
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
667
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
668
+ }
669
+ if (obj.id !== undefined) {
670
+ const obj_id = obj.id;
671
+ const path_id = path + '.id';
672
+ if (typeof obj_id !== 'string') {
673
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
674
+ }
675
+ }
676
+ if (obj.omniProcessId !== undefined) {
677
+ const obj_omniProcessId = obj.omniProcessId;
678
+ const path_omniProcessId = path + '.omniProcessId';
679
+ if (typeof obj_omniProcessId !== 'string') {
680
+ return new TypeError('Expected "string" but received "' + typeof obj_omniProcessId + '" (at "' + path_omniProcessId + '")');
681
+ }
682
+ }
683
+ const obj_status = obj.status;
684
+ const path_status = path + '.status';
685
+ if (typeof obj_status !== 'string') {
686
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
687
+ }
688
+ })();
689
+ return v_error === undefined ? null : v_error;
690
+ }
691
+ function deepFreeze$2(input) {
692
+ ObjectFreeze(input);
693
693
  }
694
694
 
695
- function validate$5(obj, path = 'AssessmentEnvelopeOutputRepresentation') {
696
- const v_error = (() => {
697
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
698
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
699
- }
700
- if (obj.assessmentEnvelopeItems !== undefined) {
701
- const obj_assessmentEnvelopeItems = obj.assessmentEnvelopeItems;
702
- const path_assessmentEnvelopeItems = path + '.assessmentEnvelopeItems';
703
- if (!ArrayIsArray(obj_assessmentEnvelopeItems)) {
704
- return new TypeError('Expected "array" but received "' + typeof obj_assessmentEnvelopeItems + '" (at "' + path_assessmentEnvelopeItems + '")');
705
- }
706
- for (let i = 0; i < obj_assessmentEnvelopeItems.length; i++) {
707
- const obj_assessmentEnvelopeItems_item = obj_assessmentEnvelopeItems[i];
708
- const path_assessmentEnvelopeItems_item = path_assessmentEnvelopeItems + '[' + i + ']';
709
- const referencepath_assessmentEnvelopeItems_itemValidationError = validate$6(obj_assessmentEnvelopeItems_item, path_assessmentEnvelopeItems_item);
710
- if (referencepath_assessmentEnvelopeItems_itemValidationError !== null) {
711
- let message = 'Object doesn\'t match AssessmentEnvelopeItemsListOutputRepresentation (at "' + path_assessmentEnvelopeItems_item + '")\n';
712
- message += referencepath_assessmentEnvelopeItems_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
713
- return new TypeError(message);
714
- }
715
- }
716
- }
717
- if (obj.expirationDateTime !== undefined) {
718
- const obj_expirationDateTime = obj.expirationDateTime;
719
- const path_expirationDateTime = path + '.expirationDateTime';
720
- if (typeof obj_expirationDateTime !== 'string') {
721
- return new TypeError('Expected "string" but received "' + typeof obj_expirationDateTime + '" (at "' + path_expirationDateTime + '")');
722
- }
723
- }
724
- if (obj.id !== undefined) {
725
- const obj_id = obj.id;
726
- const path_id = path + '.id';
727
- if (typeof obj_id !== 'string') {
728
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
729
- }
730
- }
731
- const obj_status = obj.status;
732
- const path_status = path + '.status';
733
- if (typeof obj_status !== 'string') {
734
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
735
- }
736
- })();
737
- return v_error === undefined ? null : v_error;
738
- }
739
- function deepFreeze$1(input) {
740
- const input_assessmentEnvelopeItems = input.assessmentEnvelopeItems;
741
- if (input_assessmentEnvelopeItems !== undefined) {
742
- for (let i = 0; i < input_assessmentEnvelopeItems.length; i++) {
743
- const input_assessmentEnvelopeItems_item = input_assessmentEnvelopeItems[i];
744
- deepFreeze$2(input_assessmentEnvelopeItems_item);
745
- }
746
- ObjectFreeze(input_assessmentEnvelopeItems);
747
- }
748
- ObjectFreeze(input);
695
+ function validate$5(obj, path = 'AssessmentEnvelopeOutputRepresentation') {
696
+ const v_error = (() => {
697
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
698
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
699
+ }
700
+ if (obj.assessmentEnvelopeItems !== undefined) {
701
+ const obj_assessmentEnvelopeItems = obj.assessmentEnvelopeItems;
702
+ const path_assessmentEnvelopeItems = path + '.assessmentEnvelopeItems';
703
+ if (!ArrayIsArray(obj_assessmentEnvelopeItems)) {
704
+ return new TypeError('Expected "array" but received "' + typeof obj_assessmentEnvelopeItems + '" (at "' + path_assessmentEnvelopeItems + '")');
705
+ }
706
+ for (let i = 0; i < obj_assessmentEnvelopeItems.length; i++) {
707
+ const obj_assessmentEnvelopeItems_item = obj_assessmentEnvelopeItems[i];
708
+ const path_assessmentEnvelopeItems_item = path_assessmentEnvelopeItems + '[' + i + ']';
709
+ const referencepath_assessmentEnvelopeItems_itemValidationError = validate$6(obj_assessmentEnvelopeItems_item, path_assessmentEnvelopeItems_item);
710
+ if (referencepath_assessmentEnvelopeItems_itemValidationError !== null) {
711
+ let message = 'Object doesn\'t match AssessmentEnvelopeItemsListOutputRepresentation (at "' + path_assessmentEnvelopeItems_item + '")\n';
712
+ message += referencepath_assessmentEnvelopeItems_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
713
+ return new TypeError(message);
714
+ }
715
+ }
716
+ }
717
+ if (obj.expirationDateTime !== undefined) {
718
+ const obj_expirationDateTime = obj.expirationDateTime;
719
+ const path_expirationDateTime = path + '.expirationDateTime';
720
+ if (typeof obj_expirationDateTime !== 'string') {
721
+ return new TypeError('Expected "string" but received "' + typeof obj_expirationDateTime + '" (at "' + path_expirationDateTime + '")');
722
+ }
723
+ }
724
+ if (obj.id !== undefined) {
725
+ const obj_id = obj.id;
726
+ const path_id = path + '.id';
727
+ if (typeof obj_id !== 'string') {
728
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
729
+ }
730
+ }
731
+ const obj_status = obj.status;
732
+ const path_status = path + '.status';
733
+ if (typeof obj_status !== 'string') {
734
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
735
+ }
736
+ })();
737
+ return v_error === undefined ? null : v_error;
738
+ }
739
+ function deepFreeze$1(input) {
740
+ const input_assessmentEnvelopeItems = input.assessmentEnvelopeItems;
741
+ if (input_assessmentEnvelopeItems !== undefined) {
742
+ for (let i = 0; i < input_assessmentEnvelopeItems.length; i++) {
743
+ const input_assessmentEnvelopeItems_item = input_assessmentEnvelopeItems[i];
744
+ deepFreeze$2(input_assessmentEnvelopeItems_item);
745
+ }
746
+ ObjectFreeze(input_assessmentEnvelopeItems);
747
+ }
748
+ ObjectFreeze(input);
749
749
  }
750
750
 
751
- const TTL = 6000;
752
- const VERSION$3 = "7b60ad6d5543265bc7066c36ff3987e4";
753
- function validate$4(obj, path = 'AssessmentEnvelopeGetResultRepresentation') {
754
- const v_error = (() => {
755
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
756
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
757
- }
758
- if (obj.assessmentEnvelope !== undefined) {
759
- const obj_assessmentEnvelope = obj.assessmentEnvelope;
760
- const path_assessmentEnvelope = path + '.assessmentEnvelope';
761
- const referencepath_assessmentEnvelopeValidationError = validate$5(obj_assessmentEnvelope, path_assessmentEnvelope);
762
- if (referencepath_assessmentEnvelopeValidationError !== null) {
763
- let message = 'Object doesn\'t match AssessmentEnvelopeOutputRepresentation (at "' + path_assessmentEnvelope + '")\n';
764
- message += referencepath_assessmentEnvelopeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
765
- return new TypeError(message);
766
- }
767
- }
768
- const obj_isSuccess = obj.isSuccess;
769
- const path_isSuccess = path + '.isSuccess';
770
- if (typeof obj_isSuccess !== 'boolean') {
771
- return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
772
- }
773
- const obj_message = obj.message;
774
- const path_message = path + '.message';
775
- if (typeof obj_message !== 'string') {
776
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
777
- }
778
- })();
779
- return v_error === undefined ? null : v_error;
780
- }
781
- const RepresentationType$1 = 'AssessmentEnvelopeGetResultRepresentation';
782
- function normalize$1(input, existing, path, luvio, store, timestamp) {
783
- return input;
784
- }
785
- const select$5 = function AssessmentEnvelopeGetResultRepresentationSelect() {
786
- return {
787
- kind: 'Fragment',
788
- version: VERSION$3,
789
- private: [],
790
- opaque: true
791
- };
792
- };
793
- function equals$3(existing, incoming) {
794
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
795
- return false;
796
- }
797
- return true;
798
- }
799
- function deepFreeze(input) {
800
- const input_assessmentEnvelope = input.assessmentEnvelope;
801
- if (input_assessmentEnvelope !== undefined) {
802
- deepFreeze$1(input_assessmentEnvelope);
803
- }
804
- ObjectFreeze(input);
805
- }
806
- const ingest$1 = function AssessmentEnvelopeGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
807
- if (process.env.NODE_ENV !== 'production') {
808
- const validateError = validate$4(input);
809
- if (validateError !== null) {
810
- throw validateError;
811
- }
812
- }
813
- const key = path.fullPath;
814
- const existingRecord = store.readEntry(key);
815
- const ttlToUse = TTL;
816
- let incomingRecord = normalize$1(input, store.readEntry(key), {
817
- fullPath: key,
818
- parent: path.parent,
819
- propertyName: path.propertyName,
820
- ttl: ttlToUse
821
- });
822
- deepFreeze(input);
823
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
824
- luvio.storePublish(key, incomingRecord);
825
- }
826
- {
827
- const storeMetadataParams = {
828
- ttl: ttlToUse,
829
- namespace: "assessment",
830
- version: VERSION$3,
831
- representationName: RepresentationType$1,
832
- };
833
- luvio.publishStoreMetadata(key, storeMetadataParams);
834
- }
835
- return createLink(key);
836
- };
837
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
838
- const rootKeySet = new StoreKeyMap();
839
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
840
- const rootKey = fullPathFactory();
841
- rootKeySet.set(rootKey, {
842
- namespace: keyPrefix,
843
- representationName: RepresentationType$1,
844
- mergeable: false
845
- });
846
- return rootKeySet;
751
+ const TTL = 6000;
752
+ const VERSION$3 = "7b60ad6d5543265bc7066c36ff3987e4";
753
+ function validate$4(obj, path = 'AssessmentEnvelopeGetResultRepresentation') {
754
+ const v_error = (() => {
755
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
756
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
757
+ }
758
+ if (obj.assessmentEnvelope !== undefined) {
759
+ const obj_assessmentEnvelope = obj.assessmentEnvelope;
760
+ const path_assessmentEnvelope = path + '.assessmentEnvelope';
761
+ const referencepath_assessmentEnvelopeValidationError = validate$5(obj_assessmentEnvelope, path_assessmentEnvelope);
762
+ if (referencepath_assessmentEnvelopeValidationError !== null) {
763
+ let message = 'Object doesn\'t match AssessmentEnvelopeOutputRepresentation (at "' + path_assessmentEnvelope + '")\n';
764
+ message += referencepath_assessmentEnvelopeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
765
+ return new TypeError(message);
766
+ }
767
+ }
768
+ const obj_isSuccess = obj.isSuccess;
769
+ const path_isSuccess = path + '.isSuccess';
770
+ if (typeof obj_isSuccess !== 'boolean') {
771
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
772
+ }
773
+ const obj_message = obj.message;
774
+ const path_message = path + '.message';
775
+ if (typeof obj_message !== 'string') {
776
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
777
+ }
778
+ })();
779
+ return v_error === undefined ? null : v_error;
780
+ }
781
+ const RepresentationType$1 = 'AssessmentEnvelopeGetResultRepresentation';
782
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
783
+ return input;
784
+ }
785
+ const select$5 = function AssessmentEnvelopeGetResultRepresentationSelect() {
786
+ return {
787
+ kind: 'Fragment',
788
+ version: VERSION$3,
789
+ private: [],
790
+ opaque: true
791
+ };
792
+ };
793
+ function equals$3(existing, incoming) {
794
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
795
+ return false;
796
+ }
797
+ return true;
798
+ }
799
+ function deepFreeze(input) {
800
+ const input_assessmentEnvelope = input.assessmentEnvelope;
801
+ if (input_assessmentEnvelope !== undefined) {
802
+ deepFreeze$1(input_assessmentEnvelope);
803
+ }
804
+ ObjectFreeze(input);
805
+ }
806
+ const ingest$1 = function AssessmentEnvelopeGetResultRepresentationIngest(input, path, luvio, store, timestamp) {
807
+ if (process.env.NODE_ENV !== 'production') {
808
+ const validateError = validate$4(input);
809
+ if (validateError !== null) {
810
+ throw validateError;
811
+ }
812
+ }
813
+ const key = path.fullPath;
814
+ const existingRecord = store.readEntry(key);
815
+ const ttlToUse = TTL;
816
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
817
+ fullPath: key,
818
+ parent: path.parent,
819
+ propertyName: path.propertyName,
820
+ ttl: ttlToUse
821
+ });
822
+ deepFreeze(input);
823
+ if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
824
+ luvio.storePublish(key, incomingRecord);
825
+ }
826
+ {
827
+ const storeMetadataParams = {
828
+ ttl: ttlToUse,
829
+ namespace: "assessment",
830
+ version: VERSION$3,
831
+ representationName: RepresentationType$1,
832
+ };
833
+ luvio.publishStoreMetadata(key, storeMetadataParams);
834
+ }
835
+ return createLink(key);
836
+ };
837
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
838
+ const rootKeySet = new StoreKeyMap();
839
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
840
+ const rootKey = fullPathFactory();
841
+ rootKeySet.set(rootKey, {
842
+ namespace: keyPrefix,
843
+ representationName: RepresentationType$1,
844
+ mergeable: false
845
+ });
846
+ return rootKeySet;
847
847
  }
848
848
 
849
- function select$4(luvio, params) {
850
- return select$5();
851
- }
852
- function keyBuilder$2(luvio, params) {
853
- return keyPrefix + '::AssessmentEnvelopeGetResultRepresentation:(' + 'signature:' + params.queryParams.signature + ')';
854
- }
855
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
856
- return getTypeCacheKeys$1(luvio, response, () => keyBuilder$2(luvio, resourceParams));
857
- }
858
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
859
- const { body } = response;
860
- const key = keyBuilder$2(luvio, resourceParams);
861
- luvio.storeIngest(key, ingest$1, body);
862
- const snapshot = luvio.storeLookup({
863
- recordId: key,
864
- node: select$4(),
865
- variables: {},
866
- }, snapshotRefresh);
867
- if (process.env.NODE_ENV !== 'production') {
868
- if (snapshot.state !== 'Fulfilled') {
869
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
870
- }
871
- }
872
- return snapshot;
873
- }
874
- function ingestError(luvio, params, error, snapshotRefresh) {
875
- const key = keyBuilder$2(luvio, params);
876
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
877
- const storeMetadataParams = {
878
- ttl: TTL,
879
- namespace: keyPrefix,
880
- version: VERSION$3,
881
- representationName: RepresentationType$1
882
- };
883
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
884
- return errorSnapshot;
885
- }
886
- function createResourceRequest$1(config) {
887
- const headers = {};
888
- return {
889
- baseUri: '/services/data/v58.0',
890
- basePath: '/connect/assessments/assessmentenvelopes',
891
- method: 'get',
892
- body: null,
893
- urlParams: {},
894
- queryParams: config.queryParams,
895
- headers,
896
- priority: 'normal',
897
- };
849
+ function select$4(luvio, params) {
850
+ return select$5();
851
+ }
852
+ function keyBuilder$2(luvio, params) {
853
+ return keyPrefix + '::AssessmentEnvelopeGetResultRepresentation:(' + 'signature:' + params.queryParams.signature + ')';
854
+ }
855
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
856
+ return getTypeCacheKeys$1(luvio, response, () => keyBuilder$2(luvio, resourceParams));
857
+ }
858
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
859
+ const { body } = response;
860
+ const key = keyBuilder$2(luvio, resourceParams);
861
+ luvio.storeIngest(key, ingest$1, body);
862
+ const snapshot = luvio.storeLookup({
863
+ recordId: key,
864
+ node: select$4(),
865
+ variables: {},
866
+ }, snapshotRefresh);
867
+ if (process.env.NODE_ENV !== 'production') {
868
+ if (snapshot.state !== 'Fulfilled') {
869
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
870
+ }
871
+ }
872
+ return snapshot;
873
+ }
874
+ function ingestError(luvio, params, error, snapshotRefresh) {
875
+ const key = keyBuilder$2(luvio, params);
876
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
877
+ const storeMetadataParams = {
878
+ ttl: TTL,
879
+ namespace: keyPrefix,
880
+ version: VERSION$3,
881
+ representationName: RepresentationType$1
882
+ };
883
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
884
+ return errorSnapshot;
885
+ }
886
+ function createResourceRequest$1(config) {
887
+ const headers = {};
888
+ return {
889
+ baseUri: '/services/data/v58.0',
890
+ basePath: '/connect/assessments/assessmentenvelopes',
891
+ method: 'get',
892
+ body: null,
893
+ urlParams: {},
894
+ queryParams: config.queryParams,
895
+ headers,
896
+ priority: 'normal',
897
+ };
898
898
  }
899
899
 
900
- const getAssessmentEnvelope_ConfigPropertyNames = {
901
- displayName: 'getAssessmentEnvelope',
902
- parameters: {
903
- required: [],
904
- optional: ['signature']
905
- }
906
- };
907
- function createResourceParams$1(config) {
908
- const resourceParams = {
909
- queryParams: {
910
- signature: config.signature
911
- }
912
- };
913
- return resourceParams;
914
- }
915
- function keyBuilder$1(luvio, config) {
916
- const resourceParams = createResourceParams$1(config);
917
- return keyBuilder$2(luvio, resourceParams);
918
- }
919
- function typeCheckConfig$1(untrustedConfig) {
920
- const config = {};
921
- const untrustedConfig_signature = untrustedConfig.signature;
922
- if (typeof untrustedConfig_signature === 'string') {
923
- config.signature = untrustedConfig_signature;
924
- }
925
- return config;
926
- }
927
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
928
- if (!untrustedIsObject(untrustedConfig)) {
929
- return null;
930
- }
931
- if (process.env.NODE_ENV !== 'production') {
932
- validateConfig(untrustedConfig, configPropertyNames);
933
- }
934
- const config = typeCheckConfig$1(untrustedConfig);
935
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
936
- return null;
937
- }
938
- return config;
939
- }
940
- function adapterFragment(luvio, config) {
941
- createResourceParams$1(config);
942
- return select$4();
943
- }
944
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
945
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
946
- config,
947
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
948
- });
949
- return luvio.storeBroadcast().then(() => snapshot);
950
- }
951
- function onFetchResponseError(luvio, config, resourceParams, response) {
952
- const snapshot = ingestError(luvio, resourceParams, response, {
953
- config,
954
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
955
- });
956
- return luvio.storeBroadcast().then(() => snapshot);
957
- }
958
- function buildNetworkSnapshot$1(luvio, config, options) {
959
- const resourceParams = createResourceParams$1(config);
960
- const request = createResourceRequest$1(resourceParams);
961
- return luvio.dispatchResourceRequest(request, options)
962
- .then((response) => {
963
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
964
- }, (response) => {
965
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
966
- });
967
- }
968
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
969
- const { luvio, config } = context;
970
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
971
- const dispatchOptions = {
972
- resourceRequestContext: {
973
- requestCorrelator,
974
- luvioRequestMethod: undefined,
975
- },
976
- eventObservers
977
- };
978
- if (networkPriority !== 'normal') {
979
- dispatchOptions.overrides = {
980
- priority: networkPriority
981
- };
982
- }
983
- return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
984
- }
985
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
986
- const { luvio, config } = context;
987
- const selector = {
988
- recordId: keyBuilder$1(luvio, config),
989
- node: adapterFragment(luvio, config),
990
- variables: {},
991
- };
992
- const cacheSnapshot = storeLookup(selector, {
993
- config,
994
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
995
- });
996
- return cacheSnapshot;
997
- }
998
- const getAssessmentEnvelopeAdapterFactory = (luvio) => function assessment__getAssessmentEnvelope(untrustedConfig, requestContext) {
999
- const config = validateAdapterConfig$1(untrustedConfig, getAssessmentEnvelope_ConfigPropertyNames);
1000
- // Invalid or incomplete config
1001
- if (config === null) {
1002
- return null;
1003
- }
1004
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1005
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
900
+ const getAssessmentEnvelope_ConfigPropertyNames = {
901
+ displayName: 'getAssessmentEnvelope',
902
+ parameters: {
903
+ required: [],
904
+ optional: ['signature']
905
+ }
906
+ };
907
+ function createResourceParams$1(config) {
908
+ const resourceParams = {
909
+ queryParams: {
910
+ signature: config.signature
911
+ }
912
+ };
913
+ return resourceParams;
914
+ }
915
+ function keyBuilder$1(luvio, config) {
916
+ const resourceParams = createResourceParams$1(config);
917
+ return keyBuilder$2(luvio, resourceParams);
918
+ }
919
+ function typeCheckConfig$1(untrustedConfig) {
920
+ const config = {};
921
+ const untrustedConfig_signature = untrustedConfig.signature;
922
+ if (typeof untrustedConfig_signature === 'string') {
923
+ config.signature = untrustedConfig_signature;
924
+ }
925
+ return config;
926
+ }
927
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
928
+ if (!untrustedIsObject(untrustedConfig)) {
929
+ return null;
930
+ }
931
+ if (process.env.NODE_ENV !== 'production') {
932
+ validateConfig(untrustedConfig, configPropertyNames);
933
+ }
934
+ const config = typeCheckConfig$1(untrustedConfig);
935
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
936
+ return null;
937
+ }
938
+ return config;
939
+ }
940
+ function adapterFragment(luvio, config) {
941
+ createResourceParams$1(config);
942
+ return select$4();
943
+ }
944
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
945
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
946
+ config,
947
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
948
+ });
949
+ return luvio.storeBroadcast().then(() => snapshot);
950
+ }
951
+ function onFetchResponseError(luvio, config, resourceParams, response) {
952
+ const snapshot = ingestError(luvio, resourceParams, response, {
953
+ config,
954
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
955
+ });
956
+ return luvio.storeBroadcast().then(() => snapshot);
957
+ }
958
+ function buildNetworkSnapshot$1(luvio, config, options) {
959
+ const resourceParams = createResourceParams$1(config);
960
+ const request = createResourceRequest$1(resourceParams);
961
+ return luvio.dispatchResourceRequest(request, options)
962
+ .then((response) => {
963
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
964
+ }, (response) => {
965
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
966
+ });
967
+ }
968
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
969
+ const { luvio, config } = context;
970
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
971
+ const dispatchOptions = {
972
+ resourceRequestContext: {
973
+ requestCorrelator,
974
+ luvioRequestMethod: undefined,
975
+ },
976
+ eventObservers
977
+ };
978
+ if (networkPriority !== 'normal') {
979
+ dispatchOptions.overrides = {
980
+ priority: networkPriority
981
+ };
982
+ }
983
+ return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
984
+ }
985
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
986
+ const { luvio, config } = context;
987
+ const selector = {
988
+ recordId: keyBuilder$1(luvio, config),
989
+ node: adapterFragment(luvio, config),
990
+ variables: {},
991
+ };
992
+ const cacheSnapshot = storeLookup(selector, {
993
+ config,
994
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
995
+ });
996
+ return cacheSnapshot;
997
+ }
998
+ const getAssessmentEnvelopeAdapterFactory = (luvio) => function assessment__getAssessmentEnvelope(untrustedConfig, requestContext) {
999
+ const config = validateAdapterConfig$1(untrustedConfig, getAssessmentEnvelope_ConfigPropertyNames);
1000
+ // Invalid or incomplete config
1001
+ if (config === null) {
1002
+ return null;
1003
+ }
1004
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1005
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1006
1006
  };
1007
1007
 
1008
- function validate$3(obj, path = 'AssessmentContextSearchInputRepresentation') {
1009
- const v_error = (() => {
1010
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1011
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1012
- }
1013
- const obj_derivedFilters = obj.derivedFilters;
1014
- const path_derivedFilters = path + '.derivedFilters';
1015
- if (!ArrayIsArray(obj_derivedFilters)) {
1016
- return new TypeError('Expected "array" but received "' + typeof obj_derivedFilters + '" (at "' + path_derivedFilters + '")');
1017
- }
1018
- for (let i = 0; i < obj_derivedFilters.length; i++) {
1019
- const obj_derivedFilters_item = obj_derivedFilters[i];
1020
- const path_derivedFilters_item = path_derivedFilters + '[' + i + ']';
1021
- if (typeof obj_derivedFilters_item !== 'object' || ArrayIsArray(obj_derivedFilters_item) || obj_derivedFilters_item === null) {
1022
- return new TypeError('Expected "object" but received "' + typeof obj_derivedFilters_item + '" (at "' + path_derivedFilters_item + '")');
1023
- }
1024
- }
1025
- const obj_filterCriteria = obj.filterCriteria;
1026
- const path_filterCriteria = path + '.filterCriteria';
1027
- if (!ArrayIsArray(obj_filterCriteria)) {
1028
- return new TypeError('Expected "array" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
1029
- }
1030
- for (let i = 0; i < obj_filterCriteria.length; i++) {
1031
- const obj_filterCriteria_item = obj_filterCriteria[i];
1032
- const path_filterCriteria_item = path_filterCriteria + '[' + i + ']';
1033
- if (typeof obj_filterCriteria_item !== 'object' || ArrayIsArray(obj_filterCriteria_item) || obj_filterCriteria_item === null) {
1034
- return new TypeError('Expected "object" but received "' + typeof obj_filterCriteria_item + '" (at "' + path_filterCriteria_item + '")');
1035
- }
1036
- }
1037
- const obj_recordCount = obj.recordCount;
1038
- const path_recordCount = path + '.recordCount';
1039
- let obj_recordCount_union0 = null;
1040
- const obj_recordCount_union0_error = (() => {
1041
- if (typeof obj_recordCount !== 'number' || (typeof obj_recordCount === 'number' && Math.floor(obj_recordCount) !== obj_recordCount)) {
1042
- return new TypeError('Expected "integer" but received "' + typeof obj_recordCount + '" (at "' + path_recordCount + '")');
1043
- }
1044
- })();
1045
- if (obj_recordCount_union0_error != null) {
1046
- obj_recordCount_union0 = obj_recordCount_union0_error.message;
1047
- }
1048
- let obj_recordCount_union1 = null;
1049
- const obj_recordCount_union1_error = (() => {
1050
- if (obj_recordCount !== null) {
1051
- return new TypeError('Expected "null" but received "' + typeof obj_recordCount + '" (at "' + path_recordCount + '")');
1052
- }
1053
- })();
1054
- if (obj_recordCount_union1_error != null) {
1055
- obj_recordCount_union1 = obj_recordCount_union1_error.message;
1056
- }
1057
- if (obj_recordCount_union0 && obj_recordCount_union1) {
1058
- let message = 'Object doesn\'t match union (at "' + path_recordCount + '")';
1059
- message += '\n' + obj_recordCount_union0.split('\n').map((line) => '\t' + line).join('\n');
1060
- message += '\n' + obj_recordCount_union1.split('\n').map((line) => '\t' + line).join('\n');
1061
- return new TypeError(message);
1062
- }
1063
- const obj_recordOffsets = obj.recordOffsets;
1064
- const path_recordOffsets = path + '.recordOffsets';
1065
- if (!ArrayIsArray(obj_recordOffsets)) {
1066
- return new TypeError('Expected "array" but received "' + typeof obj_recordOffsets + '" (at "' + path_recordOffsets + '")');
1067
- }
1068
- for (let i = 0; i < obj_recordOffsets.length; i++) {
1069
- const obj_recordOffsets_item = obj_recordOffsets[i];
1070
- const path_recordOffsets_item = path_recordOffsets + '[' + i + ']';
1071
- if (typeof obj_recordOffsets_item !== 'object' || ArrayIsArray(obj_recordOffsets_item) || obj_recordOffsets_item === null) {
1072
- return new TypeError('Expected "object" but received "' + typeof obj_recordOffsets_item + '" (at "' + path_recordOffsets_item + '")');
1073
- }
1074
- }
1075
- const obj_sortOptions = obj.sortOptions;
1076
- const path_sortOptions = path + '.sortOptions';
1077
- if (!ArrayIsArray(obj_sortOptions)) {
1078
- return new TypeError('Expected "array" but received "' + typeof obj_sortOptions + '" (at "' + path_sortOptions + '")');
1079
- }
1080
- for (let i = 0; i < obj_sortOptions.length; i++) {
1081
- const obj_sortOptions_item = obj_sortOptions[i];
1082
- const path_sortOptions_item = path_sortOptions + '[' + i + ']';
1083
- if (typeof obj_sortOptions_item !== 'object' || ArrayIsArray(obj_sortOptions_item) || obj_sortOptions_item === null) {
1084
- return new TypeError('Expected "object" but received "' + typeof obj_sortOptions_item + '" (at "' + path_sortOptions_item + '")');
1085
- }
1086
- }
1087
- })();
1088
- return v_error === undefined ? null : v_error;
1008
+ function validate$3(obj, path = 'AssessmentContextSearchInputRepresentation') {
1009
+ const v_error = (() => {
1010
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1011
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1012
+ }
1013
+ const obj_derivedFilters = obj.derivedFilters;
1014
+ const path_derivedFilters = path + '.derivedFilters';
1015
+ if (!ArrayIsArray(obj_derivedFilters)) {
1016
+ return new TypeError('Expected "array" but received "' + typeof obj_derivedFilters + '" (at "' + path_derivedFilters + '")');
1017
+ }
1018
+ for (let i = 0; i < obj_derivedFilters.length; i++) {
1019
+ const obj_derivedFilters_item = obj_derivedFilters[i];
1020
+ const path_derivedFilters_item = path_derivedFilters + '[' + i + ']';
1021
+ if (typeof obj_derivedFilters_item !== 'object' || ArrayIsArray(obj_derivedFilters_item) || obj_derivedFilters_item === null) {
1022
+ return new TypeError('Expected "object" but received "' + typeof obj_derivedFilters_item + '" (at "' + path_derivedFilters_item + '")');
1023
+ }
1024
+ }
1025
+ const obj_filterCriteria = obj.filterCriteria;
1026
+ const path_filterCriteria = path + '.filterCriteria';
1027
+ if (!ArrayIsArray(obj_filterCriteria)) {
1028
+ return new TypeError('Expected "array" but received "' + typeof obj_filterCriteria + '" (at "' + path_filterCriteria + '")');
1029
+ }
1030
+ for (let i = 0; i < obj_filterCriteria.length; i++) {
1031
+ const obj_filterCriteria_item = obj_filterCriteria[i];
1032
+ const path_filterCriteria_item = path_filterCriteria + '[' + i + ']';
1033
+ if (typeof obj_filterCriteria_item !== 'object' || ArrayIsArray(obj_filterCriteria_item) || obj_filterCriteria_item === null) {
1034
+ return new TypeError('Expected "object" but received "' + typeof obj_filterCriteria_item + '" (at "' + path_filterCriteria_item + '")');
1035
+ }
1036
+ }
1037
+ const obj_recordCount = obj.recordCount;
1038
+ const path_recordCount = path + '.recordCount';
1039
+ let obj_recordCount_union0 = null;
1040
+ const obj_recordCount_union0_error = (() => {
1041
+ if (typeof obj_recordCount !== 'number' || (typeof obj_recordCount === 'number' && Math.floor(obj_recordCount) !== obj_recordCount)) {
1042
+ return new TypeError('Expected "integer" but received "' + typeof obj_recordCount + '" (at "' + path_recordCount + '")');
1043
+ }
1044
+ })();
1045
+ if (obj_recordCount_union0_error != null) {
1046
+ obj_recordCount_union0 = obj_recordCount_union0_error.message;
1047
+ }
1048
+ let obj_recordCount_union1 = null;
1049
+ const obj_recordCount_union1_error = (() => {
1050
+ if (obj_recordCount !== null) {
1051
+ return new TypeError('Expected "null" but received "' + typeof obj_recordCount + '" (at "' + path_recordCount + '")');
1052
+ }
1053
+ })();
1054
+ if (obj_recordCount_union1_error != null) {
1055
+ obj_recordCount_union1 = obj_recordCount_union1_error.message;
1056
+ }
1057
+ if (obj_recordCount_union0 && obj_recordCount_union1) {
1058
+ let message = 'Object doesn\'t match union (at "' + path_recordCount + '")';
1059
+ message += '\n' + obj_recordCount_union0.split('\n').map((line) => '\t' + line).join('\n');
1060
+ message += '\n' + obj_recordCount_union1.split('\n').map((line) => '\t' + line).join('\n');
1061
+ return new TypeError(message);
1062
+ }
1063
+ const obj_recordOffsets = obj.recordOffsets;
1064
+ const path_recordOffsets = path + '.recordOffsets';
1065
+ if (!ArrayIsArray(obj_recordOffsets)) {
1066
+ return new TypeError('Expected "array" but received "' + typeof obj_recordOffsets + '" (at "' + path_recordOffsets + '")');
1067
+ }
1068
+ for (let i = 0; i < obj_recordOffsets.length; i++) {
1069
+ const obj_recordOffsets_item = obj_recordOffsets[i];
1070
+ const path_recordOffsets_item = path_recordOffsets + '[' + i + ']';
1071
+ if (typeof obj_recordOffsets_item !== 'object' || ArrayIsArray(obj_recordOffsets_item) || obj_recordOffsets_item === null) {
1072
+ return new TypeError('Expected "object" but received "' + typeof obj_recordOffsets_item + '" (at "' + path_recordOffsets_item + '")');
1073
+ }
1074
+ }
1075
+ const obj_sortOptions = obj.sortOptions;
1076
+ const path_sortOptions = path + '.sortOptions';
1077
+ if (!ArrayIsArray(obj_sortOptions)) {
1078
+ return new TypeError('Expected "array" but received "' + typeof obj_sortOptions + '" (at "' + path_sortOptions + '")');
1079
+ }
1080
+ for (let i = 0; i < obj_sortOptions.length; i++) {
1081
+ const obj_sortOptions_item = obj_sortOptions[i];
1082
+ const path_sortOptions_item = path_sortOptions + '[' + i + ']';
1083
+ if (typeof obj_sortOptions_item !== 'object' || ArrayIsArray(obj_sortOptions_item) || obj_sortOptions_item === null) {
1084
+ return new TypeError('Expected "object" but received "' + typeof obj_sortOptions_item + '" (at "' + path_sortOptions_item + '")');
1085
+ }
1086
+ }
1087
+ })();
1088
+ return v_error === undefined ? null : v_error;
1089
1089
  }
1090
1090
 
1091
- const VERSION$2 = "361228de698774d4d72eedff57ba707a";
1092
- function validate$2(obj, path = 'RecordOffsetRepresentation') {
1093
- const v_error = (() => {
1094
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1095
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1096
- }
1097
- const obj_offsetName = obj.offsetName;
1098
- const path_offsetName = path + '.offsetName';
1099
- let obj_offsetName_union0 = null;
1100
- const obj_offsetName_union0_error = (() => {
1101
- if (typeof obj_offsetName !== 'string') {
1102
- return new TypeError('Expected "string" but received "' + typeof obj_offsetName + '" (at "' + path_offsetName + '")');
1103
- }
1104
- })();
1105
- if (obj_offsetName_union0_error != null) {
1106
- obj_offsetName_union0 = obj_offsetName_union0_error.message;
1107
- }
1108
- let obj_offsetName_union1 = null;
1109
- const obj_offsetName_union1_error = (() => {
1110
- if (obj_offsetName !== null) {
1111
- return new TypeError('Expected "null" but received "' + typeof obj_offsetName + '" (at "' + path_offsetName + '")');
1112
- }
1113
- })();
1114
- if (obj_offsetName_union1_error != null) {
1115
- obj_offsetName_union1 = obj_offsetName_union1_error.message;
1116
- }
1117
- if (obj_offsetName_union0 && obj_offsetName_union1) {
1118
- let message = 'Object doesn\'t match union (at "' + path_offsetName + '")';
1119
- message += '\n' + obj_offsetName_union0.split('\n').map((line) => '\t' + line).join('\n');
1120
- message += '\n' + obj_offsetName_union1.split('\n').map((line) => '\t' + line).join('\n');
1121
- return new TypeError(message);
1122
- }
1123
- const obj_value = obj.value;
1124
- const path_value = path + '.value';
1125
- let obj_value_union0 = null;
1126
- const obj_value_union0_error = (() => {
1127
- if (typeof obj_value !== 'number' || (typeof obj_value === 'number' && Math.floor(obj_value) !== obj_value)) {
1128
- return new TypeError('Expected "integer" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1129
- }
1130
- })();
1131
- if (obj_value_union0_error != null) {
1132
- obj_value_union0 = obj_value_union0_error.message;
1133
- }
1134
- let obj_value_union1 = null;
1135
- const obj_value_union1_error = (() => {
1136
- if (obj_value !== null) {
1137
- return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1138
- }
1139
- })();
1140
- if (obj_value_union1_error != null) {
1141
- obj_value_union1 = obj_value_union1_error.message;
1142
- }
1143
- if (obj_value_union0 && obj_value_union1) {
1144
- let message = 'Object doesn\'t match union (at "' + path_value + '")';
1145
- message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
1146
- message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
1147
- return new TypeError(message);
1148
- }
1149
- })();
1150
- return v_error === undefined ? null : v_error;
1151
- }
1152
- const select$3 = function RecordOffsetRepresentationSelect() {
1153
- return {
1154
- kind: 'Fragment',
1155
- version: VERSION$2,
1156
- private: [],
1157
- selections: [
1158
- {
1159
- name: 'offsetName',
1160
- kind: 'Scalar'
1161
- },
1162
- {
1163
- name: 'value',
1164
- kind: 'Scalar'
1165
- }
1166
- ]
1167
- };
1168
- };
1169
- function equals$2(existing, incoming) {
1170
- const existing_offsetName = existing.offsetName;
1171
- const incoming_offsetName = incoming.offsetName;
1172
- if (!(existing_offsetName === incoming_offsetName)) {
1173
- return false;
1174
- }
1175
- const existing_value = existing.value;
1176
- const incoming_value = incoming.value;
1177
- if (!(existing_value === incoming_value)) {
1178
- return false;
1179
- }
1180
- return true;
1091
+ const VERSION$2 = "361228de698774d4d72eedff57ba707a";
1092
+ function validate$2(obj, path = 'RecordOffsetRepresentation') {
1093
+ const v_error = (() => {
1094
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1095
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1096
+ }
1097
+ const obj_offsetName = obj.offsetName;
1098
+ const path_offsetName = path + '.offsetName';
1099
+ let obj_offsetName_union0 = null;
1100
+ const obj_offsetName_union0_error = (() => {
1101
+ if (typeof obj_offsetName !== 'string') {
1102
+ return new TypeError('Expected "string" but received "' + typeof obj_offsetName + '" (at "' + path_offsetName + '")');
1103
+ }
1104
+ })();
1105
+ if (obj_offsetName_union0_error != null) {
1106
+ obj_offsetName_union0 = obj_offsetName_union0_error.message;
1107
+ }
1108
+ let obj_offsetName_union1 = null;
1109
+ const obj_offsetName_union1_error = (() => {
1110
+ if (obj_offsetName !== null) {
1111
+ return new TypeError('Expected "null" but received "' + typeof obj_offsetName + '" (at "' + path_offsetName + '")');
1112
+ }
1113
+ })();
1114
+ if (obj_offsetName_union1_error != null) {
1115
+ obj_offsetName_union1 = obj_offsetName_union1_error.message;
1116
+ }
1117
+ if (obj_offsetName_union0 && obj_offsetName_union1) {
1118
+ let message = 'Object doesn\'t match union (at "' + path_offsetName + '")';
1119
+ message += '\n' + obj_offsetName_union0.split('\n').map((line) => '\t' + line).join('\n');
1120
+ message += '\n' + obj_offsetName_union1.split('\n').map((line) => '\t' + line).join('\n');
1121
+ return new TypeError(message);
1122
+ }
1123
+ const obj_value = obj.value;
1124
+ const path_value = path + '.value';
1125
+ let obj_value_union0 = null;
1126
+ const obj_value_union0_error = (() => {
1127
+ if (typeof obj_value !== 'number' || (typeof obj_value === 'number' && Math.floor(obj_value) !== obj_value)) {
1128
+ return new TypeError('Expected "integer" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1129
+ }
1130
+ })();
1131
+ if (obj_value_union0_error != null) {
1132
+ obj_value_union0 = obj_value_union0_error.message;
1133
+ }
1134
+ let obj_value_union1 = null;
1135
+ const obj_value_union1_error = (() => {
1136
+ if (obj_value !== null) {
1137
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
1138
+ }
1139
+ })();
1140
+ if (obj_value_union1_error != null) {
1141
+ obj_value_union1 = obj_value_union1_error.message;
1142
+ }
1143
+ if (obj_value_union0 && obj_value_union1) {
1144
+ let message = 'Object doesn\'t match union (at "' + path_value + '")';
1145
+ message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
1146
+ message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
1147
+ return new TypeError(message);
1148
+ }
1149
+ })();
1150
+ return v_error === undefined ? null : v_error;
1151
+ }
1152
+ const select$3 = function RecordOffsetRepresentationSelect() {
1153
+ return {
1154
+ kind: 'Fragment',
1155
+ version: VERSION$2,
1156
+ private: [],
1157
+ selections: [
1158
+ {
1159
+ name: 'offsetName',
1160
+ kind: 'Scalar'
1161
+ },
1162
+ {
1163
+ name: 'value',
1164
+ kind: 'Scalar'
1165
+ }
1166
+ ]
1167
+ };
1168
+ };
1169
+ function equals$2(existing, incoming) {
1170
+ const existing_offsetName = existing.offsetName;
1171
+ const incoming_offsetName = incoming.offsetName;
1172
+ if (!(existing_offsetName === incoming_offsetName)) {
1173
+ return false;
1174
+ }
1175
+ const existing_value = existing.value;
1176
+ const incoming_value = incoming.value;
1177
+ if (!(existing_value === incoming_value)) {
1178
+ return false;
1179
+ }
1180
+ return true;
1181
1181
  }
1182
1182
 
1183
- const VERSION$1 = "23514af8a9791ed725bda55d989be951";
1184
- function validate$1(obj, path = 'RecordsRepresentation') {
1185
- const v_error = (() => {
1186
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1187
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1188
- }
1189
- const obj_assessmentEnvelopeId = obj.assessmentEnvelopeId;
1190
- const path_assessmentEnvelopeId = path + '.assessmentEnvelopeId';
1191
- let obj_assessmentEnvelopeId_union0 = null;
1192
- const obj_assessmentEnvelopeId_union0_error = (() => {
1193
- if (typeof obj_assessmentEnvelopeId !== 'string') {
1194
- return new TypeError('Expected "string" but received "' + typeof obj_assessmentEnvelopeId + '" (at "' + path_assessmentEnvelopeId + '")');
1195
- }
1196
- })();
1197
- if (obj_assessmentEnvelopeId_union0_error != null) {
1198
- obj_assessmentEnvelopeId_union0 = obj_assessmentEnvelopeId_union0_error.message;
1199
- }
1200
- let obj_assessmentEnvelopeId_union1 = null;
1201
- const obj_assessmentEnvelopeId_union1_error = (() => {
1202
- if (obj_assessmentEnvelopeId !== null) {
1203
- return new TypeError('Expected "null" but received "' + typeof obj_assessmentEnvelopeId + '" (at "' + path_assessmentEnvelopeId + '")');
1204
- }
1205
- })();
1206
- if (obj_assessmentEnvelopeId_union1_error != null) {
1207
- obj_assessmentEnvelopeId_union1 = obj_assessmentEnvelopeId_union1_error.message;
1208
- }
1209
- if (obj_assessmentEnvelopeId_union0 && obj_assessmentEnvelopeId_union1) {
1210
- let message = 'Object doesn\'t match union (at "' + path_assessmentEnvelopeId + '")';
1211
- message += '\n' + obj_assessmentEnvelopeId_union0.split('\n').map((line) => '\t' + line).join('\n');
1212
- message += '\n' + obj_assessmentEnvelopeId_union1.split('\n').map((line) => '\t' + line).join('\n');
1213
- return new TypeError(message);
1214
- }
1215
- const obj_assessmentEnvelopeItemId = obj.assessmentEnvelopeItemId;
1216
- const path_assessmentEnvelopeItemId = path + '.assessmentEnvelopeItemId';
1217
- let obj_assessmentEnvelopeItemId_union0 = null;
1218
- const obj_assessmentEnvelopeItemId_union0_error = (() => {
1219
- if (typeof obj_assessmentEnvelopeItemId !== 'string') {
1220
- return new TypeError('Expected "string" but received "' + typeof obj_assessmentEnvelopeItemId + '" (at "' + path_assessmentEnvelopeItemId + '")');
1221
- }
1222
- })();
1223
- if (obj_assessmentEnvelopeItemId_union0_error != null) {
1224
- obj_assessmentEnvelopeItemId_union0 = obj_assessmentEnvelopeItemId_union0_error.message;
1225
- }
1226
- let obj_assessmentEnvelopeItemId_union1 = null;
1227
- const obj_assessmentEnvelopeItemId_union1_error = (() => {
1228
- if (obj_assessmentEnvelopeItemId !== null) {
1229
- return new TypeError('Expected "null" but received "' + typeof obj_assessmentEnvelopeItemId + '" (at "' + path_assessmentEnvelopeItemId + '")');
1230
- }
1231
- })();
1232
- if (obj_assessmentEnvelopeItemId_union1_error != null) {
1233
- obj_assessmentEnvelopeItemId_union1 = obj_assessmentEnvelopeItemId_union1_error.message;
1234
- }
1235
- if (obj_assessmentEnvelopeItemId_union0 && obj_assessmentEnvelopeItemId_union1) {
1236
- let message = 'Object doesn\'t match union (at "' + path_assessmentEnvelopeItemId + '")';
1237
- message += '\n' + obj_assessmentEnvelopeItemId_union0.split('\n').map((line) => '\t' + line).join('\n');
1238
- message += '\n' + obj_assessmentEnvelopeItemId_union1.split('\n').map((line) => '\t' + line).join('\n');
1239
- return new TypeError(message);
1240
- }
1241
- const obj_assessmentId = obj.assessmentId;
1242
- const path_assessmentId = path + '.assessmentId';
1243
- let obj_assessmentId_union0 = null;
1244
- const obj_assessmentId_union0_error = (() => {
1245
- if (typeof obj_assessmentId !== 'string') {
1246
- return new TypeError('Expected "string" but received "' + typeof obj_assessmentId + '" (at "' + path_assessmentId + '")');
1247
- }
1248
- })();
1249
- if (obj_assessmentId_union0_error != null) {
1250
- obj_assessmentId_union0 = obj_assessmentId_union0_error.message;
1251
- }
1252
- let obj_assessmentId_union1 = null;
1253
- const obj_assessmentId_union1_error = (() => {
1254
- if (obj_assessmentId !== null) {
1255
- return new TypeError('Expected "null" but received "' + typeof obj_assessmentId + '" (at "' + path_assessmentId + '")');
1256
- }
1257
- })();
1258
- if (obj_assessmentId_union1_error != null) {
1259
- obj_assessmentId_union1 = obj_assessmentId_union1_error.message;
1260
- }
1261
- if (obj_assessmentId_union0 && obj_assessmentId_union1) {
1262
- let message = 'Object doesn\'t match union (at "' + path_assessmentId + '")';
1263
- message += '\n' + obj_assessmentId_union0.split('\n').map((line) => '\t' + line).join('\n');
1264
- message += '\n' + obj_assessmentId_union1.split('\n').map((line) => '\t' + line).join('\n');
1265
- return new TypeError(message);
1266
- }
1267
- const obj_derivedStatus = obj.derivedStatus;
1268
- const path_derivedStatus = path + '.derivedStatus';
1269
- let obj_derivedStatus_union0 = null;
1270
- const obj_derivedStatus_union0_error = (() => {
1271
- if (typeof obj_derivedStatus !== 'string') {
1272
- return new TypeError('Expected "string" but received "' + typeof obj_derivedStatus + '" (at "' + path_derivedStatus + '")');
1273
- }
1274
- })();
1275
- if (obj_derivedStatus_union0_error != null) {
1276
- obj_derivedStatus_union0 = obj_derivedStatus_union0_error.message;
1277
- }
1278
- let obj_derivedStatus_union1 = null;
1279
- const obj_derivedStatus_union1_error = (() => {
1280
- if (obj_derivedStatus !== null) {
1281
- return new TypeError('Expected "null" but received "' + typeof obj_derivedStatus + '" (at "' + path_derivedStatus + '")');
1282
- }
1283
- })();
1284
- if (obj_derivedStatus_union1_error != null) {
1285
- obj_derivedStatus_union1 = obj_derivedStatus_union1_error.message;
1286
- }
1287
- if (obj_derivedStatus_union0 && obj_derivedStatus_union1) {
1288
- let message = 'Object doesn\'t match union (at "' + path_derivedStatus + '")';
1289
- message += '\n' + obj_derivedStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
1290
- message += '\n' + obj_derivedStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
1291
- return new TypeError(message);
1292
- }
1293
- const obj_omniProcessId = obj.omniProcessId;
1294
- const path_omniProcessId = path + '.omniProcessId';
1295
- let obj_omniProcessId_union0 = null;
1296
- const obj_omniProcessId_union0_error = (() => {
1297
- if (typeof obj_omniProcessId !== 'string') {
1298
- return new TypeError('Expected "string" but received "' + typeof obj_omniProcessId + '" (at "' + path_omniProcessId + '")');
1299
- }
1300
- })();
1301
- if (obj_omniProcessId_union0_error != null) {
1302
- obj_omniProcessId_union0 = obj_omniProcessId_union0_error.message;
1303
- }
1304
- let obj_omniProcessId_union1 = null;
1305
- const obj_omniProcessId_union1_error = (() => {
1306
- if (obj_omniProcessId !== null) {
1307
- return new TypeError('Expected "null" but received "' + typeof obj_omniProcessId + '" (at "' + path_omniProcessId + '")');
1308
- }
1309
- })();
1310
- if (obj_omniProcessId_union1_error != null) {
1311
- obj_omniProcessId_union1 = obj_omniProcessId_union1_error.message;
1312
- }
1313
- if (obj_omniProcessId_union0 && obj_omniProcessId_union1) {
1314
- let message = 'Object doesn\'t match union (at "' + path_omniProcessId + '")';
1315
- message += '\n' + obj_omniProcessId_union0.split('\n').map((line) => '\t' + line).join('\n');
1316
- message += '\n' + obj_omniProcessId_union1.split('\n').map((line) => '\t' + line).join('\n');
1317
- return new TypeError(message);
1318
- }
1319
- })();
1320
- return v_error === undefined ? null : v_error;
1321
- }
1322
- const select$2 = function RecordsRepresentationSelect() {
1323
- return {
1324
- kind: 'Fragment',
1325
- version: VERSION$1,
1326
- private: [],
1327
- selections: [
1328
- {
1329
- name: 'assessmentEnvelopeId',
1330
- kind: 'Scalar'
1331
- },
1332
- {
1333
- name: 'assessmentEnvelopeItemId',
1334
- kind: 'Scalar'
1335
- },
1336
- {
1337
- name: 'assessmentId',
1338
- kind: 'Scalar'
1339
- },
1340
- {
1341
- name: 'derivedStatus',
1342
- kind: 'Scalar'
1343
- },
1344
- {
1345
- name: 'omniProcessId',
1346
- kind: 'Scalar'
1347
- }
1348
- ]
1349
- };
1350
- };
1351
- function equals$1(existing, incoming) {
1352
- const existing_assessmentEnvelopeId = existing.assessmentEnvelopeId;
1353
- const incoming_assessmentEnvelopeId = incoming.assessmentEnvelopeId;
1354
- if (!(existing_assessmentEnvelopeId === incoming_assessmentEnvelopeId)) {
1355
- return false;
1356
- }
1357
- const existing_assessmentEnvelopeItemId = existing.assessmentEnvelopeItemId;
1358
- const incoming_assessmentEnvelopeItemId = incoming.assessmentEnvelopeItemId;
1359
- if (!(existing_assessmentEnvelopeItemId === incoming_assessmentEnvelopeItemId)) {
1360
- return false;
1361
- }
1362
- const existing_assessmentId = existing.assessmentId;
1363
- const incoming_assessmentId = incoming.assessmentId;
1364
- if (!(existing_assessmentId === incoming_assessmentId)) {
1365
- return false;
1366
- }
1367
- const existing_derivedStatus = existing.derivedStatus;
1368
- const incoming_derivedStatus = incoming.derivedStatus;
1369
- if (!(existing_derivedStatus === incoming_derivedStatus)) {
1370
- return false;
1371
- }
1372
- const existing_omniProcessId = existing.omniProcessId;
1373
- const incoming_omniProcessId = incoming.omniProcessId;
1374
- if (!(existing_omniProcessId === incoming_omniProcessId)) {
1375
- return false;
1376
- }
1377
- return true;
1183
+ const VERSION$1 = "23514af8a9791ed725bda55d989be951";
1184
+ function validate$1(obj, path = 'RecordsRepresentation') {
1185
+ const v_error = (() => {
1186
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1187
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1188
+ }
1189
+ const obj_assessmentEnvelopeId = obj.assessmentEnvelopeId;
1190
+ const path_assessmentEnvelopeId = path + '.assessmentEnvelopeId';
1191
+ let obj_assessmentEnvelopeId_union0 = null;
1192
+ const obj_assessmentEnvelopeId_union0_error = (() => {
1193
+ if (typeof obj_assessmentEnvelopeId !== 'string') {
1194
+ return new TypeError('Expected "string" but received "' + typeof obj_assessmentEnvelopeId + '" (at "' + path_assessmentEnvelopeId + '")');
1195
+ }
1196
+ })();
1197
+ if (obj_assessmentEnvelopeId_union0_error != null) {
1198
+ obj_assessmentEnvelopeId_union0 = obj_assessmentEnvelopeId_union0_error.message;
1199
+ }
1200
+ let obj_assessmentEnvelopeId_union1 = null;
1201
+ const obj_assessmentEnvelopeId_union1_error = (() => {
1202
+ if (obj_assessmentEnvelopeId !== null) {
1203
+ return new TypeError('Expected "null" but received "' + typeof obj_assessmentEnvelopeId + '" (at "' + path_assessmentEnvelopeId + '")');
1204
+ }
1205
+ })();
1206
+ if (obj_assessmentEnvelopeId_union1_error != null) {
1207
+ obj_assessmentEnvelopeId_union1 = obj_assessmentEnvelopeId_union1_error.message;
1208
+ }
1209
+ if (obj_assessmentEnvelopeId_union0 && obj_assessmentEnvelopeId_union1) {
1210
+ let message = 'Object doesn\'t match union (at "' + path_assessmentEnvelopeId + '")';
1211
+ message += '\n' + obj_assessmentEnvelopeId_union0.split('\n').map((line) => '\t' + line).join('\n');
1212
+ message += '\n' + obj_assessmentEnvelopeId_union1.split('\n').map((line) => '\t' + line).join('\n');
1213
+ return new TypeError(message);
1214
+ }
1215
+ const obj_assessmentEnvelopeItemId = obj.assessmentEnvelopeItemId;
1216
+ const path_assessmentEnvelopeItemId = path + '.assessmentEnvelopeItemId';
1217
+ let obj_assessmentEnvelopeItemId_union0 = null;
1218
+ const obj_assessmentEnvelopeItemId_union0_error = (() => {
1219
+ if (typeof obj_assessmentEnvelopeItemId !== 'string') {
1220
+ return new TypeError('Expected "string" but received "' + typeof obj_assessmentEnvelopeItemId + '" (at "' + path_assessmentEnvelopeItemId + '")');
1221
+ }
1222
+ })();
1223
+ if (obj_assessmentEnvelopeItemId_union0_error != null) {
1224
+ obj_assessmentEnvelopeItemId_union0 = obj_assessmentEnvelopeItemId_union0_error.message;
1225
+ }
1226
+ let obj_assessmentEnvelopeItemId_union1 = null;
1227
+ const obj_assessmentEnvelopeItemId_union1_error = (() => {
1228
+ if (obj_assessmentEnvelopeItemId !== null) {
1229
+ return new TypeError('Expected "null" but received "' + typeof obj_assessmentEnvelopeItemId + '" (at "' + path_assessmentEnvelopeItemId + '")');
1230
+ }
1231
+ })();
1232
+ if (obj_assessmentEnvelopeItemId_union1_error != null) {
1233
+ obj_assessmentEnvelopeItemId_union1 = obj_assessmentEnvelopeItemId_union1_error.message;
1234
+ }
1235
+ if (obj_assessmentEnvelopeItemId_union0 && obj_assessmentEnvelopeItemId_union1) {
1236
+ let message = 'Object doesn\'t match union (at "' + path_assessmentEnvelopeItemId + '")';
1237
+ message += '\n' + obj_assessmentEnvelopeItemId_union0.split('\n').map((line) => '\t' + line).join('\n');
1238
+ message += '\n' + obj_assessmentEnvelopeItemId_union1.split('\n').map((line) => '\t' + line).join('\n');
1239
+ return new TypeError(message);
1240
+ }
1241
+ const obj_assessmentId = obj.assessmentId;
1242
+ const path_assessmentId = path + '.assessmentId';
1243
+ let obj_assessmentId_union0 = null;
1244
+ const obj_assessmentId_union0_error = (() => {
1245
+ if (typeof obj_assessmentId !== 'string') {
1246
+ return new TypeError('Expected "string" but received "' + typeof obj_assessmentId + '" (at "' + path_assessmentId + '")');
1247
+ }
1248
+ })();
1249
+ if (obj_assessmentId_union0_error != null) {
1250
+ obj_assessmentId_union0 = obj_assessmentId_union0_error.message;
1251
+ }
1252
+ let obj_assessmentId_union1 = null;
1253
+ const obj_assessmentId_union1_error = (() => {
1254
+ if (obj_assessmentId !== null) {
1255
+ return new TypeError('Expected "null" but received "' + typeof obj_assessmentId + '" (at "' + path_assessmentId + '")');
1256
+ }
1257
+ })();
1258
+ if (obj_assessmentId_union1_error != null) {
1259
+ obj_assessmentId_union1 = obj_assessmentId_union1_error.message;
1260
+ }
1261
+ if (obj_assessmentId_union0 && obj_assessmentId_union1) {
1262
+ let message = 'Object doesn\'t match union (at "' + path_assessmentId + '")';
1263
+ message += '\n' + obj_assessmentId_union0.split('\n').map((line) => '\t' + line).join('\n');
1264
+ message += '\n' + obj_assessmentId_union1.split('\n').map((line) => '\t' + line).join('\n');
1265
+ return new TypeError(message);
1266
+ }
1267
+ const obj_derivedStatus = obj.derivedStatus;
1268
+ const path_derivedStatus = path + '.derivedStatus';
1269
+ let obj_derivedStatus_union0 = null;
1270
+ const obj_derivedStatus_union0_error = (() => {
1271
+ if (typeof obj_derivedStatus !== 'string') {
1272
+ return new TypeError('Expected "string" but received "' + typeof obj_derivedStatus + '" (at "' + path_derivedStatus + '")');
1273
+ }
1274
+ })();
1275
+ if (obj_derivedStatus_union0_error != null) {
1276
+ obj_derivedStatus_union0 = obj_derivedStatus_union0_error.message;
1277
+ }
1278
+ let obj_derivedStatus_union1 = null;
1279
+ const obj_derivedStatus_union1_error = (() => {
1280
+ if (obj_derivedStatus !== null) {
1281
+ return new TypeError('Expected "null" but received "' + typeof obj_derivedStatus + '" (at "' + path_derivedStatus + '")');
1282
+ }
1283
+ })();
1284
+ if (obj_derivedStatus_union1_error != null) {
1285
+ obj_derivedStatus_union1 = obj_derivedStatus_union1_error.message;
1286
+ }
1287
+ if (obj_derivedStatus_union0 && obj_derivedStatus_union1) {
1288
+ let message = 'Object doesn\'t match union (at "' + path_derivedStatus + '")';
1289
+ message += '\n' + obj_derivedStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
1290
+ message += '\n' + obj_derivedStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
1291
+ return new TypeError(message);
1292
+ }
1293
+ const obj_omniProcessId = obj.omniProcessId;
1294
+ const path_omniProcessId = path + '.omniProcessId';
1295
+ let obj_omniProcessId_union0 = null;
1296
+ const obj_omniProcessId_union0_error = (() => {
1297
+ if (typeof obj_omniProcessId !== 'string') {
1298
+ return new TypeError('Expected "string" but received "' + typeof obj_omniProcessId + '" (at "' + path_omniProcessId + '")');
1299
+ }
1300
+ })();
1301
+ if (obj_omniProcessId_union0_error != null) {
1302
+ obj_omniProcessId_union0 = obj_omniProcessId_union0_error.message;
1303
+ }
1304
+ let obj_omniProcessId_union1 = null;
1305
+ const obj_omniProcessId_union1_error = (() => {
1306
+ if (obj_omniProcessId !== null) {
1307
+ return new TypeError('Expected "null" but received "' + typeof obj_omniProcessId + '" (at "' + path_omniProcessId + '")');
1308
+ }
1309
+ })();
1310
+ if (obj_omniProcessId_union1_error != null) {
1311
+ obj_omniProcessId_union1 = obj_omniProcessId_union1_error.message;
1312
+ }
1313
+ if (obj_omniProcessId_union0 && obj_omniProcessId_union1) {
1314
+ let message = 'Object doesn\'t match union (at "' + path_omniProcessId + '")';
1315
+ message += '\n' + obj_omniProcessId_union0.split('\n').map((line) => '\t' + line).join('\n');
1316
+ message += '\n' + obj_omniProcessId_union1.split('\n').map((line) => '\t' + line).join('\n');
1317
+ return new TypeError(message);
1318
+ }
1319
+ })();
1320
+ return v_error === undefined ? null : v_error;
1321
+ }
1322
+ const select$2 = function RecordsRepresentationSelect() {
1323
+ return {
1324
+ kind: 'Fragment',
1325
+ version: VERSION$1,
1326
+ private: [],
1327
+ selections: [
1328
+ {
1329
+ name: 'assessmentEnvelopeId',
1330
+ kind: 'Scalar'
1331
+ },
1332
+ {
1333
+ name: 'assessmentEnvelopeItemId',
1334
+ kind: 'Scalar'
1335
+ },
1336
+ {
1337
+ name: 'assessmentId',
1338
+ kind: 'Scalar'
1339
+ },
1340
+ {
1341
+ name: 'derivedStatus',
1342
+ kind: 'Scalar'
1343
+ },
1344
+ {
1345
+ name: 'omniProcessId',
1346
+ kind: 'Scalar'
1347
+ }
1348
+ ]
1349
+ };
1350
+ };
1351
+ function equals$1(existing, incoming) {
1352
+ const existing_assessmentEnvelopeId = existing.assessmentEnvelopeId;
1353
+ const incoming_assessmentEnvelopeId = incoming.assessmentEnvelopeId;
1354
+ if (!(existing_assessmentEnvelopeId === incoming_assessmentEnvelopeId)) {
1355
+ return false;
1356
+ }
1357
+ const existing_assessmentEnvelopeItemId = existing.assessmentEnvelopeItemId;
1358
+ const incoming_assessmentEnvelopeItemId = incoming.assessmentEnvelopeItemId;
1359
+ if (!(existing_assessmentEnvelopeItemId === incoming_assessmentEnvelopeItemId)) {
1360
+ return false;
1361
+ }
1362
+ const existing_assessmentId = existing.assessmentId;
1363
+ const incoming_assessmentId = incoming.assessmentId;
1364
+ if (!(existing_assessmentId === incoming_assessmentId)) {
1365
+ return false;
1366
+ }
1367
+ const existing_derivedStatus = existing.derivedStatus;
1368
+ const incoming_derivedStatus = incoming.derivedStatus;
1369
+ if (!(existing_derivedStatus === incoming_derivedStatus)) {
1370
+ return false;
1371
+ }
1372
+ const existing_omniProcessId = existing.omniProcessId;
1373
+ const incoming_omniProcessId = incoming.omniProcessId;
1374
+ if (!(existing_omniProcessId === incoming_omniProcessId)) {
1375
+ return false;
1376
+ }
1377
+ return true;
1378
1378
  }
1379
1379
 
1380
- const VERSION = "c1956ceb39431373785587564063205e";
1381
- function validate(obj, path = 'AssessmentContextSearchResultRepresentation') {
1382
- const v_error = (() => {
1383
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1384
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1385
- }
1386
- const obj_hasMoreRecords = obj.hasMoreRecords;
1387
- const path_hasMoreRecords = path + '.hasMoreRecords';
1388
- if (typeof obj_hasMoreRecords !== 'boolean') {
1389
- return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreRecords + '" (at "' + path_hasMoreRecords + '")');
1390
- }
1391
- const obj_isSuccess = obj.isSuccess;
1392
- const path_isSuccess = path + '.isSuccess';
1393
- if (typeof obj_isSuccess !== 'boolean') {
1394
- return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1395
- }
1396
- const obj_message = obj.message;
1397
- const path_message = path + '.message';
1398
- let obj_message_union0 = null;
1399
- const obj_message_union0_error = (() => {
1400
- if (typeof obj_message !== 'string') {
1401
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1402
- }
1403
- })();
1404
- if (obj_message_union0_error != null) {
1405
- obj_message_union0 = obj_message_union0_error.message;
1406
- }
1407
- let obj_message_union1 = null;
1408
- const obj_message_union1_error = (() => {
1409
- if (obj_message !== null) {
1410
- return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1411
- }
1412
- })();
1413
- if (obj_message_union1_error != null) {
1414
- obj_message_union1 = obj_message_union1_error.message;
1415
- }
1416
- if (obj_message_union0 && obj_message_union1) {
1417
- let message = 'Object doesn\'t match union (at "' + path_message + '")';
1418
- message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
1419
- message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
1420
- return new TypeError(message);
1421
- }
1422
- const obj_recordOffsets = obj.recordOffsets;
1423
- const path_recordOffsets = path + '.recordOffsets';
1424
- if (!ArrayIsArray(obj_recordOffsets)) {
1425
- return new TypeError('Expected "array" but received "' + typeof obj_recordOffsets + '" (at "' + path_recordOffsets + '")');
1426
- }
1427
- for (let i = 0; i < obj_recordOffsets.length; i++) {
1428
- const obj_recordOffsets_item = obj_recordOffsets[i];
1429
- const path_recordOffsets_item = path_recordOffsets + '[' + i + ']';
1430
- const referencepath_recordOffsets_itemValidationError = validate$2(obj_recordOffsets_item, path_recordOffsets_item);
1431
- if (referencepath_recordOffsets_itemValidationError !== null) {
1432
- let message = 'Object doesn\'t match RecordOffsetRepresentation (at "' + path_recordOffsets_item + '")\n';
1433
- message += referencepath_recordOffsets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1434
- return new TypeError(message);
1435
- }
1436
- }
1437
- const obj_records = obj.records;
1438
- const path_records = path + '.records';
1439
- if (!ArrayIsArray(obj_records)) {
1440
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1441
- }
1442
- for (let i = 0; i < obj_records.length; i++) {
1443
- const obj_records_item = obj_records[i];
1444
- const path_records_item = path_records + '[' + i + ']';
1445
- const referencepath_records_itemValidationError = validate$1(obj_records_item, path_records_item);
1446
- if (referencepath_records_itemValidationError !== null) {
1447
- let message = 'Object doesn\'t match RecordsRepresentation (at "' + path_records_item + '")\n';
1448
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1449
- return new TypeError(message);
1450
- }
1451
- }
1452
- })();
1453
- return v_error === undefined ? null : v_error;
1454
- }
1455
- const RepresentationType = 'AssessmentContextSearchResultRepresentation';
1456
- function keyBuilder(luvio, config) {
1457
- return keyPrefix + '::' + RepresentationType + ':' + config.isSuccess;
1458
- }
1459
- function keyBuilderFromType(luvio, object) {
1460
- const keyParams = {
1461
- isSuccess: object.isSuccess
1462
- };
1463
- return keyBuilder(luvio, keyParams);
1464
- }
1465
- function normalize(input, existing, path, luvio, store, timestamp) {
1466
- return input;
1467
- }
1468
- const select$1 = function AssessmentContextSearchResultRepresentationSelect() {
1469
- const { selections: RecordOffsetRepresentation__selections, opaque: RecordOffsetRepresentation__opaque, } = select$3();
1470
- const { selections: RecordsRepresentation__selections, opaque: RecordsRepresentation__opaque, } = select$2();
1471
- return {
1472
- kind: 'Fragment',
1473
- version: VERSION,
1474
- private: [],
1475
- selections: [
1476
- {
1477
- name: 'hasMoreRecords',
1478
- kind: 'Scalar'
1479
- },
1480
- {
1481
- name: 'isSuccess',
1482
- kind: 'Scalar'
1483
- },
1484
- {
1485
- name: 'message',
1486
- kind: 'Scalar'
1487
- },
1488
- {
1489
- name: 'recordOffsets',
1490
- kind: 'Object',
1491
- plural: true,
1492
- selections: RecordOffsetRepresentation__selections
1493
- },
1494
- {
1495
- name: 'records',
1496
- kind: 'Object',
1497
- plural: true,
1498
- selections: RecordsRepresentation__selections
1499
- }
1500
- ]
1501
- };
1502
- };
1503
- function equals(existing, incoming) {
1504
- const existing_hasMoreRecords = existing.hasMoreRecords;
1505
- const incoming_hasMoreRecords = incoming.hasMoreRecords;
1506
- if (!(existing_hasMoreRecords === incoming_hasMoreRecords)) {
1507
- return false;
1508
- }
1509
- const existing_isSuccess = existing.isSuccess;
1510
- const incoming_isSuccess = incoming.isSuccess;
1511
- if (!(existing_isSuccess === incoming_isSuccess)) {
1512
- return false;
1513
- }
1514
- const existing_message = existing.message;
1515
- const incoming_message = incoming.message;
1516
- if (!(existing_message === incoming_message)) {
1517
- return false;
1518
- }
1519
- const existing_recordOffsets = existing.recordOffsets;
1520
- const incoming_recordOffsets = incoming.recordOffsets;
1521
- const equals_recordOffsets_items = equalsArray(existing_recordOffsets, incoming_recordOffsets, (existing_recordOffsets_item, incoming_recordOffsets_item) => {
1522
- if (!(equals$2(existing_recordOffsets_item, incoming_recordOffsets_item))) {
1523
- return false;
1524
- }
1525
- });
1526
- if (equals_recordOffsets_items === false) {
1527
- return false;
1528
- }
1529
- const existing_records = existing.records;
1530
- const incoming_records = incoming.records;
1531
- const equals_records_items = equalsArray(existing_records, incoming_records, (existing_records_item, incoming_records_item) => {
1532
- if (!(equals$1(existing_records_item, incoming_records_item))) {
1533
- return false;
1534
- }
1535
- });
1536
- if (equals_records_items === false) {
1537
- return false;
1538
- }
1539
- return true;
1540
- }
1541
- const ingest = function AssessmentContextSearchResultRepresentationIngest(input, path, luvio, store, timestamp) {
1542
- if (process.env.NODE_ENV !== 'production') {
1543
- const validateError = validate(input);
1544
- if (validateError !== null) {
1545
- throw validateError;
1546
- }
1547
- }
1548
- const key = keyBuilderFromType(luvio, input);
1549
- const existingRecord = store.readEntry(key);
1550
- const ttlToUse = path.ttl !== undefined ? path.ttl : 6000;
1551
- let incomingRecord = normalize(input, store.readEntry(key), {
1552
- fullPath: key,
1553
- parent: path.parent,
1554
- propertyName: path.propertyName,
1555
- ttl: ttlToUse
1556
- });
1557
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1558
- luvio.storePublish(key, incomingRecord);
1559
- }
1560
- if (ttlToUse !== undefined) {
1561
- const storeMetadataParams = {
1562
- ttl: ttlToUse,
1563
- namespace: "assessment",
1564
- version: VERSION,
1565
- representationName: RepresentationType,
1566
- };
1567
- luvio.publishStoreMetadata(key, storeMetadataParams);
1568
- }
1569
- return createLink(key);
1570
- };
1571
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
1572
- const rootKeySet = new StoreKeyMap();
1573
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1574
- const rootKey = keyBuilderFromType(luvio, input);
1575
- rootKeySet.set(rootKey, {
1576
- namespace: keyPrefix,
1577
- representationName: RepresentationType,
1578
- mergeable: false
1579
- });
1580
- return rootKeySet;
1380
+ const VERSION = "c1956ceb39431373785587564063205e";
1381
+ function validate(obj, path = 'AssessmentContextSearchResultRepresentation') {
1382
+ const v_error = (() => {
1383
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1384
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1385
+ }
1386
+ const obj_hasMoreRecords = obj.hasMoreRecords;
1387
+ const path_hasMoreRecords = path + '.hasMoreRecords';
1388
+ if (typeof obj_hasMoreRecords !== 'boolean') {
1389
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasMoreRecords + '" (at "' + path_hasMoreRecords + '")');
1390
+ }
1391
+ const obj_isSuccess = obj.isSuccess;
1392
+ const path_isSuccess = path + '.isSuccess';
1393
+ if (typeof obj_isSuccess !== 'boolean') {
1394
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
1395
+ }
1396
+ const obj_message = obj.message;
1397
+ const path_message = path + '.message';
1398
+ let obj_message_union0 = null;
1399
+ const obj_message_union0_error = (() => {
1400
+ if (typeof obj_message !== 'string') {
1401
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1402
+ }
1403
+ })();
1404
+ if (obj_message_union0_error != null) {
1405
+ obj_message_union0 = obj_message_union0_error.message;
1406
+ }
1407
+ let obj_message_union1 = null;
1408
+ const obj_message_union1_error = (() => {
1409
+ if (obj_message !== null) {
1410
+ return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
1411
+ }
1412
+ })();
1413
+ if (obj_message_union1_error != null) {
1414
+ obj_message_union1 = obj_message_union1_error.message;
1415
+ }
1416
+ if (obj_message_union0 && obj_message_union1) {
1417
+ let message = 'Object doesn\'t match union (at "' + path_message + '")';
1418
+ message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
1419
+ message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
1420
+ return new TypeError(message);
1421
+ }
1422
+ const obj_recordOffsets = obj.recordOffsets;
1423
+ const path_recordOffsets = path + '.recordOffsets';
1424
+ if (!ArrayIsArray(obj_recordOffsets)) {
1425
+ return new TypeError('Expected "array" but received "' + typeof obj_recordOffsets + '" (at "' + path_recordOffsets + '")');
1426
+ }
1427
+ for (let i = 0; i < obj_recordOffsets.length; i++) {
1428
+ const obj_recordOffsets_item = obj_recordOffsets[i];
1429
+ const path_recordOffsets_item = path_recordOffsets + '[' + i + ']';
1430
+ const referencepath_recordOffsets_itemValidationError = validate$2(obj_recordOffsets_item, path_recordOffsets_item);
1431
+ if (referencepath_recordOffsets_itemValidationError !== null) {
1432
+ let message = 'Object doesn\'t match RecordOffsetRepresentation (at "' + path_recordOffsets_item + '")\n';
1433
+ message += referencepath_recordOffsets_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1434
+ return new TypeError(message);
1435
+ }
1436
+ }
1437
+ const obj_records = obj.records;
1438
+ const path_records = path + '.records';
1439
+ if (!ArrayIsArray(obj_records)) {
1440
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1441
+ }
1442
+ for (let i = 0; i < obj_records.length; i++) {
1443
+ const obj_records_item = obj_records[i];
1444
+ const path_records_item = path_records + '[' + i + ']';
1445
+ const referencepath_records_itemValidationError = validate$1(obj_records_item, path_records_item);
1446
+ if (referencepath_records_itemValidationError !== null) {
1447
+ let message = 'Object doesn\'t match RecordsRepresentation (at "' + path_records_item + '")\n';
1448
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1449
+ return new TypeError(message);
1450
+ }
1451
+ }
1452
+ })();
1453
+ return v_error === undefined ? null : v_error;
1454
+ }
1455
+ const RepresentationType = 'AssessmentContextSearchResultRepresentation';
1456
+ function keyBuilder(luvio, config) {
1457
+ return keyPrefix + '::' + RepresentationType + ':' + config.isSuccess;
1458
+ }
1459
+ function keyBuilderFromType(luvio, object) {
1460
+ const keyParams = {
1461
+ isSuccess: object.isSuccess
1462
+ };
1463
+ return keyBuilder(luvio, keyParams);
1464
+ }
1465
+ function normalize(input, existing, path, luvio, store, timestamp) {
1466
+ return input;
1467
+ }
1468
+ const select$1 = function AssessmentContextSearchResultRepresentationSelect() {
1469
+ const { selections: RecordOffsetRepresentation__selections, opaque: RecordOffsetRepresentation__opaque, } = select$3();
1470
+ const { selections: RecordsRepresentation__selections, opaque: RecordsRepresentation__opaque, } = select$2();
1471
+ return {
1472
+ kind: 'Fragment',
1473
+ version: VERSION,
1474
+ private: [],
1475
+ selections: [
1476
+ {
1477
+ name: 'hasMoreRecords',
1478
+ kind: 'Scalar'
1479
+ },
1480
+ {
1481
+ name: 'isSuccess',
1482
+ kind: 'Scalar'
1483
+ },
1484
+ {
1485
+ name: 'message',
1486
+ kind: 'Scalar'
1487
+ },
1488
+ {
1489
+ name: 'recordOffsets',
1490
+ kind: 'Object',
1491
+ plural: true,
1492
+ selections: RecordOffsetRepresentation__selections
1493
+ },
1494
+ {
1495
+ name: 'records',
1496
+ kind: 'Object',
1497
+ plural: true,
1498
+ selections: RecordsRepresentation__selections
1499
+ }
1500
+ ]
1501
+ };
1502
+ };
1503
+ function equals(existing, incoming) {
1504
+ const existing_hasMoreRecords = existing.hasMoreRecords;
1505
+ const incoming_hasMoreRecords = incoming.hasMoreRecords;
1506
+ if (!(existing_hasMoreRecords === incoming_hasMoreRecords)) {
1507
+ return false;
1508
+ }
1509
+ const existing_isSuccess = existing.isSuccess;
1510
+ const incoming_isSuccess = incoming.isSuccess;
1511
+ if (!(existing_isSuccess === incoming_isSuccess)) {
1512
+ return false;
1513
+ }
1514
+ const existing_message = existing.message;
1515
+ const incoming_message = incoming.message;
1516
+ if (!(existing_message === incoming_message)) {
1517
+ return false;
1518
+ }
1519
+ const existing_recordOffsets = existing.recordOffsets;
1520
+ const incoming_recordOffsets = incoming.recordOffsets;
1521
+ const equals_recordOffsets_items = equalsArray(existing_recordOffsets, incoming_recordOffsets, (existing_recordOffsets_item, incoming_recordOffsets_item) => {
1522
+ if (!(equals$2(existing_recordOffsets_item, incoming_recordOffsets_item))) {
1523
+ return false;
1524
+ }
1525
+ });
1526
+ if (equals_recordOffsets_items === false) {
1527
+ return false;
1528
+ }
1529
+ const existing_records = existing.records;
1530
+ const incoming_records = incoming.records;
1531
+ const equals_records_items = equalsArray(existing_records, incoming_records, (existing_records_item, incoming_records_item) => {
1532
+ if (!(equals$1(existing_records_item, incoming_records_item))) {
1533
+ return false;
1534
+ }
1535
+ });
1536
+ if (equals_records_items === false) {
1537
+ return false;
1538
+ }
1539
+ return true;
1540
+ }
1541
+ const ingest = function AssessmentContextSearchResultRepresentationIngest(input, path, luvio, store, timestamp) {
1542
+ if (process.env.NODE_ENV !== 'production') {
1543
+ const validateError = validate(input);
1544
+ if (validateError !== null) {
1545
+ throw validateError;
1546
+ }
1547
+ }
1548
+ const key = keyBuilderFromType(luvio, input);
1549
+ const existingRecord = store.readEntry(key);
1550
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 6000;
1551
+ let incomingRecord = normalize(input, store.readEntry(key), {
1552
+ fullPath: key,
1553
+ parent: path.parent,
1554
+ propertyName: path.propertyName,
1555
+ ttl: ttlToUse
1556
+ });
1557
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1558
+ luvio.storePublish(key, incomingRecord);
1559
+ }
1560
+ if (ttlToUse !== undefined) {
1561
+ const storeMetadataParams = {
1562
+ ttl: ttlToUse,
1563
+ namespace: "assessment",
1564
+ version: VERSION,
1565
+ representationName: RepresentationType,
1566
+ };
1567
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1568
+ }
1569
+ return createLink(key);
1570
+ };
1571
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
1572
+ const rootKeySet = new StoreKeyMap();
1573
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1574
+ const rootKey = keyBuilderFromType(luvio, input);
1575
+ rootKeySet.set(rootKey, {
1576
+ namespace: keyPrefix,
1577
+ representationName: RepresentationType,
1578
+ mergeable: false
1579
+ });
1580
+ return rootKeySet;
1581
1581
  }
1582
1582
 
1583
- function select(luvio, params) {
1584
- return select$1();
1585
- }
1586
- function getResponseCacheKeys(luvio, resourceParams, response) {
1587
- return getTypeCacheKeys(luvio, response);
1588
- }
1589
- function ingestSuccess(luvio, resourceParams, response) {
1590
- const { body } = response;
1591
- const key = keyBuilderFromType(luvio, body);
1592
- luvio.storeIngest(key, ingest, body);
1593
- const snapshot = luvio.storeLookup({
1594
- recordId: key,
1595
- node: select(),
1596
- variables: {},
1597
- });
1598
- if (process.env.NODE_ENV !== 'production') {
1599
- if (snapshot.state !== 'Fulfilled') {
1600
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1601
- }
1602
- }
1603
- return snapshot;
1604
- }
1605
- function createResourceRequest(config) {
1606
- const headers = {};
1607
- return {
1608
- baseUri: '/services/data/v58.0',
1609
- basePath: '/connect/assessments/' + config.urlParams.contextId + '/assessment-elements',
1610
- method: 'post',
1611
- body: config.body,
1612
- urlParams: config.urlParams,
1613
- queryParams: {},
1614
- headers,
1615
- priority: 'normal',
1616
- };
1583
+ function select(luvio, params) {
1584
+ return select$1();
1585
+ }
1586
+ function getResponseCacheKeys(luvio, resourceParams, response) {
1587
+ return getTypeCacheKeys(luvio, response);
1588
+ }
1589
+ function ingestSuccess(luvio, resourceParams, response) {
1590
+ const { body } = response;
1591
+ const key = keyBuilderFromType(luvio, body);
1592
+ luvio.storeIngest(key, ingest, body);
1593
+ const snapshot = luvio.storeLookup({
1594
+ recordId: key,
1595
+ node: select(),
1596
+ variables: {},
1597
+ });
1598
+ if (process.env.NODE_ENV !== 'production') {
1599
+ if (snapshot.state !== 'Fulfilled') {
1600
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1601
+ }
1602
+ }
1603
+ return snapshot;
1604
+ }
1605
+ function createResourceRequest(config) {
1606
+ const headers = {};
1607
+ return {
1608
+ baseUri: '/services/data/v58.0',
1609
+ basePath: '/connect/assessments/' + config.urlParams.contextId + '/assessment-elements',
1610
+ method: 'post',
1611
+ body: config.body,
1612
+ urlParams: config.urlParams,
1613
+ queryParams: {},
1614
+ headers,
1615
+ priority: 'normal',
1616
+ };
1617
1617
  }
1618
1618
 
1619
- const postAssessmentContextSearch_ConfigPropertyNames = {
1620
- displayName: 'postAssessmentContextSearch',
1621
- parameters: {
1622
- required: ['contextId', 'AssessmentContextSearchData'],
1623
- optional: []
1624
- }
1625
- };
1626
- function createResourceParams(config) {
1627
- const resourceParams = {
1628
- urlParams: {
1629
- contextId: config.contextId
1630
- },
1631
- body: {
1632
- AssessmentContextSearchData: config.AssessmentContextSearchData
1633
- }
1634
- };
1635
- return resourceParams;
1636
- }
1637
- function typeCheckConfig(untrustedConfig) {
1638
- const config = {};
1639
- const untrustedConfig_contextId = untrustedConfig.contextId;
1640
- if (typeof untrustedConfig_contextId === 'string') {
1641
- config.contextId = untrustedConfig_contextId;
1642
- }
1643
- const untrustedConfig_AssessmentContextSearchData = untrustedConfig.AssessmentContextSearchData;
1644
- const referenceAssessmentContextSearchInputRepresentationValidationError = validate$3(untrustedConfig_AssessmentContextSearchData);
1645
- if (referenceAssessmentContextSearchInputRepresentationValidationError === null) {
1646
- config.AssessmentContextSearchData = untrustedConfig_AssessmentContextSearchData;
1647
- }
1648
- return config;
1649
- }
1650
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1651
- if (!untrustedIsObject(untrustedConfig)) {
1652
- return null;
1653
- }
1654
- if (process.env.NODE_ENV !== 'production') {
1655
- validateConfig(untrustedConfig, configPropertyNames);
1656
- }
1657
- const config = typeCheckConfig(untrustedConfig);
1658
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1659
- return null;
1660
- }
1661
- return config;
1662
- }
1663
- function buildNetworkSnapshot(luvio, config, options) {
1664
- const resourceParams = createResourceParams(config);
1665
- const request = createResourceRequest(resourceParams);
1666
- return luvio.dispatchResourceRequest(request, options)
1667
- .then((response) => {
1668
- return luvio.handleSuccessResponse(() => {
1669
- const snapshot = ingestSuccess(luvio, resourceParams, response);
1670
- return luvio.storeBroadcast().then(() => snapshot);
1671
- }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
1672
- }, (response) => {
1673
- deepFreeze$3(response);
1674
- throw response;
1675
- });
1676
- }
1677
- const postAssessmentContextSearchAdapterFactory = (luvio) => {
1678
- return function postAssessmentContextSearch(untrustedConfig) {
1679
- const config = validateAdapterConfig(untrustedConfig, postAssessmentContextSearch_ConfigPropertyNames);
1680
- // Invalid or incomplete config
1681
- if (config === null) {
1682
- throw new Error('Invalid config for "postAssessmentContextSearch"');
1683
- }
1684
- return buildNetworkSnapshot(luvio, config);
1685
- };
1619
+ const postAssessmentContextSearch_ConfigPropertyNames = {
1620
+ displayName: 'postAssessmentContextSearch',
1621
+ parameters: {
1622
+ required: ['contextId', 'AssessmentContextSearchData'],
1623
+ optional: []
1624
+ }
1625
+ };
1626
+ function createResourceParams(config) {
1627
+ const resourceParams = {
1628
+ urlParams: {
1629
+ contextId: config.contextId
1630
+ },
1631
+ body: {
1632
+ AssessmentContextSearchData: config.AssessmentContextSearchData
1633
+ }
1634
+ };
1635
+ return resourceParams;
1636
+ }
1637
+ function typeCheckConfig(untrustedConfig) {
1638
+ const config = {};
1639
+ const untrustedConfig_contextId = untrustedConfig.contextId;
1640
+ if (typeof untrustedConfig_contextId === 'string') {
1641
+ config.contextId = untrustedConfig_contextId;
1642
+ }
1643
+ const untrustedConfig_AssessmentContextSearchData = untrustedConfig.AssessmentContextSearchData;
1644
+ const referenceAssessmentContextSearchInputRepresentationValidationError = validate$3(untrustedConfig_AssessmentContextSearchData);
1645
+ if (referenceAssessmentContextSearchInputRepresentationValidationError === null) {
1646
+ config.AssessmentContextSearchData = untrustedConfig_AssessmentContextSearchData;
1647
+ }
1648
+ return config;
1649
+ }
1650
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1651
+ if (!untrustedIsObject(untrustedConfig)) {
1652
+ return null;
1653
+ }
1654
+ if (process.env.NODE_ENV !== 'production') {
1655
+ validateConfig(untrustedConfig, configPropertyNames);
1656
+ }
1657
+ const config = typeCheckConfig(untrustedConfig);
1658
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1659
+ return null;
1660
+ }
1661
+ return config;
1662
+ }
1663
+ function buildNetworkSnapshot(luvio, config, options) {
1664
+ const resourceParams = createResourceParams(config);
1665
+ const request = createResourceRequest(resourceParams);
1666
+ return luvio.dispatchResourceRequest(request, options)
1667
+ .then((response) => {
1668
+ return luvio.handleSuccessResponse(() => {
1669
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
1670
+ return luvio.storeBroadcast().then(() => snapshot);
1671
+ }, () => getResponseCacheKeys(luvio, resourceParams, response.body));
1672
+ }, (response) => {
1673
+ deepFreeze$3(response);
1674
+ throw response;
1675
+ });
1676
+ }
1677
+ const postAssessmentContextSearchAdapterFactory = (luvio) => {
1678
+ return function postAssessmentContextSearch(untrustedConfig) {
1679
+ const config = validateAdapterConfig(untrustedConfig, postAssessmentContextSearch_ConfigPropertyNames);
1680
+ // Invalid or incomplete config
1681
+ if (config === null) {
1682
+ throw new Error('Invalid config for "postAssessmentContextSearch"');
1683
+ }
1684
+ return buildNetworkSnapshot(luvio, config);
1685
+ };
1686
1686
  };
1687
1687
 
1688
1688
  export { getAssessmentEnvelopeAdapterFactory, postAssessmentContextSearchAdapterFactory, postAssessmentEnvelopeAdapterFactory };