@salesforce/lds-adapters-industries-filebased-dataimport 1.251.0 → 1.252.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/es/es2018/industries-filebased-dataimport.js +1543 -363
  2. package/dist/es/es2018/types/src/generated/adapters/createFileBasedDataImport.d.ts +29 -0
  3. package/dist/es/es2018/types/src/generated/adapters/deleteFileBasedDataImport.d.ts +14 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getAllFields.d.ts +30 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getCsvAutoMap.d.ts +7 -7
  6. package/dist/es/es2018/types/src/generated/adapters/getDPEDefinitions.d.ts +26 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getFileBasedDataImportById.d.ts +28 -0
  8. package/dist/es/es2018/types/src/generated/adapters/updateFileBasedDataImport.d.ts +29 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +6 -0
  10. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +11 -1
  11. package/dist/es/es2018/types/src/generated/resources/deleteConnectIndustriesFileBasedDataImportsByFileBasedImportId.d.ts +12 -0
  12. package/dist/es/es2018/types/src/generated/resources/getConnectIndustriesFileBasedDataImportsAutomap.d.ts +4 -4
  13. package/dist/es/es2018/types/src/generated/resources/getConnectIndustriesFileBasedDataImportsByFileBasedImportId.d.ts +16 -0
  14. package/dist/es/es2018/types/src/generated/resources/getConnectIndustriesFileBasedDataImportsDpeDefinitions.d.ts +12 -0
  15. package/dist/es/es2018/types/src/generated/resources/getConnectIndustriesFileBasedDataImportsEntitiesFieldsByEntityApiName.d.ts +20 -0
  16. package/dist/es/es2018/types/src/generated/resources/patchConnectIndustriesFileBasedDataImportsByFileBasedImportId.d.ts +28 -0
  17. package/dist/es/es2018/types/src/generated/resources/postConnectIndustriesFileBasedDataImports.d.ts +26 -0
  18. package/dist/es/es2018/types/src/generated/types/{AutoMapListResultRepresentation.d.ts → CSVMappingsResultRepresentation.d.ts} +9 -9
  19. package/dist/es/es2018/types/src/generated/types/{AutoMapResultRepresentation.d.ts → CsvMappingRepresentation.d.ts} +13 -12
  20. package/dist/es/es2018/types/src/generated/types/DPEDefinitionOutputRepresentation.d.ts +29 -0
  21. package/dist/es/es2018/types/src/generated/types/DPEDefinitionRepresentation.d.ts +34 -0
  22. package/dist/es/es2018/types/src/generated/types/FieldInfoOutputRepresentation.d.ts +29 -0
  23. package/dist/es/es2018/types/src/generated/types/FileBasedDataImportByUserResultRepresentation.d.ts +12 -3
  24. package/dist/es/es2018/types/src/generated/types/FileBasedDataImportInputRep.d.ts +70 -0
  25. package/dist/es/es2018/types/src/generated/types/FileBasedDataImportRepresentation.d.ts +31 -22
  26. package/dist/es/es2018/types/src/generated/types/FileBasedDataImportUpdateInputRep.d.ts +67 -0
  27. package/package.json +1 -1
  28. package/sfdc/index.js +2397 -1146
  29. package/src/raml/api.raml +277 -20
  30. package/src/raml/luvio.raml +44 -0
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, StoreKeyMap, createResourceParams as createResourceParams$b, typeCheckConfig as typeCheckConfig$b } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -91,8 +91,8 @@ function createLink(ref) {
91
91
  };
92
92
  }
93
93
 
