@salesforce/lds-adapters-industries-contextrules 1.293.0 → 1.294.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.
@@ -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$2, typeCheckConfig as typeCheckConfig$5, StoreKeyMap, createResourceParams as createResourceParams$5 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$6, StoreKeyMap, createResourceParams as createResourceParams$6 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -79,9 +79,9 @@ function createLink(ref) {
79
79
  };
80
80
  }
81
81
 
82
- const TTL$2 = 1000;
83
- const VERSION$2 = "4b7bef672f4996c31c5a042959681437";
84
- function validate$3(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentation') {
82
+ const TTL$3 = 1000;
83
+ const VERSION$3 = "4b7bef672f4996c31c5a042959681437";
84
+ function validate$6(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentation') {
85
85
  const v_error = (() => {
86
86
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
87
87
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -128,58 +128,58 @@ function validate$3(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentation'
128
128
  })();
129
129
  return v_error === undefined ? null : v_error;
130
130
  }
131
- const RepresentationType$2 = 'RuleLibraryTagMappingsReadOutputRepresentation';
132
- function keyBuilder$6(luvio, config) {
133
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
131
+ const RepresentationType$3 = 'RuleLibraryTagMappingsReadOutputRepresentation';
132
+ function keyBuilder$9(luvio, config) {
133
+ return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
134
134
  }
135
- function keyBuilderFromType$1(luvio, object) {
135
+ function keyBuilderFromType$2(luvio, object) {
136
136
  const keyParams = {
137
137
  id: object.mappingName
138
138
  };
139
- return keyBuilder$6(luvio, keyParams);
139
+ return keyBuilder$9(luvio, keyParams);
140
140
  }
141
- function normalize$2(input, existing, path, luvio, store, timestamp) {
141
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
142
142
  return input;
143
143
  }
144
- const select$6 = function RuleLibraryTagMappingsReadOutputRepresentationSelect() {
144
+ const select$8 = function RuleLibraryTagMappingsReadOutputRepresentationSelect() {
145
145
  return {
146
146
  kind: 'Fragment',
147
- version: VERSION$2,
147
+ version: VERSION$3,
148
148
  private: [],
149
149
  opaque: true
150
150
  };
151
151
  };
152
- function equals$2(existing, incoming) {
152
+ function equals$3(existing, incoming) {
153
153
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
154
154
  return false;
155
155
  }
156
156
  return true;
157
157
  }
158
- const ingest$2 = function RuleLibraryTagMappingsReadOutputRepresentationIngest(input, path, luvio, store, timestamp) {
158
+ const ingest$3 = function RuleLibraryTagMappingsReadOutputRepresentationIngest(input, path, luvio, store, timestamp) {
159
159
  if (process.env.NODE_ENV !== 'production') {
160
- const validateError = validate$3(input);
160
+ const validateError = validate$6(input);
161
161
  if (validateError !== null) {
162
162
  throw validateError;
163
163
  }
164
164
  }
165
- const key = keyBuilderFromType$1(luvio, input);
166
- const ttlToUse = TTL$2;
167
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "contextrules", VERSION$2, RepresentationType$2, equals$2);
165
+ const key = keyBuilderFromType$2(luvio, input);
166
+ const ttlToUse = TTL$3;
167
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "contextrules", VERSION$3, RepresentationType$3, equals$3);
168
168
  return createLink(key);
169
169
  };
170
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
170
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
171
171
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
172
- const rootKey = keyBuilderFromType$1(luvio, input);
172
+ const rootKey = keyBuilderFromType$2(luvio, input);
173
173
  rootKeySet.set(rootKey, {
174
174
  namespace: keyPrefix,
175
- representationName: RepresentationType$2,
175
+ representationName: RepresentationType$3,
176
176
  mergeable: false
177
177
  });
178
178
  }
179
179
 
180
- const TTL$1 = 1000;
181
- const VERSION$1 = "3839d94c828e170861b071d1d1fe5292";
182
- function validate$2(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationList') {
180
+ const TTL$2 = 1000;
181
+ const VERSION$2 = "3839d94c828e170861b071d1d1fe5292";
182
+ function validate$5(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationList') {
183
183
  const v_error = (() => {
184
184
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
185
185
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -192,7 +192,7 @@ function validate$2(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationL
192
192
  for (let i = 0; i < obj_ruleLibraryTagMappings.length; i++) {
193
193
  const obj_ruleLibraryTagMappings_item = obj_ruleLibraryTagMappings[i];
194
194
  const path_ruleLibraryTagMappings_item = path_ruleLibraryTagMappings + '[' + i + ']';
195
- const referencepath_ruleLibraryTagMappings_itemValidationError = validate$3(obj_ruleLibraryTagMappings_item, path_ruleLibraryTagMappings_item);
195
+ const referencepath_ruleLibraryTagMappings_itemValidationError = validate$6(obj_ruleLibraryTagMappings_item, path_ruleLibraryTagMappings_item);
196
196
  if (referencepath_ruleLibraryTagMappings_itemValidationError !== null) {
197
197
  let message = 'Object doesn\'t match RuleLibraryTagMappingsReadOutputRepresentation (at "' + path_ruleLibraryTagMappings_item + '")\n';
198
198
  message += referencepath_ruleLibraryTagMappings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -202,62 +202,62 @@ function validate$2(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationL
202
202
  })();
203
203
  return v_error === undefined ? null : v_error;
204
204
  }
205
- const RepresentationType$1 = 'RuleLibraryTagMappingsReadOutputRepresentationList';
206
- function normalize$1(input, existing, path, luvio, store, timestamp) {
205
+ const RepresentationType$2 = 'RuleLibraryTagMappingsReadOutputRepresentationList';
206
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
207
207
  return input;
208
208
  }
209
- const select$5 = function RuleLibraryTagMappingsReadOutputRepresentationListSelect() {
209
+ const select$7 = function RuleLibraryTagMappingsReadOutputRepresentationListSelect() {
210
210
  return {
211
211
  kind: 'Fragment',
212
- version: VERSION$1,
212
+ version: VERSION$2,
213
213
  private: [],
214
214
  opaque: true
215
215
  };
216
216
  };
217
- function equals$1(existing, incoming) {
217
+ function equals$2(existing, incoming) {
218
218
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
219
219
  return false;
220
220
  }
221
221
  return true;
222
222
  }
223
- const ingest$1 = function RuleLibraryTagMappingsReadOutputRepresentationListIngest(input, path, luvio, store, timestamp) {
223
+ const ingest$2 = function RuleLibraryTagMappingsReadOutputRepresentationListIngest(input, path, luvio, store, timestamp) {
224
224
  if (process.env.NODE_ENV !== 'production') {
225
- const validateError = validate$2(input);
225
+ const validateError = validate$5(input);
226
226
  if (validateError !== null) {
227
227
  throw validateError;
228
228
  }
229
229
  }
230
230
  const key = path.fullPath;
231
- const ttlToUse = TTL$1;
232
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "contextrules", VERSION$1, RepresentationType$1, equals$1);
231
+ const ttlToUse = TTL$2;
232
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "contextrules", VERSION$2, RepresentationType$2, equals$2);
233
233
  return createLink(key);
234
234
  };
235
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
235
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
236
236
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
237
237
  const rootKey = fullPathFactory();
238
238
  rootKeySet.set(rootKey, {
239
239
  namespace: keyPrefix,
240
- representationName: RepresentationType$1,
240
+ representationName: RepresentationType$2,
241
241
  mergeable: false
242
242
  });
243
243
  }
244
244
 
245
- function select$4(luvio, params) {
246
- return select$5();
245
+ function select$6(luvio, params) {
246
+ return select$7();
247
247
  }
248
- function keyBuilder$5(luvio, params) {
248
+ function keyBuilder$8(luvio, params) {
249
249
  return keyPrefix + '::RuleLibraryTagMappingsReadOutputRepresentationList:(' + 'ruleLibraryApiName:' + params.urlParams.ruleLibraryApiName + ',' + 'versionNumber:' + params.urlParams.versionNumber + ')';
250
250
  }
251
- function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
252
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
251
+ function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
252
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
253
253
  }
254
- function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
254
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
255
255
  const { body } = response;
256
- const key = keyBuilder$5(luvio, resourceParams);
257
- luvio.storeIngest(key, ingest$1, body);
256
+ const key = keyBuilder$8(luvio, resourceParams);
257
+ luvio.storeIngest(key, ingest$2, body);
258
258
  const snapshot = luvio.storeLookup({
259
259
  recordId: key,
260
- node: select$4(),
260
+ node: select$6(),
261
261
  variables: {},
262
262
  }, snapshotRefresh);
263
263
  if (process.env.NODE_ENV !== 'production') {
@@ -268,19 +268,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
268
268
  deepFreeze(snapshot.data);
269
269
  return snapshot;
270
270
  }
271
- function ingestError$1(luvio, params, error, snapshotRefresh) {
272
- const key = keyBuilder$5(luvio, params);
271
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
272
+ const key = keyBuilder$8(luvio, params);
273
273
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
274
274
  const storeMetadataParams = {
275
- ttl: TTL$1,
275
+ ttl: TTL$2,
276
276
  namespace: keyPrefix,
277
- version: VERSION$1,
278
- representationName: RepresentationType$1
277
+ version: VERSION$2,
278
+ representationName: RepresentationType$2
279
279
  };
280
280
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
281
281
  return errorSnapshot;
282
282
  }
283
- function createResourceRequest$4(config) {
283
+ function createResourceRequest$5(config) {
284
284
  const headers = {};
285
285
  return {
286
286
  baseUri: '/services/data/v62.0',
@@ -294,94 +294,94 @@ function createResourceRequest$4(config) {
294
294
  };
295
295
  }
296
296
 
297
- const adapterName$4 = 'getContextTagMappings';
297
+ const adapterName$5 = 'getContextTagMappings';
298
298
  const getContextTagMappings_ConfigPropertyMetadata = [
299
299
  generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
300
300
  generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
301
301
  ];
302
- const getContextTagMappings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getContextTagMappings_ConfigPropertyMetadata);
303
- const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getContextTagMappings_ConfigPropertyMetadata);
304
- function keyBuilder$4(luvio, config) {
305
- const resourceParams = createResourceParams$4(config);
306
- return keyBuilder$5(luvio, resourceParams);
302
+ const getContextTagMappings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getContextTagMappings_ConfigPropertyMetadata);
303
+ const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getContextTagMappings_ConfigPropertyMetadata);
304
+ function keyBuilder$7(luvio, config) {
305
+ const resourceParams = createResourceParams$5(config);
306
+ return keyBuilder$8(luvio, resourceParams);
307
307
  }
308
- function typeCheckConfig$4(untrustedConfig) {
308
+ function typeCheckConfig$5(untrustedConfig) {
309
309
  const config = {};
310
- typeCheckConfig$5(untrustedConfig, config, getContextTagMappings_ConfigPropertyMetadata);
310
+ typeCheckConfig$6(untrustedConfig, config, getContextTagMappings_ConfigPropertyMetadata);
311
311
  return config;
312
312
  }
313
- function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
313
+ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
314
314
  if (!untrustedIsObject(untrustedConfig)) {
315
315
  return null;
316
316
  }
317
317
  if (process.env.NODE_ENV !== 'production') {
318
318
  validateConfig(untrustedConfig, configPropertyNames);
319
319
  }
320
- const config = typeCheckConfig$4(untrustedConfig);
320
+ const config = typeCheckConfig$5(untrustedConfig);
321
321
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
322
322
  return null;
323
323
  }
324
324
  return config;
325
325
  }
326
- function adapterFragment$1(luvio, config) {
327
- createResourceParams$4(config);
328
- return select$4();
326
+ function adapterFragment$2(luvio, config) {
327
+ createResourceParams$5(config);
328
+ return select$6();
329
329
  }
330
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
331
- const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
330
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
331
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
332
332
  config,
333
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
333
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
334
334
  });
335
335
  return luvio.storeBroadcast().then(() => snapshot);
336
336
  }
337
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
338
- const snapshot = ingestError$1(luvio, resourceParams, response, {
337
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
338
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
339
339
  config,
340
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
340
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
341
341
  });
342
342
  return luvio.storeBroadcast().then(() => snapshot);
343
343
  }
344
- function buildNetworkSnapshot$4(luvio, config, options) {
345
- const resourceParams = createResourceParams$4(config);
346
- const request = createResourceRequest$4(resourceParams);
344
+ function buildNetworkSnapshot$5(luvio, config, options) {
345
+ const resourceParams = createResourceParams$5(config);
346
+ const request = createResourceRequest$5(resourceParams);
347
347
  return luvio.dispatchResourceRequest(request, options)
348
348
  .then((response) => {
349
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
349
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
350
350
  const cache = new StoreKeyMap();
351
- getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
351
+ getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
352
352
  return cache;
353
353
  });
354
354
  }, (response) => {
355
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
355
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
356
356
  });
357
357
  }
358
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
359
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
358
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
359
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
360
360
  }
361
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
361
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
362
362
  const { luvio, config } = context;
363
363
  const selector = {
364
- recordId: keyBuilder$4(luvio, config),
365
- node: adapterFragment$1(luvio, config),
364
+ recordId: keyBuilder$7(luvio, config),
365
+ node: adapterFragment$2(luvio, config),
366
366
  variables: {},
367
367
  };
368
368
  const cacheSnapshot = storeLookup(selector, {
369
369
  config,
370
- resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
370
+ resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
371
371
  });
372
372
  return cacheSnapshot;
373
373
  }
