@salesforce/lds-adapters-industries-epc 1.293.0 → 1.295.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/es/es2018/industries-epc.js +759 -70
  2. package/dist/es/es2018/types/src/generated/adapters/deploySnapshotIndex.d.ts +16 -0
  3. package/dist/es/es2018/types/src/generated/adapters/getIndexConfigurations.d.ts +27 -0
  4. package/dist/es/es2018/types/src/generated/adapters/updateIndexConfigurations.d.ts +16 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
  7. package/dist/es/es2018/types/src/generated/resources/getConnectPcmIndexConfigurations.d.ts +15 -0
  8. package/dist/es/es2018/types/src/generated/resources/postConnectPcmIndexDeploy.d.ts +13 -0
  9. package/dist/es/es2018/types/src/generated/resources/putConnectPcmIndexConfigurations.d.ts +15 -0
  10. package/dist/es/es2018/types/src/generated/types/FieldsInfoOutputRepresentation.d.ts +37 -0
  11. package/dist/es/es2018/types/src/generated/types/IndexConfigurationCollectionInputRepresentation.d.ts +28 -0
  12. package/dist/es/es2018/types/src/generated/types/IndexConfigurationCollectionOutputRepresentation.d.ts +36 -0
  13. package/dist/es/es2018/types/src/generated/types/IndexConfigurationFieldOutputRepresentation.d.ts +40 -0
  14. package/dist/es/es2018/types/src/generated/types/IndexConfigurationInputRepresentation.d.ts +40 -0
  15. package/dist/es/es2018/types/src/generated/types/IndexConfigurationsUpdateOutputRepresentation.d.ts +42 -0
  16. package/dist/es/es2018/types/src/generated/types/MetadataOutputRepresentation.d.ts +29 -0
  17. package/dist/es/es2018/types/src/generated/types/ObjectInfoOutputRepresentation.d.ts +32 -0
  18. package/dist/es/es2018/types/src/generated/types/RuntimeCatalogSnapshotInputRepresentation.d.ts +34 -0
  19. package/dist/es/es2018/types/src/generated/types/SnapshotDeploymentInputRepresentation.d.ts +31 -0
  20. package/dist/es/es2018/types/src/generated/types/SnapshotDeploymentOutputRepresentation.d.ts +39 -0
  21. package/package.json +4 -4
  22. package/sfdc/index.js +1424 -717
  23. package/src/raml/api.raml +215 -10
  24. package/src/raml/luvio.raml +24 -0
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$8, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$6, typeCheckConfig as typeCheckConfig$8 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$b, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$7, typeCheckConfig as typeCheckConfig$b } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -92,7 +92,7 @@ function createLink(ref) {
92
92
  };
93
93
  }
94
94
 
