@salesforce/lds-adapters-analytics-app-framework 1.354.0-dev2 → 1.354.0-dev4
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/analytics-app-framework.js +116 -51
- package/dist/es/es2018/types/src/raml-artifacts/adapters/getTemplate/buildCachedSnapshotCachePolicy.d.ts +7 -0
- package/dist/es/es2018/types/src/raml-artifacts/adapters/getTemplate/onFetchResponseError.d.ts +4 -0
- package/dist/es/es2018/types/src/raml-artifacts/adapters/getTemplate/onFetchResponseSuccess.d.ts +5 -0
- package/dist/es/es2018/types/src/raml-artifacts/utils/nameToIdCache.d.ts +7 -0
- package/dist/es/es2018/types/src/raml-artifacts/utils/templateNameToIdCache.d.ts +6 -0
- package/package.json +14 -4
- package/sfdc/index.js +117 -52
|
@@ -1243,14 +1243,14 @@ function adapterFragment$b(luvio, config) {
|
|
|
1243
1243
|
createResourceParams$n(config);
|
|
1244
1244
|
return select$I();
|
|
1245
1245
|
}
|
|
1246
|
-
function onFetchResponseSuccess$
|
|
1246
|
+
function onFetchResponseSuccess$c(luvio, config, resourceParams, response) {
|
|
1247
1247
|
const snapshot = ingestSuccess$k(luvio, resourceParams, response, {
|
|
1248
1248
|
config,
|
|
1249
1249
|
resolve: () => buildNetworkSnapshot$n(luvio, config, snapshotRefreshOptions)
|
|
1250
1250
|
});
|
|
1251
1251
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1252
1252
|
}
|
|
1253
|
-
function onFetchResponseError$
|
|
1253
|
+
function onFetchResponseError$c(luvio, config, resourceParams, response) {
|
|
1254
1254
|
const snapshot = ingestError$b(luvio, resourceParams, response, {
|
|
1255
1255
|
config,
|
|
1256
1256
|
resolve: () => buildNetworkSnapshot$n(luvio, config, snapshotRefreshOptions)
|
|
@@ -1262,19 +1262,19 @@ function buildNetworkSnapshot$n(luvio, config, options) {
|
|
|
1262
1262
|
const request = createResourceRequest$n(resourceParams);
|
|
1263
1263
|
return luvio.dispatchResourceRequest(request, options)
|
|
1264
1264
|
.then((response) => {
|
|
1265
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1265
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$c(luvio, config, resourceParams, response), () => {
|
|
1266
1266
|
const cache = new StoreKeyMap();
|
|
1267
1267
|
getResponseCacheKeys$n(cache, luvio, resourceParams, response.body);
|
|
1268
1268
|
return cache;
|
|
1269
1269
|
});
|
|
1270
1270
|
}, (response) => {
|
|
1271
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1271
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$c(luvio, config, resourceParams, response));
|
|
1272
1272
|
});
|
|
1273
1273
|
}
|
|
1274
1274
|
function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext) {
|
|
1275
1275
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$n, undefined, false);
|
|
1276
1276
|
}
|
|
1277
|
-
function buildCachedSnapshotCachePolicy$
|
|
1277
|
+
function buildCachedSnapshotCachePolicy$c(context, storeLookup) {
|
|
1278
1278
|
const { luvio, config } = context;
|
|
1279
1279
|
const selector = {
|
|
1280
1280
|
recordId: keyBuilder$z(luvio, config),
|
|
@@ -1294,7 +1294,7 @@ const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untruste
|
|
|
1294
1294
|
return null;
|
|
1295
1295
|
}
|
|
1296
1296
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1297
|
-
buildCachedSnapshotCachePolicy$
|
|
1297
|
+
buildCachedSnapshotCachePolicy$c, buildNetworkSnapshotCachePolicy$b);
|
|
1298
1298
|
};
|
|
1299
1299
|
|
|
1300
1300
|
const TTL$c = 5000;
|
|
@@ -1767,14 +1767,14 @@ function adapterFragment$a(luvio, config) {
|
|
|
1767
1767
|
createResourceParams$k(config);
|
|
1768
1768
|
return select$F();
|
|
1769
1769
|
}
|
|
1770
|
-
function onFetchResponseSuccess$
|
|
1770
|
+
function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
|
|
1771
1771
|
const snapshot = ingestSuccess$i(luvio, resourceParams, response, {
|
|
1772
1772
|
config,
|
|
1773
1773
|
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
1774
1774
|
});
|
|
1775
1775
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1776
1776
|
}
|
|
1777
|
-
function onFetchResponseError$
|
|
1777
|
+
function onFetchResponseError$b(luvio, config, resourceParams, response) {
|
|
1778
1778
|
const snapshot = ingestError$a(luvio, resourceParams, response, {
|
|
1779
1779
|
config,
|
|
1780
1780
|
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
@@ -1786,19 +1786,19 @@ function buildNetworkSnapshot$k(luvio, config, options) {
|
|
|
1786
1786
|
const request = createResourceRequest$k(resourceParams);
|
|
1787
1787
|
return luvio.dispatchResourceRequest(request, options)
|
|
1788
1788
|
.then((response) => {
|
|
1789
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1789
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$b(luvio, config, resourceParams, response), () => {
|
|
1790
1790
|
const cache = new StoreKeyMap();
|
|
1791
1791
|
getResponseCacheKeys$k(cache, luvio, resourceParams, response.body);
|
|
1792
1792
|
return cache;
|
|
1793
1793
|
});
|
|
1794
1794
|
}, (response) => {
|
|
1795
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1795
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$b(luvio, config, resourceParams, response));
|
|
1796
1796
|
});
|
|
1797
1797
|
}
|
|
1798
1798
|
function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
|
|
1799
1799
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$k, undefined, false);
|
|
1800
1800
|
}
|
|
1801
|
-
function buildCachedSnapshotCachePolicy$
|
|
1801
|
+
function buildCachedSnapshotCachePolicy$b(context, storeLookup) {
|
|
1802
1802
|
const { luvio, config } = context;
|
|
1803
1803
|
const selector = {
|
|
1804
1804
|
recordId: keyBuilder$v(luvio, config),
|
|
@@ -1818,7 +1818,7 @@ const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedC
|
|
|
1818
1818
|
return null;
|
|
1819
1819
|
}
|
|
1820
1820
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1821
|
-
buildCachedSnapshotCachePolicy$
|
|
1821
|
+
buildCachedSnapshotCachePolicy$b, buildNetworkSnapshotCachePolicy$a);
|
|
1822
1822
|
};
|
|
1823
1823
|
|
|
1824
1824
|
function select$E(luvio, params) {
|
|
@@ -2278,14 +2278,14 @@ function adapterFragment$9(luvio, config) {
|
|
|
2278
2278
|
createResourceParams$i(config);
|
|
2279
2279
|
return select$B();
|
|
2280
2280
|
}
|
|
2281
|
-
function onFetchResponseSuccess$
|
|
2281
|
+
function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
|
|
2282
2282
|
const snapshot = ingestSuccess$g(luvio, resourceParams, response, {
|
|
2283
2283
|
config,
|
|
2284
2284
|
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
2285
2285
|
});
|
|
2286
2286
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2287
2287
|
}
|
|
2288
|
-
function onFetchResponseError$
|
|
2288
|
+
function onFetchResponseError$a(luvio, config, resourceParams, response) {
|
|
2289
2289
|
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
2290
2290
|
config,
|
|
2291
2291
|
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
@@ -2297,19 +2297,19 @@ function buildNetworkSnapshot$i(luvio, config, options) {
|
|
|
2297
2297
|
const request = createResourceRequest$i(resourceParams);
|
|
2298
2298
|
return luvio.dispatchResourceRequest(request, options)
|
|
2299
2299
|
.then((response) => {
|
|
2300
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2300
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => {
|
|
2301
2301
|
const cache = new StoreKeyMap();
|
|
2302
2302
|
getResponseCacheKeys$i(cache, luvio, resourceParams, response.body);
|
|
2303
2303
|
return cache;
|
|
2304
2304
|
});
|
|
2305
2305
|
}, (response) => {
|
|
2306
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2306
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
|
|
2307
2307
|
});
|
|
2308
2308
|
}
|
|
2309
2309
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
2310
2310
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$i, undefined, false);
|
|
2311
2311
|
}
|
|
2312
|
-
function buildCachedSnapshotCachePolicy$
|
|
2312
|
+
function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
|
|
2313
2313
|
const { luvio, config } = context;
|
|
2314
2314
|
const selector = {
|
|
2315
2315
|
recordId: keyBuilder$r(luvio, config),
|
|
@@ -2329,7 +2329,7 @@ const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppA
|
|
|
2329
2329
|
return null;
|
|
2330
2330
|
}
|
|
2331
2331
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2332
|
-
buildCachedSnapshotCachePolicy$
|
|
2332
|
+
buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$9);
|
|
2333
2333
|
};
|
|
2334
2334
|
|
|
2335
2335
|
function select$A(luvio, params) {
|
|
@@ -2420,14 +2420,14 @@ function adapterFragment$8(luvio, config) {
|
|
|
2420
2420
|
createResourceParams$h(config);
|
|
2421
2421
|
return select$A();
|
|
2422
2422
|
}
|
|
2423
|
-
function onFetchResponseSuccess$
|
|
2423
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
2424
2424
|
const snapshot = ingestSuccess$f(luvio, resourceParams, response, {
|
|
2425
2425
|
config,
|
|
2426
2426
|
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
2427
2427
|
});
|
|
2428
2428
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2429
2429
|
}
|
|
2430
|
-
function onFetchResponseError$
|
|
2430
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
2431
2431
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
2432
2432
|
config,
|
|
2433
2433
|
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
@@ -2439,19 +2439,19 @@ function buildNetworkSnapshot$h(luvio, config, options) {
|
|
|
2439
2439
|
const request = createResourceRequest$h(resourceParams);
|
|
2440
2440
|
return luvio.dispatchResourceRequest(request, options)
|
|
2441
2441
|
.then((response) => {
|
|
2442
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2442
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
2443
2443
|
const cache = new StoreKeyMap();
|
|
2444
2444
|
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
2445
2445
|
return cache;
|
|
2446
2446
|
});
|
|
2447
2447
|
}, (response) => {
|
|
2448
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2448
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
2449
2449
|
});
|
|
2450
2450
|
}
|
|
2451
2451
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
2452
2452
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$h, undefined, false);
|
|
2453
2453
|
}
|
|
2454
|
-
function buildCachedSnapshotCachePolicy$
|
|
2454
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
2455
2455
|
const { luvio, config } = context;
|
|
2456
2456
|
const selector = {
|
|
2457
2457
|
recordId: keyBuilder$p(luvio, config),
|
|
@@ -2471,7 +2471,7 @@ const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppAct
|
|
|
2471
2471
|
return null;
|
|
2472
2472
|
}
|
|
2473
2473
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2474
|
-
buildCachedSnapshotCachePolicy$
|
|
2474
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$8);
|
|
2475
2475
|
};
|
|
2476
2476
|
|
|
2477
2477
|
const TTL$9 = 5000;
|
|
@@ -2955,14 +2955,14 @@ function adapterFragment$7(luvio, config) {
|
|
|
2955
2955
|
createResourceParams$g(config);
|
|
2956
2956
|
return select$x();
|
|
2957
2957
|
}
|
|
2958
|
-
function onFetchResponseSuccess$
|
|
2958
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
2959
2959
|
const snapshot = ingestSuccess$e(luvio, resourceParams, response, {
|
|
2960
2960
|
config,
|
|
2961
2961
|
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
2962
2962
|
});
|
|
2963
2963
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2964
2964
|
}
|
|
2965
|
-
function onFetchResponseError$
|
|
2965
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
2966
2966
|
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
2967
2967
|
config,
|
|
2968
2968
|
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
@@ -2974,19 +2974,19 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
2974
2974
|
const request = createResourceRequest$g(resourceParams);
|
|
2975
2975
|
return luvio.dispatchResourceRequest(request, options)
|
|
2976
2976
|
.then((response) => {
|
|
2977
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2977
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
2978
2978
|
const cache = new StoreKeyMap();
|
|
2979
2979
|
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
2980
2980
|
return cache;
|
|
2981
2981
|
});
|
|
2982
2982
|
}, (response) => {
|
|
2983
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2983
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
2984
2984
|
});
|
|
2985
2985
|
}
|
|
2986
2986
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
2987
2987
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$g, undefined, false);
|
|
2988
2988
|
}
|
|
2989
|
-
function buildCachedSnapshotCachePolicy$
|
|
2989
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
2990
2990
|
const { luvio, config } = context;
|
|
2991
2991
|
const selector = {
|
|
2992
2992
|
recordId: keyBuilder$l(luvio, config),
|
|
@@ -3006,7 +3006,7 @@ const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAsset
|
|
|
3006
3006
|
return null;
|
|
3007
3007
|
}
|
|
3008
3008
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3009
|
-
buildCachedSnapshotCachePolicy$
|
|
3009
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$7);
|
|
3010
3010
|
};
|
|
3011
3011
|
|
|
3012
3012
|
function select$w(luvio, params) {
|
|
@@ -3229,14 +3229,14 @@ function adapterFragment$6(luvio, config) {
|
|
|
3229
3229
|
createResourceParams$e(config);
|
|
3230
3230
|
return select$v();
|
|
3231
3231
|
}
|
|
3232
|
-
function onFetchResponseSuccess$
|
|
3232
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
3233
3233
|
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
3234
3234
|
config,
|
|
3235
3235
|
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
3236
3236
|
});
|
|
3237
3237
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3238
3238
|
}
|
|
3239
|
-
function onFetchResponseError$
|
|
3239
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
3240
3240
|
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
3241
3241
|
config,
|
|
3242
3242
|
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
@@ -3248,19 +3248,19 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
3248
3248
|
const request = createResourceRequest$e(resourceParams);
|
|
3249
3249
|
return luvio.dispatchResourceRequest(request, options)
|
|
3250
3250
|
.then((response) => {
|
|
3251
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3251
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
3252
3252
|
const cache = new StoreKeyMap();
|
|
3253
3253
|
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
3254
3254
|
return cache;
|
|
3255
3255
|
});
|
|
3256
3256
|
}, (response) => {
|
|
3257
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3257
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
3258
3258
|
});
|
|
3259
3259
|
}
|
|
3260
3260
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
3261
3261
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, undefined, false);
|
|
3262
3262
|
}
|
|
3263
|
-
function buildCachedSnapshotCachePolicy$
|
|
3263
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
3264
3264
|
const { luvio, config } = context;
|
|
3265
3265
|
const selector = {
|
|
3266
3266
|
recordId: keyBuilder$j(luvio, config),
|
|
@@ -3280,7 +3280,7 @@ const getAppAssetAdapterFactory = (luvio) => function AppFramework__getAppAsset(
|
|
|
3280
3280
|
return null;
|
|
3281
3281
|
}
|
|
3282
3282
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3283
|
-
buildCachedSnapshotCachePolicy$
|
|
3283
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$6);
|
|
3284
3284
|
};
|
|
3285
3285
|
|
|
3286
3286
|
function keyBuilder$i(luvio, params) {
|
|
@@ -3774,14 +3774,14 @@ function adapterFragment$5(luvio, config) {
|
|
|
3774
3774
|
createResourceParams$a(config);
|
|
3775
3775
|
return select$r();
|
|
3776
3776
|
}
|
|
3777
|
-
function onFetchResponseSuccess$
|
|
3777
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
3778
3778
|
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
3779
3779
|
config,
|
|
3780
3780
|
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
3781
3781
|
});
|
|
3782
3782
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3783
3783
|
}
|
|
3784
|
-
function onFetchResponseError$
|
|
3784
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
3785
3785
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
3786
3786
|
config,
|
|
3787
3787
|
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
@@ -3793,19 +3793,19 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
3793
3793
|
const request = createResourceRequest$a(resourceParams);
|
|
3794
3794
|
return luvio.dispatchResourceRequest(request, options)
|
|
3795
3795
|
.then((response) => {
|
|
3796
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3796
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
3797
3797
|
const cache = new StoreKeyMap();
|
|
3798
3798
|
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
3799
3799
|
return cache;
|
|
3800
3800
|
});
|
|
3801
3801
|
}, (response) => {
|
|
3802
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3802
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
3803
3803
|
});
|
|
3804
3804
|
}
|
|
3805
3805
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
3806
3806
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
3807
3807
|
}
|
|
3808
|
-
function buildCachedSnapshotCachePolicy$
|
|
3808
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
3809
3809
|
const { luvio, config } = context;
|
|
3810
3810
|
const selector = {
|
|
3811
3811
|
recordId: keyBuilder$g(luvio, config),
|
|
@@ -3825,7 +3825,7 @@ const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getIn
|
|
|
3825
3825
|
return null;
|
|
3826
3826
|
}
|
|
3827
3827
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3828
|
-
buildCachedSnapshotCachePolicy$
|
|
3828
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$5);
|
|
3829
3829
|
};
|
|
3830
3830
|
|
|
3831
3831
|
const VERSION$h = "37cd2df78831b62dfcd672b30f4ca0eb";
|
|
@@ -5162,14 +5162,14 @@ function adapterFragment$4(luvio, config) {
|
|
|
5162
5162
|
createResourceParams$9(config);
|
|
5163
5163
|
return select$j();
|
|
5164
5164
|
}
|
|
5165
|
-
function onFetchResponseSuccess$
|
|
5165
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
5166
5166
|
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
5167
5167
|
config,
|
|
5168
5168
|
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
5169
5169
|
});
|
|
5170
5170
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5171
5171
|
}
|
|
5172
|
-
function onFetchResponseError$
|
|
5172
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
5173
5173
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
5174
5174
|
config,
|
|
5175
5175
|
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
@@ -5181,19 +5181,19 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
5181
5181
|
const request = createResourceRequest$9(resourceParams);
|
|
5182
5182
|
return luvio.dispatchResourceRequest(request, options)
|
|
5183
5183
|
.then((response) => {
|
|
5184
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5184
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
5185
5185
|
const cache = new StoreKeyMap();
|
|
5186
5186
|
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
5187
5187
|
return cache;
|
|
5188
5188
|
});
|
|
5189
5189
|
}, (response) => {
|
|
5190
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5190
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
5191
5191
|
});
|
|
5192
5192
|
}
|
|
5193
5193
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
5194
5194
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
5195
5195
|
}
|
|
5196
|
-
function buildCachedSnapshotCachePolicy$
|
|
5196
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
5197
5197
|
const { luvio, config } = context;
|
|
5198
5198
|
const selector = {
|
|
5199
5199
|
recordId: keyBuilder$d(luvio, config),
|
|
@@ -5213,7 +5213,7 @@ const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplate
|
|
|
5213
5213
|
return null;
|
|
5214
5214
|
}
|
|
5215
5215
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5216
|
-
buildCachedSnapshotCachePolicy$
|
|
5216
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$4);
|
|
5217
5217
|
};
|
|
5218
5218
|
|
|
5219
5219
|
function validate$g(obj, path = 'ChainDefinitionInputRepresentation') {
|
|
@@ -5552,6 +5552,71 @@ function createResourceRequest$7(config) {
|
|
|
5552
5552
|
};
|
|
5553
5553
|
}
|
|
5554
5554
|
|
|
5555
|
+
class NameToIdCache {
|
|
5556
|
+
constructor() {
|
|
5557
|
+
this.cache = {};
|
|
5558
|
+
}
|
|
5559
|
+
get(name) {
|
|
5560
|
+
return this.cache[name.toLowerCase()];
|
|
5561
|
+
}
|
|
5562
|
+
set(name, id) {
|
|
5563
|
+
this.cache[name.toLowerCase()] = id;
|
|
5564
|
+
}
|
|
5565
|
+
remove(nameOrId) {
|
|
5566
|
+
const lowerName = nameOrId.toLowerCase();
|
|
5567
|
+
for (const key in this.cache) {
|
|
5568
|
+
if (key === lowerName || this.cache[key] === nameOrId) {
|
|
5569
|
+
delete this.cache[key];
|
|
5570
|
+
}
|
|
5571
|
+
}
|
|
5572
|
+
}
|
|
5573
|
+
clear() {
|
|
5574
|
+
this.cache = {};
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5577
|
+
|
|
5578
|
+
const templateNameToIdCache = new NameToIdCache();
|
|
5579
|
+
function templateApiName({ name, namespace }) {
|
|
5580
|
+
return namespace ? `${namespace}__${name}` : name;
|
|
5581
|
+
}
|
|
5582
|
+
|
|
5583
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
5584
|
+
// save off the name->id for the next request
|
|
5585
|
+
if (response.body !== null && response.body !== undefined && response.body.name) {
|
|
5586
|
+
templateNameToIdCache.set(templateApiName(response.body), response.body.id);
|
|
5587
|
+
}
|
|
5588
|
+
let cacheResourceParams;
|
|
5589
|
+
// we need to always cache on the templateId, so check if the urlParams was not using the returned id
|
|
5590
|
+
if (resourceParams.urlParams.templateIdOrApiName !==
|
|
5591
|
+
(response.body === null || response.body === undefined ? undefined : response.body.id)) {
|
|
5592
|
+
// and switch it to use the id in the response, so ingestSuccess() will use that to gen the cache key
|
|
5593
|
+
cacheResourceParams = {
|
|
5594
|
+
...resourceParams,
|
|
5595
|
+
urlParams: { templateIdOrApiName: response.body.id },
|
|
5596
|
+
};
|
|
5597
|
+
}
|
|
5598
|
+
else {
|
|
5599
|
+
cacheResourceParams = resourceParams;
|
|
5600
|
+
}
|
|
5601
|
+
return onFetchResponseSuccess$3(luvio, config, cacheResourceParams, response);
|
|
5602
|
+
}
|
|
5603
|
+
|
|
5604
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
5605
|
+
templateNameToIdCache.remove(config.templateIdOrApiName);
|
|
5606
|
+
return onFetchResponseError$3(luvio, config, resourceParams, response);
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
5610
|
+
const { config, luvio } = context;
|
|
5611
|
+
// see if templateIdOrApiName is a name for which we have the id and, if so, return that snapshot
|
|
5612
|
+
const id = templateNameToIdCache.get(config.templateIdOrApiName);
|
|
5613
|
+
if (id && id !== config.templateIdOrApiName) {
|
|
5614
|
+
return buildCachedSnapshotCachePolicy$3({ luvio, config: { templateIdOrApiName: id } }, storeLookup);
|
|
5615
|
+
}
|
|
5616
|
+
// otherwise, check it as normal against the id snapshots
|
|
5617
|
+
return buildCachedSnapshotCachePolicy$3(context, storeLookup);
|
|
5618
|
+
}
|
|
5619
|
+
|
|
5555
5620
|
const adapterName$7 = 'getTemplate';
|
|
5556
5621
|
const getTemplate_ConfigPropertyMetadata = [
|
|
5557
5622
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
@@ -5603,13 +5668,13 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
5603
5668
|
const request = createResourceRequest$7(resourceParams);
|
|
5604
5669
|
return luvio.dispatchResourceRequest(request, options)
|
|
5605
5670
|
.then((response) => {
|
|
5606
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5671
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
5607
5672
|
const cache = new StoreKeyMap();
|
|
5608
5673
|
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
5609
5674
|
return cache;
|
|
5610
5675
|
});
|
|
5611
5676
|
}, (response) => {
|
|
5612
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5677
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
5613
5678
|
});
|
|
5614
5679
|
}
|
|
5615
5680
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
@@ -5635,7 +5700,7 @@ const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(
|
|
|
5635
5700
|
return null;
|
|
5636
5701
|
}
|
|
5637
5702
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5638
|
-
buildCachedSnapshotCachePolicy$
|
|
5703
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$3);
|
|
5639
5704
|
};
|
|
5640
5705
|
|
|
5641
5706
|
function select$g(luvio, params) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Luvio, Snapshot, StoreLookup } from '@luvio/engine';
|
|
2
|
+
import type { GetTemplateConfig } from '../../../generated/adapters/getTemplate';
|
|
3
|
+
import type { TemplateRepresentation } from '../../../generated/types/TemplateRepresentation';
|
|
4
|
+
export declare function buildCachedSnapshotCachePolicy(context: {
|
|
5
|
+
luvio: Luvio;
|
|
6
|
+
config: GetTemplateConfig;
|
|
7
|
+
}, storeLookup: StoreLookup<TemplateRepresentation>): Snapshot<TemplateRepresentation>;
|
package/dist/es/es2018/types/src/raml-artifacts/adapters/getTemplate/onFetchResponseError.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Luvio, ErrorResponse } from '@luvio/engine';
|
|
2
|
+
import type { GetTemplateConfig } from '../../../generated/adapters/getTemplate';
|
|
3
|
+
import type { ResourceRequestConfig } from '../../../generated/resources/getAppFrameworkTemplatesByTemplateIdOrApiName';
|
|
4
|
+
export declare function onFetchResponseError(luvio: Luvio, config: GetTemplateConfig, resourceParams: ResourceRequestConfig, response: ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
package/dist/es/es2018/types/src/raml-artifacts/adapters/getTemplate/onFetchResponseSuccess.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Luvio, FetchResponse } from '@luvio/engine';
|
|
2
|
+
import type { GetTemplateConfig } from '../../../generated/adapters/getTemplate';
|
|
3
|
+
import type { ResourceRequestConfig } from '../../../generated/resources/getAppFrameworkTemplatesByTemplateIdOrApiName';
|
|
4
|
+
import type { TemplateRepresentation } from '../../../generated/types/TemplateRepresentation';
|
|
5
|
+
export declare function onFetchResponseSuccess(luvio: Luvio, config: GetTemplateConfig, resourceParams: ResourceRequestConfig, response: FetchResponse<TemplateRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<TemplateRepresentation, {}> | import("@luvio/engine").StaleSnapshot<TemplateRepresentation, {}> | import("@luvio/engine").PendingSnapshot<TemplateRepresentation, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-analytics-app-framework",
|
|
3
|
-
"version": "1.354.0-
|
|
3
|
+
"version": "1.354.0-dev4",
|
|
4
4
|
"description": "APIs for the app-framework",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/analytics-app-framework.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "yarn build:services",
|
|
35
|
-
"build:raml": "luvio generate src/raml/luvio.raml src/generated -p '
|
|
35
|
+
"build:raml": "luvio generate src/raml/luvio.raml src/generated -p './scripts/lds-analytics-app-framework-plugin.js'",
|
|
36
36
|
"build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
|
|
37
37
|
"clean": "rm -rf dist sfdc src/generated",
|
|
38
38
|
"release:core": "../../scripts/release/core.js --adapter=lds-adapters-analytics-app-framework",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"test:unit": "jest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@salesforce/lds-bindings": "^1.354.0-
|
|
43
|
+
"@salesforce/lds-bindings": "^1.354.0-dev4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.354.0-
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.354.0-dev4"
|
|
47
47
|
},
|
|
48
48
|
"nx": {
|
|
49
49
|
"targets": {
|
|
@@ -56,6 +56,16 @@
|
|
|
56
56
|
"build:raml": {
|
|
57
57
|
"outputs": [
|
|
58
58
|
"{projectRoot}/src/generated"
|
|
59
|
+
],
|
|
60
|
+
"inputs": [
|
|
61
|
+
{
|
|
62
|
+
"externalDependencies": [
|
|
63
|
+
"@luvio/compiler",
|
|
64
|
+
"@luvio/cli"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"{projectRoot}/**/*.raml",
|
|
68
|
+
"{projectRoot}/scripts/**"
|
|
59
69
|
]
|
|
60
70
|
}
|
|
61
71
|
}
|
package/sfdc/index.js
CHANGED
|
@@ -3559,14 +3559,14 @@ function adapterFragment$b(luvio, config) {
|
|
|
3559
3559
|
createResourceParams$h(config);
|
|
3560
3560
|
return select$y();
|
|
3561
3561
|
}
|
|
3562
|
-
function onFetchResponseSuccess$
|
|
3562
|
+
function onFetchResponseSuccess$c(luvio, config, resourceParams, response) {
|
|
3563
3563
|
const snapshot = ingestSuccess$h(luvio, resourceParams, response, {
|
|
3564
3564
|
config,
|
|
3565
3565
|
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
3566
3566
|
});
|
|
3567
3567
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3568
3568
|
}
|
|
3569
|
-
function onFetchResponseError$
|
|
3569
|
+
function onFetchResponseError$c(luvio, config, resourceParams, response) {
|
|
3570
3570
|
const snapshot = ingestError$b(luvio, resourceParams, response, {
|
|
3571
3571
|
config,
|
|
3572
3572
|
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
@@ -3578,19 +3578,19 @@ function buildNetworkSnapshot$h(luvio, config, options) {
|
|
|
3578
3578
|
const request = createResourceRequest$h(resourceParams);
|
|
3579
3579
|
return luvio.dispatchResourceRequest(request, options)
|
|
3580
3580
|
.then((response) => {
|
|
3581
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3581
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$c(luvio, config, resourceParams, response), () => {
|
|
3582
3582
|
const cache = new StoreKeyMap();
|
|
3583
3583
|
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
3584
3584
|
return cache;
|
|
3585
3585
|
});
|
|
3586
3586
|
}, (response) => {
|
|
3587
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3587
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$c(luvio, config, resourceParams, response));
|
|
3588
3588
|
});
|
|
3589
3589
|
}
|
|
3590
3590
|
function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext) {
|
|
3591
3591
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$h, undefined, false);
|
|
3592
3592
|
}
|
|
3593
|
-
function buildCachedSnapshotCachePolicy$
|
|
3593
|
+
function buildCachedSnapshotCachePolicy$c(context, storeLookup) {
|
|
3594
3594
|
const { luvio, config } = context;
|
|
3595
3595
|
const selector = {
|
|
3596
3596
|
recordId: keyBuilder$t(luvio, config),
|
|
@@ -3610,7 +3610,7 @@ const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedC
|
|
|
3610
3610
|
return null;
|
|
3611
3611
|
}
|
|
3612
3612
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3613
|
-
buildCachedSnapshotCachePolicy$
|
|
3613
|
+
buildCachedSnapshotCachePolicy$c, buildNetworkSnapshotCachePolicy$b);
|
|
3614
3614
|
};
|
|
3615
3615
|
const notifyChangeFactory$6 = (luvio, options) => {
|
|
3616
3616
|
return function getAppFrameworkAppsByAppIdOrApiNameNotifyChange(configs) {
|
|
@@ -4002,14 +4002,14 @@ function adapterFragment$a(luvio, config) {
|
|
|
4002
4002
|
createResourceParams$g(config);
|
|
4003
4003
|
return select$v();
|
|
4004
4004
|
}
|
|
4005
|
-
function onFetchResponseSuccess$
|
|
4005
|
+
function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
|
|
4006
4006
|
const snapshot = ingestSuccess$g(luvio, resourceParams, response, {
|
|
4007
4007
|
config,
|
|
4008
4008
|
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
4009
4009
|
});
|
|
4010
4010
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4011
4011
|
}
|
|
4012
|
-
function onFetchResponseError$
|
|
4012
|
+
function onFetchResponseError$b(luvio, config, resourceParams, response) {
|
|
4013
4013
|
const snapshot = ingestError$a(luvio, resourceParams, response, {
|
|
4014
4014
|
config,
|
|
4015
4015
|
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
@@ -4021,19 +4021,19 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
4021
4021
|
const request = createResourceRequest$g(resourceParams);
|
|
4022
4022
|
return luvio.dispatchResourceRequest(request, options)
|
|
4023
4023
|
.then((response) => {
|
|
4024
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4024
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$b(luvio, config, resourceParams, response), () => {
|
|
4025
4025
|
const cache = new StoreKeyMap();
|
|
4026
4026
|
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
4027
4027
|
return cache;
|
|
4028
4028
|
});
|
|
4029
4029
|
}, (response) => {
|
|
4030
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4030
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$b(luvio, config, resourceParams, response));
|
|
4031
4031
|
});
|
|
4032
4032
|
}
|
|
4033
4033
|
function buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext) {
|
|
4034
4034
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$g, undefined, false);
|
|
4035
4035
|
}
|
|
4036
|
-
function buildCachedSnapshotCachePolicy$
|
|
4036
|
+
function buildCachedSnapshotCachePolicy$b(context, storeLookup) {
|
|
4037
4037
|
const { luvio, config } = context;
|
|
4038
4038
|
const selector = {
|
|
4039
4039
|
recordId: keyBuilder$p(luvio, config),
|
|
@@ -4053,7 +4053,7 @@ const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppA
|
|
|
4053
4053
|
return null;
|
|
4054
4054
|
}
|
|
4055
4055
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4056
|
-
buildCachedSnapshotCachePolicy$
|
|
4056
|
+
buildCachedSnapshotCachePolicy$b, buildNetworkSnapshotCachePolicy$a);
|
|
4057
4057
|
};
|
|
4058
4058
|
const notifyChangeFactory$5 = (luvio, options) => {
|
|
4059
4059
|
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameNotifyChange(configs) {
|
|
@@ -4186,14 +4186,14 @@ function adapterFragment$9(luvio, config) {
|
|
|
4186
4186
|
createResourceParams$f(config);
|
|
4187
4187
|
return select$u();
|
|
4188
4188
|
}
|
|
4189
|
-
function onFetchResponseSuccess$
|
|
4189
|
+
function onFetchResponseSuccess$a(luvio, config, resourceParams, response) {
|
|
4190
4190
|
const snapshot = ingestSuccess$f(luvio, resourceParams, response, {
|
|
4191
4191
|
config,
|
|
4192
4192
|
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
4193
4193
|
});
|
|
4194
4194
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4195
4195
|
}
|
|
4196
|
-
function onFetchResponseError$
|
|
4196
|
+
function onFetchResponseError$a(luvio, config, resourceParams, response) {
|
|
4197
4197
|
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
4198
4198
|
config,
|
|
4199
4199
|
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
@@ -4205,19 +4205,19 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
4205
4205
|
const request = createResourceRequest$f(resourceParams);
|
|
4206
4206
|
return luvio.dispatchResourceRequest(request, options)
|
|
4207
4207
|
.then((response) => {
|
|
4208
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4208
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$a(luvio, config, resourceParams, response), () => {
|
|
4209
4209
|
const cache = new StoreKeyMap();
|
|
4210
4210
|
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
4211
4211
|
return cache;
|
|
4212
4212
|
});
|
|
4213
4213
|
}, (response) => {
|
|
4214
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4214
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$a(luvio, config, resourceParams, response));
|
|
4215
4215
|
});
|
|
4216
4216
|
}
|
|
4217
4217
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
4218
4218
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$f, undefined, false);
|
|
4219
4219
|
}
|
|
4220
|
-
function buildCachedSnapshotCachePolicy$
|
|
4220
|
+
function buildCachedSnapshotCachePolicy$a(context, storeLookup) {
|
|
4221
4221
|
const { luvio, config } = context;
|
|
4222
4222
|
const selector = {
|
|
4223
4223
|
recordId: keyBuilder$n(luvio, config),
|
|
@@ -4237,7 +4237,7 @@ const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppAct
|
|
|
4237
4237
|
return null;
|
|
4238
4238
|
}
|
|
4239
4239
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4240
|
-
buildCachedSnapshotCachePolicy$
|
|
4240
|
+
buildCachedSnapshotCachePolicy$a, buildNetworkSnapshotCachePolicy$9);
|
|
4241
4241
|
};
|
|
4242
4242
|
const notifyChangeFactory$4 = (luvio, options) => {
|
|
4243
4243
|
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameAndIdNotifyChange(configs) {
|
|
@@ -4362,14 +4362,14 @@ function adapterFragment$8(luvio, config) {
|
|
|
4362
4362
|
createResourceParams$e(config);
|
|
4363
4363
|
return select$t();
|
|
4364
4364
|
}
|
|
4365
|
-
function onFetchResponseSuccess$
|
|
4365
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
4366
4366
|
const snapshot = ingestSuccess$e(luvio, resourceParams, response, {
|
|
4367
4367
|
config,
|
|
4368
4368
|
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
4369
4369
|
});
|
|
4370
4370
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4371
4371
|
}
|
|
4372
|
-
function onFetchResponseError$
|
|
4372
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
4373
4373
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
4374
4374
|
config,
|
|
4375
4375
|
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
@@ -4381,19 +4381,19 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
4381
4381
|
const request = createResourceRequest$e(resourceParams);
|
|
4382
4382
|
return luvio.dispatchResourceRequest(request, options)
|
|
4383
4383
|
.then((response) => {
|
|
4384
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4384
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
4385
4385
|
const cache = new StoreKeyMap();
|
|
4386
4386
|
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
4387
4387
|
return cache;
|
|
4388
4388
|
});
|
|
4389
4389
|
}, (response) => {
|
|
4390
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4390
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
4391
4391
|
});
|
|
4392
4392
|
}
|
|
4393
4393
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
4394
4394
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, undefined, false);
|
|
4395
4395
|
}
|
|
4396
|
-
function buildCachedSnapshotCachePolicy$
|
|
4396
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
4397
4397
|
const { luvio, config } = context;
|
|
4398
4398
|
const selector = {
|
|
4399
4399
|
recordId: keyBuilder$l(luvio, config),
|
|
@@ -4413,7 +4413,7 @@ const getAppAssetAdapterFactory = (luvio) => function AppFramework__getAppAsset(
|
|
|
4413
4413
|
return null;
|
|
4414
4414
|
}
|
|
4415
4415
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4416
|
-
buildCachedSnapshotCachePolicy$
|
|
4416
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$8);
|
|
4417
4417
|
};
|
|
4418
4418
|
|
|
4419
4419
|
const TTL$8 = 5000;
|
|
@@ -4631,14 +4631,14 @@ function adapterFragment$7(luvio, config) {
|
|
|
4631
4631
|
createResourceParams$d(config);
|
|
4632
4632
|
return select$r();
|
|
4633
4633
|
}
|
|
4634
|
-
function onFetchResponseSuccess$
|
|
4634
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
4635
4635
|
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
4636
4636
|
config,
|
|
4637
4637
|
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
4638
4638
|
});
|
|
4639
4639
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4640
4640
|
}
|
|
4641
|
-
function onFetchResponseError$
|
|
4641
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
4642
4642
|
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
4643
4643
|
config,
|
|
4644
4644
|
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
@@ -4650,19 +4650,19 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
4650
4650
|
const request = createResourceRequest$d(resourceParams);
|
|
4651
4651
|
return luvio.dispatchResourceRequest(request, options)
|
|
4652
4652
|
.then((response) => {
|
|
4653
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4653
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
4654
4654
|
const cache = new StoreKeyMap();
|
|
4655
4655
|
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
4656
4656
|
return cache;
|
|
4657
4657
|
});
|
|
4658
4658
|
}, (response) => {
|
|
4659
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4659
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
4660
4660
|
});
|
|
4661
4661
|
}
|
|
4662
4662
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
4663
4663
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, undefined, false);
|
|
4664
4664
|
}
|
|
4665
|
-
function buildCachedSnapshotCachePolicy$
|
|
4665
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
4666
4666
|
const { luvio, config } = context;
|
|
4667
4667
|
const selector = {
|
|
4668
4668
|
recordId: keyBuilder$i(luvio, config),
|
|
@@ -4682,7 +4682,7 @@ const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAsset
|
|
|
4682
4682
|
return null;
|
|
4683
4683
|
}
|
|
4684
4684
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4685
|
-
buildCachedSnapshotCachePolicy$
|
|
4685
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$7);
|
|
4686
4686
|
};
|
|
4687
4687
|
const notifyChangeFactory$3 = (luvio, options) => {
|
|
4688
4688
|
return function getAppFrameworkAppsAssetsByAppIdOrApiNameNotifyChange(configs) {
|
|
@@ -4901,14 +4901,14 @@ function adapterFragment$6(luvio, config) {
|
|
|
4901
4901
|
createResourceParams$c(config);
|
|
4902
4902
|
return select$p();
|
|
4903
4903
|
}
|
|
4904
|
-
function onFetchResponseSuccess$
|
|
4904
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
4905
4905
|
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
4906
4906
|
config,
|
|
4907
4907
|
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
4908
4908
|
});
|
|
4909
4909
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4910
4910
|
}
|
|
4911
|
-
function onFetchResponseError$
|
|
4911
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
4912
4912
|
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
4913
4913
|
config,
|
|
4914
4914
|
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
@@ -4920,19 +4920,19 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
4920
4920
|
const request = createResourceRequest$c(resourceParams);
|
|
4921
4921
|
return luvio.dispatchResourceRequest(request, options)
|
|
4922
4922
|
.then((response) => {
|
|
4923
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
4923
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
4924
4924
|
const cache = new StoreKeyMap();
|
|
4925
4925
|
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
4926
4926
|
return cache;
|
|
4927
4927
|
});
|
|
4928
4928
|
}, (response) => {
|
|
4929
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
4929
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
4930
4930
|
});
|
|
4931
4931
|
}
|
|
4932
4932
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
4933
4933
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
4934
4934
|
}
|
|
4935
|
-
function buildCachedSnapshotCachePolicy$
|
|
4935
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
4936
4936
|
const { luvio, config } = context;
|
|
4937
4937
|
const selector = {
|
|
4938
4938
|
recordId: keyBuilder$g(luvio, config),
|
|
@@ -4952,7 +4952,7 @@ const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untruste
|
|
|
4952
4952
|
return null;
|
|
4953
4953
|
}
|
|
4954
4954
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4955
|
-
buildCachedSnapshotCachePolicy$
|
|
4955
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$6);
|
|
4956
4956
|
};
|
|
4957
4957
|
|
|
4958
4958
|
const TTL$6 = 5000;
|
|
@@ -5136,14 +5136,14 @@ function adapterFragment$5(luvio, config) {
|
|
|
5136
5136
|
createResourceParams$b(config);
|
|
5137
5137
|
return select$n();
|
|
5138
5138
|
}
|
|
5139
|
-
function onFetchResponseSuccess$
|
|
5139
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
5140
5140
|
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
5141
5141
|
config,
|
|
5142
5142
|
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
5143
5143
|
});
|
|
5144
5144
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5145
5145
|
}
|
|
5146
|
-
function onFetchResponseError$
|
|
5146
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
5147
5147
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
5148
5148
|
config,
|
|
5149
5149
|
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
@@ -5155,19 +5155,19 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
5155
5155
|
const request = createResourceRequest$b(resourceParams);
|
|
5156
5156
|
return luvio.dispatchResourceRequest(request, options)
|
|
5157
5157
|
.then((response) => {
|
|
5158
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5158
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
5159
5159
|
const cache = new StoreKeyMap();
|
|
5160
5160
|
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
5161
5161
|
return cache;
|
|
5162
5162
|
});
|
|
5163
5163
|
}, (response) => {
|
|
5164
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5164
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
5165
5165
|
});
|
|
5166
5166
|
}
|
|
5167
5167
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
5168
5168
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
5169
5169
|
}
|
|
5170
|
-
function buildCachedSnapshotCachePolicy$
|
|
5170
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
5171
5171
|
const { luvio, config } = context;
|
|
5172
5172
|
const selector = {
|
|
5173
5173
|
recordId: keyBuilder$e(luvio, config),
|
|
@@ -5187,7 +5187,7 @@ const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getIn
|
|
|
5187
5187
|
return null;
|
|
5188
5188
|
}
|
|
5189
5189
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5190
|
-
buildCachedSnapshotCachePolicy$
|
|
5190
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$5);
|
|
5191
5191
|
};
|
|
5192
5192
|
|
|
5193
5193
|
const TTL$5 = 5000;
|
|
@@ -5383,14 +5383,14 @@ function adapterFragment$4(luvio, config) {
|
|
|
5383
5383
|
createResourceParams$a(config);
|
|
5384
5384
|
return select$l();
|
|
5385
5385
|
}
|
|
5386
|
-
function onFetchResponseSuccess$
|
|
5386
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
5387
5387
|
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
5388
5388
|
config,
|
|
5389
5389
|
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
5390
5390
|
});
|
|
5391
5391
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
5392
5392
|
}
|
|
5393
|
-
function onFetchResponseError$
|
|
5393
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
5394
5394
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
5395
5395
|
config,
|
|
5396
5396
|
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
@@ -5402,19 +5402,19 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
5402
5402
|
const request = createResourceRequest$a(resourceParams);
|
|
5403
5403
|
return luvio.dispatchResourceRequest(request, options)
|
|
5404
5404
|
.then((response) => {
|
|
5405
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5405
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
5406
5406
|
const cache = new StoreKeyMap();
|
|
5407
5407
|
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
5408
5408
|
return cache;
|
|
5409
5409
|
});
|
|
5410
5410
|
}, (response) => {
|
|
5411
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5411
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
5412
5412
|
});
|
|
5413
5413
|
}
|
|
5414
5414
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
5415
5415
|
return buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
5416
5416
|
}
|
|
5417
|
-
function buildCachedSnapshotCachePolicy$
|
|
5417
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
5418
5418
|
const { luvio, config } = context;
|
|
5419
5419
|
const selector = {
|
|
5420
5420
|
recordId: keyBuilder$b(luvio, config),
|
|
@@ -5434,7 +5434,7 @@ const getTagsAdapterFactory = (luvio) => function AppFramework__getTags(untruste
|
|
|
5434
5434
|
return null;
|
|
5435
5435
|
}
|
|
5436
5436
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5437
|
-
buildCachedSnapshotCachePolicy$
|
|
5437
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$4);
|
|
5438
5438
|
};
|
|
5439
5439
|
const notifyChangeFactory$2 = (luvio, options) => {
|
|
5440
5440
|
return function getAppFrameworkTemplatesTagsByTemplateIdOrApiNameNotifyChange(configs) {
|
|
@@ -5532,6 +5532,71 @@ function createResourceRequestFromRepresentation$1(representation) {
|
|
|
5532
5532
|
return createResourceRequest$9(config);
|
|
5533
5533
|
}
|
|
5534
5534
|
|
|
5535
|
+
class NameToIdCache {
|
|
5536
|
+
constructor() {
|
|
5537
|
+
this.cache = {};
|
|
5538
|
+
}
|
|
5539
|
+
get(name) {
|
|
5540
|
+
return this.cache[name.toLowerCase()];
|
|
5541
|
+
}
|
|
5542
|
+
set(name, id) {
|
|
5543
|
+
this.cache[name.toLowerCase()] = id;
|
|
5544
|
+
}
|
|
5545
|
+
remove(nameOrId) {
|
|
5546
|
+
const lowerName = nameOrId.toLowerCase();
|
|
5547
|
+
for (const key in this.cache) {
|
|
5548
|
+
if (key === lowerName || this.cache[key] === nameOrId) {
|
|
5549
|
+
delete this.cache[key];
|
|
5550
|
+
}
|
|
5551
|
+
}
|
|
5552
|
+
}
|
|
5553
|
+
clear() {
|
|
5554
|
+
this.cache = {};
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5557
|
+
|
|
5558
|
+
const templateNameToIdCache = new NameToIdCache();
|
|
5559
|
+
function templateApiName({ name, namespace }) {
|
|
5560
|
+
return namespace ? `${namespace}__${name}` : name;
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
5564
|
+
// save off the name->id for the next request
|
|
5565
|
+
if (response.body !== null && response.body !== undefined && response.body.name) {
|
|
5566
|
+
templateNameToIdCache.set(templateApiName(response.body), response.body.id);
|
|
5567
|
+
}
|
|
5568
|
+
let cacheResourceParams;
|
|
5569
|
+
// we need to always cache on the templateId, so check if the urlParams was not using the returned id
|
|
5570
|
+
if (resourceParams.urlParams.templateIdOrApiName !==
|
|
5571
|
+
(response.body === null || response.body === undefined ? undefined : response.body.id)) {
|
|
5572
|
+
// and switch it to use the id in the response, so ingestSuccess() will use that to gen the cache key
|
|
5573
|
+
cacheResourceParams = {
|
|
5574
|
+
...resourceParams,
|
|
5575
|
+
urlParams: { templateIdOrApiName: response.body.id },
|
|
5576
|
+
};
|
|
5577
|
+
}
|
|
5578
|
+
else {
|
|
5579
|
+
cacheResourceParams = resourceParams;
|
|
5580
|
+
}
|
|
5581
|
+
return onFetchResponseSuccess$3(luvio, config, cacheResourceParams, response);
|
|
5582
|
+
}
|
|
5583
|
+
|
|
5584
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
5585
|
+
templateNameToIdCache.remove(config.templateIdOrApiName);
|
|
5586
|
+
return onFetchResponseError$3(luvio, config, resourceParams, response);
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
5590
|
+
const { config, luvio } = context;
|
|
5591
|
+
// see if templateIdOrApiName is a name for which we have the id and, if so, return that snapshot
|
|
5592
|
+
const id = templateNameToIdCache.get(config.templateIdOrApiName);
|
|
5593
|
+
if (id && id !== config.templateIdOrApiName) {
|
|
5594
|
+
return buildCachedSnapshotCachePolicy$3({ luvio, config: { templateIdOrApiName: id } }, storeLookup);
|
|
5595
|
+
}
|
|
5596
|
+
// otherwise, check it as normal against the id snapshots
|
|
5597
|
+
return buildCachedSnapshotCachePolicy$3(context, storeLookup);
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5535
5600
|
const adapterName$9 = 'getTemplate';
|
|
5536
5601
|
const getTemplate_ConfigPropertyMetadata = [
|
|
5537
5602
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
@@ -5583,13 +5648,13 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
5583
5648
|
const request = createResourceRequest$9(resourceParams);
|
|
5584
5649
|
return luvio.dispatchResourceRequest(request, options)
|
|
5585
5650
|
.then((response) => {
|
|
5586
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
5651
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
5587
5652
|
const cache = new StoreKeyMap();
|
|
5588
5653
|
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
5589
5654
|
return cache;
|
|
5590
5655
|
});
|
|
5591
5656
|
}, (response) => {
|
|
5592
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
5657
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
5593
5658
|
});
|
|
5594
5659
|
}
|
|
5595
5660
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
@@ -5615,7 +5680,7 @@ const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(
|
|
|
5615
5680
|
return null;
|
|
5616
5681
|
}
|
|
5617
5682
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
5618
|
-
buildCachedSnapshotCachePolicy$
|
|
5683
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$3);
|
|
5619
5684
|
};
|
|
5620
5685
|
const notifyChangeFactory$1 = (luvio, options) => {
|
|
5621
5686
|
return function getAppFrameworkTemplatesByTemplateIdOrApiNameNotifyChange(configs) {
|
|
@@ -8287,4 +8352,4 @@ withDefaultLuvio((luvio) => {
|
|
|
8287
8352
|
});
|
|
8288
8353
|
|
|
8289
8354
|
export { createApp, createAppAsset, createTemplate, deleteApp, deleteAppAsset, deleteTemplate, getApp, getAppActivities, getAppActivitiesNotifyChange, getAppActivities_imperative, getAppActivity, getAppActivityNotifyChange, getAppActivity_imperative, getAppAsset, getAppAsset_imperative, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getInstalledAssets, getInstalledAssets_imperative, getTags, getTagsNotifyChange, getTags_imperative, getTemplate, getTemplateAssets, getTemplateAssets_imperative, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative, readinessCheck, setTags, updateApp, updateAppAsset, updateBasicApp, updateTemplate };
|
|
8290
|
-
// version: 1.354.0-
|
|
8355
|
+
// version: 1.354.0-dev4-98059adb6d
|