374
374
  const getContextTagMappingsAdapterFactory = (luvio) => function contextrules__getContextTagMappings(untrustedConfig, requestContext) {
375
- const config = validateAdapterConfig$4(untrustedConfig, getContextTagMappings_ConfigPropertyNames);
375
+ const config = validateAdapterConfig$5(untrustedConfig, getContextTagMappings_ConfigPropertyNames);
376
376
  // Invalid or incomplete config
377
377
  if (config === null) {
378
378
  return null;
379
379
  }
380
380
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
381
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
381
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
382
382
  };
383
383
 
384
- function validate$1(obj, path = 'RuleLibraryTagMappingsListWrapperRepresentation') {
384
+ function validate$4(obj, path = 'RuleLibraryTagMappingsListWrapperRepresentation') {
385
385
  const v_error = (() => {
386
386
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
387
387
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -402,9 +402,9 @@ function validate$1(obj, path = 'RuleLibraryTagMappingsListWrapperRepresentation
402
402
  return v_error === undefined ? null : v_error;
403
403
  }
404
404
 
405
- const TTL = 1000;
406
- const VERSION = "7dab3fcadff55a173b214b22d1670519";
407
- function validate(obj, path = 'RuleLibraryTagMappingsCreateUpdateOutputRepresentation') {
405
+ const TTL$1 = 1000;
406
+ const VERSION$1 = "7dab3fcadff55a173b214b22d1670519";
407
+ function validate$3(obj, path = 'RuleLibraryTagMappingsCreateUpdateOutputRepresentation') {
408
408
  const v_error = (() => {
409
409
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
410
410
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -424,68 +424,68 @@ function validate(obj, path = 'RuleLibraryTagMappingsCreateUpdateOutputRepresent
424
424
  })();
425
425
  return v_error === undefined ? null : v_error;
426
426
  }
427
- const RepresentationType = 'RuleLibraryTagMappingsCreateUpdateOutputRepresentation';
428
- function keyBuilder$3(luvio, config) {
429
- return keyPrefix + '::' + RepresentationType + ':' + '[' + config.id.join(',') + ']';
427
+ const RepresentationType$1 = 'RuleLibraryTagMappingsCreateUpdateOutputRepresentation';
428
+ function keyBuilder$6(luvio, config) {
429
+ return keyPrefix + '::' + RepresentationType$1 + ':' + '[' + config.id.join(',') + ']';
430
430
  }
431
- function keyBuilderFromType(luvio, object) {
431
+ function keyBuilderFromType$1(luvio, object) {
432
432
  const keyParams = {
433
433
  id: object.ids
434
434
  };
435
- return keyBuilder$3(luvio, keyParams);
435
+ return keyBuilder$6(luvio, keyParams);
436
436
  }
437
- function normalize(input, existing, path, luvio, store, timestamp) {
437
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
438
438
  return input;
439
439
  }
440
- const select$3 = function RuleLibraryTagMappingsCreateUpdateOutputRepresentationSelect() {
440
+ const select$5 = function RuleLibraryTagMappingsCreateUpdateOutputRepresentationSelect() {
441
441
  return {
442
442
  kind: 'Fragment',
443
- version: VERSION,
443
+ version: VERSION$1,
444
444
  private: [],
445
445
  opaque: true
446
446
  };
447
447
  };
448
- function equals(existing, incoming) {
448
+ function equals$1(existing, incoming) {
449
449
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
450
450
  return false;
451
451
  }
452
452
  return true;
453
453
  }
454
- const ingest = function RuleLibraryTagMappingsCreateUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
454
+ const ingest$1 = function RuleLibraryTagMappingsCreateUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
455
455
  if (process.env.NODE_ENV !== 'production') {
456
- const validateError = validate(input);
456
+ const validateError = validate$3(input);
457
457
  if (validateError !== null) {
458
458
  throw validateError;
459
459
  }
460
460
  }
461
- const key = keyBuilderFromType(luvio, input);
462
- const ttlToUse = TTL;
463
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "contextrules", VERSION, RepresentationType, equals);
461
+ const key = keyBuilderFromType$1(luvio, input);
462
+ const ttlToUse = TTL$1;
463
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "contextrules", VERSION$1, RepresentationType$1, equals$1);
464
464
  return createLink(key);
465
465
  };
466
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
466
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
467
467
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
468
- const rootKey = keyBuilderFromType(luvio, input);
468
+ const rootKey = keyBuilderFromType$1(luvio, input);
469
469
  rootKeySet.set(rootKey, {
470
470
  namespace: keyPrefix,
471
- representationName: RepresentationType,
471
+ representationName: RepresentationType$1,
472
472
  mergeable: false
473
473
  });
474
474
  }
475
475
 
476
- function select$2(luvio, params) {
477
- return select$3();
476
+ function select$4(luvio, params) {
477
+ return select$5();
478
478
  }
479
- function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
480
- getTypeCacheKeys(storeKeyMap, luvio, response);
479
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
480
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
481
481
  }
482
- function ingestSuccess$2(luvio, resourceParams, response) {
482
+ function ingestSuccess$3(luvio, resourceParams, response) {
483
483
  const { body } = response;
484
- const key = keyBuilderFromType(luvio, body);
485
- luvio.storeIngest(key, ingest, body);
484
+ const key = keyBuilderFromType$1(luvio, body);
485
+ luvio.storeIngest(key, ingest$1, body);
486
486
  const snapshot = luvio.storeLookup({
487
487
  recordId: key,
488
- node: select$2(),
488
+ node: select$4(),
489
489
  variables: {},
490
490
  });
491
491
  if (process.env.NODE_ENV !== 'production') {
@@ -496,7 +496,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
496
496
  deepFreeze(snapshot.data);
497
497
  return snapshot;
498
498
  }
499
- function createResourceRequest$3(config) {
499
+ function createResourceRequest$4(config) {
500
500
  const headers = {};
501
501
  return {
502
502
  baseUri: '/services/data/v62.0',
@@ -510,48 +510,48 @@ function createResourceRequest$3(config) {
510
510
  };
511
511
  }
512
512
 
513
- const adapterName$3 = 'updateContextTagMapping';
513
+ const adapterName$4 = 'updateContextTagMapping';
514
514
  const updateContextTagMapping_ConfigPropertyMetadata = [
515
515
  generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
516
516
  generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
517
517
  generateParamConfigMetadata('contextTagMappings', true, 2 /* Body */, 4 /* Unsupported */),
518
518
  ];
519
- const updateContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, updateContextTagMapping_ConfigPropertyMetadata);
520
- const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(updateContextTagMapping_ConfigPropertyMetadata);
521
- function typeCheckConfig$3(untrustedConfig) {
519
+ const updateContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updateContextTagMapping_ConfigPropertyMetadata);
520
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(updateContextTagMapping_ConfigPropertyMetadata);
521
+ function typeCheckConfig$4(untrustedConfig) {
522
522
  const config = {};
523
- typeCheckConfig$5(untrustedConfig, config, updateContextTagMapping_ConfigPropertyMetadata);
523
+ typeCheckConfig$6(untrustedConfig, config, updateContextTagMapping_ConfigPropertyMetadata);
524
524
  const untrustedConfig_contextTagMappings = untrustedConfig.contextTagMappings;
525
- const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$1(untrustedConfig_contextTagMappings);
525
+ const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$4(untrustedConfig_contextTagMappings);
526
526
  if (referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError === null) {
527
527
  config.contextTagMappings = untrustedConfig_contextTagMappings;
528
528
  }
529
529
  return config;
530
530
  }
531
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
531
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
532
532
  if (!untrustedIsObject(untrustedConfig)) {
533
533
  return null;
534
534
  }
535
535
  if (process.env.NODE_ENV !== 'production') {
536
536
  validateConfig(untrustedConfig, configPropertyNames);
537
537
  }
538
- const config = typeCheckConfig$3(untrustedConfig);
538
+ const config = typeCheckConfig$4(untrustedConfig);
539
539
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
540
540
  return null;
541
541
  }
542
542
  return config;
543
543
  }
544
- function buildNetworkSnapshot$3(luvio, config, options) {
545
- const resourceParams = createResourceParams$3(config);
546
- const request = createResourceRequest$3(resourceParams);
544
+ function buildNetworkSnapshot$4(luvio, config, options) {
545
+ const resourceParams = createResourceParams$4(config);
546
+ const request = createResourceRequest$4(resourceParams);
547
547
  return luvio.dispatchResourceRequest(request, options)
548
548
  .then((response) => {
549
549
  return luvio.handleSuccessResponse(() => {
550
- const snapshot = ingestSuccess$2(luvio, resourceParams, response);
550
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response);
551
551
  return luvio.storeBroadcast().then(() => snapshot);
552
552
  }, () => {
553
553
  const cache = new StoreKeyMap();
554
- getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
554
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
555
555
  return cache;
556
556
  });
557
557
  }, (response) => {
@@ -561,28 +561,28 @@ function buildNetworkSnapshot$3(luvio, config, options) {
561
561
  }
562
562
  const updateContextTagMappingAdapterFactory = (luvio) => {
563
563
  return function updateContextTagMapping(untrustedConfig) {
564
- const config = validateAdapterConfig$3(untrustedConfig, updateContextTagMapping_ConfigPropertyNames);
564
+ const config = validateAdapterConfig$4(untrustedConfig, updateContextTagMapping_ConfigPropertyNames);
565
565
  // Invalid or incomplete config
566
566
  if (config === null) {
567
567
  throw new Error('Invalid config for "updateContextTagMapping"');
568
568
  }
569
- return buildNetworkSnapshot$3(luvio, config);
569
+ return buildNetworkSnapshot$4(luvio, config);
570
570
  };
571
571
  };
572
572
 
573
- function select$1(luvio, params) {
574
- return select$3();
573
+ function select$3(luvio, params) {
574
+ return select$5();
575
575
  }
576
- function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
577
- getTypeCacheKeys(storeKeyMap, luvio, response);
576
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
577
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
578
578
  }
579
- function ingestSuccess$1(luvio, resourceParams, response) {
579
+ function ingestSuccess$2(luvio, resourceParams, response) {
580
580
  const { body } = response;
581
- const key = keyBuilderFromType(luvio, body);
582
- luvio.storeIngest(key, ingest, body);
581
+ const key = keyBuilderFromType$1(luvio, body);
582
+ luvio.storeIngest(key, ingest$1, body);
583
583
  const snapshot = luvio.storeLookup({
584
584
  recordId: key,
585
- node: select$1(),
585
+ node: select$3(),
586
586
  variables: {},
587
587
  });
588
588
  if (process.env.NODE_ENV !== 'production') {
@@ -593,7 +593,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
593
593
  deepFreeze(snapshot.data);
594
594
  return snapshot;
595
595
  }
596
- function createResourceRequest$2(config) {
596
+ function createResourceRequest$3(config) {
597
597
  const headers = {};
598
598
  return {
599
599
  baseUri: '/services/data/v62.0',
@@ -607,48 +607,48 @@ function createResourceRequest$2(config) {
607
607
  };
608
608
  }
609
609
 
610
- const adapterName$2 = 'createContextTagMapping';
610
+ const adapterName$3 = 'createContextTagMapping';
611
611
  const createContextTagMapping_ConfigPropertyMetadata = [
612
612
  generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
613
613
  generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
614
614
  generateParamConfigMetadata('contextTagMappings', true, 2 /* Body */, 4 /* Unsupported */),
615
615
  ];
616
- const createContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createContextTagMapping_ConfigPropertyMetadata);
617
- const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(createContextTagMapping_ConfigPropertyMetadata);
618
- function typeCheckConfig$2(untrustedConfig) {
616
+ const createContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createContextTagMapping_ConfigPropertyMetadata);
617
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(createContextTagMapping_ConfigPropertyMetadata);
618
+ function typeCheckConfig$3(untrustedConfig) {
619
619
  const config = {};
620
- typeCheckConfig$5(untrustedConfig, config, createContextTagMapping_ConfigPropertyMetadata);
620
+ typeCheckConfig$6(untrustedConfig, config, createContextTagMapping_ConfigPropertyMetadata);
621
621
  const untrustedConfig_contextTagMappings = untrustedConfig.contextTagMappings;
622
- const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$1(untrustedConfig_contextTagMappings);
622
+ const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$4(untrustedConfig_contextTagMappings);
623
623
  if (referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError === null) {
624
624
  config.contextTagMappings = untrustedConfig_contextTagMappings;
625
625
  }
626
626
  return config;
627
627
  }
628
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
628
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
629
629
  if (!untrustedIsObject(untrustedConfig)) {
630
630
  return null;
631
631
  }
632
632
  if (process.env.NODE_ENV !== 'production') {
633
633
  validateConfig(untrustedConfig, configPropertyNames);
634
634
  }
635
- const config = typeCheckConfig$2(untrustedConfig);
635
+ const config = typeCheckConfig$3(untrustedConfig);
636
636
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
637
637
  return null;
638
638
  }
639
639
  return config;
640
640
  }
641
- function buildNetworkSnapshot$2(luvio, config, options) {
642
- const resourceParams = createResourceParams$2(config);
643
- const request = createResourceRequest$2(resourceParams);
641
+ function buildNetworkSnapshot$3(luvio, config, options) {
642
+ const resourceParams = createResourceParams$3(config);
643
+ const request = createResourceRequest$3(resourceParams);
644
644
  return luvio.dispatchResourceRequest(request, options)
645
645
  .then((response) => {
646
646
  return luvio.handleSuccessResponse(() => {
647
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
647
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
648
648
  return luvio.storeBroadcast().then(() => snapshot);
649
649
  }, () => {
650
650
  const cache = new StoreKeyMap();
651
- getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
651
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
652
652
  return cache;
653
653
  });
654
654
  }, (response) => {
@@ -658,33 +658,33 @@ function buildNetworkSnapshot$2(luvio, config, options) {
658
658
  }
659
659
  const createContextTagMappingAdapterFactory = (luvio) => {
660
660
  return function createContextTagMapping(untrustedConfig) {
661
- const config = validateAdapterConfig$2(untrustedConfig, createContextTagMapping_ConfigPropertyNames);
661
+ const config = validateAdapterConfig$3(untrustedConfig, createContextTagMapping_ConfigPropertyNames);
662
662
  // Invalid or incomplete config
663
663
  if (config === null) {
664
664
  throw new Error('Invalid config for "createContextTagMapping"');
665
665
  }
666
- return buildNetworkSnapshot$2(luvio, config);
666
+ return buildNetworkSnapshot$3(luvio, config);
667
667
  };
668
668
  };
669
669
 
670
- function keyBuilder$2(luvio, params) {
671
- return keyBuilder$6(luvio, {
670
+ function keyBuilder$5(luvio, params) {
671
+ return keyBuilder$9(luvio, {
672
672
  id: params.urlParams.mappingName
673
673
  });
674
674
  }
675
- function getResponseCacheKeys$1(cacheKeyMap, luvio, resourceParams) {
676
- const key = keyBuilder$2(luvio, resourceParams);
675
+ function getResponseCacheKeys$2(cacheKeyMap, luvio, resourceParams) {
676
+ const key = keyBuilder$5(luvio, resourceParams);
677
677
  cacheKeyMap.set(key, {
678
678
  namespace: keyPrefix,
679
- representationName: RepresentationType$2,
679
+ representationName: RepresentationType$3,
680
680
  mergeable: false
681
681
  });
682
682
  }
683
683
  function evictSuccess(luvio, resourceParams) {
684
- const key = keyBuilder$2(luvio, resourceParams);
684
+ const key = keyBuilder$5(luvio, resourceParams);
685
685
  luvio.storeEvict(key);
686
686
  }
687
- function createResourceRequest$1(config) {
687
+ function createResourceRequest$2(config) {
688
688
  const headers = {};
689
689
  return {
690
690
  baseUri: '/services/data/v62.0',
@@ -698,35 +698,35 @@ function createResourceRequest$1(config) {
698
698
  };
699
699
  }
700
700
 
701
- const adapterName$1 = 'deleteContextTagMapping';
701
+ const adapterName$2 = 'deleteContextTagMapping';
702
702
  const deleteContextTagMapping_ConfigPropertyMetadata = [
703
703
  generateParamConfigMetadata('mappingName', true, 0 /* UrlParameter */, 0 /* String */),
704
704
  generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
705
705
  generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
706
706
  ];
707
- const deleteContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, deleteContextTagMapping_ConfigPropertyMetadata);
708
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(deleteContextTagMapping_ConfigPropertyMetadata);
709
- function typeCheckConfig$1(untrustedConfig) {
707
+ const deleteContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, deleteContextTagMapping_ConfigPropertyMetadata);
708
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(deleteContextTagMapping_ConfigPropertyMetadata);
709
+ function typeCheckConfig$2(untrustedConfig) {
710
710
  const config = {};
711
- typeCheckConfig$5(untrustedConfig, config, deleteContextTagMapping_ConfigPropertyMetadata);
711
+ typeCheckConfig$6(untrustedConfig, config, deleteContextTagMapping_ConfigPropertyMetadata);
712
712
  return config;
713
713
  }
714
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
714
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
715
715
  if (!untrustedIsObject(untrustedConfig)) {
716
716
  return null;
717
717
  }
718
718
  if (process.env.NODE_ENV !== 'production') {
719
719
  validateConfig(untrustedConfig, configPropertyNames);
720
720
  }
721
- const config = typeCheckConfig$1(untrustedConfig);
721
+ const config = typeCheckConfig$2(untrustedConfig);
722
722
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
723
723
  return null;
724
724
  }
725
725
  return config;
726
726
  }
727
- function buildNetworkSnapshot$1(luvio, config, options) {
728
- const resourceParams = createResourceParams$1(config);
729
- const request = createResourceRequest$1(resourceParams);
727
+ function buildNetworkSnapshot$2(luvio, config, options) {
728
+ const resourceParams = createResourceParams$2(config);
729
+ const request = createResourceRequest$2(resourceParams);
730
730
  return luvio.dispatchResourceRequest(request, options)
731
731
  .then(() => {
732
732
  return luvio.handleSuccessResponse(() => {
@@ -734,7 +734,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
734
734
  return luvio.storeBroadcast();
735
735
  }, () => {
736
736
  const cache = new StoreKeyMap();
737
- getResponseCacheKeys$1(cache, luvio, resourceParams);
737
+ getResponseCacheKeys$2(cache, luvio, resourceParams);
738
738
  return cache;
739
739
  });
740
740
  }, (response) => {
@@ -744,30 +744,311 @@ function buildNetworkSnapshot$1(luvio, config, options) {
744
744
  }
745
745
  const deleteContextTagMappingAdapterFactory = (luvio) => {
746
746
  return function contextrulesdeleteContextTagMapping(untrustedConfig) {
747
- const config = validateAdapterConfig$1(untrustedConfig, deleteContextTagMapping_ConfigPropertyNames);
747
+ const config = validateAdapterConfig$2(untrustedConfig, deleteContextTagMapping_ConfigPropertyNames);
748
748
  // Invalid or incomplete config
749
749
  if (config === null) {
750
- throw new Error(`Invalid config for "${adapterName$1}"`);
750
+ throw new Error(`Invalid config for "${adapterName$2}"`);
751
751
  }
752
- return buildNetworkSnapshot$1(luvio, config);
752
+ return buildNetworkSnapshot$2(luvio, config);
753
753
  };
754
754
  };
755
755
 
756
+ function select$2(luvio, params) {
757
+ return select$8();
758
+ }
759
+ function keyBuilder$4(luvio, params) {
760
+ return keyBuilder$9(luvio, {
761
+ id: params.urlParams.mappingName
762
+ });
763
+ }
764
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
765
+ getTypeCacheKeys$3(storeKeyMap, luvio, response);
766
+ }
767
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
768
+ const { body } = response;
769
+ const key = keyBuilder$4(luvio, resourceParams);
770
+ luvio.storeIngest(key, ingest$3, body);
771
+ const snapshot = luvio.storeLookup({
772
+ recordId: key,
773
+ node: select$2(),
774
+ variables: {},
775
+ }, snapshotRefresh);
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 ingestError$1(luvio, params, error, snapshotRefresh) {
785
+ const key = keyBuilder$4(luvio, params);
786
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
787
+ const storeMetadataParams = {
788
+ ttl: TTL$3,
789
+ namespace: keyPrefix,
790
+ version: VERSION$3,
791
+ representationName: RepresentationType$3
792
+ };
793
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
794
+ return errorSnapshot;
795
+ }
796
+ function createResourceRequest$1(config) {
797
+ const headers = {};
798
+ return {
799
+ baseUri: '/services/data/v62.0',
800
+ basePath: '/connect/context-rules/context-tag-mappings/rule-library-api-name/' + config.urlParams.ruleLibraryApiName + '/version-number/' + config.urlParams.versionNumber + '/mapping-name/' + config.urlParams.mappingName + '',
801
+ method: 'get',
802
+ body: null,
803
+ urlParams: config.urlParams,
804
+ queryParams: {},
805
+ headers,
806
+ priority: 'normal',
807
+ };
808
+ }
809
+
810
+ const adapterName$1 = 'getContextTagMapping';
811
+ const getContextTagMapping_ConfigPropertyMetadata = [
812
+ generateParamConfigMetadata('mappingName', true, 0 /* UrlParameter */, 0 /* String */),
813
+ generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
814
+ generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
815
+ ];
816
+ const getContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getContextTagMapping_ConfigPropertyMetadata);
817
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getContextTagMapping_ConfigPropertyMetadata);
818
+ function keyBuilder$3(luvio, config) {
819
+ const resourceParams = createResourceParams$1(config);
820
+ return keyBuilder$4(luvio, resourceParams);
821
+ }
822
+ function typeCheckConfig$1(untrustedConfig) {
823
+ const config = {};
824
+ typeCheckConfig$6(untrustedConfig, config, getContextTagMapping_ConfigPropertyMetadata);
825
+ return config;
826
+ }
827
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
828
+ if (!untrustedIsObject(untrustedConfig)) {
829
+ return null;
830
+ }
831
+ if (process.env.NODE_ENV !== 'production') {
832
+ validateConfig(untrustedConfig, configPropertyNames);
833
+ }
834
+ const config = typeCheckConfig$1(untrustedConfig);
835
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
836
+ return null;
837
+ }
838
+ return config;
839
+ }
840
+ function adapterFragment$1(luvio, config) {
841
+ createResourceParams$1(config);
842
+ return select$2();
843
+ }
844
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
845
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
846
+ config,
847
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
848
+ });
849
+ return luvio.storeBroadcast().then(() => snapshot);
850
+ }
851
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
852
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
853
+ config,
854
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
855
+ });
856
+ return luvio.storeBroadcast().then(() => snapshot);
857
+ }
858
+ function buildNetworkSnapshot$1(luvio, config, options) {
859
+ const resourceParams = createResourceParams$1(config);
860
+ const request = createResourceRequest$1(resourceParams);
861
+ return luvio.dispatchResourceRequest(request, options)
862
+ .then((response) => {
863
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
864
+ const cache = new StoreKeyMap();
865
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
866
+ return cache;
867
+ });
868
+ }, (response) => {
869
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
870
+ });
871
+ }
872
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
873
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
874
+ }
875
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
876
+ const { luvio, config } = context;
877
+ const selector = {
878
+ recordId: keyBuilder$3(luvio, config),
879
+ node: adapterFragment$1(luvio, config),
880
+ variables: {},
881
+ };
882
+ const cacheSnapshot = storeLookup(selector, {
883
+ config,
884
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
885
+ });
886
+ return cacheSnapshot;
887
+ }
888
+ const getContextTagMappingAdapterFactory = (luvio) => function contextrules__getContextTagMapping(untrustedConfig, requestContext) {
889
+ const config = validateAdapterConfig$1(untrustedConfig, getContextTagMapping_ConfigPropertyNames);
890
+ // Invalid or incomplete config
891
+ if (config === null) {
892
+ return null;
893
+ }
894
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
895
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
896
+ };
897
+
898
+ function validate$2(obj, path = 'UsageSubtypeHashLookupColumnOutputRepresentation') {
899
+ const v_error = (() => {
900
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
901
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
902
+ }
903
+ const obj_sequenceNumber = obj.sequenceNumber;
904
+ const path_sequenceNumber = path + '.sequenceNumber';
905
+ if (typeof obj_sequenceNumber !== 'number' || (typeof obj_sequenceNumber === 'number' && Math.floor(obj_sequenceNumber) !== obj_sequenceNumber)) {
906
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequenceNumber + '" (at "' + path_sequenceNumber + '")');
907
+ }
908
+ const obj_subtypeMappingName = obj.subtypeMappingName;
909
+ const path_subtypeMappingName = path + '.subtypeMappingName';
910
+ if (typeof obj_subtypeMappingName !== 'string') {
911
+ return new TypeError('Expected "string" but received "' + typeof obj_subtypeMappingName + '" (at "' + path_subtypeMappingName + '")');
912
+ }
913
+ })();
914
+ return v_error === undefined ? null : v_error;
915
+ }
916
+
917
+ function validate$1(obj, path = 'UsageSubtypeOutputRepresentation') {
918
+ const v_error = (() => {
919
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
920
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
921
+ }
922
+ const obj_hashLookupColumns = obj.hashLookupColumns;
923
+ const path_hashLookupColumns = path + '.hashLookupColumns';
924
+ if (!ArrayIsArray(obj_hashLookupColumns)) {
925
+ return new TypeError('Expected "array" but received "' + typeof obj_hashLookupColumns + '" (at "' + path_hashLookupColumns + '")');
926
+ }
927
+ for (let i = 0; i < obj_hashLookupColumns.length; i++) {
928
+ const obj_hashLookupColumns_item = obj_hashLookupColumns[i];
929
+ const path_hashLookupColumns_item = path_hashLookupColumns + '[' + i + ']';
930
+ const referencepath_hashLookupColumns_itemValidationError = validate$2(obj_hashLookupColumns_item, path_hashLookupColumns_item);
931
+ if (referencepath_hashLookupColumns_itemValidationError !== null) {
932
+ let message = 'Object doesn\'t match UsageSubtypeHashLookupColumnOutputRepresentation (at "' + path_hashLookupColumns_item + '")\n';
933
+ message += referencepath_hashLookupColumns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
934
+ return new TypeError(message);
935
+ }
936
+ }
937
+ const obj_usageSubtype = obj.usageSubtype;
938
+ const path_usageSubtype = path + '.usageSubtype';
939
+ if (typeof obj_usageSubtype !== 'string') {
940
+ return new TypeError('Expected "string" but received "' + typeof obj_usageSubtype + '" (at "' + path_usageSubtype + '")');
941
+ }
942
+ })();
943
+ return v_error === undefined ? null : v_error;
944
+ }
945
+
946
+ const TTL = 1000;
947
+ const VERSION = "19586883f36a2f3e5aa88a8708d670b4";
948
+ function validate(obj, path = 'UsageTypeOutputRepresentation') {
949
+ const v_error = (() => {
950
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
951
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
952
+ }
953
+ const obj_mappingNames = obj.mappingNames;
954
+ const path_mappingNames = path + '.mappingNames';
955
+ if (!ArrayIsArray(obj_mappingNames)) {
956
+ return new TypeError('Expected "array" but received "' + typeof obj_mappingNames + '" (at "' + path_mappingNames + '")');
957
+ }
958
+ for (let i = 0; i < obj_mappingNames.length; i++) {
959
+ const obj_mappingNames_item = obj_mappingNames[i];
960
+ const path_mappingNames_item = path_mappingNames + '[' + i + ']';
961
+ if (typeof obj_mappingNames_item !== 'string') {
962
+ return new TypeError('Expected "string" but received "' + typeof obj_mappingNames_item + '" (at "' + path_mappingNames_item + '")');
963
+ }
964
+ }
965
+ const obj_usageSubtypes = obj.usageSubtypes;
966
+ const path_usageSubtypes = path + '.usageSubtypes';
967
+ if (!ArrayIsArray(obj_usageSubtypes)) {
968
+ return new TypeError('Expected "array" but received "' + typeof obj_usageSubtypes + '" (at "' + path_usageSubtypes + '")');
969
+ }
970
+ for (let i = 0; i < obj_usageSubtypes.length; i++) {
971
+ const obj_usageSubtypes_item = obj_usageSubtypes[i];
972
+ const path_usageSubtypes_item = path_usageSubtypes + '[' + i + ']';
973
+ const referencepath_usageSubtypes_itemValidationError = validate$1(obj_usageSubtypes_item, path_usageSubtypes_item);
974
+ if (referencepath_usageSubtypes_itemValidationError !== null) {
975
+ let message = 'Object doesn\'t match UsageSubtypeOutputRepresentation (at "' + path_usageSubtypes_item + '")\n';
976
+ message += referencepath_usageSubtypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
977
+ return new TypeError(message);
978
+ }
979
+ }
980
+ const obj_usageType = obj.usageType;
981
+ const path_usageType = path + '.usageType';
982
+ if (typeof obj_usageType !== 'string') {
983
+ return new TypeError('Expected "string" but received "' + typeof obj_usageType + '" (at "' + path_usageType + '")');
984
+ }
985
+ })();
986
+ return v_error === undefined ? null : v_error;
987
+ }
988
+ const RepresentationType = 'UsageTypeOutputRepresentation';
989
+ function keyBuilder$2(luvio, config) {
990
+ return keyPrefix + '::' + RepresentationType + ':' + config.id;
991
+ }
992
+ function keyBuilderFromType(luvio, object) {
993
+ const keyParams = {
994
+ id: object.usageType
995
+ };
996
+ return keyBuilder$2(luvio, keyParams);
997
+ }
998
+ function normalize(input, existing, path, luvio, store, timestamp) {
999
+ return input;
1000
+ }
1001
+ const select$1 = function UsageTypeOutputRepresentationSelect() {
1002
+ return {
1003
+ kind: 'Fragment',
1004
+ version: VERSION,
1005
+ private: [],
1006
+ opaque: true
1007
+ };
1008
+ };
1009
+ function equals(existing, incoming) {
1010
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1011
+ return false;
1012
+ }
1013
+ return true;
1014
+ }
1015
+ const ingest = function UsageTypeOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1016
+ if (process.env.NODE_ENV !== 'production') {
1017
+ const validateError = validate(input);
1018
+ if (validateError !== null) {
1019
+ throw validateError;
1020
+ }
1021
+ }
1022
+ const key = keyBuilderFromType(luvio, input);
1023
+ const ttlToUse = TTL;
1024
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "contextrules", VERSION, RepresentationType, equals);
1025
+ return createLink(key);
1026
+ };
1027
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1028
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1029
+ const rootKey = keyBuilderFromType(luvio, input);
1030
+ rootKeySet.set(rootKey, {
1031
+ namespace: keyPrefix,
1032
+ representationName: RepresentationType,
1033
+ mergeable: false
1034
+ });
1035
+ }
1036
+
756
1037
  function select(luvio, params) {
757
- return select$6();
1038
+ return select$1();
758
1039
  }