95
- function validate$v(obj, path = 'DeactivateInputRepresentation') {
95
+ function validate$C(obj, path = 'DeactivateInputRepresentation') {
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 + '")');
@@ -125,7 +125,7 @@ function validate$v(obj, path = 'DeactivateInputRepresentation') {
125
125
  return v_error === undefined ? null : v_error;
126
126
  }
127
127
 
128
- function validate$u(obj, path = 'ErrorOutputRepresentation') {
128
+ function validate$B(obj, path = 'ErrorOutputRepresentation') {
129
129
  const v_error = (() => {
130
130
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
131
131
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -156,9 +156,9 @@ function validate$u(obj, path = 'ErrorOutputRepresentation') {
156
156
  return v_error === undefined ? null : v_error;
157
157
  }
158
158
 
159
- const TTL$6 = 6000;
160
- const VERSION$8 = "67abdeaa299bae24f468fd2e78cd1e1e";
161
- function validate$t(obj, path = 'RecordIdMapOutputRepresentation') {
159
+ const TTL$9 = 6000;
160
+ const VERSION$b = "67abdeaa299bae24f468fd2e78cd1e1e";
161
+ function validate$A(obj, path = 'RecordIdMapOutputRepresentation') {
162
162
  const v_error = (() => {
163
163
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
164
164
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -171,7 +171,7 @@ function validate$t(obj, path = 'RecordIdMapOutputRepresentation') {
171
171
  for (let i = 0; i < obj_errors.length; i++) {
172
172
  const obj_errors_item = obj_errors[i];
173
173
  const path_errors_item = path_errors + '[' + i + ']';
174
- const referencepath_errors_itemValidationError = validate$u(obj_errors_item, path_errors_item);
174
+ const referencepath_errors_itemValidationError = validate$B(obj_errors_item, path_errors_item);
175
175
  if (referencepath_errors_itemValidationError !== null) {
176
176
  let message = 'Object doesn\'t match ErrorOutputRepresentation (at "' + path_errors_item + '")\n';
177
177
  message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -186,68 +186,68 @@ function validate$t(obj, path = 'RecordIdMapOutputRepresentation') {
186
186
  })();
187
187
  return v_error === undefined ? null : v_error;
188
188
  }
189
- const RepresentationType$7 = 'RecordIdMapOutputRepresentation';
190
- function keyBuilder$d(luvio, config) {
191
- return keyPrefix + '::' + RepresentationType$7 + ':' + config.message;
189
+ const RepresentationType$a = 'RecordIdMapOutputRepresentation';
190
+ function keyBuilder$h(luvio, config) {
191
+ return keyPrefix + '::' + RepresentationType$a + ':' + config.message;
192
192
  }
193
- function keyBuilderFromType$1(luvio, object) {
193
+ function keyBuilderFromType$3(luvio, object) {
194
194
  const keyParams = {
195
195
  message: object.status
196
196
  };
197
- return keyBuilder$d(luvio, keyParams);
197
+ return keyBuilder$h(luvio, keyParams);
198
198
  }
199
- function normalize$7(input, existing, path, luvio, store, timestamp) {
199
+ function normalize$a(input, existing, path, luvio, store, timestamp) {
200
200
  return input;
201
201
  }
202
- const select$g = function RecordIdMapOutputRepresentationSelect() {
202
+ const select$m = function RecordIdMapOutputRepresentationSelect() {
203
203
  return {
204
204
  kind: 'Fragment',
205
- version: VERSION$8,
205
+ version: VERSION$b,
206
206
  private: [],
207
207
  opaque: true
208
208
  };
209
209
  };
210
- function equals$8(existing, incoming) {
210
+ function equals$b(existing, incoming) {
211
211
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
212
212
  return false;
213
213
  }
214
214
  return true;
215
215
  }
216
- const ingest$7 = function RecordIdMapOutputRepresentationIngest(input, path, luvio, store, timestamp) {
216
+ const ingest$a = function RecordIdMapOutputRepresentationIngest(input, path, luvio, store, timestamp) {
217
217
  if (process.env.NODE_ENV !== 'production') {
218
- const validateError = validate$t(input);
218
+ const validateError = validate$A(input);
219
219
  if (validateError !== null) {
220
220
  throw validateError;
221
221
  }
222
222
  }
223
- const key = keyBuilderFromType$1(luvio, input);
224
- const ttlToUse = TTL$6;
225
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "epc", VERSION$8, RepresentationType$7, equals$8);
223
+ const key = keyBuilderFromType$3(luvio, input);
224
+ const ttlToUse = TTL$9;
225
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "epc", VERSION$b, RepresentationType$a, equals$b);
226
226
  return createLink(key);
227
227
  };
228
- function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
228
+ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
229
229
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
230
- const rootKey = keyBuilderFromType$1(luvio, input);
230
+ const rootKey = keyBuilderFromType$3(luvio, input);
231
231
  rootKeySet.set(rootKey, {
232
232
  namespace: keyPrefix,
233
- representationName: RepresentationType$7,
233
+ representationName: RepresentationType$a,
234
234
  mergeable: false
235
235
  });
236
236
  }
237
237
 
238
- function select$f(luvio, params) {
239
- return select$g();
238
+ function select$l(luvio, params) {
239
+ return select$m();
240
240
  }
241
- function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
242
- getTypeCacheKeys$7(storeKeyMap, luvio, response);
241
+ function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
242
+ getTypeCacheKeys$a(storeKeyMap, luvio, response);
243
243
  }
244
- function ingestSuccess$7(luvio, resourceParams, response) {
244
+ function ingestSuccess$a(luvio, resourceParams, response) {
245
245
  const { body } = response;
246
- const key = keyBuilderFromType$1(luvio, body);
247
- luvio.storeIngest(key, ingest$7, body);
246
+ const key = keyBuilderFromType$3(luvio, body);
247
+ luvio.storeIngest(key, ingest$a, body);
248
248
  const snapshot = luvio.storeLookup({
249
249
  recordId: key,
250
- node: select$f(),
250
+ node: select$l(),
251
251
  variables: {},
252
252
  });
253
253
  if (process.env.NODE_ENV !== 'production') {
@@ -258,7 +258,7 @@ function ingestSuccess$7(luvio, resourceParams, response) {
258
258
  deepFreeze(snapshot.data);
259
259
  return snapshot;
260
260
  }
261
- function createResourceRequest$7(config) {
261
+ function createResourceRequest$a(config) {
262
262
  const headers = {};
263
263
  return {
264
264
  baseUri: '/services/data/v62.0',
@@ -272,45 +272,45 @@ function createResourceRequest$7(config) {
272
272
  };
273
273
  }
274
274
 
275
- const adapterName$7 = 'deactivate';
275
+ const adapterName$a = 'deactivate';
276
276
  const deactivate_ConfigPropertyMetadata = [
277
277
  generateParamConfigMetadata('deactivateInputPayload', true, 2 /* Body */, 4 /* Unsupported */),
278
278
  ];
279
- const deactivate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, deactivate_ConfigPropertyMetadata);
280
- const createResourceParams$7 = /*#__PURE__*/ createResourceParams$8(deactivate_ConfigPropertyMetadata);
281
- function typeCheckConfig$7(untrustedConfig) {
279
+ const deactivate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, deactivate_ConfigPropertyMetadata);
280
+ const createResourceParams$a = /*#__PURE__*/ createResourceParams$b(deactivate_ConfigPropertyMetadata);
281
+ function typeCheckConfig$a(untrustedConfig) {
282
282
  const config = {};
283
283
  const untrustedConfig_deactivateInputPayload = untrustedConfig.deactivateInputPayload;
284
- const referenceDeactivateInputRepresentationValidationError = validate$v(untrustedConfig_deactivateInputPayload);
284
+ const referenceDeactivateInputRepresentationValidationError = validate$C(untrustedConfig_deactivateInputPayload);
285
285
  if (referenceDeactivateInputRepresentationValidationError === null) {
286
286
  config.deactivateInputPayload = untrustedConfig_deactivateInputPayload;
287
287
  }
288
288
  return config;
289
289
  }
290
- function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
290
+ function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
291
291
  if (!untrustedIsObject(untrustedConfig)) {
292
292
  return null;
293
293
  }
294
294
  if (process.env.NODE_ENV !== 'production') {
295
295
  validateConfig(untrustedConfig, configPropertyNames);
296
296
  }
297
- const config = typeCheckConfig$7(untrustedConfig);
297
+ const config = typeCheckConfig$a(untrustedConfig);
298
298
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
299
299
  return null;
300
300
  }
301
301
  return config;
302
302
  }
303
- function buildNetworkSnapshot$7(luvio, config, options) {
304
- const resourceParams = createResourceParams$7(config);
305
- const request = createResourceRequest$7(resourceParams);
303
+ function buildNetworkSnapshot$a(luvio, config, options) {
304
+ const resourceParams = createResourceParams$a(config);
305
+ const request = createResourceRequest$a(resourceParams);
306
306
  return luvio.dispatchResourceRequest(request, options)
307
307
  .then((response) => {
308
308
  return luvio.handleSuccessResponse(() => {
309
- const snapshot = ingestSuccess$7(luvio, resourceParams, response);
309
+ const snapshot = ingestSuccess$a(luvio, resourceParams, response);
310
310
  return luvio.storeBroadcast().then(() => snapshot);
311
311
  }, () => {
312
312
  const cache = new StoreKeyMap();
313
- getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
313
+ getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
314
314
  return cache;
315
315
  });
316
316
  }, (response) => {
@@ -320,16 +320,545 @@ function buildNetworkSnapshot$7(luvio, config, options) {
320
320
  }
321
321
  const deactivateAdapterFactory = (luvio) => {
322
322
  return function deactivate(untrustedConfig) {
323
- const config = validateAdapterConfig$7(untrustedConfig, deactivate_ConfigPropertyNames);
323
+ const config = validateAdapterConfig$a(untrustedConfig, deactivate_ConfigPropertyNames);
324
324
  // Invalid or incomplete config
325
325
  if (config === null) {
326
326
  throw new Error('Invalid config for "deactivate"');
327
327
  }
328
- return buildNetworkSnapshot$7(luvio, config);
328
+ return buildNetworkSnapshot$a(luvio, config);
329
+ };
330
+ };
331
+
332
+ function validate$z(obj, path = 'IndexConfigurationFieldOutputRepresentation') {
333
+ const v_error = (() => {
334
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
335
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
336
+ }
337
+ if (obj.isDisplayable !== undefined) {
338
+ const obj_isDisplayable = obj.isDisplayable;
339
+ const path_isDisplayable = path + '.isDisplayable';
340
+ if (typeof obj_isDisplayable !== 'boolean') {
341
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isDisplayable + '" (at "' + path_isDisplayable + '")');
342
+ }
343
+ }
344
+ if (obj.isSearchable !== undefined) {
345
+ const obj_isSearchable = obj.isSearchable;
346
+ const path_isSearchable = path + '.isSearchable';
347
+ if (typeof obj_isSearchable !== 'boolean') {
348
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSearchable + '" (at "' + path_isSearchable + '")');
349
+ }
350
+ }
351
+ if (obj.label !== undefined) {
352
+ const obj_label = obj.label;
353
+ const path_label = path + '.label';
354
+ if (typeof obj_label !== 'string') {
355
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
356
+ }
357
+ }
358
+ if (obj.name !== undefined) {
359
+ const obj_name = obj.name;
360
+ const path_name = path + '.name';
361
+ if (typeof obj_name !== 'string') {
362
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
363
+ }
364
+ }
365
+ if (obj.type !== undefined) {
366
+ const obj_type = obj.type;
367
+ const path_type = path + '.type';
368
+ if (typeof obj_type !== 'string') {
369
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
370
+ }
371
+ }
372
+ })();
373
+ return v_error === undefined ? null : v_error;
374
+ }
375
+
376
+ function validate$y(obj, path = 'FieldsInfoOutputRepresentation') {
377
+ const v_error = (() => {
378
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
379
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
380
+ }
381
+ if (obj.isConfigurable !== undefined) {
382
+ const obj_isConfigurable = obj.isConfigurable;
383
+ const path_isConfigurable = path + '.isConfigurable';
384
+ if (typeof obj_isConfigurable !== 'boolean') {
385
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isConfigurable + '" (at "' + path_isConfigurable + '")');
386
+ }
387
+ }
388
+ if (obj.label !== undefined) {
389
+ const obj_label = obj.label;
390
+ const path_label = path + '.label';
391
+ if (typeof obj_label !== 'string') {
392
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
393
+ }
394
+ }
395
+ if (obj.name !== undefined) {
396
+ const obj_name = obj.name;
397
+ const path_name = path + '.name';
398
+ if (typeof obj_name !== 'string') {
399
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
400
+ }
401
+ }
402
+ if (obj.type !== undefined) {
403
+ const obj_type = obj.type;
404
+ const path_type = path + '.type';
405
+ if (typeof obj_type !== 'string') {
406
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
407
+ }
408
+ }
409
+ })();
410
+ return v_error === undefined ? null : v_error;
411
+ }
412
+
413
+ function validate$x(obj, path = 'ObjectInfoOutputRepresentation') {
414
+ const v_error = (() => {
415
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
416
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
417
+ }
418
+ const obj_fields = obj.fields;
419
+ const path_fields = path + '.fields';
420
+ if (!ArrayIsArray(obj_fields)) {
421
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
422
+ }
423
+ for (let i = 0; i < obj_fields.length; i++) {
424
+ const obj_fields_item = obj_fields[i];
425
+ const path_fields_item = path_fields + '[' + i + ']';
426
+ const referencepath_fields_itemValidationError = validate$y(obj_fields_item, path_fields_item);
427
+ if (referencepath_fields_itemValidationError !== null) {
428
+ let message = 'Object doesn\'t match FieldsInfoOutputRepresentation (at "' + path_fields_item + '")\n';
429
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
430
+ return new TypeError(message);
431
+ }
432
+ }
433
+ const obj_name = obj.name;
434
+ const path_name = path + '.name';
435
+ if (typeof obj_name !== 'string') {
436
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
437
+ }
438
+ })();
439
+ return v_error === undefined ? null : v_error;
440
+ }
441
+
442
+ function validate$w(obj, path = 'MetadataOutputRepresentation') {
443
+ const v_error = (() => {
444
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
445
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
446
+ }
447
+ const obj_objectInfos = obj.objectInfos;
448
+ const path_objectInfos = path + '.objectInfos';
449
+ if (!ArrayIsArray(obj_objectInfos)) {
450
+ return new TypeError('Expected "array" but received "' + typeof obj_objectInfos + '" (at "' + path_objectInfos + '")');
451
+ }
452
+ for (let i = 0; i < obj_objectInfos.length; i++) {
453
+ const obj_objectInfos_item = obj_objectInfos[i];
454
+ const path_objectInfos_item = path_objectInfos + '[' + i + ']';
455
+ const referencepath_objectInfos_itemValidationError = validate$x(obj_objectInfos_item, path_objectInfos_item);
456
+ if (referencepath_objectInfos_itemValidationError !== null) {
457
+ let message = 'Object doesn\'t match ObjectInfoOutputRepresentation (at "' + path_objectInfos_item + '")\n';
458
+ message += referencepath_objectInfos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
459
+ return new TypeError(message);
460
+ }
461
+ }
462
+ })();
463
+ return v_error === undefined ? null : v_error;
464
+ }
465
+
466
+ const TTL$8 = 6000;
467
+ const VERSION$a = "069728c2c1342b59a45c26b737c96f48";
468
+ function validate$v(obj, path = 'IndexConfigurationCollectionOutputRepresentation') {
469
+ const v_error = (() => {
470
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
471
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
472
+ }
473
+ const obj_correlationId = obj.correlationId;
474
+ const path_correlationId = path + '.correlationId';
475
+ if (typeof obj_correlationId !== 'string') {
476
+ return new TypeError('Expected "string" but received "' + typeof obj_correlationId + '" (at "' + path_correlationId + '")');
477
+ }
478
+ const obj_indexConfigurations = obj.indexConfigurations;
479
+ const path_indexConfigurations = path + '.indexConfigurations';
480
+ if (!ArrayIsArray(obj_indexConfigurations)) {
481
+ return new TypeError('Expected "array" but received "' + typeof obj_indexConfigurations + '" (at "' + path_indexConfigurations + '")');
482
+ }
483
+ for (let i = 0; i < obj_indexConfigurations.length; i++) {
484
+ const obj_indexConfigurations_item = obj_indexConfigurations[i];
485
+ const path_indexConfigurations_item = path_indexConfigurations + '[' + i + ']';
486
+ const referencepath_indexConfigurations_itemValidationError = validate$z(obj_indexConfigurations_item, path_indexConfigurations_item);
487
+ if (referencepath_indexConfigurations_itemValidationError !== null) {
488
+ let message = 'Object doesn\'t match IndexConfigurationFieldOutputRepresentation (at "' + path_indexConfigurations_item + '")\n';
489
+ message += referencepath_indexConfigurations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
490
+ return new TypeError(message);
491
+ }
492
+ }
493
+ const obj_metadata = obj.metadata;
494
+ const path_metadata = path + '.metadata';
495
+ const referencepath_metadataValidationError = validate$w(obj_metadata, path_metadata);
496
+ if (referencepath_metadataValidationError !== null) {
497
+ let message = 'Object doesn\'t match MetadataOutputRepresentation (at "' + path_metadata + '")\n';
498
+ message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
499
+ return new TypeError(message);
500
+ }
501
+ })();
502
+ return v_error === undefined ? null : v_error;
503
+ }
504
+ const RepresentationType$9 = 'IndexConfigurationCollectionOutputRepresentation';
505
+ function normalize$9(input, existing, path, luvio, store, timestamp) {
506
+ return input;
507
+ }
508
+ const select$k = function IndexConfigurationCollectionOutputRepresentationSelect() {
509
+ return {
510
+ kind: 'Fragment',
511
+ version: VERSION$a,
512
+ private: [],
513
+ opaque: true
514
+ };
515
+ };
516
+ function equals$a(existing, incoming) {
517
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
518
+ return false;
519
+ }
520
+ return true;
521
+ }
522
+ const ingest$9 = function IndexConfigurationCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
523
+ if (process.env.NODE_ENV !== 'production') {
524
+ const validateError = validate$v(input);
525
+ if (validateError !== null) {
526
+ throw validateError;
527
+ }
528
+ }
529
+ const key = path.fullPath;
530
+ const ttlToUse = TTL$8;
531
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "epc", VERSION$a, RepresentationType$9, equals$a);
532
+ return createLink(key);
533
+ };
534
+ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
535
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
536
+ const rootKey = fullPathFactory();
537
+ rootKeySet.set(rootKey, {
538
+ namespace: keyPrefix,
539
+ representationName: RepresentationType$9,
540
+ mergeable: false
541
+ });
542
+ }
543
+
544
+ function select$j(luvio, params) {
545
+ return select$k();
546
+ }
547
+ function keyBuilder$g(luvio, params) {
548
+ return keyPrefix + '::IndexConfigurationCollectionOutputRepresentation:(' + 'correlationId:' + params.queryParams.correlationId + ')';
549
+ }
550
+ function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
551
+ getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$g(luvio, resourceParams));
552
+ }
553
+ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
554
+ const { body } = response;
555
+ const key = keyBuilder$g(luvio, resourceParams);
556
+ luvio.storeIngest(key, ingest$9, body);
557
+ const snapshot = luvio.storeLookup({
558
+ recordId: key,
559
+ node: select$j(),
560
+ variables: {},
561
+ }, snapshotRefresh);
562
+ if (process.env.NODE_ENV !== 'production') {
563
+ if (snapshot.state !== 'Fulfilled') {
564
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
565
+ }
566
+ }
567
+ deepFreeze(snapshot.data);
568
+ return snapshot;
569
+ }
570
+ function ingestError$6(luvio, params, error, snapshotRefresh) {
571
+ const key = keyBuilder$g(luvio, params);
572
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
573
+ const storeMetadataParams = {
574
+ ttl: TTL$8,
575
+ namespace: keyPrefix,
576
+ version: VERSION$a,
577
+ representationName: RepresentationType$9
578
+ };
579
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
580
+ return errorSnapshot;
581
+ }
582
+ function createResourceRequest$9(config) {
583
+ const headers = {};
584
+ return {
585
+ baseUri: '/services/data/v62.0',
586
+ basePath: '/connect/pcm/index/configurations',
587
+ method: 'get',
588
+ body: null,
589
+ urlParams: {},
590
+ queryParams: config.queryParams,
591
+ headers,
592
+ priority: 'normal',
593
+ };
594
+ }
595
+
596
+ const adapterName$9 = 'getIndexConfigurations';
597
+ const getIndexConfigurations_ConfigPropertyMetadata = [
598
+ generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
599
+ ];
600
+ const getIndexConfigurations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getIndexConfigurations_ConfigPropertyMetadata);
601
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$b(getIndexConfigurations_ConfigPropertyMetadata);
602
+ function keyBuilder$f(luvio, config) {
603
+ const resourceParams = createResourceParams$9(config);
604
+ return keyBuilder$g(luvio, resourceParams);
605
+ }
606
+ function typeCheckConfig$9(untrustedConfig) {
607
+ const config = {};
608
+ typeCheckConfig$b(untrustedConfig, config, getIndexConfigurations_ConfigPropertyMetadata);
609
+ return config;
610
+ }
611
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
612
+ if (!untrustedIsObject(untrustedConfig)) {
613
+ return null;
614
+ }
615
+ if (process.env.NODE_ENV !== 'production') {
616
+ validateConfig(untrustedConfig, configPropertyNames);
617
+ }
618
+ const config = typeCheckConfig$9(untrustedConfig);
619
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
620
+ return null;
621
+ }
622
+ return config;
623
+ }
624
+ function adapterFragment$6(luvio, config) {
625
+ createResourceParams$9(config);
626
+ return select$j();
627
+ }
628
+ function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
629
+ const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
630
+ config,
631
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
632
+ });
633
+ return luvio.storeBroadcast().then(() => snapshot);
634
+ }
635
+ function onFetchResponseError$6(luvio, config, resourceParams, response) {
636
+ const snapshot = ingestError$6(luvio, resourceParams, response, {
637
+ config,
638
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
639
+ });
640
+ return luvio.storeBroadcast().then(() => snapshot);
641
+ }
642
+ function buildNetworkSnapshot$9(luvio, config, options) {
643
+ const resourceParams = createResourceParams$9(config);
644
+ const request = createResourceRequest$9(resourceParams);
645
+ return luvio.dispatchResourceRequest(request, options)
646
+ .then((response) => {
647
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
648
+ const cache = new StoreKeyMap();
649
+ getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
650
+ return cache;
651
+ });
652
+ }, (response) => {
653
+ return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
654
+ });
655
+ }
656
+ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
657
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
658
+ }
659
+ function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
660
+ const { luvio, config } = context;
661
+ const selector = {
662
+ recordId: keyBuilder$f(luvio, config),
663
+ node: adapterFragment$6(luvio, config),
664
+ variables: {},
665
+ };
666
+ const cacheSnapshot = storeLookup(selector, {
667
+ config,
668
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
669
+ });
670
+ return cacheSnapshot;
671
+ }
672
+ const getIndexConfigurationsAdapterFactory = (luvio) => function epc__getIndexConfigurations(untrustedConfig, requestContext) {
673
+ const config = validateAdapterConfig$9(untrustedConfig, getIndexConfigurations_ConfigPropertyNames);
674
+ // Invalid or incomplete config
675
+ if (config === null) {
676
+ return null;
677
+ }
678
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
679
+ buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
680
+ };
681
+
682
+ const TTL$7 = 6000;
683
+ const VERSION$9 = "c5d89d43c0e6aba7199675aa7c278463";
684
+ function validate$u(obj, path = 'IndexConfigurationsUpdateOutputRepresentation') {
685
+ const v_error = (() => {
686
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
687
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
688
+ }
689
+ const obj_correlationId = obj.correlationId;
690
+ const path_correlationId = path + '.correlationId';
691
+ if (typeof obj_correlationId !== 'string') {
692
+ return new TypeError('Expected "string" but received "' + typeof obj_correlationId + '" (at "' + path_correlationId + '")');
693
+ }
694
+ const obj_indexConfigurations = obj.indexConfigurations;
695
+ const path_indexConfigurations = path + '.indexConfigurations';
696
+ if (!ArrayIsArray(obj_indexConfigurations)) {
697
+ return new TypeError('Expected "array" but received "' + typeof obj_indexConfigurations + '" (at "' + path_indexConfigurations + '")');
698
+ }
699
+ for (let i = 0; i < obj_indexConfigurations.length; i++) {
700
+ const obj_indexConfigurations_item = obj_indexConfigurations[i];
701
+ const path_indexConfigurations_item = path_indexConfigurations + '[' + i + ']';
702
+ const referencepath_indexConfigurations_itemValidationError = validate$z(obj_indexConfigurations_item, path_indexConfigurations_item);
703
+ if (referencepath_indexConfigurations_itemValidationError !== null) {
704
+ let message = 'Object doesn\'t match IndexConfigurationFieldOutputRepresentation (at "' + path_indexConfigurations_item + '")\n';
705
+ message += referencepath_indexConfigurations_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
706
+ return new TypeError(message);
707
+ }
708
+ }
709
+ })();
710
+ return v_error === undefined ? null : v_error;
711
+ }
712
+ const RepresentationType$8 = 'IndexConfigurationsUpdateOutputRepresentation';
713
+ function keyBuilder$e(luvio, config) {
714
+ return keyPrefix + '::' + RepresentationType$8 + ':' + config.message;
715
+ }
716
+ function keyBuilderFromType$2(luvio, object) {
717
+ const keyParams = {
718
+ message: object.correlationId
329
719
  };
720
+ return keyBuilder$e(luvio, keyParams);
721
+ }
722
+ function normalize$8(input, existing, path, luvio, store, timestamp) {
723
+ return input;
724
+ }
725
+ const select$i = function IndexConfigurationsUpdateOutputRepresentationSelect() {
726
+ return {
727
+ kind: 'Fragment',
728
+ version: VERSION$9,
729
+ private: [],
730
+ opaque: true
731
+ };
732
+ };
733
+ function equals$9(existing, incoming) {
734
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
735
+ return false;
736
+ }
737
+ return true;
738
+ }
739
+ const ingest$8 = function IndexConfigurationsUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
740
+ if (process.env.NODE_ENV !== 'production') {
741
+ const validateError = validate$u(input);
742
+ if (validateError !== null) {
743
+ throw validateError;
744
+ }
745
+ }
746
+ const key = keyBuilderFromType$2(luvio, input);
747
+ const ttlToUse = TTL$7;
748
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "epc", VERSION$9, RepresentationType$8, equals$9);
749
+ return createLink(key);
330
750
  };
