@salesforce/lds-adapters-industries-interesttagging 1.371.0 → 1.372.1
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-interesttagging.js +600 -244
- package/dist/es/es2018/types/src/generated/adapters/createInterestTagsAndCategories.d.ts +16 -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 +2 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectInterestTagsTagsAndCategories.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/types/CategoryCreatedResult.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/InterestTagAndCategoryCreateInputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/InterestTagAndCategoryCreateOutputRepresentation.d.ts +50 -0
- package/dist/es/es2018/types/src/generated/types/InterestTagAndCategoryErrorOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/InterestTagAndCategoryItemInputRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/InterestTagItemInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/TagCreatedOutputRepresentation.d.ts +31 -0
- package/package.json +6 -5
- package/sfdc/index.js +407 -48
- package/src/raml/api.raml +127 -0
- package/src/raml/luvio.raml +10 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$6, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$6 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -92,9 +92,9 @@ function createLink(ref) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
const TTL$
|
|
96
|
-
const VERSION$
|
|
97
|
-
function validate$
|
|
95
|
+
const TTL$2 = 10000;
|
|
96
|
+
const VERSION$6 = "d1e3c71d06accea875e9f0c6f41bd7bd";
|
|
97
|
+
function validate$d(obj, path = 'InterestTagAssignmentOutputRepresentation') {
|
|
98
98
|
const v_error = (() => {
|
|
99
99
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
100
100
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -124,70 +124,70 @@ function validate$7(obj, path = 'InterestTagAssignmentOutputRepresentation') {
|
|
|
124
124
|
})();
|
|
125
125
|
return v_error === undefined ? null : v_error;
|
|
126
126
|
}
|
|
127
|
-
const RepresentationType$
|
|
128
|
-
function keyBuilder$
|
|
129
|
-
return keyPrefix + '::' + RepresentationType$
|
|
127
|
+
const RepresentationType$4 = 'InterestTagAssignmentOutputRepresentation';
|
|
128
|
+
function keyBuilder$9(luvio, config) {
|
|
129
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + '[' + config.errors.join(',') + ']' + ':' + config.isCreated + ':' + config.isSuccess;
|
|
130
130
|
}
|
|
131
|
-
function keyBuilderFromType(luvio, object) {
|
|
131
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
132
132
|
const keyParams = {
|
|
133
133
|
errors: object.errors,
|
|
134
134
|
isCreated: object.isCreated,
|
|
135
135
|
isSuccess: object.isSuccess
|
|
136
136
|
};
|
|
137
|
-
return keyBuilder$
|
|
137
|
+
return keyBuilder$9(luvio, keyParams);
|
|
138
138
|
}
|
|
139
|
-
function normalize$
|
|
139
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
140
140
|
return input;
|
|
141
141
|
}
|
|
142
|
-
const select$
|
|
142
|
+
const select$c = function InterestTagAssignmentOutputRepresentationSelect() {
|
|
143
143
|
return {
|
|
144
144
|
kind: 'Fragment',
|
|
145
|
-
version: VERSION$
|
|
145
|
+
version: VERSION$6,
|
|
146
146
|
private: [],
|
|
147
147
|
opaque: true
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
-
function equals$
|
|
150
|
+
function equals$6(existing, incoming) {
|
|
151
151
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
152
152
|
return false;
|
|
153
153
|
}
|
|
154
154
|
return true;
|
|
155
155
|
}
|
|
156
|
-
const ingest$
|
|
156
|
+
const ingest$4 = function InterestTagAssignmentOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
157
157
|
if (process.env.NODE_ENV !== 'production') {
|
|
158
|
-
const validateError = validate$
|
|
158
|
+
const validateError = validate$d(input);
|
|
159
159
|
if (validateError !== null) {
|
|
160
160
|
throw validateError;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
const key = keyBuilderFromType(luvio, input);
|
|
164
|
-
const ttlToUse = TTL$
|
|
165
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
163
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
164
|
+
const ttlToUse = TTL$2;
|
|
165
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "interesttagging", VERSION$6, RepresentationType$4, equals$6);
|
|
166
166
|
return createLink(key);
|
|
167
167
|
};
|
|
168
|
-
function getTypeCacheKeys$
|
|
168
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
169
169
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
170
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
170
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
171
171
|
rootKeySet.set(rootKey, {
|
|
172
172
|
namespace: keyPrefix,
|
|
173
|
-
representationName: RepresentationType$
|
|
173
|
+
representationName: RepresentationType$4,
|
|
174
174
|
mergeable: false
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
function select$
|
|
179
|
-
return select$
|
|
178
|
+
function select$b(luvio, params) {
|
|
179
|
+
return select$c();
|
|
180
180
|
}
|
|
181
|
-
function getResponseCacheKeys$
|
|
182
|
-
getTypeCacheKeys$
|
|
181
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
182
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
183
183
|
}
|
|
184
|
-
function ingestSuccess$
|
|
184
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
185
185
|
const { body } = response;
|
|
186
|
-
const key = keyBuilderFromType(luvio, body);
|
|
187
|
-
luvio.storeIngest(key, ingest$
|
|
186
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
187
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
188
188
|
const snapshot = luvio.storeLookup({
|
|
189
189
|
recordId: key,
|
|
190
|
-
node: select$
|
|
190
|
+
node: select$b(),
|
|
191
191
|
variables: {},
|
|
192
192
|
});
|
|
193
193
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -198,7 +198,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
198
198
|
deepFreeze(snapshot.data);
|
|
199
199
|
return snapshot;
|
|
200
200
|
}
|
|
201
|
-
function createResourceRequest$
|
|
201
|
+
function createResourceRequest$5(config) {
|
|
202
202
|
const headers = {};
|
|
203
203
|
return {
|
|
204
204
|
baseUri: '/services/data/v65.0',
|
|
@@ -212,14 +212,14 @@ function createResourceRequest$4(config) {
|
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
const adapterName$
|
|
215
|
+
const adapterName$5 = 'createInterestTagEntityAssignment';
|
|
216
216
|
const createInterestTagEntityAssignment_ConfigPropertyMetadata = [
|
|
217
217
|
generateParamConfigMetadata('recordsForTag', true, 2 /* Body */, 4 /* Unsupported */),
|
|
218
218
|
generateParamConfigMetadata('tagsForRecord', true, 2 /* Body */, 4 /* Unsupported */),
|
|
219
219
|
];
|
|
220
|
-
const createInterestTagEntityAssignment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
221
|
-
const createResourceParams$
|
|
222
|
-
function typeCheckConfig$
|
|
220
|
+
const createInterestTagEntityAssignment_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, createInterestTagEntityAssignment_ConfigPropertyMetadata);
|
|
221
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(createInterestTagEntityAssignment_ConfigPropertyMetadata);
|
|
222
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
223
223
|
const config = {};
|
|
224
224
|
const untrustedConfig_recordsForTag = untrustedConfig.recordsForTag;
|
|
225
225
|
if (untrustedIsObject(untrustedConfig_recordsForTag)) {
|
|
@@ -267,30 +267,30 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
267
267
|
}
|
|
268
268
|
return config;
|
|
269
269
|
}
|
|
270
|
-
function validateAdapterConfig$
|
|
270
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
271
271
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
272
272
|
return null;
|
|
273
273
|
}
|
|
274
274
|
if (process.env.NODE_ENV !== 'production') {
|
|
275
275
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
276
276
|
}
|
|
277
|
-
const config = typeCheckConfig$
|
|
277
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
278
278
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
279
279
|
return null;
|
|
280
280
|
}
|
|
281
281
|
return config;
|
|
282
282
|
}
|
|
283
|
-
function buildNetworkSnapshot$
|
|
284
|
-
const resourceParams = createResourceParams$
|
|
285
|
-
const request = createResourceRequest$
|
|
283
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
284
|
+
const resourceParams = createResourceParams$5(config);
|
|
285
|
+
const request = createResourceRequest$5(resourceParams);
|
|
286
286
|
return luvio.dispatchResourceRequest(request, options)
|
|
287
287
|
.then((response) => {
|
|
288
288
|
return luvio.handleSuccessResponse(() => {
|
|
289
|
-
const snapshot = ingestSuccess$
|
|
289
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
290
290
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
291
291
|
}, () => {
|
|
292
292
|
const cache = new StoreKeyMap();
|
|
293
|
-
getResponseCacheKeys$
|
|
293
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
294
294
|
return cache;
|
|
295
295
|
});
|
|
296
296
|
}, (response) => {
|
|
@@ -300,16 +300,16 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
300
300
|
}
|
|
301
301
|
const createInterestTagEntityAssignmentAdapterFactory = (luvio) => {
|
|
302
302
|
return function createInterestTagEntityAssignment(untrustedConfig) {
|
|
303
|
-
const config = validateAdapterConfig$
|
|
303
|
+
const config = validateAdapterConfig$5(untrustedConfig, createInterestTagEntityAssignment_ConfigPropertyNames);
|
|
304
304
|
// Invalid or incomplete config
|
|
305
305
|
if (config === null) {
|
|
306
306
|
throw new Error('Invalid config for "createInterestTagEntityAssignment"');
|
|
307
307
|
}
|
|
308
|
-
return buildNetworkSnapshot$
|
|
308
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
311
|
|
|
312
|
-
function validate$
|
|
312
|
+
function validate$c(obj, path = 'TagCategoryRepresentation') {
|
|
313
313
|
const v_error = (() => {
|
|
314
314
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
315
315
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -333,7 +333,7 @@ function validate$6(obj, path = 'TagCategoryRepresentation') {
|
|
|
333
333
|
return v_error === undefined ? null : v_error;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
function validate$
|
|
336
|
+
function validate$b(obj, path = 'InterestTagRepresentation') {
|
|
337
337
|
const v_error = (() => {
|
|
338
338
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
339
339
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -346,7 +346,7 @@ function validate$5(obj, path = 'InterestTagRepresentation') {
|
|
|
346
346
|
for (let i = 0; i < obj_categories.length; i++) {
|
|
347
347
|
const obj_categories_item = obj_categories[i];
|
|
348
348
|
const path_categories_item = path_categories + '[' + i + ']';
|
|
349
|
-
const referencepath_categories_itemValidationError = validate$
|
|
349
|
+
const referencepath_categories_itemValidationError = validate$c(obj_categories_item, path_categories_item);
|
|
350
350
|
if (referencepath_categories_itemValidationError !== null) {
|
|
351
351
|
let message = 'Object doesn\'t match TagCategoryRepresentation (at "' + path_categories_item + '")\n';
|
|
352
352
|
message += referencepath_categories_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -372,9 +372,9 @@ function validate$5(obj, path = 'InterestTagRepresentation') {
|
|
|
372
372
|
return v_error === undefined ? null : v_error;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
const TTL = 10000;
|
|
376
|
-
const VERSION$
|
|
377
|
-
function validate$
|
|
375
|
+
const TTL$1 = 10000;
|
|
376
|
+
const VERSION$5 = "a7f32ea47ff9fb394c6f9e13003a5595";
|
|
377
|
+
function validate$a(obj, path = 'InterestTagListRepresentation') {
|
|
378
378
|
const v_error = (() => {
|
|
379
379
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
380
380
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -387,7 +387,7 @@ function validate$4(obj, path = 'InterestTagListRepresentation') {
|
|
|
387
387
|
for (let i = 0; i < obj_tags.length; i++) {
|
|
388
388
|
const obj_tags_item = obj_tags[i];
|
|
389
389
|
const path_tags_item = path_tags + '[' + i + ']';
|
|
390
|
-
const referencepath_tags_itemValidationError = validate$
|
|
390
|
+
const referencepath_tags_itemValidationError = validate$b(obj_tags_item, path_tags_item);
|
|
391
391
|
if (referencepath_tags_itemValidationError !== null) {
|
|
392
392
|
let message = 'Object doesn\'t match InterestTagRepresentation (at "' + path_tags_item + '")\n';
|
|
393
393
|
message += referencepath_tags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -397,62 +397,62 @@ function validate$4(obj, path = 'InterestTagListRepresentation') {
|
|
|
397
397
|
})();
|
|
398
398
|
return v_error === undefined ? null : v_error;
|
|
399
399
|
}
|
|
400
|
-
const RepresentationType$
|
|
401
|
-
function normalize$
|
|
400
|
+
const RepresentationType$3 = 'InterestTagListRepresentation';
|
|
401
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
402
402
|
return input;
|
|
403
403
|
}
|
|
404
|
-
const select$
|
|
404
|
+
const select$a = function InterestTagListRepresentationSelect() {
|
|
405
405
|
return {
|
|
406
406
|
kind: 'Fragment',
|
|
407
|
-
version: VERSION$
|
|
407
|
+
version: VERSION$5,
|
|
408
408
|
private: [],
|
|
409
409
|
opaque: true
|
|
410
410
|
};
|
|
411
411
|
};
|
|
412
|
-
function equals$
|
|
412
|
+
function equals$5(existing, incoming) {
|
|
413
413
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
414
414
|
return false;
|
|
415
415
|
}
|
|
416
416
|
return true;
|
|
417
417
|
}
|
|
418
|
-
const ingest$
|
|
418
|
+
const ingest$3 = function InterestTagListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
419
419
|
if (process.env.NODE_ENV !== 'production') {
|
|
420
|
-
const validateError = validate$
|
|
420
|
+
const validateError = validate$a(input);
|
|
421
421
|
if (validateError !== null) {
|
|
422
422
|
throw validateError;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
const key = path.fullPath;
|
|
426
|
-
const ttlToUse = TTL;
|
|
427
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
426
|
+
const ttlToUse = TTL$1;
|
|
427
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "interesttagging", VERSION$5, RepresentationType$3, equals$5);
|
|
428
428
|
return createLink(key);
|
|
429
429
|
};
|
|
430
|
-
function getTypeCacheKeys$
|
|
430
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
431
431
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
432
432
|
const rootKey = fullPathFactory();
|
|
433
433
|
rootKeySet.set(rootKey, {
|
|
434
434
|
namespace: keyPrefix,
|
|
435
|
-
representationName: RepresentationType$
|
|
435
|
+
representationName: RepresentationType$3,
|
|
436
436
|
mergeable: false
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
|
|
440
|
-
function select$
|
|
441
|
-
return select$
|
|
440
|
+
function select$9(luvio, params) {
|
|
441
|
+
return select$a();
|
|
442
442
|
}
|
|
443
|
-
function keyBuilder$
|
|
443
|
+
function keyBuilder$8(luvio, params) {
|
|
444
444
|
return keyPrefix + '::InterestTagListRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ',' + 'sort:' + params.queryParams.sort + ',' + 'recordId:' + params.urlParams.recordId + ')';
|
|
445
445
|
}
|
|
446
|
-
function getResponseCacheKeys$
|
|
447
|
-
getTypeCacheKeys$
|
|
446
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
447
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
448
448
|
}
|
|
449
|
-
function ingestSuccess$
|
|
449
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
450
450
|
const { body } = response;
|
|
451
|
-
const key = keyBuilder$
|
|
452
|
-
luvio.storeIngest(key, ingest$
|
|
451
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
452
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
453
453
|
const snapshot = luvio.storeLookup({
|
|
454
454
|
recordId: key,
|
|
455
|
-
node: select$
|
|
455
|
+
node: select$9(),
|
|
456
456
|
variables: {},
|
|
457
457
|
}, snapshotRefresh);
|
|
458
458
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -464,18 +464,18 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
464
464
|
return snapshot;
|
|
465
465
|
}
|
|
466
466
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
467
|
-
const key = keyBuilder$
|
|
467
|
+
const key = keyBuilder$8(luvio, params);
|
|
468
468
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
469
469
|
const storeMetadataParams = {
|
|
470
|
-
ttl: TTL,
|
|
470
|
+
ttl: TTL$1,
|
|
471
471
|
namespace: keyPrefix,
|
|
472
|
-
version: VERSION$
|
|
473
|
-
representationName: RepresentationType$
|
|
472
|
+
version: VERSION$5,
|
|
473
|
+
representationName: RepresentationType$3
|
|
474
474
|
};
|
|
475
475
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
476
476
|
return errorSnapshot;
|
|
477
477
|
}
|
|
478
|
-
function createResourceRequest$
|
|
478
|
+
function createResourceRequest$4(config) {
|
|
479
479
|
const headers = {};
|
|
480
480
|
return {
|
|
481
481
|
baseUri: '/services/data/v65.0',
|
|
@@ -489,7 +489,7 @@ function createResourceRequest$3(config) {
|
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
const adapterName$
|
|
492
|
+
const adapterName$4 = 'getTagsByRecordId';
|
|
493
493
|
const getTagsByRecordId_ConfigPropertyMetadata = [
|
|
494
494
|
generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
495
495
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -497,56 +497,56 @@ const getTagsByRecordId_ConfigPropertyMetadata = [
|
|
|
497
497
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
498
498
|
generateParamConfigMetadata('sort', false, 1 /* QueryParameter */, 0 /* String */),
|
|
499
499
|
];
|
|
500
|
-
const getTagsByRecordId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
501
|
-
const createResourceParams$
|
|
502
|
-
function keyBuilder$
|
|
503
|
-
const resourceParams = createResourceParams$
|
|
504
|
-
return keyBuilder$
|
|
500
|
+
const getTagsByRecordId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getTagsByRecordId_ConfigPropertyMetadata);
|
|
501
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(getTagsByRecordId_ConfigPropertyMetadata);
|
|
502
|
+
function keyBuilder$7(luvio, config) {
|
|
503
|
+
const resourceParams = createResourceParams$4(config);
|
|
504
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
505
505
|
}
|
|
506
|
-
function typeCheckConfig$
|
|
506
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
507
507
|
const config = {};
|
|
508
|
-
typeCheckConfig$
|
|
508
|
+
typeCheckConfig$6(untrustedConfig, config, getTagsByRecordId_ConfigPropertyMetadata);
|
|
509
509
|
return config;
|
|
510
510
|
}
|
|
511
|
-
function validateAdapterConfig$
|
|
511
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
512
512
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
513
513
|
return null;
|
|
514
514
|
}
|
|
515
515
|
if (process.env.NODE_ENV !== 'production') {
|
|
516
516
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
517
517
|
}
|
|
518
|
-
const config = typeCheckConfig$
|
|
518
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
519
519
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
520
520
|
return null;
|
|
521
521
|
}
|
|
522
522
|
return config;
|
|
523
523
|
}
|
|
524
524
|
function adapterFragment$3(luvio, config) {
|
|
525
|
-
createResourceParams$
|
|
526
|
-
return select$
|
|
525
|
+
createResourceParams$4(config);
|
|
526
|
+
return select$9();
|
|
527
527
|
}
|
|
528
528
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
529
|
-
const snapshot = ingestSuccess$
|
|
529
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
530
530
|
config,
|
|
531
|
-
resolve: () => buildNetworkSnapshot$
|
|
531
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
532
532
|
});
|
|
533
533
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
534
534
|
}
|
|
535
535
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
536
536
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
537
537
|
config,
|
|
538
|
-
resolve: () => buildNetworkSnapshot$
|
|
538
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
539
539
|
});
|
|
540
540
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
541
541
|
}
|
|
542
|
-
function buildNetworkSnapshot$
|
|
543
|
-
const resourceParams = createResourceParams$
|
|
544
|
-
const request = createResourceRequest$
|
|
542
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
543
|
+
const resourceParams = createResourceParams$4(config);
|
|
544
|
+
const request = createResourceRequest$4(resourceParams);
|
|
545
545
|
return luvio.dispatchResourceRequest(request, options)
|
|
546
546
|
.then((response) => {
|
|
547
547
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
548
548
|
const cache = new StoreKeyMap();
|
|
549
|
-
getResponseCacheKeys$
|
|
549
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
550
550
|
return cache;
|
|
551
551
|
});
|
|
552
552
|
}, (response) => {
|
|
@@ -554,23 +554,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
557
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
557
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
558
558
|
}
|
|
559
559
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
560
560
|
const { luvio, config } = context;
|
|
561
561
|
const selector = {
|
|
562
|
-
recordId: keyBuilder$
|
|
562
|
+
recordId: keyBuilder$7(luvio, config),
|
|
563
563
|
node: adapterFragment$3(luvio, config),
|
|
564
564
|
variables: {},
|
|
565
565
|
};
|
|
566
566
|
const cacheSnapshot = storeLookup(selector, {
|
|
567
567
|
config,
|
|
568
|
-
resolve: () => buildNetworkSnapshot$
|
|
568
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
569
569
|
});
|
|
570
570
|
return cacheSnapshot;
|
|
571
571
|
}
|
|
572
572
|
const getTagsByRecordIdAdapterFactory = (luvio) => function interesttagging__getTagsByRecordId(untrustedConfig, requestContext) {
|
|
573
|
-
const config = validateAdapterConfig$
|
|
573
|
+
const config = validateAdapterConfig$4(untrustedConfig, getTagsByRecordId_ConfigPropertyNames);
|
|
574
574
|
// Invalid or incomplete config
|
|
575
575
|
if (config === null) {
|
|
576
576
|
return null;
|
|
@@ -579,8 +579,8 @@ const getTagsByRecordIdAdapterFactory = (luvio) => function interesttagging__get
|
|
|
579
579
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
580
580
|
};
|
|
581
581
|
|
|
582
|
-
const VERSION$
|
|
583
|
-
function validate$
|
|
582
|
+
const VERSION$4 = "bead7737d6de24db2005f390553ce4bf";
|
|
583
|
+
function validate$9(obj, path = 'TagRecordAssignment') {
|
|
584
584
|
const v_error = (() => {
|
|
585
585
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
586
586
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -608,10 +608,10 @@ function validate$3(obj, path = 'TagRecordAssignment') {
|
|
|
608
608
|
})();
|
|
609
609
|
return v_error === undefined ? null : v_error;
|
|
610
610
|
}
|
|
611
|
-
const select$
|
|
611
|
+
const select$8 = function TagRecordAssignmentSelect() {
|
|
612
612
|
return {
|
|
613
613
|
kind: 'Fragment',
|
|
614
|
-
version: VERSION$
|
|
614
|
+
version: VERSION$4,
|
|
615
615
|
private: [],
|
|
616
616
|
selections: [
|
|
617
617
|
{
|
|
@@ -633,7 +633,7 @@ const select$6 = function TagRecordAssignmentSelect() {
|
|
|
633
633
|
]
|
|
634
634
|
};
|
|
635
635
|
};
|
|
636
|
-
function equals$
|
|
636
|
+
function equals$4(existing, incoming) {
|
|
637
637
|
const existing_assignmentId = existing.assignmentId;
|
|
638
638
|
const incoming_assignmentId = incoming.assignmentId;
|
|
639
639
|
if (!(existing_assignmentId === incoming_assignmentId)) {
|
|
@@ -657,8 +657,8 @@ function equals$3(existing, incoming) {
|
|
|
657
657
|
return true;
|
|
658
658
|
}
|
|
659
659
|
|
|
660
|
-
const VERSION$
|
|
661
|
-
function validate$
|
|
660
|
+
const VERSION$3 = "2c249834bed42974b83ef01b3abacb2c";
|
|
661
|
+
function validate$8(obj, path = 'TagRecordAssignmentCollectionRepresentation') {
|
|
662
662
|
const v_error = (() => {
|
|
663
663
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
664
664
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -671,7 +671,7 @@ function validate$2(obj, path = 'TagRecordAssignmentCollectionRepresentation') {
|
|
|
671
671
|
for (let i = 0; i < obj_assignments.length; i++) {
|
|
672
672
|
const obj_assignments_item = obj_assignments[i];
|
|
673
673
|
const path_assignments_item = path_assignments + '[' + i + ']';
|
|
674
|
-
const referencepath_assignments_itemValidationError = validate$
|
|
674
|
+
const referencepath_assignments_itemValidationError = validate$9(obj_assignments_item, path_assignments_item);
|
|
675
675
|
if (referencepath_assignments_itemValidationError !== null) {
|
|
676
676
|
let message = 'Object doesn\'t match TagRecordAssignment (at "' + path_assignments_item + '")\n';
|
|
677
677
|
message += referencepath_assignments_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -681,15 +681,15 @@ function validate$2(obj, path = 'TagRecordAssignmentCollectionRepresentation') {
|
|
|
681
681
|
})();
|
|
682
682
|
return v_error === undefined ? null : v_error;
|
|
683
683
|
}
|
|
684
|
-
const RepresentationType$
|
|
685
|
-
function normalize$
|
|
684
|
+
const RepresentationType$2 = 'TagRecordAssignmentCollectionRepresentation';
|
|
685
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
686
686
|
return input;
|
|
687
687
|
}
|
|
688
|
-
const select$
|
|
689
|
-
const { selections: TagRecordAssignment__selections, opaque: TagRecordAssignment__opaque, } = select$
|
|
688
|
+
const select$7 = function TagRecordAssignmentCollectionRepresentationSelect() {
|
|
689
|
+
const { selections: TagRecordAssignment__selections, opaque: TagRecordAssignment__opaque, } = select$8();
|
|
690
690
|
return {
|
|
691
691
|
kind: 'Fragment',
|
|
692
|
-
version: VERSION$
|
|
692
|
+
version: VERSION$3,
|
|
693
693
|
private: [],
|
|
694
694
|
selections: [
|
|
695
695
|
{
|
|
@@ -701,11 +701,11 @@ const select$5 = function TagRecordAssignmentCollectionRepresentationSelect() {
|
|
|
701
701
|
]
|
|
702
702
|
};
|
|
703
703
|
};
|
|
704
|
-
function equals$
|
|
704
|
+
function equals$3(existing, incoming) {
|
|
705
705
|
const existing_assignments = existing.assignments;
|
|
706
706
|
const incoming_assignments = incoming.assignments;
|
|
707
707
|
const equals_assignments_items = equalsArray(existing_assignments, incoming_assignments, (existing_assignments_item, incoming_assignments_item) => {
|
|
708
|
-
if (!(equals$
|
|
708
|
+
if (!(equals$4(existing_assignments_item, incoming_assignments_item))) {
|
|
709
709
|
return false;
|
|
710
710
|
}
|
|
711
711
|
});
|
|
@@ -714,44 +714,44 @@ function equals$2(existing, incoming) {
|
|
|
714
714
|
}
|
|
715
715
|
return true;
|
|
716
716
|
}
|
|
717
|
-
const ingest$
|
|
717
|
+
const ingest$2 = function TagRecordAssignmentCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
718
718
|
if (process.env.NODE_ENV !== 'production') {
|
|
719
|
-
const validateError = validate$
|
|
719
|
+
const validateError = validate$8(input);
|
|
720
720
|
if (validateError !== null) {
|
|
721
721
|
throw validateError;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
const key = path.fullPath;
|
|
725
725
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
726
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
726
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "interesttagging", VERSION$3, RepresentationType$2, equals$3);
|
|
727
727
|
return createLink(key);
|
|
728
728
|
};
|
|
729
|
-
function getTypeCacheKeys$
|
|
729
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
730
730
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
731
731
|
const rootKey = fullPathFactory();
|
|
732
732
|
rootKeySet.set(rootKey, {
|
|
733
733
|
namespace: keyPrefix,
|
|
734
|
-
representationName: RepresentationType$
|
|
734
|
+
representationName: RepresentationType$2,
|
|
735
735
|
mergeable: false
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
function select$
|
|
740
|
-
return select$
|
|
739
|
+
function select$6(luvio, params) {
|
|
740
|
+
return select$7();
|
|
741
741
|
}
|
|
742
|
-
function keyBuilder$
|
|
742
|
+
function keyBuilder$6(luvio, params) {
|
|
743
743
|
return keyPrefix + '::TagRecordAssignmentCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ',' + 'sort:' + params.queryParams.sort + ',' + 'tagId:' + params.urlParams.tagId + ')';
|
|
744
744
|
}
|
|
745
|
-
function getResponseCacheKeys$
|
|
746
|
-
getTypeCacheKeys$
|
|
745
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
746
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
747
747
|
}
|
|
748
|
-
function ingestSuccess$
|
|
748
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
749
749
|
const { body } = response;
|
|
750
|
-
const key = keyBuilder$
|
|
751
|
-
luvio.storeIngest(key, ingest$
|
|
750
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
751
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
752
752
|
const snapshot = luvio.storeLookup({
|
|
753
753
|
recordId: key,
|
|
754
|
-
node: select$
|
|
754
|
+
node: select$6(),
|
|
755
755
|
variables: {},
|
|
756
756
|
}, snapshotRefresh);
|
|
757
757
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -763,12 +763,12 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
763
763
|
return snapshot;
|
|
764
764
|
}
|
|
765
765
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
766
|
-
const key = keyBuilder$
|
|
766
|
+
const key = keyBuilder$6(luvio, params);
|
|
767
767
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
768
768
|
luvio.storeIngestError(key, errorSnapshot);
|
|
769
769
|
return errorSnapshot;
|
|
770
770
|
}
|
|
771
|
-
function createResourceRequest$
|
|
771
|
+
function createResourceRequest$3(config) {
|
|
772
772
|
const headers = {};
|
|
773
773
|
return {
|
|
774
774
|
baseUri: '/services/data/v65.0',
|
|
@@ -782,7 +782,7 @@ function createResourceRequest$2(config) {
|
|
|
782
782
|
};
|
|
783
783
|
}
|
|
784
784
|
|
|
785
|
-
const adapterName$
|
|
785
|
+
const adapterName$3 = 'getInterestTagEntityAssignments';
|
|
786
786
|
const getInterestTagEntityAssignments_ConfigPropertyMetadata = [
|
|
787
787
|
generateParamConfigMetadata('tagId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
788
788
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -790,56 +790,56 @@ const getInterestTagEntityAssignments_ConfigPropertyMetadata = [
|
|
|
790
790
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
791
791
|
generateParamConfigMetadata('sort', false, 1 /* QueryParameter */, 0 /* String */),
|
|
792
792
|
];
|
|
793
|
-
const getInterestTagEntityAssignments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
794
|
-
const createResourceParams$
|
|
795
|
-
function keyBuilder$
|
|
796
|
-
const resourceParams = createResourceParams$
|
|
797
|
-
return keyBuilder$
|
|
793
|
+
const getInterestTagEntityAssignments_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getInterestTagEntityAssignments_ConfigPropertyMetadata);
|
|
794
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getInterestTagEntityAssignments_ConfigPropertyMetadata);
|
|
795
|
+
function keyBuilder$5(luvio, config) {
|
|
796
|
+
const resourceParams = createResourceParams$3(config);
|
|
797
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
798
798
|
}
|
|
799
|
-
function typeCheckConfig$
|
|
799
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
800
800
|
const config = {};
|
|
801
|
-
typeCheckConfig$
|
|
801
|
+
typeCheckConfig$6(untrustedConfig, config, getInterestTagEntityAssignments_ConfigPropertyMetadata);
|
|
802
802
|
return config;
|
|
803
803
|
}
|
|
804
|
-
function validateAdapterConfig$
|
|
804
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
805
805
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
806
806
|
return null;
|
|
807
807
|
}
|
|
808
808
|
if (process.env.NODE_ENV !== 'production') {
|
|
809
809
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
810
810
|
}
|
|
811
|
-
const config = typeCheckConfig$
|
|
811
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
812
812
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
813
813
|
return null;
|
|
814
814
|
}
|
|
815
815
|
return config;
|
|
816
816
|
}
|
|
817
817
|
function adapterFragment$2(luvio, config) {
|
|
818
|
-
createResourceParams$
|
|
819
|
-
return select$
|
|
818
|
+
createResourceParams$3(config);
|
|
819
|
+
return select$6();
|
|
820
820
|
}
|
|
821
821
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
822
|
-
const snapshot = ingestSuccess$
|
|
822
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
823
823
|
config,
|
|
824
|
-
resolve: () => buildNetworkSnapshot$
|
|
824
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
825
825
|
});
|
|
826
826
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
827
827
|
}
|
|
828
828
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
829
829
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
830
830
|
config,
|
|
831
|
-
resolve: () => buildNetworkSnapshot$
|
|
831
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
832
832
|
});
|
|
833
833
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
834
834
|
}
|
|
835
|
-
function buildNetworkSnapshot$
|
|
836
|
-
const resourceParams = createResourceParams$
|
|
837
|
-
const request = createResourceRequest$
|
|
835
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
836
|
+
const resourceParams = createResourceParams$3(config);
|
|
837
|
+
const request = createResourceRequest$3(resourceParams);
|
|
838
838
|
return luvio.dispatchResourceRequest(request, options)
|
|
839
839
|
.then((response) => {
|
|
840
840
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
841
841
|
const cache = new StoreKeyMap();
|
|
842
|
-
getResponseCacheKeys$
|
|
842
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
843
843
|
return cache;
|
|
844
844
|
});
|
|
845
845
|
}, (response) => {
|
|
@@ -847,23 +847,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
849
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
850
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
850
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
851
851
|
}
|
|
852
852
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
853
853
|
const { luvio, config } = context;
|
|
854
854
|
const selector = {
|
|
855
|
-
recordId: keyBuilder$
|
|
855
|
+
recordId: keyBuilder$5(luvio, config),
|
|
856
856
|
node: adapterFragment$2(luvio, config),
|
|
857
857
|
variables: {},
|
|
858
858
|
};
|
|
859
859
|
const cacheSnapshot = storeLookup(selector, {
|
|
860
860
|
config,
|
|
861
|
-
resolve: () => buildNetworkSnapshot$
|
|
861
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
862
862
|
});
|
|
863
863
|
return cacheSnapshot;
|
|
864
864
|
}
|
|
865
865
|
const getInterestTagEntityAssignmentsAdapterFactory = (luvio) => function interesttagging__getInterestTagEntityAssignments(untrustedConfig, requestContext) {
|
|
866
|
-
const config = validateAdapterConfig$
|
|
866
|
+
const config = validateAdapterConfig$3(untrustedConfig, getInterestTagEntityAssignments_ConfigPropertyNames);
|
|
867
867
|
// Invalid or incomplete config
|
|
868
868
|
if (config === null) {
|
|
869
869
|
return null;
|
|
@@ -872,8 +872,8 @@ const getInterestTagEntityAssignmentsAdapterFactory = (luvio) => function intere
|
|
|
872
872
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
873
873
|
};
|
|
874
874
|
|
|
875
|
-
const VERSION$
|
|
876
|
-
function validate$
|
|
875
|
+
const VERSION$2 = "2dcce5f2b607682447018f5b9db9cd4d";
|
|
876
|
+
function validate$7(obj, path = 'TagCategoryWithParentRepresentation') {
|
|
877
877
|
const v_error = (() => {
|
|
878
878
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
879
879
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -911,10 +911,10 @@ function validate$1(obj, path = 'TagCategoryWithParentRepresentation') {
|
|
|
911
911
|
})();
|
|
912
912
|
return v_error === undefined ? null : v_error;
|
|
913
913
|
}
|
|
914
|
-
const select$
|
|
914
|
+
const select$5 = function TagCategoryWithParentRepresentationSelect() {
|
|
915
915
|
return {
|
|
916
916
|
kind: 'Fragment',
|
|
917
|
-
version: VERSION$
|
|
917
|
+
version: VERSION$2,
|
|
918
918
|
private: [],
|
|
919
919
|
selections: [
|
|
920
920
|
{
|
|
@@ -944,7 +944,7 @@ const select$3 = function TagCategoryWithParentRepresentationSelect() {
|
|
|
944
944
|
]
|
|
945
945
|
};
|
|
946
946
|
};
|
|
947
|
-
function equals$
|
|
947
|
+
function equals$2(existing, incoming) {
|
|
948
948
|
const existing_categoryId = existing.categoryId;
|
|
949
949
|
const incoming_categoryId = incoming.categoryId;
|
|
950
950
|
if (!(existing_categoryId === incoming_categoryId)) {
|
|
@@ -978,8 +978,8 @@ function equals$1(existing, incoming) {
|
|
|
978
978
|
return true;
|
|
979
979
|
}
|
|
980
980
|
|
|
981
|
-
const VERSION = "9b56734fafb1d500056d1c1cdb6fe22d";
|
|
982
|
-
function validate(obj, path = 'TagCategoryListRepresentation') {
|
|
981
|
+
const VERSION$1 = "9b56734fafb1d500056d1c1cdb6fe22d";
|
|
982
|
+
function validate$6(obj, path = 'TagCategoryListRepresentation') {
|
|
983
983
|
const v_error = (() => {
|
|
984
984
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
985
985
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -992,7 +992,7 @@ function validate(obj, path = 'TagCategoryListRepresentation') {
|
|
|
992
992
|
for (let i = 0; i < obj_categories.length; i++) {
|
|
993
993
|
const obj_categories_item = obj_categories[i];
|
|
994
994
|
const path_categories_item = path_categories + '[' + i + ']';
|
|
995
|
-
const referencepath_categories_itemValidationError = validate$
|
|
995
|
+
const referencepath_categories_itemValidationError = validate$7(obj_categories_item, path_categories_item);
|
|
996
996
|
if (referencepath_categories_itemValidationError !== null) {
|
|
997
997
|
let message = 'Object doesn\'t match TagCategoryWithParentRepresentation (at "' + path_categories_item + '")\n';
|
|
998
998
|
message += referencepath_categories_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1002,15 +1002,15 @@ function validate(obj, path = 'TagCategoryListRepresentation') {
|
|
|
1002
1002
|
})();
|
|
1003
1003
|
return v_error === undefined ? null : v_error;
|
|
1004
1004
|
}
|
|
1005
|
-
const RepresentationType = 'TagCategoryListRepresentation';
|
|
1006
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1005
|
+
const RepresentationType$1 = 'TagCategoryListRepresentation';
|
|
1006
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1007
1007
|
return input;
|
|
1008
1008
|
}
|
|
1009
|
-
const select$
|
|
1010
|
-
const { selections: TagCategoryWithParentRepresentation__selections, opaque: TagCategoryWithParentRepresentation__opaque, } = select$
|
|
1009
|
+
const select$4 = function TagCategoryListRepresentationSelect() {
|
|
1010
|
+
const { selections: TagCategoryWithParentRepresentation__selections, opaque: TagCategoryWithParentRepresentation__opaque, } = select$5();
|
|
1011
1011
|
return {
|
|
1012
1012
|
kind: 'Fragment',
|
|
1013
|
-
version: VERSION,
|
|
1013
|
+
version: VERSION$1,
|
|
1014
1014
|
private: [],
|
|
1015
1015
|
selections: [
|
|
1016
1016
|
{
|
|
@@ -1022,11 +1022,11 @@ const select$2 = function TagCategoryListRepresentationSelect() {
|
|
|
1022
1022
|
]
|
|
1023
1023
|
};
|
|
1024
1024
|
};
|
|
1025
|
-
function equals(existing, incoming) {
|
|
1025
|
+
function equals$1(existing, incoming) {
|
|
1026
1026
|
const existing_categories = existing.categories;
|
|
1027
1027
|
const incoming_categories = incoming.categories;
|
|
1028
1028
|
const equals_categories_items = equalsArray(existing_categories, incoming_categories, (existing_categories_item, incoming_categories_item) => {
|
|
1029
|
-
if (!(equals$
|
|
1029
|
+
if (!(equals$2(existing_categories_item, incoming_categories_item))) {
|
|
1030
1030
|
return false;
|
|
1031
1031
|
}
|
|
1032
1032
|
});
|
|
@@ -1035,44 +1035,44 @@ function equals(existing, incoming) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
return true;
|
|
1037
1037
|
}
|
|
1038
|
-
const ingest = function TagCategoryListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1038
|
+
const ingest$1 = function TagCategoryListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1039
1039
|
if (process.env.NODE_ENV !== 'production') {
|
|
1040
|
-
const validateError = validate(input);
|
|
1040
|
+
const validateError = validate$6(input);
|
|
1041
1041
|
if (validateError !== null) {
|
|
1042
1042
|
throw validateError;
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
const key = path.fullPath;
|
|
1046
1046
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
1047
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "interesttagging", VERSION, RepresentationType, equals);
|
|
1047
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "interesttagging", VERSION$1, RepresentationType$1, equals$1);
|
|
1048
1048
|
return createLink(key);
|
|
1049
1049
|
};
|
|
1050
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1050
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1051
1051
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1052
1052
|
const rootKey = fullPathFactory();
|
|
1053
1053
|
rootKeySet.set(rootKey, {
|
|
1054
1054
|
namespace: keyPrefix,
|
|
1055
|
-
representationName: RepresentationType,
|
|
1055
|
+
representationName: RepresentationType$1,
|
|
1056
1056
|
mergeable: false
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
1060
|
-
function select$
|
|
1061
|
-
return select$
|
|
1060
|
+
function select$3(luvio, params) {
|
|
1061
|
+
return select$4();
|
|
1062
1062
|
}
|
|
1063
|
-
function keyBuilder$
|
|
1063
|
+
function keyBuilder$4(luvio, params) {
|
|
1064
1064
|
return keyPrefix + '::TagCategoryListRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ',' + 'sort:' + params.queryParams.sort + ',' + 'tagId:' + params.queryParams.tagId + ')';
|
|
1065
1065
|
}
|
|
1066
|
-
function getResponseCacheKeys$
|
|
1067
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1066
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1067
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1068
1068
|
}
|
|
1069
|
-
function ingestSuccess$
|
|
1069
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1070
1070
|
const { body } = response;
|
|
1071
|
-
const key = keyBuilder$
|
|
1072
|
-
luvio.storeIngest(key, ingest, body);
|
|
1071
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1072
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1073
1073
|
const snapshot = luvio.storeLookup({
|
|
1074
1074
|
recordId: key,
|
|
1075
|
-
node: select$
|
|
1075
|
+
node: select$3(),
|
|
1076
1076
|
variables: {},
|
|
1077
1077
|
}, snapshotRefresh);
|
|
1078
1078
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1084,12 +1084,12 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1084
1084
|
return snapshot;
|
|
1085
1085
|
}
|
|
1086
1086
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1087
|
-
const key = keyBuilder$
|
|
1087
|
+
const key = keyBuilder$4(luvio, params);
|
|
1088
1088
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1089
1089
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1090
1090
|
return errorSnapshot;
|
|
1091
1091
|
}
|
|
1092
|
-
function createResourceRequest$
|
|
1092
|
+
function createResourceRequest$2(config) {
|
|
1093
1093
|
const headers = {};
|
|
1094
1094
|
return {
|
|
1095
1095
|
baseUri: '/services/data/v65.0',
|
|
@@ -1103,7 +1103,7 @@ function createResourceRequest$1(config) {
|
|
|
1103
1103
|
};
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
-
const adapterName$
|
|
1106
|
+
const adapterName$2 = 'getTagCategoriesByTagId';
|
|
1107
1107
|
const getTagCategoriesByTagId_ConfigPropertyMetadata = [
|
|
1108
1108
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1109
1109
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -1111,56 +1111,56 @@ const getTagCategoriesByTagId_ConfigPropertyMetadata = [
|
|
|
1111
1111
|
generateParamConfigMetadata('sort', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1112
1112
|
generateParamConfigMetadata('tagId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1113
1113
|
];
|
|
1114
|
-
const getTagCategoriesByTagId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1115
|
-
const createResourceParams$
|
|
1116
|
-
function keyBuilder$
|
|
1117
|
-
const resourceParams = createResourceParams$
|
|
1118
|
-
return keyBuilder$
|
|
1114
|
+
const getTagCategoriesByTagId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTagCategoriesByTagId_ConfigPropertyMetadata);
|
|
1115
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getTagCategoriesByTagId_ConfigPropertyMetadata);
|
|
1116
|
+
function keyBuilder$3(luvio, config) {
|
|
1117
|
+
const resourceParams = createResourceParams$2(config);
|
|
1118
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1119
1119
|
}
|
|
1120
|
-
function typeCheckConfig$
|
|
1120
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1121
1121
|
const config = {};
|
|
1122
|
-
typeCheckConfig$
|
|
1122
|
+
typeCheckConfig$6(untrustedConfig, config, getTagCategoriesByTagId_ConfigPropertyMetadata);
|
|
1123
1123
|
return config;
|
|
1124
1124
|
}
|
|
1125
|
-
function validateAdapterConfig$
|
|
1125
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1126
1126
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1127
1127
|
return null;
|
|
1128
1128
|
}
|
|
1129
1129
|
if (process.env.NODE_ENV !== 'production') {
|
|
1130
1130
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1131
1131
|
}
|
|
1132
|
-
const config = typeCheckConfig$
|
|
1132
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1133
1133
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1134
1134
|
return null;
|
|
1135
1135
|
}
|
|
1136
1136
|
return config;
|
|
1137
1137
|
}
|
|
1138
1138
|
function adapterFragment$1(luvio, config) {
|
|
1139
|
-
createResourceParams$
|
|
1140
|
-
return select$
|
|
1139
|
+
createResourceParams$2(config);
|
|
1140
|
+
return select$3();
|
|
1141
1141
|
}
|
|
1142
1142
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1143
|
-
const snapshot = ingestSuccess$
|
|
1143
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1144
1144
|
config,
|
|
1145
|
-
resolve: () => buildNetworkSnapshot$
|
|
1145
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1146
1146
|
});
|
|
1147
1147
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1148
1148
|
}
|
|
1149
1149
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1150
1150
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1151
1151
|
config,
|
|
1152
|
-
resolve: () => buildNetworkSnapshot$
|
|
1152
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1153
1153
|
});
|
|
1154
1154
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1155
1155
|
}
|
|
1156
|
-
function buildNetworkSnapshot$
|
|
1157
|
-
const resourceParams = createResourceParams$
|
|
1158
|
-
const request = createResourceRequest$
|
|
1156
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1157
|
+
const resourceParams = createResourceParams$2(config);
|
|
1158
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1159
1159
|
return luvio.dispatchResourceRequest(request, options)
|
|
1160
1160
|
.then((response) => {
|
|
1161
1161
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1162
1162
|
const cache = new StoreKeyMap();
|
|
1163
|
-
getResponseCacheKeys$
|
|
1163
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1164
1164
|
return cache;
|
|
1165
1165
|
});
|
|
1166
1166
|
}, (response) => {
|
|
@@ -1168,23 +1168,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1168
1168
|
});
|
|
1169
1169
|
}
|
|
1170
1170
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1171
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1171
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1172
1172
|
}
|
|
1173
1173
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1174
1174
|
const { luvio, config } = context;
|
|
1175
1175
|
const selector = {
|
|
1176
|
-
recordId: keyBuilder$
|
|
1176
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1177
1177
|
node: adapterFragment$1(luvio, config),
|
|
1178
1178
|
variables: {},
|
|
1179
1179
|
};
|
|
1180
1180
|
const cacheSnapshot = storeLookup(selector, {
|
|
1181
1181
|
config,
|
|
1182
|
-
resolve: () => buildNetworkSnapshot$
|
|
1182
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1183
1183
|
});
|
|
1184
1184
|
return cacheSnapshot;
|
|
1185
1185
|
}
|
|
1186
1186
|
const getTagCategoriesByTagIdAdapterFactory = (luvio) => function interesttagging__getTagCategoriesByTagId(untrustedConfig, requestContext) {
|
|
1187
|
-
const config = validateAdapterConfig$
|
|
1187
|
+
const config = validateAdapterConfig$2(untrustedConfig, getTagCategoriesByTagId_ConfigPropertyNames);
|
|
1188
1188
|
// Invalid or incomplete config
|
|
1189
1189
|
if (config === null) {
|
|
1190
1190
|
return null;
|
|
@@ -1193,22 +1193,22 @@ const getTagCategoriesByTagIdAdapterFactory = (luvio) => function interesttaggin
|
|
|
1193
1193
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1194
1194
|
};
|
|
1195
1195
|
|
|
1196
|
-
function select(luvio, params) {
|
|
1197
|
-
return select$
|
|
1196
|
+
function select$2(luvio, params) {
|
|
1197
|
+
return select$a();
|
|
1198
1198
|
}
|
|
1199
|
-
function keyBuilder$
|
|
1199
|
+
function keyBuilder$2(luvio, params) {
|
|
1200
1200
|
return keyPrefix + '::InterestTagListRepresentation:(' + 'categoryId:' + params.queryParams.categoryId + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'orderBy:' + params.queryParams.orderBy + ',' + 'sort:' + params.queryParams.sort + ')';
|
|
1201
1201
|
}
|
|
1202
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1203
|
-
getTypeCacheKeys$
|
|
1202
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1203
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
|
|
1204
1204
|
}
|
|
1205
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1205
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1206
1206
|
const { body } = response;
|
|
1207
|
-
const key = keyBuilder$
|
|
1208
|
-
luvio.storeIngest(key, ingest$
|
|
1207
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
1208
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1209
1209
|
const snapshot = luvio.storeLookup({
|
|
1210
1210
|
recordId: key,
|
|
1211
|
-
node: select(),
|
|
1211
|
+
node: select$2(),
|
|
1212
1212
|
variables: {},
|
|
1213
1213
|
}, snapshotRefresh);
|
|
1214
1214
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1220,18 +1220,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1220
1220
|
return snapshot;
|
|
1221
1221
|
}
|
|
1222
1222
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1223
|
-
const key = keyBuilder$
|
|
1223
|
+
const key = keyBuilder$2(luvio, params);
|
|
1224
1224
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1225
1225
|
const storeMetadataParams = {
|
|
1226
|
-
ttl: TTL,
|
|
1226
|
+
ttl: TTL$1,
|
|
1227
1227
|
namespace: keyPrefix,
|
|
1228
|
-
version: VERSION$
|
|
1229
|
-
representationName: RepresentationType$
|
|
1228
|
+
version: VERSION$5,
|
|
1229
|
+
representationName: RepresentationType$3
|
|
1230
1230
|
};
|
|
1231
1231
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1232
1232
|
return errorSnapshot;
|
|
1233
1233
|
}
|
|
1234
|
-
function createResourceRequest(config) {
|
|
1234
|
+
function createResourceRequest$1(config) {
|
|
1235
1235
|
const headers = {};
|
|
1236
1236
|
return {
|
|
1237
1237
|
baseUri: '/services/data/v65.0',
|
|
@@ -1245,7 +1245,7 @@ function createResourceRequest(config) {
|
|
|
1245
1245
|
};
|
|
1246
1246
|
}
|
|
1247
1247
|
|
|
1248
|
-
const adapterName = 'getTagsByCategoryId';
|
|
1248
|
+
const adapterName$1 = 'getTagsByCategoryId';
|
|
1249
1249
|
const getTagsByCategoryId_ConfigPropertyMetadata = [
|
|
1250
1250
|
generateParamConfigMetadata('categoryId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1251
1251
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -1253,56 +1253,56 @@ const getTagsByCategoryId_ConfigPropertyMetadata = [
|
|
|
1253
1253
|
generateParamConfigMetadata('orderBy', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1254
1254
|
generateParamConfigMetadata('sort', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1255
1255
|
];
|
|
1256
|
-
const getTagsByCategoryId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTagsByCategoryId_ConfigPropertyMetadata);
|
|
1257
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1258
|
-
function keyBuilder(luvio, config) {
|
|
1259
|
-
const resourceParams = createResourceParams(config);
|
|
1260
|
-
return keyBuilder$
|
|
1256
|
+
const getTagsByCategoryId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTagsByCategoryId_ConfigPropertyMetadata);
|
|
1257
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(getTagsByCategoryId_ConfigPropertyMetadata);
|
|
1258
|
+
function keyBuilder$1(luvio, config) {
|
|
1259
|
+
const resourceParams = createResourceParams$1(config);
|
|
1260
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
1261
1261
|
}
|
|
1262
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1262
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1263
1263
|
const config = {};
|
|
1264
|
-
typeCheckConfig$
|
|
1264
|
+
typeCheckConfig$6(untrustedConfig, config, getTagsByCategoryId_ConfigPropertyMetadata);
|
|
1265
1265
|
return config;
|
|
1266
1266
|
}
|
|
1267
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1267
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1268
1268
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1269
1269
|
return null;
|
|
1270
1270
|
}
|
|
1271
1271
|
if (process.env.NODE_ENV !== 'production') {
|
|
1272
1272
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1273
1273
|
}
|
|
1274
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1274
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1275
1275
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1276
1276
|
return null;
|
|
1277
1277
|
}
|
|
1278
1278
|
return config;
|
|
1279
1279
|
}
|
|
1280
1280
|
function adapterFragment(luvio, config) {
|
|
1281
|
-
createResourceParams(config);
|
|
1282
|
-
return select();
|
|
1281
|
+
createResourceParams$1(config);
|
|
1282
|
+
return select$2();
|
|
1283
1283
|
}
|
|
1284
1284
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1285
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1285
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1286
1286
|
config,
|
|
1287
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1287
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1288
1288
|
});
|
|
1289
1289
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1290
1290
|
}
|
|
1291
1291
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1292
1292
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1293
1293
|
config,
|
|
1294
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1294
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1295
1295
|
});
|
|
1296
1296
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1297
1297
|
}
|
|
1298
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
1299
|
-
const resourceParams = createResourceParams(config);
|
|
1300
|
-
const request = createResourceRequest(resourceParams);
|
|
1298
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1299
|
+
const resourceParams = createResourceParams$1(config);
|
|
1300
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1301
1301
|
return luvio.dispatchResourceRequest(request, options)
|
|
1302
1302
|
.then((response) => {
|
|
1303
1303
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1304
1304
|
const cache = new StoreKeyMap();
|
|
1305
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1305
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1306
1306
|
return cache;
|
|
1307
1307
|
});
|
|
1308
1308
|
}, (response) => {
|
|
@@ -1310,23 +1310,23 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1310
1310
|
});
|
|
1311
1311
|
}
|
|
1312
1312
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1313
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1313
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1314
1314
|
}
|
|
1315
1315
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1316
1316
|
const { luvio, config } = context;
|
|
1317
1317
|
const selector = {
|
|
1318
|
-
recordId: keyBuilder(luvio, config),
|
|
1318
|
+
recordId: keyBuilder$1(luvio, config),
|
|
1319
1319
|
node: adapterFragment(luvio, config),
|
|
1320
1320
|
variables: {},
|
|
1321
1321
|
};
|
|
1322
1322
|
const cacheSnapshot = storeLookup(selector, {
|
|
1323
1323
|
config,
|
|
1324
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1324
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1325
1325
|
});
|
|
1326
1326
|
return cacheSnapshot;
|
|
1327
1327
|
}
|
|
1328
1328
|
const getTagsByCategoryIdAdapterFactory = (luvio) => function interesttagging__getTagsByCategoryId(untrustedConfig, requestContext) {
|
|
1329
|
-
const config = validateAdapterConfig(untrustedConfig, getTagsByCategoryId_ConfigPropertyNames);
|
|
1329
|
+
const config = validateAdapterConfig$1(untrustedConfig, getTagsByCategoryId_ConfigPropertyNames);
|
|
1330
1330
|
// Invalid or incomplete config
|
|
1331
1331
|
if (config === null) {
|
|
1332
1332
|
return null;
|
|
@@ -1335,4 +1335,360 @@ const getTagsByCategoryIdAdapterFactory = (luvio) => function interesttagging__g
|
|
|
1335
1335
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1336
1336
|
};
|
|
1337
1337
|
|
|
1338
|
-
|
|
1338
|
+
function validate$5(obj, path = 'InterestTagItemInputRepresentation') {
|
|
1339
|
+
const v_error = (() => {
|
|
1340
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1341
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1342
|
+
}
|
|
1343
|
+
if (obj.recordId !== undefined) {
|
|
1344
|
+
const obj_recordId = obj.recordId;
|
|
1345
|
+
const path_recordId = path + '.recordId';
|
|
1346
|
+
if (typeof obj_recordId !== 'string') {
|
|
1347
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (obj.tagDescription !== undefined) {
|
|
1351
|
+
const obj_tagDescription = obj.tagDescription;
|
|
1352
|
+
const path_tagDescription = path + '.tagDescription';
|
|
1353
|
+
if (typeof obj_tagDescription !== 'string') {
|
|
1354
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tagDescription + '" (at "' + path_tagDescription + '")');
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
if (obj.tagId !== undefined) {
|
|
1358
|
+
const obj_tagId = obj.tagId;
|
|
1359
|
+
const path_tagId = path + '.tagId';
|
|
1360
|
+
if (typeof obj_tagId !== 'string') {
|
|
1361
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tagId + '" (at "' + path_tagId + '")');
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
if (obj.tagName !== undefined) {
|
|
1365
|
+
const obj_tagName = obj.tagName;
|
|
1366
|
+
const path_tagName = path + '.tagName';
|
|
1367
|
+
if (typeof obj_tagName !== 'string') {
|
|
1368
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tagName + '" (at "' + path_tagName + '")');
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
})();
|
|
1372
|
+
return v_error === undefined ? null : v_error;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
function validate$4(obj, path = 'InterestTagAndCategoryItemInputRepresentation') {
|
|
1376
|
+
const v_error = (() => {
|
|
1377
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1378
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1379
|
+
}
|
|
1380
|
+
if (obj.categoryDescription !== undefined) {
|
|
1381
|
+
const obj_categoryDescription = obj.categoryDescription;
|
|
1382
|
+
const path_categoryDescription = path + '.categoryDescription';
|
|
1383
|
+
if (typeof obj_categoryDescription !== 'string') {
|
|
1384
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryDescription + '" (at "' + path_categoryDescription + '")');
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
if (obj.categoryIcon !== undefined) {
|
|
1388
|
+
const obj_categoryIcon = obj.categoryIcon;
|
|
1389
|
+
const path_categoryIcon = path + '.categoryIcon';
|
|
1390
|
+
if (typeof obj_categoryIcon !== 'string') {
|
|
1391
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryIcon + '" (at "' + path_categoryIcon + '")');
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
if (obj.categoryId !== undefined) {
|
|
1395
|
+
const obj_categoryId = obj.categoryId;
|
|
1396
|
+
const path_categoryId = path + '.categoryId';
|
|
1397
|
+
if (typeof obj_categoryId !== 'string') {
|
|
1398
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryId + '" (at "' + path_categoryId + '")');
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
if (obj.categoryName !== undefined) {
|
|
1402
|
+
const obj_categoryName = obj.categoryName;
|
|
1403
|
+
const path_categoryName = path + '.categoryName';
|
|
1404
|
+
if (typeof obj_categoryName !== 'string') {
|
|
1405
|
+
return new TypeError('Expected "string" but received "' + typeof obj_categoryName + '" (at "' + path_categoryName + '")');
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
const obj_tags = obj.tags;
|
|
1409
|
+
const path_tags = path + '.tags';
|
|
1410
|
+
if (!ArrayIsArray(obj_tags)) {
|
|
1411
|
+
return new TypeError('Expected "array" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
1412
|
+
}
|
|
1413
|
+
for (let i = 0; i < obj_tags.length; i++) {
|
|
1414
|
+
const obj_tags_item = obj_tags[i];
|
|
1415
|
+
const path_tags_item = path_tags + '[' + i + ']';
|
|
1416
|
+
const referencepath_tags_itemValidationError = validate$5(obj_tags_item, path_tags_item);
|
|
1417
|
+
if (referencepath_tags_itemValidationError !== null) {
|
|
1418
|
+
let message = 'Object doesn\'t match InterestTagItemInputRepresentation (at "' + path_tags_item + '")\n';
|
|
1419
|
+
message += referencepath_tags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1420
|
+
return new TypeError(message);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
})();
|
|
1424
|
+
return v_error === undefined ? null : v_error;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
function validate$3(obj, path = 'CategoryCreatedResult') {
|
|
1428
|
+
const v_error = (() => {
|
|
1429
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1430
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1431
|
+
}
|
|
1432
|
+
const obj_id = obj.id;
|
|
1433
|
+
const path_id = path + '.id';
|
|
1434
|
+
if (typeof obj_id !== 'string') {
|
|
1435
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1436
|
+
}
|
|
1437
|
+
const obj_name = obj.name;
|
|
1438
|
+
const path_name = path + '.name';
|
|
1439
|
+
if (typeof obj_name !== 'string') {
|
|
1440
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1441
|
+
}
|
|
1442
|
+
})();
|
|
1443
|
+
return v_error === undefined ? null : v_error;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
function validate$2(obj, path = 'InterestTagAndCategoryErrorOutputRepresentation') {
|
|
1447
|
+
const v_error = (() => {
|
|
1448
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1449
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1450
|
+
}
|
|
1451
|
+
const obj_message = obj.message;
|
|
1452
|
+
const path_message = path + '.message';
|
|
1453
|
+
if (typeof obj_message !== 'string') {
|
|
1454
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1455
|
+
}
|
|
1456
|
+
const obj_type = obj.type;
|
|
1457
|
+
const path_type = path + '.type';
|
|
1458
|
+
if (typeof obj_type !== 'string') {
|
|
1459
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1460
|
+
}
|
|
1461
|
+
})();
|
|
1462
|
+
return v_error === undefined ? null : v_error;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
function validate$1(obj, path = 'TagCreatedOutputRepresentation') {
|
|
1466
|
+
const v_error = (() => {
|
|
1467
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1468
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1469
|
+
}
|
|
1470
|
+
const obj_id = obj.id;
|
|
1471
|
+
const path_id = path + '.id';
|
|
1472
|
+
if (typeof obj_id !== 'string') {
|
|
1473
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1474
|
+
}
|
|
1475
|
+
const obj_name = obj.name;
|
|
1476
|
+
const path_name = path + '.name';
|
|
1477
|
+
if (typeof obj_name !== 'string') {
|
|
1478
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1479
|
+
}
|
|
1480
|
+
})();
|
|
1481
|
+
return v_error === undefined ? null : v_error;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
const TTL = 10000;
|
|
1485
|
+
const VERSION = "15a824d2c5496eabd6c3f95e8bd0da38";
|
|
1486
|
+
function validate(obj, path = 'InterestTagAndCategoryCreateOutputRepresentation') {
|
|
1487
|
+
const v_error = (() => {
|
|
1488
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1489
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1490
|
+
}
|
|
1491
|
+
const obj_categories = obj.categories;
|
|
1492
|
+
const path_categories = path + '.categories';
|
|
1493
|
+
if (!ArrayIsArray(obj_categories)) {
|
|
1494
|
+
return new TypeError('Expected "array" but received "' + typeof obj_categories + '" (at "' + path_categories + '")');
|
|
1495
|
+
}
|
|
1496
|
+
for (let i = 0; i < obj_categories.length; i++) {
|
|
1497
|
+
const obj_categories_item = obj_categories[i];
|
|
1498
|
+
const path_categories_item = path_categories + '[' + i + ']';
|
|
1499
|
+
const referencepath_categories_itemValidationError = validate$3(obj_categories_item, path_categories_item);
|
|
1500
|
+
if (referencepath_categories_itemValidationError !== null) {
|
|
1501
|
+
let message = 'Object doesn\'t match CategoryCreatedResult (at "' + path_categories_item + '")\n';
|
|
1502
|
+
message += referencepath_categories_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1503
|
+
return new TypeError(message);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
const obj_errors = obj.errors;
|
|
1507
|
+
const path_errors = path + '.errors';
|
|
1508
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
1509
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
1510
|
+
}
|
|
1511
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
1512
|
+
const obj_errors_item = obj_errors[i];
|
|
1513
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
1514
|
+
const referencepath_errors_itemValidationError = validate$2(obj_errors_item, path_errors_item);
|
|
1515
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1516
|
+
let message = 'Object doesn\'t match InterestTagAndCategoryErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
1517
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1518
|
+
return new TypeError(message);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
const obj_isSuccess = obj.isSuccess;
|
|
1522
|
+
const path_isSuccess = path + '.isSuccess';
|
|
1523
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
1524
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1525
|
+
}
|
|
1526
|
+
const obj_tags = obj.tags;
|
|
1527
|
+
const path_tags = path + '.tags';
|
|
1528
|
+
if (!ArrayIsArray(obj_tags)) {
|
|
1529
|
+
return new TypeError('Expected "array" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
1530
|
+
}
|
|
1531
|
+
for (let i = 0; i < obj_tags.length; i++) {
|
|
1532
|
+
const obj_tags_item = obj_tags[i];
|
|
1533
|
+
const path_tags_item = path_tags + '[' + i + ']';
|
|
1534
|
+
const referencepath_tags_itemValidationError = validate$1(obj_tags_item, path_tags_item);
|
|
1535
|
+
if (referencepath_tags_itemValidationError !== null) {
|
|
1536
|
+
let message = 'Object doesn\'t match TagCreatedOutputRepresentation (at "' + path_tags_item + '")\n';
|
|
1537
|
+
message += referencepath_tags_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1538
|
+
return new TypeError(message);
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
})();
|
|
1542
|
+
return v_error === undefined ? null : v_error;
|
|
1543
|
+
}
|
|
1544
|
+
const RepresentationType = 'InterestTagAndCategoryCreateOutputRepresentation';
|
|
1545
|
+
function keyBuilder(luvio, config) {
|
|
1546
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.isSuccess;
|
|
1547
|
+
}
|
|
1548
|
+
function keyBuilderFromType(luvio, object) {
|
|
1549
|
+
const keyParams = {
|
|
1550
|
+
isSuccess: object.isSuccess
|
|
1551
|
+
};
|
|
1552
|
+
return keyBuilder(luvio, keyParams);
|
|
1553
|
+
}
|
|
1554
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1555
|
+
return input;
|
|
1556
|
+
}
|
|
1557
|
+
const select$1 = function InterestTagAndCategoryCreateOutputRepresentationSelect() {
|
|
1558
|
+
return {
|
|
1559
|
+
kind: 'Fragment',
|
|
1560
|
+
version: VERSION,
|
|
1561
|
+
private: [],
|
|
1562
|
+
opaque: true
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1565
|
+
function equals(existing, incoming) {
|
|
1566
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1567
|
+
return false;
|
|
1568
|
+
}
|
|
1569
|
+
return true;
|
|
1570
|
+
}
|
|
1571
|
+
const ingest = function InterestTagAndCategoryCreateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1572
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1573
|
+
const validateError = validate(input);
|
|
1574
|
+
if (validateError !== null) {
|
|
1575
|
+
throw validateError;
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1579
|
+
const ttlToUse = TTL;
|
|
1580
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "interesttagging", VERSION, RepresentationType, equals);
|
|
1581
|
+
return createLink(key);
|
|
1582
|
+
};
|
|
1583
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1584
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1585
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1586
|
+
rootKeySet.set(rootKey, {
|
|
1587
|
+
namespace: keyPrefix,
|
|
1588
|
+
representationName: RepresentationType,
|
|
1589
|
+
mergeable: false
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
function select(luvio, params) {
|
|
1594
|
+
return select$1();
|
|
1595
|
+
}
|
|
1596
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1597
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1598
|
+
}
|
|
1599
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1600
|
+
const { body } = response;
|
|
1601
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1602
|
+
luvio.storeIngest(key, ingest, body);
|
|
1603
|
+
const snapshot = luvio.storeLookup({
|
|
1604
|
+
recordId: key,
|
|
1605
|
+
node: select(),
|
|
1606
|
+
variables: {},
|
|
1607
|
+
});
|
|
1608
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1609
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1610
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
deepFreeze(snapshot.data);
|
|
1614
|
+
return snapshot;
|
|
1615
|
+
}
|
|
1616
|
+
function createResourceRequest(config) {
|
|
1617
|
+
const headers = {};
|
|
1618
|
+
return {
|
|
1619
|
+
baseUri: '/services/data/v65.0',
|
|
1620
|
+
basePath: '/connect/interest-tags/tags-and-categories',
|
|
1621
|
+
method: 'post',
|
|
1622
|
+
body: config.body,
|
|
1623
|
+
urlParams: {},
|
|
1624
|
+
queryParams: {},
|
|
1625
|
+
headers,
|
|
1626
|
+
priority: 'normal',
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
const adapterName = 'createInterestTagsAndCategories';
|
|
1631
|
+
const createInterestTagsAndCategories_ConfigPropertyMetadata = [
|
|
1632
|
+
generateParamConfigMetadata('interestTags', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1633
|
+
];
|
|
1634
|
+
const createInterestTagsAndCategories_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, createInterestTagsAndCategories_ConfigPropertyMetadata);
|
|
1635
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$6(createInterestTagsAndCategories_ConfigPropertyMetadata);
|
|
1636
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1637
|
+
const config = {};
|
|
1638
|
+
const untrustedConfig_interestTags = untrustedConfig.interestTags;
|
|
1639
|
+
if (ArrayIsArray$1(untrustedConfig_interestTags)) {
|
|
1640
|
+
const untrustedConfig_interestTags_array = [];
|
|
1641
|
+
for (let i = 0, arrayLength = untrustedConfig_interestTags.length; i < arrayLength; i++) {
|
|
1642
|
+
const untrustedConfig_interestTags_item = untrustedConfig_interestTags[i];
|
|
1643
|
+
const referenceInterestTagAndCategoryItemInputRepresentationValidationError = validate$4(untrustedConfig_interestTags_item);
|
|
1644
|
+
if (referenceInterestTagAndCategoryItemInputRepresentationValidationError === null) {
|
|
1645
|
+
untrustedConfig_interestTags_array.push(untrustedConfig_interestTags_item);
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
config.interestTags = untrustedConfig_interestTags_array;
|
|
1649
|
+
}
|
|
1650
|
+
return config;
|
|
1651
|
+
}
|
|
1652
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1653
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1654
|
+
return null;
|
|
1655
|
+
}
|
|
1656
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1657
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1658
|
+
}
|
|
1659
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1660
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1661
|
+
return null;
|
|
1662
|
+
}
|
|
1663
|
+
return config;
|
|
1664
|
+
}
|
|
1665
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1666
|
+
const resourceParams = createResourceParams(config);
|
|
1667
|
+
const request = createResourceRequest(resourceParams);
|
|
1668
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1669
|
+
.then((response) => {
|
|
1670
|
+
return luvio.handleSuccessResponse(() => {
|
|
1671
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1672
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1673
|
+
}, () => {
|
|
1674
|
+
const cache = new StoreKeyMap();
|
|
1675
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1676
|
+
return cache;
|
|
1677
|
+
});
|
|
1678
|
+
}, (response) => {
|
|
1679
|
+
deepFreeze(response);
|
|
1680
|
+
throw response;
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
const createInterestTagsAndCategoriesAdapterFactory = (luvio) => {
|
|
1684
|
+
return function createInterestTagsAndCategories(untrustedConfig) {
|
|
1685
|
+
const config = validateAdapterConfig(untrustedConfig, createInterestTagsAndCategories_ConfigPropertyNames);
|
|
1686
|
+
// Invalid or incomplete config
|
|
1687
|
+
if (config === null) {
|
|
1688
|
+
throw new Error('Invalid config for "createInterestTagsAndCategories"');
|
|
1689
|
+
}
|
|
1690
|
+
return buildNetworkSnapshot(luvio, config);
|
|
1691
|
+
};
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1694
|
+
export { createInterestTagEntityAssignmentAdapterFactory, createInterestTagsAndCategoriesAdapterFactory, getInterestTagEntityAssignmentsAdapterFactory, getTagCategoriesByTagIdAdapterFactory, getTagsByCategoryIdAdapterFactory, getTagsByRecordIdAdapterFactory };
|