94
- const VERSION$8 = "64c9261a27e284b679e95c5a13a476cb";
95
- function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
94
+ const VERSION$b = "3124b7013ab7c908e4590d64fe411ce3";
95
+ function validate$e(obj, path = 'FileBasedDataImportRepresentation') {
96
96
  const v_error = (() => {
97
97
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
98
98
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -114,8 +114,29 @@ function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
114
114
  if (obj.failedResults !== undefined) {
115
115
  const obj_failedResults = obj.failedResults;
116
116
  const path_failedResults = path + '.failedResults';
117
- if (typeof obj_failedResults !== 'string') {
118
- return new TypeError('Expected "string" but received "' + typeof obj_failedResults + '" (at "' + path_failedResults + '")');
117
+ let obj_failedResults_union0 = null;
118
+ const obj_failedResults_union0_error = (() => {
119
+ if (typeof obj_failedResults !== 'string') {
120
+ return new TypeError('Expected "string" but received "' + typeof obj_failedResults + '" (at "' + path_failedResults + '")');
121
+ }
122
+ })();
123
+ if (obj_failedResults_union0_error != null) {
124
+ obj_failedResults_union0 = obj_failedResults_union0_error.message;
125
+ }
126
+ let obj_failedResults_union1 = null;
127
+ const obj_failedResults_union1_error = (() => {
128
+ if (obj_failedResults !== null) {
129
+ return new TypeError('Expected "null" but received "' + typeof obj_failedResults + '" (at "' + path_failedResults + '")');
130
+ }
131
+ })();
132
+ if (obj_failedResults_union1_error != null) {
133
+ obj_failedResults_union1 = obj_failedResults_union1_error.message;
134
+ }
135
+ if (obj_failedResults_union0 && obj_failedResults_union1) {
136
+ let message = 'Object doesn\'t match union (at "' + path_failedResults + '")';
137
+ message += '\n' + obj_failedResults_union0.split('\n').map((line) => '\t' + line).join('\n');
138
+ message += '\n' + obj_failedResults_union1.split('\n').map((line) => '\t' + line).join('\n');
139
+ return new TypeError(message);
119
140
  }
120
141
  }
121
142
  const obj_fileBasedImportType = obj.fileBasedImportType;
@@ -123,25 +144,42 @@ function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
123
144
  if (typeof obj_fileBasedImportType !== 'string') {
124
145
  return new TypeError('Expected "string" but received "' + typeof obj_fileBasedImportType + '" (at "' + path_fileBasedImportType + '")');
125
146
  }
126
- if (obj.id !== undefined) {
127
- const obj_id = obj.id;
128
- const path_id = path + '.id';
129
- if (typeof obj_id !== 'string') {
130
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
131
- }
147
+ const obj_id = obj.id;
148
+ const path_id = path + '.id';
149
+ if (typeof obj_id !== 'string') {
150
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
132
151
  }
133
- if (obj.importOperationType !== undefined) {
134
- const obj_importOperationType = obj.importOperationType;
135
- const path_importOperationType = path + '.importOperationType';
136
- if (typeof obj_importOperationType !== 'string') {
137
- return new TypeError('Expected "string" but received "' + typeof obj_importOperationType + '" (at "' + path_importOperationType + '")');
138
- }
152
+ const obj_importOperationType = obj.importOperationType;
153
+ const path_importOperationType = path + '.importOperationType';
154
+ if (typeof obj_importOperationType !== 'string') {
155
+ return new TypeError('Expected "string" but received "' + typeof obj_importOperationType + '" (at "' + path_importOperationType + '")');
139
156
  }
140
157
  if (obj.jobIdentifier !== undefined) {
141
158
  const obj_jobIdentifier = obj.jobIdentifier;
142
159
  const path_jobIdentifier = path + '.jobIdentifier';
143
- if (typeof obj_jobIdentifier !== 'string') {
144
- return new TypeError('Expected "string" but received "' + typeof obj_jobIdentifier + '" (at "' + path_jobIdentifier + '")');
160
+ let obj_jobIdentifier_union0 = null;
161
+ const obj_jobIdentifier_union0_error = (() => {
162
+ if (typeof obj_jobIdentifier !== 'string') {
163
+ return new TypeError('Expected "string" but received "' + typeof obj_jobIdentifier + '" (at "' + path_jobIdentifier + '")');
164
+ }
165
+ })();
166
+ if (obj_jobIdentifier_union0_error != null) {
167
+ obj_jobIdentifier_union0 = obj_jobIdentifier_union0_error.message;
168
+ }
169
+ let obj_jobIdentifier_union1 = null;
170
+ const obj_jobIdentifier_union1_error = (() => {
171
+ if (obj_jobIdentifier !== null) {
172
+ return new TypeError('Expected "null" but received "' + typeof obj_jobIdentifier + '" (at "' + path_jobIdentifier + '")');
173
+ }
174
+ })();
175
+ if (obj_jobIdentifier_union1_error != null) {
176
+ obj_jobIdentifier_union1 = obj_jobIdentifier_union1_error.message;
177
+ }
178
+ if (obj_jobIdentifier_union0 && obj_jobIdentifier_union1) {
179
+ let message = 'Object doesn\'t match union (at "' + path_jobIdentifier + '")';
180
+ message += '\n' + obj_jobIdentifier_union0.split('\n').map((line) => '\t' + line).join('\n');
181
+ message += '\n' + obj_jobIdentifier_union1.split('\n').map((line) => '\t' + line).join('\n');
182
+ return new TypeError(message);
145
183
  }
146
184
  }
147
185
  if (obj.lastModifiedDate !== undefined) {
@@ -154,8 +192,29 @@ function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
154
192
  if (obj.sourceContentDocument !== undefined) {
155
193
  const obj_sourceContentDocument = obj.sourceContentDocument;
156
194
  const path_sourceContentDocument = path + '.sourceContentDocument';
157
- if (typeof obj_sourceContentDocument !== 'string') {
158
- return new TypeError('Expected "string" but received "' + typeof obj_sourceContentDocument + '" (at "' + path_sourceContentDocument + '")');
195
+ let obj_sourceContentDocument_union0 = null;
196
+ const obj_sourceContentDocument_union0_error = (() => {
197
+ if (typeof obj_sourceContentDocument !== 'string') {
198
+ return new TypeError('Expected "string" but received "' + typeof obj_sourceContentDocument + '" (at "' + path_sourceContentDocument + '")');
199
+ }
200
+ })();
201
+ if (obj_sourceContentDocument_union0_error != null) {
202
+ obj_sourceContentDocument_union0 = obj_sourceContentDocument_union0_error.message;
203
+ }
204
+ let obj_sourceContentDocument_union1 = null;
205
+ const obj_sourceContentDocument_union1_error = (() => {
206
+ if (obj_sourceContentDocument !== null) {
207
+ return new TypeError('Expected "null" but received "' + typeof obj_sourceContentDocument + '" (at "' + path_sourceContentDocument + '")');
208
+ }
209
+ })();
210
+ if (obj_sourceContentDocument_union1_error != null) {
211
+ obj_sourceContentDocument_union1 = obj_sourceContentDocument_union1_error.message;
212
+ }
213
+ if (obj_sourceContentDocument_union0 && obj_sourceContentDocument_union1) {
214
+ let message = 'Object doesn\'t match union (at "' + path_sourceContentDocument + '")';
215
+ message += '\n' + obj_sourceContentDocument_union0.split('\n').map((line) => '\t' + line).join('\n');
216
+ message += '\n' + obj_sourceContentDocument_union1.split('\n').map((line) => '\t' + line).join('\n');
217
+ return new TypeError(message);
159
218
  }
160
219
  }
161
220
  const obj_sourceFileName = obj.sourceFileName;
@@ -171,8 +230,29 @@ function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
171
230
  if (obj.statusReason !== undefined) {
172
231
  const obj_statusReason = obj.statusReason;
173
232
  const path_statusReason = path + '.statusReason';
174
- if (typeof obj_statusReason !== 'string') {
175
- return new TypeError('Expected "string" but received "' + typeof obj_statusReason + '" (at "' + path_statusReason + '")');
233
+ let obj_statusReason_union0 = null;
234
+ const obj_statusReason_union0_error = (() => {
235
+ if (typeof obj_statusReason !== 'string') {
236
+ return new TypeError('Expected "string" but received "' + typeof obj_statusReason + '" (at "' + path_statusReason + '")');
237
+ }
238
+ })();
239
+ if (obj_statusReason_union0_error != null) {
240
+ obj_statusReason_union0 = obj_statusReason_union0_error.message;
241
+ }
242
+ let obj_statusReason_union1 = null;
243
+ const obj_statusReason_union1_error = (() => {
244
+ if (obj_statusReason !== null) {
245
+ return new TypeError('Expected "null" but received "' + typeof obj_statusReason + '" (at "' + path_statusReason + '")');
246
+ }
247
+ })();
248
+ if (obj_statusReason_union1_error != null) {
249
+ obj_statusReason_union1 = obj_statusReason_union1_error.message;
250
+ }
251
+ if (obj_statusReason_union0 && obj_statusReason_union1) {
252
+ let message = 'Object doesn\'t match union (at "' + path_statusReason + '")';
253
+ message += '\n' + obj_statusReason_union0.split('\n').map((line) => '\t' + line).join('\n');
254
+ message += '\n' + obj_statusReason_union1.split('\n').map((line) => '\t' + line).join('\n');
255
+ return new TypeError(message);
176
256
  }
177
257
  }
178
258
  if (obj.successRecordsCount !== undefined) {
@@ -185,22 +265,85 @@ function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
185
265
  if (obj.successfulResults !== undefined) {
186
266
  const obj_successfulResults = obj.successfulResults;
187
267
  const path_successfulResults = path + '.successfulResults';
188
- if (typeof obj_successfulResults !== 'string') {
189
- return new TypeError('Expected "string" but received "' + typeof obj_successfulResults + '" (at "' + path_successfulResults + '")');
268
+ let obj_successfulResults_union0 = null;
269
+ const obj_successfulResults_union0_error = (() => {
270
+ if (typeof obj_successfulResults !== 'string') {
271
+ return new TypeError('Expected "string" but received "' + typeof obj_successfulResults + '" (at "' + path_successfulResults + '")');
272
+ }
273
+ })();
274
+ if (obj_successfulResults_union0_error != null) {
275
+ obj_successfulResults_union0 = obj_successfulResults_union0_error.message;
276
+ }
277
+ let obj_successfulResults_union1 = null;
278
+ const obj_successfulResults_union1_error = (() => {
279
+ if (obj_successfulResults !== null) {
280
+ return new TypeError('Expected "null" but received "' + typeof obj_successfulResults + '" (at "' + path_successfulResults + '")');
281
+ }
282
+ })();
283
+ if (obj_successfulResults_union1_error != null) {
284
+ obj_successfulResults_union1 = obj_successfulResults_union1_error.message;
285
+ }
286
+ if (obj_successfulResults_union0 && obj_successfulResults_union1) {
287
+ let message = 'Object doesn\'t match union (at "' + path_successfulResults + '")';
288
+ message += '\n' + obj_successfulResults_union0.split('\n').map((line) => '\t' + line).join('\n');
289
+ message += '\n' + obj_successfulResults_union1.split('\n').map((line) => '\t' + line).join('\n');
290
+ return new TypeError(message);
190
291
  }
191
292
  }
192
293
  if (obj.targetContext !== undefined) {
193
294
  const obj_targetContext = obj.targetContext;
194
295
  const path_targetContext = path + '.targetContext';
195
- if (typeof obj_targetContext !== 'string') {
196
- return new TypeError('Expected "string" but received "' + typeof obj_targetContext + '" (at "' + path_targetContext + '")');
296
+ let obj_targetContext_union0 = null;
297
+ const obj_targetContext_union0_error = (() => {
298
+ if (typeof obj_targetContext !== 'string') {
299
+ return new TypeError('Expected "string" but received "' + typeof obj_targetContext + '" (at "' + path_targetContext + '")');
300
+ }
301
+ })();
302
+ if (obj_targetContext_union0_error != null) {
303
+ obj_targetContext_union0 = obj_targetContext_union0_error.message;
304
+ }
305
+ let obj_targetContext_union1 = null;
306
+ const obj_targetContext_union1_error = (() => {
307
+ if (obj_targetContext !== null) {
308
+ return new TypeError('Expected "null" but received "' + typeof obj_targetContext + '" (at "' + path_targetContext + '")');
309
+ }
310
+ })();
311
+ if (obj_targetContext_union1_error != null) {
312
+ obj_targetContext_union1 = obj_targetContext_union1_error.message;
313
+ }
314
+ if (obj_targetContext_union0 && obj_targetContext_union1) {
315
+ let message = 'Object doesn\'t match union (at "' + path_targetContext + '")';
316
+ message += '\n' + obj_targetContext_union0.split('\n').map((line) => '\t' + line).join('\n');
317
+ message += '\n' + obj_targetContext_union1.split('\n').map((line) => '\t' + line).join('\n');
318
+ return new TypeError(message);
197
319
  }
198
320
  }
199
321
  if (obj.unprocessedRecords !== undefined) {
200
322
  const obj_unprocessedRecords = obj.unprocessedRecords;
201
323
  const path_unprocessedRecords = path + '.unprocessedRecords';
202
- if (typeof obj_unprocessedRecords !== 'string') {
203
- return new TypeError('Expected "string" but received "' + typeof obj_unprocessedRecords + '" (at "' + path_unprocessedRecords + '")');
324
+ let obj_unprocessedRecords_union0 = null;
325
+ const obj_unprocessedRecords_union0_error = (() => {
326
+ if (typeof obj_unprocessedRecords !== 'string') {
327
+ return new TypeError('Expected "string" but received "' + typeof obj_unprocessedRecords + '" (at "' + path_unprocessedRecords + '")');
328
+ }
329
+ })();
330
+ if (obj_unprocessedRecords_union0_error != null) {
331
+ obj_unprocessedRecords_union0 = obj_unprocessedRecords_union0_error.message;
332
+ }
333
+ let obj_unprocessedRecords_union1 = null;
334
+ const obj_unprocessedRecords_union1_error = (() => {
335
+ if (obj_unprocessedRecords !== null) {
336
+ return new TypeError('Expected "null" but received "' + typeof obj_unprocessedRecords + '" (at "' + path_unprocessedRecords + '")');
337
+ }
338
+ })();
339
+ if (obj_unprocessedRecords_union1_error != null) {
340
+ obj_unprocessedRecords_union1 = obj_unprocessedRecords_union1_error.message;
341
+ }
342
+ if (obj_unprocessedRecords_union0 && obj_unprocessedRecords_union1) {
343
+ let message = 'Object doesn\'t match union (at "' + path_unprocessedRecords + '")';
344
+ message += '\n' + obj_unprocessedRecords_union0.split('\n').map((line) => '\t' + line).join('\n');
345
+ message += '\n' + obj_unprocessedRecords_union1.split('\n').map((line) => '\t' + line).join('\n');
346
+ return new TypeError(message);
204
347
  }
205
348
  }
206
349
  if (obj.unprocessedRecordsCount !== undefined) {
@@ -213,10 +356,23 @@ function validate$b(obj, path = 'FileBasedDataImportRepresentation') {
213
356
  })();
214
357
  return v_error === undefined ? null : v_error;
215
358
  }
216
- const select$d = function FileBasedDataImportRepresentationSelect() {
359
+ const RepresentationType$6 = 'FileBasedDataImportRepresentation';
360
+ function keyBuilder$e(luvio, config) {
361
+ return keyPrefix + '::' + RepresentationType$6 + ':' + config.id;
362
+ }
363
+ function keyBuilderFromType$1(luvio, object) {
364
+ const keyParams = {
365
+ id: object.id
366
+ };
367
+ return keyBuilder$e(luvio, keyParams);
368
+ }
369
+ function normalize$6(input, existing, path, luvio, store, timestamp) {
370
+ return input;
371
+ }
372
+ const select$l = function FileBasedDataImportRepresentationSelect() {
217
373
  return {
218
374
  kind: 'Fragment',
219
- version: VERSION$8,
375
+ version: VERSION$b,
220
376
  private: [],
221
377
  selections: [
222
378
  {
@@ -240,13 +396,11 @@ const select$d = function FileBasedDataImportRepresentationSelect() {
240
396
  },
241
397
  {
242
398
  name: 'id',
243
- kind: 'Scalar',
244
- required: false
399
+ kind: 'Scalar'
245
400
  },
246
401
  {
247
402
  name: 'importOperationType',
248
- kind: 'Scalar',
249
- required: false
403
+ kind: 'Scalar'
250
404
  },
251
405
  {
252
406
  name: 'jobIdentifier',
@@ -304,7 +458,7 @@ const select$d = function FileBasedDataImportRepresentationSelect() {
304
458
  ]
305
459
  };
306
460
  };
307
- function equals$8(existing, incoming) {
461
+ function equals$b(existing, incoming) {
308
462
  const existing_failedRecordsCount = existing.failedRecordsCount;
309
463
  const incoming_failedRecordsCount = incoming.failedRecordsCount;
310
464
  // if at least one of these optionals is defined
@@ -357,19 +511,6 @@ function equals$8(existing, incoming) {
357
511
  return false;
358
512
  }
359
513
  }
360
- const existing_failedResults = existing.failedResults;
361
- const incoming_failedResults = incoming.failedResults;
362
- // if at least one of these optionals is defined
363
- if (existing_failedResults !== undefined || incoming_failedResults !== undefined) {
364
- // if one of these is not defined we know the other is defined and therefore
365
- // not equal
366
- if (existing_failedResults === undefined || incoming_failedResults === undefined) {
367
- return false;
368
- }
369
- if (!(existing_failedResults === incoming_failedResults)) {
370
- return false;
371
- }
372
- }
373
514
  const existing_fileBasedImportType = existing.fileBasedImportType;
374
515
  const incoming_fileBasedImportType = incoming.fileBasedImportType;
375
516
  if (!(existing_fileBasedImportType === incoming_fileBasedImportType)) {
@@ -377,27 +518,47 @@ function equals$8(existing, incoming) {
377
518
  }
378
519
  const existing_id = existing.id;
379
520
  const incoming_id = incoming.id;
521
+ if (!(existing_id === incoming_id)) {
522
+ return false;
523
+ }
524
+ const existing_importOperationType = existing.importOperationType;
525
+ const incoming_importOperationType = incoming.importOperationType;
526
+ if (!(existing_importOperationType === incoming_importOperationType)) {
527
+ return false;
528
+ }
529
+ const existing_lastModifiedDate = existing.lastModifiedDate;
530
+ const incoming_lastModifiedDate = incoming.lastModifiedDate;
380
531
  // if at least one of these optionals is defined
381
- if (existing_id !== undefined || incoming_id !== undefined) {
532
+ if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
382
533
  // if one of these is not defined we know the other is defined and therefore
383
534
  // not equal
384
- if (existing_id === undefined || incoming_id === undefined) {
535
+ if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
385
536
  return false;
386
537
  }
387
- if (!(existing_id === incoming_id)) {
538
+ if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
388
539
  return false;
389
540
  }
390
541
  }
391
- const existing_importOperationType = existing.importOperationType;
392
- const incoming_importOperationType = incoming.importOperationType;
542
+ const existing_sourceFileName = existing.sourceFileName;
543
+ const incoming_sourceFileName = incoming.sourceFileName;
544
+ if (!(existing_sourceFileName === incoming_sourceFileName)) {
545
+ return false;
546
+ }
547
+ const existing_status = existing.status;
548
+ const incoming_status = incoming.status;
549
+ if (!(existing_status === incoming_status)) {
550
+ return false;
551
+ }
552
+ const existing_failedResults = existing.failedResults;
553
+ const incoming_failedResults = incoming.failedResults;
393
554
  // if at least one of these optionals is defined
394
- if (existing_importOperationType !== undefined || incoming_importOperationType !== undefined) {
555
+ if (existing_failedResults !== undefined || incoming_failedResults !== undefined) {
395
556
  // if one of these is not defined we know the other is defined and therefore
396
557
  // not equal
397
- if (existing_importOperationType === undefined || incoming_importOperationType === undefined) {
558
+ if (existing_failedResults === undefined || incoming_failedResults === undefined) {
398
559
  return false;
399
560
  }
400
- if (!(existing_importOperationType === incoming_importOperationType)) {
561
+ if (!(existing_failedResults === incoming_failedResults)) {
401
562
  return false;
402
563
  }
403
564
  }
@@ -414,19 +575,6 @@ function equals$8(existing, incoming) {
414
575
  return false;
415
576
  }
416
577
  }
417
- const existing_lastModifiedDate = existing.lastModifiedDate;
418
- const incoming_lastModifiedDate = incoming.lastModifiedDate;
419
- // if at least one of these optionals is defined
420
- if (existing_lastModifiedDate !== undefined || incoming_lastModifiedDate !== undefined) {
421
- // if one of these is not defined we know the other is defined and therefore
422
- // not equal
423
- if (existing_lastModifiedDate === undefined || incoming_lastModifiedDate === undefined) {
424
- return false;
425
- }
426
- if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
427
- return false;
428
- }
429
- }
430
578
  const existing_sourceContentDocument = existing.sourceContentDocument;
431
579
  const incoming_sourceContentDocument = incoming.sourceContentDocument;
432
580
  // if at least one of these optionals is defined
@@ -440,16 +588,6 @@ function equals$8(existing, incoming) {
440
588
  return false;
441
589
  }
442
590
  }
443
- const existing_sourceFileName = existing.sourceFileName;
444
- const incoming_sourceFileName = incoming.sourceFileName;
445
- if (!(existing_sourceFileName === incoming_sourceFileName)) {
446
- return false;
447
- }
448
- const existing_status = existing.status;
449
- const incoming_status = incoming.status;
450
- if (!(existing_status === incoming_status)) {
451
- return false;
452
- }
453
591
  const existing_statusReason = existing.statusReason;
454
592
  const incoming_statusReason = incoming.statusReason;
455
593
  // if at least one of these optionals is defined
@@ -504,9 +642,30 @@ function equals$8(existing, incoming) {
504
642
  }
505
643
  return true;
506
644
  }
645
+ const ingest$6 = function FileBasedDataImportRepresentationIngest(input, path, luvio, store, timestamp) {
646
+ if (process.env.NODE_ENV !== 'production') {
647
+ const validateError = validate$e(input);
648
+ if (validateError !== null) {
649
+ throw validateError;
650
+ }
651
+ }
652
+ const key = keyBuilderFromType$1(luvio, input);
653
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
654
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "fileBased-dataimport", VERSION$b, RepresentationType$6, equals$b);
655
+ return createLink(key);
656
+ };
657
+ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
658
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
659
+ const rootKey = keyBuilderFromType$1(luvio, input);
660
+ rootKeySet.set(rootKey, {
661
+ namespace: keyPrefix,
662
+ representationName: RepresentationType$6,
663
+ mergeable: false
664
+ });
665
+ }
507
666
 
508
- const VERSION$7 = "4f8ba4c4260a7fc24efc18d625326f1e";
509
- function validate$a(obj, path = 'FileBasedDataImportByUserResultRepresentation') {
667
+ const VERSION$a = "5ba99358bf109c24644c99238f9a172c";
668
+ function validate$d(obj, path = 'FileBasedDataImportByUserResultRepresentation') {
510
669
  const v_error = (() => {
511
670
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
512
671
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -520,11 +679,8 @@ function validate$a(obj, path = 'FileBasedDataImportByUserResultRepresentation')
520
679
  for (let i = 0; i < obj_fileBasedDataImportRepresentations.length; i++) {
521
680
  const obj_fileBasedDataImportRepresentations_item = obj_fileBasedDataImportRepresentations[i];
522
681
  const path_fileBasedDataImportRepresentations_item = path_fileBasedDataImportRepresentations + '[' + i + ']';
523
- const referencepath_fileBasedDataImportRepresentations_itemValidationError = validate$b(obj_fileBasedDataImportRepresentations_item, path_fileBasedDataImportRepresentations_item);
524
- if (referencepath_fileBasedDataImportRepresentations_itemValidationError !== null) {
525
- let message = 'Object doesn\'t match FileBasedDataImportRepresentation (at "' + path_fileBasedDataImportRepresentations_item + '")\n';
526
- message += referencepath_fileBasedDataImportRepresentations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
527
- return new TypeError(message);
682
+ if (typeof obj_fileBasedDataImportRepresentations_item !== 'object') {
683
+ return new TypeError('Expected "object" but received "' + typeof obj_fileBasedDataImportRepresentations_item + '" (at "' + path_fileBasedDataImportRepresentations_item + '")');
528
684
  }
529
685
  }
530
686
  }
@@ -538,23 +694,40 @@ function validate$a(obj, path = 'FileBasedDataImportByUserResultRepresentation')
538
694
  })();
539
695
  return v_error === undefined ? null : v_error;
540
696
  }
541
- const RepresentationType$3 = 'FileBasedDataImportByUserResultRepresentation';
542
- function normalize$3(input, existing, path, luvio, store, timestamp) {
697
+ const RepresentationType$5 = 'FileBasedDataImportByUserResultRepresentation';
698
+ function normalize$5(input, existing, path, luvio, store, timestamp) {
699
+ const input_fileBasedDataImportRepresentations = input.fileBasedDataImportRepresentations;
700
+ const input_fileBasedDataImportRepresentations_id = path.fullPath + '__fileBasedDataImportRepresentations';
701
+ if (input_fileBasedDataImportRepresentations !== undefined) {
702
+ for (let i = 0; i < input_fileBasedDataImportRepresentations.length; i++) {
703
+ const input_fileBasedDataImportRepresentations_item = input_fileBasedDataImportRepresentations[i];
704
+ let input_fileBasedDataImportRepresentations_item_id = input_fileBasedDataImportRepresentations_id + '__' + i;
705
+ input_fileBasedDataImportRepresentations[i] = ingest$6(input_fileBasedDataImportRepresentations_item, {
706
+ fullPath: input_fileBasedDataImportRepresentations_item_id,
707
+ propertyName: i,
708
+ parent: {
709
+ data: input,
710
+ key: path.fullPath,
711
+ existing: existing,
712
+ },
713
+ ttl: path.ttl
714
+ }, luvio, store, timestamp);
715
+ }
716
+ }
543
717
  return input;
544
718
  }
545
- const select$c = function FileBasedDataImportByUserResultRepresentationSelect() {
546
- const { selections: FileBasedDataImportRepresentation__selections, opaque: FileBasedDataImportRepresentation__opaque, } = select$d();
719
+ const select$k = function FileBasedDataImportByUserResultRepresentationSelect() {
547
720
  return {
548
721
  kind: 'Fragment',
549
- version: VERSION$7,
722
+ version: VERSION$a,
550
723
  private: [],
551
724
  selections: [
552
725
  {
553
726
  name: 'fileBasedDataImportRepresentations',
554
- kind: 'Object',
727
+ kind: 'Link',
555
728
  plural: true,
556
- selections: FileBasedDataImportRepresentation__selections,
557
- required: false
729
+ required: false,
730
+ fragment: select$l()
558
731
  },
559
732
  {
560
733
  name: 'isAdminUser',
@@ -564,7 +737,7 @@ const select$c = function FileBasedDataImportByUserResultRepresentationSelect()
564
737
  ]
565
738
  };
566
739
  };
567
- function equals$7(existing, incoming) {
740
+ function equals$a(existing, incoming) {
568
741
  const existing_isAdminUser = existing.isAdminUser;
569
742
  const incoming_isAdminUser = incoming.isAdminUser;
570
743
  // if at least one of these optionals is defined
@@ -588,7 +761,7 @@ function equals$7(existing, incoming) {
588
761
  return false;
589
762
  }
590
763
  const equals_fileBasedDataImportRepresentations_items = equalsArray(existing_fileBasedDataImportRepresentations, incoming_fileBasedDataImportRepresentations, (existing_fileBasedDataImportRepresentations_item, incoming_fileBasedDataImportRepresentations_item) => {
591
- if (!(equals$8(existing_fileBasedDataImportRepresentations_item, incoming_fileBasedDataImportRepresentations_item))) {
764
+ if (!(existing_fileBasedDataImportRepresentations_item.__ref === incoming_fileBasedDataImportRepresentations_item.__ref)) {
592
765
  return false;
593
766
  }
594
767
  });
@@ -598,44 +771,50 @@ function equals$7(existing, incoming) {
598
771
  }
599
772
  return true;
600
773
  }
601
- const ingest$3 = function FileBasedDataImportByUserResultRepresentationIngest(input, path, luvio, store, timestamp) {
774
+ const ingest$5 = function FileBasedDataImportByUserResultRepresentationIngest(input, path, luvio, store, timestamp) {
602
775
  if (process.env.NODE_ENV !== 'production') {
603
- const validateError = validate$a(input);
776
+ const validateError = validate$d(input);
604
777
  if (validateError !== null) {
605
778
  throw validateError;
606
779
  }
607
780
  }
608
781
  const key = path.fullPath;
609
782
  const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
610
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "fileBased-dataimport", VERSION$7, RepresentationType$3, equals$7);
783
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "fileBased-dataimport", VERSION$a, RepresentationType$5, equals$a);
611
784
  return createLink(key);
612
785
  };
613
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
786
+ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
614
787
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
615
788
  const rootKey = fullPathFactory();
616
789
  rootKeySet.set(rootKey, {
617
790
  namespace: keyPrefix,
618
- representationName: RepresentationType$3,
791
+ representationName: RepresentationType$5,
619
792
  mergeable: false
620
793
  });
794
+ if (input.fileBasedDataImportRepresentations !== undefined) {
795
+ const input_fileBasedDataImportRepresentations_length = input.fileBasedDataImportRepresentations.length;
796
+ for (let i = 0; i < input_fileBasedDataImportRepresentations_length; i++) {
797
+ getTypeCacheKeys$6(rootKeySet, luvio, input.fileBasedDataImportRepresentations[i]);
798
+ }
799
+ }
621
800
  }
622
801
 
623
- function select$b(luvio, params) {
624
- return select$c();
802
+ function select$j(luvio, params) {
803
+ return select$k();
625
804
  }
626
- function keyBuilder$6(luvio, params) {
805
+ function keyBuilder$d(luvio, params) {
627
806
  return keyPrefix + '::FileBasedDataImportByUserResultRepresentation:(' + ')';
628
807
  }
629
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
630
- getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6());
808
+ function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
809
+ getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$d());
631
810
  }
632
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
811
+ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
633
812
  const { body } = response;
634
- const key = keyBuilder$6();
635
- luvio.storeIngest(key, ingest$3, body);
813
+ const key = keyBuilder$d();
814
+ luvio.storeIngest(key, ingest$5, body);
636
815
  const snapshot = luvio.storeLookup({
637
816
  recordId: key,
638
- node: select$b(),
817
+ node: select$j(),
639
818
  variables: {},
640
819
  }, snapshotRefresh);
641
820
  if (process.env.NODE_ENV !== 'production') {
@@ -646,13 +825,13 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
646
825
  deepFreeze(snapshot.data);
647
826
  return snapshot;
648
827
  }
649
- function ingestError$2(luvio, params, error, snapshotRefresh) {
650
- const key = keyBuilder$6();
828
+ function ingestError$5(luvio, params, error, snapshotRefresh) {
829
+ const key = keyBuilder$d();
651
830
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
652
831
  luvio.storeIngestError(key, errorSnapshot);
653
832
  return errorSnapshot;
654
833
  }
655
- function createResourceRequest$4(config) {
834
+ function createResourceRequest$a(config) {
656
835
  const headers = {};
657
836
  return {
658
837
  baseUri: '/services/data/v60.0',
@@ -666,90 +845,194 @@ function createResourceRequest$4(config) {
666
845
  };
667
846
  }
668
847
 
669
- const adapterName$4 = 'getFileBasedDataImports';
848
+ const adapterName$a = 'getFileBasedDataImports';
670
849
  const getFileBasedDataImports_ConfigPropertyMetadata = [];
671
- const getFileBasedDataImports_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getFileBasedDataImports_ConfigPropertyMetadata);
672
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getFileBasedDataImports_ConfigPropertyMetadata);
673
- function keyBuilder$5(luvio, config) {
674
- createResourceParams$4(config);
675
- return keyBuilder$6();
850
+ const getFileBasedDataImports_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getFileBasedDataImports_ConfigPropertyMetadata);
851
+ const createResourceParams$a = /*#__PURE__*/ createResourceParams$b(getFileBasedDataImports_ConfigPropertyMetadata);
852
+ function keyBuilder$c(luvio, config) {
853
+ createResourceParams$a(config);
854
+ return keyBuilder$d();
676
855
  }
677
- function typeCheckConfig$4(untrustedConfig) {
856
+ function typeCheckConfig$a(untrustedConfig) {
678
857
  const config = {};
679
858
  return config;
680
859
  }
681
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
860
+ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
682
861
  if (!untrustedIsObject(untrustedConfig)) {
683
862
  return null;
684
863
  }
685
864
  if (process.env.NODE_ENV !== 'production') {
686
865
  validateConfig(untrustedConfig, configPropertyNames);
687
866
  }
688
- const config = typeCheckConfig$4();
867
+ const config = typeCheckConfig$a();
689
868
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
690
869
  return null;
691
870
  }
692
871
  return config;
693
872
  }
694
- function adapterFragment$2(luvio, config) {
695
- createResourceParams$4(config);
696
- return select$b();
873
+ function adapterFragment$5(luvio, config) {
874
+ createResourceParams$a(config);
875
+ return select$j();
697
876
  }
698
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
699
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
877
+ function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
878
+ const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
700
879
  config,
701
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
880
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
702
881
  });
703
882
  return luvio.storeBroadcast().then(() => snapshot);
704
883
  }
705
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
706
- const snapshot = ingestError$2(luvio, resourceParams, response, {
884
+ function onFetchResponseError$5(luvio, config, resourceParams, response) {
885
+ const snapshot = ingestError$5(luvio, resourceParams, response, {
707
886
  config,
708
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
887
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
709
888
  });
710
889
  return luvio.storeBroadcast().then(() => snapshot);
711
890
  }
712
- function buildNetworkSnapshot$4(luvio, config, options) {
713
- const resourceParams = createResourceParams$4(config);
714
- const request = createResourceRequest$4();
891
+ function buildNetworkSnapshot$a(luvio, config, options) {
892
+ const resourceParams = createResourceParams$a(config);
893
+ const request = createResourceRequest$a();
715
894
  return luvio.dispatchResourceRequest(request, options)
716
895
  .then((response) => {
717
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
896
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
718
897
  const cache = new StoreKeyMap();
719
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
898
+ getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
720
899
  return cache;
721
900
  });
722
901
  }, (response) => {
723
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
902
+ return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
724
903
  });
725
904
  }
726
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
727
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
905
+ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
906
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
728
907
  }
729
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
908
+ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
730
909
  const { luvio, config } = context;
731
910
  const selector = {
732
- recordId: keyBuilder$5(luvio, config),
733
- node: adapterFragment$2(luvio, config),
911
+ recordId: keyBuilder$c(luvio, config),
912
+ node: adapterFragment$5(luvio, config),
734
913
  variables: {},
735
914
  };
736
915
  const cacheSnapshot = storeLookup(selector, {
737
916
  config,
738
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
917
+ resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
739
918
  });
740
919
  return cacheSnapshot;
741
920
  }
742
921
  const getFileBasedDataImportsAdapterFactory = (luvio) => function fileBasedDataimport__getFileBasedDataImports(untrustedConfig, requestContext) {
743
- const config = validateAdapterConfig$4(untrustedConfig, getFileBasedDataImports_ConfigPropertyNames);
922
+ const config = validateAdapterConfig$a(untrustedConfig, getFileBasedDataImports_ConfigPropertyNames);
744
923
  // Invalid or incomplete config
745
924
  if (config === null) {
746
925
  return null;
747
926
  }
748
927
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
749
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
928
+ buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
929
+ };
930
+
931
+ function select$i(luvio, params) {
932
+ return select$l();
933
+ }
934
+ function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
935
+ getTypeCacheKeys$6(storeKeyMap, luvio, response);
936
+ }
937
+ function ingestSuccess$8(luvio, resourceParams, response) {
938
+ const { body } = response;
939
+ const key = keyBuilderFromType$1(luvio, body);
940
+ luvio.storeIngest(key, ingest$6, body);
941
+ const snapshot = luvio.storeLookup({
942
+ recordId: key,
943
+ node: select$i(),
944
+ variables: {},
945
+ });
946
+ if (process.env.NODE_ENV !== 'production') {
947
+ if (snapshot.state !== 'Fulfilled') {
948
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
949
+ }
950
+ }
951
+ deepFreeze(snapshot.data);
952
+ return snapshot;
953
+ }
954
+ function createResourceRequest$9(config) {
955
+ const headers = {};
956
+ return {
957
+ baseUri: '/services/data/v60.0',
958
+ basePath: '/connect/industries/fileBasedDataImports',
959
+ method: 'post',
960
+ body: config.body,
961
+ urlParams: {},
962
+ queryParams: {},
963
+ headers,
964
+ priority: 'normal',
965
+ };
966
+ }
967
+
968
+ const adapterName$9 = 'createFileBasedDataImport';
969
+ const createFileBasedDataImport_ConfigPropertyMetadata = [
970
+ generateParamConfigMetadata('failedRecordContentDoc', false, 2 /* Body */, 0 /* String */),
971
+ generateParamConfigMetadata('failedRecordCount', false, 2 /* Body */, 3 /* Integer */),
972
+ generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
973
+ generateParamConfigMetadata('importOperationType', true, 2 /* Body */, 0 /* String */),
974
+ generateParamConfigMetadata('importType', true, 2 /* Body */, 0 /* String */),
975
+ generateParamConfigMetadata('jobIdentifier', false, 2 /* Body */, 0 /* String */),
976
+ generateParamConfigMetadata('sourceContentDocument', false, 2 /* Body */, 0 /* String */),
977
+ generateParamConfigMetadata('sourceFileName', true, 2 /* Body */, 0 /* String */),
978
+ generateParamConfigMetadata('status', true, 2 /* Body */, 0 /* String */),
979
+ generateParamConfigMetadata('statusReason', false, 2 /* Body */, 0 /* String */),
980
+ generateParamConfigMetadata('successfulRecordContentDoc', false, 2 /* Body */, 0 /* String */),
981
+ generateParamConfigMetadata('successfulRecordCount', false, 2 /* Body */, 3 /* Integer */),
982
+ generateParamConfigMetadata('targetContext', false, 2 /* Body */, 0 /* String */),
983
+ generateParamConfigMetadata('unprocessedRecordContentDoc', false, 2 /* Body */, 0 /* String */),
984
+ generateParamConfigMetadata('unprocessedRecordCount', false, 2 /* Body */, 3 /* Integer */),
985
+ ];
986
+ const createFileBasedDataImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createFileBasedDataImport_ConfigPropertyMetadata);
987
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$b(createFileBasedDataImport_ConfigPropertyMetadata);
988
+ function typeCheckConfig$9(untrustedConfig) {
989
+ const config = {};
990
+ typeCheckConfig$b(untrustedConfig, config, createFileBasedDataImport_ConfigPropertyMetadata);
991
+ return config;
992
+ }
993
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
994
+ if (!untrustedIsObject(untrustedConfig)) {
995
+ return null;
996
+ }
997
+ if (process.env.NODE_ENV !== 'production') {
998
+ validateConfig(untrustedConfig, configPropertyNames);
999
+ }
1000
+ const config = typeCheckConfig$9(untrustedConfig);
1001
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1002
+ return null;
1003
+ }
1004
+ return config;
1005
+ }
1006
+ function buildNetworkSnapshot$9(luvio, config, options) {
1007
+ const resourceParams = createResourceParams$9(config);
1008
+ const request = createResourceRequest$9(resourceParams);
1009
+ return luvio.dispatchResourceRequest(request, options)
1010
+ .then((response) => {
1011
+ return luvio.handleSuccessResponse(() => {
1012
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response);
1013
+ return luvio.storeBroadcast().then(() => snapshot);
1014
+ }, () => {
1015
+ const cache = new StoreKeyMap();
1016
+ getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
1017
+ return cache;
1018
+ });
1019
+ }, (response) => {
1020
+ deepFreeze(response);
1021
+ throw response;
1022
+ });
1023
+ }
1024
+ const createFileBasedDataImportAdapterFactory = (luvio) => {
1025
+ return function createFileBasedDataImport(untrustedConfig) {
1026
+ const config = validateAdapterConfig$9(untrustedConfig, createFileBasedDataImport_ConfigPropertyNames);
1027
+ // Invalid or incomplete config
1028
+ if (config === null) {
1029
+ throw new Error('Invalid config for "createFileBasedDataImport"');
1030
+ }
1031
+ return buildNetworkSnapshot$9(luvio, config);
1032
+ };
750
1033
  };
751
1034
 
752
- function validate$9(obj, path = 'FieldConfigurationInputRepresentation') {
1035
+ function validate$c(obj, path = 'FieldConfigurationInputRepresentation') {
753
1036
  const v_error = (() => {
754
1037
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
755
1038
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -793,7 +1076,7 @@ function validate$9(obj, path = 'FieldConfigurationInputRepresentation') {
793
1076
  return v_error === undefined ? null : v_error;
794
1077
  }
795
1078
 
796
- function validate$8(obj, path = 'ImportOperationInputRepresentation') {
1079
+ function validate$b(obj, path = 'ImportOperationInputRepresentation') {
797
1080
  const v_error = (() => {
798
1081
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
799
1082
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -823,7 +1106,7 @@ function validate$8(obj, path = 'ImportOperationInputRepresentation') {
823
1106
  return v_error === undefined ? null : v_error;
824
1107
  }
825
1108
 
826
- function validate$7(obj, path = 'ImportOptionsInputRepresentation') {
1109
+ function validate$a(obj, path = 'ImportOptionsInputRepresentation') {
827
1110
  const v_error = (() => {
828
1111
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
829
1112
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -851,7 +1134,7 @@ function validate$7(obj, path = 'ImportOptionsInputRepresentation') {
851
1134
  for (let i = 0; i < obj_fieldConfigurations.length; i++) {
852
1135
  const obj_fieldConfigurations_item = obj_fieldConfigurations[i];
853
1136
  const path_fieldConfigurations_item = path_fieldConfigurations + '[' + i + ']';
854
- const referencepath_fieldConfigurations_itemValidationError = validate$9(obj_fieldConfigurations_item, path_fieldConfigurations_item);
1137
+ const referencepath_fieldConfigurations_itemValidationError = validate$c(obj_fieldConfigurations_item, path_fieldConfigurations_item);
855
1138
  if (referencepath_fieldConfigurations_itemValidationError !== null) {
856
1139
  let message = 'Object doesn\'t match FieldConfigurationInputRepresentation (at "' + path_fieldConfigurations_item + '")\n';
857
1140
  message += referencepath_fieldConfigurations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -862,7 +1145,7 @@ function validate$7(obj, path = 'ImportOptionsInputRepresentation') {
862
1145
  if (obj.operation !== undefined) {
863
1146
  const obj_operation = obj.operation;
864
1147
  const path_operation = path + '.operation';
865
- const referencepath_operationValidationError = validate$8(obj_operation, path_operation);
1148
+ const referencepath_operationValidationError = validate$b(obj_operation, path_operation);
866
1149
  if (referencepath_operationValidationError !== null) {
867
1150
  let message = 'Object doesn\'t match ImportOperationInputRepresentation (at "' + path_operation + '")\n';
868
1151
  message += referencepath_operationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -873,8 +1156,8 @@ function validate$7(obj, path = 'ImportOptionsInputRepresentation') {
873
1156
  return v_error === undefined ? null : v_error;
874
1157
  }
875
1158
 
876
- const VERSION$6 = "0f74d1482de21ff21d94491b9f9b869a";
877
- function validate$6(obj, path = 'FileImportOutputRepresentation') {
1159
+ const VERSION$9 = "0f74d1482de21ff21d94491b9f9b869a";
1160
+ function validate$9(obj, path = 'FileImportOutputRepresentation') {
878
1161
  const v_error = (() => {
879
1162
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
880
1163
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -892,23 +1175,23 @@ function validate$6(obj, path = 'FileImportOutputRepresentation') {
892
1175
  })();
893
1176
  return v_error === undefined ? null : v_error;
894
1177
  }
895
- const RepresentationType$2 = 'FileImportOutputRepresentation';
896
- function keyBuilder$4(luvio, config) {
897
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.statusCode;
1178
+ const RepresentationType$4 = 'FileImportOutputRepresentation';
1179
+ function keyBuilder$b(luvio, config) {
1180
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.statusCode;
898
1181
  }
899
1182
  function keyBuilderFromType(luvio, object) {
900
1183
  const keyParams = {
901
1184
  statusCode: object.statusCode
902
1185
  };
903
- return keyBuilder$4(luvio, keyParams);
1186
+ return keyBuilder$b(luvio, keyParams);
904
1187
  }
905
- function normalize$2(input, existing, path, luvio, store, timestamp) {
1188
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
906
1189
  return input;
907
1190
  }
908
- const select$a = function FileImportOutputRepresentationSelect() {
1191
+ const select$h = function FileImportOutputRepresentationSelect() {
909
1192
  return {
910
1193
  kind: 'Fragment',
911
- version: VERSION$6,
1194
+ version: VERSION$9,
912
1195
  private: [],
913
1196
  selections: [
914
1197
  {
@@ -922,7 +1205,7 @@ const select$a = function FileImportOutputRepresentationSelect() {
922
1205
  ]
923
1206
  };
924
1207
  };
925
- function equals$6(existing, incoming) {
1208
+ function equals$9(existing, incoming) {
926
1209
  const existing_statusCode = existing.statusCode;
927
1210
  const incoming_statusCode = incoming.statusCode;
928
1211
  if (!(existing_statusCode === incoming_statusCode)) {
@@ -935,41 +1218,41 @@ function equals$6(existing, incoming) {
935
1218
  }
936
1219
  return true;
937
1220
  }
938
- const ingest$2 = function FileImportOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1221
+ const ingest$4 = function FileImportOutputRepresentationIngest(input, path, luvio, store, timestamp) {
939
1222
  if (process.env.NODE_ENV !== 'production') {
940
- const validateError = validate$6(input);
1223
+ const validateError = validate$9(input);
941
1224
  if (validateError !== null) {
942
1225
  throw validateError;
943
1226
  }
944
1227
  }
945
1228
  const key = keyBuilderFromType(luvio, input);
946
1229
  const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
947
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "fileBased-dataimport", VERSION$6, RepresentationType$2, equals$6);
1230
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "fileBased-dataimport", VERSION$9, RepresentationType$4, equals$9);
948
1231
  return createLink(key);
949
1232
  };
950
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1233
+ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
951
1234
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
952
1235
  const rootKey = keyBuilderFromType(luvio, input);
953
1236
  rootKeySet.set(rootKey, {
954
1237
  namespace: keyPrefix,
955
- representationName: RepresentationType$2,
1238
+ representationName: RepresentationType$4,
956
1239
  mergeable: false
957
1240
  });
958
1241
  }
959
1242
 
960
- function select$9(luvio, params) {
961
- return select$a();
1243
+ function select$g(luvio, params) {
1244
+ return select$h();
962
1245
  }
963
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
964
- getTypeCacheKeys$2(storeKeyMap, luvio, response);
1246
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
1247
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
965
1248
  }
966
- function ingestSuccess$3(luvio, resourceParams, response) {
1249
+ function ingestSuccess$7(luvio, resourceParams, response) {
967
1250
  const { body } = response;
968
1251
  const key = keyBuilderFromType(luvio, body);
969
- luvio.storeIngest(key, ingest$2, body);
1252
+ luvio.storeIngest(key, ingest$4, body);
970
1253
  const snapshot = luvio.storeLookup({
971
1254
  recordId: key,
972
- node: select$9(),
1255
+ node: select$g(),
973
1256
  variables: {},
974
1257
  });
975
1258
  if (process.env.NODE_ENV !== 'production') {
@@ -980,7 +1263,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
980
1263
  deepFreeze(snapshot.data);
981
1264
  return snapshot;
982
1265
  }
983
- function createResourceRequest$3(config) {
1266
+ function createResourceRequest$8(config) {
984
1267
  const headers = {};
985
1268
  return {
986
1269
  baseUri: '/services/data/v60.0',
@@ -994,48 +1277,48 @@ function createResourceRequest$3(config) {
994
1277
  };
995
1278
  }
996
1279
 
997
- const adapterName$3 = 'startAdvanceImport';
1280
+ const adapterName$8 = 'startAdvanceImport';
998
1281
  const startAdvanceImport_ConfigPropertyMetadata = [
999
1282
  generateParamConfigMetadata('importReferenceId', true, 2 /* Body */, 0 /* String */),
1000
1283
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
1001
1284
  generateParamConfigMetadata('targetContext', true, 2 /* Body */, 0 /* String */),
1002
1285
  ];
1003
- const startAdvanceImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, startAdvanceImport_ConfigPropertyMetadata);
1004
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(startAdvanceImport_ConfigPropertyMetadata);
1005
- function typeCheckConfig$3(untrustedConfig) {
1286
+ const startAdvanceImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, startAdvanceImport_ConfigPropertyMetadata);
1287
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$b(startAdvanceImport_ConfigPropertyMetadata);
1288
+ function typeCheckConfig$8(untrustedConfig) {
1006
1289
  const config = {};
1007
- typeCheckConfig$5(untrustedConfig, config, startAdvanceImport_ConfigPropertyMetadata);
1290
+ typeCheckConfig$b(untrustedConfig, config, startAdvanceImport_ConfigPropertyMetadata);
1008
1291
  const untrustedConfig_options = untrustedConfig.options;
1009
- const referenceImportOptionsInputRepresentationValidationError = validate$7(untrustedConfig_options);
1292
+ const referenceImportOptionsInputRepresentationValidationError = validate$a(untrustedConfig_options);
1010
1293
  if (referenceImportOptionsInputRepresentationValidationError === null) {
1011
1294
  config.options = untrustedConfig_options;
1012
1295
  }
1013
1296
  return config;
1014
1297
  }
1015
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1298
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
1016
1299
  if (!untrustedIsObject(untrustedConfig)) {
1017
1300
  return null;
1018
1301
  }
1019
1302
  if (process.env.NODE_ENV !== 'production') {
1020
1303
  validateConfig(untrustedConfig, configPropertyNames);
1021
1304
  }
1022
- const config = typeCheckConfig$3(untrustedConfig);
1305
+ const config = typeCheckConfig$8(untrustedConfig);
1023
1306
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1024
1307
  return null;
1025
1308
  }
1026
1309
  return config;
1027
1310
  }
1028
- function buildNetworkSnapshot$3(luvio, config, options) {
1029
- const resourceParams = createResourceParams$3(config);
1030
- const request = createResourceRequest$3(resourceParams);
1311
+ function buildNetworkSnapshot$8(luvio, config, options) {
1312
+ const resourceParams = createResourceParams$8(config);
1313
+ const request = createResourceRequest$8(resourceParams);
1031
1314
  return luvio.dispatchResourceRequest(request, options)
1032
1315
  .then((response) => {
1033
1316
  return luvio.handleSuccessResponse(() => {
1034
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1317
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response);
1035
1318
  return luvio.storeBroadcast().then(() => snapshot);
1036
1319
  }, () => {
1037
1320
  const cache = new StoreKeyMap();
1038
- getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1321
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
1039
1322
  return cache;
1040
1323
  });
1041
1324
  }, (response) => {
@@ -1045,28 +1328,28 @@ function buildNetworkSnapshot$3(luvio, config, options) {
1045
1328
  }
1046
1329
  const startAdvanceImportAdapterFactory = (luvio) => {
1047
1330
  return function startAdvanceImport(untrustedConfig) {
1048
- const config = validateAdapterConfig$3(untrustedConfig, startAdvanceImport_ConfigPropertyNames);
1331
+ const config = validateAdapterConfig$8(untrustedConfig, startAdvanceImport_ConfigPropertyNames);
1049
1332
  // Invalid or incomplete config
1050
1333
  if (config === null) {
1051
1334
  throw new Error('Invalid config for "startAdvanceImport"');
1052
1335
  }
1053
- return buildNetworkSnapshot$3(luvio, config);
1336
+ return buildNetworkSnapshot$8(luvio, config);
1054
1337
  };
1055
1338
  };
1056
1339
 
1057
- function select$8(luvio, params) {
1058
- return select$a();
1340
+ function select$f(luvio, params) {
1341
+ return select$h();
1059
1342
  }
1060
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1061
- getTypeCacheKeys$2(storeKeyMap, luvio, response);
1343
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
1344
+ getTypeCacheKeys$4(storeKeyMap, luvio, response);
1062
1345
  }
1063
- function ingestSuccess$2(luvio, resourceParams, response) {
1346
+ function ingestSuccess$6(luvio, resourceParams, response) {
1064
1347
  const { body } = response;
1065
1348
  const key = keyBuilderFromType(luvio, body);
1066
- luvio.storeIngest(key, ingest$2, body);
1349
+ luvio.storeIngest(key, ingest$4, body);
1067
1350
  const snapshot = luvio.storeLookup({
1068
1351
  recordId: key,
1069
- node: select$8(),
1352
+ node: select$f(),
1070
1353
  variables: {},
1071
1354
  });
1072
1355
  if (process.env.NODE_ENV !== 'production') {
@@ -1077,7 +1360,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
1077
1360
  deepFreeze(snapshot.data);
1078
1361
  return snapshot;
1079
1362
  }
1080
- function createResourceRequest$2(config) {
1363
+ function createResourceRequest$7(config) {
1081
1364
  const headers = {};
1082
1365
  return {
1083
1366
  baseUri: '/services/data/v60.0',
@@ -1091,48 +1374,48 @@ function createResourceRequest$2(config) {
1091
1374
  };
1092
1375
  }
1093
1376
 
1094
- const adapterName$2 = 'startSimpleImport';
1377
+ const adapterName$7 = 'startSimpleImport';
1095
1378
  const startSimpleImport_ConfigPropertyMetadata = [
1096
1379
  generateParamConfigMetadata('importReferenceId', true, 2 /* Body */, 0 /* String */),
1097
1380
  generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
1098
1381
  generateParamConfigMetadata('targetContext', true, 2 /* Body */, 0 /* String */),
1099
1382
  ];
1100
- const startSimpleImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, startSimpleImport_ConfigPropertyMetadata);
1101
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(startSimpleImport_ConfigPropertyMetadata);
1102
- function typeCheckConfig$2(untrustedConfig) {
1383
+ const startSimpleImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, startSimpleImport_ConfigPropertyMetadata);
1384
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$b(startSimpleImport_ConfigPropertyMetadata);
1385
+ function typeCheckConfig$7(untrustedConfig) {
1103
1386
  const config = {};
1104
- typeCheckConfig$5(untrustedConfig, config, startSimpleImport_ConfigPropertyMetadata);
1387
+ typeCheckConfig$b(untrustedConfig, config, startSimpleImport_ConfigPropertyMetadata);
1105
1388
  const untrustedConfig_options = untrustedConfig.options;
1106
- const referenceImportOptionsInputRepresentationValidationError = validate$7(untrustedConfig_options);
1389
+ const referenceImportOptionsInputRepresentationValidationError = validate$a(untrustedConfig_options);
1107
1390
  if (referenceImportOptionsInputRepresentationValidationError === null) {
1108
1391
  config.options = untrustedConfig_options;
1109
1392
  }
1110
1393
  return config;
1111
1394
  }
1112
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1395
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1113
1396
  if (!untrustedIsObject(untrustedConfig)) {
1114
1397
  return null;
1115
1398
  }
1116
1399
  if (process.env.NODE_ENV !== 'production') {
1117
1400
  validateConfig(untrustedConfig, configPropertyNames);
1118
1401
  }
1119
- const config = typeCheckConfig$2(untrustedConfig);
1402
+ const config = typeCheckConfig$7(untrustedConfig);
1120
1403
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1121
1404
  return null;
1122
1405
  }
1123
1406
  return config;
1124
1407
  }
1125
- function buildNetworkSnapshot$2(luvio, config, options) {
1126
- const resourceParams = createResourceParams$2(config);
1127
- const request = createResourceRequest$2(resourceParams);
1408
+ function buildNetworkSnapshot$7(luvio, config, options) {
1409
+ const resourceParams = createResourceParams$7(config);
1410
+ const request = createResourceRequest$7(resourceParams);
1128
1411
  return luvio.dispatchResourceRequest(request, options)
1129
1412
  .then((response) => {
1130
1413
  return luvio.handleSuccessResponse(() => {
1131
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1414
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response);
1132
1415
  return luvio.storeBroadcast().then(() => snapshot);
1133
1416
  }, () => {
1134
1417
  const cache = new StoreKeyMap();
1135
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1418
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
1136
1419
  return cache;
1137
1420
  });
1138
1421
  }, (response) => {
@@ -1142,33 +1425,355 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1142
1425
  }
1143
1426
  const startSimpleImportAdapterFactory = (luvio) => {
1144
1427
  return function startSimpleImport(untrustedConfig) {
1145
- const config = validateAdapterConfig$2(untrustedConfig, startSimpleImport_ConfigPropertyNames);
1428
+ const config = validateAdapterConfig$7(untrustedConfig, startSimpleImport_ConfigPropertyNames);
1146
1429
  // Invalid or incomplete config
1147
1430
  if (config === null) {
1148
1431
  throw new Error('Invalid config for "startSimpleImport"');
1149
1432
  }
1150
- return buildNetworkSnapshot$2(luvio, config);
1433
+ return buildNetworkSnapshot$7(luvio, config);
1151
1434
  };
1152
1435
  };
1153
1436
 
1154
- const VERSION$5 = "3f89a0e0e670920259887253d71fcaf0";
1155
- function validate$5(obj, path = 'CsvPreviewOutputRepresentation') {
1156
- const v_error = (() => {
1157
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1158
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1159
- }
1160
- const obj_headers = obj.headers;
1161
- const path_headers = path + '.headers';
1162
- if (!ArrayIsArray(obj_headers)) {
1163
- return new TypeError('Expected "array" but received "' + typeof obj_headers + '" (at "' + path_headers + '")');
1164
- }
1165
- for (let i = 0; i < obj_headers.length; i++) {
1166
- const obj_headers_item = obj_headers[i];
1167
- const path_headers_item = path_headers + '[' + i + ']';
1168
- if (typeof obj_headers_item !== 'string') {
1169
- return new TypeError('Expected "string" but received "' + typeof obj_headers_item + '" (at "' + path_headers_item + '")');
1170
- }
1171
- }
1437
+ function keyBuilder$a(luvio, params) {
1438
+ return keyBuilder$e(luvio, {
1439
+ id: params.urlParams.fileBasedImportId
1440
+ });
1441
+ }
1442
+ function getResponseCacheKeys$6(cacheKeyMap, luvio, resourceParams) {
1443
+ const key = keyBuilder$a(luvio, resourceParams);
1444
+ cacheKeyMap.set(key, {
1445
+ namespace: keyPrefix,
1446
+ representationName: RepresentationType$6,
1447
+ mergeable: false
1448
+ });
1449
+ }
1450
+ function evictSuccess(luvio, resourceParams) {
1451
+ const key = keyBuilder$a(luvio, resourceParams);
1452
+ luvio.storeEvict(key);
1453
+ }
1454
+ function createResourceRequest$6(config) {
1455
+ const headers = {};
1456
+ return {
1457
+ baseUri: '/services/data/v60.0',
1458
+ basePath: '/connect/industries/fileBasedDataImports/' + config.urlParams.fileBasedImportId + '',
1459
+ method: 'delete',
1460
+ body: null,
1461
+ urlParams: config.urlParams,
1462
+ queryParams: {},
1463
+ headers,
1464
+ priority: 'normal',
1465
+ };
1466
+ }
1467
+
1468
+ const adapterName$6 = 'deleteFileBasedDataImport';
1469
+ const deleteFileBasedDataImport_ConfigPropertyMetadata = [
1470
+ generateParamConfigMetadata('fileBasedImportId', true, 0 /* UrlParameter */, 0 /* String */),
1471
+ ];
1472
+ const deleteFileBasedDataImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, deleteFileBasedDataImport_ConfigPropertyMetadata);
1473
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$b(deleteFileBasedDataImport_ConfigPropertyMetadata);
1474
+ function typeCheckConfig$6(untrustedConfig) {
1475
+ const config = {};
1476
+ typeCheckConfig$b(untrustedConfig, config, deleteFileBasedDataImport_ConfigPropertyMetadata);
1477
+ return config;
1478
+ }
1479
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1480
+ if (!untrustedIsObject(untrustedConfig)) {
1481
+ return null;
1482
+ }
1483
+ if (process.env.NODE_ENV !== 'production') {
1484
+ validateConfig(untrustedConfig, configPropertyNames);
1485
+ }
1486
+ const config = typeCheckConfig$6(untrustedConfig);
1487
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1488
+ return null;
1489
+ }
1490
+ return config;
1491
+ }
1492
+ function buildNetworkSnapshot$6(luvio, config, options) {
1493
+ const resourceParams = createResourceParams$6(config);
1494
+ const request = createResourceRequest$6(resourceParams);
1495
+ return luvio.dispatchResourceRequest(request, options)
1496
+ .then(() => {
1497
+ return luvio.handleSuccessResponse(() => {
1498
+ evictSuccess(luvio, resourceParams);
1499
+ return luvio.storeBroadcast();
1500
+ }, () => {
1501
+ const cache = new StoreKeyMap();
1502
+ getResponseCacheKeys$6(cache, luvio, resourceParams);
1503
+ return cache;
1504
+ });
1505
+ }, (response) => {
1506
+ deepFreeze(response);
1507
+ throw response;
1508
+ });
1509
+ }
1510
+ const deleteFileBasedDataImportAdapterFactory = (luvio) => {
1511
+ return function fileBasedDataimportdeleteFileBasedDataImport(untrustedConfig) {
1512
+ const config = validateAdapterConfig$6(untrustedConfig, deleteFileBasedDataImport_ConfigPropertyNames);
1513
+ // Invalid or incomplete config
1514
+ if (config === null) {
1515
+ throw new Error(`Invalid config for "${adapterName$6}"`);
1516
+ }
1517
+ return buildNetworkSnapshot$6(luvio, config);
1518
+ };
1519
+ };
1520
+
1521
+ function select$e(luvio, params) {
1522
+ return select$l();
1523
+ }
1524
+ function keyBuilder$9(luvio, params) {
1525
+ return keyBuilder$e(luvio, {
1526
+ id: params.urlParams.fileBasedImportId
1527
+ });
1528
+ }
1529
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
1530
+ getTypeCacheKeys$6(storeKeyMap, luvio, response);
1531
+ }
1532
+ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
1533
+ const { body } = response;
1534
+ const key = keyBuilder$9(luvio, resourceParams);
1535
+ luvio.storeIngest(key, ingest$6, body);
1536
+ const snapshot = luvio.storeLookup({
1537
+ recordId: key,
1538
+ node: select$e(),
1539
+ variables: {},
1540
+ }, snapshotRefresh);
1541
+ if (process.env.NODE_ENV !== 'production') {
1542
+ if (snapshot.state !== 'Fulfilled') {
1543
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1544
+ }
1545
+ }
1546
+ deepFreeze(snapshot.data);
1547
+ return snapshot;
1548
+ }
1549
+ function ingestError$4(luvio, params, error, snapshotRefresh) {
1550
+ const key = keyBuilder$9(luvio, params);
1551
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1552
+ luvio.storeIngestError(key, errorSnapshot);
1553
+ return errorSnapshot;
1554
+ }
1555
+ function createResourceRequest$5(config) {
1556
+ const headers = {};
1557
+ return {
1558
+ baseUri: '/services/data/v60.0',
1559
+ basePath: '/connect/industries/fileBasedDataImports/' + config.urlParams.fileBasedImportId + '',
1560
+ method: 'get',
1561
+ body: null,
1562
+ urlParams: config.urlParams,
1563
+ queryParams: {},
1564
+ headers,
1565
+ priority: 'normal',
1566
+ };
1567
+ }
1568
+
1569
+ const adapterName$5 = 'getFileBasedDataImportById';
1570
+ const getFileBasedDataImportById_ConfigPropertyMetadata = [
1571
+ generateParamConfigMetadata('fileBasedImportId', true, 0 /* UrlParameter */, 0 /* String */),
1572
+ ];
1573
+ const getFileBasedDataImportById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getFileBasedDataImportById_ConfigPropertyMetadata);
1574
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$b(getFileBasedDataImportById_ConfigPropertyMetadata);
1575
+ function keyBuilder$8(luvio, config) {
1576
+ const resourceParams = createResourceParams$5(config);
1577
+ return keyBuilder$9(luvio, resourceParams);
1578
+ }
1579
+ function typeCheckConfig$5(untrustedConfig) {
1580
+ const config = {};
1581
+ typeCheckConfig$b(untrustedConfig, config, getFileBasedDataImportById_ConfigPropertyMetadata);
1582
+ return config;
1583
+ }
1584
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1585
+ if (!untrustedIsObject(untrustedConfig)) {
1586
+ return null;
1587
+ }
1588
+ if (process.env.NODE_ENV !== 'production') {
1589
+ validateConfig(untrustedConfig, configPropertyNames);
1590
+ }
1591
+ const config = typeCheckConfig$5(untrustedConfig);
1592
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1593
+ return null;
1594
+ }
1595
+ return config;
1596
+ }
1597
+ function adapterFragment$4(luvio, config) {
1598
+ createResourceParams$5(config);
1599
+ return select$e();
1600
+ }
1601
+ function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
1602
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
1603
+ config,
1604
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1605
+ });
1606
+ return luvio.storeBroadcast().then(() => snapshot);
1607
+ }
1608
+ function onFetchResponseError$4(luvio, config, resourceParams, response) {
1609
+ const snapshot = ingestError$4(luvio, resourceParams, response, {
1610
+ config,
1611
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1612
+ });
1613
+ return luvio.storeBroadcast().then(() => snapshot);
1614
+ }
1615
+ function buildNetworkSnapshot$5(luvio, config, options) {
1616
+ const resourceParams = createResourceParams$5(config);
1617
+ const request = createResourceRequest$5(resourceParams);
1618
+ return luvio.dispatchResourceRequest(request, options)
1619
+ .then((response) => {
1620
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
1621
+ const cache = new StoreKeyMap();
1622
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1623
+ return cache;
1624
+ });
1625
+ }, (response) => {
1626
+ return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
1627
+ });
1628
+ }
1629
+ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
1630
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
1631
+ }
1632
+ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
1633
+ const { luvio, config } = context;
1634
+ const selector = {
1635
+ recordId: keyBuilder$8(luvio, config),
1636
+ node: adapterFragment$4(luvio, config),
1637
+ variables: {},
1638
+ };
1639
+ const cacheSnapshot = storeLookup(selector, {
1640
+ config,
1641
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
1642
+ });
1643
+ return cacheSnapshot;
1644
+ }
1645
+ const getFileBasedDataImportByIdAdapterFactory = (luvio) => function fileBasedDataimport__getFileBasedDataImportById(untrustedConfig, requestContext) {
1646
+ const config = validateAdapterConfig$5(untrustedConfig, getFileBasedDataImportById_ConfigPropertyNames);
1647
+ // Invalid or incomplete config
1648
+ if (config === null) {
1649
+ return null;
1650
+ }
1651
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1652
+ buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
1653
+ };
1654
+
1655
+ function select$d(luvio, params) {
1656
+ return select$l();
1657
+ }
1658
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1659
+ getTypeCacheKeys$6(storeKeyMap, luvio, response);
1660
+ }
1661
+ function ingestSuccess$4(luvio, resourceParams, response) {
1662
+ const { body } = response;
1663
+ const key = keyBuilderFromType$1(luvio, body);
1664
+ luvio.storeIngest(key, ingest$6, body);
1665
+ const snapshot = luvio.storeLookup({
1666
+ recordId: key,
1667
+ node: select$d(),
1668
+ variables: {},
1669
+ });
1670
+ if (process.env.NODE_ENV !== 'production') {
1671
+ if (snapshot.state !== 'Fulfilled') {
1672
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1673
+ }
1674
+ }
1675
+ deepFreeze(snapshot.data);
1676
+ return snapshot;
1677
+ }
1678
+ function createResourceRequest$4(config) {
1679
+ const headers = {};
1680
+ return {
1681
+ baseUri: '/services/data/v60.0',
1682
+ basePath: '/connect/industries/fileBasedDataImports/' + config.urlParams.fileBasedImportId + '',
1683
+ method: 'patch',
1684
+ body: config.body,
1685
+ urlParams: config.urlParams,
1686
+ queryParams: {},
1687
+ headers,
1688
+ priority: 'normal',
1689
+ };
1690
+ }
1691
+
1692
+ const adapterName$4 = 'updateFileBasedDataImport';
1693
+ const updateFileBasedDataImport_ConfigPropertyMetadata = [
1694
+ generateParamConfigMetadata('fileBasedImportId', true, 0 /* UrlParameter */, 0 /* String */),
1695
+ generateParamConfigMetadata('failedRecordContentDoc', false, 2 /* Body */, 0 /* String */),
1696
+ generateParamConfigMetadata('failedRecordCount', false, 2 /* Body */, 3 /* Integer */),
1697
+ generateParamConfigMetadata('importOperationType', false, 2 /* Body */, 0 /* String */),
1698
+ generateParamConfigMetadata('importType', false, 2 /* Body */, 0 /* String */),
1699
+ generateParamConfigMetadata('jobIdentifier', false, 2 /* Body */, 0 /* String */),
1700
+ generateParamConfigMetadata('sourceContentDocument', false, 2 /* Body */, 0 /* String */),
1701
+ generateParamConfigMetadata('sourceFileName', false, 2 /* Body */, 0 /* String */),
1702
+ generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
1703
+ generateParamConfigMetadata('statusReason', false, 2 /* Body */, 0 /* String */),
1704
+ generateParamConfigMetadata('successfulRecordContentDoc', false, 2 /* Body */, 0 /* String */),
1705
+ generateParamConfigMetadata('successfulRecordCount', false, 2 /* Body */, 3 /* Integer */),
1706
+ generateParamConfigMetadata('targetContext', false, 2 /* Body */, 0 /* String */),
1707
+ generateParamConfigMetadata('unprocessedRecordContentDoc', false, 2 /* Body */, 0 /* String */),
1708
+ generateParamConfigMetadata('unprocessedRecordCount', false, 2 /* Body */, 3 /* Integer */),
1709
+ ];
1710
+ const updateFileBasedDataImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updateFileBasedDataImport_ConfigPropertyMetadata);
1711
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$b(updateFileBasedDataImport_ConfigPropertyMetadata);
1712
+ function typeCheckConfig$4(untrustedConfig) {
1713
+ const config = {};
1714
+ typeCheckConfig$b(untrustedConfig, config, updateFileBasedDataImport_ConfigPropertyMetadata);
1715
+ return config;
1716
+ }
1717
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1718
+ if (!untrustedIsObject(untrustedConfig)) {
1719
+ return null;
1720
+ }
1721
+ if (process.env.NODE_ENV !== 'production') {
1722
+ validateConfig(untrustedConfig, configPropertyNames);
1723
+ }
1724
+ const config = typeCheckConfig$4(untrustedConfig);
1725
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1726
+ return null;
1727
+ }
1728
+ return config;
1729
+ }
1730
+ function buildNetworkSnapshot$4(luvio, config, options) {
1731
+ const resourceParams = createResourceParams$4(config);
1732
+ const request = createResourceRequest$4(resourceParams);
1733
+ return luvio.dispatchResourceRequest(request, options)
1734
+ .then((response) => {
1735
+ return luvio.handleSuccessResponse(() => {
1736
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response);
1737
+ return luvio.storeBroadcast().then(() => snapshot);
1738
+ }, () => {
1739
+ const cache = new StoreKeyMap();
1740
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1741
+ return cache;
1742
+ });
1743
+ }, (response) => {
1744
+ deepFreeze(response);
1745
+ throw response;
1746
+ });
1747
+ }
1748
+ const updateFileBasedDataImportAdapterFactory = (luvio) => {
1749
+ return function updateFileBasedDataImport(untrustedConfig) {
1750
+ const config = validateAdapterConfig$4(untrustedConfig, updateFileBasedDataImport_ConfigPropertyNames);
1751
+ // Invalid or incomplete config
1752
+ if (config === null) {
1753
+ throw new Error('Invalid config for "updateFileBasedDataImport"');
1754
+ }
1755
+ return buildNetworkSnapshot$4(luvio, config);
1756
+ };
1757
+ };
1758
+
1759
+ const VERSION$8 = "3f89a0e0e670920259887253d71fcaf0";
1760
+ function validate$8(obj, path = 'CsvPreviewOutputRepresentation') {
1761
+ const v_error = (() => {
1762
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1763
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1764
+ }
1765
+ const obj_headers = obj.headers;
1766
+ const path_headers = path + '.headers';
1767
+ if (!ArrayIsArray(obj_headers)) {
1768
+ return new TypeError('Expected "array" but received "' + typeof obj_headers + '" (at "' + path_headers + '")');
1769
+ }
1770
+ for (let i = 0; i < obj_headers.length; i++) {
1771
+ const obj_headers_item = obj_headers[i];
1772
+ const path_headers_item = path_headers + '[' + i + ']';
1773
+ if (typeof obj_headers_item !== 'string') {
1774
+ return new TypeError('Expected "string" but received "' + typeof obj_headers_item + '" (at "' + path_headers_item + '")');
1775
+ }
1776
+ }
1172
1777
  if (obj.rows !== undefined) {
1173
1778
  const obj_rows = obj.rows;
1174
1779
  const path_rows = path + '.rows';
@@ -1214,14 +1819,14 @@ function validate$5(obj, path = 'CsvPreviewOutputRepresentation') {
1214
1819
  })();
1215
1820
  return v_error === undefined ? null : v_error;
1216
1821
  }
1217
- const RepresentationType$1 = 'CsvPreviewOutputRepresentation';
1218
- function normalize$1(input, existing, path, luvio, store, timestamp) {
1822
+ const RepresentationType$3 = 'CsvPreviewOutputRepresentation';
1823
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
1219
1824
  return input;
1220
1825
  }
1221
- const select$7 = function CsvPreviewOutputRepresentationSelect() {
1826
+ const select$c = function CsvPreviewOutputRepresentationSelect() {
1222
1827
  return {
1223
1828
  kind: 'Fragment',
1224
- version: VERSION$5,
1829
+ version: VERSION$8,
1225
1830
  private: [],
1226
1831
  selections: [
1227
1832
  {
@@ -1238,7 +1843,7 @@ const select$7 = function CsvPreviewOutputRepresentationSelect() {
1238
1843
  ]
1239
1844
  };
1240
1845
  };
1241
- function equals$5(existing, incoming) {
1846
+ function equals$8(existing, incoming) {
1242
1847
  const existing_headers = existing.headers;
1243
1848
  const incoming_headers = incoming.headers;
1244
1849
  const equals_headers_items = equalsArray(existing_headers, incoming_headers, (existing_headers_item, incoming_headers_item) => {
@@ -1274,44 +1879,44 @@ function equals$5(existing, incoming) {
1274
1879
  }
1275
1880
  return true;
1276
1881
  }
1277
- const ingest$1 = function CsvPreviewOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1882
+ const ingest$3 = function CsvPreviewOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1278
1883
  if (process.env.NODE_ENV !== 'production') {
1279
- const validateError = validate$5(input);
1884
+ const validateError = validate$8(input);
1280
1885
  if (validateError !== null) {
1281
1886
  throw validateError;
1282
1887
  }
1283
1888
  }
1284
1889
  const key = path.fullPath;
1285
1890
  const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
1286
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "fileBased-dataimport", VERSION$5, RepresentationType$1, equals$5);
1891
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "fileBased-dataimport", VERSION$8, RepresentationType$3, equals$8);
1287
1892
  return createLink(key);
1288
1893
  };
1289
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1894
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
1290
1895
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1291
1896
  const rootKey = fullPathFactory();
1292
1897
  rootKeySet.set(rootKey, {
1293
1898
  namespace: keyPrefix,
1294
- representationName: RepresentationType$1,
1899
+ representationName: RepresentationType$3,
1295
1900
  mergeable: false
1296
1901
  });
1297
1902
  }
1298
1903
 
1299
- function select$6(luvio, params) {
1300
- return select$7();
1904
+ function select$b(luvio, params) {
1905
+ return select$c();
1301
1906
  }
1302
- function keyBuilder$3(luvio, params) {
1907
+ function keyBuilder$7(luvio, params) {
1303
1908
  return keyPrefix + '::CsvPreviewOutputRepresentation:(' + 'delimiter:' + params.queryParams.delimiter + ',' + 'endOfLine:' + params.queryParams.endOfLine + ',' + 'numberOfRows:' + params.queryParams.numberOfRows + ',' + 'fileBasedImportId:' + params.urlParams.fileBasedImportId + ')';
1304
1909
  }
1305
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1306
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
1910
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1911
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
1307
1912
  }
1308
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1913
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1309
1914
  const { body } = response;
1310
- const key = keyBuilder$3(luvio, resourceParams);
1311
- luvio.storeIngest(key, ingest$1, body);
1915
+ const key = keyBuilder$7(luvio, resourceParams);
1916
+ luvio.storeIngest(key, ingest$3, body);
1312
1917
  const snapshot = luvio.storeLookup({
1313
1918
  recordId: key,
1314
- node: select$6(),
1919
+ node: select$b(),
1315
1920
  variables: {},
1316
1921
  }, snapshotRefresh);
1317
1922
  if (process.env.NODE_ENV !== 'production') {
@@ -1322,13 +1927,13 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1322
1927
  deepFreeze(snapshot.data);
1323
1928
  return snapshot;
1324
1929
  }
1325
- function ingestError$1(luvio, params, error, snapshotRefresh) {
1326
- const key = keyBuilder$3(luvio, params);
1930
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
1931
+ const key = keyBuilder$7(luvio, params);
1327
1932
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1328
1933
  luvio.storeIngestError(key, errorSnapshot);
1329
1934
  return errorSnapshot;
1330
1935
  }
1331
- function createResourceRequest$1(config) {
1936
+ function createResourceRequest$3(config) {
1332
1937
  const headers = {};
1333
1938
  return {
1334
1939
  baseUri: '/services/data/v60.0',
@@ -1342,97 +1947,369 @@ function createResourceRequest$1(config) {
1342
1947
  };
1343
1948
  }
1344
1949
 
1345
- const adapterName$1 = 'getCsvPreviewData';
1950
+ const adapterName$3 = 'getCsvPreviewData';
1346
1951
  const getCsvPreviewData_ConfigPropertyMetadata = [
1347
1952
  generateParamConfigMetadata('fileBasedImportId', true, 0 /* UrlParameter */, 0 /* String */),
1348
1953
  generateParamConfigMetadata('delimiter', false, 1 /* QueryParameter */, 0 /* String */),
1349
1954
  generateParamConfigMetadata('endOfLine', false, 1 /* QueryParameter */, 0 /* String */),
1350
1955
  generateParamConfigMetadata('numberOfRows', false, 1 /* QueryParameter */, 3 /* Integer */),
1351
1956
  ];
1352
- const getCsvPreviewData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getCsvPreviewData_ConfigPropertyMetadata);
1353
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getCsvPreviewData_ConfigPropertyMetadata);
1354
- function keyBuilder$2(luvio, config) {
1355
- const resourceParams = createResourceParams$1(config);
1356
- return keyBuilder$3(luvio, resourceParams);
1957
+ const getCsvPreviewData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getCsvPreviewData_ConfigPropertyMetadata);
1958
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$b(getCsvPreviewData_ConfigPropertyMetadata);
1959
+ function keyBuilder$6(luvio, config) {
1960
+ const resourceParams = createResourceParams$3(config);
1961
+ return keyBuilder$7(luvio, resourceParams);
1357
1962
  }
1358
- function typeCheckConfig$1(untrustedConfig) {
1963
+ function typeCheckConfig$3(untrustedConfig) {
1359
1964
  const config = {};
1360
- typeCheckConfig$5(untrustedConfig, config, getCsvPreviewData_ConfigPropertyMetadata);
1965
+ typeCheckConfig$b(untrustedConfig, config, getCsvPreviewData_ConfigPropertyMetadata);
1361
1966
  return config;
1362
1967
  }
1363
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1968
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1364
1969
  if (!untrustedIsObject(untrustedConfig)) {
1365
1970
  return null;
1366
1971
  }
1367
1972
  if (process.env.NODE_ENV !== 'production') {
1368
1973
  validateConfig(untrustedConfig, configPropertyNames);
1369
1974
  }
1370
- const config = typeCheckConfig$1(untrustedConfig);
1975
+ const config = typeCheckConfig$3(untrustedConfig);
1371
1976
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1372
1977
  return null;
1373
1978
  }
1374
1979
  return config;
1375
1980
  }
1376
- function adapterFragment$1(luvio, config) {
1377
- createResourceParams$1(config);
1378
- return select$6();
1981
+ function adapterFragment$3(luvio, config) {
1982
+ createResourceParams$3(config);
1983
+ return select$b();
1379
1984
  }
1380
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1381
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1985
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
1986
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1382
1987
  config,
1383
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
1988
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1384
1989
  });
1385
1990
  return luvio.storeBroadcast().then(() => snapshot);
1386
1991
  }
1387
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
1388
- const snapshot = ingestError$1(luvio, resourceParams, response, {
1992
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
1993
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
1994
+ config,
1995
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1996
+ });
1997
+ return luvio.storeBroadcast().then(() => snapshot);
1998
+ }
1999
+ function buildNetworkSnapshot$3(luvio, config, options) {
2000
+ const resourceParams = createResourceParams$3(config);
2001
+ const request = createResourceRequest$3(resourceParams);
2002
+ return luvio.dispatchResourceRequest(request, options)
2003
+ .then((response) => {
2004
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
2005
+ const cache = new StoreKeyMap();
2006
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
2007
+ return cache;
2008
+ });
2009
+ }, (response) => {
2010
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
2011
+ });
2012
+ }
2013
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
2014
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2015
+ }
2016
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
2017
+ const { luvio, config } = context;
2018
+ const selector = {
2019
+ recordId: keyBuilder$6(luvio, config),
2020
+ node: adapterFragment$3(luvio, config),
2021
+ variables: {},
2022
+ };
2023
+ const cacheSnapshot = storeLookup(selector, {
2024
+ config,
2025
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
2026
+ });
2027
+ return cacheSnapshot;
2028
+ }
2029
+ const getCsvPreviewDataAdapterFactory = (luvio) => function fileBasedDataimport__getCsvPreviewData(untrustedConfig, requestContext) {
2030
+ const config = validateAdapterConfig$3(untrustedConfig, getCsvPreviewData_ConfigPropertyNames);
2031
+ // Invalid or incomplete config
2032
+ if (config === null) {
2033
+ return null;
2034
+ }
2035
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2036
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
2037
+ };
2038
+
2039
+ const VERSION$7 = "4ec3aa5aac6556898543c214a1630f30";
2040
+ function validate$7(obj, path = 'DPEDefinitionRepresentation') {
2041
+ const v_error = (() => {
2042
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2043
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2044
+ }
2045
+ const obj_id = obj.id;
2046
+ const path_id = path + '.id';
2047
+ if (typeof obj_id !== 'string') {
2048
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
2049
+ }
2050
+ const obj_name = obj.name;
2051
+ const path_name = path + '.name';
2052
+ if (typeof obj_name !== 'string') {
2053
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
2054
+ }
2055
+ const obj_type = obj.type;
2056
+ const path_type = path + '.type';
2057
+ if (typeof obj_type !== 'string') {
2058
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
2059
+ }
2060
+ })();
2061
+ return v_error === undefined ? null : v_error;
2062
+ }
2063
+ const select$a = function DPEDefinitionRepresentationSelect() {
2064
+ return {
2065
+ kind: 'Fragment',
2066
+ version: VERSION$7,
2067
+ private: [],
2068
+ selections: [
2069
+ {
2070
+ name: 'id',
2071
+ kind: 'Scalar'
2072
+ },
2073
+ {
2074
+ name: 'name',
2075
+ kind: 'Scalar'
2076
+ },
2077
+ {
2078
+ name: 'type',
2079
+ kind: 'Scalar'
2080
+ }
2081
+ ]
2082
+ };
2083
+ };
2084
+ function equals$7(existing, incoming) {
2085
+ const existing_id = existing.id;
2086
+ const incoming_id = incoming.id;
2087
+ if (!(existing_id === incoming_id)) {
2088
+ return false;
2089
+ }
2090
+ const existing_name = existing.name;
2091
+ const incoming_name = incoming.name;
2092
+ if (!(existing_name === incoming_name)) {
2093
+ return false;
2094
+ }
2095
+ const existing_type = existing.type;
2096
+ const incoming_type = incoming.type;
2097
+ if (!(existing_type === incoming_type)) {
2098
+ return false;
2099
+ }
2100
+ return true;
2101
+ }
2102
+
2103
+ const VERSION$6 = "11962640986f27c1e05a2a2c80f391fb";
2104
+ function validate$6(obj, path = 'DPEDefinitionOutputRepresentation') {
2105
+ const v_error = (() => {
2106
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2107
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2108
+ }
2109
+ const obj_dpeDefinitions = obj.dpeDefinitions;
2110
+ const path_dpeDefinitions = path + '.dpeDefinitions';
2111
+ if (!ArrayIsArray(obj_dpeDefinitions)) {
2112
+ return new TypeError('Expected "array" but received "' + typeof obj_dpeDefinitions + '" (at "' + path_dpeDefinitions + '")');
2113
+ }
2114
+ for (let i = 0; i < obj_dpeDefinitions.length; i++) {
2115
+ const obj_dpeDefinitions_item = obj_dpeDefinitions[i];
2116
+ const path_dpeDefinitions_item = path_dpeDefinitions + '[' + i + ']';
2117
+ const referencepath_dpeDefinitions_itemValidationError = validate$7(obj_dpeDefinitions_item, path_dpeDefinitions_item);
2118
+ if (referencepath_dpeDefinitions_itemValidationError !== null) {
2119
+ let message = 'Object doesn\'t match DPEDefinitionRepresentation (at "' + path_dpeDefinitions_item + '")\n';
2120
+ message += referencepath_dpeDefinitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2121
+ return new TypeError(message);
2122
+ }
2123
+ }
2124
+ })();
2125
+ return v_error === undefined ? null : v_error;
2126
+ }
2127
+ const RepresentationType$2 = 'DPEDefinitionOutputRepresentation';
2128
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
2129
+ return input;
2130
+ }
2131
+ const select$9 = function DPEDefinitionOutputRepresentationSelect() {
2132
+ const { selections: DPEDefinitionRepresentation__selections, opaque: DPEDefinitionRepresentation__opaque, } = select$a();
2133
+ return {
2134
+ kind: 'Fragment',
2135
+ version: VERSION$6,
2136
+ private: [],
2137
+ selections: [
2138
+ {
2139
+ name: 'dpeDefinitions',
2140
+ kind: 'Object',
2141
+ plural: true,
2142
+ selections: DPEDefinitionRepresentation__selections
2143
+ }
2144
+ ]
2145
+ };
2146
+ };
2147
+ function equals$6(existing, incoming) {
2148
+ const existing_dpeDefinitions = existing.dpeDefinitions;
2149
+ const incoming_dpeDefinitions = incoming.dpeDefinitions;
2150
+ const equals_dpeDefinitions_items = equalsArray(existing_dpeDefinitions, incoming_dpeDefinitions, (existing_dpeDefinitions_item, incoming_dpeDefinitions_item) => {
2151
+ if (!(equals$7(existing_dpeDefinitions_item, incoming_dpeDefinitions_item))) {
2152
+ return false;
2153
+ }
2154
+ });
2155
+ if (equals_dpeDefinitions_items === false) {
2156
+ return false;
2157
+ }
2158
+ return true;
2159
+ }
2160
+ const ingest$2 = function DPEDefinitionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2161
+ if (process.env.NODE_ENV !== 'production') {
2162
+ const validateError = validate$6(input);
2163
+ if (validateError !== null) {
2164
+ throw validateError;
2165
+ }
2166
+ }
2167
+ const key = path.fullPath;
2168
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
2169
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "fileBased-dataimport", VERSION$6, RepresentationType$2, equals$6);
2170
+ return createLink(key);
2171
+ };
2172
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
2173
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2174
+ const rootKey = fullPathFactory();
2175
+ rootKeySet.set(rootKey, {
2176
+ namespace: keyPrefix,
2177
+ representationName: RepresentationType$2,
2178
+ mergeable: false
2179
+ });
2180
+ }
2181
+
2182
+ function select$8(luvio, params) {
2183
+ return select$9();
2184
+ }
2185
+ function keyBuilder$5(luvio, params) {
2186
+ return keyPrefix + '::DPEDefinitionOutputRepresentation:(' + ')';
2187
+ }
2188
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
2189
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$5());
2190
+ }
2191
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
2192
+ const { body } = response;
2193
+ const key = keyBuilder$5();
2194
+ luvio.storeIngest(key, ingest$2, body);
2195
+ const snapshot = luvio.storeLookup({
2196
+ recordId: key,
2197
+ node: select$8(),
2198
+ variables: {},
2199
+ }, snapshotRefresh);
2200
+ if (process.env.NODE_ENV !== 'production') {
2201
+ if (snapshot.state !== 'Fulfilled') {
2202
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2203
+ }
2204
+ }
2205
+ deepFreeze(snapshot.data);
2206
+ return snapshot;
2207
+ }
2208
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
2209
+ const key = keyBuilder$5();
2210
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2211
+ luvio.storeIngestError(key, errorSnapshot);
2212
+ return errorSnapshot;
2213
+ }
2214
+ function createResourceRequest$2(config) {
2215
+ const headers = {};
2216
+ return {
2217
+ baseUri: '/services/data/v60.0',
2218
+ basePath: '/connect/industries/fileBasedDataImports/dpeDefinitions',
2219
+ method: 'get',
2220
+ body: null,
2221
+ urlParams: {},
2222
+ queryParams: {},
2223
+ headers,
2224
+ priority: 'normal',
2225
+ };
2226
+ }
2227
+
2228
+ const adapterName$2 = 'getDPEDefinitions';
2229
+ const getDPEDefinitions_ConfigPropertyMetadata = [];
2230
+ const getDPEDefinitions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDPEDefinitions_ConfigPropertyMetadata);
2231
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$b(getDPEDefinitions_ConfigPropertyMetadata);
2232
+ function keyBuilder$4(luvio, config) {
2233
+ createResourceParams$2(config);
2234
+ return keyBuilder$5();
2235
+ }
2236
+ function typeCheckConfig$2(untrustedConfig) {
2237
+ const config = {};
2238
+ return config;
2239
+ }
2240
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
2241
+ if (!untrustedIsObject(untrustedConfig)) {
2242
+ return null;
2243
+ }
2244
+ if (process.env.NODE_ENV !== 'production') {
2245
+ validateConfig(untrustedConfig, configPropertyNames);
2246
+ }
2247
+ const config = typeCheckConfig$2();
2248
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2249
+ return null;
2250
+ }
2251
+ return config;
2252
+ }
2253
+ function adapterFragment$2(luvio, config) {
2254
+ createResourceParams$2(config);
2255
+ return select$8();
2256
+ }
2257
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
2258
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
2259
+ config,
2260
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
2261
+ });
2262
+ return luvio.storeBroadcast().then(() => snapshot);
2263
+ }
2264
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
2265
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1389
2266
  config,
1390
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2267
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1391
2268
  });
1392
2269
  return luvio.storeBroadcast().then(() => snapshot);
1393
2270
  }