751
+ function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
752
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
753
+ const rootKey = keyBuilderFromType$2(luvio, input);
754
+ rootKeySet.set(rootKey, {
755
+ namespace: keyPrefix,
756
+ representationName: RepresentationType$8,
757
+ mergeable: false
758
+ });
759
+ }
331
760
 
332
- function validate$s(obj, path = 'SnapshotIndexOutputRepresentation') {
761
+ function select$h(luvio, params) {
762
+ return select$i();
763
+ }
764
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
765
+ getTypeCacheKeys$8(storeKeyMap, luvio, response);
766
+ }
767
+ function ingestSuccess$8(luvio, resourceParams, response) {
768
+ const { body } = response;
769
+ const key = keyBuilderFromType$2(luvio, body);
770
+ luvio.storeIngest(key, ingest$8, body);
771
+ const snapshot = luvio.storeLookup({
772
+ recordId: key,
773
+ node: select$h(),
774
+ variables: {},
775
+ });
776
+ if (process.env.NODE_ENV !== 'production') {
777
+ if (snapshot.state !== 'Fulfilled') {
778
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
779
+ }
780
+ }
781
+ deepFreeze(snapshot.data);
782
+ return snapshot;
783
+ }
784
+ function createResourceRequest$8(config) {
785
+ const headers = {};
786
+ return {
787
+ baseUri: '/services/data/v62.0',
788
+ basePath: '/connect/pcm/index/configurations',
789
+ method: 'put',
790
+ body: config.body,
791
+ urlParams: {},
792
+ queryParams: config.queryParams,
793
+ headers,
794
+ priority: 'normal',
795
+ };
796
+ }
797
+
798
+ const adapterName$8 = 'updateIndexConfigurations';
799
+ const updateIndexConfigurations_ConfigPropertyMetadata = [
800
+ generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
801
+ generateParamConfigMetadata('indexConfigurations', true, 2 /* Body */, 4 /* Unsupported */, true),
802
+ ];
803
+ const updateIndexConfigurations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, updateIndexConfigurations_ConfigPropertyMetadata);
804
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$b(updateIndexConfigurations_ConfigPropertyMetadata);
805
+ function typeCheckConfig$8(untrustedConfig) {
806
+ const config = {};
807
+ typeCheckConfig$b(untrustedConfig, config, updateIndexConfigurations_ConfigPropertyMetadata);
808
+ const untrustedConfig_indexConfigurations = untrustedConfig.indexConfigurations;
809
+ if (ArrayIsArray$1(untrustedConfig_indexConfigurations)) {
810
+ const untrustedConfig_indexConfigurations_array = [];
811
+ for (let i = 0, arrayLength = untrustedConfig_indexConfigurations.length; i < arrayLength; i++) {
812
+ const untrustedConfig_indexConfigurations_item = untrustedConfig_indexConfigurations[i];
813
+ untrustedConfig_indexConfigurations_array.push(untrustedConfig_indexConfigurations_item);
814
+ }
815
+ config.indexConfigurations = untrustedConfig_indexConfigurations_array;
816
+ }
817
+ return config;
818
+ }
819
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
820
+ if (!untrustedIsObject(untrustedConfig)) {
821
+ return null;
822
+ }
823
+ if (process.env.NODE_ENV !== 'production') {
824
+ validateConfig(untrustedConfig, configPropertyNames);
825
+ }
826
+ const config = typeCheckConfig$8(untrustedConfig);
827
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
828
+ return null;
829
+ }
830
+ return config;
831
+ }
832
+ function buildNetworkSnapshot$8(luvio, config, options) {
833
+ const resourceParams = createResourceParams$8(config);
834
+ const request = createResourceRequest$8(resourceParams);
835
+ return luvio.dispatchResourceRequest(request, options)
836
+ .then((response) => {
837
+ return luvio.handleSuccessResponse(() => {
838
+ const snapshot = ingestSuccess$8(luvio, resourceParams, response);
839
+ return luvio.storeBroadcast().then(() => snapshot);
840
+ }, () => {
841
+ const cache = new StoreKeyMap();
842
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
843
+ return cache;
844
+ });
845
+ }, (response) => {
846
+ deepFreeze(response);
847
+ throw response;
848
+ });
849
+ }
850
+ const updateIndexConfigurationsAdapterFactory = (luvio) => {
851
+ return function updateIndexConfigurations(untrustedConfig) {
852
+ const config = validateAdapterConfig$8(untrustedConfig, updateIndexConfigurations_ConfigPropertyNames);
853
+ // Invalid or incomplete config
854
+ if (config === null) {
855
+ throw new Error('Invalid config for "updateIndexConfigurations"');
856
+ }
857
+ return buildNetworkSnapshot$8(luvio, config);
858
+ };
859
+ };
860
+
861
+ function validate$t(obj, path = 'SnapshotIndexOutputRepresentation') {
333
862
  const v_error = (() => {
334
863
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
335
864
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -385,7 +914,7 @@ function validate$s(obj, path = 'SnapshotIndexOutputRepresentation') {
385
914
  return v_error === undefined ? null : v_error;
386
915
  }
387
916
 
388
- function validate$r(obj, path = 'SnapshotOutputRepresentation') {
917
+ function validate$s(obj, path = 'SnapshotOutputRepresentation') {
389
918
  const v_error = (() => {
390
919
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
391
920
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -424,7 +953,7 @@ function validate$r(obj, path = 'SnapshotOutputRepresentation') {
424
953
  for (let i = 0; i < obj_snapshotIndexes.length; i++) {
425
954
  const obj_snapshotIndexes_item = obj_snapshotIndexes[i];
426
955
  const path_snapshotIndexes_item = path_snapshotIndexes + '[' + i + ']';
427
- const referencepath_snapshotIndexes_itemValidationError = validate$s(obj_snapshotIndexes_item, path_snapshotIndexes_item);
956
+ const referencepath_snapshotIndexes_itemValidationError = validate$t(obj_snapshotIndexes_item, path_snapshotIndexes_item);
428
957
  if (referencepath_snapshotIndexes_itemValidationError !== null) {
429
958
  let message = 'Object doesn\'t match SnapshotIndexOutputRepresentation (at "' + path_snapshotIndexes_item + '")\n';
430
959
  message += referencepath_snapshotIndexes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -435,6 +964,166 @@ function validate$r(obj, path = 'SnapshotOutputRepresentation') {
435
964
  return v_error === undefined ? null : v_error;
436
965
  }
437
966
 
967
+ const TTL$6 = 6000;
968
+ const VERSION$8 = "726ce1855b2e6bdc8c2a482ede91a062";
969
+ function validate$r(obj, path = 'SnapshotDeploymentOutputRepresentation') {
970
+ const v_error = (() => {
971
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
972
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
973
+ }
974
+ const obj_snapshot = obj.snapshot;
975
+ const path_snapshot = path + '.snapshot';
976
+ const referencepath_snapshotValidationError = validate$s(obj_snapshot, path_snapshot);
977
+ if (referencepath_snapshotValidationError !== null) {
978
+ let message = 'Object doesn\'t match SnapshotOutputRepresentation (at "' + path_snapshot + '")\n';
979
+ message += referencepath_snapshotValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
980
+ return new TypeError(message);
981
+ }
982
+ })();
983
+ return v_error === undefined ? null : v_error;
984
+ }
985
+ const RepresentationType$7 = 'SnapshotDeploymentOutputRepresentation';
986
+ function keyBuilder$d(luvio, config) {
987
+ return keyPrefix + '::' + RepresentationType$7 + ':' + config.message;
988
+ }
989
+ function keyBuilderFromType$1(luvio, object) {
990
+ const keyParams = {
991
+ message: object.snapshot.id
992
+ };
993
+ return keyBuilder$d(luvio, keyParams);
994
+ }
995
+ function normalize$7(input, existing, path, luvio, store, timestamp) {
996
+ return input;
997
+ }
998
+ const select$g = function SnapshotDeploymentOutputRepresentationSelect() {
999
+ return {
1000
+ kind: 'Fragment',
1001
+ version: VERSION$8,
1002
+ private: [],
1003
+ opaque: true
1004
+ };
1005
+ };
1006
+ function equals$8(existing, incoming) {
1007
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1008
+ return false;
1009
+ }
1010
+ return true;
1011
+ }
1012
+ const ingest$7 = function SnapshotDeploymentOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1013
+ if (process.env.NODE_ENV !== 'production') {
1014
+ const validateError = validate$r(input);
1015
+ if (validateError !== null) {
1016
+ throw validateError;
1017
+ }
1018
+ }
1019
+ const key = keyBuilderFromType$1(luvio, input);
1020
+ const ttlToUse = TTL$6;
1021
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "epc", VERSION$8, RepresentationType$7, equals$8);
1022
+ return createLink(key);
1023
+ };
1024
+ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
1025
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1026
+ const rootKey = keyBuilderFromType$1(luvio, input);
1027
+ rootKeySet.set(rootKey, {
1028
+ namespace: keyPrefix,
1029
+ representationName: RepresentationType$7,
1030
+ mergeable: false
1031
+ });
1032
+ }
1033
+
1034
+ function select$f(luvio, params) {
1035
+ return select$g();
1036
+ }
1037
+ function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
1038
+ getTypeCacheKeys$7(storeKeyMap, luvio, response);
1039
+ }
1040
+ function ingestSuccess$7(luvio, resourceParams, response) {
1041
+ const { body } = response;
1042
+ const key = keyBuilderFromType$1(luvio, body);
1043
+ luvio.storeIngest(key, ingest$7, body);
1044
+ const snapshot = luvio.storeLookup({
1045
+ recordId: key,
1046
+ node: select$f(),
1047
+ variables: {},
1048
+ });
1049
+ if (process.env.NODE_ENV !== 'production') {
1050
+ if (snapshot.state !== 'Fulfilled') {
1051
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1052
+ }
1053
+ }
1054
+ deepFreeze(snapshot.data);
1055
+ return snapshot;
1056
+ }
1057
+ function createResourceRequest$7(config) {
1058
+ const headers = {};
1059
+ return {
1060
+ baseUri: '/services/data/v62.0',
1061
+ basePath: '/connect/pcm/index/deploy',
1062
+ method: 'post',
1063
+ body: config.body,
1064
+ urlParams: {},
1065
+ queryParams: {},
1066
+ headers,
1067
+ priority: 'normal',
1068
+ };
1069
+ }
1070
+
1071
+ const adapterName$7 = 'deploySnapshotIndex';
1072
+ const deploySnapshotIndex_ConfigPropertyMetadata = [
1073
+ generateParamConfigMetadata('buildType', false, 2 /* Body */, 0 /* String */),
1074
+ generateParamConfigMetadata('snapshot', true, 2 /* Body */, 4 /* Unsupported */),
1075
+ ];
1076
+ const deploySnapshotIndex_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, deploySnapshotIndex_ConfigPropertyMetadata);
1077
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$b(deploySnapshotIndex_ConfigPropertyMetadata);
1078
+ function typeCheckConfig$7(untrustedConfig) {
1079
+ const config = {};
1080
+ typeCheckConfig$b(untrustedConfig, config, deploySnapshotIndex_ConfigPropertyMetadata);
1081
+ const untrustedConfig_snapshot = untrustedConfig.snapshot;
1082
+ config.snapshot = untrustedConfig_snapshot;
1083
+ return config;
1084
+ }
1085
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1086
+ if (!untrustedIsObject(untrustedConfig)) {
1087
+ return null;
1088
+ }
1089
+ if (process.env.NODE_ENV !== 'production') {
1090
+ validateConfig(untrustedConfig, configPropertyNames);
1091
+ }
1092
+ const config = typeCheckConfig$7(untrustedConfig);
1093
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1094
+ return null;
1095
+ }
1096
+ return config;
1097
+ }
1098
+ function buildNetworkSnapshot$7(luvio, config, options) {
1099
+ const resourceParams = createResourceParams$7(config);
1100
+ const request = createResourceRequest$7(resourceParams);
1101
+ return luvio.dispatchResourceRequest(request, options)
1102
+ .then((response) => {
1103
+ return luvio.handleSuccessResponse(() => {
1104
+ const snapshot = ingestSuccess$7(luvio, resourceParams, response);
1105
+ return luvio.storeBroadcast().then(() => snapshot);
1106
+ }, () => {
1107
+ const cache = new StoreKeyMap();
1108
+ getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
1109
+ return cache;
1110
+ });
1111
+ }, (response) => {
1112
+ deepFreeze(response);
1113
+ throw response;
1114
+ });
1115
+ }
1116
+ const deploySnapshotIndexAdapterFactory = (luvio) => {
1117
+ return function deploySnapshotIndex(untrustedConfig) {
1118
+ const config = validateAdapterConfig$7(untrustedConfig, deploySnapshotIndex_ConfigPropertyNames);
1119
+ // Invalid or incomplete config
1120
+ if (config === null) {
1121
+ throw new Error('Invalid config for "deploySnapshotIndex"');
1122
+ }
1123
+ return buildNetworkSnapshot$7(luvio, config);
1124
+ };
1125
+ };
1126
+
438
1127
  const TTL$5 = 6000;
439
1128
  const VERSION$7 = "6c7ad97ab7e48e90336529c3204ce90e";
440
1129
  function validate$q(obj, path = 'SnapshotCollectionOutputRepresentation') {
@@ -450,7 +1139,7 @@ function validate$q(obj, path = 'SnapshotCollectionOutputRepresentation') {
450
1139
  for (let i = 0; i < obj_snapshots.length; i++) {
451
1140
  const obj_snapshots_item = obj_snapshots[i];
452
1141
  const path_snapshots_item = path_snapshots + '[' + i + ']';
453
- const referencepath_snapshots_itemValidationError = validate$r(obj_snapshots_item, path_snapshots_item);
1142
+ const referencepath_snapshots_itemValidationError = validate$s(obj_snapshots_item, path_snapshots_item);
454
1143
  if (referencepath_snapshots_itemValidationError !== null) {
455
1144
  let message = 'Object doesn\'t match SnapshotOutputRepresentation (at "' + path_snapshots_item + '")\n';
456
1145
  message += referencepath_snapshots_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -555,7 +1244,7 @@ function createResourceRequest$6(config) {
555
1244
  const adapterName$6 = 'getSnapshots';
556
1245
  const getSnapshots_ConfigPropertyMetadata = [];
557
1246
  const getSnapshots_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getSnapshots_ConfigPropertyMetadata);
558
- const createResourceParams$6 = /*#__PURE__*/ createResourceParams$8(getSnapshots_ConfigPropertyMetadata);
1247
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$b(getSnapshots_ConfigPropertyMetadata);
559
1248
  function keyBuilder$b(luvio, config) {
560
1249
  createResourceParams$6(config);
561
1250
  return keyBuilder$c();
@@ -610,7 +1299,7 @@ function buildNetworkSnapshot$6(luvio, config, options) {
610
1299
  });
611
1300
  }
612
1301
  function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
613
- return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
1302
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
614
1303
  }
615
1304
  function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
616
1305
  const { luvio, config } = context;
@@ -800,7 +1489,7 @@ const createProductAttributeDefinition_ConfigPropertyMetadata = [
800
1489
  generateParamConfigMetadata('productAttributeDefinitionListInputPayload', true, 2 /* Body */, 4 /* Unsupported */),
801
1490
  ];
802
1491
  const createProductAttributeDefinition_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createProductAttributeDefinition_ConfigPropertyMetadata);
803
- const createResourceParams$5 = /*#__PURE__*/ createResourceParams$8(createProductAttributeDefinition_ConfigPropertyMetadata);
1492
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$b(createProductAttributeDefinition_ConfigPropertyMetadata);
804
1493
  function typeCheckConfig$5(untrustedConfig) {
805
1494
  const config = {};
806
1495
  const untrustedConfig_productAttributeDefinitionListInputPayload = untrustedConfig.productAttributeDefinitionListInputPayload;
@@ -1075,14 +1764,14 @@ const getProductFlowByProductId_ConfigPropertyMetadata = [
1075
1764
  generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
1076
1765
  ];
1077
1766
  const getProductFlowByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getProductFlowByProductId_ConfigPropertyMetadata);
1078
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$8(getProductFlowByProductId_ConfigPropertyMetadata);
1767
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$b(getProductFlowByProductId_ConfigPropertyMetadata);
1079
1768
  function keyBuilder$8(luvio, config) {
1080
1769
  const resourceParams = createResourceParams$4(config);
1081
1770
  return keyBuilder$9(luvio, resourceParams);
1082
1771
  }
1083
1772
  function typeCheckConfig$4(untrustedConfig) {
1084
1773
  const config = {};
1085
- typeCheckConfig$8(untrustedConfig, config, getProductFlowByProductId_ConfigPropertyMetadata);
1774
+ typeCheckConfig$b(untrustedConfig, config, getProductFlowByProductId_ConfigPropertyMetadata);
1086
1775
  return config;
1087
1776
  }
1088
1777
  function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
@@ -1131,7 +1820,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
1131
1820
  });
