@salesforce/lds-adapters-industries-filebased-dataimport 1.250.0 → 1.251.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.
- package/dist/es/es2018/industries-filebased-dataimport.js +1311 -230
- package/dist/es/es2018/types/src/generated/adapters/getCsvAutoMap.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/{getGetCsvPreview.d.ts → getCsvPreviewData.d.ts} +16 -16
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -3
- package/dist/es/es2018/types/src/generated/resources/getConnectIndustriesFileBasedDataImportsAutomap.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/AutoMapListResultRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/AutoMapResultRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/CsvPreviewOutputRepresentation.d.ts +3 -4
- package/dist/es/es2018/types/src/generated/types/FieldInfoRepresentation.d.ts +71 -0
- package/dist/es/es2018/types/src/generated/types/FileBasedDataImportByUserResultRepresentation.d.ts +5 -6
- package/dist/es/es2018/types/src/generated/types/FileBasedDataImportRepresentation.d.ts +28 -7
- package/dist/es/es2018/types/src/generated/types/FileImportOutputRepresentation.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/types/ReferenceEntityInfo.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/ReferenceFieldInfo.d.ts +31 -0
- package/package.json +1 -1
- package/sfdc/index.js +1425 -336
- package/src/raml/api.raml +206 -25
- package/src/raml/luvio.raml +20 -6
|
@@ -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$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -91,12 +91,19 @@ function createLink(ref) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
const VERSION$
|
|
95
|
-
function validate$
|
|
94
|
+
const VERSION$8 = "64c9261a27e284b679e95c5a13a476cb";
|
|
95
|
+
function validate$b(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 + '")');
|
|
99
99
|
}
|
|
100
|
+
if (obj.createdBy !== undefined) {
|
|
101
|
+
const obj_createdBy = obj.createdBy;
|
|
102
|
+
const path_createdBy = path + '.createdBy';
|
|
103
|
+
if (typeof obj_createdBy !== 'string') {
|
|
104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
100
107
|
if (obj.failedRecordsCount !== undefined) {
|
|
101
108
|
const obj_failedRecordsCount = obj.failedRecordsCount;
|
|
102
109
|
const path_failedRecordsCount = path + '.failedRecordsCount';
|
|
@@ -104,11 +111,23 @@ function validate$6(obj, path = 'FileBasedDataImportRepresentation') {
|
|
|
104
111
|
return new TypeError('Expected "integer" but received "' + typeof obj_failedRecordsCount + '" (at "' + path_failedRecordsCount + '")');
|
|
105
112
|
}
|
|
106
113
|
}
|
|
107
|
-
if (obj.
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
if (typeof
|
|
111
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
114
|
+
if (obj.failedResults !== undefined) {
|
|
115
|
+
const obj_failedResults = obj.failedResults;
|
|
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 + '")');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const obj_fileBasedImportType = obj.fileBasedImportType;
|
|
122
|
+
const path_fileBasedImportType = path + '.fileBasedImportType';
|
|
123
|
+
if (typeof obj_fileBasedImportType !== 'string') {
|
|
124
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fileBasedImportType + '" (at "' + path_fileBasedImportType + '")');
|
|
125
|
+
}
|
|
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 + '")');
|
|
112
131
|
}
|
|
113
132
|
}
|
|
114
133
|
if (obj.importOperationType !== undefined) {
|
|
@@ -125,10 +144,24 @@ function validate$6(obj, path = 'FileBasedDataImportRepresentation') {
|
|
|
125
144
|
return new TypeError('Expected "string" but received "' + typeof obj_jobIdentifier + '" (at "' + path_jobIdentifier + '")');
|
|
126
145
|
}
|
|
127
146
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
147
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
148
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
149
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
150
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
151
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (obj.sourceContentDocument !== undefined) {
|
|
155
|
+
const obj_sourceContentDocument = obj.sourceContentDocument;
|
|
156
|
+
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 + '")');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const obj_sourceFileName = obj.sourceFileName;
|
|
162
|
+
const path_sourceFileName = path + '.sourceFileName';
|
|
163
|
+
if (typeof obj_sourceFileName !== 'string') {
|
|
164
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceFileName + '" (at "' + path_sourceFileName + '")');
|
|
132
165
|
}
|
|
133
166
|
const obj_status = obj.status;
|
|
134
167
|
const path_status = path + '.status';
|
|
@@ -149,6 +182,13 @@ function validate$6(obj, path = 'FileBasedDataImportRepresentation') {
|
|
|
149
182
|
return new TypeError('Expected "integer" but received "' + typeof obj_successRecordsCount + '" (at "' + path_successRecordsCount + '")');
|
|
150
183
|
}
|
|
151
184
|
}
|
|
185
|
+
if (obj.successfulResults !== undefined) {
|
|
186
|
+
const obj_successfulResults = obj.successfulResults;
|
|
187
|
+
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 + '")');
|
|
190
|
+
}
|
|
191
|
+
}
|
|
152
192
|
if (obj.targetContext !== undefined) {
|
|
153
193
|
const obj_targetContext = obj.targetContext;
|
|
154
194
|
const path_targetContext = path + '.targetContext';
|
|
@@ -156,6 +196,13 @@ function validate$6(obj, path = 'FileBasedDataImportRepresentation') {
|
|
|
156
196
|
return new TypeError('Expected "string" but received "' + typeof obj_targetContext + '" (at "' + path_targetContext + '")');
|
|
157
197
|
}
|
|
158
198
|
}
|
|
199
|
+
if (obj.unprocessedRecords !== undefined) {
|
|
200
|
+
const obj_unprocessedRecords = obj.unprocessedRecords;
|
|
201
|
+
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 + '")');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
159
206
|
if (obj.unprocessedRecordsCount !== undefined) {
|
|
160
207
|
const obj_unprocessedRecordsCount = obj.unprocessedRecordsCount;
|
|
161
208
|
const path_unprocessedRecordsCount = path + '.unprocessedRecordsCount';
|
|
@@ -166,19 +213,33 @@ function validate$6(obj, path = 'FileBasedDataImportRepresentation') {
|
|
|
166
213
|
})();
|
|
167
214
|
return v_error === undefined ? null : v_error;
|
|
168
215
|
}
|
|
169
|
-
const select$
|
|
216
|
+
const select$d = function FileBasedDataImportRepresentationSelect() {
|
|
170
217
|
return {
|
|
171
218
|
kind: 'Fragment',
|
|
172
|
-
version: VERSION$
|
|
219
|
+
version: VERSION$8,
|
|
173
220
|
private: [],
|
|
174
221
|
selections: [
|
|
222
|
+
{
|
|
223
|
+
name: 'createdBy',
|
|
224
|
+
kind: 'Scalar',
|
|
225
|
+
required: false
|
|
226
|
+
},
|
|
175
227
|
{
|
|
176
228
|
name: 'failedRecordsCount',
|
|
177
229
|
kind: 'Scalar',
|
|
178
230
|
required: false
|
|
179
231
|
},
|
|
232
|
+
{
|
|
233
|
+
name: 'failedResults',
|
|
234
|
+
kind: 'Scalar',
|
|
235
|
+
required: false
|
|
236
|
+
},
|
|
180
237
|
{
|
|
181
238
|
name: 'fileBasedImportType',
|
|
239
|
+
kind: 'Scalar'
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'id',
|
|
182
243
|
kind: 'Scalar',
|
|
183
244
|
required: false
|
|
184
245
|
},
|
|
@@ -192,8 +253,18 @@ const select$7 = function FileBasedDataImportRepresentationSelect() {
|
|
|
192
253
|
kind: 'Scalar',
|
|
193
254
|
required: false
|
|
194
255
|
},
|
|
256
|
+
{
|
|
257
|
+
name: 'lastModifiedDate',
|
|
258
|
+
kind: 'Scalar',
|
|
259
|
+
required: false
|
|
260
|
+
},
|
|
195
261
|
{
|
|
196
262
|
name: 'sourceContentDocument',
|
|
263
|
+
kind: 'Scalar',
|
|
264
|
+
required: false
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: 'sourceFileName',
|
|
197
268
|
kind: 'Scalar'
|
|
198
269
|
},
|
|
199
270
|
{
|
|
@@ -210,11 +281,21 @@ const select$7 = function FileBasedDataImportRepresentationSelect() {
|
|
|
210
281
|
kind: 'Scalar',
|
|
211
282
|
required: false
|
|
212
283
|
},
|
|
284
|
+
{
|
|
285
|
+
name: 'successfulResults',
|
|
286
|
+
kind: 'Scalar',
|
|
287
|
+
required: false
|
|
288
|
+
},
|
|
213
289
|
{
|
|
214
290
|
name: 'targetContext',
|
|
215
291
|
kind: 'Scalar',
|
|
216
292
|
required: false
|
|
217
293
|
},
|
|
294
|
+
{
|
|
295
|
+
name: 'unprocessedRecords',
|
|
296
|
+
kind: 'Scalar',
|
|
297
|
+
required: false
|
|
298
|
+
},
|
|
218
299
|
{
|
|
219
300
|
name: 'unprocessedRecordsCount',
|
|
220
301
|
kind: 'Scalar',
|
|
@@ -223,7 +304,7 @@ const select$7 = function FileBasedDataImportRepresentationSelect() {
|
|
|
223
304
|
]
|
|
224
305
|
};
|
|
225
306
|
};
|
|
226
|
-
function equals$
|
|
307
|
+
function equals$8(existing, incoming) {
|
|
227
308
|
const existing_failedRecordsCount = existing.failedRecordsCount;
|
|
228
309
|
const incoming_failedRecordsCount = incoming.failedRecordsCount;
|
|
229
310
|
// if at least one of these optionals is defined
|
|
@@ -263,16 +344,47 @@ function equals$3(existing, incoming) {
|
|
|
263
344
|
return false;
|
|
264
345
|
}
|
|
265
346
|
}
|
|
347
|
+
const existing_createdBy = existing.createdBy;
|
|
348
|
+
const incoming_createdBy = incoming.createdBy;
|
|
349
|
+
// if at least one of these optionals is defined
|
|
350
|
+
if (existing_createdBy !== undefined || incoming_createdBy !== undefined) {
|
|
351
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
352
|
+
// not equal
|
|
353
|
+
if (existing_createdBy === undefined || incoming_createdBy === undefined) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
if (!(existing_createdBy === incoming_createdBy)) {
|
|
357
|
+
return false;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
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
|
+
}
|
|
266
373
|
const existing_fileBasedImportType = existing.fileBasedImportType;
|
|
267
374
|
const incoming_fileBasedImportType = incoming.fileBasedImportType;
|
|
375
|
+
if (!(existing_fileBasedImportType === incoming_fileBasedImportType)) {
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
const existing_id = existing.id;
|
|
379
|
+
const incoming_id = incoming.id;
|
|
268
380
|
// if at least one of these optionals is defined
|
|
269
|
-
if (
|
|
381
|
+
if (existing_id !== undefined || incoming_id !== undefined) {
|
|
270
382
|
// if one of these is not defined we know the other is defined and therefore
|
|
271
383
|
// not equal
|
|
272
|
-
if (
|
|
384
|
+
if (existing_id === undefined || incoming_id === undefined) {
|
|
273
385
|
return false;
|
|
274
386
|
}
|
|
275
|
-
if (!(
|
|
387
|
+
if (!(existing_id === incoming_id)) {
|
|
276
388
|
return false;
|
|
277
389
|
}
|
|
278
390
|
}
|
|
@@ -302,9 +414,35 @@ function equals$3(existing, incoming) {
|
|
|
302
414
|
return false;
|
|
303
415
|
}
|
|
304
416
|
}
|
|
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
|
+
}
|
|
305
430
|
const existing_sourceContentDocument = existing.sourceContentDocument;
|
|
306
431
|
const incoming_sourceContentDocument = incoming.sourceContentDocument;
|
|
307
|
-
if
|
|
432
|
+
// if at least one of these optionals is defined
|
|
433
|
+
if (existing_sourceContentDocument !== undefined || incoming_sourceContentDocument !== undefined) {
|
|
434
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
435
|
+
// not equal
|
|
436
|
+
if (existing_sourceContentDocument === undefined || incoming_sourceContentDocument === undefined) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
if (!(existing_sourceContentDocument === incoming_sourceContentDocument)) {
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
const existing_sourceFileName = existing.sourceFileName;
|
|
444
|
+
const incoming_sourceFileName = incoming.sourceFileName;
|
|
445
|
+
if (!(existing_sourceFileName === incoming_sourceFileName)) {
|
|
308
446
|
return false;
|
|
309
447
|
}
|
|
310
448
|
const existing_status = existing.status;
|
|
@@ -325,6 +463,19 @@ function equals$3(existing, incoming) {
|
|
|
325
463
|
return false;
|
|
326
464
|
}
|
|
327
465
|
}
|
|
466
|
+
const existing_successfulResults = existing.successfulResults;
|
|
467
|
+
const incoming_successfulResults = incoming.successfulResults;
|
|
468
|
+
// if at least one of these optionals is defined
|
|
469
|
+
if (existing_successfulResults !== undefined || incoming_successfulResults !== undefined) {
|
|
470
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
471
|
+
// not equal
|
|
472
|
+
if (existing_successfulResults === undefined || incoming_successfulResults === undefined) {
|
|
473
|
+
return false;
|
|
474
|
+
}
|
|
475
|
+
if (!(existing_successfulResults === incoming_successfulResults)) {
|
|
476
|
+
return false;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
328
479
|
const existing_targetContext = existing.targetContext;
|
|
329
480
|
const incoming_targetContext = incoming.targetContext;
|
|
330
481
|
// if at least one of these optionals is defined
|
|
@@ -338,119 +489,153 @@ function equals$3(existing, incoming) {
|
|
|
338
489
|
return false;
|
|
339
490
|
}
|
|
340
491
|
}
|
|
492
|
+
const existing_unprocessedRecords = existing.unprocessedRecords;
|
|
493
|
+
const incoming_unprocessedRecords = incoming.unprocessedRecords;
|
|
494
|
+
// if at least one of these optionals is defined
|
|
495
|
+
if (existing_unprocessedRecords !== undefined || incoming_unprocessedRecords !== undefined) {
|
|
496
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
497
|
+
// not equal
|
|
498
|
+
if (existing_unprocessedRecords === undefined || incoming_unprocessedRecords === undefined) {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
if (!(existing_unprocessedRecords === incoming_unprocessedRecords)) {
|
|
502
|
+
return false;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
341
505
|
return true;
|
|
342
506
|
}
|
|
343
507
|
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
function validate$5(obj, path = 'FileBasedDataImportByUserResultRepresentation') {
|
|
508
|
+
const VERSION$7 = "4f8ba4c4260a7fc24efc18d625326f1e";
|
|
509
|
+
function validate$a(obj, path = 'FileBasedDataImportByUserResultRepresentation') {
|
|
347
510
|
const v_error = (() => {
|
|
348
511
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
349
512
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
350
513
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
514
|
+
if (obj.fileBasedDataImportRepresentations !== undefined) {
|
|
515
|
+
const obj_fileBasedDataImportRepresentations = obj.fileBasedDataImportRepresentations;
|
|
516
|
+
const path_fileBasedDataImportRepresentations = path + '.fileBasedDataImportRepresentations';
|
|
517
|
+
if (!ArrayIsArray(obj_fileBasedDataImportRepresentations)) {
|
|
518
|
+
return new TypeError('Expected "array" but received "' + typeof obj_fileBasedDataImportRepresentations + '" (at "' + path_fileBasedDataImportRepresentations + '")');
|
|
519
|
+
}
|
|
520
|
+
for (let i = 0; i < obj_fileBasedDataImportRepresentations.length; i++) {
|
|
521
|
+
const obj_fileBasedDataImportRepresentations_item = obj_fileBasedDataImportRepresentations[i];
|
|
522
|
+
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);
|
|
528
|
+
}
|
|
364
529
|
}
|
|
365
530
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
531
|
+
if (obj.isAdminUser !== undefined) {
|
|
532
|
+
const obj_isAdminUser = obj.isAdminUser;
|
|
533
|
+
const path_isAdminUser = path + '.isAdminUser';
|
|
534
|
+
if (typeof obj_isAdminUser !== 'boolean') {
|
|
535
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isAdminUser + '" (at "' + path_isAdminUser + '")');
|
|
536
|
+
}
|
|
370
537
|
}
|
|
371
538
|
})();
|
|
372
539
|
return v_error === undefined ? null : v_error;
|
|
373
540
|
}
|
|
374
|
-
const RepresentationType$
|
|
375
|
-
function normalize$
|
|
541
|
+
const RepresentationType$3 = 'FileBasedDataImportByUserResultRepresentation';
|
|
542
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
376
543
|
return input;
|
|
377
544
|
}
|
|
378
|
-
const select$
|
|
379
|
-
const { selections: FileBasedDataImportRepresentation__selections, opaque: FileBasedDataImportRepresentation__opaque, } = select$
|
|
545
|
+
const select$c = function FileBasedDataImportByUserResultRepresentationSelect() {
|
|
546
|
+
const { selections: FileBasedDataImportRepresentation__selections, opaque: FileBasedDataImportRepresentation__opaque, } = select$d();
|
|
380
547
|
return {
|
|
381
548
|
kind: 'Fragment',
|
|
382
|
-
version: VERSION$
|
|
549
|
+
version: VERSION$7,
|
|
383
550
|
private: [],
|
|
384
551
|
selections: [
|
|
385
552
|
{
|
|
386
553
|
name: 'fileBasedDataImportRepresentations',
|
|
387
554
|
kind: 'Object',
|
|
388
555
|
plural: true,
|
|
389
|
-
selections: FileBasedDataImportRepresentation__selections
|
|
556
|
+
selections: FileBasedDataImportRepresentation__selections,
|
|
557
|
+
required: false
|
|
390
558
|
},
|
|
391
559
|
{
|
|
392
560
|
name: 'isAdminUser',
|
|
393
|
-
kind: 'Scalar'
|
|
561
|
+
kind: 'Scalar',
|
|
562
|
+
required: false
|
|
394
563
|
}
|
|
395
564
|
]
|
|
396
565
|
};
|
|
397
566
|
};
|
|
398
|
-
function equals$
|
|
567
|
+
function equals$7(existing, incoming) {
|
|
399
568
|
const existing_isAdminUser = existing.isAdminUser;
|
|
400
569
|
const incoming_isAdminUser = incoming.isAdminUser;
|
|
401
|
-
if
|
|
402
|
-
|
|
570
|
+
// if at least one of these optionals is defined
|
|
571
|
+
if (existing_isAdminUser !== undefined || incoming_isAdminUser !== undefined) {
|
|
572
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
573
|
+
// not equal
|
|
574
|
+
if (existing_isAdminUser === undefined || incoming_isAdminUser === undefined) {
|
|
575
|
+
return false;
|
|
576
|
+
}
|
|
577
|
+
if (!(existing_isAdminUser === incoming_isAdminUser)) {
|
|
578
|
+
return false;
|
|
579
|
+
}
|
|
403
580
|
}
|
|
404
581
|
const existing_fileBasedDataImportRepresentations = existing.fileBasedDataImportRepresentations;
|
|
405
582
|
const incoming_fileBasedDataImportRepresentations = incoming.fileBasedDataImportRepresentations;
|
|
406
|
-
|
|
407
|
-
|
|
583
|
+
// if at least one of these optionals is defined
|
|
584
|
+
if (existing_fileBasedDataImportRepresentations !== undefined || incoming_fileBasedDataImportRepresentations !== undefined) {
|
|
585
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
586
|
+
// not equal
|
|
587
|
+
if (existing_fileBasedDataImportRepresentations === undefined || incoming_fileBasedDataImportRepresentations === undefined) {
|
|
588
|
+
return false;
|
|
589
|
+
}
|
|
590
|
+
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))) {
|
|
592
|
+
return false;
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
if (equals_fileBasedDataImportRepresentations_items === false) {
|
|
408
596
|
return false;
|
|
409
597
|
}
|
|
410
|
-
});
|
|
411
|
-
if (equals_fileBasedDataImportRepresentations_items === false) {
|
|
412
|
-
return false;
|
|
413
598
|
}
|
|
414
599
|
return true;
|
|
415
600
|
}
|
|
416
|
-
const ingest$
|
|
601
|
+
const ingest$3 = function FileBasedDataImportByUserResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
417
602
|
if (process.env.NODE_ENV !== 'production') {
|
|
418
|
-
const validateError = validate$
|
|
603
|
+
const validateError = validate$a(input);
|
|
419
604
|
if (validateError !== null) {
|
|
420
605
|
throw validateError;
|
|
421
606
|
}
|
|
422
607
|
}
|
|
423
608
|
const key = path.fullPath;
|
|
424
|
-
const ttlToUse =
|
|
425
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
609
|
+
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);
|
|
426
611
|
return createLink(key);
|
|
427
612
|
};
|
|
428
|
-
function getTypeCacheKeys$
|
|
613
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
429
614
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
430
615
|
const rootKey = fullPathFactory();
|
|
431
616
|
rootKeySet.set(rootKey, {
|
|
432
617
|
namespace: keyPrefix,
|
|
433
|
-
representationName: RepresentationType$
|
|
618
|
+
representationName: RepresentationType$3,
|
|
434
619
|
mergeable: false
|
|
435
620
|
});
|
|
436
621
|
}
|
|
437
622
|
|
|
438
|
-
function select$
|
|
439
|
-
return select$
|
|
623
|
+
function select$b(luvio, params) {
|
|
624
|
+
return select$c();
|
|
440
625
|
}
|
|
441
|
-
function keyBuilder$
|
|
626
|
+
function keyBuilder$6(luvio, params) {
|
|
442
627
|
return keyPrefix + '::FileBasedDataImportByUserResultRepresentation:(' + ')';
|
|
443
628
|
}
|
|
444
|
-
function getResponseCacheKeys$
|
|
445
|
-
getTypeCacheKeys$
|
|
629
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
630
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$6());
|
|
446
631
|
}
|
|
447
|
-
function ingestSuccess$
|
|
632
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
448
633
|
const { body } = response;
|
|
449
|
-
const key = keyBuilder$
|
|
450
|
-
luvio.storeIngest(key, ingest$
|
|
634
|
+
const key = keyBuilder$6();
|
|
635
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
451
636
|
const snapshot = luvio.storeLookup({
|
|
452
637
|
recordId: key,
|
|
453
|
-
node: select$
|
|
638
|
+
node: select$b(),
|
|
454
639
|
variables: {},
|
|
455
640
|
}, snapshotRefresh);
|
|
456
641
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -461,13 +646,13 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
461
646
|
deepFreeze(snapshot.data);
|
|
462
647
|
return snapshot;
|
|
463
648
|
}
|
|
464
|
-
function ingestError$
|
|
465
|
-
const key = keyBuilder$
|
|
649
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
650
|
+
const key = keyBuilder$6();
|
|
466
651
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
467
652
|
luvio.storeIngestError(key, errorSnapshot);
|
|
468
653
|
return errorSnapshot;
|
|
469
654
|
}
|
|
470
|
-
function createResourceRequest$
|
|
655
|
+
function createResourceRequest$4(config) {
|
|
471
656
|
const headers = {};
|
|
472
657
|
return {
|
|
473
658
|
baseUri: '/services/data/v60.0',
|
|
@@ -481,90 +666,90 @@ function createResourceRequest$3(config) {
|
|
|
481
666
|
};
|
|
482
667
|
}
|
|
483
668
|
|
|
484
|
-
const adapterName$
|
|
669
|
+
const adapterName$4 = 'getFileBasedDataImports';
|
|
485
670
|
const getFileBasedDataImports_ConfigPropertyMetadata = [];
|
|
486
|
-
const getFileBasedDataImports_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
487
|
-
const createResourceParams$
|
|
488
|
-
function keyBuilder$
|
|
489
|
-
createResourceParams$
|
|
490
|
-
return keyBuilder$
|
|
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();
|
|
491
676
|
}
|
|
492
|
-
function typeCheckConfig$
|
|
677
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
493
678
|
const config = {};
|
|
494
679
|
return config;
|
|
495
680
|
}
|
|
496
|
-
function validateAdapterConfig$
|
|
681
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
497
682
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
498
683
|
return null;
|
|
499
684
|
}
|
|
500
685
|
if (process.env.NODE_ENV !== 'production') {
|
|
501
686
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
502
687
|
}
|
|
503
|
-
const config = typeCheckConfig$
|
|
688
|
+
const config = typeCheckConfig$4();
|
|
504
689
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
505
690
|
return null;
|
|
506
691
|
}
|
|
507
692
|
return config;
|
|
508
693
|
}
|
|
509
|
-
function adapterFragment$
|
|
510
|
-
createResourceParams$
|
|
511
|
-
return select$
|
|
694
|
+
function adapterFragment$2(luvio, config) {
|
|
695
|
+
createResourceParams$4(config);
|
|
696
|
+
return select$b();
|
|
512
697
|
}
|
|
513
|
-
function onFetchResponseSuccess$
|
|
514
|
-
const snapshot = ingestSuccess$
|
|
698
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
699
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
515
700
|
config,
|
|
516
|
-
resolve: () => buildNetworkSnapshot$
|
|
701
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
517
702
|
});
|
|
518
703
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
519
704
|
}
|
|
520
|
-
function onFetchResponseError$
|
|
521
|
-
const snapshot = ingestError$
|
|
705
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
706
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
522
707
|
config,
|
|
523
|
-
resolve: () => buildNetworkSnapshot$
|
|
708
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
524
709
|
});
|
|
525
710
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
526
711
|
}
|
|
527
|
-
function buildNetworkSnapshot$
|
|
528
|
-
const resourceParams = createResourceParams$
|
|
529
|
-
const request = createResourceRequest$
|
|
712
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
713
|
+
const resourceParams = createResourceParams$4(config);
|
|
714
|
+
const request = createResourceRequest$4();
|
|
530
715
|
return luvio.dispatchResourceRequest(request, options)
|
|
531
716
|
.then((response) => {
|
|
532
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
717
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
533
718
|
const cache = new StoreKeyMap();
|
|
534
|
-
getResponseCacheKeys$
|
|
719
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
535
720
|
return cache;
|
|
536
721
|
});
|
|
537
722
|
}, (response) => {
|
|
538
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
723
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
539
724
|
});
|
|
540
725
|
}
|
|
541
|
-
function buildNetworkSnapshotCachePolicy$
|
|
542
|
-
return buildNetworkSnapshotCachePolicy$
|
|
726
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
727
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
543
728
|
}
|
|
544
|
-
function buildCachedSnapshotCachePolicy$
|
|
729
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
545
730
|
const { luvio, config } = context;
|
|
546
731
|
const selector = {
|
|
547
|
-
recordId: keyBuilder$
|
|
548
|
-
node: adapterFragment$
|
|
732
|
+
recordId: keyBuilder$5(luvio, config),
|
|
733
|
+
node: adapterFragment$2(luvio, config),
|
|
549
734
|
variables: {},
|
|
550
735
|
};
|
|
551
736
|
const cacheSnapshot = storeLookup(selector, {
|
|
552
737
|
config,
|
|
553
|
-
resolve: () => buildNetworkSnapshot$
|
|
738
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
554
739
|
});
|
|
555
740
|
return cacheSnapshot;
|
|
556
741
|
}
|
|
557
742
|
const getFileBasedDataImportsAdapterFactory = (luvio) => function fileBasedDataimport__getFileBasedDataImports(untrustedConfig, requestContext) {
|
|
558
|
-
const config = validateAdapterConfig$
|
|
743
|
+
const config = validateAdapterConfig$4(untrustedConfig, getFileBasedDataImports_ConfigPropertyNames);
|
|
559
744
|
// Invalid or incomplete config
|
|
560
745
|
if (config === null) {
|
|
561
746
|
return null;
|
|
562
747
|
}
|
|
563
748
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
564
|
-
buildCachedSnapshotCachePolicy$
|
|
749
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
565
750
|
};
|
|
566
751
|
|
|
567
|
-
function validate$
|
|
752
|
+
function validate$9(obj, path = 'FieldConfigurationInputRepresentation') {
|
|
568
753
|
const v_error = (() => {
|
|
569
754
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
570
755
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -608,7 +793,7 @@ function validate$4(obj, path = 'FieldConfigurationInputRepresentation') {
|
|
|
608
793
|
return v_error === undefined ? null : v_error;
|
|
609
794
|
}
|
|
610
795
|
|
|
611
|
-
function validate$
|
|
796
|
+
function validate$8(obj, path = 'ImportOperationInputRepresentation') {
|
|
612
797
|
const v_error = (() => {
|
|
613
798
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
614
799
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -638,7 +823,7 @@ function validate$3(obj, path = 'ImportOperationInputRepresentation') {
|
|
|
638
823
|
return v_error === undefined ? null : v_error;
|
|
639
824
|
}
|
|
640
825
|
|
|
641
|
-
function validate$
|
|
826
|
+
function validate$7(obj, path = 'ImportOptionsInputRepresentation') {
|
|
642
827
|
const v_error = (() => {
|
|
643
828
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
644
829
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -666,7 +851,7 @@ function validate$2(obj, path = 'ImportOptionsInputRepresentation') {
|
|
|
666
851
|
for (let i = 0; i < obj_fieldConfigurations.length; i++) {
|
|
667
852
|
const obj_fieldConfigurations_item = obj_fieldConfigurations[i];
|
|
668
853
|
const path_fieldConfigurations_item = path_fieldConfigurations + '[' + i + ']';
|
|
669
|
-
const referencepath_fieldConfigurations_itemValidationError = validate$
|
|
854
|
+
const referencepath_fieldConfigurations_itemValidationError = validate$9(obj_fieldConfigurations_item, path_fieldConfigurations_item);
|
|
670
855
|
if (referencepath_fieldConfigurations_itemValidationError !== null) {
|
|
671
856
|
let message = 'Object doesn\'t match FieldConfigurationInputRepresentation (at "' + path_fieldConfigurations_item + '")\n';
|
|
672
857
|
message += referencepath_fieldConfigurations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -677,7 +862,7 @@ function validate$2(obj, path = 'ImportOptionsInputRepresentation') {
|
|
|
677
862
|
if (obj.operation !== undefined) {
|
|
678
863
|
const obj_operation = obj.operation;
|
|
679
864
|
const path_operation = path + '.operation';
|
|
680
|
-
const referencepath_operationValidationError = validate$
|
|
865
|
+
const referencepath_operationValidationError = validate$8(obj_operation, path_operation);
|
|
681
866
|
if (referencepath_operationValidationError !== null) {
|
|
682
867
|
let message = 'Object doesn\'t match ImportOperationInputRepresentation (at "' + path_operation + '")\n';
|
|
683
868
|
message += referencepath_operationValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -688,9 +873,8 @@ function validate$2(obj, path = 'ImportOptionsInputRepresentation') {
|
|
|
688
873
|
return v_error === undefined ? null : v_error;
|
|
689
874
|
}
|
|
690
875
|
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
function validate$1(obj, path = 'FileImportOutputRepresentation') {
|
|
876
|
+
const VERSION$6 = "0f74d1482de21ff21d94491b9f9b869a";
|
|
877
|
+
function validate$6(obj, path = 'FileImportOutputRepresentation') {
|
|
694
878
|
const v_error = (() => {
|
|
695
879
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
696
880
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -708,23 +892,23 @@ function validate$1(obj, path = 'FileImportOutputRepresentation') {
|
|
|
708
892
|
})();
|
|
709
893
|
return v_error === undefined ? null : v_error;
|
|
710
894
|
}
|
|
711
|
-
const RepresentationType$
|
|
712
|
-
function keyBuilder$
|
|
713
|
-
return keyPrefix + '::' + RepresentationType$
|
|
895
|
+
const RepresentationType$2 = 'FileImportOutputRepresentation';
|
|
896
|
+
function keyBuilder$4(luvio, config) {
|
|
897
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.statusCode;
|
|
714
898
|
}
|
|
715
899
|
function keyBuilderFromType(luvio, object) {
|
|
716
900
|
const keyParams = {
|
|
717
901
|
statusCode: object.statusCode
|
|
718
902
|
};
|
|
719
|
-
return keyBuilder$
|
|
903
|
+
return keyBuilder$4(luvio, keyParams);
|
|
720
904
|
}
|
|
721
|
-
function normalize$
|
|
905
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
722
906
|
return input;
|
|
723
907
|
}
|
|
724
|
-
const select$
|
|
908
|
+
const select$a = function FileImportOutputRepresentationSelect() {
|
|
725
909
|
return {
|
|
726
910
|
kind: 'Fragment',
|
|
727
|
-
version: VERSION$
|
|
911
|
+
version: VERSION$6,
|
|
728
912
|
private: [],
|
|
729
913
|
selections: [
|
|
730
914
|
{
|
|
@@ -738,7 +922,7 @@ const select$4 = function FileImportOutputRepresentationSelect() {
|
|
|
738
922
|
]
|
|
739
923
|
};
|
|
740
924
|
};
|
|
741
|
-
function equals$
|
|
925
|
+
function equals$6(existing, incoming) {
|
|
742
926
|
const existing_statusCode = existing.statusCode;
|
|
743
927
|
const incoming_statusCode = incoming.statusCode;
|
|
744
928
|
if (!(existing_statusCode === incoming_statusCode)) {
|
|
@@ -751,41 +935,41 @@ function equals$1(existing, incoming) {
|
|
|
751
935
|
}
|
|
752
936
|
return true;
|
|
753
937
|
}
|
|
754
|
-
const ingest$
|
|
938
|
+
const ingest$2 = function FileImportOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
755
939
|
if (process.env.NODE_ENV !== 'production') {
|
|
756
|
-
const validateError = validate$
|
|
940
|
+
const validateError = validate$6(input);
|
|
757
941
|
if (validateError !== null) {
|
|
758
942
|
throw validateError;
|
|
759
943
|
}
|
|
760
944
|
}
|
|
761
945
|
const key = keyBuilderFromType(luvio, input);
|
|
762
|
-
const ttlToUse =
|
|
763
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
946
|
+
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);
|
|
764
948
|
return createLink(key);
|
|
765
949
|
};
|
|
766
|
-
function getTypeCacheKeys$
|
|
950
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
767
951
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
768
952
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
769
953
|
rootKeySet.set(rootKey, {
|
|
770
954
|
namespace: keyPrefix,
|
|
771
|
-
representationName: RepresentationType$
|
|
955
|
+
representationName: RepresentationType$2,
|
|
772
956
|
mergeable: false
|
|
773
957
|
});
|
|
774
958
|
}
|
|
775
959
|
|
|
776
|
-
function select$
|
|
777
|
-
return select$
|
|
960
|
+
function select$9(luvio, params) {
|
|
961
|
+
return select$a();
|
|
778
962
|
}
|
|
779
|
-
function getResponseCacheKeys$
|
|
780
|
-
getTypeCacheKeys$
|
|
963
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
964
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
781
965
|
}
|
|
782
|
-
function ingestSuccess$
|
|
966
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
783
967
|
const { body } = response;
|
|
784
968
|
const key = keyBuilderFromType(luvio, body);
|
|
785
|
-
luvio.storeIngest(key, ingest$
|
|
969
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
786
970
|
const snapshot = luvio.storeLookup({
|
|
787
971
|
recordId: key,
|
|
788
|
-
node: select$
|
|
972
|
+
node: select$9(),
|
|
789
973
|
variables: {},
|
|
790
974
|
});
|
|
791
975
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -796,7 +980,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
796
980
|
deepFreeze(snapshot.data);
|
|
797
981
|
return snapshot;
|
|
798
982
|
}
|
|
799
|
-
function createResourceRequest$
|
|
983
|
+
function createResourceRequest$3(config) {
|
|
800
984
|
const headers = {};
|
|
801
985
|
return {
|
|
802
986
|
baseUri: '/services/data/v60.0',
|
|
@@ -810,48 +994,48 @@ function createResourceRequest$2(config) {
|
|
|
810
994
|
};
|
|
811
995
|
}
|
|
812
996
|
|
|
813
|
-
const adapterName$
|
|
997
|
+
const adapterName$3 = 'startAdvanceImport';
|
|
814
998
|
const startAdvanceImport_ConfigPropertyMetadata = [
|
|
815
999
|
generateParamConfigMetadata('importReferenceId', true, 2 /* Body */, 0 /* String */),
|
|
816
1000
|
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
817
1001
|
generateParamConfigMetadata('targetContext', true, 2 /* Body */, 0 /* String */),
|
|
818
1002
|
];
|
|
819
|
-
const startAdvanceImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
820
|
-
const createResourceParams$
|
|
821
|
-
function typeCheckConfig$
|
|
1003
|
+
const startAdvanceImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, startAdvanceImport_ConfigPropertyMetadata);
|
|
1004
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(startAdvanceImport_ConfigPropertyMetadata);
|
|
1005
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
822
1006
|
const config = {};
|
|
823
|
-
typeCheckConfig$
|
|
1007
|
+
typeCheckConfig$5(untrustedConfig, config, startAdvanceImport_ConfigPropertyMetadata);
|
|
824
1008
|
const untrustedConfig_options = untrustedConfig.options;
|
|
825
|
-
const referenceImportOptionsInputRepresentationValidationError = validate$
|
|
1009
|
+
const referenceImportOptionsInputRepresentationValidationError = validate$7(untrustedConfig_options);
|
|
826
1010
|
if (referenceImportOptionsInputRepresentationValidationError === null) {
|
|
827
1011
|
config.options = untrustedConfig_options;
|
|
828
1012
|
}
|
|
829
1013
|
return config;
|
|
830
1014
|
}
|
|
831
|
-
function validateAdapterConfig$
|
|
1015
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
832
1016
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
833
1017
|
return null;
|
|
834
1018
|
}
|
|
835
1019
|
if (process.env.NODE_ENV !== 'production') {
|
|
836
1020
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
837
1021
|
}
|
|
838
|
-
const config = typeCheckConfig$
|
|
1022
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
839
1023
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
840
1024
|
return null;
|
|
841
1025
|
}
|
|
842
1026
|
return config;
|
|
843
1027
|
}
|
|
844
|
-
function buildNetworkSnapshot$
|
|
845
|
-
const resourceParams = createResourceParams$
|
|
846
|
-
const request = createResourceRequest$
|
|
1028
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1029
|
+
const resourceParams = createResourceParams$3(config);
|
|
1030
|
+
const request = createResourceRequest$3(resourceParams);
|
|
847
1031
|
return luvio.dispatchResourceRequest(request, options)
|
|
848
1032
|
.then((response) => {
|
|
849
1033
|
return luvio.handleSuccessResponse(() => {
|
|
850
|
-
const snapshot = ingestSuccess$
|
|
1034
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
851
1035
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
852
1036
|
}, () => {
|
|
853
1037
|
const cache = new StoreKeyMap();
|
|
854
|
-
getResponseCacheKeys$
|
|
1038
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
855
1039
|
return cache;
|
|
856
1040
|
});
|
|
857
1041
|
}, (response) => {
|
|
@@ -861,28 +1045,28 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
861
1045
|
}
|
|
862
1046
|
const startAdvanceImportAdapterFactory = (luvio) => {
|
|
863
1047
|
return function startAdvanceImport(untrustedConfig) {
|
|
864
|
-
const config = validateAdapterConfig$
|
|
1048
|
+
const config = validateAdapterConfig$3(untrustedConfig, startAdvanceImport_ConfigPropertyNames);
|
|
865
1049
|
// Invalid or incomplete config
|
|
866
1050
|
if (config === null) {
|
|
867
1051
|
throw new Error('Invalid config for "startAdvanceImport"');
|
|
868
1052
|
}
|
|
869
|
-
return buildNetworkSnapshot$
|
|
1053
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
870
1054
|
};
|
|
871
1055
|
};
|
|
872
1056
|
|
|
873
|
-
function select$
|
|
874
|
-
return select$
|
|
1057
|
+
function select$8(luvio, params) {
|
|
1058
|
+
return select$a();
|
|
875
1059
|
}
|
|
876
|
-
function getResponseCacheKeys$
|
|
877
|
-
getTypeCacheKeys$
|
|
1060
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1061
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
878
1062
|
}
|
|
879
|
-
function ingestSuccess$
|
|
1063
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
880
1064
|
const { body } = response;
|
|
881
1065
|
const key = keyBuilderFromType(luvio, body);
|
|
882
|
-
luvio.storeIngest(key, ingest$
|
|
1066
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
883
1067
|
const snapshot = luvio.storeLookup({
|
|
884
1068
|
recordId: key,
|
|
885
|
-
node: select$
|
|
1069
|
+
node: select$8(),
|
|
886
1070
|
variables: {},
|
|
887
1071
|
});
|
|
888
1072
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -893,7 +1077,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
893
1077
|
deepFreeze(snapshot.data);
|
|
894
1078
|
return snapshot;
|
|
895
1079
|
}
|
|
896
|
-
function createResourceRequest$
|
|
1080
|
+
function createResourceRequest$2(config) {
|
|
897
1081
|
const headers = {};
|
|
898
1082
|
return {
|
|
899
1083
|
baseUri: '/services/data/v60.0',
|
|
@@ -907,48 +1091,48 @@ function createResourceRequest$1(config) {
|
|
|
907
1091
|
};
|
|
908
1092
|
}
|
|
909
1093
|
|
|
910
|
-
const adapterName$
|
|
1094
|
+
const adapterName$2 = 'startSimpleImport';
|
|
911
1095
|
const startSimpleImport_ConfigPropertyMetadata = [
|
|
912
1096
|
generateParamConfigMetadata('importReferenceId', true, 2 /* Body */, 0 /* String */),
|
|
913
1097
|
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
914
1098
|
generateParamConfigMetadata('targetContext', true, 2 /* Body */, 0 /* String */),
|
|
915
1099
|
];
|
|
916
|
-
const startSimpleImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
917
|
-
const createResourceParams$
|
|
918
|
-
function typeCheckConfig$
|
|
1100
|
+
const startSimpleImport_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, startSimpleImport_ConfigPropertyMetadata);
|
|
1101
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(startSimpleImport_ConfigPropertyMetadata);
|
|
1102
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
919
1103
|
const config = {};
|
|
920
|
-
typeCheckConfig$
|
|
1104
|
+
typeCheckConfig$5(untrustedConfig, config, startSimpleImport_ConfigPropertyMetadata);
|
|
921
1105
|
const untrustedConfig_options = untrustedConfig.options;
|
|
922
|
-
const referenceImportOptionsInputRepresentationValidationError = validate$
|
|
1106
|
+
const referenceImportOptionsInputRepresentationValidationError = validate$7(untrustedConfig_options);
|
|
923
1107
|
if (referenceImportOptionsInputRepresentationValidationError === null) {
|
|
924
1108
|
config.options = untrustedConfig_options;
|
|
925
1109
|
}
|
|
926
1110
|
return config;
|
|
927
1111
|
}
|
|
928
|
-
function validateAdapterConfig$
|
|
1112
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
929
1113
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
930
1114
|
return null;
|
|
931
1115
|
}
|
|
932
1116
|
if (process.env.NODE_ENV !== 'production') {
|
|
933
1117
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
934
1118
|
}
|
|
935
|
-
const config = typeCheckConfig$
|
|
1119
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
936
1120
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
937
1121
|
return null;
|
|
938
1122
|
}
|
|
939
1123
|
return config;
|
|
940
1124
|
}
|
|
941
|
-
function buildNetworkSnapshot$
|
|
942
|
-
const resourceParams = createResourceParams$
|
|
943
|
-
const request = createResourceRequest$
|
|
1125
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1126
|
+
const resourceParams = createResourceParams$2(config);
|
|
1127
|
+
const request = createResourceRequest$2(resourceParams);
|
|
944
1128
|
return luvio.dispatchResourceRequest(request, options)
|
|
945
1129
|
.then((response) => {
|
|
946
1130
|
return luvio.handleSuccessResponse(() => {
|
|
947
|
-
const snapshot = ingestSuccess$
|
|
1131
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
948
1132
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
949
1133
|
}, () => {
|
|
950
1134
|
const cache = new StoreKeyMap();
|
|
951
|
-
getResponseCacheKeys$
|
|
1135
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
952
1136
|
return cache;
|
|
953
1137
|
});
|
|
954
1138
|
}, (response) => {
|
|
@@ -958,18 +1142,17 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
958
1142
|
}
|
|
959
1143
|
const startSimpleImportAdapterFactory = (luvio) => {
|
|
960
1144
|
return function startSimpleImport(untrustedConfig) {
|
|
961
|
-
const config = validateAdapterConfig$
|
|
1145
|
+
const config = validateAdapterConfig$2(untrustedConfig, startSimpleImport_ConfigPropertyNames);
|
|
962
1146
|
// Invalid or incomplete config
|
|
963
1147
|
if (config === null) {
|
|
964
1148
|
throw new Error('Invalid config for "startSimpleImport"');
|
|
965
1149
|
}
|
|
966
|
-
return buildNetworkSnapshot$
|
|
1150
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
967
1151
|
};
|
|
968
1152
|
};
|
|
969
1153
|
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
function validate(obj, path = 'CsvPreviewOutputRepresentation') {
|
|
1154
|
+
const VERSION$5 = "3f89a0e0e670920259887253d71fcaf0";
|
|
1155
|
+
function validate$5(obj, path = 'CsvPreviewOutputRepresentation') {
|
|
973
1156
|
const v_error = (() => {
|
|
974
1157
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
975
1158
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -986,36 +1169,59 @@ function validate(obj, path = 'CsvPreviewOutputRepresentation') {
|
|
|
986
1169
|
return new TypeError('Expected "string" but received "' + typeof obj_headers_item + '" (at "' + path_headers_item + '")');
|
|
987
1170
|
}
|
|
988
1171
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
for (let i = 0; i < obj_rows.length; i++) {
|
|
995
|
-
const obj_rows_item = obj_rows[i];
|
|
996
|
-
const path_rows_item = path_rows + '[' + i + ']';
|
|
997
|
-
if (!ArrayIsArray(obj_rows_item)) {
|
|
998
|
-
return new TypeError('Expected "array" but received "' + typeof obj_rows_item + '" (at "' + path_rows_item + '")');
|
|
1172
|
+
if (obj.rows !== undefined) {
|
|
1173
|
+
const obj_rows = obj.rows;
|
|
1174
|
+
const path_rows = path + '.rows';
|
|
1175
|
+
if (!ArrayIsArray(obj_rows)) {
|
|
1176
|
+
return new TypeError('Expected "array" but received "' + typeof obj_rows + '" (at "' + path_rows + '")');
|
|
999
1177
|
}
|
|
1000
|
-
for (let i = 0; i <
|
|
1001
|
-
const
|
|
1002
|
-
const
|
|
1003
|
-
if (
|
|
1004
|
-
return new TypeError('Expected "
|
|
1178
|
+
for (let i = 0; i < obj_rows.length; i++) {
|
|
1179
|
+
const obj_rows_item = obj_rows[i];
|
|
1180
|
+
const path_rows_item = path_rows + '[' + i + ']';
|
|
1181
|
+
if (!ArrayIsArray(obj_rows_item)) {
|
|
1182
|
+
return new TypeError('Expected "array" but received "' + typeof obj_rows_item + '" (at "' + path_rows_item + '")');
|
|
1183
|
+
}
|
|
1184
|
+
for (let i = 0; i < obj_rows_item.length; i++) {
|
|
1185
|
+
const obj_rows_item_item = obj_rows_item[i];
|
|
1186
|
+
const path_rows_item_item = path_rows_item + '[' + i + ']';
|
|
1187
|
+
let obj_rows_item_item_union0 = null;
|
|
1188
|
+
const obj_rows_item_item_union0_error = (() => {
|
|
1189
|
+
if (typeof obj_rows_item_item !== 'string') {
|
|
1190
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rows_item_item + '" (at "' + path_rows_item_item + '")');
|
|
1191
|
+
}
|
|
1192
|
+
})();
|
|
1193
|
+
if (obj_rows_item_item_union0_error != null) {
|
|
1194
|
+
obj_rows_item_item_union0 = obj_rows_item_item_union0_error.message;
|
|
1195
|
+
}
|
|
1196
|
+
let obj_rows_item_item_union1 = null;
|
|
1197
|
+
const obj_rows_item_item_union1_error = (() => {
|
|
1198
|
+
if (obj_rows_item_item !== null) {
|
|
1199
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rows_item_item + '" (at "' + path_rows_item_item + '")');
|
|
1200
|
+
}
|
|
1201
|
+
})();
|
|
1202
|
+
if (obj_rows_item_item_union1_error != null) {
|
|
1203
|
+
obj_rows_item_item_union1 = obj_rows_item_item_union1_error.message;
|
|
1204
|
+
}
|
|
1205
|
+
if (obj_rows_item_item_union0 && obj_rows_item_item_union1) {
|
|
1206
|
+
let message = 'Object doesn\'t match union (at "' + path_rows_item_item + '")';
|
|
1207
|
+
message += '\n' + obj_rows_item_item_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1208
|
+
message += '\n' + obj_rows_item_item_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1209
|
+
return new TypeError(message);
|
|
1210
|
+
}
|
|
1005
1211
|
}
|
|
1006
1212
|
}
|
|
1007
1213
|
}
|
|
1008
1214
|
})();
|
|
1009
1215
|
return v_error === undefined ? null : v_error;
|
|
1010
1216
|
}
|
|
1011
|
-
const RepresentationType = 'CsvPreviewOutputRepresentation';
|
|
1012
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1217
|
+
const RepresentationType$1 = 'CsvPreviewOutputRepresentation';
|
|
1218
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1013
1219
|
return input;
|
|
1014
1220
|
}
|
|
1015
|
-
const select$
|
|
1221
|
+
const select$7 = function CsvPreviewOutputRepresentationSelect() {
|
|
1016
1222
|
return {
|
|
1017
1223
|
kind: 'Fragment',
|
|
1018
|
-
version: VERSION,
|
|
1224
|
+
version: VERSION$5,
|
|
1019
1225
|
private: [],
|
|
1020
1226
|
selections: [
|
|
1021
1227
|
{
|
|
@@ -1026,12 +1232,13 @@ const select$1 = function CsvPreviewOutputRepresentationSelect() {
|
|
|
1026
1232
|
{
|
|
1027
1233
|
name: 'rows',
|
|
1028
1234
|
kind: 'Scalar',
|
|
1029
|
-
plural: true
|
|
1235
|
+
plural: true,
|
|
1236
|
+
required: false
|
|
1030
1237
|
}
|
|
1031
1238
|
]
|
|
1032
1239
|
};
|
|
1033
1240
|
};
|
|
1034
|
-
function equals(existing, incoming) {
|
|
1241
|
+
function equals$5(existing, incoming) {
|
|
1035
1242
|
const existing_headers = existing.headers;
|
|
1036
1243
|
const incoming_headers = incoming.headers;
|
|
1037
1244
|
const equals_headers_items = equalsArray(existing_headers, incoming_headers, (existing_headers_item, incoming_headers_item) => {
|
|
@@ -1044,59 +1251,67 @@ function equals(existing, incoming) {
|
|
|
1044
1251
|
}
|
|
1045
1252
|
const existing_rows = existing.rows;
|
|
1046
1253
|
const incoming_rows = incoming.rows;
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1254
|
+
// if at least one of these optionals is defined
|
|
1255
|
+
if (existing_rows !== undefined || incoming_rows !== undefined) {
|
|
1256
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1257
|
+
// not equal
|
|
1258
|
+
if (existing_rows === undefined || incoming_rows === undefined) {
|
|
1259
|
+
return false;
|
|
1260
|
+
}
|
|
1261
|
+
const equals_rows_items = equalsArray(existing_rows, incoming_rows, (existing_rows_item, incoming_rows_item) => {
|
|
1262
|
+
const equals_rows_items_items = equalsArray(existing_rows_item, incoming_rows_item, (existing_rows_item_item, incoming_rows_item_item) => {
|
|
1263
|
+
if (!(existing_rows_item_item === incoming_rows_item_item)) {
|
|
1264
|
+
return false;
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1267
|
+
if (equals_rows_items_items === false) {
|
|
1050
1268
|
return false;
|
|
1051
1269
|
}
|
|
1052
1270
|
});
|
|
1053
|
-
if (
|
|
1271
|
+
if (equals_rows_items === false) {
|
|
1054
1272
|
return false;
|
|
1055
1273
|
}
|
|
1056
|
-
});
|
|
1057
|
-
if (equals_rows_items === false) {
|
|
1058
|
-
return false;
|
|
1059
1274
|
}
|
|
1060
1275
|
return true;
|
|
1061
1276
|
}
|
|
1062
|
-
const ingest = function CsvPreviewOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1277
|
+
const ingest$1 = function CsvPreviewOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1063
1278
|
if (process.env.NODE_ENV !== 'production') {
|
|
1064
|
-
const validateError = validate(input);
|
|
1279
|
+
const validateError = validate$5(input);
|
|
1065
1280
|
if (validateError !== null) {
|
|
1066
1281
|
throw validateError;
|
|
1067
1282
|
}
|
|
1068
1283
|
}
|
|
1069
1284
|
const key = path.fullPath;
|
|
1070
|
-
const ttlToUse =
|
|
1071
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "fileBased-dataimport", VERSION, RepresentationType, equals);
|
|
1285
|
+
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);
|
|
1072
1287
|
return createLink(key);
|
|
1073
1288
|
};
|
|
1074
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1289
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1075
1290
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1076
1291
|
const rootKey = fullPathFactory();
|
|
1077
1292
|
rootKeySet.set(rootKey, {
|
|
1078
1293
|
namespace: keyPrefix,
|
|
1079
|
-
representationName: RepresentationType,
|
|
1294
|
+
representationName: RepresentationType$1,
|
|
1080
1295
|
mergeable: false
|
|
1081
1296
|
});
|
|
1082
1297
|
}
|
|
1083
1298
|
|
|
1084
|
-
function select(luvio, params) {
|
|
1085
|
-
return select$
|
|
1299
|
+
function select$6(luvio, params) {
|
|
1300
|
+
return select$7();
|
|
1086
1301
|
}
|
|
1087
|
-
function keyBuilder$
|
|
1302
|
+
function keyBuilder$3(luvio, params) {
|
|
1088
1303
|
return keyPrefix + '::CsvPreviewOutputRepresentation:(' + 'delimiter:' + params.queryParams.delimiter + ',' + 'endOfLine:' + params.queryParams.endOfLine + ',' + 'numberOfRows:' + params.queryParams.numberOfRows + ',' + 'fileBasedImportId:' + params.urlParams.fileBasedImportId + ')';
|
|
1089
1304
|
}
|
|
1090
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1091
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1305
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1306
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
1092
1307
|
}
|
|
1093
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1308
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1094
1309
|
const { body } = response;
|
|
1095
|
-
const key = keyBuilder$
|
|
1096
|
-
luvio.storeIngest(key, ingest, body);
|
|
1310
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1311
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1097
1312
|
const snapshot = luvio.storeLookup({
|
|
1098
1313
|
recordId: key,
|
|
1099
|
-
node: select(),
|
|
1314
|
+
node: select$6(),
|
|
1100
1315
|
variables: {},
|
|
1101
1316
|
}, snapshotRefresh);
|
|
1102
1317
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1107,13 +1322,13 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1107
1322
|
deepFreeze(snapshot.data);
|
|
1108
1323
|
return snapshot;
|
|
1109
1324
|
}
|
|
1110
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1111
|
-
const key = keyBuilder$
|
|
1325
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1326
|
+
const key = keyBuilder$3(luvio, params);
|
|
1112
1327
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1113
1328
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1114
1329
|
return errorSnapshot;
|
|
1115
1330
|
}
|
|
1116
|
-
function createResourceRequest(config) {
|
|
1331
|
+
function createResourceRequest$1(config) {
|
|
1117
1332
|
const headers = {};
|
|
1118
1333
|
return {
|
|
1119
1334
|
baseUri: '/services/data/v60.0',
|
|
@@ -1127,22 +1342,888 @@ function createResourceRequest(config) {
|
|
|
1127
1342
|
};
|
|
1128
1343
|
}
|
|
1129
1344
|
|
|
1130
|
-
const adapterName = '
|
|
1131
|
-
const
|
|
1345
|
+
const adapterName$1 = 'getCsvPreviewData';
|
|
1346
|
+
const getCsvPreviewData_ConfigPropertyMetadata = [
|
|
1132
1347
|
generateParamConfigMetadata('fileBasedImportId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1133
1348
|
generateParamConfigMetadata('delimiter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1134
1349
|
generateParamConfigMetadata('endOfLine', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1135
1350
|
generateParamConfigMetadata('numberOfRows', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1136
1351
|
];
|
|
1137
|
-
const
|
|
1138
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
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);
|
|
1357
|
+
}
|
|
1358
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1359
|
+
const config = {};
|
|
1360
|
+
typeCheckConfig$5(untrustedConfig, config, getCsvPreviewData_ConfigPropertyMetadata);
|
|
1361
|
+
return config;
|
|
1362
|
+
}
|
|
1363
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1364
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1365
|
+
return null;
|
|
1366
|
+
}
|
|
1367
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1368
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1369
|
+
}
|
|
1370
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1371
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1372
|
+
return null;
|
|
1373
|
+
}
|
|
1374
|
+
return config;
|
|
1375
|
+
}
|
|
1376
|
+
function adapterFragment$1(luvio, config) {
|
|
1377
|
+
createResourceParams$1(config);
|
|
1378
|
+
return select$6();
|
|
1379
|
+
}
|
|
1380
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1381
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1382
|
+
config,
|
|
1383
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1384
|
+
});
|
|
1385
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1386
|
+
}
|
|
1387
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1388
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1389
|
+
config,
|
|
1390
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1391
|
+
});
|
|
1392
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1393
|
+
}
|
|
1394
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1395
|
+
const resourceParams = createResourceParams$1(config);
|
|
1396
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1397
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1398
|
+
.then((response) => {
|
|
1399
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1400
|
+
const cache = new StoreKeyMap();
|
|
1401
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1402
|
+
return cache;
|
|
1403
|
+
});
|
|
1404
|
+
}, (response) => {
|
|
1405
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1409
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1410
|
+
}
|
|
1411
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1412
|
+
const { luvio, config } = context;
|
|
1413
|
+
const selector = {
|
|
1414
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1415
|
+
node: adapterFragment$1(luvio, config),
|
|
1416
|
+
variables: {},
|
|
1417
|
+
};
|
|
1418
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1419
|
+
config,
|
|
1420
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1421
|
+
});
|
|
1422
|
+
return cacheSnapshot;
|
|
1423
|
+
}
|
|
1424
|
+
const getCsvPreviewDataAdapterFactory = (luvio) => function fileBasedDataimport__getCsvPreviewData(untrustedConfig, requestContext) {
|
|
1425
|
+
const config = validateAdapterConfig$1(untrustedConfig, getCsvPreviewData_ConfigPropertyNames);
|
|
1426
|
+
// Invalid or incomplete config
|
|
1427
|
+
if (config === null) {
|
|
1428
|
+
return null;
|
|
1429
|
+
}
|
|
1430
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1431
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
const VERSION$4 = "79cbc962b5b6429d024e384c92f23cda";
|
|
1435
|
+
function validate$4(obj, path = 'ReferenceFieldInfo') {
|
|
1436
|
+
const v_error = (() => {
|
|
1437
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1438
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1439
|
+
}
|
|
1440
|
+
const obj_fieldLabel = obj.fieldLabel;
|
|
1441
|
+
const path_fieldLabel = path + '.fieldLabel';
|
|
1442
|
+
if (typeof obj_fieldLabel !== 'string') {
|
|
1443
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldLabel + '" (at "' + path_fieldLabel + '")');
|
|
1444
|
+
}
|
|
1445
|
+
const obj_fieldName = obj.fieldName;
|
|
1446
|
+
const path_fieldName = path + '.fieldName';
|
|
1447
|
+
if (typeof obj_fieldName !== 'string') {
|
|
1448
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
|
|
1449
|
+
}
|
|
1450
|
+
})();
|
|
1451
|
+
return v_error === undefined ? null : v_error;
|
|
1452
|
+
}
|
|
1453
|
+
const select$5 = function ReferenceFieldInfoSelect() {
|
|
1454
|
+
return {
|
|
1455
|
+
kind: 'Fragment',
|
|
1456
|
+
version: VERSION$4,
|
|
1457
|
+
private: [],
|
|
1458
|
+
selections: [
|
|
1459
|
+
{
|
|
1460
|
+
name: 'fieldLabel',
|
|
1461
|
+
kind: 'Scalar'
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
name: 'fieldName',
|
|
1465
|
+
kind: 'Scalar'
|
|
1466
|
+
}
|
|
1467
|
+
]
|
|
1468
|
+
};
|
|
1469
|
+
};
|
|
1470
|
+
function equals$4(existing, incoming) {
|
|
1471
|
+
const existing_fieldLabel = existing.fieldLabel;
|
|
1472
|
+
const incoming_fieldLabel = incoming.fieldLabel;
|
|
1473
|
+
if (!(existing_fieldLabel === incoming_fieldLabel)) {
|
|
1474
|
+
return false;
|
|
1475
|
+
}
|
|
1476
|
+
const existing_fieldName = existing.fieldName;
|
|
1477
|
+
const incoming_fieldName = incoming.fieldName;
|
|
1478
|
+
if (!(existing_fieldName === incoming_fieldName)) {
|
|
1479
|
+
return false;
|
|
1480
|
+
}
|
|
1481
|
+
return true;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
const VERSION$3 = "b3d49ed32b6dfdd7e4f99ef7e3629860";
|
|
1485
|
+
function validate$3(obj, path = 'ReferenceEntityInfo') {
|
|
1486
|
+
const v_error = (() => {
|
|
1487
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1488
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1489
|
+
}
|
|
1490
|
+
const obj_entityLabel = obj.entityLabel;
|
|
1491
|
+
const path_entityLabel = path + '.entityLabel';
|
|
1492
|
+
if (typeof obj_entityLabel !== 'string') {
|
|
1493
|
+
return new TypeError('Expected "string" but received "' + typeof obj_entityLabel + '" (at "' + path_entityLabel + '")');
|
|
1494
|
+
}
|
|
1495
|
+
const obj_entityName = obj.entityName;
|
|
1496
|
+
const path_entityName = path + '.entityName';
|
|
1497
|
+
if (typeof obj_entityName !== 'string') {
|
|
1498
|
+
return new TypeError('Expected "string" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
|
|
1499
|
+
}
|
|
1500
|
+
const obj_fields = obj.fields;
|
|
1501
|
+
const path_fields = path + '.fields';
|
|
1502
|
+
if (!ArrayIsArray(obj_fields)) {
|
|
1503
|
+
return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
1504
|
+
}
|
|
1505
|
+
for (let i = 0; i < obj_fields.length; i++) {
|
|
1506
|
+
const obj_fields_item = obj_fields[i];
|
|
1507
|
+
const path_fields_item = path_fields + '[' + i + ']';
|
|
1508
|
+
const referencepath_fields_itemValidationError = validate$4(obj_fields_item, path_fields_item);
|
|
1509
|
+
if (referencepath_fields_itemValidationError !== null) {
|
|
1510
|
+
let message = 'Object doesn\'t match ReferenceFieldInfo (at "' + path_fields_item + '")\n';
|
|
1511
|
+
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1512
|
+
return new TypeError(message);
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
})();
|
|
1516
|
+
return v_error === undefined ? null : v_error;
|
|
1517
|
+
}
|
|
1518
|
+
const select$4 = function ReferenceEntityInfoSelect() {
|
|
1519
|
+
const { selections: ReferenceFieldInfo__selections, opaque: ReferenceFieldInfo__opaque, } = select$5();
|
|
1520
|
+
return {
|
|
1521
|
+
kind: 'Fragment',
|
|
1522
|
+
version: VERSION$3,
|
|
1523
|
+
private: [],
|
|
1524
|
+
selections: [
|
|
1525
|
+
{
|
|
1526
|
+
name: 'entityLabel',
|
|
1527
|
+
kind: 'Scalar'
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
name: 'entityName',
|
|
1531
|
+
kind: 'Scalar'
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
name: 'fields',
|
|
1535
|
+
kind: 'Object',
|
|
1536
|
+
plural: true,
|
|
1537
|
+
selections: ReferenceFieldInfo__selections
|
|
1538
|
+
}
|
|
1539
|
+
]
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1542
|
+
function equals$3(existing, incoming) {
|
|
1543
|
+
const existing_entityLabel = existing.entityLabel;
|
|
1544
|
+
const incoming_entityLabel = incoming.entityLabel;
|
|
1545
|
+
if (!(existing_entityLabel === incoming_entityLabel)) {
|
|
1546
|
+
return false;
|
|
1547
|
+
}
|
|
1548
|
+
const existing_entityName = existing.entityName;
|
|
1549
|
+
const incoming_entityName = incoming.entityName;
|
|
1550
|
+
if (!(existing_entityName === incoming_entityName)) {
|
|
1551
|
+
return false;
|
|
1552
|
+
}
|
|
1553
|
+
const existing_fields = existing.fields;
|
|
1554
|
+
const incoming_fields = incoming.fields;
|
|
1555
|
+
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))) {
|
|
1557
|
+
return false;
|
|
1558
|
+
}
|
|
1559
|
+
});
|
|
1560
|
+
if (equals_fields_items === false) {
|
|
1561
|
+
return false;
|
|
1562
|
+
}
|
|
1563
|
+
return true;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
const VERSION$2 = "d025efb11c01b8dbb85eeae1ab377c2a";
|
|
1567
|
+
function validate$2(obj, path = 'FieldInfoRepresentation') {
|
|
1568
|
+
const v_error = (() => {
|
|
1569
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1570
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1571
|
+
}
|
|
1572
|
+
if (obj.createable !== undefined) {
|
|
1573
|
+
const obj_createable = obj.createable;
|
|
1574
|
+
const path_createable = path + '.createable';
|
|
1575
|
+
if (typeof obj_createable !== 'boolean') {
|
|
1576
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_createable + '" (at "' + path_createable + '")');
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
if (obj.custom !== undefined) {
|
|
1580
|
+
const obj_custom = obj.custom;
|
|
1581
|
+
const path_custom = path + '.custom';
|
|
1582
|
+
if (typeof obj_custom !== 'boolean') {
|
|
1583
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_custom + '" (at "' + path_custom + '")');
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
if (obj.dataType !== undefined) {
|
|
1587
|
+
const obj_dataType = obj.dataType;
|
|
1588
|
+
const path_dataType = path + '.dataType';
|
|
1589
|
+
if (typeof obj_dataType !== 'string') {
|
|
1590
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
if (obj.externalId !== undefined) {
|
|
1594
|
+
const obj_externalId = obj.externalId;
|
|
1595
|
+
const path_externalId = path + '.externalId';
|
|
1596
|
+
if (typeof obj_externalId !== 'boolean') {
|
|
1597
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_externalId + '" (at "' + path_externalId + '")');
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
if (obj.filterable !== undefined) {
|
|
1601
|
+
const obj_filterable = obj.filterable;
|
|
1602
|
+
const path_filterable = path + '.filterable';
|
|
1603
|
+
if (typeof obj_filterable !== 'boolean') {
|
|
1604
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_filterable + '" (at "' + path_filterable + '")');
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
if (obj.idLookup !== undefined) {
|
|
1608
|
+
const obj_idLookup = obj.idLookup;
|
|
1609
|
+
const path_idLookup = path + '.idLookup';
|
|
1610
|
+
if (typeof obj_idLookup !== 'boolean') {
|
|
1611
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_idLookup + '" (at "' + path_idLookup + '")');
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
if (obj.label !== undefined) {
|
|
1615
|
+
const obj_label = obj.label;
|
|
1616
|
+
const path_label = path + '.label';
|
|
1617
|
+
if (typeof obj_label !== 'string') {
|
|
1618
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
if (obj.mandatory !== undefined) {
|
|
1622
|
+
const obj_mandatory = obj.mandatory;
|
|
1623
|
+
const path_mandatory = path + '.mandatory';
|
|
1624
|
+
if (typeof obj_mandatory !== 'boolean') {
|
|
1625
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_mandatory + '" (at "' + path_mandatory + '")');
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
if (obj.name !== undefined) {
|
|
1629
|
+
const obj_name = obj.name;
|
|
1630
|
+
const path_name = path + '.name';
|
|
1631
|
+
if (typeof obj_name !== 'string') {
|
|
1632
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
if (obj.referenceTo !== undefined) {
|
|
1636
|
+
const obj_referenceTo = obj.referenceTo;
|
|
1637
|
+
const path_referenceTo = path + '.referenceTo';
|
|
1638
|
+
if (!ArrayIsArray(obj_referenceTo)) {
|
|
1639
|
+
return new TypeError('Expected "array" but received "' + typeof obj_referenceTo + '" (at "' + path_referenceTo + '")');
|
|
1640
|
+
}
|
|
1641
|
+
for (let i = 0; i < obj_referenceTo.length; i++) {
|
|
1642
|
+
const obj_referenceTo_item = obj_referenceTo[i];
|
|
1643
|
+
const path_referenceTo_item = path_referenceTo + '[' + i + ']';
|
|
1644
|
+
const referencepath_referenceTo_itemValidationError = validate$3(obj_referenceTo_item, path_referenceTo_item);
|
|
1645
|
+
if (referencepath_referenceTo_itemValidationError !== null) {
|
|
1646
|
+
let message = 'Object doesn\'t match ReferenceEntityInfo (at "' + path_referenceTo_item + '")\n';
|
|
1647
|
+
message += referencepath_referenceTo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1648
|
+
return new TypeError(message);
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
if (obj.relationshipName !== undefined) {
|
|
1653
|
+
const obj_relationshipName = obj.relationshipName;
|
|
1654
|
+
const path_relationshipName = path + '.relationshipName';
|
|
1655
|
+
if (typeof obj_relationshipName !== 'string') {
|
|
1656
|
+
return new TypeError('Expected "string" but received "' + typeof obj_relationshipName + '" (at "' + path_relationshipName + '")');
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
if (obj.required !== undefined) {
|
|
1660
|
+
const obj_required = obj.required;
|
|
1661
|
+
const path_required = path + '.required';
|
|
1662
|
+
if (typeof obj_required !== 'boolean') {
|
|
1663
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_required + '" (at "' + path_required + '")');
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
if (obj.sortable !== undefined) {
|
|
1667
|
+
const obj_sortable = obj.sortable;
|
|
1668
|
+
const path_sortable = path + '.sortable';
|
|
1669
|
+
if (typeof obj_sortable !== 'boolean') {
|
|
1670
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_sortable + '" (at "' + path_sortable + '")');
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
if (obj.unique !== undefined) {
|
|
1674
|
+
const obj_unique = obj.unique;
|
|
1675
|
+
const path_unique = path + '.unique';
|
|
1676
|
+
if (typeof obj_unique !== 'boolean') {
|
|
1677
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_unique + '" (at "' + path_unique + '")');
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
if (obj.updateable !== undefined) {
|
|
1681
|
+
const obj_updateable = obj.updateable;
|
|
1682
|
+
const path_updateable = path + '.updateable';
|
|
1683
|
+
if (typeof obj_updateable !== 'boolean') {
|
|
1684
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_updateable + '" (at "' + path_updateable + '")');
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
})();
|
|
1688
|
+
return v_error === undefined ? null : v_error;
|
|
1689
|
+
}
|
|
1690
|
+
const select$3 = function FieldInfoRepresentationSelect() {
|
|
1691
|
+
const { selections: ReferenceEntityInfo__selections, opaque: ReferenceEntityInfo__opaque, } = select$4();
|
|
1692
|
+
return {
|
|
1693
|
+
kind: 'Fragment',
|
|
1694
|
+
version: VERSION$2,
|
|
1695
|
+
private: [],
|
|
1696
|
+
selections: [
|
|
1697
|
+
{
|
|
1698
|
+
name: 'createable',
|
|
1699
|
+
kind: 'Scalar',
|
|
1700
|
+
required: false
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
name: 'custom',
|
|
1704
|
+
kind: 'Scalar',
|
|
1705
|
+
required: false
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
name: 'dataType',
|
|
1709
|
+
kind: 'Scalar',
|
|
1710
|
+
required: false
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
name: 'externalId',
|
|
1714
|
+
kind: 'Scalar',
|
|
1715
|
+
required: false
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
name: 'filterable',
|
|
1719
|
+
kind: 'Scalar',
|
|
1720
|
+
required: false
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
name: 'idLookup',
|
|
1724
|
+
kind: 'Scalar',
|
|
1725
|
+
required: false
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
name: 'label',
|
|
1729
|
+
kind: 'Scalar',
|
|
1730
|
+
required: false
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
name: 'mandatory',
|
|
1734
|
+
kind: 'Scalar',
|
|
1735
|
+
required: false
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
name: 'name',
|
|
1739
|
+
kind: 'Scalar',
|
|
1740
|
+
required: false
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
name: 'referenceTo',
|
|
1744
|
+
kind: 'Object',
|
|
1745
|
+
plural: true,
|
|
1746
|
+
selections: ReferenceEntityInfo__selections,
|
|
1747
|
+
required: false
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
name: 'relationshipName',
|
|
1751
|
+
kind: 'Scalar',
|
|
1752
|
+
required: false
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
name: 'required',
|
|
1756
|
+
kind: 'Scalar',
|
|
1757
|
+
required: false
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
name: 'sortable',
|
|
1761
|
+
kind: 'Scalar',
|
|
1762
|
+
required: false
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
name: 'unique',
|
|
1766
|
+
kind: 'Scalar',
|
|
1767
|
+
required: false
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
name: 'updateable',
|
|
1771
|
+
kind: 'Scalar',
|
|
1772
|
+
required: false
|
|
1773
|
+
}
|
|
1774
|
+
]
|
|
1775
|
+
};
|
|
1776
|
+
};
|
|
1777
|
+
function equals$2(existing, incoming) {
|
|
1778
|
+
const existing_createable = existing.createable;
|
|
1779
|
+
const incoming_createable = incoming.createable;
|
|
1780
|
+
// if at least one of these optionals is defined
|
|
1781
|
+
if (existing_createable !== undefined || incoming_createable !== undefined) {
|
|
1782
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1783
|
+
// not equal
|
|
1784
|
+
if (existing_createable === undefined || incoming_createable === undefined) {
|
|
1785
|
+
return false;
|
|
1786
|
+
}
|
|
1787
|
+
if (!(existing_createable === incoming_createable)) {
|
|
1788
|
+
return false;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
const existing_custom = existing.custom;
|
|
1792
|
+
const incoming_custom = incoming.custom;
|
|
1793
|
+
// if at least one of these optionals is defined
|
|
1794
|
+
if (existing_custom !== undefined || incoming_custom !== undefined) {
|
|
1795
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1796
|
+
// not equal
|
|
1797
|
+
if (existing_custom === undefined || incoming_custom === undefined) {
|
|
1798
|
+
return false;
|
|
1799
|
+
}
|
|
1800
|
+
if (!(existing_custom === incoming_custom)) {
|
|
1801
|
+
return false;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
const existing_externalId = existing.externalId;
|
|
1805
|
+
const incoming_externalId = incoming.externalId;
|
|
1806
|
+
// if at least one of these optionals is defined
|
|
1807
|
+
if (existing_externalId !== undefined || incoming_externalId !== undefined) {
|
|
1808
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1809
|
+
// not equal
|
|
1810
|
+
if (existing_externalId === undefined || incoming_externalId === undefined) {
|
|
1811
|
+
return false;
|
|
1812
|
+
}
|
|
1813
|
+
if (!(existing_externalId === incoming_externalId)) {
|
|
1814
|
+
return false;
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
const existing_filterable = existing.filterable;
|
|
1818
|
+
const incoming_filterable = incoming.filterable;
|
|
1819
|
+
// if at least one of these optionals is defined
|
|
1820
|
+
if (existing_filterable !== undefined || incoming_filterable !== undefined) {
|
|
1821
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1822
|
+
// not equal
|
|
1823
|
+
if (existing_filterable === undefined || incoming_filterable === undefined) {
|
|
1824
|
+
return false;
|
|
1825
|
+
}
|
|
1826
|
+
if (!(existing_filterable === incoming_filterable)) {
|
|
1827
|
+
return false;
|
|
1828
|
+
}
|
|
1829
|
+
}
|
|
1830
|
+
const existing_idLookup = existing.idLookup;
|
|
1831
|
+
const incoming_idLookup = incoming.idLookup;
|
|
1832
|
+
// if at least one of these optionals is defined
|
|
1833
|
+
if (existing_idLookup !== undefined || incoming_idLookup !== undefined) {
|
|
1834
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1835
|
+
// not equal
|
|
1836
|
+
if (existing_idLookup === undefined || incoming_idLookup === undefined) {
|
|
1837
|
+
return false;
|
|
1838
|
+
}
|
|
1839
|
+
if (!(existing_idLookup === incoming_idLookup)) {
|
|
1840
|
+
return false;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
const existing_mandatory = existing.mandatory;
|
|
1844
|
+
const incoming_mandatory = incoming.mandatory;
|
|
1845
|
+
// if at least one of these optionals is defined
|
|
1846
|
+
if (existing_mandatory !== undefined || incoming_mandatory !== undefined) {
|
|
1847
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1848
|
+
// not equal
|
|
1849
|
+
if (existing_mandatory === undefined || incoming_mandatory === undefined) {
|
|
1850
|
+
return false;
|
|
1851
|
+
}
|
|
1852
|
+
if (!(existing_mandatory === incoming_mandatory)) {
|
|
1853
|
+
return false;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
const existing_required = existing.required;
|
|
1857
|
+
const incoming_required = incoming.required;
|
|
1858
|
+
// if at least one of these optionals is defined
|
|
1859
|
+
if (existing_required !== undefined || incoming_required !== undefined) {
|
|
1860
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1861
|
+
// not equal
|
|
1862
|
+
if (existing_required === undefined || incoming_required === undefined) {
|
|
1863
|
+
return false;
|
|
1864
|
+
}
|
|
1865
|
+
if (!(existing_required === incoming_required)) {
|
|
1866
|
+
return false;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
const existing_sortable = existing.sortable;
|
|
1870
|
+
const incoming_sortable = incoming.sortable;
|
|
1871
|
+
// if at least one of these optionals is defined
|
|
1872
|
+
if (existing_sortable !== undefined || incoming_sortable !== undefined) {
|
|
1873
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1874
|
+
// not equal
|
|
1875
|
+
if (existing_sortable === undefined || incoming_sortable === undefined) {
|
|
1876
|
+
return false;
|
|
1877
|
+
}
|
|
1878
|
+
if (!(existing_sortable === incoming_sortable)) {
|
|
1879
|
+
return false;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
const existing_unique = existing.unique;
|
|
1883
|
+
const incoming_unique = incoming.unique;
|
|
1884
|
+
// if at least one of these optionals is defined
|
|
1885
|
+
if (existing_unique !== undefined || incoming_unique !== undefined) {
|
|
1886
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1887
|
+
// not equal
|
|
1888
|
+
if (existing_unique === undefined || incoming_unique === undefined) {
|
|
1889
|
+
return false;
|
|
1890
|
+
}
|
|
1891
|
+
if (!(existing_unique === incoming_unique)) {
|
|
1892
|
+
return false;
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
const existing_updateable = existing.updateable;
|
|
1896
|
+
const incoming_updateable = incoming.updateable;
|
|
1897
|
+
// if at least one of these optionals is defined
|
|
1898
|
+
if (existing_updateable !== undefined || incoming_updateable !== undefined) {
|
|
1899
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1900
|
+
// not equal
|
|
1901
|
+
if (existing_updateable === undefined || incoming_updateable === undefined) {
|
|
1902
|
+
return false;
|
|
1903
|
+
}
|
|
1904
|
+
if (!(existing_updateable === incoming_updateable)) {
|
|
1905
|
+
return false;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
const existing_dataType = existing.dataType;
|
|
1909
|
+
const incoming_dataType = incoming.dataType;
|
|
1910
|
+
// if at least one of these optionals is defined
|
|
1911
|
+
if (existing_dataType !== undefined || incoming_dataType !== undefined) {
|
|
1912
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1913
|
+
// not equal
|
|
1914
|
+
if (existing_dataType === undefined || incoming_dataType === undefined) {
|
|
1915
|
+
return false;
|
|
1916
|
+
}
|
|
1917
|
+
if (!(existing_dataType === incoming_dataType)) {
|
|
1918
|
+
return false;
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
const existing_label = existing.label;
|
|
1922
|
+
const incoming_label = incoming.label;
|
|
1923
|
+
// if at least one of these optionals is defined
|
|
1924
|
+
if (existing_label !== undefined || incoming_label !== undefined) {
|
|
1925
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1926
|
+
// not equal
|
|
1927
|
+
if (existing_label === undefined || incoming_label === undefined) {
|
|
1928
|
+
return false;
|
|
1929
|
+
}
|
|
1930
|
+
if (!(existing_label === incoming_label)) {
|
|
1931
|
+
return false;
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
const existing_name = existing.name;
|
|
1935
|
+
const incoming_name = incoming.name;
|
|
1936
|
+
// if at least one of these optionals is defined
|
|
1937
|
+
if (existing_name !== undefined || incoming_name !== undefined) {
|
|
1938
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1939
|
+
// not equal
|
|
1940
|
+
if (existing_name === undefined || incoming_name === undefined) {
|
|
1941
|
+
return false;
|
|
1942
|
+
}
|
|
1943
|
+
if (!(existing_name === incoming_name)) {
|
|
1944
|
+
return false;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
const existing_relationshipName = existing.relationshipName;
|
|
1948
|
+
const incoming_relationshipName = incoming.relationshipName;
|
|
1949
|
+
// if at least one of these optionals is defined
|
|
1950
|
+
if (existing_relationshipName !== undefined || incoming_relationshipName !== undefined) {
|
|
1951
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1952
|
+
// not equal
|
|
1953
|
+
if (existing_relationshipName === undefined || incoming_relationshipName === undefined) {
|
|
1954
|
+
return false;
|
|
1955
|
+
}
|
|
1956
|
+
if (!(existing_relationshipName === incoming_relationshipName)) {
|
|
1957
|
+
return false;
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
const existing_referenceTo = existing.referenceTo;
|
|
1961
|
+
const incoming_referenceTo = incoming.referenceTo;
|
|
1962
|
+
// if at least one of these optionals is defined
|
|
1963
|
+
if (existing_referenceTo !== undefined || incoming_referenceTo !== undefined) {
|
|
1964
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1965
|
+
// not equal
|
|
1966
|
+
if (existing_referenceTo === undefined || incoming_referenceTo === undefined) {
|
|
1967
|
+
return false;
|
|
1968
|
+
}
|
|
1969
|
+
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))) {
|
|
1971
|
+
return false;
|
|
1972
|
+
}
|
|
1973
|
+
});
|
|
1974
|
+
if (equals_referenceTo_items === false) {
|
|
1975
|
+
return false;
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
return true;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
const VERSION$1 = "d499392ad98d91030e4b2cfd23557cd2";
|
|
1982
|
+
function validate$1(obj, path = 'AutoMapResultRepresentation') {
|
|
1983
|
+
const v_error = (() => {
|
|
1984
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1985
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1986
|
+
}
|
|
1987
|
+
const obj_csvHeader = obj.csvHeader;
|
|
1988
|
+
const path_csvHeader = path + '.csvHeader';
|
|
1989
|
+
if (typeof obj_csvHeader !== 'string') {
|
|
1990
|
+
return new TypeError('Expected "string" but received "' + typeof obj_csvHeader + '" (at "' + path_csvHeader + '")');
|
|
1991
|
+
}
|
|
1992
|
+
if (obj.hasUserAccess !== undefined) {
|
|
1993
|
+
const obj_hasUserAccess = obj.hasUserAccess;
|
|
1994
|
+
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 + '")');
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
if (obj.mappedEntityColumn !== undefined) {
|
|
2000
|
+
const obj_mappedEntityColumn = obj.mappedEntityColumn;
|
|
2001
|
+
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');
|
|
2006
|
+
return new TypeError(message);
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
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 + '")');
|
|
2013
|
+
}
|
|
2014
|
+
})();
|
|
2015
|
+
return v_error === undefined ? null : v_error;
|
|
2016
|
+
}
|
|
2017
|
+
const select$2 = function AutoMapResultRepresentationSelect() {
|
|
2018
|
+
const { selections: FieldInfoRepresentation__selections, opaque: FieldInfoRepresentation__opaque, } = select$3();
|
|
2019
|
+
return {
|
|
2020
|
+
kind: 'Fragment',
|
|
2021
|
+
version: VERSION$1,
|
|
2022
|
+
private: [],
|
|
2023
|
+
selections: [
|
|
2024
|
+
{
|
|
2025
|
+
name: 'csvHeader',
|
|
2026
|
+
kind: 'Scalar'
|
|
2027
|
+
},
|
|
2028
|
+
{
|
|
2029
|
+
name: 'hasUserAccess',
|
|
2030
|
+
kind: 'Scalar',
|
|
2031
|
+
required: false
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
name: 'mappedEntityColumn',
|
|
2035
|
+
kind: 'Object',
|
|
2036
|
+
selections: FieldInfoRepresentation__selections,
|
|
2037
|
+
required: false
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
name: 'sampleValue',
|
|
2041
|
+
kind: 'Scalar'
|
|
2042
|
+
}
|
|
2043
|
+
]
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
function equals$1(existing, incoming) {
|
|
2047
|
+
const existing_hasUserAccess = existing.hasUserAccess;
|
|
2048
|
+
const incoming_hasUserAccess = incoming.hasUserAccess;
|
|
2049
|
+
// if at least one of these optionals is defined
|
|
2050
|
+
if (existing_hasUserAccess !== undefined || incoming_hasUserAccess !== undefined) {
|
|
2051
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2052
|
+
// not equal
|
|
2053
|
+
if (existing_hasUserAccess === undefined || incoming_hasUserAccess === undefined) {
|
|
2054
|
+
return false;
|
|
2055
|
+
}
|
|
2056
|
+
if (!(existing_hasUserAccess === incoming_hasUserAccess)) {
|
|
2057
|
+
return false;
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
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
|
+
const existing_mappedEntityColumn = existing.mappedEntityColumn;
|
|
2071
|
+
const incoming_mappedEntityColumn = incoming.mappedEntityColumn;
|
|
2072
|
+
// if at least one of these optionals is defined
|
|
2073
|
+
if (existing_mappedEntityColumn !== undefined || incoming_mappedEntityColumn !== undefined) {
|
|
2074
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2075
|
+
// not equal
|
|
2076
|
+
if (existing_mappedEntityColumn === undefined || incoming_mappedEntityColumn === undefined) {
|
|
2077
|
+
return false;
|
|
2078
|
+
}
|
|
2079
|
+
if (!(equals$2(existing_mappedEntityColumn, incoming_mappedEntityColumn))) {
|
|
2080
|
+
return false;
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
return true;
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
const VERSION = "0ffe3698d22ba020ccbfb48644edb046";
|
|
2087
|
+
function validate(obj, path = 'AutoMapListResultRepresentation') {
|
|
2088
|
+
const v_error = (() => {
|
|
2089
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2090
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2091
|
+
}
|
|
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');
|
|
2104
|
+
return new TypeError(message);
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
})();
|
|
2108
|
+
return v_error === undefined ? null : v_error;
|
|
2109
|
+
}
|
|
2110
|
+
const RepresentationType = 'AutoMapListResultRepresentation';
|
|
2111
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2112
|
+
return input;
|
|
2113
|
+
}
|
|
2114
|
+
const select$1 = function AutoMapListResultRepresentationSelect() {
|
|
2115
|
+
const { selections: AutoMapResultRepresentation__selections, opaque: AutoMapResultRepresentation__opaque, } = select$2();
|
|
2116
|
+
return {
|
|
2117
|
+
kind: 'Fragment',
|
|
2118
|
+
version: VERSION,
|
|
2119
|
+
private: [],
|
|
2120
|
+
selections: [
|
|
2121
|
+
{
|
|
2122
|
+
name: 'autoMapResults',
|
|
2123
|
+
kind: 'Object',
|
|
2124
|
+
plural: true,
|
|
2125
|
+
selections: AutoMapResultRepresentation__selections
|
|
2126
|
+
}
|
|
2127
|
+
]
|
|
2128
|
+
};
|
|
2129
|
+
};
|
|
2130
|
+
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))) {
|
|
2135
|
+
return false;
|
|
2136
|
+
}
|
|
2137
|
+
});
|
|
2138
|
+
if (equals_autoMapResults_items === false) {
|
|
2139
|
+
return false;
|
|
2140
|
+
}
|
|
2141
|
+
return true;
|
|
2142
|
+
}
|
|
2143
|
+
const ingest = function AutoMapListResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2144
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2145
|
+
const validateError = validate(input);
|
|
2146
|
+
if (validateError !== null) {
|
|
2147
|
+
throw validateError;
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
const key = path.fullPath;
|
|
2151
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 300;
|
|
2152
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "fileBased-dataimport", VERSION, RepresentationType, equals);
|
|
2153
|
+
return createLink(key);
|
|
2154
|
+
};
|
|
2155
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
2156
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2157
|
+
const rootKey = fullPathFactory();
|
|
2158
|
+
rootKeySet.set(rootKey, {
|
|
2159
|
+
namespace: keyPrefix,
|
|
2160
|
+
representationName: RepresentationType,
|
|
2161
|
+
mergeable: false
|
|
2162
|
+
});
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
function select(luvio, params) {
|
|
2166
|
+
return select$1();
|
|
2167
|
+
}
|
|
2168
|
+
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 + ')';
|
|
2170
|
+
}
|
|
2171
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2172
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
2173
|
+
}
|
|
2174
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
2175
|
+
const { body } = response;
|
|
2176
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
2177
|
+
luvio.storeIngest(key, ingest, body);
|
|
2178
|
+
const snapshot = luvio.storeLookup({
|
|
2179
|
+
recordId: key,
|
|
2180
|
+
node: select(),
|
|
2181
|
+
variables: {},
|
|
2182
|
+
}, snapshotRefresh);
|
|
2183
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2184
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2185
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2186
|
+
}
|
|
2187
|
+
}
|
|
2188
|
+
deepFreeze(snapshot.data);
|
|
2189
|
+
return snapshot;
|
|
2190
|
+
}
|
|
2191
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
2192
|
+
const key = keyBuilder$1(luvio, params);
|
|
2193
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2194
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
2195
|
+
return errorSnapshot;
|
|
2196
|
+
}
|
|
2197
|
+
function createResourceRequest(config) {
|
|
2198
|
+
const headers = {};
|
|
2199
|
+
return {
|
|
2200
|
+
baseUri: '/services/data/v60.0',
|
|
2201
|
+
basePath: '/connect/industries/fileBasedDataImports/automap',
|
|
2202
|
+
method: 'get',
|
|
2203
|
+
body: null,
|
|
2204
|
+
urlParams: {},
|
|
2205
|
+
queryParams: config.queryParams,
|
|
2206
|
+
headers,
|
|
2207
|
+
priority: 'normal',
|
|
2208
|
+
};
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
const adapterName = 'getCsvAutoMap';
|
|
2212
|
+
const getCsvAutoMap_ConfigPropertyMetadata = [
|
|
2213
|
+
generateParamConfigMetadata('contentDocumentId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
2214
|
+
generateParamConfigMetadata('delimiter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2215
|
+
generateParamConfigMetadata('endOfLine', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2216
|
+
generateParamConfigMetadata('entityApiName', true, 1 /* QueryParameter */, 0 /* String */),
|
|
2217
|
+
];
|
|
2218
|
+
const getCsvAutoMap_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getCsvAutoMap_ConfigPropertyMetadata);
|
|
2219
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(getCsvAutoMap_ConfigPropertyMetadata);
|
|
1139
2220
|
function keyBuilder(luvio, config) {
|
|
1140
2221
|
const resourceParams = createResourceParams(config);
|
|
1141
2222
|
return keyBuilder$1(luvio, resourceParams);
|
|
1142
2223
|
}
|
|
1143
2224
|
function typeCheckConfig(untrustedConfig) {
|
|
1144
2225
|
const config = {};
|
|
1145
|
-
typeCheckConfig$
|
|
2226
|
+
typeCheckConfig$5(untrustedConfig, config, getCsvAutoMap_ConfigPropertyMetadata);
|
|
1146
2227
|
return config;
|
|
1147
2228
|
}
|
|
1148
2229
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -1191,7 +2272,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1191
2272
|
});
|
|
1192
2273
|
}
|
|
1193
2274
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1194
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2275
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1195
2276
|
}
|
|
1196
2277
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1197
2278
|
const { luvio, config } = context;
|
|
@@ -1206,8 +2287,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
1206
2287
|
});
|
|
1207
2288
|
return cacheSnapshot;
|
|
1208
2289
|
}
|
|
1209
|
-
const
|
|
1210
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
2290
|
+
const getCsvAutoMapAdapterFactory = (luvio) => function fileBasedDataimport__getCsvAutoMap(untrustedConfig, requestContext) {
|
|
2291
|
+
const config = validateAdapterConfig(untrustedConfig, getCsvAutoMap_ConfigPropertyNames);
|
|
1211
2292
|
// Invalid or incomplete config
|
|
1212
2293
|
if (config === null) {
|
|
1213
2294
|
return null;
|
|
@@ -1216,4 +2297,4 @@ const getGetCsvPreviewAdapterFactory = (luvio) => function fileBasedDataimport__
|
|
|
1216
2297
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1217
2298
|
};
|
|
1218
2299
|
|
|
1219
|
-
export {
|
|
2300
|
+
export { getCsvAutoMapAdapterFactory, getCsvPreviewDataAdapterFactory, getFileBasedDataImportsAdapterFactory, startAdvanceImportAdapterFactory, startSimpleImportAdapterFactory };
|