@salesforce/lds-adapters-cdp-engmt-config 1.352.0 → 1.353.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 (25) hide show
  1. package/dist/es/es2018/cdp-engmt-config.js +776 -283
  2. package/dist/es/es2018/types/src/generated/adapters/createCompoundMetric.d.ts +20 -0
  3. package/dist/es/es2018/types/src/generated/adapters/createEngagementSignal.d.ts +1 -1
  4. package/dist/es/es2018/types/src/generated/adapters/deleteCompoundMetric.d.ts +14 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getCompoundMetric.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  7. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +6 -1
  8. package/dist/es/es2018/types/src/generated/resources/deletePersonalizationCompoundMetricsByCompoundMetricIdOrName.d.ts +12 -0
  9. package/dist/es/es2018/types/src/generated/resources/getPersonalizationCompoundMetricsByCompoundMetricIdOrName.d.ts +16 -0
  10. package/dist/es/es2018/types/src/generated/resources/postPersonalizationCompoundMetrics.d.ts +17 -0
  11. package/dist/es/es2018/types/src/generated/resources/postPersonalizationEngagementSignals.d.ts +1 -1
  12. package/dist/es/es2018/types/src/generated/types/EngagementSignalCompoundMetricCollectionInputRepresentation.d.ts +28 -0
  13. package/dist/es/es2018/types/src/generated/types/EngagementSignalCompoundMetricInputRepresentation.d.ts +43 -0
  14. package/dist/es/es2018/types/src/generated/types/EngagementSignalCompoundMetricRepresentation.d.ts +55 -0
  15. package/dist/es/es2018/types/src/generated/types/EngagementSignalInputRepresentation.d.ts +4 -4
  16. package/dist/es/es2018/types/src/generated/types/EngagementSignalMetricFieldInputRepresentation.d.ts +31 -0
  17. package/dist/es/es2018/types/src/generated/types/EngagementSignalMetricFieldRepresentation.d.ts +31 -0
  18. package/dist/es/es2018/types/src/generated/types/EngagementSignalRepresentation.d.ts +7 -5
  19. package/package.json +3 -3
  20. package/sfdc/index.js +766 -211
  21. package/src/raml/api.raml +129 -53
  22. package/src/raml/luvio.raml +23 -1
  23. package/dist/es/es2018/types/src/generated/types/EngagementSignalRateMetricCollectionInputRepresentation.d.ts +0 -28
  24. package/dist/es/es2018/types/src/generated/types/EngagementSignalRateMetricInputRepresentation.d.ts +0 -40
  25. package/dist/es/es2018/types/src/generated/types/EngagementSignalRateMetricRepresentation.d.ts +0 -34
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$7, StoreKeyMap, createResourceParams as createResourceParams$7 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$a, StoreKeyMap, createResourceParams as createResourceParams$a } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -92,9 +92,9 @@ function createLink(ref) {
92
92
  };
93
93
  }
94
94
 