1132
1821
  }
1133
1822
  function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
1134
- return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
1823
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
1135
1824
  }
1136
1825
  function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
1137
1826
  const { luvio, config } = context;
@@ -2009,14 +2698,14 @@ const getProductAttributesByProductId_ConfigPropertyMetadata = [
2009
2698
  generateParamConfigMetadata('isPriceImpacting', false, 1 /* QueryParameter */, 1 /* Boolean */),
2010
2699
  ];
2011
2700
  const getProductAttributesByProductId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getProductAttributesByProductId_ConfigPropertyMetadata);
2012
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$8(getProductAttributesByProductId_ConfigPropertyMetadata);
2701
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$b(getProductAttributesByProductId_ConfigPropertyMetadata);
2013
2702
  function keyBuilder$6(luvio, config) {
2014
2703
  const resourceParams = createResourceParams$3(config);
2015
2704
  return keyBuilder$7(luvio, resourceParams);
2016
2705
  }
2017
2706
  function typeCheckConfig$3(untrustedConfig) {
2018
2707
  const config = {};
2019
- typeCheckConfig$8(untrustedConfig, config, getProductAttributesByProductId_ConfigPropertyMetadata);
2708
+ typeCheckConfig$b(untrustedConfig, config, getProductAttributesByProductId_ConfigPropertyMetadata);
2020
2709
  return config;
2021
2710
  }