1394
- function buildNetworkSnapshot$1(luvio, config, options) {
1395
- const resourceParams = createResourceParams$1(config);
1396
- const request = createResourceRequest$1(resourceParams);
2271
+ function buildNetworkSnapshot$2(luvio, config, options) {
2272
+ const resourceParams = createResourceParams$2(config);
2273
+ const request = createResourceRequest$2();
1397
2274
  return luvio.dispatchResourceRequest(request, options)
1398
2275
  .then((response) => {
1399
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
2276
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1400
2277
  const cache = new StoreKeyMap();
1401
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
2278
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1402
2279
  return cache;
1403
2280
  });
1404
2281
  }, (response) => {
1405
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
2282
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1406
2283
  });
1407
2284
  }
1408
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1409
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
2285
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
2286
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1410
2287
  }
1411
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2288
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1412
2289
  const { luvio, config } = context;
1413
2290
  const selector = {
1414
- recordId: keyBuilder$2(luvio, config),
1415
- node: adapterFragment$1(luvio, config),
2291
+ recordId: keyBuilder$4(luvio, config),
2292
+ node: adapterFragment$2(luvio, config),
1416
2293
  variables: {},
1417
2294
  };
1418
2295
  const cacheSnapshot = storeLookup(selector, {
1419
2296
  config,
1420
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
2297
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1421
2298
  });
