@salesforce/lds-adapters-industries-contextrules 1.292.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.
- package/dist/es/es2018/industries-contextrules.js +474 -195
- package/dist/es/es2018/types/src/generated/adapters/getUsageTypeDetail.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectContextRulesUsageTypesByUsageType.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/UsageSubtypeHashLookupColumnOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/UsageSubtypeOutputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/UsageTypeOutputRepresentation.d.ts +45 -0
- package/package.json +3 -3
- package/sfdc/index.js +514 -179
- package/src/raml/api.raml +53 -0
- package/src/raml/luvio.raml +11 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$6, typeCheckConfig as typeCheckConfig$6, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -89,7 +89,7 @@ function createLink(ref) {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
function validate$
|
|
92
|
+
function validate$6(obj, path = 'RuleLibraryTagMappingsListWrapperRepresentation') {
|
|
93
93
|
const v_error = (() => {
|
|
94
94
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
95
95
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -110,9 +110,9 @@ function validate$3(obj, path = 'RuleLibraryTagMappingsListWrapperRepresentation
|
|
|
110
110
|
return v_error === undefined ? null : v_error;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
const TTL$
|
|
114
|
-
const VERSION$
|
|
115
|
-
function validate$
|
|
113
|
+
const TTL$3 = 1000;
|
|
114
|
+
const VERSION$3 = "7dab3fcadff55a173b214b22d1670519";
|
|
115
|
+
function validate$5(obj, path = 'RuleLibraryTagMappingsCreateUpdateOutputRepresentation') {
|
|
116
116
|
const v_error = (() => {
|
|
117
117
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
118
118
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -132,68 +132,68 @@ function validate$2(obj, path = 'RuleLibraryTagMappingsCreateUpdateOutputReprese
|
|
|
132
132
|
})();
|
|
133
133
|
return v_error === undefined ? null : v_error;
|
|
134
134
|
}
|
|
135
|
-
const RepresentationType$
|
|
136
|
-
function keyBuilder$
|
|
137
|
-
return keyPrefix + '::' + RepresentationType$
|
|
135
|
+
const RepresentationType$3 = 'RuleLibraryTagMappingsCreateUpdateOutputRepresentation';
|
|
136
|
+
function keyBuilder$9(luvio, config) {
|
|
137
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + '[' + config.id.join(',') + ']';
|
|
138
138
|
}
|
|
139
|
-
function keyBuilderFromType$
|
|
139
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
140
140
|
const keyParams = {
|
|
141
141
|
id: object.ids
|
|
142
142
|
};
|
|
143
|
-
return keyBuilder$
|
|
143
|
+
return keyBuilder$9(luvio, keyParams);
|
|
144
144
|
}
|
|
145
|
-
function normalize$
|
|
145
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
146
146
|
return input;
|
|
147
147
|
}
|
|
148
|
-
const select$
|
|
148
|
+
const select$8 = function RuleLibraryTagMappingsCreateUpdateOutputRepresentationSelect() {
|
|
149
149
|
return {
|
|
150
150
|
kind: 'Fragment',
|
|
151
|
-
version: VERSION$
|
|
151
|
+
version: VERSION$3,
|
|
152
152
|
private: [],
|
|
153
153
|
opaque: true
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
|
-
function equals$
|
|
156
|
+
function equals$3(existing, incoming) {
|
|
157
157
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
158
158
|
return false;
|
|
159
159
|
}
|
|
160
160
|
return true;
|
|
161
161
|
}
|
|
162
|
-
const ingest$
|
|
162
|
+
const ingest$3 = function RuleLibraryTagMappingsCreateUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
163
163
|
if (process.env.NODE_ENV !== 'production') {
|
|
164
|
-
const validateError = validate$
|
|
164
|
+
const validateError = validate$5(input);
|
|
165
165
|
if (validateError !== null) {
|
|
166
166
|
throw validateError;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
const key = keyBuilderFromType$
|
|
170
|
-
const ttlToUse = TTL$
|
|
171
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
169
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
170
|
+
const ttlToUse = TTL$3;
|
|
171
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "contextrules", VERSION$3, RepresentationType$3, equals$3);
|
|
172
172
|
return createLink(key);
|
|
173
173
|
};
|
|
174
|
-
function getTypeCacheKeys$
|
|
174
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
175
175
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
176
|
-
const rootKey = keyBuilderFromType$
|
|
176
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
177
177
|
rootKeySet.set(rootKey, {
|
|
178
178
|
namespace: keyPrefix,
|
|
179
|
-
representationName: RepresentationType$
|
|
179
|
+
representationName: RepresentationType$3,
|
|
180
180
|
mergeable: false
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
function select$
|
|
185
|
-
return select$
|
|
184
|
+
function select$7(luvio, params) {
|
|
185
|
+
return select$8();
|
|
186
186
|
}
|
|
187
|
-
function getResponseCacheKeys$
|
|
188
|
-
getTypeCacheKeys$
|
|
187
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
188
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
189
189
|
}
|
|
190
|
-
function ingestSuccess$
|
|
190
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
191
191
|
const { body } = response;
|
|
192
|
-
const key = keyBuilderFromType$
|
|
193
|
-
luvio.storeIngest(key, ingest$
|
|
192
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
193
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
194
194
|
const snapshot = luvio.storeLookup({
|
|
195
195
|
recordId: key,
|
|
196
|
-
node: select$
|
|
196
|
+
node: select$7(),
|
|
197
197
|
variables: {},
|
|
198
198
|
});
|
|
199
199
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -204,7 +204,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
204
204
|
deepFreeze(snapshot.data);
|
|
205
205
|
return snapshot;
|
|
206
206
|
}
|
|
207
|
-
function createResourceRequest$
|
|
207
|
+
function createResourceRequest$5(config) {
|
|
208
208
|
const headers = {};
|
|
209
209
|
return {
|
|
210
210
|
baseUri: '/services/data/v62.0',
|
|
@@ -218,48 +218,48 @@ function createResourceRequest$4(config) {
|
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
const adapterName$
|
|
221
|
+
const adapterName$5 = 'createContextTagMapping';
|
|
222
222
|
const createContextTagMapping_ConfigPropertyMetadata = [
|
|
223
223
|
generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
224
224
|
generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
|
|
225
225
|
generateParamConfigMetadata('contextTagMappings', true, 2 /* Body */, 4 /* Unsupported */),
|
|
226
226
|
];
|
|
227
|
-
const createContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
228
|
-
const createResourceParams$
|
|
229
|
-
function typeCheckConfig$
|
|
227
|
+
const createContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createContextTagMapping_ConfigPropertyMetadata);
|
|
228
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(createContextTagMapping_ConfigPropertyMetadata);
|
|
229
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
230
230
|
const config = {};
|
|
231
|
-
typeCheckConfig$
|
|
231
|
+
typeCheckConfig$6(untrustedConfig, config, createContextTagMapping_ConfigPropertyMetadata);
|
|
232
232
|
const untrustedConfig_contextTagMappings = untrustedConfig.contextTagMappings;
|
|
233
|
-
const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$
|
|
233
|
+
const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$6(untrustedConfig_contextTagMappings);
|
|
234
234
|
if (referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError === null) {
|
|
235
235
|
config.contextTagMappings = untrustedConfig_contextTagMappings;
|
|
236
236
|
}
|
|
237
237
|
return config;
|
|
238
238
|
}
|
|
239
|
-
function validateAdapterConfig$
|
|
239
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
240
240
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
241
241
|
return null;
|
|
242
242
|
}
|
|
243
243
|
if (process.env.NODE_ENV !== 'production') {
|
|
244
244
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
245
245
|
}
|
|
246
|
-
const config = typeCheckConfig$
|
|
246
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
247
247
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
248
248
|
return null;
|
|
249
249
|
}
|
|
250
250
|
return config;
|
|
251
251
|
}
|
|
252
|
-
function buildNetworkSnapshot$
|
|
253
|
-
const resourceParams = createResourceParams$
|
|
254
|
-
const request = createResourceRequest$
|
|
252
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
253
|
+
const resourceParams = createResourceParams$5(config);
|
|
254
|
+
const request = createResourceRequest$5(resourceParams);
|
|
255
255
|
return luvio.dispatchResourceRequest(request, options)
|
|
256
256
|
.then((response) => {
|
|
257
257
|
return luvio.handleSuccessResponse(() => {
|
|
258
|
-
const snapshot = ingestSuccess$
|
|
258
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
259
259
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
260
260
|
}, () => {
|
|
261
261
|
const cache = new StoreKeyMap();
|
|
262
|
-
getResponseCacheKeys$
|
|
262
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
263
263
|
return cache;
|
|
264
264
|
});
|
|
265
265
|
}, (response) => {
|
|
@@ -269,18 +269,18 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
269
269
|
}
|
|
270
270
|
const createContextTagMappingAdapterFactory = (luvio) => {
|
|
271
271
|
return function createContextTagMapping(untrustedConfig) {
|
|
272
|
-
const config = validateAdapterConfig$
|
|
272
|
+
const config = validateAdapterConfig$5(untrustedConfig, createContextTagMapping_ConfigPropertyNames);
|
|
273
273
|
// Invalid or incomplete config
|
|
274
274
|
if (config === null) {
|
|
275
275
|
throw new Error('Invalid config for "createContextTagMapping"');
|
|
276
276
|
}
|
|
277
|
-
return buildNetworkSnapshot$
|
|
277
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
278
278
|
};
|
|
279
279
|
};
|
|
280
280
|
|
|
281
|
-
const TTL$
|
|
282
|
-
const VERSION$
|
|
283
|
-
function validate$
|
|
281
|
+
const TTL$2 = 1000;
|
|
282
|
+
const VERSION$2 = "4b7bef672f4996c31c5a042959681437";
|
|
283
|
+
function validate$4(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentation') {
|
|
284
284
|
const v_error = (() => {
|
|
285
285
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
286
286
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -327,73 +327,73 @@ function validate$1(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentation'
|
|
|
327
327
|
})();
|
|
328
328
|
return v_error === undefined ? null : v_error;
|
|
329
329
|
}
|
|
330
|
-
const RepresentationType$
|
|
331
|
-
function keyBuilder$
|
|
332
|
-
return keyPrefix + '::' + RepresentationType$
|
|
330
|
+
const RepresentationType$2 = 'RuleLibraryTagMappingsReadOutputRepresentation';
|
|
331
|
+
function keyBuilder$8(luvio, config) {
|
|
332
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
333
333
|
}
|
|
334
|
-
function keyBuilderFromType(luvio, object) {
|
|
334
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
335
335
|
const keyParams = {
|
|
336
336
|
id: object.mappingName
|
|
337
337
|
};
|
|
338
|
-
return keyBuilder$
|
|
338
|
+
return keyBuilder$8(luvio, keyParams);
|
|
339
339
|
}
|
|
340
|
-
function normalize$
|
|
340
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
341
341
|
return input;
|
|
342
342
|
}
|
|
343
|
-
const select$
|
|
343
|
+
const select$6 = function RuleLibraryTagMappingsReadOutputRepresentationSelect() {
|
|
344
344
|
return {
|
|
345
345
|
kind: 'Fragment',
|
|
346
|
-
version: VERSION$
|
|
346
|
+
version: VERSION$2,
|
|
347
347
|
private: [],
|
|
348
348
|
opaque: true
|
|
349
349
|
};
|
|
350
350
|
};
|
|
351
|
-
function equals$
|
|
351
|
+
function equals$2(existing, incoming) {
|
|
352
352
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
353
353
|
return false;
|
|
354
354
|
}
|
|
355
355
|
return true;
|
|
356
356
|
}
|
|
357
|
-
const ingest$
|
|
357
|
+
const ingest$2 = function RuleLibraryTagMappingsReadOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
358
358
|
if (process.env.NODE_ENV !== 'production') {
|
|
359
|
-
const validateError = validate$
|
|
359
|
+
const validateError = validate$4(input);
|
|
360
360
|
if (validateError !== null) {
|
|
361
361
|
throw validateError;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
const key = keyBuilderFromType(luvio, input);
|
|
365
|
-
const ttlToUse = TTL$
|
|
366
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
364
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
365
|
+
const ttlToUse = TTL$2;
|
|
366
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "contextrules", VERSION$2, RepresentationType$2, equals$2);
|
|
367
367
|
return createLink(key);
|
|
368
368
|
};
|
|
369
|
-
function getTypeCacheKeys$
|
|
369
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
370
370
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
371
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
371
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
372
372
|
rootKeySet.set(rootKey, {
|
|
373
373
|
namespace: keyPrefix,
|
|
374
|
-
representationName: RepresentationType$
|
|
374
|
+
representationName: RepresentationType$2,
|
|
375
375
|
mergeable: false
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
function keyBuilder$
|
|
380
|
-
return keyBuilder$
|
|
379
|
+
function keyBuilder$7(luvio, params) {
|
|
380
|
+
return keyBuilder$8(luvio, {
|
|
381
381
|
id: params.urlParams.mappingName
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
function getResponseCacheKeys$
|
|
385
|
-
const key = keyBuilder$
|
|
384
|
+
function getResponseCacheKeys$4(cacheKeyMap, luvio, resourceParams) {
|
|
385
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
386
386
|
cacheKeyMap.set(key, {
|
|
387
387
|
namespace: keyPrefix,
|
|
388
|
-
representationName: RepresentationType$
|
|
388
|
+
representationName: RepresentationType$2,
|
|
389
389
|
mergeable: false
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
function evictSuccess(luvio, resourceParams) {
|
|
393
|
-
const key = keyBuilder$
|
|
393
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
394
394
|
luvio.storeEvict(key);
|
|
395
395
|
}
|
|
396
|
-
function createResourceRequest$
|
|
396
|
+
function createResourceRequest$4(config) {
|
|
397
397
|
const headers = {};
|
|
398
398
|
return {
|
|
399
399
|
baseUri: '/services/data/v62.0',
|
|
@@ -407,35 +407,35 @@ function createResourceRequest$3(config) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
const adapterName$
|
|
410
|
+
const adapterName$4 = 'deleteContextTagMapping';
|
|
411
411
|
const deleteContextTagMapping_ConfigPropertyMetadata = [
|
|
412
412
|
generateParamConfigMetadata('mappingName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
413
413
|
generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
414
414
|
generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
|
|
415
415
|
];
|
|
416
|
-
const deleteContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
417
|
-
const createResourceParams$
|
|
418
|
-
function typeCheckConfig$
|
|
416
|
+
const deleteContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, deleteContextTagMapping_ConfigPropertyMetadata);
|
|
417
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(deleteContextTagMapping_ConfigPropertyMetadata);
|
|
418
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
419
419
|
const config = {};
|
|
420
|
-
typeCheckConfig$
|
|
420
|
+
typeCheckConfig$6(untrustedConfig, config, deleteContextTagMapping_ConfigPropertyMetadata);
|
|
421
421
|
return config;
|
|
422
422
|
}
|
|
423
|
-
function validateAdapterConfig$
|
|
423
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
424
424
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
425
425
|
return null;
|
|
426
426
|
}
|
|
427
427
|
if (process.env.NODE_ENV !== 'production') {
|
|
428
428
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
429
429
|
}
|
|
430
|
-
const config = typeCheckConfig$
|
|
430
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
431
431
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
432
432
|
return null;
|
|
433
433
|
}
|
|
434
434
|
return config;
|
|
435
435
|
}
|
|
436
|
-
function buildNetworkSnapshot$
|
|
437
|
-
const resourceParams = createResourceParams$
|
|
438
|
-
const request = createResourceRequest$
|
|
436
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
437
|
+
const resourceParams = createResourceParams$4(config);
|
|
438
|
+
const request = createResourceRequest$4(resourceParams);
|
|
439
439
|
return luvio.dispatchResourceRequest(request, options)
|
|
440
440
|
.then(() => {
|
|
441
441
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -443,7 +443,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
443
443
|
return luvio.storeBroadcast();
|
|
444
444
|
}, () => {
|
|
445
445
|
const cache = new StoreKeyMap();
|
|
446
|
-
getResponseCacheKeys$
|
|
446
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams);
|
|
447
447
|
return cache;
|
|
448
448
|
});
|
|
449
449
|
}, (response) => {
|
|
@@ -453,33 +453,33 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
453
453
|
}
|
|
454
454
|
const deleteContextTagMappingAdapterFactory = (luvio) => {
|
|
455
455
|
return function contextrulesdeleteContextTagMapping(untrustedConfig) {
|
|
456
|
-
const config = validateAdapterConfig$
|
|
456
|
+
const config = validateAdapterConfig$4(untrustedConfig, deleteContextTagMapping_ConfigPropertyNames);
|
|
457
457
|
// Invalid or incomplete config
|
|
458
458
|
if (config === null) {
|
|
459
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
459
|
+
throw new Error(`Invalid config for "${adapterName$4}"`);
|
|
460
460
|
}
|
|
461
|
-
return buildNetworkSnapshot$
|
|
461
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
|
|
465
|
-
function select$
|
|
466
|
-
return select$
|
|
465
|
+
function select$5(luvio, params) {
|
|
466
|
+
return select$6();
|
|
467
467
|
}
|
|
468
|
-
function keyBuilder$
|
|
469
|
-
return keyBuilder$
|
|
468
|
+
function keyBuilder$6(luvio, params) {
|
|
469
|
+
return keyBuilder$8(luvio, {
|
|
470
470
|
id: params.urlParams.mappingName
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
|
-
function getResponseCacheKeys$
|
|
474
|
-
getTypeCacheKeys$
|
|
473
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
474
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
475
475
|
}
|
|
476
|
-
function ingestSuccess$
|
|
476
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
477
477
|
const { body } = response;
|
|
478
|
-
const key = keyBuilder$
|
|
479
|
-
luvio.storeIngest(key, ingest$
|
|
478
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
479
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
480
480
|
const snapshot = luvio.storeLookup({
|
|
481
481
|
recordId: key,
|
|
482
|
-
node: select$
|
|
482
|
+
node: select$5(),
|
|
483
483
|
variables: {},
|
|
484
484
|
}, snapshotRefresh);
|
|
485
485
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -490,19 +490,19 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
490
490
|
deepFreeze(snapshot.data);
|
|
491
491
|
return snapshot;
|
|
492
492
|
}
|
|
493
|
-
function ingestError$
|
|
494
|
-
const key = keyBuilder$
|
|
493
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
494
|
+
const key = keyBuilder$6(luvio, params);
|
|
495
495
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
496
496
|
const storeMetadataParams = {
|
|
497
|
-
ttl: TTL$
|
|
497
|
+
ttl: TTL$2,
|
|
498
498
|
namespace: keyPrefix,
|
|
499
|
-
version: VERSION$
|
|
500
|
-
representationName: RepresentationType$
|
|
499
|
+
version: VERSION$2,
|
|
500
|
+
representationName: RepresentationType$2
|
|
501
501
|
};
|
|
502
502
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
503
503
|
return errorSnapshot;
|
|
504
504
|
}
|
|
505
|
-
function createResourceRequest$
|
|
505
|
+
function createResourceRequest$3(config) {
|
|
506
506
|
const headers = {};
|
|
507
507
|
return {
|
|
508
508
|
baseUri: '/services/data/v62.0',
|
|
@@ -515,127 +515,127 @@ function createResourceRequest$2(config) {
|
|
|
515
515
|
priority: 'normal',
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
|
-
function createResourceRequestFromRepresentation(representation) {
|
|
518
|
+
function createResourceRequestFromRepresentation$1(representation) {
|
|
519
519
|
const config = {
|
|
520
520
|
urlParams: {},
|
|
521
521
|
};
|
|
522
522
|
config.urlParams.mappingName = representation.mappingName;
|
|
523
|
-
return createResourceRequest$
|
|
523
|
+
return createResourceRequest$3(config);
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
const adapterName$
|
|
526
|
+
const adapterName$3 = 'getContextTagMapping';
|
|
527
527
|
const getContextTagMapping_ConfigPropertyMetadata = [
|
|
528
528
|
generateParamConfigMetadata('mappingName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
529
529
|
generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
530
530
|
generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
|
|
531
531
|
];
|
|
532
|
-
const getContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
533
|
-
const createResourceParams$
|
|
534
|
-
function keyBuilder$
|
|
535
|
-
const resourceParams = createResourceParams$
|
|
536
|
-
return keyBuilder$
|
|
532
|
+
const getContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getContextTagMapping_ConfigPropertyMetadata);
|
|
533
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getContextTagMapping_ConfigPropertyMetadata);
|
|
534
|
+
function keyBuilder$5(luvio, config) {
|
|
535
|
+
const resourceParams = createResourceParams$3(config);
|
|
536
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
537
537
|
}
|
|
538
|
-
function typeCheckConfig$
|
|
538
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
539
539
|
const config = {};
|
|
540
|
-
typeCheckConfig$
|
|
540
|
+
typeCheckConfig$6(untrustedConfig, config, getContextTagMapping_ConfigPropertyMetadata);
|
|
541
541
|
return config;
|
|
542
542
|
}
|
|
543
|
-
function validateAdapterConfig$
|
|
543
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
544
544
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
545
545
|
return null;
|
|
546
546
|
}
|
|
547
547
|
if (process.env.NODE_ENV !== 'production') {
|
|
548
548
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
549
549
|
}
|
|
550
|
-
const config = typeCheckConfig$
|
|
550
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
551
551
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
552
552
|
return null;
|
|
553
553
|
}
|
|
554
554
|
return config;
|
|
555
555
|
}
|
|
556
|
-
function adapterFragment$
|
|
557
|
-
createResourceParams$
|
|
558
|
-
return select$
|
|
556
|
+
function adapterFragment$2(luvio, config) {
|
|
557
|
+
createResourceParams$3(config);
|
|
558
|
+
return select$5();
|
|
559
559
|
}
|
|
560
|
-
function onFetchResponseSuccess$
|
|
561
|
-
const snapshot = ingestSuccess$
|
|
560
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
561
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
562
562
|
config,
|
|
563
|
-
resolve: () => buildNetworkSnapshot$
|
|
563
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
564
564
|
});
|
|
565
565
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
566
566
|
}
|
|
567
|
-
function onFetchResponseError$
|
|
568
|
-
const snapshot = ingestError$
|
|
567
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
568
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
569
569
|
config,
|
|
570
|
-
resolve: () => buildNetworkSnapshot$
|
|
570
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
571
571
|
});
|
|
572
572
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
573
573
|
}
|
|
574
|
-
function buildNetworkSnapshot$
|
|
575
|
-
const resourceParams = createResourceParams$
|
|
576
|
-
const request = createResourceRequest$
|
|
574
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
575
|
+
const resourceParams = createResourceParams$3(config);
|
|
576
|
+
const request = createResourceRequest$3(resourceParams);
|
|
577
577
|
return luvio.dispatchResourceRequest(request, options)
|
|
578
578
|
.then((response) => {
|
|
579
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
579
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
580
580
|
const cache = new StoreKeyMap();
|
|
581
|
-
getResponseCacheKeys$
|
|
581
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
582
582
|
return cache;
|
|
583
583
|
});
|
|
584
584
|
}, (response) => {
|
|
585
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
585
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
|
-
function buildNetworkSnapshotCachePolicy$
|
|
589
|
-
return buildNetworkSnapshotCachePolicy$
|
|
588
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
589
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
590
590
|
}
|
|
591
|
-
function buildCachedSnapshotCachePolicy$
|
|
591
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
592
592
|
const { luvio, config } = context;
|
|
593
593
|
const selector = {
|
|
594
|
-
recordId: keyBuilder$
|
|
595
|
-
node: adapterFragment$
|
|
594
|
+
recordId: keyBuilder$5(luvio, config),
|
|
595
|
+
node: adapterFragment$2(luvio, config),
|
|
596
596
|
variables: {},
|
|
597
597
|
};
|
|
598
598
|
const cacheSnapshot = storeLookup(selector, {
|
|
599
599
|
config,
|
|
600
|
-
resolve: () => buildNetworkSnapshot$
|
|
600
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
601
601
|
});
|
|
602
602
|
return cacheSnapshot;
|
|
603
603
|
}
|
|
604
604
|
const getContextTagMappingAdapterFactory = (luvio) => function contextrules__getContextTagMapping(untrustedConfig, requestContext) {
|
|
605
|
-
const config = validateAdapterConfig$
|
|
605
|
+
const config = validateAdapterConfig$3(untrustedConfig, getContextTagMapping_ConfigPropertyNames);
|
|
606
606
|
// Invalid or incomplete config
|
|
607
607
|
if (config === null) {
|
|
608
608
|
return null;
|
|
609
609
|
}
|
|
610
610
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
611
|
-
buildCachedSnapshotCachePolicy$
|
|
611
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
612
612
|
};
|
|
613
|
-
const notifyChangeFactory = (luvio, options) => {
|
|
613
|
+
const notifyChangeFactory$1 = (luvio, options) => {
|
|
614
614
|
return function getConnectContextRulesContextTagMappingsRuleLibraryApiNameVersionNumberMappingNameByMappingNameAndRuleLibraryApiNameAndVersionNumberNotifyChange(configs) {
|
|
615
|
-
const keys = configs.map(c => keyBuilder$
|
|
615
|
+
const keys = configs.map(c => keyBuilder$8(luvio, c));
|
|
616
616
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
617
617
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
618
618
|
const { key, record: val } = entries[i];
|
|
619
|
-
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
619
|
+
const refreshRequest = createResourceRequestFromRepresentation$1(val);
|
|
620
620
|
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
621
621
|
.then((response) => {
|
|
622
622
|
return luvio.handleSuccessResponse(() => {
|
|
623
623
|
const { body } = response;
|
|
624
|
-
luvio.storeIngest(key, ingest$
|
|
624
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
625
625
|
return luvio.storeBroadcast();
|
|
626
626
|
}, () => {
|
|
627
627
|
const cache = new StoreKeyMap();
|
|
628
|
-
getTypeCacheKeys$
|
|
628
|
+
getTypeCacheKeys$2(cache, luvio, response.body);
|
|
629
629
|
return cache;
|
|
630
630
|
});
|
|
631
631
|
}, (error) => {
|
|
632
632
|
return luvio.handleErrorResponse(() => {
|
|
633
633
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
634
634
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
635
|
-
ttl: TTL$
|
|
635
|
+
ttl: TTL$2,
|
|
636
636
|
namespace: keyPrefix,
|
|
637
|
-
version: VERSION$
|
|
638
|
-
representationName: RepresentationType$
|
|
637
|
+
version: VERSION$2,
|
|
638
|
+
representationName: RepresentationType$2
|
|
639
639
|
});
|
|
640
640
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
641
641
|
});
|
|
@@ -645,9 +645,9 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
645
645
|
};
|
|
646
646
|
};
|
|
647
647
|
|
|
648
|
-
const TTL = 1000;
|
|
649
|
-
const VERSION = "3839d94c828e170861b071d1d1fe5292";
|
|
650
|
-
function validate(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationList') {
|
|
648
|
+
const TTL$1 = 1000;
|
|
649
|
+
const VERSION$1 = "3839d94c828e170861b071d1d1fe5292";
|
|
650
|
+
function validate$3(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationList') {
|
|
651
651
|
const v_error = (() => {
|
|
652
652
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
653
653
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -660,7 +660,7 @@ function validate(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationLis
|
|
|
660
660
|
for (let i = 0; i < obj_ruleLibraryTagMappings.length; i++) {
|
|
661
661
|
const obj_ruleLibraryTagMappings_item = obj_ruleLibraryTagMappings[i];
|
|
662
662
|
const path_ruleLibraryTagMappings_item = path_ruleLibraryTagMappings + '[' + i + ']';
|
|
663
|
-
const referencepath_ruleLibraryTagMappings_itemValidationError = validate$
|
|
663
|
+
const referencepath_ruleLibraryTagMappings_itemValidationError = validate$4(obj_ruleLibraryTagMappings_item, path_ruleLibraryTagMappings_item);
|
|
664
664
|
if (referencepath_ruleLibraryTagMappings_itemValidationError !== null) {
|
|
665
665
|
let message = 'Object doesn\'t match RuleLibraryTagMappingsReadOutputRepresentation (at "' + path_ruleLibraryTagMappings_item + '")\n';
|
|
666
666
|
message += referencepath_ruleLibraryTagMappings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -670,11 +670,289 @@ function validate(obj, path = 'RuleLibraryTagMappingsReadOutputRepresentationLis
|
|
|
670
670
|
})();
|
|
671
671
|
return v_error === undefined ? null : v_error;
|
|
672
672
|
}
|
|
673
|
-
const RepresentationType = 'RuleLibraryTagMappingsReadOutputRepresentationList';
|
|
673
|
+
const RepresentationType$1 = 'RuleLibraryTagMappingsReadOutputRepresentationList';
|
|
674
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
675
|
+
return input;
|
|
676
|
+
}
|
|
677
|
+
const select$4 = function RuleLibraryTagMappingsReadOutputRepresentationListSelect() {
|
|
678
|
+
return {
|
|
679
|
+
kind: 'Fragment',
|
|
680
|
+
version: VERSION$1,
|
|
681
|
+
private: [],
|
|
682
|
+
opaque: true
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
function equals$1(existing, incoming) {
|
|
686
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
689
|
+
return true;
|
|
690
|
+
}
|
|
691
|
+
const ingest$1 = function RuleLibraryTagMappingsReadOutputRepresentationListIngest(input, path, luvio, store, timestamp) {
|
|
692
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
693
|
+
const validateError = validate$3(input);
|
|
694
|
+
if (validateError !== null) {
|
|
695
|
+
throw validateError;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
const key = path.fullPath;
|
|
699
|
+
const ttlToUse = TTL$1;
|
|
700
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "contextrules", VERSION$1, RepresentationType$1, equals$1);
|
|
701
|
+
return createLink(key);
|
|
702
|
+
};
|
|
703
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
704
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
705
|
+
const rootKey = fullPathFactory();
|
|
706
|
+
rootKeySet.set(rootKey, {
|
|
707
|
+
namespace: keyPrefix,
|
|
708
|
+
representationName: RepresentationType$1,
|
|
709
|
+
mergeable: false
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function select$3(luvio, params) {
|
|
714
|
+
return select$4();
|
|
715
|
+
}
|
|
716
|
+
function keyBuilder$4(luvio, params) {
|
|
717
|
+
return keyPrefix + '::RuleLibraryTagMappingsReadOutputRepresentationList:(' + 'ruleLibraryApiName:' + params.urlParams.ruleLibraryApiName + ',' + 'versionNumber:' + params.urlParams.versionNumber + ')';
|
|
718
|
+
}
|
|
719
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
720
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
721
|
+
}
|
|
722
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
723
|
+
const { body } = response;
|
|
724
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
725
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
726
|
+
const snapshot = luvio.storeLookup({
|
|
727
|
+
recordId: key,
|
|
728
|
+
node: select$3(),
|
|
729
|
+
variables: {},
|
|
730
|
+
}, snapshotRefresh);
|
|
731
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
732
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
733
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
deepFreeze(snapshot.data);
|
|
737
|
+
return snapshot;
|
|
738
|
+
}
|
|
739
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
740
|
+
const key = keyBuilder$4(luvio, params);
|
|
741
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
742
|
+
const storeMetadataParams = {
|
|
743
|
+
ttl: TTL$1,
|
|
744
|
+
namespace: keyPrefix,
|
|
745
|
+
version: VERSION$1,
|
|
746
|
+
representationName: RepresentationType$1
|
|
747
|
+
};
|
|
748
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
749
|
+
return errorSnapshot;
|
|
750
|
+
}
|
|
751
|
+
function createResourceRequest$2(config) {
|
|
752
|
+
const headers = {};
|
|
753
|
+
return {
|
|
754
|
+
baseUri: '/services/data/v62.0',
|
|
755
|
+
basePath: '/connect/context-rules/context-tag-mappings/rule-library-api-name/' + config.urlParams.ruleLibraryApiName + '/version-number/' + config.urlParams.versionNumber + '',
|
|
756
|
+
method: 'get',
|
|
757
|
+
body: null,
|
|
758
|
+
urlParams: config.urlParams,
|
|
759
|
+
queryParams: {},
|
|
760
|
+
headers,
|
|
761
|
+
priority: 'normal',
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
const adapterName$2 = 'getContextTagMappings';
|
|
766
|
+
const getContextTagMappings_ConfigPropertyMetadata = [
|
|
767
|
+
generateParamConfigMetadata('ruleLibraryApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
768
|
+
generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
|
|
769
|
+
];
|
|
770
|
+
const getContextTagMappings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getContextTagMappings_ConfigPropertyMetadata);
|
|
771
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getContextTagMappings_ConfigPropertyMetadata);
|
|
772
|
+
function keyBuilder$3(luvio, config) {
|
|
773
|
+
const resourceParams = createResourceParams$2(config);
|
|
774
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
775
|
+
}
|
|
776
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
777
|
+
const config = {};
|
|
778
|
+
typeCheckConfig$6(untrustedConfig, config, getContextTagMappings_ConfigPropertyMetadata);
|
|
779
|
+
return config;
|
|
780
|
+
}
|
|
781
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
782
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
783
|
+
return null;
|
|
784
|
+
}
|
|
785
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
786
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
787
|
+
}
|
|
788
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
789
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
790
|
+
return null;
|
|
791
|
+
}
|
|
792
|
+
return config;
|
|
793
|
+
}
|
|
794
|
+
function adapterFragment$1(luvio, config) {
|
|
795
|
+
createResourceParams$2(config);
|
|
796
|
+
return select$3();
|
|
797
|
+
}
|
|
798
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
799
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
800
|
+
config,
|
|
801
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
802
|
+
});
|
|
803
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
804
|
+
}
|
|
805
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
806
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
807
|
+
config,
|
|
808
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
809
|
+
});
|
|
810
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
811
|
+
}
|
|
812
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
813
|
+
const resourceParams = createResourceParams$2(config);
|
|
814
|
+
const request = createResourceRequest$2(resourceParams);
|
|
815
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
816
|
+
.then((response) => {
|
|
817
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
818
|
+
const cache = new StoreKeyMap();
|
|
819
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
820
|
+
return cache;
|
|
821
|
+
});
|
|
822
|
+
}, (response) => {
|
|
823
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
827
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
828
|
+
}
|
|
829
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
830
|
+
const { luvio, config } = context;
|
|
831
|
+
const selector = {
|
|
832
|
+
recordId: keyBuilder$3(luvio, config),
|
|
833
|
+
node: adapterFragment$1(luvio, config),
|
|
834
|
+
variables: {},
|
|
835
|
+
};
|
|
836
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
837
|
+
config,
|
|
838
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
839
|
+
});
|
|
840
|
+
return cacheSnapshot;
|
|
841
|
+
}
|
|
842
|
+
const getContextTagMappingsAdapterFactory = (luvio) => function contextrules__getContextTagMappings(untrustedConfig, requestContext) {
|
|
843
|
+
const config = validateAdapterConfig$2(untrustedConfig, getContextTagMappings_ConfigPropertyNames);
|
|
844
|
+
// Invalid or incomplete config
|
|
845
|
+
if (config === null) {
|
|
846
|
+
return null;
|
|
847
|
+
}
|
|
848
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
849
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
function validate$2(obj, path = 'UsageSubtypeHashLookupColumnOutputRepresentation') {
|
|
853
|
+
const v_error = (() => {
|
|
854
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
855
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
856
|
+
}
|
|
857
|
+
const obj_sequenceNumber = obj.sequenceNumber;
|
|
858
|
+
const path_sequenceNumber = path + '.sequenceNumber';
|
|
859
|
+
if (typeof obj_sequenceNumber !== 'number' || (typeof obj_sequenceNumber === 'number' && Math.floor(obj_sequenceNumber) !== obj_sequenceNumber)) {
|
|
860
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_sequenceNumber + '" (at "' + path_sequenceNumber + '")');
|
|
861
|
+
}
|
|
862
|
+
const obj_subtypeMappingName = obj.subtypeMappingName;
|
|
863
|
+
const path_subtypeMappingName = path + '.subtypeMappingName';
|
|
864
|
+
if (typeof obj_subtypeMappingName !== 'string') {
|
|
865
|
+
return new TypeError('Expected "string" but received "' + typeof obj_subtypeMappingName + '" (at "' + path_subtypeMappingName + '")');
|
|
866
|
+
}
|
|
867
|
+
})();
|
|
868
|
+
return v_error === undefined ? null : v_error;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
function validate$1(obj, path = 'UsageSubtypeOutputRepresentation') {
|
|
872
|
+
const v_error = (() => {
|
|
873
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
874
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
875
|
+
}
|
|
876
|
+
const obj_hashLookupColumns = obj.hashLookupColumns;
|
|
877
|
+
const path_hashLookupColumns = path + '.hashLookupColumns';
|
|
878
|
+
if (!ArrayIsArray(obj_hashLookupColumns)) {
|
|
879
|
+
return new TypeError('Expected "array" but received "' + typeof obj_hashLookupColumns + '" (at "' + path_hashLookupColumns + '")');
|
|
880
|
+
}
|
|
881
|
+
for (let i = 0; i < obj_hashLookupColumns.length; i++) {
|
|
882
|
+
const obj_hashLookupColumns_item = obj_hashLookupColumns[i];
|
|
883
|
+
const path_hashLookupColumns_item = path_hashLookupColumns + '[' + i + ']';
|
|
884
|
+
const referencepath_hashLookupColumns_itemValidationError = validate$2(obj_hashLookupColumns_item, path_hashLookupColumns_item);
|
|
885
|
+
if (referencepath_hashLookupColumns_itemValidationError !== null) {
|
|
886
|
+
let message = 'Object doesn\'t match UsageSubtypeHashLookupColumnOutputRepresentation (at "' + path_hashLookupColumns_item + '")\n';
|
|
887
|
+
message += referencepath_hashLookupColumns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
888
|
+
return new TypeError(message);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
const obj_usageSubtype = obj.usageSubtype;
|
|
892
|
+
const path_usageSubtype = path + '.usageSubtype';
|
|
893
|
+
if (typeof obj_usageSubtype !== 'string') {
|
|
894
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usageSubtype + '" (at "' + path_usageSubtype + '")');
|
|
895
|
+
}
|
|
896
|
+
})();
|
|
897
|
+
return v_error === undefined ? null : v_error;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
const TTL = 1000;
|
|
901
|
+
const VERSION = "19586883f36a2f3e5aa88a8708d670b4";
|
|
902
|
+
function validate(obj, path = 'UsageTypeOutputRepresentation') {
|
|
903
|
+
const v_error = (() => {
|
|
904
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
905
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
906
|
+
}
|
|
907
|
+
const obj_mappingNames = obj.mappingNames;
|
|
908
|
+
const path_mappingNames = path + '.mappingNames';
|
|
909
|
+
if (!ArrayIsArray(obj_mappingNames)) {
|
|
910
|
+
return new TypeError('Expected "array" but received "' + typeof obj_mappingNames + '" (at "' + path_mappingNames + '")');
|
|
911
|
+
}
|
|
912
|
+
for (let i = 0; i < obj_mappingNames.length; i++) {
|
|
913
|
+
const obj_mappingNames_item = obj_mappingNames[i];
|
|
914
|
+
const path_mappingNames_item = path_mappingNames + '[' + i + ']';
|
|
915
|
+
if (typeof obj_mappingNames_item !== 'string') {
|
|
916
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mappingNames_item + '" (at "' + path_mappingNames_item + '")');
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
const obj_usageSubtypes = obj.usageSubtypes;
|
|
920
|
+
const path_usageSubtypes = path + '.usageSubtypes';
|
|
921
|
+
if (!ArrayIsArray(obj_usageSubtypes)) {
|
|
922
|
+
return new TypeError('Expected "array" but received "' + typeof obj_usageSubtypes + '" (at "' + path_usageSubtypes + '")');
|
|
923
|
+
}
|
|
924
|
+
for (let i = 0; i < obj_usageSubtypes.length; i++) {
|
|
925
|
+
const obj_usageSubtypes_item = obj_usageSubtypes[i];
|
|
926
|
+
const path_usageSubtypes_item = path_usageSubtypes + '[' + i + ']';
|
|
927
|
+
const referencepath_usageSubtypes_itemValidationError = validate$1(obj_usageSubtypes_item, path_usageSubtypes_item);
|
|
928
|
+
if (referencepath_usageSubtypes_itemValidationError !== null) {
|
|
929
|
+
let message = 'Object doesn\'t match UsageSubtypeOutputRepresentation (at "' + path_usageSubtypes_item + '")\n';
|
|
930
|
+
message += referencepath_usageSubtypes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
931
|
+
return new TypeError(message);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
const obj_usageType = obj.usageType;
|
|
935
|
+
const path_usageType = path + '.usageType';
|
|
936
|
+
if (typeof obj_usageType !== 'string') {
|
|
937
|
+
return new TypeError('Expected "string" but received "' + typeof obj_usageType + '" (at "' + path_usageType + '")');
|
|
938
|
+
}
|
|
939
|
+
})();
|
|
940
|
+
return v_error === undefined ? null : v_error;
|
|
941
|
+
}
|
|
942
|
+
const RepresentationType = 'UsageTypeOutputRepresentation';
|
|
943
|
+
function keyBuilder$2(luvio, config) {
|
|
944
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
945
|
+
}
|
|
946
|
+
function keyBuilderFromType(luvio, object) {
|
|
947
|
+
const keyParams = {
|
|
948
|
+
id: object.usageType
|
|
949
|
+
};
|
|
950
|
+
return keyBuilder$2(luvio, keyParams);
|
|
951
|
+
}
|
|
674
952
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
675
953
|
return input;
|
|
676
954
|
}
|
|
677
|
-
const select$2 = function
|
|
955
|
+
const select$2 = function UsageTypeOutputRepresentationSelect() {
|
|
678
956
|
return {
|
|
679
957
|
kind: 'Fragment',
|
|
680
958
|
version: VERSION,
|
|
@@ -688,21 +966,21 @@ function equals(existing, incoming) {
|
|
|
688
966
|
}
|
|
689
967
|
return true;
|
|
690
968
|
}
|
|
691
|
-
const ingest = function
|
|
969
|
+
const ingest = function UsageTypeOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
692
970
|
if (process.env.NODE_ENV !== 'production') {
|
|
693
971
|
const validateError = validate(input);
|
|
694
972
|
if (validateError !== null) {
|
|
695
973
|
throw validateError;
|
|
696
974
|
}
|
|
697
975
|
}
|
|
698
|
-
const key =
|
|
976
|
+
const key = keyBuilderFromType(luvio, input);
|
|
699
977
|
const ttlToUse = TTL;
|
|
700
978
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "contextrules", VERSION, RepresentationType, equals);
|
|
701
979
|
return createLink(key);
|
|
702
980
|
};
|
|
703
981
|
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
704
982
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
705
|
-
const rootKey =
|
|
983
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
706
984
|
rootKeySet.set(rootKey, {
|
|
707
985
|
namespace: keyPrefix,
|
|
708
986
|
representationName: RepresentationType,
|
|
@@ -714,10 +992,12 @@ function select$1(luvio, params) {
|
|
|
714
992
|
return select$2();
|
|
715
993
|
}
|
|
716
994
|
function keyBuilder$1(luvio, params) {
|
|
717
|
-
return
|
|
995
|
+
return keyBuilder$2(luvio, {
|
|
996
|
+
id: params.urlParams.usageType
|
|
997
|
+
});
|
|
718
998
|
}
|
|
719
999
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
720
|
-
getTypeCacheKeys(storeKeyMap, luvio, response
|
|
1000
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
721
1001
|
}
|
|
722
1002
|
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
723
1003
|
const { body } = response;
|
|
@@ -752,7 +1032,7 @@ function createResourceRequest$1(config) {
|
|
|
752
1032
|
const headers = {};
|
|
753
1033
|
return {
|
|
754
1034
|
baseUri: '/services/data/v62.0',
|
|
755
|
-
basePath: '/connect/context-rules/
|
|
1035
|
+
basePath: '/connect/context-rules/usage-types/' + config.urlParams.usageType + '',
|
|
756
1036
|
method: 'get',
|
|
757
1037
|
body: null,
|
|
758
1038
|
urlParams: config.urlParams,
|
|
@@ -761,21 +1041,27 @@ function createResourceRequest$1(config) {
|
|
|
761
1041
|
priority: 'normal',
|
|
762
1042
|
};
|
|
763
1043
|
}
|
|
1044
|
+
function createResourceRequestFromRepresentation(representation) {
|
|
1045
|
+
const config = {
|
|
1046
|
+
urlParams: {},
|
|
1047
|
+
};
|
|
1048
|
+
config.urlParams.usageType = representation.usageType;
|
|
1049
|
+
return createResourceRequest$1(config);
|
|
1050
|
+
}
|
|
764
1051
|
|
|
765
|
-
const adapterName$1 = '
|
|
766
|
-
const
|
|
767
|
-
generateParamConfigMetadata('
|
|
768
|
-
generateParamConfigMetadata('versionNumber', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1052
|
+
const adapterName$1 = 'getUsageTypeDetail';
|
|
1053
|
+
const getUsageTypeDetail_ConfigPropertyMetadata = [
|
|
1054
|
+
generateParamConfigMetadata('usageType', true, 0 /* UrlParameter */, 0 /* String */),
|
|
769
1055
|
];
|
|
770
|
-
const
|
|
771
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
1056
|
+
const getUsageTypeDetail_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getUsageTypeDetail_ConfigPropertyMetadata);
|
|
1057
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getUsageTypeDetail_ConfigPropertyMetadata);
|
|
772
1058
|
function keyBuilder(luvio, config) {
|
|
773
1059
|
const resourceParams = createResourceParams$1(config);
|
|
774
1060
|
return keyBuilder$1(luvio, resourceParams);
|
|
775
1061
|
}
|
|
776
1062
|
function typeCheckConfig$1(untrustedConfig) {
|
|
777
1063
|
const config = {};
|
|
778
|
-
typeCheckConfig$
|
|
1064
|
+
typeCheckConfig$6(untrustedConfig, config, getUsageTypeDetail_ConfigPropertyMetadata);
|
|
779
1065
|
return config;
|
|
780
1066
|
}
|
|
781
1067
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -824,7 +1110,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
824
1110
|
});
|
|
825
1111
|
}
|
|
826
1112
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
827
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1113
|
+
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
828
1114
|
}
|
|
829
1115
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
830
1116
|
const { luvio, config } = context;
|
|
@@ -839,8 +1125,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
839
1125
|
});
|
|
840
1126
|
return cacheSnapshot;
|
|
841
1127
|
}
|
|
842
|
-
const
|
|
843
|
-
const config = validateAdapterConfig$1(untrustedConfig,
|
|
1128
|
+
const getUsageTypeDetailAdapterFactory = (luvio) => function contextrules__getUsageTypeDetail(untrustedConfig, requestContext) {
|
|
1129
|
+
const config = validateAdapterConfig$1(untrustedConfig, getUsageTypeDetail_ConfigPropertyNames);
|
|
844
1130
|
// Invalid or incomplete config
|
|
845
1131
|
if (config === null) {
|
|
846
1132
|
return null;
|
|
@@ -848,17 +1134,51 @@ const getContextTagMappingsAdapterFactory = (luvio) => function contextrules__ge
|
|
|
848
1134
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
849
1135
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
850
1136
|
};
|
|
1137
|
+
const notifyChangeFactory = (luvio, options) => {
|
|
1138
|
+
return function getConnectContextRulesUsageTypesByUsageTypeNotifyChange(configs) {
|
|
1139
|
+
const keys = configs.map(c => keyBuilder$2(luvio, c));
|
|
1140
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1141
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1142
|
+
const { key, record: val } = entries[i];
|
|
1143
|
+
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
1144
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
1145
|
+
.then((response) => {
|
|
1146
|
+
return luvio.handleSuccessResponse(() => {
|
|
1147
|
+
const { body } = response;
|
|
1148
|
+
luvio.storeIngest(key, ingest, body);
|
|
1149
|
+
return luvio.storeBroadcast();
|
|
1150
|
+
}, () => {
|
|
1151
|
+
const cache = new StoreKeyMap();
|
|
1152
|
+
getTypeCacheKeys(cache, luvio, response.body);
|
|
1153
|
+
return cache;
|
|
1154
|
+
});
|
|
1155
|
+
}, (error) => {
|
|
1156
|
+
return luvio.handleErrorResponse(() => {
|
|
1157
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1158
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
1159
|
+
ttl: TTL,
|
|
1160
|
+
namespace: keyPrefix,
|
|
1161
|
+
version: VERSION,
|
|
1162
|
+
representationName: RepresentationType
|
|
1163
|
+
});
|
|
1164
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1165
|
+
});
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
};
|
|
1170
|
+
};
|
|
851
1171
|
|
|
852
1172
|
function select(luvio, params) {
|
|
853
|
-
return select$
|
|
1173
|
+
return select$8();
|
|
854
1174
|
}
|
|
855
1175
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
856
|
-
getTypeCacheKeys$
|
|
1176
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
857
1177
|
}
|
|
858
1178
|
function ingestSuccess(luvio, resourceParams, response) {
|
|
859
1179
|
const { body } = response;
|
|
860
|
-
const key = keyBuilderFromType$
|
|
861
|
-
luvio.storeIngest(key, ingest$
|
|
1180
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
1181
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
862
1182
|
const snapshot = luvio.storeLookup({
|
|
863
1183
|
recordId: key,
|
|
864
1184
|
node: select(),
|
|
@@ -893,12 +1213,12 @@ const updateContextTagMapping_ConfigPropertyMetadata = [
|
|
|
893
1213
|
generateParamConfigMetadata('contextTagMappings', true, 2 /* Body */, 4 /* Unsupported */),
|
|
894
1214
|
];
|
|
895
1215
|
const updateContextTagMapping_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateContextTagMapping_ConfigPropertyMetadata);
|
|
896
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1216
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$6(updateContextTagMapping_ConfigPropertyMetadata);
|
|
897
1217
|
function typeCheckConfig(untrustedConfig) {
|
|
898
1218
|
const config = {};
|
|
899
|
-
typeCheckConfig$
|
|
1219
|
+
typeCheckConfig$6(untrustedConfig, config, updateContextTagMapping_ConfigPropertyMetadata);
|
|
900
1220
|
const untrustedConfig_contextTagMappings = untrustedConfig.contextTagMappings;
|
|
901
|
-
const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$
|
|
1221
|
+
const referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError = validate$6(untrustedConfig_contextTagMappings);
|
|
902
1222
|
if (referenceRuleLibraryTagMappingsListWrapperRepresentationValidationError === null) {
|
|
903
1223
|
config.contextTagMappings = untrustedConfig_contextTagMappings;
|
|
904
1224
|
}
|
|
@@ -951,10 +1271,13 @@ let deleteContextTagMapping;
|
|
|
951
1271
|
let getContextTagMapping;
|
|
952
1272
|
let getContextTagMappingNotifyChange;
|
|
953
1273
|
let getContextTagMappings;
|
|
1274
|
+
let getUsageTypeDetail;
|
|
1275
|
+
let getUsageTypeDetailNotifyChange;
|
|
954
1276
|
let updateContextTagMapping;
|
|
955
1277
|
// Imperative GET Adapters
|
|
956
1278
|
let getContextTagMapping_imperative;
|
|
957
1279
|
let getContextTagMappings_imperative;
|
|
1280
|
+
let getUsageTypeDetail_imperative;
|
|
958
1281
|
const getContextTagMappingMetadata = {
|
|
959
1282
|
apiFamily: 'contextrules',
|
|
960
1283
|
name: 'getContextTagMapping',
|
|
@@ -965,25 +1288,34 @@ const getContextTagMappingsMetadata = {
|
|
|
965
1288
|
name: 'getContextTagMappings',
|
|
966
1289
|
ttl: 1000,
|
|
967
1290
|
};
|
|
1291
|
+
const getUsageTypeDetailMetadata = {
|
|
1292
|
+
apiFamily: 'contextrules',
|
|
1293
|
+
name: 'getUsageTypeDetail',
|
|
1294
|
+
ttl: 1000,
|
|
1295
|
+
};
|
|
968
1296
|
// Notify Update Available
|
|
969
1297
|
function bindExportsTo(luvio) {
|
|
970
1298
|
// LDS Adapters
|
|
971
1299
|
const getContextTagMapping_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getContextTagMapping', getContextTagMappingAdapterFactory), getContextTagMappingMetadata);
|
|
972
1300
|
const getContextTagMappings_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getContextTagMappings', getContextTagMappingsAdapterFactory), getContextTagMappingsMetadata);
|
|
1301
|
+
const getUsageTypeDetail_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getUsageTypeDetail', getUsageTypeDetailAdapterFactory), getUsageTypeDetailMetadata);
|
|
973
1302
|
function unwrapSnapshotData(factory) {
|
|
974
1303
|
const adapter = factory(luvio);
|
|
975
1304
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
976
1305
|
}
|
|
977
1306
|
return {
|
|
978
1307
|
createContextTagMapping: unwrapSnapshotData(createContextTagMappingAdapterFactory),
|
|
979
|
-
deleteContextTagMapping: createLDSAdapter(luvio, adapterName$
|
|
1308
|
+
deleteContextTagMapping: createLDSAdapter(luvio, adapterName$4, deleteContextTagMappingAdapterFactory),
|
|
980
1309
|
getContextTagMapping: createWireAdapterConstructor(luvio, getContextTagMapping_ldsAdapter, getContextTagMappingMetadata),
|
|
981
|
-
getContextTagMappingNotifyChange: createLDSAdapter(luvio, 'getContextTagMappingNotifyChange', notifyChangeFactory),
|
|
1310
|
+
getContextTagMappingNotifyChange: createLDSAdapter(luvio, 'getContextTagMappingNotifyChange', notifyChangeFactory$1),
|
|
982
1311
|
getContextTagMappings: createWireAdapterConstructor(luvio, getContextTagMappings_ldsAdapter, getContextTagMappingsMetadata),
|
|
1312
|
+
getUsageTypeDetail: createWireAdapterConstructor(luvio, getUsageTypeDetail_ldsAdapter, getUsageTypeDetailMetadata),
|
|
1313
|
+
getUsageTypeDetailNotifyChange: createLDSAdapter(luvio, 'getUsageTypeDetailNotifyChange', notifyChangeFactory),
|
|
983
1314
|
updateContextTagMapping: unwrapSnapshotData(updateContextTagMappingAdapterFactory),
|
|
984
1315
|
// Imperative GET Adapters
|
|
985
1316
|
getContextTagMapping_imperative: createImperativeAdapter(luvio, getContextTagMapping_ldsAdapter, getContextTagMappingMetadata),
|
|
986
1317
|
getContextTagMappings_imperative: createImperativeAdapter(luvio, getContextTagMappings_ldsAdapter, getContextTagMappingsMetadata),
|
|
1318
|
+
getUsageTypeDetail_imperative: createImperativeAdapter(luvio, getUsageTypeDetail_ldsAdapter, getUsageTypeDetailMetadata),
|
|
987
1319
|
// Notify Update Availables
|
|
988
1320
|
};
|
|
989
1321
|
}
|
|
@@ -994,11 +1326,14 @@ withDefaultLuvio((luvio) => {
|
|
|
994
1326
|
getContextTagMapping,
|
|
995
1327
|
getContextTagMappingNotifyChange,
|
|
996
1328
|
getContextTagMappings,
|
|
1329
|
+
getUsageTypeDetail,
|
|
1330
|
+
getUsageTypeDetailNotifyChange,
|
|
997
1331
|
updateContextTagMapping,
|
|
998
1332
|
getContextTagMapping_imperative,
|
|
999
1333
|
getContextTagMappings_imperative,
|
|
1334
|
+
getUsageTypeDetail_imperative,
|
|
1000
1335
|
} = bindExportsTo(luvio));
|
|
1001
1336
|
});
|
|
1002
1337
|
|
|
1003
|
-
export { createContextTagMapping, deleteContextTagMapping, getContextTagMapping, getContextTagMappingNotifyChange, getContextTagMapping_imperative, getContextTagMappings, getContextTagMappings_imperative, updateContextTagMapping };
|
|
1004
|
-
// version: 1.
|
|
1338
|
+
export { createContextTagMapping, deleteContextTagMapping, getContextTagMapping, getContextTagMappingNotifyChange, getContextTagMapping_imperative, getContextTagMappings, getContextTagMappings_imperative, getUsageTypeDetail, getUsageTypeDetailNotifyChange, getUsageTypeDetail_imperative, updateContextTagMapping };
|
|
1339
|
+
// version: 1.294.0-e7eb16228
|