2022
2711
  function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
@@ -2065,7 +2754,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
2065
2754
  });
2066
2755
  }
2067
2756
  function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
2068
- return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2757
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
2069
2758
  }
2070
2759
  function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
2071
2760
  const { luvio, config } = context;
@@ -2332,14 +3021,14 @@ const getProductById_ConfigPropertyMetadata = [
2332
3021
  generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
2333
3022
  ];
2334
3023
  const getProductById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getProductById_ConfigPropertyMetadata);
2335
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$8(getProductById_ConfigPropertyMetadata);
3024
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$b(getProductById_ConfigPropertyMetadata);
2336
3025
  function keyBuilder$4(luvio, config) {
2337
3026
  const resourceParams = createResourceParams$2(config);
2338
3027
  return keyBuilder$5(luvio, resourceParams);
2339
3028
  }
2340
3029
  function typeCheckConfig$2(untrustedConfig) {
2341
3030
  const config = {};
2342
- typeCheckConfig$8(untrustedConfig, config, getProductById_ConfigPropertyMetadata);
3031
+ typeCheckConfig$b(untrustedConfig, config, getProductById_ConfigPropertyMetadata);
2343
3032
  return config;
2344
3033
  }
2345
3034
  function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
@@ -2388,7 +3077,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
2388
3077
  });
