@salesforce/lds-adapters-sfap-analytics-insights 1.319.0 → 1.321.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/sfap-analytics-insights.js +188 -85
- package/dist/es/es2018/types/src/generated/adapters/generateInsightsBasic.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/postAnalyticsInsightsV1BasicGenerateBundle.d.ts +17 -0
- package/package.json +3 -3
- package/sfdc/index.js +171 -65
- package/src/raml/api.raml +13 -0
- package/src/raml/luvio.raml +5 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -997,7 +997,7 @@ function validate$e(obj, path = 'Error') {
|
|
|
997
997
|
})();
|
|
998
998
|
return v_error === undefined ? null : v_error;
|
|
999
999
|
}
|
|
1000
|
-
const select$
|
|
1000
|
+
const select$j = function ErrorSelect() {
|
|
1001
1001
|
return {
|
|
1002
1002
|
kind: 'Fragment',
|
|
1003
1003
|
version: VERSION$e,
|
|
@@ -1075,7 +1075,7 @@ function validate$d(obj, path = 'Summary') {
|
|
|
1075
1075
|
})();
|
|
1076
1076
|
return v_error === undefined ? null : v_error;
|
|
1077
1077
|
}
|
|
1078
|
-
const select$
|
|
1078
|
+
const select$i = function SummarySelect() {
|
|
1079
1079
|
return {
|
|
1080
1080
|
kind: 'Fragment',
|
|
1081
1081
|
version: VERSION$d,
|
|
@@ -1151,9 +1151,9 @@ function validate$c(obj, path = 'SummaryResponse') {
|
|
|
1151
1151
|
})();
|
|
1152
1152
|
return v_error === undefined ? null : v_error;
|
|
1153
1153
|
}
|
|
1154
|
-
const select$
|
|
1155
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
1156
|
-
const { selections: Summary__selections, opaque: Summary__opaque, } = select$
|
|
1154
|
+
const select$h = function SummaryResponseSelect() {
|
|
1155
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
1156
|
+
const { selections: Summary__selections, opaque: Summary__opaque, } = select$i();
|
|
1157
1157
|
return {
|
|
1158
1158
|
kind: 'Fragment',
|
|
1159
1159
|
version: VERSION$c,
|
|
@@ -1246,8 +1246,8 @@ function keyBuilderFromType$3(luvio, object) {
|
|
|
1246
1246
|
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1247
1247
|
return input;
|
|
1248
1248
|
}
|
|
1249
|
-
const select$
|
|
1250
|
-
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$
|
|
1249
|
+
const select$g = function GenerateInsightBatchResponseSelect() {
|
|
1250
|
+
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$h();
|
|
1251
1251
|
return {
|
|
1252
1252
|
kind: 'Fragment',
|
|
1253
1253
|
version: VERSION$b,
|
|
@@ -1345,19 +1345,19 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
1347
|
|
|
1348
|
-
function select$
|
|
1349
|
-
return select$
|
|
1348
|
+
function select$f(luvio, params) {
|
|
1349
|
+
return select$g();
|
|
1350
1350
|
}
|
|
1351
|
-
function getResponseCacheKeys$
|
|
1351
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1352
1352
|
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1353
1353
|
}
|
|
1354
|
-
function ingestSuccess$
|
|
1354
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
1355
1355
|
const { body } = response;
|
|
1356
1356
|
const key = keyBuilderFromType$3(luvio, body);
|
|
1357
1357
|
luvio.storeIngest(key, ingest$3, body);
|
|
1358
1358
|
const snapshot = luvio.storeLookup({
|
|
1359
1359
|
recordId: key,
|
|
1360
|
-
node: select$
|
|
1360
|
+
node: select$f(),
|
|
1361
1361
|
variables: {},
|
|
1362
1362
|
});
|
|
1363
1363
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1368,7 +1368,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
1368
1368
|
deepFreeze(snapshot.data);
|
|
1369
1369
|
return snapshot;
|
|
1370
1370
|
}
|
|
1371
|
-
function createResourceRequest$
|
|
1371
|
+
function createResourceRequest$4(config) {
|
|
1372
1372
|
const headers = {};
|
|
1373
1373
|
return {
|
|
1374
1374
|
baseUri: 'api.salesforce.com',
|
|
@@ -1382,14 +1382,14 @@ function createResourceRequest$3(config) {
|
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
1384
|
|
|
1385
|
-
const adapterName$
|
|
1385
|
+
const adapterName$4 = 'createInsightsBatch';
|
|
1386
1386
|
const createInsightsBatch_ConfigPropertyMetadata = [
|
|
1387
1387
|
generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1388
1388
|
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1389
1389
|
];
|
|
1390
|
-
const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1391
|
-
const createResourceParams$
|
|
1392
|
-
function typeCheckConfig$
|
|
1390
|
+
const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInsightsBatch_ConfigPropertyMetadata);
|
|
1391
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createInsightsBatch_ConfigPropertyMetadata);
|
|
1392
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1393
1393
|
const config = {};
|
|
1394
1394
|
const untrustedConfig_batchInput = untrustedConfig.batchInput;
|
|
1395
1395
|
if (ArrayIsArray$1(untrustedConfig_batchInput)) {
|
|
@@ -1410,30 +1410,30 @@ function typeCheckConfig$3(untrustedConfig) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
return config;
|
|
1412
1412
|
}
|
|
1413
|
-
function validateAdapterConfig$
|
|
1413
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1414
1414
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1415
1415
|
return null;
|
|
1416
1416
|
}
|
|
1417
1417
|
if (process.env.NODE_ENV !== 'production') {
|
|
1418
1418
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1419
1419
|
}
|
|
1420
|
-
const config = typeCheckConfig$
|
|
1420
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1421
1421
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1422
1422
|
return null;
|
|
1423
1423
|
}
|
|
1424
1424
|
return config;
|
|
1425
1425
|
}
|
|
1426
|
-
function buildNetworkSnapshot$
|
|
1427
|
-
const resourceParams = createResourceParams$
|
|
1428
|
-
const request = createResourceRequest$
|
|
1426
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1427
|
+
const resourceParams = createResourceParams$4(config);
|
|
1428
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1429
1429
|
return luvio.dispatchResourceRequest(request, options)
|
|
1430
1430
|
.then((response) => {
|
|
1431
1431
|
return luvio.handleSuccessResponse(() => {
|
|
1432
|
-
const snapshot = ingestSuccess$
|
|
1432
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
1433
1433
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1434
1434
|
}, () => {
|
|
1435
1435
|
const cache = new StoreKeyMap();
|
|
1436
|
-
getResponseCacheKeys$
|
|
1436
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1437
1437
|
return cache;
|
|
1438
1438
|
});
|
|
1439
1439
|
}, (response) => {
|
|
@@ -1443,12 +1443,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
const createInsightsBatchAdapterFactory = (luvio) => {
|
|
1445
1445
|
return function createInsightsBatch(untrustedConfig) {
|
|
1446
|
-
const config = validateAdapterConfig$
|
|
1446
|
+
const config = validateAdapterConfig$4(untrustedConfig, createInsightsBatch_ConfigPropertyNames);
|
|
1447
1447
|
// Invalid or incomplete config
|
|
1448
1448
|
if (config === null) {
|
|
1449
1449
|
throw new Error('Invalid config for "createInsightsBatch"');
|
|
1450
1450
|
}
|
|
1451
|
-
return buildNetworkSnapshot$
|
|
1451
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
1452
1452
|
};
|
|
1453
1453
|
};
|
|
1454
1454
|
|
|
@@ -1516,7 +1516,7 @@ function validate$a(obj, path = 'GetFilterValuesResponse_CategoricalValues') {
|
|
|
1516
1516
|
})();
|
|
1517
1517
|
return v_error === undefined ? null : v_error;
|
|
1518
1518
|
}
|
|
1519
|
-
const select$
|
|
1519
|
+
const select$e = function GetFilterValuesResponse_CategoricalValuesSelect() {
|
|
1520
1520
|
return {
|
|
1521
1521
|
kind: 'Fragment',
|
|
1522
1522
|
version: VERSION$a,
|
|
@@ -1602,8 +1602,8 @@ function keyBuilderFromType$2(luvio, object) {
|
|
|
1602
1602
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1603
1603
|
return input;
|
|
1604
1604
|
}
|
|
1605
|
-
const select$
|
|
1606
|
-
const { selections: GetFilterValuesResponse_CategoricalValues__selections, opaque: GetFilterValuesResponse_CategoricalValues__opaque, } = select$
|
|
1605
|
+
const select$d = function GetFilterValuesResponseSelect() {
|
|
1606
|
+
const { selections: GetFilterValuesResponse_CategoricalValues__selections, opaque: GetFilterValuesResponse_CategoricalValues__opaque, } = select$e();
|
|
1607
1607
|
return {
|
|
1608
1608
|
kind: 'Fragment',
|
|
1609
1609
|
version: VERSION$9,
|
|
@@ -1692,19 +1692,19 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1692
1692
|
});
|
|
1693
1693
|
}
|
|
1694
1694
|
|
|
1695
|
-
function select$
|
|
1696
|
-
return select$
|
|
1695
|
+
function select$c(luvio, params) {
|
|
1696
|
+
return select$d();
|
|
1697
1697
|
}
|
|
1698
|
-
function getResponseCacheKeys$
|
|
1698
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1699
1699
|
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1700
1700
|
}
|
|
1701
|
-
function ingestSuccess$
|
|
1701
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1702
1702
|
const { body } = response;
|
|
1703
1703
|
const key = keyBuilderFromType$2(luvio, body);
|
|
1704
1704
|
luvio.storeIngest(key, ingest$2, body);
|
|
1705
1705
|
const snapshot = luvio.storeLookup({
|
|
1706
1706
|
recordId: key,
|
|
1707
|
-
node: select$
|
|
1707
|
+
node: select$c(),
|
|
1708
1708
|
variables: {},
|
|
1709
1709
|
});
|
|
1710
1710
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1715,7 +1715,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
1715
1715
|
deepFreeze(snapshot.data);
|
|
1716
1716
|
return snapshot;
|
|
1717
1717
|
}
|
|
1718
|
-
function createResourceRequest$
|
|
1718
|
+
function createResourceRequest$3(config) {
|
|
1719
1719
|
const headers = {};
|
|
1720
1720
|
return {
|
|
1721
1721
|
baseUri: 'api.salesforce.com',
|
|
@@ -1729,7 +1729,7 @@ function createResourceRequest$2(config) {
|
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
1731
1731
|
|
|
1732
|
-
const adapterName$
|
|
1732
|
+
const adapterName$3 = 'getMetricFilterValues';
|
|
1733
1733
|
const getMetricFilterValues_ConfigPropertyMetadata = [
|
|
1734
1734
|
generateParamConfigMetadata('semanticDataModel', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1735
1735
|
generateParamConfigMetadata('field', true, 2 /* Body */, 4 /* Unsupported */),
|
|
@@ -1739,11 +1739,11 @@ const getMetricFilterValues_ConfigPropertyMetadata = [
|
|
|
1739
1739
|
generateParamConfigMetadata('filters', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1740
1740
|
generateParamConfigMetadata('semanticFilter', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1741
1741
|
];
|
|
1742
|
-
const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1743
|
-
const createResourceParams$
|
|
1744
|
-
function typeCheckConfig$
|
|
1742
|
+
const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getMetricFilterValues_ConfigPropertyMetadata);
|
|
1743
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getMetricFilterValues_ConfigPropertyMetadata);
|
|
1744
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1745
1745
|
const config = {};
|
|
1746
|
-
typeCheckConfig$
|
|
1746
|
+
typeCheckConfig$5(untrustedConfig, config, getMetricFilterValues_ConfigPropertyMetadata);
|
|
1747
1747
|
const untrustedConfig_semanticDataModel = untrustedConfig.semanticDataModel;
|
|
1748
1748
|
const referenceSemanticDataModelValidationError = validate$q(untrustedConfig_semanticDataModel);
|
|
1749
1749
|
if (referenceSemanticDataModelValidationError === null) {
|
|
@@ -1773,30 +1773,30 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
return config;
|
|
1775
1775
|
}
|
|
1776
|
-
function validateAdapterConfig$
|
|
1776
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1777
1777
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1778
1778
|
return null;
|
|
1779
1779
|
}
|
|
1780
1780
|
if (process.env.NODE_ENV !== 'production') {
|
|
1781
1781
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1782
1782
|
}
|
|
1783
|
-
const config = typeCheckConfig$
|
|
1783
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1784
1784
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1785
1785
|
return null;
|
|
1786
1786
|
}
|
|
1787
1787
|
return config;
|
|
1788
1788
|
}
|
|
1789
|
-
function buildNetworkSnapshot$
|
|
1790
|
-
const resourceParams = createResourceParams$
|
|
1791
|
-
const request = createResourceRequest$
|
|
1789
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1790
|
+
const resourceParams = createResourceParams$3(config);
|
|
1791
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1792
1792
|
return luvio.dispatchResourceRequest(request, options)
|
|
1793
1793
|
.then((response) => {
|
|
1794
1794
|
return luvio.handleSuccessResponse(() => {
|
|
1795
|
-
const snapshot = ingestSuccess$
|
|
1795
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1796
1796
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1797
1797
|
}, () => {
|
|
1798
1798
|
const cache = new StoreKeyMap();
|
|
1799
|
-
getResponseCacheKeys$
|
|
1799
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1800
1800
|
return cache;
|
|
1801
1801
|
});
|
|
1802
1802
|
}, (response) => {
|
|
@@ -1806,12 +1806,12 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
const getMetricFilterValuesAdapterFactory = (luvio) => {
|
|
1808
1808
|
return function getMetricFilterValues(untrustedConfig) {
|
|
1809
|
-
const config = validateAdapterConfig$
|
|
1809
|
+
const config = validateAdapterConfig$3(untrustedConfig, getMetricFilterValues_ConfigPropertyNames);
|
|
1810
1810
|
// Invalid or incomplete config
|
|
1811
1811
|
if (config === null) {
|
|
1812
1812
|
throw new Error('Invalid config for "getMetricFilterValues"');
|
|
1813
1813
|
}
|
|
1814
|
-
return buildNetworkSnapshot$
|
|
1814
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1815
1815
|
};
|
|
1816
1816
|
};
|
|
1817
1817
|
|
|
@@ -1841,7 +1841,7 @@ function validate$8(obj, path = 'InsightFeedbackMetadata') {
|
|
|
1841
1841
|
})();
|
|
1842
1842
|
return v_error === undefined ? null : v_error;
|
|
1843
1843
|
}
|
|
1844
|
-
const select$
|
|
1844
|
+
const select$b = function InsightFeedbackMetadataSelect() {
|
|
1845
1845
|
return {
|
|
1846
1846
|
kind: 'Fragment',
|
|
1847
1847
|
version: VERSION$8,
|
|
@@ -1984,8 +1984,8 @@ function validate$7(obj, path = 'Insight') {
|
|
|
1984
1984
|
})();
|
|
1985
1985
|
return v_error === undefined ? null : v_error;
|
|
1986
1986
|
}
|
|
1987
|
-
const select$
|
|
1988
|
-
const { selections: InsightFeedbackMetadata__selections, opaque: InsightFeedbackMetadata__opaque, } = select$
|
|
1987
|
+
const select$a = function InsightSelect() {
|
|
1988
|
+
const { selections: InsightFeedbackMetadata__selections, opaque: InsightFeedbackMetadata__opaque, } = select$b();
|
|
1989
1989
|
return {
|
|
1990
1990
|
kind: 'Fragment',
|
|
1991
1991
|
version: VERSION$7,
|
|
@@ -2204,9 +2204,9 @@ function validate$6(obj, path = 'InsightResponse') {
|
|
|
2204
2204
|
})();
|
|
2205
2205
|
return v_error === undefined ? null : v_error;
|
|
2206
2206
|
}
|
|
2207
|
-
const select$
|
|
2208
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2209
|
-
const { selections: Insight__selections, opaque: Insight__opaque, } = select$
|
|
2207
|
+
const select$9 = function InsightResponseSelect() {
|
|
2208
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
2209
|
+
const { selections: Insight__selections, opaque: Insight__opaque, } = select$a();
|
|
2210
2210
|
return {
|
|
2211
2211
|
kind: 'Fragment',
|
|
2212
2212
|
version: VERSION$6,
|
|
@@ -2282,7 +2282,7 @@ function validate$5(obj, path = 'Overview') {
|
|
|
2282
2282
|
})();
|
|
2283
2283
|
return v_error === undefined ? null : v_error;
|
|
2284
2284
|
}
|
|
2285
|
-
const select$
|
|
2285
|
+
const select$8 = function OverviewSelect() {
|
|
2286
2286
|
return {
|
|
2287
2287
|
kind: 'Fragment',
|
|
2288
2288
|
version: VERSION$5,
|
|
@@ -2340,9 +2340,9 @@ function validate$4(obj, path = 'OverviewResponse') {
|
|
|
2340
2340
|
})();
|
|
2341
2341
|
return v_error === undefined ? null : v_error;
|
|
2342
2342
|
}
|
|
2343
|
-
const select$
|
|
2344
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2345
|
-
const { selections: Overview__selections, opaque: Overview__opaque, } = select$
|
|
2343
|
+
const select$7 = function OverviewResponseSelect() {
|
|
2344
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
2345
|
+
const { selections: Overview__selections, opaque: Overview__opaque, } = select$8();
|
|
2346
2346
|
return {
|
|
2347
2347
|
kind: 'Fragment',
|
|
2348
2348
|
version: VERSION$4,
|
|
@@ -2444,10 +2444,10 @@ function validate$3(obj, path = 'InsightGroup') {
|
|
|
2444
2444
|
})();
|
|
2445
2445
|
return v_error === undefined ? null : v_error;
|
|
2446
2446
|
}
|
|
2447
|
-
const select$
|
|
2448
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2449
|
-
const { selections: InsightResponse__selections, opaque: InsightResponse__opaque, } = select$
|
|
2450
|
-
const { selections: OverviewResponse__selections, opaque: OverviewResponse__opaque, } = select$
|
|
2447
|
+
const select$6 = function InsightGroupSelect() {
|
|
2448
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
2449
|
+
const { selections: InsightResponse__selections, opaque: InsightResponse__opaque, } = select$9();
|
|
2450
|
+
const { selections: OverviewResponse__selections, opaque: OverviewResponse__opaque, } = select$7();
|
|
2451
2451
|
return {
|
|
2452
2452
|
kind: 'Fragment',
|
|
2453
2453
|
version: VERSION$3,
|
|
@@ -2587,8 +2587,8 @@ function validate$2(obj, path = 'InsightBundle') {
|
|
|
2587
2587
|
})();
|
|
2588
2588
|
return v_error === undefined ? null : v_error;
|
|
2589
2589
|
}
|
|
2590
|
-
const select$
|
|
2591
|
-
const { selections: InsightGroup__selections, opaque: InsightGroup__opaque, } = select$
|
|
2590
|
+
const select$5 = function InsightBundleSelect() {
|
|
2591
|
+
const { selections: InsightGroup__selections, opaque: InsightGroup__opaque, } = select$6();
|
|
2592
2592
|
return {
|
|
2593
2593
|
kind: 'Fragment',
|
|
2594
2594
|
version: VERSION$2,
|
|
@@ -2714,9 +2714,9 @@ function keyBuilderFromType$1(luvio, object) {
|
|
|
2714
2714
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
2715
2715
|
return input;
|
|
2716
2716
|
}
|
|
2717
|
-
const select$
|
|
2718
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2719
|
-
const { selections: InsightBundle__selections, opaque: InsightBundle__opaque, } = select$
|
|
2717
|
+
const select$4 = function GenerateInsightBundleResponseSelect() {
|
|
2718
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
2719
|
+
const { selections: InsightBundle__selections, opaque: InsightBundle__opaque, } = select$5();
|
|
2720
2720
|
return {
|
|
2721
2721
|
kind: 'Fragment',
|
|
2722
2722
|
version: VERSION$1,
|
|
@@ -2806,8 +2806,111 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2806
2806
|
});
|
|
2807
2807
|
}
|
|
2808
2808
|
|
|
2809
|
+
function select$3(luvio, params) {
|
|
2810
|
+
return select$4();
|
|
2811
|
+
}
|
|
2812
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
2813
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
2814
|
+
}
|
|
2815
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
2816
|
+
const { body } = response;
|
|
2817
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
2818
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
2819
|
+
const snapshot = luvio.storeLookup({
|
|
2820
|
+
recordId: key,
|
|
2821
|
+
node: select$3(),
|
|
2822
|
+
variables: {},
|
|
2823
|
+
});
|
|
2824
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2825
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2826
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
deepFreeze(snapshot.data);
|
|
2830
|
+
return snapshot;
|
|
2831
|
+
}
|
|
2832
|
+
function createResourceRequest$2(config) {
|
|
2833
|
+
const headers = {};
|
|
2834
|
+
return {
|
|
2835
|
+
baseUri: 'api.salesforce.com',
|
|
2836
|
+
basePath: '/analytics/insights/v1/generateBundle',
|
|
2837
|
+
method: 'post',
|
|
2838
|
+
body: config.body,
|
|
2839
|
+
urlParams: {},
|
|
2840
|
+
queryParams: {},
|
|
2841
|
+
headers,
|
|
2842
|
+
priority: 'normal',
|
|
2843
|
+
};
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
const adapterName$2 = 'generateInsights';
|
|
2847
|
+
const generateInsights_ConfigPropertyMetadata = [
|
|
2848
|
+
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
2849
|
+
generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
|
|
2850
|
+
generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2851
|
+
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2852
|
+
];
|
|
2853
|
+
const generateInsights_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateInsights_ConfigPropertyMetadata);
|
|
2854
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateInsights_ConfigPropertyMetadata);
|
|
2855
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
2856
|
+
const config = {};
|
|
2857
|
+
typeCheckConfig$5(untrustedConfig, config, generateInsights_ConfigPropertyMetadata);
|
|
2858
|
+
const untrustedConfig_input = untrustedConfig.input;
|
|
2859
|
+
const referenceInsightBundleInputValidationError = validate$k(untrustedConfig_input);
|
|
2860
|
+
if (referenceInsightBundleInputValidationError === null) {
|
|
2861
|
+
config.input = untrustedConfig_input;
|
|
2862
|
+
}
|
|
2863
|
+
const untrustedConfig_options = untrustedConfig.options;
|
|
2864
|
+
const referenceInsightBundleOptionsValidationError = validate$h(untrustedConfig_options);
|
|
2865
|
+
if (referenceInsightBundleOptionsValidationError === null) {
|
|
2866
|
+
config.options = untrustedConfig_options;
|
|
2867
|
+
}
|
|
2868
|
+
return config;
|
|
2869
|
+
}
|
|
2870
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
2871
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2872
|
+
return null;
|
|
2873
|
+
}
|
|
2874
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2875
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2876
|
+
}
|
|
2877
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
2878
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2879
|
+
return null;
|
|
2880
|
+
}
|
|
2881
|
+
return config;
|
|
2882
|
+
}
|
|
2883
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
2884
|
+
const resourceParams = createResourceParams$2(config);
|
|
2885
|
+
const request = createResourceRequest$2(resourceParams);
|
|
2886
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2887
|
+
.then((response) => {
|
|
2888
|
+
return luvio.handleSuccessResponse(() => {
|
|
2889
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
2890
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2891
|
+
}, () => {
|
|
2892
|
+
const cache = new StoreKeyMap();
|
|
2893
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
2894
|
+
return cache;
|
|
2895
|
+
});
|
|
2896
|
+
}, (response) => {
|
|
2897
|
+
deepFreeze(response);
|
|
2898
|
+
throw response;
|
|
2899
|
+
});
|
|
2900
|
+
}
|
|
2901
|
+
const generateInsightsAdapterFactory = (luvio) => {
|
|
2902
|
+
return function generateInsights(untrustedConfig) {
|
|
2903
|
+
const config = validateAdapterConfig$2(untrustedConfig, generateInsights_ConfigPropertyNames);
|
|
2904
|
+
// Invalid or incomplete config
|
|
2905
|
+
if (config === null) {
|
|
2906
|
+
throw new Error('Invalid config for "generateInsights"');
|
|
2907
|
+
}
|
|
2908
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
2909
|
+
};
|
|
2910
|
+
};
|
|
2911
|
+
|
|
2809
2912
|
function select$2(luvio, params) {
|
|
2810
|
-
return select$
|
|
2913
|
+
return select$4();
|
|
2811
2914
|
}
|
|
2812
2915
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
2813
2916
|
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
@@ -2833,7 +2936,7 @@ function createResourceRequest$1(config) {
|
|
|
2833
2936
|
const headers = {};
|
|
2834
2937
|
return {
|
|
2835
2938
|
baseUri: 'api.salesforce.com',
|
|
2836
|
-
basePath: '/analytics/insights/v1/generateBundle',
|
|
2939
|
+
basePath: '/analytics/insights/v1/basic/generateBundle',
|
|
2837
2940
|
method: 'post',
|
|
2838
2941
|
body: config.body,
|
|
2839
2942
|
urlParams: {},
|
|
@@ -2843,18 +2946,18 @@ function createResourceRequest$1(config) {
|
|
|
2843
2946
|
};
|
|
2844
2947
|
}
|
|
2845
2948
|
|
|
2846
|
-
const adapterName$1 = '
|
|
2847
|
-
const
|
|
2949
|
+
const adapterName$1 = 'generateInsightsBasic';
|
|
2950
|
+
const generateInsightsBasic_ConfigPropertyMetadata = [
|
|
2848
2951
|
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
2849
2952
|
generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
|
|
2850
2953
|
generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2851
2954
|
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2852
2955
|
];
|
|
2853
|
-
const
|
|
2854
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
2956
|
+
const generateInsightsBasic_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, generateInsightsBasic_ConfigPropertyMetadata);
|
|
2957
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(generateInsightsBasic_ConfigPropertyMetadata);
|
|
2855
2958
|
function typeCheckConfig$1(untrustedConfig) {
|
|
2856
2959
|
const config = {};
|
|
2857
|
-
typeCheckConfig$
|
|
2960
|
+
typeCheckConfig$5(untrustedConfig, config, generateInsightsBasic_ConfigPropertyMetadata);
|
|
2858
2961
|
const untrustedConfig_input = untrustedConfig.input;
|
|
2859
2962
|
const referenceInsightBundleInputValidationError = validate$k(untrustedConfig_input);
|
|
2860
2963
|
if (referenceInsightBundleInputValidationError === null) {
|
|
@@ -2898,12 +3001,12 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
2898
3001
|
throw response;
|
|
2899
3002
|
});
|
|
2900
3003
|
}
|
|
2901
|
-
const
|
|
2902
|
-
return function
|
|
2903
|
-
const config = validateAdapterConfig$1(untrustedConfig,
|
|
3004
|
+
const generateInsightsBasicAdapterFactory = (luvio) => {
|
|
3005
|
+
return function generateInsightsBasic(untrustedConfig) {
|
|
3006
|
+
const config = validateAdapterConfig$1(untrustedConfig, generateInsightsBasic_ConfigPropertyNames);
|
|
2904
3007
|
// Invalid or incomplete config
|
|
2905
3008
|
if (config === null) {
|
|
2906
|
-
throw new Error('Invalid config for "
|
|
3009
|
+
throw new Error('Invalid config for "generateInsightsBasic"');
|
|
2907
3010
|
}
|
|
2908
3011
|
return buildNetworkSnapshot$1(luvio, config);
|
|
2909
3012
|
};
|
|
@@ -2993,7 +3096,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
2993
3096
|
return input;
|
|
2994
3097
|
}
|
|
2995
3098
|
const select$1 = function GetInsightBatchResponseSelect() {
|
|
2996
|
-
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$
|
|
3099
|
+
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$h();
|
|
2997
3100
|
return {
|
|
2998
3101
|
kind: 'Fragment',
|
|
2999
3102
|
version: VERSION,
|
|
@@ -3008,7 +3111,7 @@ const select$1 = function GetInsightBatchResponseSelect() {
|
|
|
3008
3111
|
kind: 'Link',
|
|
3009
3112
|
plural: true,
|
|
3010
3113
|
required: false,
|
|
3011
|
-
fragment: select$
|
|
3114
|
+
fragment: select$4()
|
|
3012
3115
|
},
|
|
3013
3116
|
{
|
|
3014
3117
|
name: 'hasErrors',
|
|
@@ -3175,14 +3278,14 @@ const getInsightsBatch_ConfigPropertyMetadata = [
|
|
|
3175
3278
|
generateParamConfigMetadata('batchId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3176
3279
|
];
|
|
3177
3280
|
const getInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getInsightsBatch_ConfigPropertyMetadata);
|
|
3178
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3281
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(getInsightsBatch_ConfigPropertyMetadata);
|
|
3179
3282
|
function keyBuilder(luvio, config) {
|
|
3180
3283
|
const resourceParams = createResourceParams(config);
|
|
3181
3284
|
return keyBuilder$1(luvio, resourceParams);
|
|
3182
3285
|
}
|
|
3183
3286
|
function typeCheckConfig(untrustedConfig) {
|
|
3184
3287
|
const config = {};
|
|
3185
|
-
typeCheckConfig$
|
|
3288
|
+
typeCheckConfig$5(untrustedConfig, config, getInsightsBatch_ConfigPropertyMetadata);
|
|
3186
3289
|
return config;
|
|
3187
3290
|
}
|
|
3188
3291
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -3256,4 +3359,4 @@ const getInsightsBatchAdapterFactory = (luvio) => function analyticsInsights__ge
|
|
|
3256
3359
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
3257
3360
|
};
|
|
3258
3361
|
|
|
3259
|
-
export { createInsightsBatchAdapterFactory, generateInsightsAdapterFactory, getInsightsBatchAdapterFactory, getMetricFilterValuesAdapterFactory };
|
|
3362
|
+
export { createInsightsBatchAdapterFactory, generateInsightsAdapterFactory, generateInsightsBasicAdapterFactory, getInsightsBatchAdapterFactory, getMetricFilterValuesAdapterFactory };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { InsightBundleInput as types_InsightBundleInput_InsightBundleInput } from '../types/InsightBundleInput';
|
|
4
|
+
import { InsightBundleOptions as types_InsightBundleOptions_InsightBundleOptions } from '../types/InsightBundleOptions';
|
|
5
|
+
import { ResourceRequestConfig as resources_postAnalyticsInsightsV1BasicGenerateBundle_ResourceRequestConfig } from '../resources/postAnalyticsInsightsV1BasicGenerateBundle';
|
|
6
|
+
import { GenerateInsightBundleResponse as types_GenerateInsightBundleResponse_GenerateInsightBundleResponse } from '../types/GenerateInsightBundleResponse';
|
|
7
|
+
export declare const adapterName = "generateInsightsBasic";
|
|
8
|
+
export declare const generateInsightsBasic_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
9
|
+
export declare const generateInsightsBasic_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
10
|
+
export interface GenerateInsightsBasicConfig {
|
|
11
|
+
type?: string;
|
|
12
|
+
version?: number;
|
|
13
|
+
input?: types_InsightBundleInput_InsightBundleInput;
|
|
14
|
+
options?: types_InsightBundleOptions_InsightBundleOptions;
|
|
15
|
+
}
|
|
16
|
+
export declare const createResourceParams: (config: GenerateInsightsBasicConfig) => resources_postAnalyticsInsightsV1BasicGenerateBundle_ResourceRequestConfig;
|
|
17
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GenerateInsightsBasicConfig>): adapter$45$utils_Untrusted<GenerateInsightsBasicConfig>;
|
|
18
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GenerateInsightsBasicConfig | null;
|
|
19
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GenerateInsightsBasicConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse, {}> | import("@luvio/engine").StaleSnapshot<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse, {}> | import("@luvio/engine").PendingSnapshot<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse, any>>;
|
|
20
|
+
export declare const generateInsightsBasicAdapterFactory: $64$luvio_engine_AdapterFactory<GenerateInsightsBasicConfig, types_GenerateInsightBundleResponse_GenerateInsightBundleResponse>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { createInsightsBatchAdapterFactory } from '../adapters/createInsightsBatch';
|
|
2
2
|
export { getMetricFilterValuesAdapterFactory } from '../adapters/getMetricFilterValues';
|
|
3
3
|
export { generateInsightsAdapterFactory } from '../adapters/generateInsights';
|
|
4
|
+
export { generateInsightsBasicAdapterFactory } from '../adapters/generateInsightsBasic';
|
|
4
5
|
export { getInsightsBatchAdapterFactory } from '../adapters/getInsightsBatch';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
declare let createInsightsBatch: any;
|
|
2
2
|
declare let generateInsights: any;
|
|
3
|
+
declare let generateInsightsBasic: any;
|
|
3
4
|
declare let getInsightsBatch: any;
|
|
4
5
|
declare let getInsightsBatchNotifyChange: any;
|
|
5
6
|
declare let getMetricFilterValues: any;
|
|
6
7
|
declare let getInsightsBatch_imperative: any;
|
|
7
|
-
export { createInsightsBatch, generateInsights, getInsightsBatch, getInsightsBatchNotifyChange, getMetricFilterValues, getInsightsBatch_imperative, };
|
|
8
|
+
export { createInsightsBatch, generateInsights, generateInsightsBasic, getInsightsBatch, getInsightsBatchNotifyChange, getMetricFilterValues, getInsightsBatch_imperative, };
|
package/dist/es/es2018/types/src/generated/resources/postAnalyticsInsightsV1BasicGenerateBundle.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InsightBundleInput as types_InsightBundleInput_InsightBundleInput } from '../types/InsightBundleInput';
|
|
2
|
+
import { InsightBundleOptions as types_InsightBundleOptions_InsightBundleOptions } from '../types/InsightBundleOptions';
|
|
3
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
4
|
+
import { GenerateInsightBundleResponse as types_GenerateInsightBundleResponse_GenerateInsightBundleResponse } from '../types/GenerateInsightBundleResponse';
|
|
5
|
+
export interface ResourceRequestConfig {
|
|
6
|
+
body: {
|
|
7
|
+
type?: string;
|
|
8
|
+
version?: number;
|
|
9
|
+
input?: types_InsightBundleInput_InsightBundleInput;
|
|
10
|
+
options?: types_InsightBundleOptions_InsightBundleOptions;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
14
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_GenerateInsightBundleResponse_GenerateInsightBundleResponse): void;
|
|
15
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse>): $64$luvio_engine_FulfilledSnapshot<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse, {}> | $64$luvio_engine_StaleSnapshot<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse, {}> | $64$luvio_engine_PendingSnapshot<types_GenerateInsightBundleResponse_GenerateInsightBundleResponse, any>;
|
|
16
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
17
|
+
export default createResourceRequest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-sfap-analytics-insights",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.321.0",
|
|
4
4
|
"description": "APIs for generating insights about metrics",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/sfap-analytics-insights.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"test:unit": "jest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
43
|
+
"@salesforce/lds-bindings": "^1.321.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.321.0"
|
|
47
47
|
},
|
|
48
48
|
"nx": {
|
|
49
49
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -1007,7 +1007,7 @@ function validate$e(obj, path = 'Error') {
|
|
|
1007
1007
|
})();
|
|
1008
1008
|
return v_error === undefined ? null : v_error;
|
|
1009
1009
|
}
|
|
1010
|
-
const select$
|
|
1010
|
+
const select$j = function ErrorSelect() {
|
|
1011
1011
|
return {
|
|
1012
1012
|
kind: 'Fragment',
|
|
1013
1013
|
version: VERSION$e,
|
|
@@ -1085,7 +1085,7 @@ function validate$d(obj, path = 'Summary') {
|
|
|
1085
1085
|
})();
|
|
1086
1086
|
return v_error === undefined ? null : v_error;
|
|
1087
1087
|
}
|
|
1088
|
-
const select$
|
|
1088
|
+
const select$i = function SummarySelect() {
|
|
1089
1089
|
return {
|
|
1090
1090
|
kind: 'Fragment',
|
|
1091
1091
|
version: VERSION$d,
|
|
@@ -1161,9 +1161,9 @@ function validate$c(obj, path = 'SummaryResponse') {
|
|
|
1161
1161
|
})();
|
|
1162
1162
|
return v_error === undefined ? null : v_error;
|
|
1163
1163
|
}
|
|
1164
|
-
const select$
|
|
1165
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
1166
|
-
const { selections: Summary__selections, opaque: Summary__opaque, } = select$
|
|
1164
|
+
const select$h = function SummaryResponseSelect() {
|
|
1165
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
1166
|
+
const { selections: Summary__selections, opaque: Summary__opaque, } = select$i();
|
|
1167
1167
|
return {
|
|
1168
1168
|
kind: 'Fragment',
|
|
1169
1169
|
version: VERSION$c,
|
|
@@ -1256,8 +1256,8 @@ function keyBuilderFromType$3(luvio, object) {
|
|
|
1256
1256
|
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1257
1257
|
return input;
|
|
1258
1258
|
}
|
|
1259
|
-
const select$
|
|
1260
|
-
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$
|
|
1259
|
+
const select$g = function GenerateInsightBatchResponseSelect() {
|
|
1260
|
+
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$h();
|
|
1261
1261
|
return {
|
|
1262
1262
|
kind: 'Fragment',
|
|
1263
1263
|
version: VERSION$b,
|
|
@@ -1355,19 +1355,19 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1355
1355
|
});
|
|
1356
1356
|
}
|
|
1357
1357
|
|
|
1358
|
-
function select$
|
|
1359
|
-
return select$
|
|
1358
|
+
function select$f(luvio, params) {
|
|
1359
|
+
return select$g();
|
|
1360
1360
|
}
|
|
1361
|
-
function getResponseCacheKeys$
|
|
1361
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1362
1362
|
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
1363
1363
|
}
|
|
1364
|
-
function ingestSuccess$
|
|
1364
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
1365
1365
|
const { body } = response;
|
|
1366
1366
|
const key = keyBuilderFromType$3(luvio, body);
|
|
1367
1367
|
luvio.storeIngest(key, ingest$3, body);
|
|
1368
1368
|
const snapshot = luvio.storeLookup({
|
|
1369
1369
|
recordId: key,
|
|
1370
|
-
node: select$
|
|
1370
|
+
node: select$f(),
|
|
1371
1371
|
variables: {},
|
|
1372
1372
|
});
|
|
1373
1373
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1378,7 +1378,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
1378
1378
|
deepFreeze(snapshot.data);
|
|
1379
1379
|
return snapshot;
|
|
1380
1380
|
}
|
|
1381
|
-
function createResourceRequest$
|
|
1381
|
+
function createResourceRequest$4(config) {
|
|
1382
1382
|
const headers = {};
|
|
1383
1383
|
return {
|
|
1384
1384
|
baseUri: 'api.salesforce.com',
|
|
@@ -1392,14 +1392,14 @@ function createResourceRequest$3(config) {
|
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
1394
|
|
|
1395
|
-
const adapterName$
|
|
1395
|
+
const adapterName$4 = 'createInsightsBatch';
|
|
1396
1396
|
const createInsightsBatch_ConfigPropertyMetadata = [
|
|
1397
1397
|
generateParamConfigMetadata('batchInput', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1398
1398
|
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1399
1399
|
];
|
|
1400
|
-
const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1401
|
-
const createResourceParams$
|
|
1402
|
-
function typeCheckConfig$
|
|
1400
|
+
const createInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createInsightsBatch_ConfigPropertyMetadata);
|
|
1401
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createInsightsBatch_ConfigPropertyMetadata);
|
|
1402
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1403
1403
|
const config = {};
|
|
1404
1404
|
const untrustedConfig_batchInput = untrustedConfig.batchInput;
|
|
1405
1405
|
if (ArrayIsArray$1(untrustedConfig_batchInput)) {
|
|
@@ -1420,30 +1420,30 @@ function typeCheckConfig$3(untrustedConfig) {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
return config;
|
|
1422
1422
|
}
|
|
1423
|
-
function validateAdapterConfig$
|
|
1423
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1424
1424
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1425
1425
|
return null;
|
|
1426
1426
|
}
|
|
1427
1427
|
if (process.env.NODE_ENV !== 'production') {
|
|
1428
1428
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1429
1429
|
}
|
|
1430
|
-
const config = typeCheckConfig$
|
|
1430
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1431
1431
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1432
1432
|
return null;
|
|
1433
1433
|
}
|
|
1434
1434
|
return config;
|
|
1435
1435
|
}
|
|
1436
|
-
function buildNetworkSnapshot$
|
|
1437
|
-
const resourceParams = createResourceParams$
|
|
1438
|
-
const request = createResourceRequest$
|
|
1436
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1437
|
+
const resourceParams = createResourceParams$4(config);
|
|
1438
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1439
1439
|
return luvio.dispatchResourceRequest(request, options)
|
|
1440
1440
|
.then((response) => {
|
|
1441
1441
|
return luvio.handleSuccessResponse(() => {
|
|
1442
|
-
const snapshot = ingestSuccess$
|
|
1442
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
1443
1443
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1444
1444
|
}, () => {
|
|
1445
1445
|
const cache = new StoreKeyMap();
|
|
1446
|
-
getResponseCacheKeys$
|
|
1446
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1447
1447
|
return cache;
|
|
1448
1448
|
});
|
|
1449
1449
|
}, (response) => {
|
|
@@ -1453,12 +1453,12 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
const createInsightsBatchAdapterFactory = (luvio) => {
|
|
1455
1455
|
return function createInsightsBatch(untrustedConfig) {
|
|
1456
|
-
const config = validateAdapterConfig$
|
|
1456
|
+
const config = validateAdapterConfig$4(untrustedConfig, createInsightsBatch_ConfigPropertyNames);
|
|
1457
1457
|
// Invalid or incomplete config
|
|
1458
1458
|
if (config === null) {
|
|
1459
1459
|
throw new Error('Invalid config for "createInsightsBatch"');
|
|
1460
1460
|
}
|
|
1461
|
-
return buildNetworkSnapshot$
|
|
1461
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
1462
1462
|
};
|
|
1463
1463
|
};
|
|
1464
1464
|
|
|
@@ -1488,7 +1488,7 @@ function validate$a(obj, path = 'InsightFeedbackMetadata') {
|
|
|
1488
1488
|
})();
|
|
1489
1489
|
return v_error === undefined ? null : v_error;
|
|
1490
1490
|
}
|
|
1491
|
-
const select$
|
|
1491
|
+
const select$e = function InsightFeedbackMetadataSelect() {
|
|
1492
1492
|
return {
|
|
1493
1493
|
kind: 'Fragment',
|
|
1494
1494
|
version: VERSION$a,
|
|
@@ -1631,8 +1631,8 @@ function validate$9(obj, path = 'Insight') {
|
|
|
1631
1631
|
})();
|
|
1632
1632
|
return v_error === undefined ? null : v_error;
|
|
1633
1633
|
}
|
|
1634
|
-
const select$
|
|
1635
|
-
const { selections: InsightFeedbackMetadata__selections, opaque: InsightFeedbackMetadata__opaque, } = select$
|
|
1634
|
+
const select$d = function InsightSelect() {
|
|
1635
|
+
const { selections: InsightFeedbackMetadata__selections, opaque: InsightFeedbackMetadata__opaque, } = select$e();
|
|
1636
1636
|
return {
|
|
1637
1637
|
kind: 'Fragment',
|
|
1638
1638
|
version: VERSION$9,
|
|
@@ -1851,9 +1851,9 @@ function validate$8(obj, path = 'InsightResponse') {
|
|
|
1851
1851
|
})();
|
|
1852
1852
|
return v_error === undefined ? null : v_error;
|
|
1853
1853
|
}
|
|
1854
|
-
const select$
|
|
1855
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
1856
|
-
const { selections: Insight__selections, opaque: Insight__opaque, } = select$
|
|
1854
|
+
const select$c = function InsightResponseSelect() {
|
|
1855
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
1856
|
+
const { selections: Insight__selections, opaque: Insight__opaque, } = select$d();
|
|
1857
1857
|
return {
|
|
1858
1858
|
kind: 'Fragment',
|
|
1859
1859
|
version: VERSION$8,
|
|
@@ -1929,7 +1929,7 @@ function validate$7(obj, path = 'Overview') {
|
|
|
1929
1929
|
})();
|
|
1930
1930
|
return v_error === undefined ? null : v_error;
|
|
1931
1931
|
}
|
|
1932
|
-
const select$
|
|
1932
|
+
const select$b = function OverviewSelect() {
|
|
1933
1933
|
return {
|
|
1934
1934
|
kind: 'Fragment',
|
|
1935
1935
|
version: VERSION$7,
|
|
@@ -1987,9 +1987,9 @@ function validate$6(obj, path = 'OverviewResponse') {
|
|
|
1987
1987
|
})();
|
|
1988
1988
|
return v_error === undefined ? null : v_error;
|
|
1989
1989
|
}
|
|
1990
|
-
const select$
|
|
1991
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
1992
|
-
const { selections: Overview__selections, opaque: Overview__opaque, } = select$
|
|
1990
|
+
const select$a = function OverviewResponseSelect() {
|
|
1991
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
1992
|
+
const { selections: Overview__selections, opaque: Overview__opaque, } = select$b();
|
|
1993
1993
|
return {
|
|
1994
1994
|
kind: 'Fragment',
|
|
1995
1995
|
version: VERSION$6,
|
|
@@ -2091,10 +2091,10 @@ function validate$5(obj, path = 'InsightGroup') {
|
|
|
2091
2091
|
})();
|
|
2092
2092
|
return v_error === undefined ? null : v_error;
|
|
2093
2093
|
}
|
|
2094
|
-
const select$
|
|
2095
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2096
|
-
const { selections: InsightResponse__selections, opaque: InsightResponse__opaque, } = select$
|
|
2097
|
-
const { selections: OverviewResponse__selections, opaque: OverviewResponse__opaque, } = select$
|
|
2094
|
+
const select$9 = function InsightGroupSelect() {
|
|
2095
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
2096
|
+
const { selections: InsightResponse__selections, opaque: InsightResponse__opaque, } = select$c();
|
|
2097
|
+
const { selections: OverviewResponse__selections, opaque: OverviewResponse__opaque, } = select$a();
|
|
2098
2098
|
return {
|
|
2099
2099
|
kind: 'Fragment',
|
|
2100
2100
|
version: VERSION$5,
|
|
@@ -2234,8 +2234,8 @@ function validate$4(obj, path = 'InsightBundle') {
|
|
|
2234
2234
|
})();
|
|
2235
2235
|
return v_error === undefined ? null : v_error;
|
|
2236
2236
|
}
|
|
2237
|
-
const select$
|
|
2238
|
-
const { selections: InsightGroup__selections, opaque: InsightGroup__opaque, } = select$
|
|
2237
|
+
const select$8 = function InsightBundleSelect() {
|
|
2238
|
+
const { selections: InsightGroup__selections, opaque: InsightGroup__opaque, } = select$9();
|
|
2239
2239
|
return {
|
|
2240
2240
|
kind: 'Fragment',
|
|
2241
2241
|
version: VERSION$4,
|
|
@@ -2361,9 +2361,9 @@ function keyBuilderFromType$2(luvio, object) {
|
|
|
2361
2361
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2362
2362
|
return input;
|
|
2363
2363
|
}
|
|
2364
|
-
const select$
|
|
2365
|
-
const { selections: Error__selections, opaque: Error__opaque, } = select$
|
|
2366
|
-
const { selections: InsightBundle__selections, opaque: InsightBundle__opaque, } = select$
|
|
2364
|
+
const select$7 = function GenerateInsightBundleResponseSelect() {
|
|
2365
|
+
const { selections: Error__selections, opaque: Error__opaque, } = select$j();
|
|
2366
|
+
const { selections: InsightBundle__selections, opaque: InsightBundle__opaque, } = select$8();
|
|
2367
2367
|
return {
|
|
2368
2368
|
kind: 'Fragment',
|
|
2369
2369
|
version: VERSION$3,
|
|
@@ -2453,8 +2453,111 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2453
2453
|
});
|
|
2454
2454
|
}
|
|
2455
2455
|
|
|
2456
|
+
function select$6(luvio, params) {
|
|
2457
|
+
return select$7();
|
|
2458
|
+
}
|
|
2459
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2460
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
2461
|
+
}
|
|
2462
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
2463
|
+
const { body } = response;
|
|
2464
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
2465
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
2466
|
+
const snapshot = luvio.storeLookup({
|
|
2467
|
+
recordId: key,
|
|
2468
|
+
node: select$6(),
|
|
2469
|
+
variables: {},
|
|
2470
|
+
});
|
|
2471
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2472
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2473
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
deepFreeze(snapshot.data);
|
|
2477
|
+
return snapshot;
|
|
2478
|
+
}
|
|
2479
|
+
function createResourceRequest$3(config) {
|
|
2480
|
+
const headers = {};
|
|
2481
|
+
return {
|
|
2482
|
+
baseUri: 'api.salesforce.com',
|
|
2483
|
+
basePath: '/analytics/insights/v1/generateBundle',
|
|
2484
|
+
method: 'post',
|
|
2485
|
+
body: config.body,
|
|
2486
|
+
urlParams: {},
|
|
2487
|
+
queryParams: {},
|
|
2488
|
+
headers,
|
|
2489
|
+
priority: 'normal',
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
const adapterName$3 = 'generateInsights';
|
|
2494
|
+
const generateInsights_ConfigPropertyMetadata = [
|
|
2495
|
+
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
2496
|
+
generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
|
|
2497
|
+
generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2498
|
+
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2499
|
+
];
|
|
2500
|
+
const generateInsights_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, generateInsights_ConfigPropertyMetadata);
|
|
2501
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(generateInsights_ConfigPropertyMetadata);
|
|
2502
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
2503
|
+
const config = {};
|
|
2504
|
+
typeCheckConfig$5(untrustedConfig, config, generateInsights_ConfigPropertyMetadata);
|
|
2505
|
+
const untrustedConfig_input = untrustedConfig.input;
|
|
2506
|
+
const referenceInsightBundleInputValidationError = validate$k(untrustedConfig_input);
|
|
2507
|
+
if (referenceInsightBundleInputValidationError === null) {
|
|
2508
|
+
config.input = untrustedConfig_input;
|
|
2509
|
+
}
|
|
2510
|
+
const untrustedConfig_options = untrustedConfig.options;
|
|
2511
|
+
const referenceInsightBundleOptionsValidationError = validate$h(untrustedConfig_options);
|
|
2512
|
+
if (referenceInsightBundleOptionsValidationError === null) {
|
|
2513
|
+
config.options = untrustedConfig_options;
|
|
2514
|
+
}
|
|
2515
|
+
return config;
|
|
2516
|
+
}
|
|
2517
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
2518
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2519
|
+
return null;
|
|
2520
|
+
}
|
|
2521
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2522
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2523
|
+
}
|
|
2524
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
2525
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2526
|
+
return null;
|
|
2527
|
+
}
|
|
2528
|
+
return config;
|
|
2529
|
+
}
|
|
2530
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
2531
|
+
const resourceParams = createResourceParams$3(config);
|
|
2532
|
+
const request = createResourceRequest$3(resourceParams);
|
|
2533
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2534
|
+
.then((response) => {
|
|
2535
|
+
return luvio.handleSuccessResponse(() => {
|
|
2536
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
2537
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2538
|
+
}, () => {
|
|
2539
|
+
const cache = new StoreKeyMap();
|
|
2540
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
2541
|
+
return cache;
|
|
2542
|
+
});
|
|
2543
|
+
}, (response) => {
|
|
2544
|
+
deepFreeze(response);
|
|
2545
|
+
throw response;
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
const generateInsightsAdapterFactory = (luvio) => {
|
|
2549
|
+
return function generateInsights(untrustedConfig) {
|
|
2550
|
+
const config = validateAdapterConfig$3(untrustedConfig, generateInsights_ConfigPropertyNames);
|
|
2551
|
+
// Invalid or incomplete config
|
|
2552
|
+
if (config === null) {
|
|
2553
|
+
throw new Error('Invalid config for "generateInsights"');
|
|
2554
|
+
}
|
|
2555
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
2556
|
+
};
|
|
2557
|
+
};
|
|
2558
|
+
|
|
2456
2559
|
function select$5(luvio, params) {
|
|
2457
|
-
return select$
|
|
2560
|
+
return select$7();
|
|
2458
2561
|
}
|
|
2459
2562
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
2460
2563
|
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
@@ -2480,7 +2583,7 @@ function createResourceRequest$2(config) {
|
|
|
2480
2583
|
const headers = {};
|
|
2481
2584
|
return {
|
|
2482
2585
|
baseUri: 'api.salesforce.com',
|
|
2483
|
-
basePath: '/analytics/insights/v1/generateBundle',
|
|
2586
|
+
basePath: '/analytics/insights/v1/basic/generateBundle',
|
|
2484
2587
|
method: 'post',
|
|
2485
2588
|
body: config.body,
|
|
2486
2589
|
urlParams: {},
|
|
@@ -2490,18 +2593,18 @@ function createResourceRequest$2(config) {
|
|
|
2490
2593
|
};
|
|
2491
2594
|
}
|
|
2492
2595
|
|
|
2493
|
-
const adapterName$2 = '
|
|
2494
|
-
const
|
|
2596
|
+
const adapterName$2 = 'generateInsightsBasic';
|
|
2597
|
+
const generateInsightsBasic_ConfigPropertyMetadata = [
|
|
2495
2598
|
generateParamConfigMetadata('type', false, 2 /* Body */, 0 /* String */),
|
|
2496
2599
|
generateParamConfigMetadata('version', false, 2 /* Body */, 3 /* Integer */),
|
|
2497
2600
|
generateParamConfigMetadata('input', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2498
2601
|
generateParamConfigMetadata('options', false, 2 /* Body */, 4 /* Unsupported */),
|
|
2499
2602
|
];
|
|
2500
|
-
const
|
|
2501
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
2603
|
+
const generateInsightsBasic_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateInsightsBasic_ConfigPropertyMetadata);
|
|
2604
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(generateInsightsBasic_ConfigPropertyMetadata);
|
|
2502
2605
|
function typeCheckConfig$2(untrustedConfig) {
|
|
2503
2606
|
const config = {};
|
|
2504
|
-
typeCheckConfig$
|
|
2607
|
+
typeCheckConfig$5(untrustedConfig, config, generateInsightsBasic_ConfigPropertyMetadata);
|
|
2505
2608
|
const untrustedConfig_input = untrustedConfig.input;
|
|
2506
2609
|
const referenceInsightBundleInputValidationError = validate$k(untrustedConfig_input);
|
|
2507
2610
|
if (referenceInsightBundleInputValidationError === null) {
|
|
@@ -2545,12 +2648,12 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
2545
2648
|
throw response;
|
|
2546
2649
|
});
|
|
2547
2650
|
}
|
|
2548
|
-
const
|
|
2549
|
-
return function
|
|
2550
|
-
const config = validateAdapterConfig$2(untrustedConfig,
|
|
2651
|
+
const generateInsightsBasicAdapterFactory = (luvio) => {
|
|
2652
|
+
return function generateInsightsBasic(untrustedConfig) {
|
|
2653
|
+
const config = validateAdapterConfig$2(untrustedConfig, generateInsightsBasic_ConfigPropertyNames);
|
|
2551
2654
|
// Invalid or incomplete config
|
|
2552
2655
|
if (config === null) {
|
|
2553
|
-
throw new Error('Invalid config for "
|
|
2656
|
+
throw new Error('Invalid config for "generateInsightsBasic"');
|
|
2554
2657
|
}
|
|
2555
2658
|
return buildNetworkSnapshot$2(luvio, config);
|
|
2556
2659
|
};
|
|
@@ -2640,7 +2743,7 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
2640
2743
|
return input;
|
|
2641
2744
|
}
|
|
2642
2745
|
const select$4 = function GetInsightBatchResponseSelect() {
|
|
2643
|
-
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$
|
|
2746
|
+
const { selections: SummaryResponse__selections, opaque: SummaryResponse__opaque, } = select$h();
|
|
2644
2747
|
return {
|
|
2645
2748
|
kind: 'Fragment',
|
|
2646
2749
|
version: VERSION$2,
|
|
@@ -2655,7 +2758,7 @@ const select$4 = function GetInsightBatchResponseSelect() {
|
|
|
2655
2758
|
kind: 'Link',
|
|
2656
2759
|
plural: true,
|
|
2657
2760
|
required: false,
|
|
2658
|
-
fragment: select$
|
|
2761
|
+
fragment: select$7()
|
|
2659
2762
|
},
|
|
2660
2763
|
{
|
|
2661
2764
|
name: 'hasErrors',
|
|
@@ -2829,14 +2932,14 @@ const getInsightsBatch_ConfigPropertyMetadata = [
|
|
|
2829
2932
|
generateParamConfigMetadata('batchId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2830
2933
|
];
|
|
2831
2934
|
const getInsightsBatch_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getInsightsBatch_ConfigPropertyMetadata);
|
|
2832
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
2935
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getInsightsBatch_ConfigPropertyMetadata);
|
|
2833
2936
|
function keyBuilder$1(luvio, config) {
|
|
2834
2937
|
const resourceParams = createResourceParams$1(config);
|
|
2835
2938
|
return keyBuilder$2(luvio, resourceParams);
|
|
2836
2939
|
}
|
|
2837
2940
|
function typeCheckConfig$1(untrustedConfig) {
|
|
2838
2941
|
const config = {};
|
|
2839
|
-
typeCheckConfig$
|
|
2942
|
+
typeCheckConfig$5(untrustedConfig, config, getInsightsBatch_ConfigPropertyMetadata);
|
|
2840
2943
|
return config;
|
|
2841
2944
|
}
|
|
2842
2945
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -3227,10 +3330,10 @@ const getMetricFilterValues_ConfigPropertyMetadata = [
|
|
|
3227
3330
|
generateParamConfigMetadata('semanticFilter', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3228
3331
|
];
|
|
3229
3332
|
const getMetricFilterValues_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getMetricFilterValues_ConfigPropertyMetadata);
|
|
3230
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3333
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(getMetricFilterValues_ConfigPropertyMetadata);
|
|
3231
3334
|
function typeCheckConfig(untrustedConfig) {
|
|
3232
3335
|
const config = {};
|
|
3233
|
-
typeCheckConfig$
|
|
3336
|
+
typeCheckConfig$5(untrustedConfig, config, getMetricFilterValues_ConfigPropertyMetadata);
|
|
3234
3337
|
const untrustedConfig_semanticDataModel = untrustedConfig.semanticDataModel;
|
|
3235
3338
|
const referenceSemanticDataModelValidationError = validate$q(untrustedConfig_semanticDataModel);
|
|
3236
3339
|
if (referenceSemanticDataModelValidationError === null) {
|
|
@@ -3304,6 +3407,7 @@ const getMetricFilterValuesAdapterFactory = (luvio) => {
|
|
|
3304
3407
|
|
|
3305
3408
|
let createInsightsBatch;
|
|
3306
3409
|
let generateInsights;
|
|
3410
|
+
let generateInsightsBasic;
|
|
3307
3411
|
let getInsightsBatch;
|
|
3308
3412
|
let getInsightsBatchNotifyChange;
|
|
3309
3413
|
let getMetricFilterValues;
|
|
@@ -3321,6 +3425,7 @@ function bindExportsTo(luvio) {
|
|
|
3321
3425
|
return {
|
|
3322
3426
|
createInsightsBatch: unwrapSnapshotData(createInsightsBatchAdapterFactory),
|
|
3323
3427
|
generateInsights: unwrapSnapshotData(generateInsightsAdapterFactory),
|
|
3428
|
+
generateInsightsBasic: unwrapSnapshotData(generateInsightsBasicAdapterFactory),
|
|
3324
3429
|
getInsightsBatch: createWireAdapterConstructor(luvio, getInsightsBatch_ldsAdapter, getInsightsBatchMetadata),
|
|
3325
3430
|
getInsightsBatchNotifyChange: createLDSAdapter(luvio, 'getInsightsBatchNotifyChange', notifyChangeFactory),
|
|
3326
3431
|
getMetricFilterValues: unwrapSnapshotData(getMetricFilterValuesAdapterFactory),
|
|
@@ -3333,6 +3438,7 @@ withDefaultLuvio((luvio) => {
|
|
|
3333
3438
|
({
|
|
3334
3439
|
createInsightsBatch,
|
|
3335
3440
|
generateInsights,
|
|
3441
|
+
generateInsightsBasic,
|
|
3336
3442
|
getInsightsBatch,
|
|
3337
3443
|
getInsightsBatchNotifyChange,
|
|
3338
3444
|
getMetricFilterValues,
|
|
@@ -3340,5 +3446,5 @@ withDefaultLuvio((luvio) => {
|
|
|
3340
3446
|
} = bindExportsTo(luvio));
|
|
3341
3447
|
});
|
|
3342
3448
|
|
|
3343
|
-
export { createInsightsBatch, generateInsights, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
|
|
3344
|
-
// version: 1.
|
|
3449
|
+
export { createInsightsBatch, generateInsights, generateInsightsBasic, getInsightsBatch, getInsightsBatchNotifyChange, getInsightsBatch_imperative, getMetricFilterValues };
|
|
3450
|
+
// version: 1.321.0-40847d67a8
|
package/src/raml/api.raml
CHANGED
|
@@ -824,6 +824,19 @@ version: v1
|
|
|
824
824
|
/generateBundle:
|
|
825
825
|
post:
|
|
826
826
|
displayName: generateInsightBundle
|
|
827
|
+
(amf-tags):
|
|
828
|
+
- InsightsService
|
|
829
|
+
body:
|
|
830
|
+
application/json: GenerateInsightBundleRequest
|
|
831
|
+
responses:
|
|
832
|
+
'200':
|
|
833
|
+
description: OK
|
|
834
|
+
body:
|
|
835
|
+
application/json: GenerateInsightBundleResponse
|
|
836
|
+
/basic/generateBundle:
|
|
837
|
+
post:
|
|
838
|
+
displayName: InsightsService_GenerateInsightBundleBase
|
|
839
|
+
description: Generate a basic bundle - returns Unusual Change and Period over Period Change Insights
|
|
827
840
|
(amf-tags):
|
|
828
841
|
- InsightsService
|
|
829
842
|
body:
|