95
- const TTL$2 = 6000;
96
- const VERSION$4 = "171063a9be8004fe115bb5e31a231dd9";
97
- function validate$4(obj, path = 'EngagementSignalCollectionRepresentation') {
95
+ const TTL$3 = 6000;
96
+ const VERSION$5 = "171063a9be8004fe115bb5e31a231dd9";
97
+ function validate$5(obj, path = 'EngagementSignalCollectionRepresentation') {
98
98
  const v_error = (() => {
99
99
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
100
100
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -152,14 +152,14 @@ function validate$4(obj, path = 'EngagementSignalCollectionRepresentation') {
152
152
  })();
153
153
  return v_error === undefined ? null : v_error;
154
154
  }
155
- const RepresentationType$2 = 'EngagementSignalCollectionRepresentation';
156
- function normalize$2(input, existing, path, luvio, store, timestamp) {
155
+ const RepresentationType$3 = 'EngagementSignalCollectionRepresentation';
156
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
157
157
  return input;
158
158
  }
159
- const select$9 = function EngagementSignalCollectionRepresentationSelect() {
159
+ const select$c = function EngagementSignalCollectionRepresentationSelect() {
160
160
  return {
161
161
  kind: 'Fragment',
162
- version: VERSION$4,
162
+ version: VERSION$5,
163
163
  private: [],
164
164
  selections: [
165
165
  {
@@ -183,7 +183,7 @@ const select$9 = function EngagementSignalCollectionRepresentationSelect() {
183
183
  ]
184
184
  };
185
185
  };
186
- function equals$4(existing, incoming) {
186
+ function equals$5(existing, incoming) {
187
187
  const existing_totalSize = existing.totalSize;
188
188
  const incoming_totalSize = incoming.totalSize;
189
189
  if (!(existing_totalSize === incoming_totalSize)) {
@@ -219,44 +219,44 @@ function equals$4(existing, incoming) {
219
219
  }
220
220
  return true;
221
221
  }
222
- const ingest$2 = function EngagementSignalCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
222
+ const ingest$3 = function EngagementSignalCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
223
223
  if (process.env.NODE_ENV !== 'production') {
224
- const validateError = validate$4(input);
224
+ const validateError = validate$5(input);
225
225
  if (validateError !== null) {
226
226
  throw validateError;
227
227
  }
228
228
  }
229
229
  const key = path.fullPath;
230
- const ttlToUse = TTL$2;
231
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "engmt-config", VERSION$4, RepresentationType$2, equals$4);
230
+ const ttlToUse = TTL$3;
231
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "engmt-config", VERSION$5, RepresentationType$3, equals$5);
232
232
  return createLink(key);
233
233
  };
234
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
234
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
235
235
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
236
236
  const rootKey = fullPathFactory();
237
237
  rootKeySet.set(rootKey, {
238
238
  namespace: keyPrefix,
239
- representationName: RepresentationType$2,
239
+ representationName: RepresentationType$3,
240
240
  mergeable: false
241
241
  });
242
242
  }
243
243
 
244
- function select$8(luvio, params) {
245
- return select$9();
244
+ function select$b(luvio, params) {
245
+ return select$c();
246
246
  }
247
- function keyBuilder$9(luvio, params) {
247
+ function keyBuilder$d(luvio, params) {
248
248
  return keyPrefix + '::EngagementSignalCollectionRepresentation:(' + 'dataspaceName:' + params.queryParams.dataspaceName + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'profileDataGraphName:' + params.queryParams.profileDataGraphName + ')';
249
249
  }
250
- function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
251
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
250
+ function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
251
+ getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
252
252
  }
253
- function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
253
+ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
254
254
  const { body } = response;
255
- const key = keyBuilder$9(luvio, resourceParams);
256
- luvio.storeIngest(key, ingest$2, body);
255
+ const key = keyBuilder$d(luvio, resourceParams);
256
+ luvio.storeIngest(key, ingest$3, body);
257
257
  const snapshot = luvio.storeLookup({
258
258
  recordId: key,
259
- node: select$8(),
259
+ node: select$b(),
260
260
  variables: {},
261
261
  }, snapshotRefresh);
262
262
  if (process.env.NODE_ENV !== 'production') {
@@ -267,19 +267,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
267
267
  deepFreeze(snapshot.data);
268
268
  return snapshot;
269
269
  }
270
- function ingestError$2(luvio, params, error, snapshotRefresh) {
271
- const key = keyBuilder$9(luvio, params);
270
+ function ingestError$3(luvio, params, error, snapshotRefresh) {
271
+ const key = keyBuilder$d(luvio, params);
272
272
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
273
273
  const storeMetadataParams = {
274
- ttl: TTL$2,
274
+ ttl: TTL$3,
275
275
  namespace: keyPrefix,
276
- version: VERSION$4,
277
- representationName: RepresentationType$2
276
+ version: VERSION$5,
277
+ representationName: RepresentationType$3
278
278
  };
279
279
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
280
280
  return errorSnapshot;
281
281
  }
282
- function createResourceRequest$6(config) {
282
+ function createResourceRequest$9(config) {
283
283
  const headers = {};
284
284
  return {
285
285
  baseUri: '/services/data/v64.0',
@@ -293,97 +293,97 @@ function createResourceRequest$6(config) {
293
293
  };
294
294
  }
295
295
 
296
- const adapterName$6 = 'getEngagementSignals';
296
+ const adapterName$9 = 'getEngagementSignals';
297
297
  const getEngagementSignals_ConfigPropertyMetadata = [
298
298
  generateParamConfigMetadata('dataspaceName', false, 1 /* QueryParameter */, 0 /* String */),
299
299
  generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
300
300
  generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
301
301
  generateParamConfigMetadata('profileDataGraphName', false, 1 /* QueryParameter */, 0 /* String */),
302
302
  ];
303
- const getEngagementSignals_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getEngagementSignals_ConfigPropertyMetadata);
304
- const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getEngagementSignals_ConfigPropertyMetadata);
305
- function keyBuilder$8(luvio, config) {
306
- const resourceParams = createResourceParams$6(config);
307
- return keyBuilder$9(luvio, resourceParams);
303
+ const getEngagementSignals_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getEngagementSignals_ConfigPropertyMetadata);
304
+ const createResourceParams$9 = /*#__PURE__*/ createResourceParams$a(getEngagementSignals_ConfigPropertyMetadata);
305
+ function keyBuilder$c(luvio, config) {
306
+ const resourceParams = createResourceParams$9(config);
307
+ return keyBuilder$d(luvio, resourceParams);
308
308
  }
309
- function typeCheckConfig$6(untrustedConfig) {
309
+ function typeCheckConfig$9(untrustedConfig) {
310
310
  const config = {};
311
- typeCheckConfig$7(untrustedConfig, config, getEngagementSignals_ConfigPropertyMetadata);
311
+ typeCheckConfig$a(untrustedConfig, config, getEngagementSignals_ConfigPropertyMetadata);
312
312
  return config;
313
313
  }
314
- function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
314
+ function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
315
315
  if (!untrustedIsObject(untrustedConfig)) {
316
316
  return null;
317
317
  }
318
318
  if (process.env.NODE_ENV !== 'production') {
319
319
  validateConfig(untrustedConfig, configPropertyNames);
320
320
  }
321
- const config = typeCheckConfig$6(untrustedConfig);
321
+ const config = typeCheckConfig$9(untrustedConfig);
322
322
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
323
323
  return null;
324
324
  }
325
325
  return config;
326
326
  }
327
- function adapterFragment$2(luvio, config) {
328
- createResourceParams$6(config);
329
- return select$8();
327
+ function adapterFragment$3(luvio, config) {
328
+ createResourceParams$9(config);
329
+ return select$b();
330
330
  }
331
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
332
- const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
331
+ function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
332
+ const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
333
333
  config,
334
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
334
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
335
335
  });
336
336
  return luvio.storeBroadcast().then(() => snapshot);
337
337
  }
338
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
339
- const snapshot = ingestError$2(luvio, resourceParams, response, {
338
+ function onFetchResponseError$3(luvio, config, resourceParams, response) {
339
+ const snapshot = ingestError$3(luvio, resourceParams, response, {
340
340
  config,
341
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
341
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
342
342
  });
343
343
  return luvio.storeBroadcast().then(() => snapshot);
344
344
  }
345
- function buildNetworkSnapshot$6(luvio, config, options) {
346
- const resourceParams = createResourceParams$6(config);
347
- const request = createResourceRequest$6(resourceParams);
345
+ function buildNetworkSnapshot$9(luvio, config, options) {
346
+ const resourceParams = createResourceParams$9(config);
347
+ const request = createResourceRequest$9(resourceParams);
348
348
  return luvio.dispatchResourceRequest(request, options)
349
349
  .then((response) => {
350
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
350
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
351
351
  const cache = new StoreKeyMap();
352
- getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
352
+ getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
353
353
  return cache;
354
354
  });
355
355
  }, (response) => {
356
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
356
+ return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
357
357
  });
358
358
  }
359
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
360
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
359
+ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
360
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
361
361
  }
362
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
362
+ function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
363
363
  const { luvio, config } = context;
364
364
  const selector = {
365
- recordId: keyBuilder$8(luvio, config),
366
- node: adapterFragment$2(luvio, config),
365
+ recordId: keyBuilder$c(luvio, config),
366
+ node: adapterFragment$3(luvio, config),
367
367
  variables: {},
368
368
  };
369
369
  const cacheSnapshot = storeLookup(selector, {
370
370
  config,
371
- resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
371
+ resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
372
372
  });
373
373
  return cacheSnapshot;
374
374
  }
375
375
  const getEngagementSignalsAdapterFactory = (luvio) => function engmtConfig__getEngagementSignals(untrustedConfig, requestContext) {
376
- const config = validateAdapterConfig$6(untrustedConfig, getEngagementSignals_ConfigPropertyNames);
376
+ const config = validateAdapterConfig$9(untrustedConfig, getEngagementSignals_ConfigPropertyNames);
377
377
  // Invalid or incomplete config
378
378
  if (config === null) {
379
379
  return null;
380
380
  }
381
381
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
382
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
382
+ buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
383
383
  };
384
384
 
385
- const VERSION$3 = "8f73e1515e2fe09097e6618181bf923a";
386
- function validate$3(obj, path = 'EngagementSignalFilterGroupRepresentation') {
385
+ const VERSION$4 = "8f73e1515e2fe09097e6618181bf923a";
386
+ function validate$4(obj, path = 'EngagementSignalFilterGroupRepresentation') {
387
387
  const v_error = (() => {
388
388
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
389
389
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -408,10 +408,10 @@ function validate$3(obj, path = 'EngagementSignalFilterGroupRepresentation') {
408
408
  })();
409
409
  return v_error === undefined ? null : v_error;
410
410
  }
411
- const select$7 = function EngagementSignalFilterGroupRepresentationSelect() {
411
+ const select$a = function EngagementSignalFilterGroupRepresentationSelect() {
412
412
  return {
413
413
  kind: 'Fragment',
414
- version: VERSION$3,
414
+ version: VERSION$4,
415
415
  private: [],
416
416
  selections: [
417
417
  {
@@ -426,7 +426,7 @@ const select$7 = function EngagementSignalFilterGroupRepresentationSelect() {
426
426
  ]
427
427
  };
428
428
  };
429
- function equals$3(existing, incoming) {
429
+ function equals$4(existing, incoming) {
430
430
  const existing_conjunctiveOperator = existing.conjunctiveOperator;
431
431
  const incoming_conjunctiveOperator = incoming.conjunctiveOperator;
432
432
  if (!(existing_conjunctiveOperator === incoming_conjunctiveOperator)) {
@@ -445,16 +445,85 @@ function equals$3(existing, incoming) {
445
445
  return true;
446
446
  }
447
447
 
448
- const VERSION$2 = "610f115936516819ec203253177a4ea1";
449
- function validate$2(obj, path = 'EngagementSignalRateMetricRepresentation') {
448
+ const VERSION$3 = "0005de97d1fcbbc963014cd633384ca4";
449
+ function validate$3(obj, path = 'EngagementSignalMetricFieldRepresentation') {
450
+ const v_error = (() => {
451
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
452
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
453
+ }
454
+ const obj_engagementSignalMetricName = obj.engagementSignalMetricName;
455
+ const path_engagementSignalMetricName = path + '.engagementSignalMetricName';
456
+ if (typeof obj_engagementSignalMetricName !== 'string') {
457
+ return new TypeError('Expected "string" but received "' + typeof obj_engagementSignalMetricName + '" (at "' + path_engagementSignalMetricName + '")');
458
+ }
459
+ const obj_engagementSignalName = obj.engagementSignalName;
460
+ const path_engagementSignalName = path + '.engagementSignalName';
461
+ if (typeof obj_engagementSignalName !== 'string') {
462
+ return new TypeError('Expected "string" but received "' + typeof obj_engagementSignalName + '" (at "' + path_engagementSignalName + '")');
463
+ }
464
+ })();
465
+ return v_error === undefined ? null : v_error;
466
+ }
467
+ const select$9 = function EngagementSignalMetricFieldRepresentationSelect() {
468
+ return {
469
+ kind: 'Fragment',
470
+ version: VERSION$3,
471
+ private: [],
472
+ selections: [
473
+ {
474
+ name: 'engagementSignalMetricName',
475
+ kind: 'Scalar'
476
+ },
477
+ {
478
+ name: 'engagementSignalName',
479
+ kind: 'Scalar'
480
+ }
481
+ ]
482
+ };
483
+ };
484
+ function equals$3(existing, incoming) {
485
+ const existing_engagementSignalMetricName = existing.engagementSignalMetricName;
486
+ const incoming_engagementSignalMetricName = incoming.engagementSignalMetricName;
487
+ if (!(existing_engagementSignalMetricName === incoming_engagementSignalMetricName)) {
488
+ return false;
489
+ }
490
+ const existing_engagementSignalName = existing.engagementSignalName;
491
+ const incoming_engagementSignalName = incoming.engagementSignalName;
492
+ if (!(existing_engagementSignalName === incoming_engagementSignalName)) {
493
+ return false;
494
+ }
495
+ return true;
496
+ }
497
+
498
+ const TTL$2 = 6000;
499
+ const VERSION$2 = "d1b71af9a537281a97d72bbef89beb62";
500
+ function validate$2(obj, path = 'EngagementSignalCompoundMetricRepresentation') {
450
501
  const v_error = (() => {
451
502
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
452
503
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
453
504
  }
454
505
  const obj_denominatorMetric = obj.denominatorMetric;
455
506
  const path_denominatorMetric = path + '.denominatorMetric';
456
- if (typeof obj_denominatorMetric !== 'string') {
457
- return new TypeError('Expected "string" but received "' + typeof obj_denominatorMetric + '" (at "' + path_denominatorMetric + '")');
507
+ const referencepath_denominatorMetricValidationError = validate$3(obj_denominatorMetric, path_denominatorMetric);
508
+ if (referencepath_denominatorMetricValidationError !== null) {
509
+ let message = 'Object doesn\'t match EngagementSignalMetricFieldRepresentation (at "' + path_denominatorMetric + '")\n';
510
+ message += referencepath_denominatorMetricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
511
+ return new TypeError(message);
512
+ }
513
+ const obj_description = obj.description;
514
+ const path_description = path + '.description';
515
+ if (typeof obj_description !== 'string') {
516
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
517
+ }
518
+ const obj_id = obj.id;
519
+ const path_id = path + '.id';
520
+ if (typeof obj_id !== 'string') {
521
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
522
+ }
523
+ const obj_label = obj.label;
524
+ const path_label = path + '.label';
525
+ if (typeof obj_label !== 'string') {
526
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
458
527
  }
459
528
  const obj_name = obj.name;
460
529
  const path_name = path + '.name';
@@ -463,13 +532,35 @@ function validate$2(obj, path = 'EngagementSignalRateMetricRepresentation') {
463
532
  }
464
533
  const obj_numeratorMetric = obj.numeratorMetric;
465
534
  const path_numeratorMetric = path + '.numeratorMetric';
466
- if (typeof obj_numeratorMetric !== 'string') {
467
- return new TypeError('Expected "string" but received "' + typeof obj_numeratorMetric + '" (at "' + path_numeratorMetric + '")');
535
+ const referencepath_numeratorMetricValidationError = validate$3(obj_numeratorMetric, path_numeratorMetric);
536
+ if (referencepath_numeratorMetricValidationError !== null) {
537
+ let message = 'Object doesn\'t match EngagementSignalMetricFieldRepresentation (at "' + path_numeratorMetric + '")\n';
538
+ message += referencepath_numeratorMetricValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
539
+ return new TypeError(message);
540
+ }
541
+ const obj_operator = obj.operator;
542
+ const path_operator = path + '.operator';
543
+ if (typeof obj_operator !== 'string') {
544
+ return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
468
545
  }
469
546
  })();
470
547
  return v_error === undefined ? null : v_error;
471
548
  }
472
- const select$6 = function EngagementSignalRateMetricRepresentationSelect() {
549
+ const RepresentationType$2 = 'EngagementSignalCompoundMetricRepresentation';
550
+ function keyBuilder$b(luvio, config) {
551
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
552
+ }
553
+ function keyBuilderFromType$2(luvio, object) {
554
+ const keyParams = {
555
+ id: object.id
556
+ };
557
+ return keyBuilder$b(luvio, keyParams);
558
+ }
559
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
560
+ return input;
561
+ }
562
+ const select$8 = function EngagementSignalCompoundMetricRepresentationSelect() {
563
+ const { selections: EngagementSignalMetricFieldRepresentation__selections, opaque: EngagementSignalMetricFieldRepresentation__opaque, } = select$9();
473
564
  return {
474
565
  kind: 'Fragment',
475
566
  version: VERSION$2,
@@ -477,6 +568,19 @@ const select$6 = function EngagementSignalRateMetricRepresentationSelect() {
477
568
  selections: [
478
569
  {
479
570
  name: 'denominatorMetric',
571
+ kind: 'Object',
572
+ selections: EngagementSignalMetricFieldRepresentation__selections
573
+ },
574
+ {
575
+ name: 'description',
576
+ kind: 'Scalar'
577
+ },
578
+ {
579
+ name: 'id',
580
+ kind: 'Scalar'
581
+ },
582
+ {
583
+ name: 'label',
480
584
  kind: 'Scalar'
481
585
  },
482
586
  {
@@ -485,15 +589,30 @@ const select$6 = function EngagementSignalRateMetricRepresentationSelect() {
485
589
  },
486
590
  {
487
591
  name: 'numeratorMetric',
592
+ kind: 'Object',
593
+ selections: EngagementSignalMetricFieldRepresentation__selections
594
+ },
595
+ {
596
+ name: 'operator',
488
597
  kind: 'Scalar'
489
598
  }
490
599
  ]
491
600
  };
492
601
  };
493
602
  function equals$2(existing, incoming) {
494
- const existing_denominatorMetric = existing.denominatorMetric;
495
- const incoming_denominatorMetric = incoming.denominatorMetric;
496
- if (!(existing_denominatorMetric === incoming_denominatorMetric)) {
603
+ const existing_description = existing.description;
604
+ const incoming_description = incoming.description;
605
+ if (!(existing_description === incoming_description)) {
606
+ return false;
607
+ }
608
+ const existing_id = existing.id;
609
+ const incoming_id = incoming.id;
610
+ if (!(existing_id === incoming_id)) {
611
+ return false;
612
+ }
613
+ const existing_label = existing.label;
614
+ const incoming_label = incoming.label;
615
+ if (!(existing_label === incoming_label)) {
497
616
  return false;
498
617
  }
499
618
  const existing_name = existing.name;
@@ -501,13 +620,44 @@ function equals$2(existing, incoming) {
501
620
  if (!(existing_name === incoming_name)) {
502
621
  return false;
503
622
  }
623
+ const existing_operator = existing.operator;
624
+ const incoming_operator = incoming.operator;
625
+ if (!(existing_operator === incoming_operator)) {
626
+ return false;
627
+ }
628
+ const existing_denominatorMetric = existing.denominatorMetric;
629
+ const incoming_denominatorMetric = incoming.denominatorMetric;
630
+ if (!(equals$3(existing_denominatorMetric, incoming_denominatorMetric))) {
631
+ return false;
632
+ }
504
633
  const existing_numeratorMetric = existing.numeratorMetric;
505
634
  const incoming_numeratorMetric = incoming.numeratorMetric;
506
- if (!(existing_numeratorMetric === incoming_numeratorMetric)) {
635
+ if (!(equals$3(existing_numeratorMetric, incoming_numeratorMetric))) {
507
636
  return false;
508
637
  }
509
638
  return true;
510
639
  }
640
+ const ingest$2 = function EngagementSignalCompoundMetricRepresentationIngest(input, path, luvio, store, timestamp) {
641
+ if (process.env.NODE_ENV !== 'production') {
642
+ const validateError = validate$2(input);
643
+ if (validateError !== null) {
644
+ throw validateError;
645
+ }
646
+ }
647
+ const key = keyBuilderFromType$2(luvio, input);
648
+ const ttlToUse = TTL$2;
649
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "engmt-config", VERSION$2, RepresentationType$2, equals$2);
650
+ return createLink(key);
651
+ };
652
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
653
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
654
+ const rootKey = keyBuilderFromType$2(luvio, input);
655
+ rootKeySet.set(rootKey, {
656
+ namespace: keyPrefix,
657
+ representationName: RepresentationType$2,
658
+ mergeable: false
659
+ });
660
+ }
511
661
 
512
662
  const TTL$1 = 6000;
513
663
  const VERSION$1 = "3c26e95c8929ac6685f9de88dab642ed";
@@ -540,19 +690,19 @@ function validate$1(obj, path = 'EngagementSignalMetricRepresentation') {
540
690
  return v_error === undefined ? null : v_error;
541
691
  }
542
692
  const RepresentationType$1 = 'EngagementSignalMetricRepresentation';
543
- function keyBuilder$7(luvio, config) {
693
+ function keyBuilder$a(luvio, config) {
544
694
  return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
545
695
  }
546
696
  function keyBuilderFromType$1(luvio, object) {
547
697
  const keyParams = {
548
698
  id: object.id
549
699
  };
550
- return keyBuilder$7(luvio, keyParams);
700
+ return keyBuilder$a(luvio, keyParams);
551
701
  }
552
702
  function normalize$1(input, existing, path, luvio, store, timestamp) {
553
703
  return input;
554
704
  }
555
- const select$5 = function EngagementSignalMetricRepresentationSelect() {
705
+ const select$7 = function EngagementSignalMetricRepresentationSelect() {
556
706
  return {
557
707
  kind: 'Fragment',
558
708
  version: VERSION$1,
@@ -624,7 +774,7 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
624
774
  }
625
775
 
626
776
  const TTL = 6000;
627
- const VERSION = "51ab05624909776e32bd8951d3494228";
777
+ const VERSION = "642992246eac3845fc5e2e16f2fe8021";
628
778
  function validate(obj, path = 'EngagementSignalRepresentation') {
629
779
  const v_error = (() => {
630
780
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -637,6 +787,20 @@ function validate(obj, path = 'EngagementSignalRepresentation') {
637
787
  return new TypeError('Expected "defined" but received "' + typeof obj_catalogIdField + '" (at "' + path_catalogIdField + '")');
638
788
  }
639
789
  }
790
+ if (obj.compoundMetrics !== undefined) {
791
+ const obj_compoundMetrics = obj.compoundMetrics;
792
+ const path_compoundMetrics = path + '.compoundMetrics';
793
+ if (!ArrayIsArray(obj_compoundMetrics)) {
794
+ return new TypeError('Expected "array" but received "' + typeof obj_compoundMetrics + '" (at "' + path_compoundMetrics + '")');
795
+ }
796
+ for (let i = 0; i < obj_compoundMetrics.length; i++) {
797
+ const obj_compoundMetrics_item = obj_compoundMetrics[i];
798
+ const path_compoundMetrics_item = path_compoundMetrics + '[' + i + ']';
799
+ if (typeof obj_compoundMetrics_item !== 'object') {
800
+ return new TypeError('Expected "object" but received "' + typeof obj_compoundMetrics_item + '" (at "' + path_compoundMetrics_item + '")');
801
+ }
802
+ }
803
+ }
640
804
  const obj_dataSpaceName = obj.dataSpaceName;
641
805
  const path_dataSpaceName = path + '.dataSpaceName';
642
806
  if (typeof obj_dataSpaceName !== 'string') {
@@ -665,7 +829,7 @@ function validate(obj, path = 'EngagementSignalRepresentation') {
665
829
  for (let i = 0; i < obj_filterGroups.length; i++) {
666
830
  const obj_filterGroups_item = obj_filterGroups[i];
667
831
  const path_filterGroups_item = path_filterGroups + '[' + i + ']';
668
- const referencepath_filterGroups_itemValidationError = validate$3(obj_filterGroups_item, path_filterGroups_item);
832
+ const referencepath_filterGroups_itemValidationError = validate$4(obj_filterGroups_item, path_filterGroups_item);
669
833
  if (referencepath_filterGroups_itemValidationError !== null) {
670
834
  let message = 'Object doesn\'t match EngagementSignalFilterGroupRepresentation (at "' + path_filterGroups_item + '")\n';
671
835
  message += referencepath_filterGroups_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -707,23 +871,6 @@ function validate(obj, path = 'EngagementSignalRepresentation') {
707
871
  if (typeof obj_objectName !== 'string') {
708
872
  return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
709
873
  }
710
- if (obj.rateMetrics !== undefined) {
711
- const obj_rateMetrics = obj.rateMetrics;
712
- const path_rateMetrics = path + '.rateMetrics';
713
- if (!ArrayIsArray(obj_rateMetrics)) {
714
- return new TypeError('Expected "array" but received "' + typeof obj_rateMetrics + '" (at "' + path_rateMetrics + '")');
715
- }
716
- for (let i = 0; i < obj_rateMetrics.length; i++) {
717
- const obj_rateMetrics_item = obj_rateMetrics[i];
718
- const path_rateMetrics_item = path_rateMetrics + '[' + i + ']';
719
- const referencepath_rateMetrics_itemValidationError = validate$2(obj_rateMetrics_item, path_rateMetrics_item);
720
- if (referencepath_rateMetrics_itemValidationError !== null) {
721
- let message = 'Object doesn\'t match EngagementSignalRateMetricRepresentation (at "' + path_rateMetrics_item + '")\n';
722
- message += referencepath_rateMetrics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
723
- return new TypeError(message);
724
- }
725
- }
726
- }
727
874
  const obj_timestampField = obj.timestampField;
728
875
  const path_timestampField = path + '.timestampField';
729
876
  if (obj_timestampField === undefined) {
@@ -743,16 +890,34 @@ function validate(obj, path = 'EngagementSignalRepresentation') {
743
890
  return v_error === undefined ? null : v_error;
744
891
  }
745
892
  const RepresentationType = 'EngagementSignalRepresentation';
746
- function keyBuilder$6(luvio, config) {
893
+ function keyBuilder$9(luvio, config) {
747
894
  return keyPrefix + '::' + RepresentationType + ':' + config.id;
748
895
  }
749
896
  function keyBuilderFromType(luvio, object) {
750
897
  const keyParams = {
751
898
  id: object.id
752
899
  };
753
- return keyBuilder$6(luvio, keyParams);
900
+ return keyBuilder$9(luvio, keyParams);
754
901
  }
755
902
  function normalize(input, existing, path, luvio, store, timestamp) {
903
+ const input_compoundMetrics = input.compoundMetrics;
904
+ const input_compoundMetrics_id = path.fullPath + '__compoundMetrics';
905
+ if (input_compoundMetrics !== undefined) {
906
+ for (let i = 0; i < input_compoundMetrics.length; i++) {
907
+ const input_compoundMetrics_item = input_compoundMetrics[i];
908
+ let input_compoundMetrics_item_id = input_compoundMetrics_id + '__' + i;
909
+ input_compoundMetrics[i] = ingest$2(input_compoundMetrics_item, {
910
+ fullPath: input_compoundMetrics_item_id,
911
+ propertyName: i,
912
+ parent: {
913
+ data: input,
914
+ key: path.fullPath,
915
+ existing: existing,
916
+ },
917
+ ttl: path.ttl
918
+ }, luvio, store, timestamp);
919
+ }
920
+ }
756
921
  const input_metrics = input.metrics;
757
922
  const input_metrics_id = path.fullPath + '__metrics';
758
923
  if (input_metrics !== undefined) {
@@ -773,9 +938,8 @@ function normalize(input, existing, path, luvio, store, timestamp) {
773
938
  }
774
939
  return input;
775
940
  }
776
- const select$4 = function EngagementSignalRepresentationSelect() {
777
- const { selections: EngagementSignalFilterGroupRepresentation__selections, opaque: EngagementSignalFilterGroupRepresentation__opaque, } = select$7();
778
- const { selections: EngagementSignalRateMetricRepresentation__selections, opaque: EngagementSignalRateMetricRepresentation__opaque, } = select$6();
941
+ const select$6 = function EngagementSignalRepresentationSelect() {
942
+ const { selections: EngagementSignalFilterGroupRepresentation__selections, opaque: EngagementSignalFilterGroupRepresentation__opaque, } = select$a();
779
943
  return {
780
944
  kind: 'Fragment',
781
945
  version: VERSION,
@@ -786,6 +950,13 @@ const select$4 = function EngagementSignalRepresentationSelect() {
786
950
  kind: 'Object',
787
951
  // any
788
952
  },
953
+ {
954
+ name: 'compoundMetrics',
955
+ kind: 'Link',
956
+ plural: true,
957
+ required: false,
958
+ fragment: select$8()
959
+ },
789
960
  {
790
961
  name: 'dataSpaceName',
791
962
  kind: 'Scalar'
@@ -815,7 +986,7 @@ const select$4 = function EngagementSignalRepresentationSelect() {
815
986
  kind: 'Link',
816
987
  plural: true,
817
988
  required: false,
818
- fragment: select$5()
989
+ fragment: select$7()
819
990
  },
820
991
  {
821
992
  name: 'name',
@@ -825,13 +996,6 @@ const select$4 = function EngagementSignalRepresentationSelect() {
825
996
  name: 'objectName',
826
997
  kind: 'Scalar'
827
998
  },
828
- {
829
- name: 'rateMetrics',
830
- kind: 'Object',
831
- plural: true,
832
- selections: EngagementSignalRateMetricRepresentation__selections,
833
- required: false
834
- },
835
999
  {
836
1000
  name: 'timestampField',
837
1001
  kind: 'Object',
@@ -889,6 +1053,24 @@ function equals(existing, incoming) {
889
1053
  return false;
890
1054
  }
891
1055
  }
1056
+ const existing_compoundMetrics = existing.compoundMetrics;
1057
+ const incoming_compoundMetrics = incoming.compoundMetrics;
1058
+ // if at least one of these optionals is defined
1059
+ if (existing_compoundMetrics !== undefined || incoming_compoundMetrics !== undefined) {
1060
+ // if one of these is not defined we know the other is defined and therefore
1061
+ // not equal
1062
+ if (existing_compoundMetrics === undefined || incoming_compoundMetrics === undefined) {
1063
+ return false;
1064
+ }
1065
+ const equals_compoundMetrics_items = equalsArray(existing_compoundMetrics, incoming_compoundMetrics, (existing_compoundMetrics_item, incoming_compoundMetrics_item) => {
1066
+ if (!(existing_compoundMetrics_item.__ref === incoming_compoundMetrics_item.__ref)) {
1067
+ return false;
1068
+ }
1069
+ });
1070
+ if (equals_compoundMetrics_items === false) {
1071
+ return false;
1072
+ }
1073
+ }
892
1074
  const existing_distinctFields = existing.distinctFields;
893
1075
  const incoming_distinctFields = incoming.distinctFields;
894
1076
  // if at least one of these optionals is defined
@@ -917,7 +1099,7 @@ function equals(existing, incoming) {
917
1099
  return false;
918
1100
  }
919
1101
  const equals_filterGroups_items = equalsArray(existing_filterGroups, incoming_filterGroups, (existing_filterGroups_item, incoming_filterGroups_item) => {
920
- if (!(equals$3(existing_filterGroups_item, incoming_filterGroups_item))) {
1102
+ if (!(equals$4(existing_filterGroups_item, incoming_filterGroups_item))) {
921
1103
  return false;
922
1104
  }
923
1105
  });
@@ -943,24 +1125,6 @@ function equals(existing, incoming) {
943
1125
  return false;
944
1126
  }
945
1127
  }
946
- const existing_rateMetrics = existing.rateMetrics;
947
- const incoming_rateMetrics = incoming.rateMetrics;
948
- // if at least one of these optionals is defined
949
- if (existing_rateMetrics !== undefined || incoming_rateMetrics !== undefined) {
950
- // if one of these is not defined we know the other is defined and therefore
951
- // not equal
952
- if (existing_rateMetrics === undefined || incoming_rateMetrics === undefined) {
953
- return false;
954
- }
955
- const equals_rateMetrics_items = equalsArray(existing_rateMetrics, incoming_rateMetrics, (existing_rateMetrics_item, incoming_rateMetrics_item) => {
956
- if (!(equals$2(existing_rateMetrics_item, incoming_rateMetrics_item))) {
957
- return false;
958
- }
959
- });
960
- if (equals_rateMetrics_items === false) {
961
- return false;
962
- }
963
- }
964
1128
  const existing_timestampField = existing.timestampField;
965
1129
  const incoming_timestampField = incoming.timestampField;
966
1130
  if (JSONStringify(incoming_timestampField) !== JSONStringify(existing_timestampField)) {
@@ -998,6 +1162,12 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
998
1162
  representationName: RepresentationType,
999
1163
  mergeable: false
1000
1164
  });
1165
+ if (input.compoundMetrics !== undefined) {
1166
+ const input_compoundMetrics_length = input.compoundMetrics.length;
1167
+ for (let i = 0; i < input_compoundMetrics_length; i++) {
1168
+ getTypeCacheKeys$2(rootKeySet, luvio, input.compoundMetrics[i]);
1169
+ }
1170
+ }
1001
1171
  if (input.metrics !== undefined) {
1002
1172
  const input_metrics_length = input.metrics.length;
1003
1173
  for (let i = 0; i < input_metrics_length; i++) {
@@ -1006,19 +1176,19 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1006
1176
  }
1007
1177
  }
1008
1178
 
1009
- function select$3(luvio, params) {
1010
- return select$4();
1179
+ function select$5(luvio, params) {
1180
+ return select$6();
1011
1181
  }
1012
- function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
1182
+ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
1013
1183
  getTypeCacheKeys(storeKeyMap, luvio, response);
1014
1184
  }
1015
- function ingestSuccess$3(luvio, resourceParams, response) {
1185
+ function ingestSuccess$5(luvio, resourceParams, response) {
1016
1186
  const { body } = response;
1017
1187
  const key = keyBuilderFromType(luvio, body);
1018
1188
  luvio.storeIngest(key, ingest, body);
1019
1189
  const snapshot = luvio.storeLookup({
1020
1190
  recordId: key,
1021
- node: select$3(),
1191
+ node: select$5(),
1022
1192
  variables: {},
1023
1193
  });
1024
1194
  if (process.env.NODE_ENV !== 'production') {
@@ -1029,7 +1199,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
1029
1199
  deepFreeze(snapshot.data);
1030
1200
  return snapshot;
1031
1201
  }
1032
- function createResourceRequest$5(config) {
1202
+ function createResourceRequest$8(config) {
1033
1203
  const headers = {};
1034
1204
  return {
1035
1205
  baseUri: '/services/data/v64.0',
@@ -1043,9 +1213,10 @@ function createResourceRequest$5(config) {
1043
1213
  };
1044
1214
  }
1045
1215
 
1046
- const adapterName$5 = 'createEngagementSignal';
1216
+ const adapterName$8 = 'createEngagementSignal';
1047
1217
  const createEngagementSignal_ConfigPropertyMetadata = [
1048
1218
  generateParamConfigMetadata('catalogIdField', false, 2 /* Body */, 4 /* Unsupported */),
1219
+ generateParamConfigMetadata('compoundMetrics', false, 2 /* Body */, 4 /* Unsupported */, true),
1049
1220
  generateParamConfigMetadata('dataSpaceName', true, 2 /* Body */, 0 /* String */),
1050
1221
  generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
1051
1222
  generateParamConfigMetadata('distinctFields', false, 2 /* Body */, 4 /* Unsupported */, true),
@@ -1054,18 +1225,26 @@ const createEngagementSignal_ConfigPropertyMetadata = [
1054
1225
  generateParamConfigMetadata('metrics', false, 2 /* Body */, 4 /* Unsupported */, true),
1055
1226
  generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
1056
1227
  generateParamConfigMetadata('objectName', true, 2 /* Body */, 0 /* String */),
1057
- generateParamConfigMetadata('rateMetrics', false, 2 /* Body */, 4 /* Unsupported */, true),
1058
1228
  generateParamConfigMetadata('timestampField', true, 2 /* Body */, 4 /* Unsupported */),
1059
1229
  generateParamConfigMetadata('uniqueIdentifier', true, 2 /* Body */, 4 /* Unsupported */),
1060
1230
  generateParamConfigMetadata('userIdField', true, 2 /* Body */, 4 /* Unsupported */),
1061
1231
  ];
1062
- const createEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createEngagementSignal_ConfigPropertyMetadata);
1063
- const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(createEngagementSignal_ConfigPropertyMetadata);
1064
- function typeCheckConfig$5(untrustedConfig) {
1232
+ const createEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, createEngagementSignal_ConfigPropertyMetadata);
1233
+ const createResourceParams$8 = /*#__PURE__*/ createResourceParams$a(createEngagementSignal_ConfigPropertyMetadata);
1234
+ function typeCheckConfig$8(untrustedConfig) {
1065
1235
  const config = {};
1066
- typeCheckConfig$7(untrustedConfig, config, createEngagementSignal_ConfigPropertyMetadata);
1236
+ typeCheckConfig$a(untrustedConfig, config, createEngagementSignal_ConfigPropertyMetadata);
1067
1237
  const untrustedConfig_catalogIdField = untrustedConfig.catalogIdField;
1068
1238
  config.catalogIdField = untrustedConfig_catalogIdField;
1239
+ const untrustedConfig_compoundMetrics = untrustedConfig.compoundMetrics;
1240
+ if (ArrayIsArray$1(untrustedConfig_compoundMetrics)) {
1241
+ const untrustedConfig_compoundMetrics_array = [];
1242
+ for (let i = 0, arrayLength = untrustedConfig_compoundMetrics.length; i < arrayLength; i++) {
1243
+ const untrustedConfig_compoundMetrics_item = untrustedConfig_compoundMetrics[i];
1244
+ untrustedConfig_compoundMetrics_array.push(untrustedConfig_compoundMetrics_item);
1245
+ }
1246
+ config.compoundMetrics = untrustedConfig_compoundMetrics_array;
1247
+ }
1069
1248
  const untrustedConfig_distinctFields = untrustedConfig.distinctFields;
1070
1249
  if (ArrayIsArray$1(untrustedConfig_distinctFields)) {
1071
1250
  const untrustedConfig_distinctFields_array = [];
@@ -1093,15 +1272,6 @@ function typeCheckConfig$5(untrustedConfig) {
1093
1272
  }
1094
1273
  config.metrics = untrustedConfig_metrics_array;
1095
1274
  }
1096
- const untrustedConfig_rateMetrics = untrustedConfig.rateMetrics;
1097
- if (ArrayIsArray$1(untrustedConfig_rateMetrics)) {
1098
- const untrustedConfig_rateMetrics_array = [];
1099
- for (let i = 0, arrayLength = untrustedConfig_rateMetrics.length; i < arrayLength; i++) {
1100
- const untrustedConfig_rateMetrics_item = untrustedConfig_rateMetrics[i];
1101
- untrustedConfig_rateMetrics_array.push(untrustedConfig_rateMetrics_item);
1102
- }
1103
- config.rateMetrics = untrustedConfig_rateMetrics_array;
1104
- }
1105
1275
  const untrustedConfig_timestampField = untrustedConfig.timestampField;
1106
1276
  config.timestampField = untrustedConfig_timestampField;
1107
1277
  const untrustedConfig_uniqueIdentifier = untrustedConfig.uniqueIdentifier;
@@ -1110,30 +1280,30 @@ function typeCheckConfig$5(untrustedConfig) {
1110
1280
  config.userIdField = untrustedConfig_userIdField;
1111
1281
  return config;
1112
1282
  }
1113
- function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1283
+ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
1114
1284
  if (!untrustedIsObject(untrustedConfig)) {
1115
1285
  return null;
1116
1286
  }
1117
1287
  if (process.env.NODE_ENV !== 'production') {
1118
1288
  validateConfig(untrustedConfig, configPropertyNames);
1119
1289
  }
1120
- const config = typeCheckConfig$5(untrustedConfig);
1290
+ const config = typeCheckConfig$8(untrustedConfig);
1121
1291
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1122
1292
  return null;
1123
1293
  }
1124
1294
  return config;
1125
1295
  }
1126
- function buildNetworkSnapshot$5(luvio, config, options) {
1127
- const resourceParams = createResourceParams$5(config);
1128
- const request = createResourceRequest$5(resourceParams);
1296
+ function buildNetworkSnapshot$8(luvio, config, options) {
1297
+ const resourceParams = createResourceParams$8(config);
1298
+ const request = createResourceRequest$8(resourceParams);
1129
1299
  return luvio.dispatchResourceRequest(request, options)
1130
1300
  .then((response) => {
1131
1301
  return luvio.handleSuccessResponse(() => {
1132
- const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1302
+ const snapshot = ingestSuccess$5(luvio, resourceParams, response);
1133
1303
  return luvio.storeBroadcast().then(() => snapshot);
1134
1304
  }, () => {
1135
1305
  const cache = new StoreKeyMap();
1136
- getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1306
+ getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
1137
1307
  return cache;
1138
1308
  });
1139
1309
  }, (response) => {
@@ -1143,33 +1313,33 @@ function buildNetworkSnapshot$5(luvio, config, options) {
1143
1313
  }
1144
1314
  const createEngagementSignalAdapterFactory = (luvio) => {
1145
1315
  return function createEngagementSignal(untrustedConfig) {
1146
- const config = validateAdapterConfig$5(untrustedConfig, createEngagementSignal_ConfigPropertyNames);
1316
+ const config = validateAdapterConfig$8(untrustedConfig, createEngagementSignal_ConfigPropertyNames);
1147
1317
  // Invalid or incomplete config
1148
1318
  if (config === null) {
1149
1319
  throw new Error('Invalid config for "createEngagementSignal"');
1150
1320
  }
1151
- return buildNetworkSnapshot$5(luvio, config);
1321
+ return buildNetworkSnapshot$8(luvio, config);
1152
1322
  };
1153
1323
  };
1154
1324
 
1155
- function keyBuilder$5(luvio, params) {
1156
- return keyBuilder$6(luvio, {
1325
+ function keyBuilder$8(luvio, params) {
1326
+ return keyBuilder$9(luvio, {
1157
1327
  id: params.urlParams.engagementSignalId
1158
1328
  });
1159
1329
  }
1160
- function getResponseCacheKeys$4(cacheKeyMap, luvio, resourceParams) {
1161
- const key = keyBuilder$5(luvio, resourceParams);
1330
+ function getResponseCacheKeys$7(cacheKeyMap, luvio, resourceParams) {
1331
+ const key = keyBuilder$8(luvio, resourceParams);
1162
1332
  cacheKeyMap.set(key, {
1163
1333
  namespace: keyPrefix,
1164
1334
  representationName: RepresentationType,
1165
1335
  mergeable: false
1166
1336
  });
1167
1337
  }
1168
- function evictSuccess$1(luvio, resourceParams) {
1169
- const key = keyBuilder$5(luvio, resourceParams);
1338
+ function evictSuccess$2(luvio, resourceParams) {
1339
+ const key = keyBuilder$8(luvio, resourceParams);
1170
1340
  luvio.storeEvict(key);
1171
1341
  }
1172
- function createResourceRequest$4(config) {
1342
+ function createResourceRequest$7(config) {
1173
1343
  const headers = {};
1174
1344
  return {
1175
1345
  baseUri: '/services/data/v64.0',
@@ -1183,41 +1353,41 @@ function createResourceRequest$4(config) {
1183
1353
  };
1184
1354
  }
1185
1355
 
1186
- const adapterName$4 = 'deleteEngagementSignal';
1356
+ const adapterName$7 = 'deleteEngagementSignal';
1187
1357
  const deleteEngagementSignal_ConfigPropertyMetadata = [
1188
1358
  generateParamConfigMetadata('engagementSignalId', true, 0 /* UrlParameter */, 0 /* String */),
1189
1359
  ];
1190
- const deleteEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, deleteEngagementSignal_ConfigPropertyMetadata);
1191
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(deleteEngagementSignal_ConfigPropertyMetadata);
1192
- function typeCheckConfig$4(untrustedConfig) {
1360
+ const deleteEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, deleteEngagementSignal_ConfigPropertyMetadata);
1361
+ const createResourceParams$7 = /*#__PURE__*/ createResourceParams$a(deleteEngagementSignal_ConfigPropertyMetadata);
1362
+ function typeCheckConfig$7(untrustedConfig) {
1193
1363
  const config = {};
1194
- typeCheckConfig$7(untrustedConfig, config, deleteEngagementSignal_ConfigPropertyMetadata);
1364
+ typeCheckConfig$a(untrustedConfig, config, deleteEngagementSignal_ConfigPropertyMetadata);
1195
1365
  return config;
1196
1366
  }
1197
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1367
+ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
1198
1368
  if (!untrustedIsObject(untrustedConfig)) {
1199
1369
  return null;
1200
1370
  }
1201
1371
  if (process.env.NODE_ENV !== 'production') {
1202
1372
  validateConfig(untrustedConfig, configPropertyNames);
1203
1373
  }
1204
- const config = typeCheckConfig$4(untrustedConfig);
1374
+ const config = typeCheckConfig$7(untrustedConfig);
1205
1375
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1206
1376
  return null;
1207
1377
  }
1208
1378
  return config;
1209
1379
  }
1210
- function buildNetworkSnapshot$4(luvio, config, options) {
1211
- const resourceParams = createResourceParams$4(config);
1212
- const request = createResourceRequest$4(resourceParams);
1380
+ function buildNetworkSnapshot$7(luvio, config, options) {
1381
+ const resourceParams = createResourceParams$7(config);
1382
+ const request = createResourceRequest$7(resourceParams);
1213
1383
  return luvio.dispatchResourceRequest(request, options)
1214
1384
  .then(() => {
1215
1385
  return luvio.handleSuccessResponse(() => {
1216
- evictSuccess$1(luvio, resourceParams);
1386
+ evictSuccess$2(luvio, resourceParams);
1217
1387
  return luvio.storeBroadcast();
1218
1388
  }, () => {
1219
1389
  const cache = new StoreKeyMap();
1220
- getResponseCacheKeys$4(cache, luvio, resourceParams);
1390
+ getResponseCacheKeys$7(cache, luvio, resourceParams);
1221
1391
  return cache;
1222
1392
  });
1223
1393
  }, (response) => {
@@ -1227,33 +1397,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
1227
1397
  }
1228
1398
  const deleteEngagementSignalAdapterFactory = (luvio) => {
1229
1399
  return function engmtConfigdeleteEngagementSignal(untrustedConfig) {
1230
- const config = validateAdapterConfig$4(untrustedConfig, deleteEngagementSignal_ConfigPropertyNames);
1400
+ const config = validateAdapterConfig$7(untrustedConfig, deleteEngagementSignal_ConfigPropertyNames);
1231
1401
  // Invalid or incomplete config
1232
1402
  if (config === null) {
1233
- throw new Error(`Invalid config for "${adapterName$4}"`);
1403
+ throw new Error(`Invalid config for "${adapterName$7}"`);
1234
1404
  }
1235
- return buildNetworkSnapshot$4(luvio, config);
1405
+ return buildNetworkSnapshot$7(luvio, config);
1236
1406
  };
1237
1407
  };
1238
1408
 
1239
- function select$2(luvio, params) {
1240
- return select$4();
1409
+ function select$4(luvio, params) {
1410
+ return select$6();
1241
1411
  }
1242
- function keyBuilder$4(luvio, params) {
1243
- return keyBuilder$6(luvio, {
1412
+ function keyBuilder$7(luvio, params) {
1413
+ return keyBuilder$9(luvio, {
1244
1414
  id: params.urlParams.engagementSignalId
1245
1415
  });
1246
1416
  }
1247
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1417
+ function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
1248
1418
  getTypeCacheKeys(storeKeyMap, luvio, response);
1249
1419
  }
1250
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1420
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1251
1421
  const { body } = response;
1252
- const key = keyBuilder$4(luvio, resourceParams);
1422
+ const key = keyBuilder$7(luvio, resourceParams);
1253
1423
  luvio.storeIngest(key, ingest, body);
1254
1424
  const snapshot = luvio.storeLookup({
1255
1425
  recordId: key,
1256
- node: select$2(),
1426
+ node: select$4(),
1257
1427
  variables: {},
1258
1428
  }, snapshotRefresh);
1259
1429
  if (process.env.NODE_ENV !== 'production') {
@@ -1264,8 +1434,8 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1264
1434
  deepFreeze(snapshot.data);
1265
1435
  return snapshot;
1266
1436
  }
1267
- function ingestError$1(luvio, params, error, snapshotRefresh) {
1268
- const key = keyBuilder$4(luvio, params);
1437
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1438
+ const key = keyBuilder$7(luvio, params);
1269
1439
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1270
1440
  const storeMetadataParams = {
1271
1441
  ttl: TTL,
@@ -1276,7 +1446,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
1276
1446
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1277
1447
  return errorSnapshot;
1278
1448
  }
1279
- function createResourceRequest$3(config) {
1449
+ function createResourceRequest$6(config) {
1280
1450
  const headers = {};
1281
1451
  return {
1282
1452
  baseUri: '/services/data/v64.0',
@@ -1290,105 +1460,105 @@ function createResourceRequest$3(config) {
1290
1460
  };
1291
1461
  }
1292
1462
 
1293
- const adapterName$3 = 'getEngagementSignal';
1463
+ const adapterName$6 = 'getEngagementSignal';
1294
1464
  const getEngagementSignal_ConfigPropertyMetadata = [
1295
1465
  generateParamConfigMetadata('engagementSignalId', true, 0 /* UrlParameter */, 0 /* String */),
1296
1466
  ];
1297
- const getEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getEngagementSignal_ConfigPropertyMetadata);
1298
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getEngagementSignal_ConfigPropertyMetadata);
1299
- function keyBuilder$3(luvio, config) {
1300
- const resourceParams = createResourceParams$3(config);
1301
- return keyBuilder$4(luvio, resourceParams);
1467
+ const getEngagementSignal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getEngagementSignal_ConfigPropertyMetadata);
1468
+ const createResourceParams$6 = /*#__PURE__*/ createResourceParams$a(getEngagementSignal_ConfigPropertyMetadata);
1469
+ function keyBuilder$6(luvio, config) {
1470
+ const resourceParams = createResourceParams$6(config);
1471
+ return keyBuilder$7(luvio, resourceParams);
1302
1472
  }
1303
- function typeCheckConfig$3(untrustedConfig) {
1473
+ function typeCheckConfig$6(untrustedConfig) {
1304
1474
  const config = {};
1305
- typeCheckConfig$7(untrustedConfig, config, getEngagementSignal_ConfigPropertyMetadata);
1475
+ typeCheckConfig$a(untrustedConfig, config, getEngagementSignal_ConfigPropertyMetadata);
1306
1476
  return config;
1307
1477
  }
1308
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1478
+ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
1309
1479
  if (!untrustedIsObject(untrustedConfig)) {
1310
1480
  return null;
1311
1481
  }
1312
1482
  if (process.env.NODE_ENV !== 'production') {
1313
1483
  validateConfig(untrustedConfig, configPropertyNames);
1314
1484
  }
1315
- const config = typeCheckConfig$3(untrustedConfig);
1485
+ const config = typeCheckConfig$6(untrustedConfig);
1316
1486
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1317
1487
  return null;
1318
1488
  }
1319
1489
  return config;
1320
1490
  }
1321
- function adapterFragment$1(luvio, config) {
1322
- createResourceParams$3(config);
1323
- return select$2();
1491
+ function adapterFragment$2(luvio, config) {
1492
+ createResourceParams$6(config);
1493
+ return select$4();
1324
1494
  }
1325
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1326
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1495
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1496
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1327
1497
  config,
1328
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1498
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1329
1499
  });
1330
1500
  return luvio.storeBroadcast().then(() => snapshot);
1331
1501
  }
1332
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
1333
- const snapshot = ingestError$1(luvio, resourceParams, response, {
1502
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1503
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1334
1504
  config,
1335
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1505
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1336
1506
  });
1337
1507
  return luvio.storeBroadcast().then(() => snapshot);
1338
1508
  }
1339
- function buildNetworkSnapshot$3(luvio, config, options) {
1340
- const resourceParams = createResourceParams$3(config);
1341
- const request = createResourceRequest$3(resourceParams);
1509
+ function buildNetworkSnapshot$6(luvio, config, options) {
1510
+ const resourceParams = createResourceParams$6(config);
1511
+ const request = createResourceRequest$6(resourceParams);
1342
1512
  return luvio.dispatchResourceRequest(request, options)
1343
1513
  .then((response) => {
1344
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1514
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1345
1515
  const cache = new StoreKeyMap();
1346
- getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1516
+ getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
1347
1517
  return cache;
1348
1518
  });
1349
1519
  }, (response) => {
1350
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1520
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1351
1521
  });
1352
1522
  }
1353
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1354
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1523
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1524
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
1355
1525
  }
1356
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1526
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1357
1527
  const { luvio, config } = context;
1358
1528
  const selector = {
1359
- recordId: keyBuilder$3(luvio, config),
1360
- node: adapterFragment$1(luvio, config),
1529
+ recordId: keyBuilder$6(luvio, config),
1530
+ node: adapterFragment$2(luvio, config),
1361
1531
  variables: {},
1362
1532
  };
1363
1533
  const cacheSnapshot = storeLookup(selector, {
1364
1534
  config,
1365
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1535
+ resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
1366
1536
  });
1367
1537
  return cacheSnapshot;
1368
1538
  }
1369
1539
  const getEngagementSignalAdapterFactory = (luvio) => function engmtConfig__getEngagementSignal(untrustedConfig, requestContext) {
1370
- const config = validateAdapterConfig$3(untrustedConfig, getEngagementSignal_ConfigPropertyNames);
1540
+ const config = validateAdapterConfig$6(untrustedConfig, getEngagementSignal_ConfigPropertyNames);
1371
1541
  // Invalid or incomplete config
1372
1542
  if (config === null) {
1373
1543
  return null;
1374
1544
  }
1375
1545
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1376
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1546
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1377
1547
  };
1378
1548
 
1379
- function select$1(luvio, params) {
1380
- return select$5();
1549
+ function select$3(luvio, params) {
1550
+ return select$7();
1381
1551
  }
1382
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1552
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
1383
1553
  getTypeCacheKeys$1(storeKeyMap, luvio, response);
1384
1554
  }
1385
- function ingestSuccess$1(luvio, resourceParams, response) {
1555
+ function ingestSuccess$3(luvio, resourceParams, response) {
1386
1556
  const { body } = response;
1387
1557
  const key = keyBuilderFromType$1(luvio, body);
1388
1558
  luvio.storeIngest(key, ingest$1, body);
1389
1559
  const snapshot = luvio.storeLookup({
1390
1560
  recordId: key,
1391
- node: select$1(),
1561
+ node: select$3(),
1392
1562
  variables: {},
1393
1563
  });
1394
1564
  if (process.env.NODE_ENV !== 'production') {
@@ -1399,7 +1569,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
1399
1569
  deepFreeze(snapshot.data);
1400
1570
  return snapshot;
1401
1571
  }
1402
- function createResourceRequest$2(config) {
1572
+ function createResourceRequest$5(config) {
1403
1573
  const headers = {};
1404
1574
  return {
1405
1575
  baseUri: '/services/data/v64.0',
@@ -1413,7 +1583,7 @@ function createResourceRequest$2(config) {
1413
1583
  };
1414
1584
  }
1415
1585
 
1416
- const adapterName$2 = 'createEngagementSignalMetric';
1586
+ const adapterName$5 = 'createEngagementSignalMetric';
1417
1587
  const createEngagementSignalMetric_ConfigPropertyMetadata = [
1418
1588
  generateParamConfigMetadata('engagementSignalId', true, 0 /* UrlParameter */, 0 /* String */),
1419
1589
  generateParamConfigMetadata('aggregateFunction', true, 2 /* Body */, 0 /* String */),
@@ -1422,39 +1592,39 @@ const createEngagementSignalMetric_ConfigPropertyMetadata = [
1422
1592
  generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
1423
1593
  generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
1424
1594
  ];
1425
- const createEngagementSignalMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createEngagementSignalMetric_ConfigPropertyMetadata);
1426
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(createEngagementSignalMetric_ConfigPropertyMetadata);
1427
- function typeCheckConfig$2(untrustedConfig) {
1595
+ const createEngagementSignalMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createEngagementSignalMetric_ConfigPropertyMetadata);
1596
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$a(createEngagementSignalMetric_ConfigPropertyMetadata);
1597
+ function typeCheckConfig$5(untrustedConfig) {
1428
1598
  const config = {};
1429
- typeCheckConfig$7(untrustedConfig, config, createEngagementSignalMetric_ConfigPropertyMetadata);
1599
+ typeCheckConfig$a(untrustedConfig, config, createEngagementSignalMetric_ConfigPropertyMetadata);
1430
1600
  const untrustedConfig_field = untrustedConfig.field;
1431
1601
  config.field = untrustedConfig_field;
1432
1602
  return config;
1433
1603
  }
1434
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1604
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
1435
1605
  if (!untrustedIsObject(untrustedConfig)) {
1436
1606
  return null;
1437
1607
  }
1438
1608
  if (process.env.NODE_ENV !== 'production') {
1439
1609
  validateConfig(untrustedConfig, configPropertyNames);
1440
1610
  }
1441
- const config = typeCheckConfig$2(untrustedConfig);
1611
+ const config = typeCheckConfig$5(untrustedConfig);
1442
1612
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
1443
1613
  return null;
1444
1614
  }
1445
1615
  return config;
1446
1616
  }
1447
- function buildNetworkSnapshot$2(luvio, config, options) {
1448
- const resourceParams = createResourceParams$2(config);
1449
- const request = createResourceRequest$2(resourceParams);
1617
+ function buildNetworkSnapshot$5(luvio, config, options) {
1618
+ const resourceParams = createResourceParams$5(config);
1619
+ const request = createResourceRequest$5(resourceParams);
1450
1620
  return luvio.dispatchResourceRequest(request, options)
1451
1621
  .then((response) => {
1452
1622
  return luvio.handleSuccessResponse(() => {
1453
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1623
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
1454
1624
  return luvio.storeBroadcast().then(() => snapshot);
1455
1625
  }, () => {
1456
1626
  const cache = new StoreKeyMap();
1457
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1627
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
1458
1628
  return cache;
1459
1629
  });
1460
1630
  }, (response) => {
@@ -1464,33 +1634,132 @@ function buildNetworkSnapshot$2(luvio, config, options) {
1464
1634
  }
1465
1635
  const createEngagementSignalMetricAdapterFactory = (luvio) => {
1466
1636
  return function createEngagementSignalMetric(untrustedConfig) {
1467
- const config = validateAdapterConfig$2(untrustedConfig, createEngagementSignalMetric_ConfigPropertyNames);
1637
+ const config = validateAdapterConfig$5(untrustedConfig, createEngagementSignalMetric_ConfigPropertyNames);
1468
1638
  // Invalid or incomplete config
1469
1639
  if (config === null) {
1470
1640
  throw new Error('Invalid config for "createEngagementSignalMetric"');
1471
1641
  }
1472
- return buildNetworkSnapshot$2(luvio, config);
1642
+ return buildNetworkSnapshot$5(luvio, config);
1473
1643
  };
1474
1644
  };
1475
1645
 
1476
- function keyBuilder$2(luvio, params) {
1477
- return keyBuilder$7(luvio, {
1646
+ function select$2(luvio, params) {
1647
+ return select$8();
1648
+ }
1649
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1650
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1651
+ }
1652
+ function ingestSuccess$2(luvio, resourceParams, response) {
1653
+ const { body } = response;
1654
+ const key = keyBuilderFromType$2(luvio, body);
1655
+ luvio.storeIngest(key, ingest$2, body);
1656
+ const snapshot = luvio.storeLookup({
1657
+ recordId: key,
1658
+ node: select$2(),
1659
+ variables: {},
1660
+ });
1661
+ if (process.env.NODE_ENV !== 'production') {
1662
+ if (snapshot.state !== 'Fulfilled') {
1663
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1664
+ }
1665
+ }
1666
+ deepFreeze(snapshot.data);
1667
+ return snapshot;
1668
+ }
1669
+ function createResourceRequest$4(config) {
1670
+ const headers = {};
1671
+ return {
1672
+ baseUri: '/services/data/v64.0',
1673
+ basePath: '/personalization/compound-metrics',
1674
+ method: 'post',
1675
+ body: config.body,
1676
+ urlParams: {},
1677
+ queryParams: {},
1678
+ headers,
1679
+ priority: 'normal',
1680
+ };
1681
+ }
1682
+
1683
+ const adapterName$4 = 'createCompoundMetric';
1684
+ const createCompoundMetric_ConfigPropertyMetadata = [
1685
+ generateParamConfigMetadata('denominatorMetric', true, 2 /* Body */, 4 /* Unsupported */),
1686
+ generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
1687
+ generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
1688
+ generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
1689
+ generateParamConfigMetadata('numeratorMetric', true, 2 /* Body */, 4 /* Unsupported */),
1690
+ generateParamConfigMetadata('operator', true, 2 /* Body */, 0 /* String */),
1691
+ ];
1692
+ const createCompoundMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createCompoundMetric_ConfigPropertyMetadata);
1693
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$a(createCompoundMetric_ConfigPropertyMetadata);
1694
+ function typeCheckConfig$4(untrustedConfig) {
1695
+ const config = {};
1696
+ typeCheckConfig$a(untrustedConfig, config, createCompoundMetric_ConfigPropertyMetadata);
1697
+ const untrustedConfig_denominatorMetric = untrustedConfig.denominatorMetric;
1698
+ config.denominatorMetric = untrustedConfig_denominatorMetric;
1699
+ const untrustedConfig_numeratorMetric = untrustedConfig.numeratorMetric;
1700
+ config.numeratorMetric = untrustedConfig_numeratorMetric;
1701
+ return config;
1702
+ }
1703
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1704
+ if (!untrustedIsObject(untrustedConfig)) {
1705
+ return null;
1706
+ }
1707
+ if (process.env.NODE_ENV !== 'production') {
1708
+ validateConfig(untrustedConfig, configPropertyNames);
1709
+ }
1710
+ const config = typeCheckConfig$4(untrustedConfig);
1711
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1712
+ return null;
1713
+ }
1714
+ return config;
1715
+ }
1716
+ function buildNetworkSnapshot$4(luvio, config, options) {
1717
+ const resourceParams = createResourceParams$4(config);
1718
+ const request = createResourceRequest$4(resourceParams);
1719
+ return luvio.dispatchResourceRequest(request, options)
1720
+ .then((response) => {
1721
+ return luvio.handleSuccessResponse(() => {
1722
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
1723
+ return luvio.storeBroadcast().then(() => snapshot);
1724
+ }, () => {
1725
+ const cache = new StoreKeyMap();
1726
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1727
+ return cache;
1728
+ });
1729
+ }, (response) => {
1730
+ deepFreeze(response);
1731
+ throw response;
1732
+ });
1733
+ }
1734
+ const createCompoundMetricAdapterFactory = (luvio) => {
1735
+ return function createCompoundMetric(untrustedConfig) {
1736
+ const config = validateAdapterConfig$4(untrustedConfig, createCompoundMetric_ConfigPropertyNames);
1737
+ // Invalid or incomplete config
1738
+ if (config === null) {
1739
+ throw new Error('Invalid config for "createCompoundMetric"');
1740
+ }
1741
+ return buildNetworkSnapshot$4(luvio, config);
1742
+ };
1743
+ };
1744
+
1745
+ function keyBuilder$5(luvio, params) {
1746
+ return keyBuilder$a(luvio, {
1478
1747
  id: params.urlParams.engagementSignalMetricId
1479
1748
  });
1480
1749
  }
1481
- function getResponseCacheKeys$1(cacheKeyMap, luvio, resourceParams) {
1482
- const key = keyBuilder$2(luvio, resourceParams);
1750
+ function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
1751
+ const key = keyBuilder$5(luvio, resourceParams);
1483
1752
  cacheKeyMap.set(key, {
1484
1753
  namespace: keyPrefix,
1485
1754
  representationName: RepresentationType$1,
1486
1755
  mergeable: false
1487
1756
  });
1488
1757
  }
1489
- function evictSuccess(luvio, resourceParams) {
1490
- const key = keyBuilder$2(luvio, resourceParams);
1758
+ function evictSuccess$1(luvio, resourceParams) {
1759
+ const key = keyBuilder$5(luvio, resourceParams);
1491
1760
  luvio.storeEvict(key);
1492
1761
  }
1493
- function createResourceRequest$1(config) {
1762
+ function createResourceRequest$3(config) {
1494
1763
  const headers = {};
1495
1764
  return {
1496
1765
  baseUri: '/services/data/v64.0',
@@ -1504,16 +1773,241 @@ function createResourceRequest$1(config) {
1504
1773
  };
1505
1774
  }
1506
1775
 
1507
- const adapterName$1 = 'deleteEngagementSignalMetric';
1776
+ const adapterName$3 = 'deleteEngagementSignalMetric';
1508
1777
  const deleteEngagementSignalMetric_ConfigPropertyMetadata = [
1509
1778
  generateParamConfigMetadata('engagementSignalId', true, 0 /* UrlParameter */, 0 /* String */),
1510
1779
  generateParamConfigMetadata('engagementSignalMetricId', true, 0 /* UrlParameter */, 0 /* String */),
1511
1780
  ];
1512
- const deleteEngagementSignalMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, deleteEngagementSignalMetric_ConfigPropertyMetadata);
1513
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(deleteEngagementSignalMetric_ConfigPropertyMetadata);
1781
+ const deleteEngagementSignalMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteEngagementSignalMetric_ConfigPropertyMetadata);
1782
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$a(deleteEngagementSignalMetric_ConfigPropertyMetadata);
1783
+ function typeCheckConfig$3(untrustedConfig) {
1784
+ const config = {};
1785
+ typeCheckConfig$a(untrustedConfig, config, deleteEngagementSignalMetric_ConfigPropertyMetadata);
1786
+ return config;
1787
+ }
1788
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1789
+ if (!untrustedIsObject(untrustedConfig)) {
1790
+ return null;
1791
+ }
1792
+ if (process.env.NODE_ENV !== 'production') {
1793
+ validateConfig(untrustedConfig, configPropertyNames);
1794
+ }
1795
+ const config = typeCheckConfig$3(untrustedConfig);
1796
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1797
+ return null;
1798
+ }
1799
+ return config;
1800
+ }
1801
+ function buildNetworkSnapshot$3(luvio, config, options) {
1802
+ const resourceParams = createResourceParams$3(config);
1803
+ const request = createResourceRequest$3(resourceParams);
1804
+ return luvio.dispatchResourceRequest(request, options)
1805
+ .then(() => {
1806
+ return luvio.handleSuccessResponse(() => {
1807
+ evictSuccess$1(luvio, resourceParams);
1808
+ return luvio.storeBroadcast();
1809
+ }, () => {
1810
+ const cache = new StoreKeyMap();
1811
+ getResponseCacheKeys$3(cache, luvio, resourceParams);
1812
+ return cache;
1813
+ });
1814
+ }, (response) => {
1815
+ deepFreeze(response);
1816
+ throw response;
1817
+ });
1818
+ }
1819
+ const deleteEngagementSignalMetricAdapterFactory = (luvio) => {
1820
+ return function engmtConfigdeleteEngagementSignalMetric(untrustedConfig) {
1821
+ const config = validateAdapterConfig$3(untrustedConfig, deleteEngagementSignalMetric_ConfigPropertyNames);
1822
+ // Invalid or incomplete config
1823
+ if (config === null) {
1824
+ throw new Error(`Invalid config for "${adapterName$3}"`);
1825
+ }
1826
+ return buildNetworkSnapshot$3(luvio, config);
1827
+ };
1828
+ };
1829
+
1830
+ function select$1(luvio, params) {
1831
+ return select$7();
1832
+ }
1833
+ function keyBuilder$4(luvio, params) {
1834
+ return keyBuilder$a(luvio, {
1835
+ id: params.urlParams.engagementSignalMetricId
1836
+ });
1837
+ }
1838
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1839
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
1840
+ }
1841
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
1842
+ const { body } = response;
1843
+ const key = keyBuilder$4(luvio, resourceParams);
1844
+ luvio.storeIngest(key, ingest$1, body);
1845
+ const snapshot = luvio.storeLookup({
1846
+ recordId: key,
1847
+ node: select$1(),
1848
+ variables: {},
1849
+ }, snapshotRefresh);
1850
+ if (process.env.NODE_ENV !== 'production') {
1851
+ if (snapshot.state !== 'Fulfilled') {
1852
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1853
+ }
1854
+ }
1855
+ deepFreeze(snapshot.data);
1856
+ return snapshot;
1857
+ }
1858
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1859
+ const key = keyBuilder$4(luvio, params);
1860
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1861
+ const storeMetadataParams = {
1862
+ ttl: TTL$1,
1863
+ namespace: keyPrefix,
1864
+ version: VERSION$1,
1865
+ representationName: RepresentationType$1
1866
+ };
1867
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1868
+ return errorSnapshot;
1869
+ }
1870
+ function createResourceRequest$2(config) {
1871
+ const headers = {};
1872
+ return {
1873
+ baseUri: '/services/data/v64.0',
1874
+ basePath: '/personalization/engagement-signals/' + config.urlParams.engagementSignalId + '/metrics/' + config.urlParams.engagementSignalMetricId + '',
1875
+ method: 'get',
1876
+ body: null,
1877
+ urlParams: config.urlParams,
1878
+ queryParams: {},
1879
+ headers,
1880
+ priority: 'normal',
1881
+ };
1882
+ }
1883
+
1884
+ const adapterName$2 = 'getEngagementSignalMetric';
1885
+ const getEngagementSignalMetric_ConfigPropertyMetadata = [
1886
+ generateParamConfigMetadata('engagementSignalId', true, 0 /* UrlParameter */, 0 /* String */),
1887
+ generateParamConfigMetadata('engagementSignalMetricId', true, 0 /* UrlParameter */, 0 /* String */),
1888
+ ];
1889
+ const getEngagementSignalMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getEngagementSignalMetric_ConfigPropertyMetadata);
1890
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$a(getEngagementSignalMetric_ConfigPropertyMetadata);
1891
+ function keyBuilder$3(luvio, config) {
1892
+ const resourceParams = createResourceParams$2(config);
1893
+ return keyBuilder$4(luvio, resourceParams);
1894
+ }
1895
+ function typeCheckConfig$2(untrustedConfig) {
1896
+ const config = {};
1897
+ typeCheckConfig$a(untrustedConfig, config, getEngagementSignalMetric_ConfigPropertyMetadata);
1898
+ return config;
1899
+ }
1900
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1901
+ if (!untrustedIsObject(untrustedConfig)) {
1902
+ return null;
1903
+ }
1904
+ if (process.env.NODE_ENV !== 'production') {
1905
+ validateConfig(untrustedConfig, configPropertyNames);
1906
+ }
1907
+ const config = typeCheckConfig$2(untrustedConfig);
1908
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1909
+ return null;
1910
+ }
1911
+ return config;
1912
+ }
1913
+ function adapterFragment$1(luvio, config) {
1914
+ createResourceParams$2(config);
1915
+ return select$1();
1916
+ }
1917
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1918
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
1919
+ config,
1920
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1921
+ });
1922
+ return luvio.storeBroadcast().then(() => snapshot);
1923
+ }
1924
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1925
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1926
+ config,
1927
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1928
+ });
1929
+ return luvio.storeBroadcast().then(() => snapshot);
1930
+ }
1931
+ function buildNetworkSnapshot$2(luvio, config, options) {
1932
+ const resourceParams = createResourceParams$2(config);
1933
+ const request = createResourceRequest$2(resourceParams);
1934
+ return luvio.dispatchResourceRequest(request, options)
1935
+ .then((response) => {
1936
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1937
+ const cache = new StoreKeyMap();
1938
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1939
+ return cache;
1940
+ });
1941
+ }, (response) => {
1942
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1943
+ });
1944
+ }
1945
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1946
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1947
+ }
1948
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1949
+ const { luvio, config } = context;
1950
+ const selector = {
1951
+ recordId: keyBuilder$3(luvio, config),
1952
+ node: adapterFragment$1(luvio, config),
1953
+ variables: {},
1954
+ };
1955
+ const cacheSnapshot = storeLookup(selector, {
1956
+ config,
1957
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1958
+ });
1959
+ return cacheSnapshot;
1960
+ }
1961
+ const getEngagementSignalMetricAdapterFactory = (luvio) => function engmtConfig__getEngagementSignalMetric(untrustedConfig, requestContext) {
1962
+ const config = validateAdapterConfig$2(untrustedConfig, getEngagementSignalMetric_ConfigPropertyNames);
1963
+ // Invalid or incomplete config
1964
+ if (config === null) {
1965
+ return null;
1966
+ }
1967
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1968
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1969
+ };
1970
+
1971
+ function keyBuilder$2(luvio, params) {
1972
+ return keyBuilder$b(luvio, {
1973
+ id: params.urlParams.compoundMetricIdOrName
1974
+ });
1975
+ }
1976
+ function getResponseCacheKeys$1(cacheKeyMap, luvio, resourceParams) {
1977
+ const key = keyBuilder$2(luvio, resourceParams);
1978
+ cacheKeyMap.set(key, {
1979
+ namespace: keyPrefix,
1980
+ representationName: RepresentationType$2,
1981
+ mergeable: false
1982
+ });
1983
+ }
1984
+ function evictSuccess(luvio, resourceParams) {
1985
+ const key = keyBuilder$2(luvio, resourceParams);
1986
+ luvio.storeEvict(key);
1987
+ }
1988
+ function createResourceRequest$1(config) {
1989
+ const headers = {};
1990
+ return {
1991
+ baseUri: '/services/data/v64.0',
1992
+ basePath: '/personalization/compound-metrics/' + config.urlParams.compoundMetricIdOrName + '',
1993
+ method: 'delete',
1994
+ body: null,
1995
+ urlParams: config.urlParams,
1996
+ queryParams: {},
1997
+ headers,
1998
+ priority: 'normal',
1999
+ };
2000
+ }
2001
+
2002
+ const adapterName$1 = 'deleteCompoundMetric';
2003
+ const deleteCompoundMetric_ConfigPropertyMetadata = [
2004
+ generateParamConfigMetadata('compoundMetricIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
2005
+ ];
2006
+ const deleteCompoundMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, deleteCompoundMetric_ConfigPropertyMetadata);
2007
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$a(deleteCompoundMetric_ConfigPropertyMetadata);
1514
2008
  function typeCheckConfig$1(untrustedConfig) {
1515
2009
  const config = {};
1516
- typeCheckConfig$7(untrustedConfig, config, deleteEngagementSignalMetric_ConfigPropertyMetadata);
2010
+ typeCheckConfig$a(untrustedConfig, config, deleteCompoundMetric_ConfigPropertyMetadata);
1517
2011
  return config;
1518
2012
  }
1519
2013
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -1547,9 +2041,9 @@ function buildNetworkSnapshot$1(luvio, config, options) {
1547
2041
  throw response;
1548
2042
  });
1549
2043
  }
1550
- const deleteEngagementSignalMetricAdapterFactory = (luvio) => {
1551
- return function engmtConfigdeleteEngagementSignalMetric(untrustedConfig) {
1552
- const config = validateAdapterConfig$1(untrustedConfig, deleteEngagementSignalMetric_ConfigPropertyNames);
2044
+ const deleteCompoundMetricAdapterFactory = (luvio) => {
2045
+ return function engmtConfigdeleteCompoundMetric(untrustedConfig) {
2046
+ const config = validateAdapterConfig$1(untrustedConfig, deleteCompoundMetric_ConfigPropertyNames);
1553
2047
  // Invalid or incomplete config
1554
2048
  if (config === null) {
1555
2049
  throw new Error(`Invalid config for "${adapterName$1}"`);
@@ -1559,20 +2053,20 @@ const deleteEngagementSignalMetricAdapterFactory = (luvio) => {
1559
2053
  };
1560
2054
 
1561
2055
  function select(luvio, params) {
1562
- return select$5();
2056
+ return select$8();
1563
2057
  }
1564
2058
  function keyBuilder$1(luvio, params) {
1565
- return keyBuilder$7(luvio, {
1566
- id: params.urlParams.engagementSignalMetricId
2059
+ return keyBuilder$b(luvio, {
2060
+ id: params.urlParams.compoundMetricIdOrName
1567
2061
  });
1568
2062
  }
1569
2063
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1570
- getTypeCacheKeys$1(storeKeyMap, luvio, response);
2064
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1571
2065
  }
1572
2066
  function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1573
2067
  const { body } = response;
1574
2068
  const key = keyBuilder$1(luvio, resourceParams);
1575
- luvio.storeIngest(key, ingest$1, body);
2069
+ luvio.storeIngest(key, ingest$2, body);
1576
2070
  const snapshot = luvio.storeLookup({
1577
2071
  recordId: key,
1578
2072
  node: select(),
@@ -1590,10 +2084,10 @@ function ingestError(luvio, params, error, snapshotRefresh) {
1590
2084
  const key = keyBuilder$1(luvio, params);
1591
2085
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1592
2086
  const storeMetadataParams = {
1593
- ttl: TTL$1,
2087
+ ttl: TTL$2,
1594
2088
  namespace: keyPrefix,
1595
- version: VERSION$1,
1596
- representationName: RepresentationType$1
2089
+ version: VERSION$2,
2090
+ representationName: RepresentationType$2
1597
2091
  };
1598
2092
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1599
2093
  return errorSnapshot;
@@ -1602,7 +2096,7 @@ function createResourceRequest(config) {
1602
2096
  const headers = {};
1603
2097
  return {
1604
2098
  baseUri: '/services/data/v64.0',
1605
- basePath: '/personalization/engagement-signals/' + config.urlParams.engagementSignalId + '/metrics/' + config.urlParams.engagementSignalMetricId + '',
2099
+ basePath: '/personalization/compound-metrics/' + config.urlParams.compoundMetricIdOrName + '',
1606
2100
  method: 'get',
1607
2101
  body: null,
1608
2102
  urlParams: config.urlParams,
@@ -1612,20 +2106,19 @@ function createResourceRequest(config) {
1612
2106
  };
1613
2107
  }
1614
2108
 
1615
- const adapterName = 'getEngagementSignalMetric';
1616
- const getEngagementSignalMetric_ConfigPropertyMetadata = [
1617
- generateParamConfigMetadata('engagementSignalId', true, 0 /* UrlParameter */, 0 /* String */),
1618
- generateParamConfigMetadata('engagementSignalMetricId', true, 0 /* UrlParameter */, 0 /* String */),
2109
+ const adapterName = 'getCompoundMetric';
2110
+ const getCompoundMetric_ConfigPropertyMetadata = [
2111
+ generateParamConfigMetadata('compoundMetricIdOrName', true, 0 /* UrlParameter */, 0 /* String */),
1619
2112
  ];
1620
- const getEngagementSignalMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getEngagementSignalMetric_ConfigPropertyMetadata);
1621
- const createResourceParams = /*#__PURE__*/ createResourceParams$7(getEngagementSignalMetric_ConfigPropertyMetadata);
2113
+ const getCompoundMetric_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getCompoundMetric_ConfigPropertyMetadata);
2114
+ const createResourceParams = /*#__PURE__*/ createResourceParams$a(getCompoundMetric_ConfigPropertyMetadata);
1622
2115
  function keyBuilder(luvio, config) {
1623
2116
  const resourceParams = createResourceParams(config);
1624
2117
  return keyBuilder$1(luvio, resourceParams);
1625
2118
  }
1626
2119
  function typeCheckConfig(untrustedConfig) {
1627
2120
  const config = {};
1628
- typeCheckConfig$7(untrustedConfig, config, getEngagementSignalMetric_ConfigPropertyMetadata);
2121
+ typeCheckConfig$a(untrustedConfig, config, getCompoundMetric_ConfigPropertyMetadata);
1629
2122
  return config;
1630
2123
  }
1631
2124
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -1674,7 +2167,7 @@ function buildNetworkSnapshot(luvio, config, options) {
1674
2167
  });
1675
2168
  }
1676
2169
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1677
- return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
2170
+ return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1678
2171
  }
1679
2172
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
1680
2173
  const { luvio, config } = context;
@@ -1689,8 +2182,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1689
2182
  });
1690
2183
  return cacheSnapshot;
1691
2184
  }
1692
- const getEngagementSignalMetricAdapterFactory = (luvio) => function engmtConfig__getEngagementSignalMetric(untrustedConfig, requestContext) {
1693
- const config = validateAdapterConfig(untrustedConfig, getEngagementSignalMetric_ConfigPropertyNames);
2185
+ const getCompoundMetricAdapterFactory = (luvio) => function engmtConfig__getCompoundMetric(untrustedConfig, requestContext) {
2186
+ const config = validateAdapterConfig(untrustedConfig, getCompoundMetric_ConfigPropertyNames);
1694
2187
  // Invalid or incomplete config
1695
2188
  if (config === null) {
1696
2189
  return null;
@@ -1699,4 +2192,4 @@ const getEngagementSignalMetricAdapterFactory = (luvio) => function engmtConfig_
1699
2192
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1700
2193
  };
1701
2194
 
1702
- export { createEngagementSignalAdapterFactory, createEngagementSignalMetricAdapterFactory, deleteEngagementSignalAdapterFactory, deleteEngagementSignalMetricAdapterFactory, getEngagementSignalAdapterFactory, getEngagementSignalMetricAdapterFactory, getEngagementSignalsAdapterFactory };
2195
+ export { createCompoundMetricAdapterFactory, createEngagementSignalAdapterFactory, createEngagementSignalMetricAdapterFactory, deleteCompoundMetricAdapterFactory, deleteEngagementSignalAdapterFactory, deleteEngagementSignalMetricAdapterFactory, getCompoundMetricAdapterFactory, getEngagementSignalAdapterFactory, getEngagementSignalMetricAdapterFactory, getEngagementSignalsAdapterFactory };