2389
3078
  }
2390
3079
  function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
2391
- return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
3080
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
2392
3081
  }
2393
3082
  function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
2394
3083
  const { luvio, config } = context;
@@ -2718,14 +3407,14 @@ const getContextDefinitionInfoById_ConfigPropertyMetadata = [
2718
3407
  generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
2719
3408
  ];
2720
3409
  const getContextDefinitionInfoById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getContextDefinitionInfoById_ConfigPropertyMetadata);
2721
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$8(getContextDefinitionInfoById_ConfigPropertyMetadata);
3410
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$b(getContextDefinitionInfoById_ConfigPropertyMetadata);
2722
3411
  function keyBuilder$2(luvio, config) {
2723
3412
  const resourceParams = createResourceParams$1(config);
2724
3413
  return keyBuilder$3(luvio, resourceParams);
2725
3414
  }
2726
3415
  function typeCheckConfig$1(untrustedConfig) {
2727
3416
  const config = {};
2728
- typeCheckConfig$8(untrustedConfig, config, getContextDefinitionInfoById_ConfigPropertyMetadata);
3417
+ typeCheckConfig$b(untrustedConfig, config, getContextDefinitionInfoById_ConfigPropertyMetadata);
2729
3418
  return config;
2730
3419
  }
2731
3420
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -2774,7 +3463,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
2774
3463
  });