759
1040
  function keyBuilder$1(luvio, params) {
760
- return keyBuilder$6(luvio, {
761
- id: params.urlParams.mappingName
1041
+ return keyBuilder$2(luvio, {
1042
+ id: params.urlParams.usageType
762
1043
  });
763
1044
  }
764
1045
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
765
- getTypeCacheKeys$2(storeKeyMap, luvio, response);
1046
+ getTypeCacheKeys(storeKeyMap, luvio, response);
766
1047
  }
767
1048
  function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
768
1049
  const { body } = response;
769
1050
  const key = keyBuilder$1(luvio, resourceParams);
770
- luvio.storeIngest(key, ingest$2, body);
1051
+ luvio.storeIngest(key, ingest, body);
771
1052
  const snapshot = luvio.storeLookup({
772
1053
  recordId: key,
773
1054
  node: select(),
@@ -785,10 +1066,10 @@ function ingestError(luvio, params, error, snapshotRefresh) {
785
1066
  const key = keyBuilder$1(luvio, params);
786
1067
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
787
1068
  const storeMetadataParams = {
788
- ttl: TTL$2,
1069
+ ttl: TTL,
789
1070
  namespace: keyPrefix,
790
- version: VERSION$2,
791
- representationName: RepresentationType$2
1071
+ version: VERSION,
1072
+ representationName: RepresentationType
792
1073
  };
793
1074
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
794
1075
  return errorSnapshot;
@@ -797,7 +1078,7 @@ function createResourceRequest(config) {
797
1078
  const headers = {};
798
1079
  return {
799
1080
  baseUri: '/services/data/v62.0',
800
- basePath: '/connect/context-rules/context-tag-mappings/rule-library-api-name/' + config.urlParams.ruleLibraryApiName + '/version-number/' + config.urlParams.versionNumber + '/mapping-name/' + config.urlParams.mappingName + '',
1081
+ basePath: '/connect/context-rules/usage-types/' + config.urlParams.usageType + '',
801
1082
  method: 'get',
802
1083
  body: null,
803
1084
  urlParams: config.urlParams,
@@ -807,21 +1088,19 @@ function createResourceRequest(config) {
807
1088
  };
808
1089
  }
809
1090
 
810
- const adapterName = 'getContextTagMapping';
811
- const getContextTagMapping_ConfigPropertyMetadata = [
812
- generateParamConfigMetadata('mappingName', true, 0 /* UrlParameter */, 0 /* String */),
813
- generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
814
- generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
1091
+ const adapterName = 'getUsageTypeDetail';
1092
+ const getUsageTypeDetail_ConfigPropertyMetadata = [
1093
+ generateParamConfigMetadata('usageType', true, 0 /* UrlParameter */, 0 /* String */),
815
1094
  ];
816
- const getContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getContextTagMapping_ConfigPropertyMetadata);
817
- const createResourceParams = /*#__PURE__*/ createResourceParams$5(getContextTagMapping_ConfigPropertyMetadata);
1095
+ const getUsageTypeDetail_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUsageTypeDetail_ConfigPropertyMetadata);
1096
+ const createResourceParams = /*#__PURE__*/ createResourceParams$6(getUsageTypeDetail_ConfigPropertyMetadata);
818
1097
  function keyBuilder(luvio, config) {
819
1098
  const resourceParams = createResourceParams(config);
820
1099
  return keyBuilder$1(luvio, resourceParams);
821
1100
  }
822
1101
  function typeCheckConfig(untrustedConfig) {
823
1102
  const config = {};
824
- typeCheckConfig$5(untrustedConfig, config, getContextTagMapping_ConfigPropertyMetadata);
1103
+ typeCheckConfig$6(untrustedConfig, config, getUsageTypeDetail_ConfigPropertyMetadata);
825
1104
  return config;
826
1105
  }
827
1106
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -870,7 +1149,7 @@ function buildNetworkSnapshot(luvio, config, options) {
870
1149
  });
871
1150
  }
872
1151
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
873
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
1152
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
874
1153
  }
875
1154
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
876
1155
  const { luvio, config } = context;
@@ -885,8 +1164,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
885
1164
  });