1422
2299
  return cacheSnapshot;
1423
2300
  }
1424
- const getCsvPreviewDataAdapterFactory = (luvio) => function fileBasedDataimport__getCsvPreviewData(untrustedConfig, requestContext) {
1425
- const config = validateAdapterConfig$1(untrustedConfig, getCsvPreviewData_ConfigPropertyNames);
2301
+ const getDPEDefinitionsAdapterFactory = (luvio) => function fileBasedDataimport__getDPEDefinitions(untrustedConfig, requestContext) {
2302
+ const config = validateAdapterConfig$2(untrustedConfig, getDPEDefinitions_ConfigPropertyNames);
1426
2303
  // Invalid or incomplete config
1427
2304
  if (config === null) {
1428
2305
  return null;
1429
2306
  }
1430
2307
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1431
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
2308
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1432
2309
  };
1433
2310
 
1434
- const VERSION$4 = "79cbc962b5b6429d024e384c92f23cda";
1435
- function validate$4(obj, path = 'ReferenceFieldInfo') {
2311
+ const VERSION$5 = "79cbc962b5b6429d024e384c92f23cda";
2312
+ function validate$5(obj, path = 'ReferenceFieldInfo') {
1436
2313
  const v_error = (() => {
1437
2314
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1438
2315
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1450,10 +2327,10 @@ function validate$4(obj, path = 'ReferenceFieldInfo') {
1450
2327
  })();
1451
2328
  return v_error === undefined ? null : v_error;
1452
2329
  }
1453
- const select$5 = function ReferenceFieldInfoSelect() {
2330
+ const select$7 = function ReferenceFieldInfoSelect() {
1454
2331
  return {
1455
2332
  kind: 'Fragment',
1456
- version: VERSION$4,
2333
+ version: VERSION$5,
1457
2334
  private: [],
1458
2335
  selections: [
1459
2336
  {
@@ -1467,7 +2344,7 @@ const select$5 = function ReferenceFieldInfoSelect() {
1467
2344
  ]
1468
2345
  };
1469
2346
  };
1470
- function equals$4(existing, incoming) {
2347
+ function equals$5(existing, incoming) {
1471
2348
  const existing_fieldLabel = existing.fieldLabel;
1472
2349
  const incoming_fieldLabel = incoming.fieldLabel;
1473
2350
  if (!(existing_fieldLabel === incoming_fieldLabel)) {
@@ -1481,8 +2358,8 @@ function equals$4(existing, incoming) {
1481
2358
  return true;
1482
2359
  }
1483
2360
 
1484
- const VERSION$3 = "b3d49ed32b6dfdd7e4f99ef7e3629860";
1485
- function validate$3(obj, path = 'ReferenceEntityInfo') {
2361
+ const VERSION$4 = "b3d49ed32b6dfdd7e4f99ef7e3629860";
2362
+ function validate$4(obj, path = 'ReferenceEntityInfo') {
1486
2363
  const v_error = (() => {
1487
2364
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1488
2365
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1505,7 +2382,7 @@ function validate$3(obj, path = 'ReferenceEntityInfo') {
1505
2382
  for (let i = 0; i < obj_fields.length; i++) {
1506
2383
  const obj_fields_item = obj_fields[i];
1507
2384
  const path_fields_item = path_fields + '[' + i + ']';
1508
- const referencepath_fields_itemValidationError = validate$4(obj_fields_item, path_fields_item);
2385
+ const referencepath_fields_itemValidationError = validate$5(obj_fields_item, path_fields_item);
1509
2386
  if (referencepath_fields_itemValidationError !== null) {
1510
2387
  let message = 'Object doesn\'t match ReferenceFieldInfo (at "' + path_fields_item + '")\n';
1511
2388
  message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1515,11 +2392,11 @@ function validate$3(obj, path = 'ReferenceEntityInfo') {
1515
2392
  })();
1516
2393
  return v_error === undefined ? null : v_error;
1517
2394
  }
1518
- const select$4 = function ReferenceEntityInfoSelect() {
1519
- const { selections: ReferenceFieldInfo__selections, opaque: ReferenceFieldInfo__opaque, } = select$5();
2395
+ const select$6 = function ReferenceEntityInfoSelect() {
2396
+ const { selections: ReferenceFieldInfo__selections, opaque: ReferenceFieldInfo__opaque, } = select$7();
1520
2397
  return {
1521
2398
  kind: 'Fragment',
1522
- version: VERSION$3,
2399
+ version: VERSION$4,
1523
2400
  private: [],
1524
2401
  selections: [
1525
2402
  {
@@ -1539,7 +2416,7 @@ const select$4 = function ReferenceEntityInfoSelect() {
1539
2416
  ]
1540
2417
  };
1541
2418
  };
1542
- function equals$3(existing, incoming) {
2419
+ function equals$4(existing, incoming) {
1543
2420
  const existing_entityLabel = existing.entityLabel;
1544
2421
  const incoming_entityLabel = incoming.entityLabel;
1545
2422
  if (!(existing_entityLabel === incoming_entityLabel)) {
@@ -1553,7 +2430,7 @@ function equals$3(existing, incoming) {
1553
2430
  const existing_fields = existing.fields;
1554
2431
  const incoming_fields = incoming.fields;
1555
2432
  const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
1556
- if (!(equals$4(existing_fields_item, incoming_fields_item))) {
2433
+ if (!(equals$5(existing_fields_item, incoming_fields_item))) {
1557
2434
  return false;
1558
2435
  }
1559
2436
  });
@@ -1563,8 +2440,8 @@ function equals$3(existing, incoming) {
1563
2440
  return true;
1564
2441
  }
1565
2442
 
1566
- const VERSION$2 = "d025efb11c01b8dbb85eeae1ab377c2a";
1567
- function validate$2(obj, path = 'FieldInfoRepresentation') {
2443
+ const VERSION$3 = "d025efb11c01b8dbb85eeae1ab377c2a";
2444
+ function validate$3(obj, path = 'FieldInfoRepresentation') {
1568
2445
  const v_error = (() => {
1569
2446
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1570
2447
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1641,7 +2518,7 @@ function validate$2(obj, path = 'FieldInfoRepresentation') {
1641
2518
  for (let i = 0; i < obj_referenceTo.length; i++) {
1642
2519
  const obj_referenceTo_item = obj_referenceTo[i];
1643
2520
  const path_referenceTo_item = path_referenceTo + '[' + i + ']';
1644
- const referencepath_referenceTo_itemValidationError = validate$3(obj_referenceTo_item, path_referenceTo_item);
2521
+ const referencepath_referenceTo_itemValidationError = validate$4(obj_referenceTo_item, path_referenceTo_item);
1645
2522
  if (referencepath_referenceTo_itemValidationError !== null) {
1646
2523
  let message = 'Object doesn\'t match ReferenceEntityInfo (at "' + path_referenceTo_item + '")\n';
1647
2524
  message += referencepath_referenceTo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -1687,11 +2564,11 @@ function validate$2(obj, path = 'FieldInfoRepresentation') {
1687
2564
  })();
1688
2565
  return v_error === undefined ? null : v_error;
1689
2566
  }
1690
- const select$3 = function FieldInfoRepresentationSelect() {
1691
- const { selections: ReferenceEntityInfo__selections, opaque: ReferenceEntityInfo__opaque, } = select$4();
2567
+ const select$5 = function FieldInfoRepresentationSelect() {
2568
+ const { selections: ReferenceEntityInfo__selections, opaque: ReferenceEntityInfo__opaque, } = select$6();
1692
2569
  return {
1693
2570
  kind: 'Fragment',
1694
- version: VERSION$2,
2571
+ version: VERSION$3,
1695
2572
  private: [],
1696
2573
  selections: [
1697
2574
  {
@@ -1774,7 +2651,7 @@ const select$3 = function FieldInfoRepresentationSelect() {
1774
2651
  ]
1775
2652
  };
1776
2653
  };
1777
- function equals$2(existing, incoming) {
2654
+ function equals$3(existing, incoming) {
1778
2655
  const existing_createable = existing.createable;
1779
2656
  const incoming_createable = incoming.createable;
1780
2657
  // if at least one of these optionals is defined
@@ -1967,7 +2844,7 @@ function equals$2(existing, incoming) {
1967
2844
  return false;
1968
2845
  }
1969
2846
  const equals_referenceTo_items = equalsArray(existing_referenceTo, incoming_referenceTo, (existing_referenceTo_item, incoming_referenceTo_item) => {
1970
- if (!(equals$3(existing_referenceTo_item, incoming_referenceTo_item))) {
2847
+ if (!(equals$4(existing_referenceTo_item, incoming_referenceTo_item))) {
1971
2848
  return false;
1972
2849
  }
1973
2850
  });
@@ -1978,8 +2855,233 @@ function equals$2(existing, incoming) {
1978
2855
  return true;
1979
2856
  }
1980
2857
 
1981
- const VERSION$1 = "d499392ad98d91030e4b2cfd23557cd2";
1982
- function validate$1(obj, path = 'AutoMapResultRepresentation') {
2858
+ const VERSION$2 = "fb84569fbdb1214096f70e7d0a82aa88";
2859
+ function validate$2(obj, path = 'FieldInfoOutputRepresentation') {
2860
+ const v_error = (() => {
2861
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2862
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2863
+ }
2864
+ if (obj.fields !== undefined) {
2865
+ const obj_fields = obj.fields;
2866
+ const path_fields = path + '.fields';
2867
+ if (!ArrayIsArray(obj_fields)) {
2868
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
2869
+ }
2870
+ for (let i = 0; i < obj_fields.length; i++) {
2871
+ const obj_fields_item = obj_fields[i];
2872
+ const path_fields_item = path_fields + '[' + i + ']';
2873
+ const referencepath_fields_itemValidationError = validate$3(obj_fields_item, path_fields_item);
2874
+ if (referencepath_fields_itemValidationError !== null) {
2875
+ let message = 'Object doesn\'t match FieldInfoRepresentation (at "' + path_fields_item + '")\n';
2876
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2877
+ return new TypeError(message);
2878
+ }
2879
+ }
2880
+ }
2881
+ })();
2882
+ return v_error === undefined ? null : v_error;
2883
+ }
2884
+ const RepresentationType$1 = 'FieldInfoOutputRepresentation';
2885
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
2886
+ return input;
2887
+ }
2888
+ const select$4 = function FieldInfoOutputRepresentationSelect() {
2889
+ const { selections: FieldInfoRepresentation__selections, opaque: FieldInfoRepresentation__opaque, } = select$5();
2890
+ return {
2891
+ kind: 'Fragment',
2892
+ version: VERSION$2,
2893
+ private: [],
2894
+ selections: [
2895
+ {
2896
+ name: 'fields',
2897
+ kind: 'Object',
2898
+ plural: true,
2899
+ selections: FieldInfoRepresentation__selections,
2900
+ required: false
2901
+ }
2902
+ ]
2903
+ };
2904
+ };
2905
+ function equals$2(existing, incoming) {
2906
+ const existing_fields = existing.fields;
2907
+ const incoming_fields = incoming.fields;
2908
+ // if at least one of these optionals is defined
2909
+ if (existing_fields !== undefined || incoming_fields !== undefined) {
2910
+ // if one of these is not defined we know the other is defined and therefore
2911
+ // not equal
2912
+ if (existing_fields === undefined || incoming_fields === undefined) {
2913
+ return false;
2914
+ }
2915
+ const equals_fields_items = equalsArray(existing_fields, incoming_fields, (existing_fields_item, incoming_fields_item) => {
2916
+ if (!(equals$3(existing_fields_item, incoming_fields_item))) {
2917
+ return false;
2918
+ }
2919
+ });
2920
+ if (equals_fields_items === false) {
2921
+ return false;
2922
+ }
2923
+ }
2924
+ return true;
2925
+ }
2926
+ const ingest$1 = function FieldInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2927
+ if (process.env.NODE_ENV !== 'production') {
2928
+ const validateError = validate$2(input);
2929
+ if (validateError !== null) {
2930
+ throw validateError;
2931
+ }
2932
+ }
2933
+ const key = path.fullPath;
2934
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
2935
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "fileBased-dataimport", VERSION$2, RepresentationType$1, equals$2);
2936
+ return createLink(key);
2937
+ };
2938
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
2939
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2940
+ const rootKey = fullPathFactory();
2941
+ rootKeySet.set(rootKey, {
2942
+ namespace: keyPrefix,
2943
+ representationName: RepresentationType$1,
2944
+ mergeable: false
2945
+ });
2946
+ }
2947
+
2948
+ function select$3(luvio, params) {
2949
+ return select$4();
2950
+ }
2951
+ function keyBuilder$3(luvio, params) {
2952
+ return keyPrefix + '::FieldInfoOutputRepresentation:(' + 'batchSize:' + params.queryParams.batchSize + ',' + 'fieldName:' + params.queryParams.fieldName + ',' + 'startOffset:' + params.queryParams.startOffset + ',' + 'entityApiName:' + params.urlParams.entityApiName + ')';
2953
+ }
2954
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
2955
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
2956
+ }
2957
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
2958
+ const { body } = response;
2959
+ const key = keyBuilder$3(luvio, resourceParams);
2960
+ luvio.storeIngest(key, ingest$1, body);
2961
+ const snapshot = luvio.storeLookup({
2962
+ recordId: key,
2963
+ node: select$3(),
2964
+ variables: {},
2965
+ }, snapshotRefresh);
2966
+ if (process.env.NODE_ENV !== 'production') {
2967
+ if (snapshot.state !== 'Fulfilled') {
2968
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2969
+ }
2970
+ }
2971
+ deepFreeze(snapshot.data);
2972
+ return snapshot;
2973
+ }
2974
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
2975
+ const key = keyBuilder$3(luvio, params);
2976
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2977
+ luvio.storeIngestError(key, errorSnapshot);
2978
+ return errorSnapshot;
2979
+ }
2980
+ function createResourceRequest$1(config) {
2981
+ const headers = {};
2982
+ return {
2983
+ baseUri: '/services/data/v60.0',
2984
+ basePath: '/connect/industries/fileBasedDataImports/entities/' + config.urlParams.entityApiName + '/fields',
2985
+ method: 'get',
2986
+ body: null,
2987
+ urlParams: config.urlParams,
2988
+ queryParams: config.queryParams,
2989
+ headers,
2990
+ priority: 'normal',
2991
+ };
2992
+ }
2993
+
2994
+ const adapterName$1 = 'getAllFields';
2995
+ const getAllFields_ConfigPropertyMetadata = [
2996
+ generateParamConfigMetadata('entityApiName', true, 0 /* UrlParameter */, 0 /* String */),
2997
+ generateParamConfigMetadata('batchSize', false, 1 /* QueryParameter */, 3 /* Integer */),
2998
+ generateParamConfigMetadata('fieldName', false, 1 /* QueryParameter */, 0 /* String */),
2999
+ generateParamConfigMetadata('startOffset', false, 1 /* QueryParameter */, 3 /* Integer */),
3000
+ ];
3001
+ const getAllFields_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getAllFields_ConfigPropertyMetadata);
3002
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$b(getAllFields_ConfigPropertyMetadata);
3003
+ function keyBuilder$2(luvio, config) {
3004
+ const resourceParams = createResourceParams$1(config);
3005
+ return keyBuilder$3(luvio, resourceParams);
3006
+ }
3007
+ function typeCheckConfig$1(untrustedConfig) {
3008
+ const config = {};
3009
+ typeCheckConfig$b(untrustedConfig, config, getAllFields_ConfigPropertyMetadata);
3010
+ return config;
3011
+ }
3012
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
3013
+ if (!untrustedIsObject(untrustedConfig)) {
3014
+ return null;
3015
+ }
3016
+ if (process.env.NODE_ENV !== 'production') {
3017
+ validateConfig(untrustedConfig, configPropertyNames);
3018
+ }
3019
+ const config = typeCheckConfig$1(untrustedConfig);
3020
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
3021
+ return null;
3022
+ }
3023
+ return config;
3024
+ }
3025
+ function adapterFragment$1(luvio, config) {
3026
+ createResourceParams$1(config);
3027
+ return select$3();
3028
+ }
3029
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
3030
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
3031
+ config,
3032
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
3033
+ });
3034
+ return luvio.storeBroadcast().then(() => snapshot);
3035
+ }
3036
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
3037
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
3038
+ config,
3039
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
3040
+ });
3041
+ return luvio.storeBroadcast().then(() => snapshot);
3042
+ }
3043
+ function buildNetworkSnapshot$1(luvio, config, options) {
3044
+ const resourceParams = createResourceParams$1(config);
3045
+ const request = createResourceRequest$1(resourceParams);
3046
+ return luvio.dispatchResourceRequest(request, options)
3047
+ .then((response) => {
3048
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
3049
+ const cache = new StoreKeyMap();
3050
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
3051
+ return cache;
3052
+ });
3053
+ }, (response) => {
3054
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
3055
+ });
3056
+ }
3057
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
3058
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
3059
+ }
3060
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
3061
+ const { luvio, config } = context;
3062
+ const selector = {
3063
+ recordId: keyBuilder$2(luvio, config),
3064
+ node: adapterFragment$1(luvio, config),
3065
+ variables: {},
3066
+ };
3067
+ const cacheSnapshot = storeLookup(selector, {
3068
+ config,
3069
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
3070
+ });
3071
+ return cacheSnapshot;
3072
+ }
3073
+ const getAllFieldsAdapterFactory = (luvio) => function fileBasedDataimport__getAllFields(untrustedConfig, requestContext) {
3074
+ const config = validateAdapterConfig$1(untrustedConfig, getAllFields_ConfigPropertyNames);
3075
+ // Invalid or incomplete config
3076
+ if (config === null) {
3077
+ return null;
3078
+ }
3079
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
3080
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
3081
+ };
3082
+
3083
+ const VERSION$1 = "71048d5cd1af46b5223f16a75389f1b1";
3084
+ function validate$1(obj, path = 'CsvMappingRepresentation') {
1983
3085
  const v_error = (() => {
1984
3086
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1985
3087
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -1992,30 +3094,95 @@ function validate$1(obj, path = 'AutoMapResultRepresentation') {
1992
3094
  if (obj.hasUserAccess !== undefined) {
1993
3095
  const obj_hasUserAccess = obj.hasUserAccess;
1994
3096
  const path_hasUserAccess = path + '.hasUserAccess';
1995
- if (typeof obj_hasUserAccess !== 'boolean') {
1996
- return new TypeError('Expected "boolean" but received "' + typeof obj_hasUserAccess + '" (at "' + path_hasUserAccess + '")');
3097
+ let obj_hasUserAccess_union0 = null;
3098
+ const obj_hasUserAccess_union0_error = (() => {
3099
+ if (typeof obj_hasUserAccess !== 'boolean') {
3100
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasUserAccess + '" (at "' + path_hasUserAccess + '")');
3101
+ }
3102
+ })();
3103
+ if (obj_hasUserAccess_union0_error != null) {
3104
+ obj_hasUserAccess_union0 = obj_hasUserAccess_union0_error.message;
3105
+ }
3106
+ let obj_hasUserAccess_union1 = null;
3107
+ const obj_hasUserAccess_union1_error = (() => {
3108
+ if (obj_hasUserAccess !== null) {
3109
+ return new TypeError('Expected "null" but received "' + typeof obj_hasUserAccess + '" (at "' + path_hasUserAccess + '")');
3110
+ }
3111
+ })();
3112
+ if (obj_hasUserAccess_union1_error != null) {
3113
+ obj_hasUserAccess_union1 = obj_hasUserAccess_union1_error.message;
3114
+ }
3115
+ if (obj_hasUserAccess_union0 && obj_hasUserAccess_union1) {
3116
+ let message = 'Object doesn\'t match union (at "' + path_hasUserAccess + '")';
3117
+ message += '\n' + obj_hasUserAccess_union0.split('\n').map((line) => '\t' + line).join('\n');
3118
+ message += '\n' + obj_hasUserAccess_union1.split('\n').map((line) => '\t' + line).join('\n');
3119
+ return new TypeError(message);
1997
3120
  }
1998
3121
  }
1999
3122
  if (obj.mappedEntityColumn !== undefined) {
2000
3123
  const obj_mappedEntityColumn = obj.mappedEntityColumn;
2001
3124
  const path_mappedEntityColumn = path + '.mappedEntityColumn';
2002
- const referencepath_mappedEntityColumnValidationError = validate$2(obj_mappedEntityColumn, path_mappedEntityColumn);
2003
- if (referencepath_mappedEntityColumnValidationError !== null) {
2004
- let message = 'Object doesn\'t match FieldInfoRepresentation (at "' + path_mappedEntityColumn + '")\n';
2005
- message += referencepath_mappedEntityColumnValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3125
+ let obj_mappedEntityColumn_union0 = null;
3126
+ const obj_mappedEntityColumn_union0_error = (() => {
3127
+ const referencepath_mappedEntityColumnValidationError = validate$3(obj_mappedEntityColumn, path_mappedEntityColumn);
3128
+ if (referencepath_mappedEntityColumnValidationError !== null) {
3129
+ let message = 'Object doesn\'t match FieldInfoRepresentation (at "' + path_mappedEntityColumn + '")\n';
3130
+ message += referencepath_mappedEntityColumnValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3131
+ return new TypeError(message);
3132
+ }
3133
+ })();
3134
+ if (obj_mappedEntityColumn_union0_error != null) {
3135
+ obj_mappedEntityColumn_union0 = obj_mappedEntityColumn_union0_error.message;
3136
+ }
3137
+ let obj_mappedEntityColumn_union1 = null;
3138
+ const obj_mappedEntityColumn_union1_error = (() => {
3139
+ if (obj_mappedEntityColumn !== null) {
3140
+ return new TypeError('Expected "null" but received "' + typeof obj_mappedEntityColumn + '" (at "' + path_mappedEntityColumn + '")');
3141
+ }
3142
+ })();
3143
+ if (obj_mappedEntityColumn_union1_error != null) {
3144
+ obj_mappedEntityColumn_union1 = obj_mappedEntityColumn_union1_error.message;
3145
+ }
3146
+ if (obj_mappedEntityColumn_union0 && obj_mappedEntityColumn_union1) {
3147
+ let message = 'Object doesn\'t match union (at "' + path_mappedEntityColumn + '")';
3148
+ message += '\n' + obj_mappedEntityColumn_union0.split('\n').map((line) => '\t' + line).join('\n');
3149
+ message += '\n' + obj_mappedEntityColumn_union1.split('\n').map((line) => '\t' + line).join('\n');
2006
3150
  return new TypeError(message);
2007
3151
  }
2008
3152
  }
2009
- const obj_sampleValue = obj.sampleValue;
2010
- const path_sampleValue = path + '.sampleValue';
2011
- if (typeof obj_sampleValue !== 'string') {
2012
- return new TypeError('Expected "string" but received "' + typeof obj_sampleValue + '" (at "' + path_sampleValue + '")');
3153
+ if (obj.sampleValue !== undefined) {
3154
+ const obj_sampleValue = obj.sampleValue;
3155
+ const path_sampleValue = path + '.sampleValue';
3156
+ let obj_sampleValue_union0 = null;
3157
+ const obj_sampleValue_union0_error = (() => {
3158
+ if (typeof obj_sampleValue !== 'string') {
3159
+ return new TypeError('Expected "string" but received "' + typeof obj_sampleValue + '" (at "' + path_sampleValue + '")');
3160
+ }
3161
+ })();
3162
+ if (obj_sampleValue_union0_error != null) {
3163
+ obj_sampleValue_union0 = obj_sampleValue_union0_error.message;
3164
+ }
3165
+ let obj_sampleValue_union1 = null;
3166
+ const obj_sampleValue_union1_error = (() => {
3167
+ if (obj_sampleValue !== null) {
3168
+ return new TypeError('Expected "null" but received "' + typeof obj_sampleValue + '" (at "' + path_sampleValue + '")');
3169
+ }
3170
+ })();
3171
+ if (obj_sampleValue_union1_error != null) {
3172
+ obj_sampleValue_union1 = obj_sampleValue_union1_error.message;
3173
+ }
3174
+ if (obj_sampleValue_union0 && obj_sampleValue_union1) {
3175
+ let message = 'Object doesn\'t match union (at "' + path_sampleValue + '")';
3176
+ message += '\n' + obj_sampleValue_union0.split('\n').map((line) => '\t' + line).join('\n');
3177
+ message += '\n' + obj_sampleValue_union1.split('\n').map((line) => '\t' + line).join('\n');
3178
+ return new TypeError(message);
3179
+ }
2013
3180
  }
2014
3181
  })();
2015
3182
  return v_error === undefined ? null : v_error;
2016
3183
  }
2017
- const select$2 = function AutoMapResultRepresentationSelect() {
2018
- const { selections: FieldInfoRepresentation__selections, opaque: FieldInfoRepresentation__opaque, } = select$3();
3184
+ const select$2 = function CsvMappingRepresentationSelect() {
3185
+ const { selections: FieldInfoRepresentation__selections, opaque: FieldInfoRepresentation__opaque, } = select$5();
2019
3186
  return {
2020
3187
  kind: 'Fragment',
2021
3188
  version: VERSION$1,
@@ -2033,17 +3200,24 @@ const select$2 = function AutoMapResultRepresentationSelect() {
2033
3200
  {
2034
3201
  name: 'mappedEntityColumn',
2035
3202
  kind: 'Object',
3203
+ nullable: true,
2036
3204
  selections: FieldInfoRepresentation__selections,
2037
3205
  required: false
2038
3206
  },
2039
3207
  {
2040
3208
  name: 'sampleValue',
2041
- kind: 'Scalar'
3209
+ kind: 'Scalar',
3210
+ required: false
2042
3211
  }
2043
3212
  ]
2044
3213
  };
2045
3214
  };
2046
3215
  function equals$1(existing, incoming) {
3216
+ const existing_csvHeader = existing.csvHeader;
3217
+ const incoming_csvHeader = incoming.csvHeader;
3218
+ if (!(existing_csvHeader === incoming_csvHeader)) {
3219
+ return false;
3220
+ }
2047
3221
  const existing_hasUserAccess = existing.hasUserAccess;
2048
3222
  const incoming_hasUserAccess = incoming.hasUserAccess;
2049
3223
  // if at least one of these optionals is defined
@@ -2057,16 +3231,6 @@ function equals$1(existing, incoming) {
2057
3231
  return false;
2058
3232
  }
2059
3233
  }
2060
- const existing_csvHeader = existing.csvHeader;
2061
- const incoming_csvHeader = incoming.csvHeader;
2062
- if (!(existing_csvHeader === incoming_csvHeader)) {
2063
- return false;
2064
- }
2065
- const existing_sampleValue = existing.sampleValue;
2066
- const incoming_sampleValue = incoming.sampleValue;
2067
- if (!(existing_sampleValue === incoming_sampleValue)) {
2068
- return false;
2069
- }
2070
3234
  const existing_mappedEntityColumn = existing.mappedEntityColumn;
2071
3235
  const incoming_mappedEntityColumn = incoming.mappedEntityColumn;
2072
3236
  // if at least one of these optionals is defined
@@ -2076,71 +3240,87 @@ function equals$1(existing, incoming) {
2076
3240
  if (existing_mappedEntityColumn === undefined || incoming_mappedEntityColumn === undefined) {
2077
3241
  return false;
2078
3242
  }
2079
- if (!(equals$2(existing_mappedEntityColumn, incoming_mappedEntityColumn))) {
3243
+ if (!(existing_mappedEntityColumn === incoming_mappedEntityColumn
3244
+ || (existing_mappedEntityColumn != null &&
3245
+ incoming_mappedEntityColumn != null &&
3246
+ equals$3(existing_mappedEntityColumn, incoming_mappedEntityColumn)))) {
3247
+ return false;
3248
+ }
3249
+ }
3250
+ const existing_sampleValue = existing.sampleValue;
3251
+ const incoming_sampleValue = incoming.sampleValue;
3252
+ // if at least one of these optionals is defined
3253
+ if (existing_sampleValue !== undefined || incoming_sampleValue !== undefined) {
3254
+ // if one of these is not defined we know the other is defined and therefore
3255
+ // not equal
3256
+ if (existing_sampleValue === undefined || incoming_sampleValue === undefined) {
3257
+ return false;
3258
+ }
3259
+ if (!(existing_sampleValue === incoming_sampleValue)) {
2080
3260
  return false;
2081
3261
  }
2082
3262
  }
2083
3263
  return true;
2084
3264
  }
2085
3265
 
2086
- const VERSION = "0ffe3698d22ba020ccbfb48644edb046";
2087
- function validate(obj, path = 'AutoMapListResultRepresentation') {
3266
+ const VERSION = "c72fdfb750120999744a8774e34025e1";
3267
+ function validate(obj, path = 'CSVMappingsResultRepresentation') {
2088
3268
  const v_error = (() => {
2089
3269
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2090
3270
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2091
3271
  }
2092
- const obj_autoMapResults = obj.autoMapResults;
2093
- const path_autoMapResults = path + '.autoMapResults';
2094
- if (!ArrayIsArray(obj_autoMapResults)) {
2095
- return new TypeError('Expected "array" but received "' + typeof obj_autoMapResults + '" (at "' + path_autoMapResults + '")');
2096
- }
2097
- for (let i = 0; i < obj_autoMapResults.length; i++) {
2098
- const obj_autoMapResults_item = obj_autoMapResults[i];
2099
- const path_autoMapResults_item = path_autoMapResults + '[' + i + ']';
2100
- const referencepath_autoMapResults_itemValidationError = validate$1(obj_autoMapResults_item, path_autoMapResults_item);
2101
- if (referencepath_autoMapResults_itemValidationError !== null) {
2102
- let message = 'Object doesn\'t match AutoMapResultRepresentation (at "' + path_autoMapResults_item + '")\n';
2103
- message += referencepath_autoMapResults_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
3272
+ const obj_csvMappingRepresentations = obj.csvMappingRepresentations;
3273
+ const path_csvMappingRepresentations = path + '.csvMappingRepresentations';
3274
+ if (!ArrayIsArray(obj_csvMappingRepresentations)) {
3275
+ return new TypeError('Expected "array" but received "' + typeof obj_csvMappingRepresentations + '" (at "' + path_csvMappingRepresentations + '")');
3276
+ }
3277
+ for (let i = 0; i < obj_csvMappingRepresentations.length; i++) {
3278
+ const obj_csvMappingRepresentations_item = obj_csvMappingRepresentations[i];
3279
+ const path_csvMappingRepresentations_item = path_csvMappingRepresentations + '[' + i + ']';
3280
+ const referencepath_csvMappingRepresentations_itemValidationError = validate$1(obj_csvMappingRepresentations_item, path_csvMappingRepresentations_item);
3281
+ if (referencepath_csvMappingRepresentations_itemValidationError !== null) {
3282
+ let message = 'Object doesn\'t match CsvMappingRepresentation (at "' + path_csvMappingRepresentations_item + '")\n';
3283
+ message += referencepath_csvMappingRepresentations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2104
3284
  return new TypeError(message);
2105
3285
  }
2106
3286
  }
2107
3287
  })();
2108
3288
  return v_error === undefined ? null : v_error;
2109
3289
  }
2110
- const RepresentationType = 'AutoMapListResultRepresentation';
3290
+ const RepresentationType = 'CSVMappingsResultRepresentation';
2111
3291
  function normalize(input, existing, path, luvio, store, timestamp) {
2112
3292
  return input;
2113
3293
  }
2114
- const select$1 = function AutoMapListResultRepresentationSelect() {
2115
- const { selections: AutoMapResultRepresentation__selections, opaque: AutoMapResultRepresentation__opaque, } = select$2();
3294
+ const select$1 = function CSVMappingsResultRepresentationSelect() {
3295
+ const { selections: CsvMappingRepresentation__selections, opaque: CsvMappingRepresentation__opaque, } = select$2();
2116
3296
  return {
2117
3297
  kind: 'Fragment',
2118
3298
  version: VERSION,
2119
3299
  private: [],
2120
3300
  selections: [
2121
3301
  {
2122
- name: 'autoMapResults',
3302
+ name: 'csvMappingRepresentations',
2123
3303
  kind: 'Object',
2124
3304
  plural: true,
2125
- selections: AutoMapResultRepresentation__selections
3305
+ selections: CsvMappingRepresentation__selections
2126
3306
  }
2127
3307
  ]
2128
3308
  };
2129
3309
  };
2130
3310
  function equals(existing, incoming) {
2131
- const existing_autoMapResults = existing.autoMapResults;
2132
- const incoming_autoMapResults = incoming.autoMapResults;
2133
- const equals_autoMapResults_items = equalsArray(existing_autoMapResults, incoming_autoMapResults, (existing_autoMapResults_item, incoming_autoMapResults_item) => {
2134
- if (!(equals$1(existing_autoMapResults_item, incoming_autoMapResults_item))) {
3311
+ const existing_csvMappingRepresentations = existing.csvMappingRepresentations;
3312
+ const incoming_csvMappingRepresentations = incoming.csvMappingRepresentations;
3313
+ const equals_csvMappingRepresentations_items = equalsArray(existing_csvMappingRepresentations, incoming_csvMappingRepresentations, (existing_csvMappingRepresentations_item, incoming_csvMappingRepresentations_item) => {
3314
+ if (!(equals$1(existing_csvMappingRepresentations_item, incoming_csvMappingRepresentations_item))) {
2135
3315
  return false;
2136
3316
  }
2137
3317
  });
2138
- if (equals_autoMapResults_items === false) {
3318
+ if (equals_csvMappingRepresentations_items === false) {
2139
3319
  return false;
2140
3320
  }
2141
3321
  return true;
2142
3322
  }
2143
- const ingest = function AutoMapListResultRepresentationIngest(input, path, luvio, store, timestamp) {
3323
+ const ingest = function CSVMappingsResultRepresentationIngest(input, path, luvio, store, timestamp) {
2144
3324
  if (process.env.NODE_ENV !== 'production') {
2145
3325
  const validateError = validate(input);
2146
3326
  if (validateError !== null) {
@@ -2166,7 +3346,7 @@ function select(luvio, params) {
2166
3346
  return select$1();
2167
3347
  }
2168
3348
  function keyBuilder$1(luvio, params) {
2169
- return keyPrefix + '::AutoMapListResultRepresentation:(' + 'contentDocumentId:' + params.queryParams.contentDocumentId + ',' + 'delimiter:' + params.queryParams.delimiter + ',' + 'endOfLine:' + params.queryParams.endOfLine + ',' + 'entityApiName:' + params.queryParams.entityApiName + ')';
3349
+ return keyPrefix + '::CSVMappingsResultRepresentation:(' + 'contentDocumentId:' + params.queryParams.contentDocumentId + ',' + 'delimiter:' + params.queryParams.delimiter + ',' + 'endOfLine:' + params.queryParams.endOfLine + ',' + 'entityApiName:' + params.queryParams.entityApiName + ')';
2170
3350
  }
2171
3351
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
2172
3352
  getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
@@ -2216,14 +3396,14 @@ const getCsvAutoMap_ConfigPropertyMetadata = [
2216
3396
  generateParamConfigMetadata('entityApiName', true, 1 /* QueryParameter */, 0 /* String */),
2217
3397
  ];
2218
3398
  const getCsvAutoMap_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getCsvAutoMap_ConfigPropertyMetadata);
2219
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(getCsvAutoMap_ConfigPropertyMetadata);
3399
+ const createResourceParams = /*#__PURE__*/ createResourceParams$b(getCsvAutoMap_ConfigPropertyMetadata);
2220
3400
  function keyBuilder(luvio, config) {
2221
3401
  const resourceParams = createResourceParams(config);
2222
3402
  return keyBuilder$1(luvio, resourceParams);
2223
3403
  }
2224
3404
  function typeCheckConfig(untrustedConfig) {
2225
3405
  const config = {};
2226
- typeCheckConfig$5(untrustedConfig, config, getCsvAutoMap_ConfigPropertyMetadata);
3406
+ typeCheckConfig$b(untrustedConfig, config, getCsvAutoMap_ConfigPropertyMetadata);
2227
3407
  return config;
2228
3408
  }
2229
3409
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -2272,7 +3452,7 @@ function buildNetworkSnapshot(luvio, config, options) {
2272
3452
  });
2273
3453
  }
2274
3454
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2275
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
3455
+ return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2276
3456
  }
2277
3457
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
2278
3458
  const { luvio, config } = context;
@@ -2297,4 +3477,4 @@ const getCsvAutoMapAdapterFactory = (luvio) => function fileBasedDataimport__get
2297
3477
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2298
3478
  };
2299
3479
 
2300
- export { getCsvAutoMapAdapterFactory, getCsvPreviewDataAdapterFactory, getFileBasedDataImportsAdapterFactory, startAdvanceImportAdapterFactory, startSimpleImportAdapterFactory };
3480
+ export { createFileBasedDataImportAdapterFactory, deleteFileBasedDataImportAdapterFactory, getAllFieldsAdapterFactory, getCsvAutoMapAdapterFactory, getCsvPreviewDataAdapterFactory, getDPEDefinitionsAdapterFactory, getFileBasedDataImportByIdAdapterFactory, getFileBasedDataImportsAdapterFactory, startAdvanceImportAdapterFactory, startSimpleImportAdapterFactory, updateFileBasedDataImportAdapterFactory };