2775
3464
  }
2776
3465
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
2777
- return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
3466
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
2778
3467
  }
2779
3468
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
2780
3469
  const { luvio, config } = context;
@@ -3006,14 +3695,14 @@ const getConfigRuleMetadata_ConfigPropertyMetadata = [
3006
3695
  generateParamConfigMetadata('correlationId', false, 1 /* QueryParameter */, 0 /* String */),
3007
3696
  ];
3008
3697
  const getConfigRuleMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getConfigRuleMetadata_ConfigPropertyMetadata);
3009
- const createResourceParams = /*#__PURE__*/ createResourceParams$8(getConfigRuleMetadata_ConfigPropertyMetadata);
3698
+ const createResourceParams = /*#__PURE__*/ createResourceParams$b(getConfigRuleMetadata_ConfigPropertyMetadata);
3010
3699
  function keyBuilder(luvio, config) {
3011
3700
  const resourceParams = createResourceParams(config);
3012
3701
  return keyBuilder$1(luvio, resourceParams);
3013
3702
  }
3014
3703
  function typeCheckConfig(untrustedConfig) {
3015
3704
  const config = {};
3016
- typeCheckConfig$8(untrustedConfig, config, getConfigRuleMetadata_ConfigPropertyMetadata);
3705
+ typeCheckConfig$b(untrustedConfig, config, getConfigRuleMetadata_ConfigPropertyMetadata);
3017
3706
  return config;
3018
3707
  }