886
1165
  return cacheSnapshot;
887
1166
  }
888
- const getContextTagMappingAdapterFactory = (luvio) => function contextrules__getContextTagMapping(untrustedConfig, requestContext) {
889
- const config = validateAdapterConfig(untrustedConfig, getContextTagMapping_ConfigPropertyNames);
1167
+ const getUsageTypeDetailAdapterFactory = (luvio) => function contextrules__getUsageTypeDetail(untrustedConfig, requestContext) {
1168
+ const config = validateAdapterConfig(untrustedConfig, getUsageTypeDetail_ConfigPropertyNames);
890
1169
  // Invalid or incomplete config
891
1170
  if (config === null) {
892
1171
  return null;
@@ -895,4 +1174,4 @@ const getContextTagMappingAdapterFactory = (luvio) => function contextrules__get
895
1174
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
896
1175
  };
897
1176
 
898
- export { createContextTagMappingAdapterFactory, deleteContextTagMappingAdapterFactory, getContextTagMappingAdapterFactory, getContextTagMappingsAdapterFactory, updateContextTagMappingAdapterFactory };
1177
+ export { createContextTagMappingAdapterFactory, deleteContextTagMappingAdapterFactory, getContextTagMappingAdapterFactory, getContextTagMappingsAdapterFactory, getUsageTypeDetailAdapterFactory, updateContextTagMappingAdapterFactory };