@salesforce/lds-adapters-industries-actionplan 1.303.0 → 1.305.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-actionplan.js +848 -233
- package/dist/es/es2018/types/src/generated/adapters/updateActionPlanTasks.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/adapters/updateActionPlanTemplateTasks.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/patchConnectActionPlanTemplateUpdateByActionPlanTemplateVersionId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/patchConnectActionPlanUpdateByActionPlanId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTaskFieldValueUpdateInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTaskUpdateInputRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTemplateItemUpdateInputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTemplateItemValueUpdateInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTemplateUpdateErrorOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTemplateUpdateInputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanTemplateUpdateOutputRepresentation.d.ts +48 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanUpdateErrorOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanUpdateInputRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ActionPlanUpdateOutputRepresentation.d.ts +48 -0
- package/package.json +4 -4
- package/sfdc/index.js +892 -267
- package/src/raml/api.raml +185 -0
- package/src/raml/luvio.raml +18 -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, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4, typeCheckConfig as typeCheckConfig$6, StoreKeyMap, createResourceParams as createResourceParams$6 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -80,7 +80,7 @@ function createLink(ref) {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
function validate$
|
|
83
|
+
function validate$o(obj, path = 'ActionPlanTemplateItemValuesLabelOutputRepresentation') {
|
|
84
84
|
const v_error = (() => {
|
|
85
85
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
86
86
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -109,7 +109,7 @@ function validate$g(obj, path = 'ActionPlanTemplateItemValuesLabelOutputRepresen
|
|
|
109
109
|
return v_error === undefined ? null : v_error;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
function validate$
|
|
112
|
+
function validate$n(obj, path = 'ActionPlanTemplateDCIItemsLabelOutputRepresentation') {
|
|
113
113
|
const v_error = (() => {
|
|
114
114
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
115
115
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -127,7 +127,7 @@ function validate$f(obj, path = 'ActionPlanTemplateDCIItemsLabelOutputRepresenta
|
|
|
127
127
|
for (let i = 0; i < obj_itemValues.length; i++) {
|
|
128
128
|
const obj_itemValues_item = obj_itemValues[i];
|
|
129
129
|
const path_itemValues_item = path_itemValues + '[' + i + ']';
|
|
130
|
-
const referencepath_itemValues_itemValidationError = validate$
|
|
130
|
+
const referencepath_itemValues_itemValidationError = validate$o(obj_itemValues_item, path_itemValues_item);
|
|
131
131
|
if (referencepath_itemValues_itemValidationError !== null) {
|
|
132
132
|
let message = 'Object doesn\'t match ActionPlanTemplateItemValuesLabelOutputRepresentation (at "' + path_itemValues_item + '")\n';
|
|
133
133
|
message += referencepath_itemValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -138,7 +138,7 @@ function validate$f(obj, path = 'ActionPlanTemplateDCIItemsLabelOutputRepresenta
|
|
|
138
138
|
return v_error === undefined ? null : v_error;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
function validate$
|
|
141
|
+
function validate$m(obj, path = 'ActionPlanTemplateTaskItemsLabelOutputRepresentation') {
|
|
142
142
|
const v_error = (() => {
|
|
143
143
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
144
144
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -161,7 +161,7 @@ function validate$e(obj, path = 'ActionPlanTemplateTaskItemsLabelOutputRepresent
|
|
|
161
161
|
for (let i = 0; i < obj_itemValues.length; i++) {
|
|
162
162
|
const obj_itemValues_item = obj_itemValues[i];
|
|
163
163
|
const path_itemValues_item = path_itemValues + '[' + i + ']';
|
|
164
|
-
const referencepath_itemValues_itemValidationError = validate$
|
|
164
|
+
const referencepath_itemValues_itemValidationError = validate$o(obj_itemValues_item, path_itemValues_item);
|
|
165
165
|
if (referencepath_itemValues_itemValidationError !== null) {
|
|
166
166
|
let message = 'Object doesn\'t match ActionPlanTemplateItemValuesLabelOutputRepresentation (at "' + path_itemValues_item + '")\n';
|
|
167
167
|
message += referencepath_itemValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -184,9 +184,9 @@ function validate$e(obj, path = 'ActionPlanTemplateTaskItemsLabelOutputRepresent
|
|
|
184
184
|
return v_error === undefined ? null : v_error;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
const TTL$
|
|
188
|
-
const VERSION$
|
|
189
|
-
function validate$
|
|
187
|
+
const TTL$5 = 1000;
|
|
188
|
+
const VERSION$5 = "27f870344e4c00862a006458ee9bab53";
|
|
189
|
+
function validate$l(obj, path = 'ActionPlanTemplateItemsLabelOutputRepresentation') {
|
|
190
190
|
const v_error = (() => {
|
|
191
191
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
192
192
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -214,7 +214,7 @@ function validate$d(obj, path = 'ActionPlanTemplateItemsLabelOutputRepresentatio
|
|
|
214
214
|
for (let i = 0; i < obj_dciItemList.length; i++) {
|
|
215
215
|
const obj_dciItemList_item = obj_dciItemList[i];
|
|
216
216
|
const path_dciItemList_item = path_dciItemList + '[' + i + ']';
|
|
217
|
-
const referencepath_dciItemList_itemValidationError = validate$
|
|
217
|
+
const referencepath_dciItemList_itemValidationError = validate$n(obj_dciItemList_item, path_dciItemList_item);
|
|
218
218
|
if (referencepath_dciItemList_itemValidationError !== null) {
|
|
219
219
|
let message = 'Object doesn\'t match ActionPlanTemplateDCIItemsLabelOutputRepresentation (at "' + path_dciItemList_item + '")\n';
|
|
220
220
|
message += referencepath_dciItemList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -239,7 +239,7 @@ function validate$d(obj, path = 'ActionPlanTemplateItemsLabelOutputRepresentatio
|
|
|
239
239
|
for (let i = 0; i < obj_taskItemList.length; i++) {
|
|
240
240
|
const obj_taskItemList_item = obj_taskItemList[i];
|
|
241
241
|
const path_taskItemList_item = path_taskItemList + '[' + i + ']';
|
|
242
|
-
const referencepath_taskItemList_itemValidationError = validate$
|
|
242
|
+
const referencepath_taskItemList_itemValidationError = validate$m(obj_taskItemList_item, path_taskItemList_item);
|
|
243
243
|
if (referencepath_taskItemList_itemValidationError !== null) {
|
|
244
244
|
let message = 'Object doesn\'t match ActionPlanTemplateTaskItemsLabelOutputRepresentation (at "' + path_taskItemList_item + '")\n';
|
|
245
245
|
message += referencepath_taskItemList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -249,62 +249,62 @@ function validate$d(obj, path = 'ActionPlanTemplateItemsLabelOutputRepresentatio
|
|
|
249
249
|
})();
|
|
250
250
|
return v_error === undefined ? null : v_error;
|
|
251
251
|
}
|
|
252
|
-
const RepresentationType$
|
|
253
|
-
function normalize$
|
|
252
|
+
const RepresentationType$5 = 'ActionPlanTemplateItemsLabelOutputRepresentation';
|
|
253
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
254
254
|
return input;
|
|
255
255
|
}
|
|
256
|
-
const select$
|
|
256
|
+
const select$b = function ActionPlanTemplateItemsLabelOutputRepresentationSelect() {
|
|
257
257
|
return {
|
|
258
258
|
kind: 'Fragment',
|
|
259
|
-
version: VERSION$
|
|
259
|
+
version: VERSION$5,
|
|
260
260
|
private: [],
|
|
261
261
|
opaque: true
|
|
262
262
|
};
|
|
263
263
|
};
|
|
264
|
-
function equals$
|
|
264
|
+
function equals$5(existing, incoming) {
|
|
265
265
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
266
266
|
return false;
|
|
267
267
|
}
|
|
268
268
|
return true;
|
|
269
269
|
}
|
|
270
|
-
const ingest$
|
|
270
|
+
const ingest$5 = function ActionPlanTemplateItemsLabelOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
271
271
|
if (process.env.NODE_ENV !== 'production') {
|
|
272
|
-
const validateError = validate$
|
|
272
|
+
const validateError = validate$l(input);
|
|
273
273
|
if (validateError !== null) {
|
|
274
274
|
throw validateError;
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
const key = path.fullPath;
|
|
278
|
-
const ttlToUse = TTL$
|
|
279
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
278
|
+
const ttlToUse = TTL$5;
|
|
279
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "ActionPlan", VERSION$5, RepresentationType$5, equals$5);
|
|
280
280
|
return createLink(key);
|
|
281
281
|
};
|
|
282
|
-
function getTypeCacheKeys$
|
|
282
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
283
283
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
284
284
|
const rootKey = fullPathFactory();
|
|
285
285
|
rootKeySet.set(rootKey, {
|
|
286
286
|
namespace: keyPrefix,
|
|
287
|
-
representationName: RepresentationType$
|
|
287
|
+
representationName: RepresentationType$5,
|
|
288
288
|
mergeable: false
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
function select$
|
|
293
|
-
return select$
|
|
292
|
+
function select$a(luvio, params) {
|
|
293
|
+
return select$b();
|
|
294
294
|
}
|
|
295
|
-
function keyBuilder$
|
|
295
|
+
function keyBuilder$9(luvio, params) {
|
|
296
296
|
return keyPrefix + '::ActionPlanTemplateItemsLabelOutputRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'actionPlanTemplateVersionId:' + params.urlParams.actionPlanTemplateVersionId + ')';
|
|
297
297
|
}
|
|
298
|
-
function getResponseCacheKeys$
|
|
299
|
-
getTypeCacheKeys$
|
|
298
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
299
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
300
300
|
}
|
|
301
|
-
function ingestSuccess$
|
|
301
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
302
302
|
const { body } = response;
|
|
303
|
-
const key = keyBuilder$
|
|
304
|
-
luvio.storeIngest(key, ingest$
|
|
303
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
304
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
305
305
|
const snapshot = luvio.storeLookup({
|
|
306
306
|
recordId: key,
|
|
307
|
-
node: select$
|
|
307
|
+
node: select$a(),
|
|
308
308
|
variables: {},
|
|
309
309
|
}, snapshotRefresh);
|
|
310
310
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -316,18 +316,18 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
316
316
|
return snapshot;
|
|
317
317
|
}
|
|
318
318
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
319
|
-
const key = keyBuilder$
|
|
319
|
+
const key = keyBuilder$9(luvio, params);
|
|
320
320
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
321
321
|
const storeMetadataParams = {
|
|
322
|
-
ttl: TTL$
|
|
322
|
+
ttl: TTL$5,
|
|
323
323
|
namespace: keyPrefix,
|
|
324
|
-
version: VERSION$
|
|
325
|
-
representationName: RepresentationType$
|
|
324
|
+
version: VERSION$5,
|
|
325
|
+
representationName: RepresentationType$5
|
|
326
326
|
};
|
|
327
327
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
328
328
|
return errorSnapshot;
|
|
329
329
|
}
|
|
330
|
-
function createResourceRequest$
|
|
330
|
+
function createResourceRequest$5(config) {
|
|
331
331
|
const headers = {};
|
|
332
332
|
return {
|
|
333
333
|
baseUri: '/services/data/v62.0',
|
|
@@ -341,61 +341,61 @@ function createResourceRequest$3(config) {
|
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
const adapterName$
|
|
344
|
+
const adapterName$5 = 'getActionPlanTemplateItemsLabel';
|
|
345
345
|
const getActionPlanTemplateItemsLabel_ConfigPropertyMetadata = [
|
|
346
346
|
generateParamConfigMetadata('actionPlanTemplateVersionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
347
347
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
348
348
|
];
|
|
349
|
-
const getActionPlanTemplateItemsLabel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
350
|
-
const createResourceParams$
|
|
351
|
-
function keyBuilder$
|
|
352
|
-
const resourceParams = createResourceParams$
|
|
353
|
-
return keyBuilder$
|
|
349
|
+
const getActionPlanTemplateItemsLabel_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getActionPlanTemplateItemsLabel_ConfigPropertyMetadata);
|
|
350
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$6(getActionPlanTemplateItemsLabel_ConfigPropertyMetadata);
|
|
351
|
+
function keyBuilder$8(luvio, config) {
|
|
352
|
+
const resourceParams = createResourceParams$5(config);
|
|
353
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
354
354
|
}
|
|
355
|
-
function typeCheckConfig$
|
|
355
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
356
356
|
const config = {};
|
|
357
|
-
typeCheckConfig$
|
|
357
|
+
typeCheckConfig$6(untrustedConfig, config, getActionPlanTemplateItemsLabel_ConfigPropertyMetadata);
|
|
358
358
|
return config;
|
|
359
359
|
}
|
|
360
|
-
function validateAdapterConfig$
|
|
360
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
361
361
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
362
362
|
return null;
|
|
363
363
|
}
|
|
364
364
|
if (process.env.NODE_ENV !== 'production') {
|
|
365
365
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
366
366
|
}
|
|
367
|
-
const config = typeCheckConfig$
|
|
367
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
368
368
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
369
369
|
return null;
|
|
370
370
|
}
|
|
371
371
|
return config;
|
|
372
372
|
}
|
|
373
373
|
function adapterFragment$3(luvio, config) {
|
|
374
|
-
createResourceParams$
|
|
375
|
-
return select$
|
|
374
|
+
createResourceParams$5(config);
|
|
375
|
+
return select$a();
|
|
376
376
|
}
|
|
377
377
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
378
|
-
const snapshot = ingestSuccess$
|
|
378
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
379
379
|
config,
|
|
380
|
-
resolve: () => buildNetworkSnapshot$
|
|
380
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
381
381
|
});
|
|
382
382
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
383
383
|
}
|
|
384
384
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
385
385
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
386
386
|
config,
|
|
387
|
-
resolve: () => buildNetworkSnapshot$
|
|
387
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
388
388
|
});
|
|
389
389
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
390
390
|
}
|
|
391
|
-
function buildNetworkSnapshot$
|
|
392
|
-
const resourceParams = createResourceParams$
|
|
393
|
-
const request = createResourceRequest$
|
|
391
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
392
|
+
const resourceParams = createResourceParams$5(config);
|
|
393
|
+
const request = createResourceRequest$5(resourceParams);
|
|
394
394
|
return luvio.dispatchResourceRequest(request, options)
|
|
395
395
|
.then((response) => {
|
|
396
396
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
397
397
|
const cache = new StoreKeyMap();
|
|
398
|
-
getResponseCacheKeys$
|
|
398
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
399
399
|
return cache;
|
|
400
400
|
});
|
|
401
401
|
}, (response) => {
|
|
@@ -403,23 +403,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
405
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
406
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
406
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
407
407
|
}
|
|
408
408
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
409
409
|
const { luvio, config } = context;
|
|
410
410
|
const selector = {
|
|
411
|
-
recordId: keyBuilder$
|
|
411
|
+
recordId: keyBuilder$8(luvio, config),
|
|
412
412
|
node: adapterFragment$3(luvio, config),
|
|
413
413
|
variables: {},
|
|
414
414
|
};
|
|
415
415
|
const cacheSnapshot = storeLookup(selector, {
|
|
416
416
|
config,
|
|
417
|
-
resolve: () => buildNetworkSnapshot$
|
|
417
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
418
418
|
});
|
|
419
419
|
return cacheSnapshot;
|
|
420
420
|
}
|
|
421
421
|
const getActionPlanTemplateItemsLabelAdapterFactory = (luvio) => function ActionPlan__getActionPlanTemplateItemsLabel(untrustedConfig, requestContext) {
|
|
422
|
-
const config = validateAdapterConfig$
|
|
422
|
+
const config = validateAdapterConfig$5(untrustedConfig, getActionPlanTemplateItemsLabel_ConfigPropertyNames);
|
|
423
423
|
// Invalid or incomplete config
|
|
424
424
|
if (config === null) {
|
|
425
425
|
return null;
|
|
@@ -428,7 +428,7 @@ const getActionPlanTemplateItemsLabelAdapterFactory = (luvio) => function Action
|
|
|
428
428
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
429
429
|
};
|
|
430
430
|
|
|
431
|
-
function validate$
|
|
431
|
+
function validate$k(obj, path = 'ActionPlanRepresentation') {
|
|
432
432
|
const v_error = (() => {
|
|
433
433
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
434
434
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -461,7 +461,7 @@ function validate$c(obj, path = 'ActionPlanRepresentation') {
|
|
|
461
461
|
return v_error === undefined ? null : v_error;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
|
-
function validate$
|
|
464
|
+
function validate$j(obj, path = 'ActionPlanListRepresentation') {
|
|
465
465
|
const v_error = (() => {
|
|
466
466
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
467
467
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -474,7 +474,7 @@ function validate$b(obj, path = 'ActionPlanListRepresentation') {
|
|
|
474
474
|
for (let i = 0; i < obj_records.length; i++) {
|
|
475
475
|
const obj_records_item = obj_records[i];
|
|
476
476
|
const path_records_item = path_records + '[' + i + ']';
|
|
477
|
-
const referencepath_records_itemValidationError = validate$
|
|
477
|
+
const referencepath_records_itemValidationError = validate$k(obj_records_item, path_records_item);
|
|
478
478
|
if (referencepath_records_itemValidationError !== null) {
|
|
479
479
|
let message = 'Object doesn\'t match ActionPlanRepresentation (at "' + path_records_item + '")\n';
|
|
480
480
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -485,16 +485,16 @@ function validate$b(obj, path = 'ActionPlanListRepresentation') {
|
|
|
485
485
|
return v_error === undefined ? null : v_error;
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
-
const TTL$
|
|
489
|
-
const VERSION$
|
|
490
|
-
function validate$
|
|
488
|
+
const TTL$4 = 1000;
|
|
489
|
+
const VERSION$4 = "0ec040ec594b42ffdf6182e2b338e7ff";
|
|
490
|
+
function validate$i(obj, path = 'ActionPlansWrapperOutputRepresentation') {
|
|
491
491
|
const v_error = (() => {
|
|
492
492
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
493
493
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
494
494
|
}
|
|
495
495
|
const obj_actionPlan = obj.actionPlan;
|
|
496
496
|
const path_actionPlan = path + '.actionPlan';
|
|
497
|
-
const referencepath_actionPlanValidationError = validate$
|
|
497
|
+
const referencepath_actionPlanValidationError = validate$j(obj_actionPlan, path_actionPlan);
|
|
498
498
|
if (referencepath_actionPlanValidationError !== null) {
|
|
499
499
|
let message = 'Object doesn\'t match ActionPlanListRepresentation (at "' + path_actionPlan + '")\n';
|
|
500
500
|
message += referencepath_actionPlanValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -503,62 +503,62 @@ function validate$a(obj, path = 'ActionPlansWrapperOutputRepresentation') {
|
|
|
503
503
|
})();
|
|
504
504
|
return v_error === undefined ? null : v_error;
|
|
505
505
|
}
|
|
506
|
-
const RepresentationType$
|
|
507
|
-
function normalize$
|
|
506
|
+
const RepresentationType$4 = 'ActionPlansWrapperOutputRepresentation';
|
|
507
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
508
508
|
return input;
|
|
509
509
|
}
|
|
510
|
-
const select$
|
|
510
|
+
const select$9 = function ActionPlansWrapperOutputRepresentationSelect() {
|
|
511
511
|
return {
|
|
512
512
|
kind: 'Fragment',
|
|
513
|
-
version: VERSION$
|
|
513
|
+
version: VERSION$4,
|
|
514
514
|
private: [],
|
|
515
515
|
opaque: true
|
|
516
516
|
};
|
|
517
517
|
};
|
|
518
|
-
function equals$
|
|
518
|
+
function equals$4(existing, incoming) {
|
|
519
519
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
520
520
|
return false;
|
|
521
521
|
}
|
|
522
522
|
return true;
|
|
523
523
|
}
|
|
524
|
-
const ingest$
|
|
524
|
+
const ingest$4 = function ActionPlansWrapperOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
525
525
|
if (process.env.NODE_ENV !== 'production') {
|
|
526
|
-
const validateError = validate$
|
|
526
|
+
const validateError = validate$i(input);
|
|
527
527
|
if (validateError !== null) {
|
|
528
528
|
throw validateError;
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
const key = path.fullPath;
|
|
532
|
-
const ttlToUse = TTL$
|
|
533
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
532
|
+
const ttlToUse = TTL$4;
|
|
533
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "ActionPlan", VERSION$4, RepresentationType$4, equals$4);
|
|
534
534
|
return createLink(key);
|
|
535
535
|
};
|
|
536
|
-
function getTypeCacheKeys$
|
|
536
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
537
537
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
538
538
|
const rootKey = fullPathFactory();
|
|
539
539
|
rootKeySet.set(rootKey, {
|
|
540
540
|
namespace: keyPrefix,
|
|
541
|
-
representationName: RepresentationType$
|
|
541
|
+
representationName: RepresentationType$4,
|
|
542
542
|
mergeable: false
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
function select$
|
|
547
|
-
return select$
|
|
546
|
+
function select$8(luvio, params) {
|
|
547
|
+
return select$9();
|
|
548
548
|
}
|
|
549
|
-
function keyBuilder$
|
|
549
|
+
function keyBuilder$7(luvio, params) {
|
|
550
550
|
return keyPrefix + '::ActionPlansWrapperOutputRepresentation:(' + 'actionPlanType:' + params.queryParams.actionPlanType + ',' + 'limit:' + params.queryParams.limit + ',' + 'order:' + params.queryParams.order + ',' + 'orderingParam:' + params.queryParams.orderingParam + ',' + 'targetId:' + params.queryParams.targetId + ')';
|
|
551
551
|
}
|
|
552
|
-
function getResponseCacheKeys$
|
|
553
|
-
getTypeCacheKeys$
|
|
552
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
553
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
554
554
|
}
|
|
555
|
-
function ingestSuccess$
|
|
555
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
556
556
|
const { body } = response;
|
|
557
|
-
const key = keyBuilder$
|
|
558
|
-
luvio.storeIngest(key, ingest$
|
|
557
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
558
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
559
559
|
const snapshot = luvio.storeLookup({
|
|
560
560
|
recordId: key,
|
|
561
|
-
node: select$
|
|
561
|
+
node: select$8(),
|
|
562
562
|
variables: {},
|
|
563
563
|
}, snapshotRefresh);
|
|
564
564
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -570,18 +570,18 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
570
570
|
return snapshot;
|
|
571
571
|
}
|
|
572
572
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
573
|
-
const key = keyBuilder$
|
|
573
|
+
const key = keyBuilder$7(luvio, params);
|
|
574
574
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
575
575
|
const storeMetadataParams = {
|
|
576
|
-
ttl: TTL$
|
|
576
|
+
ttl: TTL$4,
|
|
577
577
|
namespace: keyPrefix,
|
|
578
|
-
version: VERSION$
|
|
579
|
-
representationName: RepresentationType$
|
|
578
|
+
version: VERSION$4,
|
|
579
|
+
representationName: RepresentationType$4
|
|
580
580
|
};
|
|
581
581
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
582
582
|
return errorSnapshot;
|
|
583
583
|
}
|
|
584
|
-
function createResourceRequest$
|
|
584
|
+
function createResourceRequest$4(config) {
|
|
585
585
|
const headers = {};
|
|
586
586
|
return {
|
|
587
587
|
baseUri: '/services/data/v62.0',
|
|
@@ -595,7 +595,7 @@ function createResourceRequest$2(config) {
|
|
|
595
595
|
};
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
const adapterName$
|
|
598
|
+
const adapterName$4 = 'getActionPlans';
|
|
599
599
|
const getActionPlans_ConfigPropertyMetadata = [
|
|
600
600
|
generateParamConfigMetadata('actionPlanType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
601
601
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
@@ -603,56 +603,56 @@ const getActionPlans_ConfigPropertyMetadata = [
|
|
|
603
603
|
generateParamConfigMetadata('orderingParam', false, 1 /* QueryParameter */, 0 /* String */),
|
|
604
604
|
generateParamConfigMetadata('targetId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
605
605
|
];
|
|
606
|
-
const getActionPlans_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
607
|
-
const createResourceParams$
|
|
608
|
-
function keyBuilder$
|
|
609
|
-
const resourceParams = createResourceParams$
|
|
610
|
-
return keyBuilder$
|
|
606
|
+
const getActionPlans_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getActionPlans_ConfigPropertyMetadata);
|
|
607
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$6(getActionPlans_ConfigPropertyMetadata);
|
|
608
|
+
function keyBuilder$6(luvio, config) {
|
|
609
|
+
const resourceParams = createResourceParams$4(config);
|
|
610
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
611
611
|
}
|
|
612
|
-
function typeCheckConfig$
|
|
612
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
613
613
|
const config = {};
|
|
614
|
-
typeCheckConfig$
|
|
614
|
+
typeCheckConfig$6(untrustedConfig, config, getActionPlans_ConfigPropertyMetadata);
|
|
615
615
|
return config;
|
|
616
616
|
}
|
|
617
|
-
function validateAdapterConfig$
|
|
617
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
618
618
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
619
619
|
return null;
|
|
620
620
|
}
|
|
621
621
|
if (process.env.NODE_ENV !== 'production') {
|
|
622
622
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
623
623
|
}
|
|
624
|
-
const config = typeCheckConfig$
|
|
624
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
625
625
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
626
626
|
return null;
|
|
627
627
|
}
|
|
628
628
|
return config;
|
|
629
629
|
}
|
|
630
630
|
function adapterFragment$2(luvio, config) {
|
|
631
|
-
createResourceParams$
|
|
632
|
-
return select$
|
|
631
|
+
createResourceParams$4(config);
|
|
632
|
+
return select$8();
|
|
633
633
|
}
|
|
634
634
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
635
|
-
const snapshot = ingestSuccess$
|
|
635
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
636
636
|
config,
|
|
637
|
-
resolve: () => buildNetworkSnapshot$
|
|
637
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
638
638
|
});
|
|
639
639
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
640
640
|
}
|
|
641
641
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
642
642
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
643
643
|
config,
|
|
644
|
-
resolve: () => buildNetworkSnapshot$
|
|
644
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
645
645
|
});
|
|
646
646
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
647
647
|
}
|
|
648
|
-
function buildNetworkSnapshot$
|
|
649
|
-
const resourceParams = createResourceParams$
|
|
650
|
-
const request = createResourceRequest$
|
|
648
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
649
|
+
const resourceParams = createResourceParams$4(config);
|
|
650
|
+
const request = createResourceRequest$4(resourceParams);
|
|
651
651
|
return luvio.dispatchResourceRequest(request, options)
|
|
652
652
|
.then((response) => {
|
|
653
653
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
654
654
|
const cache = new StoreKeyMap();
|
|
655
|
-
getResponseCacheKeys$
|
|
655
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
656
656
|
return cache;
|
|
657
657
|
});
|
|
658
658
|
}, (response) => {
|
|
@@ -660,23 +660,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
662
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
663
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
663
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
664
664
|
}
|
|
665
665
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
666
666
|
const { luvio, config } = context;
|
|
667
667
|
const selector = {
|
|
668
|
-
recordId: keyBuilder$
|
|
668
|
+
recordId: keyBuilder$6(luvio, config),
|
|
669
669
|
node: adapterFragment$2(luvio, config),
|
|
670
670
|
variables: {},
|
|
671
671
|
};
|
|
672
672
|
const cacheSnapshot = storeLookup(selector, {
|
|
673
673
|
config,
|
|
674
|
-
resolve: () => buildNetworkSnapshot$
|
|
674
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
675
675
|
});
|
|
676
676
|
return cacheSnapshot;
|
|
677
677
|
}
|
|
678
678
|
const getActionPlansAdapterFactory = (luvio) => function ActionPlan__getActionPlans(untrustedConfig, requestContext) {
|
|
679
|
-
const config = validateAdapterConfig$
|
|
679
|
+
const config = validateAdapterConfig$4(untrustedConfig, getActionPlans_ConfigPropertyNames);
|
|
680
680
|
// Invalid or incomplete config
|
|
681
681
|
if (config === null) {
|
|
682
682
|
return null;
|
|
@@ -685,7 +685,7 @@ const getActionPlansAdapterFactory = (luvio) => function ActionPlan__getActionPl
|
|
|
685
685
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
686
686
|
};
|
|
687
687
|
|
|
688
|
-
function validate$
|
|
688
|
+
function validate$h(obj, path = 'ComputedFieldsWrapperRepresentation') {
|
|
689
689
|
const v_error = (() => {
|
|
690
690
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
691
691
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -708,7 +708,7 @@ function validate$9(obj, path = 'ComputedFieldsWrapperRepresentation') {
|
|
|
708
708
|
return v_error === undefined ? null : v_error;
|
|
709
709
|
}
|
|
710
710
|
|
|
711
|
-
function validate$
|
|
711
|
+
function validate$g(obj, path = 'FieldRepresentation') {
|
|
712
712
|
const v_error = (() => {
|
|
713
713
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
714
714
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -737,7 +737,7 @@ function validate$8(obj, path = 'FieldRepresentation') {
|
|
|
737
737
|
return v_error === undefined ? null : v_error;
|
|
738
738
|
}
|
|
739
739
|
|
|
740
|
-
function validate$
|
|
740
|
+
function validate$f(obj, path = 'TaskProgressRepresentation') {
|
|
741
741
|
const v_error = (() => {
|
|
742
742
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
743
743
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -761,7 +761,7 @@ function validate$7(obj, path = 'TaskProgressRepresentation') {
|
|
|
761
761
|
return v_error === undefined ? null : v_error;
|
|
762
762
|
}
|
|
763
763
|
|
|
764
|
-
function validate$
|
|
764
|
+
function validate$e(obj, path = 'ActionPlanItemTaskRepresentation') {
|
|
765
765
|
const v_error = (() => {
|
|
766
766
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
767
767
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -769,7 +769,7 @@ function validate$6(obj, path = 'ActionPlanItemTaskRepresentation') {
|
|
|
769
769
|
if (obj.computedFields !== undefined) {
|
|
770
770
|
const obj_computedFields = obj.computedFields;
|
|
771
771
|
const path_computedFields = path + '.computedFields';
|
|
772
|
-
const referencepath_computedFieldsValidationError = validate$
|
|
772
|
+
const referencepath_computedFieldsValidationError = validate$h(obj_computedFields, path_computedFields);
|
|
773
773
|
if (referencepath_computedFieldsValidationError !== null) {
|
|
774
774
|
let message = 'Object doesn\'t match ComputedFieldsWrapperRepresentation (at "' + path_computedFields + '")\n';
|
|
775
775
|
message += referencepath_computedFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -785,7 +785,7 @@ function validate$6(obj, path = 'ActionPlanItemTaskRepresentation') {
|
|
|
785
785
|
for (let i = 0; i < obj_fields.length; i++) {
|
|
786
786
|
const obj_fields_item = obj_fields[i];
|
|
787
787
|
const path_fields_item = path_fields + '[' + i + ']';
|
|
788
|
-
const referencepath_fields_itemValidationError = validate$
|
|
788
|
+
const referencepath_fields_itemValidationError = validate$g(obj_fields_item, path_fields_item);
|
|
789
789
|
if (referencepath_fields_itemValidationError !== null) {
|
|
790
790
|
let message = 'Object doesn\'t match FieldRepresentation (at "' + path_fields_item + '")\n';
|
|
791
791
|
message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -801,7 +801,7 @@ function validate$6(obj, path = 'ActionPlanItemTaskRepresentation') {
|
|
|
801
801
|
if (obj.progress !== undefined) {
|
|
802
802
|
const obj_progress = obj.progress;
|
|
803
803
|
const path_progress = path + '.progress';
|
|
804
|
-
const referencepath_progressValidationError = validate$
|
|
804
|
+
const referencepath_progressValidationError = validate$f(obj_progress, path_progress);
|
|
805
805
|
if (referencepath_progressValidationError !== null) {
|
|
806
806
|
let message = 'Object doesn\'t match TaskProgressRepresentation (at "' + path_progress + '")\n';
|
|
807
807
|
message += referencepath_progressValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -812,7 +812,7 @@ function validate$6(obj, path = 'ActionPlanItemTaskRepresentation') {
|
|
|
812
812
|
return v_error === undefined ? null : v_error;
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
-
function validate$
|
|
815
|
+
function validate$d(obj, path = 'ActionPlanItemDetailedRepresentation') {
|
|
816
816
|
const v_error = (() => {
|
|
817
817
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
818
818
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -820,7 +820,7 @@ function validate$5(obj, path = 'ActionPlanItemDetailedRepresentation') {
|
|
|
820
820
|
if (obj.actionPlanItemTask !== undefined) {
|
|
821
821
|
const obj_actionPlanItemTask = obj.actionPlanItemTask;
|
|
822
822
|
const path_actionPlanItemTask = path + '.actionPlanItemTask';
|
|
823
|
-
const referencepath_actionPlanItemTaskValidationError = validate$
|
|
823
|
+
const referencepath_actionPlanItemTaskValidationError = validate$e(obj_actionPlanItemTask, path_actionPlanItemTask);
|
|
824
824
|
if (referencepath_actionPlanItemTaskValidationError !== null) {
|
|
825
825
|
let message = 'Object doesn\'t match ActionPlanItemTaskRepresentation (at "' + path_actionPlanItemTask + '")\n';
|
|
826
826
|
message += referencepath_actionPlanItemTaskValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -841,7 +841,7 @@ function validate$5(obj, path = 'ActionPlanItemDetailedRepresentation') {
|
|
|
841
841
|
return v_error === undefined ? null : v_error;
|
|
842
842
|
}
|
|
843
843
|
|
|
844
|
-
function validate$
|
|
844
|
+
function validate$c(obj, path = 'ActionPlanItemCollectionRepresentation') {
|
|
845
845
|
const v_error = (() => {
|
|
846
846
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
847
847
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -854,7 +854,7 @@ function validate$4(obj, path = 'ActionPlanItemCollectionRepresentation') {
|
|
|
854
854
|
for (let i = 0; i < obj_records.length; i++) {
|
|
855
855
|
const obj_records_item = obj_records[i];
|
|
856
856
|
const path_records_item = path_records + '[' + i + ']';
|
|
857
|
-
const referencepath_records_itemValidationError = validate$
|
|
857
|
+
const referencepath_records_itemValidationError = validate$d(obj_records_item, path_records_item);
|
|
858
858
|
if (referencepath_records_itemValidationError !== null) {
|
|
859
859
|
let message = 'Object doesn\'t match ActionPlanItemDetailedRepresentation (at "' + path_records_item + '")\n';
|
|
860
860
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -865,16 +865,16 @@ function validate$4(obj, path = 'ActionPlanItemCollectionRepresentation') {
|
|
|
865
865
|
return v_error === undefined ? null : v_error;
|
|
866
866
|
}
|
|
867
867
|
|
|
868
|
-
const TTL$
|
|
869
|
-
const VERSION$
|
|
870
|
-
function validate$
|
|
868
|
+
const TTL$3 = 1000;
|
|
869
|
+
const VERSION$3 = "01f1998519e78c50e1b67804b6fcb652";
|
|
870
|
+
function validate$b(obj, path = 'ActionPlanItemsWrapperRepresentation') {
|
|
871
871
|
const v_error = (() => {
|
|
872
872
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
873
873
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
874
874
|
}
|
|
875
875
|
const obj_actionPlanItems = obj.actionPlanItems;
|
|
876
876
|
const path_actionPlanItems = path + '.actionPlanItems';
|
|
877
|
-
const referencepath_actionPlanItemsValidationError = validate$
|
|
877
|
+
const referencepath_actionPlanItemsValidationError = validate$c(obj_actionPlanItems, path_actionPlanItems);
|
|
878
878
|
if (referencepath_actionPlanItemsValidationError !== null) {
|
|
879
879
|
let message = 'Object doesn\'t match ActionPlanItemCollectionRepresentation (at "' + path_actionPlanItems + '")\n';
|
|
880
880
|
message += referencepath_actionPlanItemsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -883,62 +883,62 @@ function validate$3(obj, path = 'ActionPlanItemsWrapperRepresentation') {
|
|
|
883
883
|
})();
|
|
884
884
|
return v_error === undefined ? null : v_error;
|
|
885
885
|
}
|
|
886
|
-
const RepresentationType$
|
|
887
|
-
function normalize$
|
|
886
|
+
const RepresentationType$3 = 'ActionPlanItemsWrapperRepresentation';
|
|
887
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
888
888
|
return input;
|
|
889
889
|
}
|
|
890
|
-
const select$
|
|
890
|
+
const select$7 = function ActionPlanItemsWrapperRepresentationSelect() {
|
|
891
891
|
return {
|
|
892
892
|
kind: 'Fragment',
|
|
893
|
-
version: VERSION$
|
|
893
|
+
version: VERSION$3,
|
|
894
894
|
private: [],
|
|
895
895
|
opaque: true
|
|
896
896
|
};
|
|
897
897
|
};
|
|
898
|
-
function equals$
|
|
898
|
+
function equals$3(existing, incoming) {
|
|
899
899
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
900
900
|
return false;
|
|
901
901
|
}
|
|
902
902
|
return true;
|
|
903
903
|
}
|
|
904
|
-
const ingest$
|
|
904
|
+
const ingest$3 = function ActionPlanItemsWrapperRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
905
905
|
if (process.env.NODE_ENV !== 'production') {
|
|
906
|
-
const validateError = validate$
|
|
906
|
+
const validateError = validate$b(input);
|
|
907
907
|
if (validateError !== null) {
|
|
908
908
|
throw validateError;
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
const key = path.fullPath;
|
|
912
|
-
const ttlToUse = TTL$
|
|
913
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
912
|
+
const ttlToUse = TTL$3;
|
|
913
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "ActionPlan", VERSION$3, RepresentationType$3, equals$3);
|
|
914
914
|
return createLink(key);
|
|
915
915
|
};
|
|
916
|
-
function getTypeCacheKeys$
|
|
916
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
917
917
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
918
918
|
const rootKey = fullPathFactory();
|
|
919
919
|
rootKeySet.set(rootKey, {
|
|
920
920
|
namespace: keyPrefix,
|
|
921
|
-
representationName: RepresentationType$
|
|
921
|
+
representationName: RepresentationType$3,
|
|
922
922
|
mergeable: false
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
-
function select$
|
|
927
|
-
return select$
|
|
926
|
+
function select$6(luvio, params) {
|
|
927
|
+
return select$7();
|
|
928
928
|
}
|
|
929
|
-
function keyBuilder$
|
|
929
|
+
function keyBuilder$5(luvio, params) {
|
|
930
930
|
return keyPrefix + '::ActionPlanItemsWrapperRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'actionPlanId:' + params.urlParams.actionPlanId + ')';
|
|
931
931
|
}
|
|
932
|
-
function getResponseCacheKeys$
|
|
933
|
-
getTypeCacheKeys$
|
|
932
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
933
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
934
934
|
}
|
|
935
|
-
function ingestSuccess$
|
|
935
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
936
936
|
const { body } = response;
|
|
937
|
-
const key = keyBuilder$
|
|
938
|
-
luvio.storeIngest(key, ingest$
|
|
937
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
938
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
939
939
|
const snapshot = luvio.storeLookup({
|
|
940
940
|
recordId: key,
|
|
941
|
-
node: select$
|
|
941
|
+
node: select$6(),
|
|
942
942
|
variables: {},
|
|
943
943
|
}, snapshotRefresh);
|
|
944
944
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -950,18 +950,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
950
950
|
return snapshot;
|
|
951
951
|
}
|
|
952
952
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
953
|
-
const key = keyBuilder$
|
|
953
|
+
const key = keyBuilder$5(luvio, params);
|
|
954
954
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
955
955
|
const storeMetadataParams = {
|
|
956
|
-
ttl: TTL$
|
|
956
|
+
ttl: TTL$3,
|
|
957
957
|
namespace: keyPrefix,
|
|
958
|
-
version: VERSION$
|
|
959
|
-
representationName: RepresentationType$
|
|
958
|
+
version: VERSION$3,
|
|
959
|
+
representationName: RepresentationType$3
|
|
960
960
|
};
|
|
961
961
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
962
962
|
return errorSnapshot;
|
|
963
963
|
}
|
|
964
|
-
function createResourceRequest$
|
|
964
|
+
function createResourceRequest$3(config) {
|
|
965
965
|
const headers = {};
|
|
966
966
|
return {
|
|
967
967
|
baseUri: '/services/data/v62.0',
|
|
@@ -975,61 +975,61 @@ function createResourceRequest$1(config) {
|
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
-
const adapterName$
|
|
978
|
+
const adapterName$3 = 'getActionPlanItems';
|
|
979
979
|
const getActionPlanItems_ConfigPropertyMetadata = [
|
|
980
980
|
generateParamConfigMetadata('actionPlanId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
981
981
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
982
982
|
];
|
|
983
|
-
const getActionPlanItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
984
|
-
const createResourceParams$
|
|
985
|
-
function keyBuilder$
|
|
986
|
-
const resourceParams = createResourceParams$
|
|
987
|
-
return keyBuilder$
|
|
983
|
+
const getActionPlanItems_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getActionPlanItems_ConfigPropertyMetadata);
|
|
984
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$6(getActionPlanItems_ConfigPropertyMetadata);
|
|
985
|
+
function keyBuilder$4(luvio, config) {
|
|
986
|
+
const resourceParams = createResourceParams$3(config);
|
|
987
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
988
988
|
}
|
|
989
|
-
function typeCheckConfig$
|
|
989
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
990
990
|
const config = {};
|
|
991
|
-
typeCheckConfig$
|
|
991
|
+
typeCheckConfig$6(untrustedConfig, config, getActionPlanItems_ConfigPropertyMetadata);
|
|
992
992
|
return config;
|
|
993
993
|
}
|
|
994
|
-
function validateAdapterConfig$
|
|
994
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
995
995
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
996
996
|
return null;
|
|
997
997
|
}
|
|
998
998
|
if (process.env.NODE_ENV !== 'production') {
|
|
999
999
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1000
1000
|
}
|
|
1001
|
-
const config = typeCheckConfig$
|
|
1001
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1002
1002
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1003
1003
|
return null;
|
|
1004
1004
|
}
|
|
1005
1005
|
return config;
|
|
1006
1006
|
}
|
|
1007
1007
|
function adapterFragment$1(luvio, config) {
|
|
1008
|
-
createResourceParams$
|
|
1009
|
-
return select$
|
|
1008
|
+
createResourceParams$3(config);
|
|
1009
|
+
return select$6();
|
|
1010
1010
|
}
|
|
1011
1011
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1012
|
-
const snapshot = ingestSuccess$
|
|
1012
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1013
1013
|
config,
|
|
1014
|
-
resolve: () => buildNetworkSnapshot$
|
|
1014
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1015
1015
|
});
|
|
1016
1016
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1017
1017
|
}
|
|
1018
1018
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1019
1019
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1020
1020
|
config,
|
|
1021
|
-
resolve: () => buildNetworkSnapshot$
|
|
1021
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1022
1022
|
});
|
|
1023
1023
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1024
1024
|
}
|
|
1025
|
-
function buildNetworkSnapshot$
|
|
1026
|
-
const resourceParams = createResourceParams$
|
|
1027
|
-
const request = createResourceRequest$
|
|
1025
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1026
|
+
const resourceParams = createResourceParams$3(config);
|
|
1027
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1028
1028
|
return luvio.dispatchResourceRequest(request, options)
|
|
1029
1029
|
.then((response) => {
|
|
1030
1030
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1031
1031
|
const cache = new StoreKeyMap();
|
|
1032
|
-
getResponseCacheKeys$
|
|
1032
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1033
1033
|
return cache;
|
|
1034
1034
|
});
|
|
1035
1035
|
}, (response) => {
|
|
@@ -1037,23 +1037,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1037
1037
|
});
|
|
1038
1038
|
}
|
|
1039
1039
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1040
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1040
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1041
1041
|
}
|
|
1042
1042
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1043
1043
|
const { luvio, config } = context;
|
|
1044
1044
|
const selector = {
|
|
1045
|
-
recordId: keyBuilder$
|
|
1045
|
+
recordId: keyBuilder$4(luvio, config),
|
|
1046
1046
|
node: adapterFragment$1(luvio, config),
|
|
1047
1047
|
variables: {},
|
|
1048
1048
|
};
|
|
1049
1049
|
const cacheSnapshot = storeLookup(selector, {
|
|
1050
1050
|
config,
|
|
1051
|
-
resolve: () => buildNetworkSnapshot$
|
|
1051
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1052
1052
|
});
|
|
1053
1053
|
return cacheSnapshot;
|
|
1054
1054
|
}
|
|
1055
1055
|
const getActionPlanItemsAdapterFactory = (luvio) => function ActionPlan__getActionPlanItems(untrustedConfig, requestContext) {
|
|
1056
|
-
const config = validateAdapterConfig$
|
|
1056
|
+
const config = validateAdapterConfig$3(untrustedConfig, getActionPlanItems_ConfigPropertyNames);
|
|
1057
1057
|
// Invalid or incomplete config
|
|
1058
1058
|
if (config === null) {
|
|
1059
1059
|
return null;
|
|
@@ -1062,7 +1062,7 @@ const getActionPlanItemsAdapterFactory = (luvio) => function ActionPlan__getActi
|
|
|
1062
1062
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1063
1063
|
};
|
|
1064
1064
|
|
|
1065
|
-
function validate$
|
|
1065
|
+
function validate$a(obj, path = 'ActionPlanItemRepresentation') {
|
|
1066
1066
|
const v_error = (() => {
|
|
1067
1067
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1068
1068
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1076,7 +1076,7 @@ function validate$2(obj, path = 'ActionPlanItemRepresentation') {
|
|
|
1076
1076
|
return v_error === undefined ? null : v_error;
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
-
function validate$
|
|
1079
|
+
function validate$9(obj, path = 'ActionPlanItemListRepresentation') {
|
|
1080
1080
|
const v_error = (() => {
|
|
1081
1081
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1082
1082
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1089,7 +1089,7 @@ function validate$1(obj, path = 'ActionPlanItemListRepresentation') {
|
|
|
1089
1089
|
for (let i = 0; i < obj_records.length; i++) {
|
|
1090
1090
|
const obj_records_item = obj_records[i];
|
|
1091
1091
|
const path_records_item = path_records + '[' + i + ']';
|
|
1092
|
-
const referencepath_records_itemValidationError = validate$
|
|
1092
|
+
const referencepath_records_itemValidationError = validate$a(obj_records_item, path_records_item);
|
|
1093
1093
|
if (referencepath_records_itemValidationError !== null) {
|
|
1094
1094
|
let message = 'Object doesn\'t match ActionPlanItemRepresentation (at "' + path_records_item + '")\n';
|
|
1095
1095
|
message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1100,9 +1100,9 @@ function validate$1(obj, path = 'ActionPlanItemListRepresentation') {
|
|
|
1100
1100
|
return v_error === undefined ? null : v_error;
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
1103
|
-
const TTL = 1000;
|
|
1104
|
-
const VERSION = "8d866f38a882381bbdafb2496aa6f6b8";
|
|
1105
|
-
function validate(obj, path = 'ActionPlanStatusInfoOutputRepresentation') {
|
|
1103
|
+
const TTL$2 = 1000;
|
|
1104
|
+
const VERSION$2 = "8d866f38a882381bbdafb2496aa6f6b8";
|
|
1105
|
+
function validate$8(obj, path = 'ActionPlanStatusInfoOutputRepresentation') {
|
|
1106
1106
|
const v_error = (() => {
|
|
1107
1107
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1108
1108
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1115,7 +1115,7 @@ function validate(obj, path = 'ActionPlanStatusInfoOutputRepresentation') {
|
|
|
1115
1115
|
if (obj.mandatoryItemsPending !== undefined) {
|
|
1116
1116
|
const obj_mandatoryItemsPending = obj.mandatoryItemsPending;
|
|
1117
1117
|
const path_mandatoryItemsPending = path + '.mandatoryItemsPending';
|
|
1118
|
-
const referencepath_mandatoryItemsPendingValidationError = validate$
|
|
1118
|
+
const referencepath_mandatoryItemsPendingValidationError = validate$9(obj_mandatoryItemsPending, path_mandatoryItemsPending);
|
|
1119
1119
|
if (referencepath_mandatoryItemsPendingValidationError !== null) {
|
|
1120
1120
|
let message = 'Object doesn\'t match ActionPlanItemListRepresentation (at "' + path_mandatoryItemsPending + '")\n';
|
|
1121
1121
|
message += referencepath_mandatoryItemsPendingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1137,62 +1137,62 @@ function validate(obj, path = 'ActionPlanStatusInfoOutputRepresentation') {
|
|
|
1137
1137
|
})();
|
|
1138
1138
|
return v_error === undefined ? null : v_error;
|
|
1139
1139
|
}
|
|
1140
|
-
const RepresentationType = 'ActionPlanStatusInfoOutputRepresentation';
|
|
1141
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1140
|
+
const RepresentationType$2 = 'ActionPlanStatusInfoOutputRepresentation';
|
|
1141
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1142
1142
|
return input;
|
|
1143
1143
|
}
|
|
1144
|
-
const select$
|
|
1144
|
+
const select$5 = function ActionPlanStatusInfoOutputRepresentationSelect() {
|
|
1145
1145
|
return {
|
|
1146
1146
|
kind: 'Fragment',
|
|
1147
|
-
version: VERSION,
|
|
1147
|
+
version: VERSION$2,
|
|
1148
1148
|
private: [],
|
|
1149
1149
|
opaque: true
|
|
1150
1150
|
};
|
|
1151
1151
|
};
|
|
1152
|
-
function equals(existing, incoming) {
|
|
1152
|
+
function equals$2(existing, incoming) {
|
|
1153
1153
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1154
1154
|
return false;
|
|
1155
1155
|
}
|
|
1156
1156
|
return true;
|
|
1157
1157
|
}
|
|
1158
|
-
const ingest = function ActionPlanStatusInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1158
|
+
const ingest$2 = function ActionPlanStatusInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1159
1159
|
if (process.env.NODE_ENV !== 'production') {
|
|
1160
|
-
const validateError = validate(input);
|
|
1160
|
+
const validateError = validate$8(input);
|
|
1161
1161
|
if (validateError !== null) {
|
|
1162
1162
|
throw validateError;
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
const key = path.fullPath;
|
|
1166
|
-
const ttlToUse = TTL;
|
|
1167
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ActionPlan", VERSION, RepresentationType, equals);
|
|
1166
|
+
const ttlToUse = TTL$2;
|
|
1167
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ActionPlan", VERSION$2, RepresentationType$2, equals$2);
|
|
1168
1168
|
return createLink(key);
|
|
1169
1169
|
};
|
|
1170
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1170
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1171
1171
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1172
1172
|
const rootKey = fullPathFactory();
|
|
1173
1173
|
rootKeySet.set(rootKey, {
|
|
1174
1174
|
namespace: keyPrefix,
|
|
1175
|
-
representationName: RepresentationType,
|
|
1175
|
+
representationName: RepresentationType$2,
|
|
1176
1176
|
mergeable: false
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
1179
1179
|
|
|
1180
|
-
function select(luvio, params) {
|
|
1181
|
-
return select$
|
|
1180
|
+
function select$4(luvio, params) {
|
|
1181
|
+
return select$5();
|
|
1182
1182
|
}
|
|
1183
|
-
function keyBuilder$
|
|
1183
|
+
function keyBuilder$3(luvio, params) {
|
|
1184
1184
|
return keyPrefix + '::ActionPlanStatusInfoOutputRepresentation:(' + 'actionPlanId:' + params.urlParams.actionPlanId + ')';
|
|
1185
1185
|
}
|
|
1186
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1187
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1186
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1187
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
|
|
1188
1188
|
}
|
|
1189
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1189
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1190
1190
|
const { body } = response;
|
|
1191
|
-
const key = keyBuilder$
|
|
1192
|
-
luvio.storeIngest(key, ingest, body);
|
|
1191
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
1192
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1193
1193
|
const snapshot = luvio.storeLookup({
|
|
1194
1194
|
recordId: key,
|
|
1195
|
-
node: select(),
|
|
1195
|
+
node: select$4(),
|
|
1196
1196
|
variables: {},
|
|
1197
1197
|
}, snapshotRefresh);
|
|
1198
1198
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1204,18 +1204,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1204
1204
|
return snapshot;
|
|
1205
1205
|
}
|
|
1206
1206
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1207
|
-
const key = keyBuilder$
|
|
1207
|
+
const key = keyBuilder$3(luvio, params);
|
|
1208
1208
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1209
1209
|
const storeMetadataParams = {
|
|
1210
|
-
ttl: TTL,
|
|
1210
|
+
ttl: TTL$2,
|
|
1211
1211
|
namespace: keyPrefix,
|
|
1212
|
-
version: VERSION,
|
|
1213
|
-
representationName: RepresentationType
|
|
1212
|
+
version: VERSION$2,
|
|
1213
|
+
representationName: RepresentationType$2
|
|
1214
1214
|
};
|
|
1215
1215
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1216
1216
|
return errorSnapshot;
|
|
1217
1217
|
}
|
|
1218
|
-
function createResourceRequest(config) {
|
|
1218
|
+
function createResourceRequest$2(config) {
|
|
1219
1219
|
const headers = {};
|
|
1220
1220
|
return {
|
|
1221
1221
|
baseUri: '/services/data/v62.0',
|
|
@@ -1229,60 +1229,60 @@ function createResourceRequest(config) {
|
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
1231
|
|
|
1232
|
-
const adapterName = 'getActionPlanStatusInfo';
|
|
1232
|
+
const adapterName$2 = 'getActionPlanStatusInfo';
|
|
1233
1233
|
const getActionPlanStatusInfo_ConfigPropertyMetadata = [
|
|
1234
1234
|
generateParamConfigMetadata('actionPlanId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1235
1235
|
];
|
|
1236
|
-
const getActionPlanStatusInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getActionPlanStatusInfo_ConfigPropertyMetadata);
|
|
1237
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1238
|
-
function keyBuilder(luvio, config) {
|
|
1239
|
-
const resourceParams = createResourceParams(config);
|
|
1240
|
-
return keyBuilder$
|
|
1236
|
+
const getActionPlanStatusInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getActionPlanStatusInfo_ConfigPropertyMetadata);
|
|
1237
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$6(getActionPlanStatusInfo_ConfigPropertyMetadata);
|
|
1238
|
+
function keyBuilder$2(luvio, config) {
|
|
1239
|
+
const resourceParams = createResourceParams$2(config);
|
|
1240
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
1241
1241
|
}
|
|
1242
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1242
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1243
1243
|
const config = {};
|
|
1244
|
-
typeCheckConfig$
|
|
1244
|
+
typeCheckConfig$6(untrustedConfig, config, getActionPlanStatusInfo_ConfigPropertyMetadata);
|
|
1245
1245
|
return config;
|
|
1246
1246
|
}
|
|
1247
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1247
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1248
1248
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1249
1249
|
return null;
|
|
1250
1250
|
}
|
|
1251
1251
|
if (process.env.NODE_ENV !== 'production') {
|
|
1252
1252
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1253
1253
|
}
|
|
1254
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1254
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1255
1255
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1256
1256
|
return null;
|
|
1257
1257
|
}
|
|
1258
1258
|
return config;
|
|
1259
1259
|
}
|
|
1260
1260
|
function adapterFragment(luvio, config) {
|
|
1261
|
-
createResourceParams(config);
|
|
1262
|
-
return select();
|
|
1261
|
+
createResourceParams$2(config);
|
|
1262
|
+
return select$4();
|
|
1263
1263
|
}
|
|
1264
1264
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1265
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1265
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1266
1266
|
config,
|
|
1267
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1267
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1268
1268
|
});
|
|
1269
1269
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1270
1270
|
}
|
|
1271
1271
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1272
1272
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1273
1273
|
config,
|
|
1274
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1274
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1275
1275
|
});
|
|
1276
1276
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1277
1277
|
}
|
|
1278
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
1279
|
-
const resourceParams = createResourceParams(config);
|
|
1280
|
-
const request = createResourceRequest(resourceParams);
|
|
1278
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1279
|
+
const resourceParams = createResourceParams$2(config);
|
|
1280
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1281
1281
|
return luvio.dispatchResourceRequest(request, options)
|
|
1282
1282
|
.then((response) => {
|
|
1283
1283
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1284
1284
|
const cache = new StoreKeyMap();
|
|
1285
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1285
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1286
1286
|
return cache;
|
|
1287
1287
|
});
|
|
1288
1288
|
}, (response) => {
|
|
@@ -1290,23 +1290,23 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1290
1290
|
});
|
|
1291
1291
|
}
|
|
1292
1292
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1293
|
-
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1293
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1294
1294
|
}
|
|
1295
1295
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1296
1296
|
const { luvio, config } = context;
|
|
1297
1297
|
const selector = {
|
|
1298
|
-
recordId: keyBuilder(luvio, config),
|
|
1298
|
+
recordId: keyBuilder$2(luvio, config),
|
|
1299
1299
|
node: adapterFragment(luvio, config),
|
|
1300
1300
|
variables: {},
|
|
1301
1301
|
};
|
|
1302
1302
|
const cacheSnapshot = storeLookup(selector, {
|
|
1303
1303
|
config,
|
|
1304
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1304
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1305
1305
|
});
|
|
1306
1306
|
return cacheSnapshot;
|
|
1307
1307
|
}
|
|
1308
1308
|
const getActionPlanStatusInfoAdapterFactory = (luvio) => function ActionPlan__getActionPlanStatusInfo(untrustedConfig, requestContext) {
|
|
1309
|
-
const config = validateAdapterConfig(untrustedConfig, getActionPlanStatusInfo_ConfigPropertyNames);
|
|
1309
|
+
const config = validateAdapterConfig$2(untrustedConfig, getActionPlanStatusInfo_ConfigPropertyNames);
|
|
1310
1310
|
// Invalid or incomplete config
|
|
1311
1311
|
if (config === null) {
|
|
1312
1312
|
return null;
|
|
@@ -1315,4 +1315,619 @@ const getActionPlanStatusInfoAdapterFactory = (luvio) => function ActionPlan__ge
|
|
|
1315
1315
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1316
1316
|
};
|
|
1317
1317
|
|
|
1318
|
-
|
|
1318
|
+
function validate$7(obj, path = 'ActionPlanTemplateItemValueUpdateInputRepresentation') {
|
|
1319
|
+
const v_error = (() => {
|
|
1320
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1321
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1322
|
+
}
|
|
1323
|
+
if (obj.actionPlanTemplateItemValueId !== undefined) {
|
|
1324
|
+
const obj_actionPlanTemplateItemValueId = obj.actionPlanTemplateItemValueId;
|
|
1325
|
+
const path_actionPlanTemplateItemValueId = path + '.actionPlanTemplateItemValueId';
|
|
1326
|
+
if (typeof obj_actionPlanTemplateItemValueId !== 'string') {
|
|
1327
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionPlanTemplateItemValueId + '" (at "' + path_actionPlanTemplateItemValueId + '")');
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
if (obj.fieldValueFormula !== undefined) {
|
|
1331
|
+
const obj_fieldValueFormula = obj.fieldValueFormula;
|
|
1332
|
+
const path_fieldValueFormula = path + '.fieldValueFormula';
|
|
1333
|
+
if (typeof obj_fieldValueFormula !== 'string') {
|
|
1334
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldValueFormula + '" (at "' + path_fieldValueFormula + '")');
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
if (obj.fieldValueLiteral !== undefined) {
|
|
1338
|
+
const obj_fieldValueLiteral = obj.fieldValueLiteral;
|
|
1339
|
+
const path_fieldValueLiteral = path + '.fieldValueLiteral';
|
|
1340
|
+
if (obj_fieldValueLiteral === undefined) {
|
|
1341
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_fieldValueLiteral + '" (at "' + path_fieldValueLiteral + '")');
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
if (obj.itemEntityFieldName !== undefined) {
|
|
1345
|
+
const obj_itemEntityFieldName = obj.itemEntityFieldName;
|
|
1346
|
+
const path_itemEntityFieldName = path + '.itemEntityFieldName';
|
|
1347
|
+
if (typeof obj_itemEntityFieldName !== 'string') {
|
|
1348
|
+
return new TypeError('Expected "string" but received "' + typeof obj_itemEntityFieldName + '" (at "' + path_itemEntityFieldName + '")');
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
})();
|
|
1352
|
+
return v_error === undefined ? null : v_error;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
function validate$6(obj, path = 'ActionPlanTemplateItemUpdateInputRepresentation') {
|
|
1356
|
+
const v_error = (() => {
|
|
1357
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1358
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1359
|
+
}
|
|
1360
|
+
const obj_actionPlanTemplateItemId = obj.actionPlanTemplateItemId;
|
|
1361
|
+
const path_actionPlanTemplateItemId = path + '.actionPlanTemplateItemId';
|
|
1362
|
+
if (typeof obj_actionPlanTemplateItemId !== 'string') {
|
|
1363
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionPlanTemplateItemId + '" (at "' + path_actionPlanTemplateItemId + '")');
|
|
1364
|
+
}
|
|
1365
|
+
if (obj.actionPlanTemplateItemValues !== undefined) {
|
|
1366
|
+
const obj_actionPlanTemplateItemValues = obj.actionPlanTemplateItemValues;
|
|
1367
|
+
const path_actionPlanTemplateItemValues = path + '.actionPlanTemplateItemValues';
|
|
1368
|
+
if (!ArrayIsArray(obj_actionPlanTemplateItemValues)) {
|
|
1369
|
+
return new TypeError('Expected "array" but received "' + typeof obj_actionPlanTemplateItemValues + '" (at "' + path_actionPlanTemplateItemValues + '")');
|
|
1370
|
+
}
|
|
1371
|
+
for (let i = 0; i < obj_actionPlanTemplateItemValues.length; i++) {
|
|
1372
|
+
const obj_actionPlanTemplateItemValues_item = obj_actionPlanTemplateItemValues[i];
|
|
1373
|
+
const path_actionPlanTemplateItemValues_item = path_actionPlanTemplateItemValues + '[' + i + ']';
|
|
1374
|
+
const referencepath_actionPlanTemplateItemValues_itemValidationError = validate$7(obj_actionPlanTemplateItemValues_item, path_actionPlanTemplateItemValues_item);
|
|
1375
|
+
if (referencepath_actionPlanTemplateItemValues_itemValidationError !== null) {
|
|
1376
|
+
let message = 'Object doesn\'t match ActionPlanTemplateItemValueUpdateInputRepresentation (at "' + path_actionPlanTemplateItemValues_item + '")\n';
|
|
1377
|
+
message += referencepath_actionPlanTemplateItemValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1378
|
+
return new TypeError(message);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
if (obj.isRequired !== undefined) {
|
|
1383
|
+
const obj_isRequired = obj.isRequired;
|
|
1384
|
+
const path_isRequired = path + '.isRequired';
|
|
1385
|
+
if (typeof obj_isRequired !== 'boolean') {
|
|
1386
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
if (obj.subject !== undefined) {
|
|
1390
|
+
const obj_subject = obj.subject;
|
|
1391
|
+
const path_subject = path + '.subject';
|
|
1392
|
+
if (typeof obj_subject !== 'string') {
|
|
1393
|
+
return new TypeError('Expected "string" but received "' + typeof obj_subject + '" (at "' + path_subject + '")');
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
})();
|
|
1397
|
+
return v_error === undefined ? null : v_error;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
function validate$5(obj, path = 'ActionPlanTemplateUpdateErrorOutputRepresentation') {
|
|
1401
|
+
const v_error = (() => {
|
|
1402
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1403
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1404
|
+
}
|
|
1405
|
+
const obj_actionPlanTemplateItemId = obj.actionPlanTemplateItemId;
|
|
1406
|
+
const path_actionPlanTemplateItemId = path + '.actionPlanTemplateItemId';
|
|
1407
|
+
if (typeof obj_actionPlanTemplateItemId !== 'string') {
|
|
1408
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionPlanTemplateItemId + '" (at "' + path_actionPlanTemplateItemId + '")');
|
|
1409
|
+
}
|
|
1410
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1411
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1412
|
+
if (!ArrayIsArray(obj_errorMessage)) {
|
|
1413
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1414
|
+
}
|
|
1415
|
+
for (let i = 0; i < obj_errorMessage.length; i++) {
|
|
1416
|
+
const obj_errorMessage_item = obj_errorMessage[i];
|
|
1417
|
+
const path_errorMessage_item = path_errorMessage + '[' + i + ']';
|
|
1418
|
+
if (typeof obj_errorMessage_item !== 'string') {
|
|
1419
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage_item + '" (at "' + path_errorMessage_item + '")');
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
})();
|
|
1423
|
+
return v_error === undefined ? null : v_error;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
const TTL$1 = 1000;
|
|
1427
|
+
const VERSION$1 = "5d4c1520638de11c3fb6993336f85ac6";
|
|
1428
|
+
function validate$4(obj, path = 'ActionPlanTemplateUpdateOutputRepresentation') {
|
|
1429
|
+
const v_error = (() => {
|
|
1430
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1431
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1432
|
+
}
|
|
1433
|
+
const obj_actionPlanTemplateVersionId = obj.actionPlanTemplateVersionId;
|
|
1434
|
+
const path_actionPlanTemplateVersionId = path + '.actionPlanTemplateVersionId';
|
|
1435
|
+
if (typeof obj_actionPlanTemplateVersionId !== 'string') {
|
|
1436
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionPlanTemplateVersionId + '" (at "' + path_actionPlanTemplateVersionId + '")');
|
|
1437
|
+
}
|
|
1438
|
+
const obj_errors = obj.errors;
|
|
1439
|
+
const path_errors = path + '.errors';
|
|
1440
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
1441
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
1442
|
+
}
|
|
1443
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
1444
|
+
const obj_errors_item = obj_errors[i];
|
|
1445
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
1446
|
+
const referencepath_errors_itemValidationError = validate$5(obj_errors_item, path_errors_item);
|
|
1447
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1448
|
+
let message = 'Object doesn\'t match ActionPlanTemplateUpdateErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
1449
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1450
|
+
return new TypeError(message);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
const obj_message = obj.message;
|
|
1454
|
+
const path_message = path + '.message';
|
|
1455
|
+
let obj_message_union0 = null;
|
|
1456
|
+
const obj_message_union0_error = (() => {
|
|
1457
|
+
if (typeof obj_message !== 'string') {
|
|
1458
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1459
|
+
}
|
|
1460
|
+
})();
|
|
1461
|
+
if (obj_message_union0_error != null) {
|
|
1462
|
+
obj_message_union0 = obj_message_union0_error.message;
|
|
1463
|
+
}
|
|
1464
|
+
let obj_message_union1 = null;
|
|
1465
|
+
const obj_message_union1_error = (() => {
|
|
1466
|
+
if (obj_message !== null) {
|
|
1467
|
+
return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1468
|
+
}
|
|
1469
|
+
})();
|
|
1470
|
+
if (obj_message_union1_error != null) {
|
|
1471
|
+
obj_message_union1 = obj_message_union1_error.message;
|
|
1472
|
+
}
|
|
1473
|
+
if (obj_message_union0 && obj_message_union1) {
|
|
1474
|
+
let message = 'Object doesn\'t match union (at "' + path_message + '")';
|
|
1475
|
+
message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1476
|
+
message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1477
|
+
return new TypeError(message);
|
|
1478
|
+
}
|
|
1479
|
+
const obj_status = obj.status;
|
|
1480
|
+
const path_status = path + '.status';
|
|
1481
|
+
if (typeof obj_status !== 'string') {
|
|
1482
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1483
|
+
}
|
|
1484
|
+
})();
|
|
1485
|
+
return v_error === undefined ? null : v_error;
|
|
1486
|
+
}
|
|
1487
|
+
const RepresentationType$1 = 'ActionPlanTemplateUpdateOutputRepresentation';
|
|
1488
|
+
function keyBuilder$1(luvio, config) {
|
|
1489
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
1490
|
+
}
|
|
1491
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1492
|
+
const keyParams = {
|
|
1493
|
+
id: object.actionPlanTemplateVersionId
|
|
1494
|
+
};
|
|
1495
|
+
return keyBuilder$1(luvio, keyParams);
|
|
1496
|
+
}
|
|
1497
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1498
|
+
return input;
|
|
1499
|
+
}
|
|
1500
|
+
const select$3 = function ActionPlanTemplateUpdateOutputRepresentationSelect() {
|
|
1501
|
+
return {
|
|
1502
|
+
kind: 'Fragment',
|
|
1503
|
+
version: VERSION$1,
|
|
1504
|
+
private: [],
|
|
1505
|
+
opaque: true
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1508
|
+
function equals$1(existing, incoming) {
|
|
1509
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1510
|
+
return false;
|
|
1511
|
+
}
|
|
1512
|
+
return true;
|
|
1513
|
+
}
|
|
1514
|
+
const ingest$1 = function ActionPlanTemplateUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1515
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1516
|
+
const validateError = validate$4(input);
|
|
1517
|
+
if (validateError !== null) {
|
|
1518
|
+
throw validateError;
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1522
|
+
const ttlToUse = TTL$1;
|
|
1523
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "ActionPlan", VERSION$1, RepresentationType$1, equals$1);
|
|
1524
|
+
return createLink(key);
|
|
1525
|
+
};
|
|
1526
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1527
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1528
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1529
|
+
rootKeySet.set(rootKey, {
|
|
1530
|
+
namespace: keyPrefix,
|
|
1531
|
+
representationName: RepresentationType$1,
|
|
1532
|
+
mergeable: false
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
function select$2(luvio, params) {
|
|
1537
|
+
return select$3();
|
|
1538
|
+
}
|
|
1539
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1540
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
1541
|
+
}
|
|
1542
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1543
|
+
const { body } = response;
|
|
1544
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1545
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1546
|
+
const snapshot = luvio.storeLookup({
|
|
1547
|
+
recordId: key,
|
|
1548
|
+
node: select$2(),
|
|
1549
|
+
variables: {},
|
|
1550
|
+
});
|
|
1551
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1552
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1553
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
deepFreeze(snapshot.data);
|
|
1557
|
+
return snapshot;
|
|
1558
|
+
}
|
|
1559
|
+
function createResourceRequest$1(config) {
|
|
1560
|
+
const headers = {};
|
|
1561
|
+
return {
|
|
1562
|
+
baseUri: '/services/data/v62.0',
|
|
1563
|
+
basePath: '/connect/action-plan-template-update/' + config.urlParams.actionPlanTemplateVersionId + '',
|
|
1564
|
+
method: 'patch',
|
|
1565
|
+
body: config.body,
|
|
1566
|
+
urlParams: config.urlParams,
|
|
1567
|
+
queryParams: {},
|
|
1568
|
+
headers,
|
|
1569
|
+
priority: 'normal',
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
const adapterName$1 = 'updateActionPlanTemplateTasks';
|
|
1574
|
+
const updateActionPlanTemplateTasks_ConfigPropertyMetadata = [
|
|
1575
|
+
generateParamConfigMetadata('actionPlanTemplateVersionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1576
|
+
generateParamConfigMetadata('actionPlanTemplateItems', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1577
|
+
];
|
|
1578
|
+
const updateActionPlanTemplateTasks_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateActionPlanTemplateTasks_ConfigPropertyMetadata);
|
|
1579
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$6(updateActionPlanTemplateTasks_ConfigPropertyMetadata);
|
|
1580
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1581
|
+
const config = {};
|
|
1582
|
+
typeCheckConfig$6(untrustedConfig, config, updateActionPlanTemplateTasks_ConfigPropertyMetadata);
|
|
1583
|
+
const untrustedConfig_actionPlanTemplateItems = untrustedConfig.actionPlanTemplateItems;
|
|
1584
|
+
if (ArrayIsArray$1(untrustedConfig_actionPlanTemplateItems)) {
|
|
1585
|
+
const untrustedConfig_actionPlanTemplateItems_array = [];
|
|
1586
|
+
for (let i = 0, arrayLength = untrustedConfig_actionPlanTemplateItems.length; i < arrayLength; i++) {
|
|
1587
|
+
const untrustedConfig_actionPlanTemplateItems_item = untrustedConfig_actionPlanTemplateItems[i];
|
|
1588
|
+
const referenceActionPlanTemplateItemUpdateInputRepresentationValidationError = validate$6(untrustedConfig_actionPlanTemplateItems_item);
|
|
1589
|
+
if (referenceActionPlanTemplateItemUpdateInputRepresentationValidationError === null) {
|
|
1590
|
+
untrustedConfig_actionPlanTemplateItems_array.push(untrustedConfig_actionPlanTemplateItems_item);
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
config.actionPlanTemplateItems = untrustedConfig_actionPlanTemplateItems_array;
|
|
1594
|
+
}
|
|
1595
|
+
return config;
|
|
1596
|
+
}
|
|
1597
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1598
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1599
|
+
return null;
|
|
1600
|
+
}
|
|
1601
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1602
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1603
|
+
}
|
|
1604
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1605
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1606
|
+
return null;
|
|
1607
|
+
}
|
|
1608
|
+
return config;
|
|
1609
|
+
}
|
|
1610
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1611
|
+
const resourceParams = createResourceParams$1(config);
|
|
1612
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1613
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1614
|
+
.then((response) => {
|
|
1615
|
+
return luvio.handleSuccessResponse(() => {
|
|
1616
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1617
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1618
|
+
}, () => {
|
|
1619
|
+
const cache = new StoreKeyMap();
|
|
1620
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1621
|
+
return cache;
|
|
1622
|
+
});
|
|
1623
|
+
}, (response) => {
|
|
1624
|
+
deepFreeze(response);
|
|
1625
|
+
throw response;
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
const updateActionPlanTemplateTasksAdapterFactory = (luvio) => {
|
|
1629
|
+
return function updateActionPlanTemplateTasks(untrustedConfig) {
|
|
1630
|
+
const config = validateAdapterConfig$1(untrustedConfig, updateActionPlanTemplateTasks_ConfigPropertyNames);
|
|
1631
|
+
// Invalid or incomplete config
|
|
1632
|
+
if (config === null) {
|
|
1633
|
+
throw new Error('Invalid config for "updateActionPlanTemplateTasks"');
|
|
1634
|
+
}
|
|
1635
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1636
|
+
};
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1639
|
+
function validate$3(obj, path = 'ActionPlanTaskFieldValueUpdateInputRepresentation') {
|
|
1640
|
+
const v_error = (() => {
|
|
1641
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1642
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1643
|
+
}
|
|
1644
|
+
const obj_fieldApiName = obj.fieldApiName;
|
|
1645
|
+
const path_fieldApiName = path + '.fieldApiName';
|
|
1646
|
+
if (typeof obj_fieldApiName !== 'string') {
|
|
1647
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
1648
|
+
}
|
|
1649
|
+
const obj_fieldValue = obj.fieldValue;
|
|
1650
|
+
const path_fieldValue = path + '.fieldValue';
|
|
1651
|
+
if (typeof obj_fieldValue !== 'string') {
|
|
1652
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
|
|
1653
|
+
}
|
|
1654
|
+
})();
|
|
1655
|
+
return v_error === undefined ? null : v_error;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
function validate$2(obj, path = 'ActionPlanTaskUpdateInputRepresentation') {
|
|
1659
|
+
const v_error = (() => {
|
|
1660
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1661
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1662
|
+
}
|
|
1663
|
+
if (obj.actionPlanItemId !== undefined) {
|
|
1664
|
+
const obj_actionPlanItemId = obj.actionPlanItemId;
|
|
1665
|
+
const path_actionPlanItemId = path + '.actionPlanItemId';
|
|
1666
|
+
if (typeof obj_actionPlanItemId !== 'string') {
|
|
1667
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionPlanItemId + '" (at "' + path_actionPlanItemId + '")');
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
const obj_taskFieldValues = obj.taskFieldValues;
|
|
1671
|
+
const path_taskFieldValues = path + '.taskFieldValues';
|
|
1672
|
+
if (!ArrayIsArray(obj_taskFieldValues)) {
|
|
1673
|
+
return new TypeError('Expected "array" but received "' + typeof obj_taskFieldValues + '" (at "' + path_taskFieldValues + '")');
|
|
1674
|
+
}
|
|
1675
|
+
for (let i = 0; i < obj_taskFieldValues.length; i++) {
|
|
1676
|
+
const obj_taskFieldValues_item = obj_taskFieldValues[i];
|
|
1677
|
+
const path_taskFieldValues_item = path_taskFieldValues + '[' + i + ']';
|
|
1678
|
+
const referencepath_taskFieldValues_itemValidationError = validate$3(obj_taskFieldValues_item, path_taskFieldValues_item);
|
|
1679
|
+
if (referencepath_taskFieldValues_itemValidationError !== null) {
|
|
1680
|
+
let message = 'Object doesn\'t match ActionPlanTaskFieldValueUpdateInputRepresentation (at "' + path_taskFieldValues_item + '")\n';
|
|
1681
|
+
message += referencepath_taskFieldValues_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1682
|
+
return new TypeError(message);
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
const obj_taskId = obj.taskId;
|
|
1686
|
+
const path_taskId = path + '.taskId';
|
|
1687
|
+
if (typeof obj_taskId !== 'string') {
|
|
1688
|
+
return new TypeError('Expected "string" but received "' + typeof obj_taskId + '" (at "' + path_taskId + '")');
|
|
1689
|
+
}
|
|
1690
|
+
})();
|
|
1691
|
+
return v_error === undefined ? null : v_error;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
function validate$1(obj, path = 'ActionPlanUpdateErrorOutputRepresentation') {
|
|
1695
|
+
const v_error = (() => {
|
|
1696
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1697
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1698
|
+
}
|
|
1699
|
+
const obj_errorMessageList = obj.errorMessageList;
|
|
1700
|
+
const path_errorMessageList = path + '.errorMessageList';
|
|
1701
|
+
if (!ArrayIsArray(obj_errorMessageList)) {
|
|
1702
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errorMessageList + '" (at "' + path_errorMessageList + '")');
|
|
1703
|
+
}
|
|
1704
|
+
for (let i = 0; i < obj_errorMessageList.length; i++) {
|
|
1705
|
+
const obj_errorMessageList_item = obj_errorMessageList[i];
|
|
1706
|
+
const path_errorMessageList_item = path_errorMessageList + '[' + i + ']';
|
|
1707
|
+
if (typeof obj_errorMessageList_item !== 'string') {
|
|
1708
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessageList_item + '" (at "' + path_errorMessageList_item + '")');
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
const obj_taskId = obj.taskId;
|
|
1712
|
+
const path_taskId = path + '.taskId';
|
|
1713
|
+
if (typeof obj_taskId !== 'string') {
|
|
1714
|
+
return new TypeError('Expected "string" but received "' + typeof obj_taskId + '" (at "' + path_taskId + '")');
|
|
1715
|
+
}
|
|
1716
|
+
})();
|
|
1717
|
+
return v_error === undefined ? null : v_error;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
const TTL = 1000;
|
|
1721
|
+
const VERSION = "d6f8327bd45d41494638825f18251f24";
|
|
1722
|
+
function validate(obj, path = 'ActionPlanUpdateOutputRepresentation') {
|
|
1723
|
+
const v_error = (() => {
|
|
1724
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1725
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1726
|
+
}
|
|
1727
|
+
const obj_actionPlanId = obj.actionPlanId;
|
|
1728
|
+
const path_actionPlanId = path + '.actionPlanId';
|
|
1729
|
+
if (typeof obj_actionPlanId !== 'string') {
|
|
1730
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionPlanId + '" (at "' + path_actionPlanId + '")');
|
|
1731
|
+
}
|
|
1732
|
+
const obj_errors = obj.errors;
|
|
1733
|
+
const path_errors = path + '.errors';
|
|
1734
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
1735
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
1736
|
+
}
|
|
1737
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
1738
|
+
const obj_errors_item = obj_errors[i];
|
|
1739
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
1740
|
+
const referencepath_errors_itemValidationError = validate$1(obj_errors_item, path_errors_item);
|
|
1741
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
1742
|
+
let message = 'Object doesn\'t match ActionPlanUpdateErrorOutputRepresentation (at "' + path_errors_item + '")\n';
|
|
1743
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1744
|
+
return new TypeError(message);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
const obj_message = obj.message;
|
|
1748
|
+
const path_message = path + '.message';
|
|
1749
|
+
let obj_message_union0 = null;
|
|
1750
|
+
const obj_message_union0_error = (() => {
|
|
1751
|
+
if (typeof obj_message !== 'string') {
|
|
1752
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1753
|
+
}
|
|
1754
|
+
})();
|
|
1755
|
+
if (obj_message_union0_error != null) {
|
|
1756
|
+
obj_message_union0 = obj_message_union0_error.message;
|
|
1757
|
+
}
|
|
1758
|
+
let obj_message_union1 = null;
|
|
1759
|
+
const obj_message_union1_error = (() => {
|
|
1760
|
+
if (obj_message !== null) {
|
|
1761
|
+
return new TypeError('Expected "null" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
1762
|
+
}
|
|
1763
|
+
})();
|
|
1764
|
+
if (obj_message_union1_error != null) {
|
|
1765
|
+
obj_message_union1 = obj_message_union1_error.message;
|
|
1766
|
+
}
|
|
1767
|
+
if (obj_message_union0 && obj_message_union1) {
|
|
1768
|
+
let message = 'Object doesn\'t match union (at "' + path_message + '")';
|
|
1769
|
+
message += '\n' + obj_message_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1770
|
+
message += '\n' + obj_message_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1771
|
+
return new TypeError(message);
|
|
1772
|
+
}
|
|
1773
|
+
const obj_status = obj.status;
|
|
1774
|
+
const path_status = path + '.status';
|
|
1775
|
+
if (typeof obj_status !== 'string') {
|
|
1776
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1777
|
+
}
|
|
1778
|
+
})();
|
|
1779
|
+
return v_error === undefined ? null : v_error;
|
|
1780
|
+
}
|
|
1781
|
+
const RepresentationType = 'ActionPlanUpdateOutputRepresentation';
|
|
1782
|
+
function keyBuilder(luvio, config) {
|
|
1783
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
1784
|
+
}
|
|
1785
|
+
function keyBuilderFromType(luvio, object) {
|
|
1786
|
+
const keyParams = {
|
|
1787
|
+
id: object.actionPlanId
|
|
1788
|
+
};
|
|
1789
|
+
return keyBuilder(luvio, keyParams);
|
|
1790
|
+
}
|
|
1791
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1792
|
+
return input;
|
|
1793
|
+
}
|
|
1794
|
+
const select$1 = function ActionPlanUpdateOutputRepresentationSelect() {
|
|
1795
|
+
return {
|
|
1796
|
+
kind: 'Fragment',
|
|
1797
|
+
version: VERSION,
|
|
1798
|
+
private: [],
|
|
1799
|
+
opaque: true
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
function equals(existing, incoming) {
|
|
1803
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1804
|
+
return false;
|
|
1805
|
+
}
|
|
1806
|
+
return true;
|
|
1807
|
+
}
|
|
1808
|
+
const ingest = function ActionPlanUpdateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1809
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1810
|
+
const validateError = validate(input);
|
|
1811
|
+
if (validateError !== null) {
|
|
1812
|
+
throw validateError;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1816
|
+
const ttlToUse = TTL;
|
|
1817
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ActionPlan", VERSION, RepresentationType, equals);
|
|
1818
|
+
return createLink(key);
|
|
1819
|
+
};
|
|
1820
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1821
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1822
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1823
|
+
rootKeySet.set(rootKey, {
|
|
1824
|
+
namespace: keyPrefix,
|
|
1825
|
+
representationName: RepresentationType,
|
|
1826
|
+
mergeable: false
|
|
1827
|
+
});
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
function select(luvio, params) {
|
|
1831
|
+
return select$1();
|
|
1832
|
+
}
|
|
1833
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1834
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1835
|
+
}
|
|
1836
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1837
|
+
const { body } = response;
|
|
1838
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1839
|
+
luvio.storeIngest(key, ingest, body);
|
|
1840
|
+
const snapshot = luvio.storeLookup({
|
|
1841
|
+
recordId: key,
|
|
1842
|
+
node: select(),
|
|
1843
|
+
variables: {},
|
|
1844
|
+
});
|
|
1845
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1846
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1847
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
deepFreeze(snapshot.data);
|
|
1851
|
+
return snapshot;
|
|
1852
|
+
}
|
|
1853
|
+
function createResourceRequest(config) {
|
|
1854
|
+
const headers = {};
|
|
1855
|
+
return {
|
|
1856
|
+
baseUri: '/services/data/v62.0',
|
|
1857
|
+
basePath: '/connect/action-plan-update/' + config.urlParams.actionPlanId + '',
|
|
1858
|
+
method: 'patch',
|
|
1859
|
+
body: config.body,
|
|
1860
|
+
urlParams: config.urlParams,
|
|
1861
|
+
queryParams: {},
|
|
1862
|
+
headers,
|
|
1863
|
+
priority: 'normal',
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
const adapterName = 'updateActionPlanTasks';
|
|
1868
|
+
const updateActionPlanTasks_ConfigPropertyMetadata = [
|
|
1869
|
+
generateParamConfigMetadata('actionPlanId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1870
|
+
generateParamConfigMetadata('actionPlanTasks', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1871
|
+
];
|
|
1872
|
+
const updateActionPlanTasks_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateActionPlanTasks_ConfigPropertyMetadata);
|
|
1873
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$6(updateActionPlanTasks_ConfigPropertyMetadata);
|
|
1874
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1875
|
+
const config = {};
|
|
1876
|
+
typeCheckConfig$6(untrustedConfig, config, updateActionPlanTasks_ConfigPropertyMetadata);
|
|
1877
|
+
const untrustedConfig_actionPlanTasks = untrustedConfig.actionPlanTasks;
|
|
1878
|
+
if (ArrayIsArray$1(untrustedConfig_actionPlanTasks)) {
|
|
1879
|
+
const untrustedConfig_actionPlanTasks_array = [];
|
|
1880
|
+
for (let i = 0, arrayLength = untrustedConfig_actionPlanTasks.length; i < arrayLength; i++) {
|
|
1881
|
+
const untrustedConfig_actionPlanTasks_item = untrustedConfig_actionPlanTasks[i];
|
|
1882
|
+
const referenceActionPlanTaskUpdateInputRepresentationValidationError = validate$2(untrustedConfig_actionPlanTasks_item);
|
|
1883
|
+
if (referenceActionPlanTaskUpdateInputRepresentationValidationError === null) {
|
|
1884
|
+
untrustedConfig_actionPlanTasks_array.push(untrustedConfig_actionPlanTasks_item);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
config.actionPlanTasks = untrustedConfig_actionPlanTasks_array;
|
|
1888
|
+
}
|
|
1889
|
+
return config;
|
|
1890
|
+
}
|
|
1891
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1892
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1893
|
+
return null;
|
|
1894
|
+
}
|
|
1895
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1896
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1897
|
+
}
|
|
1898
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1899
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1900
|
+
return null;
|
|
1901
|
+
}
|
|
1902
|
+
return config;
|
|
1903
|
+
}
|
|
1904
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1905
|
+
const resourceParams = createResourceParams(config);
|
|
1906
|
+
const request = createResourceRequest(resourceParams);
|
|
1907
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1908
|
+
.then((response) => {
|
|
1909
|
+
return luvio.handleSuccessResponse(() => {
|
|
1910
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1911
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1912
|
+
}, () => {
|
|
1913
|
+
const cache = new StoreKeyMap();
|
|
1914
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1915
|
+
return cache;
|
|
1916
|
+
});
|
|
1917
|
+
}, (response) => {
|
|
1918
|
+
deepFreeze(response);
|
|
1919
|
+
throw response;
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
const updateActionPlanTasksAdapterFactory = (luvio) => {
|
|
1923
|
+
return function updateActionPlanTasks(untrustedConfig) {
|
|
1924
|
+
const config = validateAdapterConfig(untrustedConfig, updateActionPlanTasks_ConfigPropertyNames);
|
|
1925
|
+
// Invalid or incomplete config
|
|
1926
|
+
if (config === null) {
|
|
1927
|
+
throw new Error('Invalid config for "updateActionPlanTasks"');
|
|
1928
|
+
}
|
|
1929
|
+
return buildNetworkSnapshot(luvio, config);
|
|
1930
|
+
};
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1933
|
+
export { getActionPlanItemsAdapterFactory, getActionPlanStatusInfoAdapterFactory, getActionPlanTemplateItemsLabelAdapterFactory, getActionPlansAdapterFactory, updateActionPlanTasksAdapterFactory, updateActionPlanTemplateTasksAdapterFactory };
|