3019
3708
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -3062,7 +3751,7 @@ function buildNetworkSnapshot(luvio, config, options) {
3062
3751
  });
3063
3752
  }
3064
3753
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
3065
- return buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
3754
+ return buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
3066
3755
  }
3067
3756
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
3068
3757
  const { luvio, config } = context;
@@ -3087,4 +3776,4 @@ const getConfigRuleMetadataAdapterFactory = (luvio) => function epc__getConfigRu
3087
3776
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
3088
3777
  };
3089
3778
 
3090
- export { createProductAttributeDefinitionAdapterFactory, deactivateAdapterFactory, getConfigRuleMetadataAdapterFactory, getContextDefinitionInfoByIdAdapterFactory, getProductAttributesByProductIdAdapterFactory, getProductByIdAdapterFactory, getProductFlowByProductIdAdapterFactory, getSnapshotsAdapterFactory };
3779
+ export { createProductAttributeDefinitionAdapterFactory, deactivateAdapterFactory, deploySnapshotIndexAdapterFactory, getConfigRuleMetadataAdapterFactory, getContextDefinitionInfoByIdAdapterFactory, getIndexConfigurationsAdapterFactory, getProductAttributesByProductIdAdapterFactory, getProductByIdAdapterFactory, getProductFlowByProductIdAdapterFactory, getSnapshotsAdapterFactory, updateIndexConfigurationsAdapterFactory };