@salesforce/lds-adapters-industries-assessment 1.130.9 → 1.131.0-dev10

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