@salesforce/lds-adapters-analytics-app-framework 1.327.0 → 1.329.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/analytics-app-framework.js +563 -381
- package/dist/es/es2018/types/src/generated/adapters/deleteTemplate.d.ts +14 -0
- package/dist/es/es2018/types/src/generated/adapters/updateTemplate.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/deleteAppFrameworkTemplatesByTemplateIdOrApiName.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/patchAppFrameworkTemplatesByTemplateIdOrApiName.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/types/TemplateUpdateRepresentation.d.ts +35 -0
- package/package.json +3 -3
- package/sfdc/index.js +593 -405
- package/src/raml/api.raml +35 -0
- package/src/raml/luvio.raml +8 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$g, StoreKeyMap, createResourceParams as createResourceParams$g } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -157,7 +157,7 @@ function validate$s(obj, path = 'UserRepresentation') {
|
|
|
157
157
|
})();
|
|
158
158
|
return v_error === undefined ? null : v_error;
|
|
159
159
|
}
|
|
160
|
-
const select$
|
|
160
|
+
const select$D = function UserRepresentationSelect() {
|
|
161
161
|
return {
|
|
162
162
|
kind: 'Fragment',
|
|
163
163
|
version: VERSION$p,
|
|
@@ -217,7 +217,7 @@ function validate$r(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
|
217
217
|
})();
|
|
218
218
|
return v_error === undefined ? null : v_error;
|
|
219
219
|
}
|
|
220
|
-
const select$
|
|
220
|
+
const select$C = function ScheduledTimezoneRepresentationSelect() {
|
|
221
221
|
return {
|
|
222
222
|
kind: 'Fragment',
|
|
223
223
|
version: VERSION$o,
|
|
@@ -284,8 +284,8 @@ function validate$q(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
284
284
|
})();
|
|
285
285
|
return v_error === undefined ? null : v_error;
|
|
286
286
|
}
|
|
287
|
-
const select$
|
|
288
|
-
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$
|
|
287
|
+
const select$B = function ScheduledTimeRepresentationSelect() {
|
|
288
|
+
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$C();
|
|
289
289
|
return {
|
|
290
290
|
kind: 'Fragment',
|
|
291
291
|
version: VERSION$n,
|
|
@@ -327,8 +327,8 @@ function equals$k(existing, incoming) {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
const VERSION$m = "91838b86aa135ce828af6242b11ae888";
|
|
330
|
-
const select$
|
|
331
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
330
|
+
const select$A = function HourlyScheduledItemRepresentationSelect() {
|
|
331
|
+
const { selections: ScheduledItemRepresentationSelections } = select$x();
|
|
332
332
|
return {
|
|
333
333
|
kind: 'Fragment',
|
|
334
334
|
version: VERSION$m,
|
|
@@ -349,8 +349,8 @@ const select$z = function HourlyScheduledItemRepresentationSelect() {
|
|
|
349
349
|
};
|
|
350
350
|
|
|
351
351
|
const VERSION$l = "46260a34f0b2c2d7adc7f8c150a8d8fb";
|
|
352
|
-
const select$
|
|
353
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
352
|
+
const select$z = function WeeklyScheduledItemRepresentationSelect() {
|
|
353
|
+
const { selections: ScheduledItemRepresentationSelections } = select$x();
|
|
354
354
|
return {
|
|
355
355
|
kind: 'Fragment',
|
|
356
356
|
version: VERSION$l,
|
|
@@ -367,8 +367,8 @@ const select$y = function WeeklyScheduledItemRepresentationSelect() {
|
|
|
367
367
|
};
|
|
368
368
|
|
|
369
369
|
const VERSION$k = "dcda6d015a01d9acde5fac241448cfe4";
|
|
370
|
-
const select$
|
|
371
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
370
|
+
const select$y = function DailyScheduledItemRepresentationSelect() {
|
|
371
|
+
const { selections: ScheduledItemRepresentationSelections } = select$x();
|
|
372
372
|
return {
|
|
373
373
|
kind: 'Fragment',
|
|
374
374
|
version: VERSION$k,
|
|
@@ -413,9 +413,9 @@ function validate$p(obj, path = 'ScheduledItemRepresentation') {
|
|
|
413
413
|
return v_error === undefined ? null : v_error;
|
|
414
414
|
}
|
|
415
415
|
const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
416
|
-
const hourlyScheduledItemRepresentationSelections = select$
|
|
417
|
-
const weeklyScheduledItemRepresentationSelections = select$
|
|
418
|
-
const dailyScheduledItemRepresentationSelections = select$
|
|
416
|
+
const hourlyScheduledItemRepresentationSelections = select$A();
|
|
417
|
+
const weeklyScheduledItemRepresentationSelections = select$z();
|
|
418
|
+
const dailyScheduledItemRepresentationSelections = select$y();
|
|
419
419
|
return {
|
|
420
420
|
kind: 'Fragment',
|
|
421
421
|
union: true,
|
|
@@ -427,8 +427,8 @@ const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
429
|
};
|
|
430
|
-
const select$
|
|
431
|
-
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$
|
|
430
|
+
const select$x = function ScheduledItemRepresentationSelect() {
|
|
431
|
+
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$B();
|
|
432
432
|
return {
|
|
433
433
|
kind: 'Fragment',
|
|
434
434
|
version: VERSION$j,
|
|
@@ -533,7 +533,7 @@ function validate$o(obj, path = 'AppScheduleRepresentation') {
|
|
|
533
533
|
})();
|
|
534
534
|
return v_error === undefined ? null : v_error;
|
|
535
535
|
}
|
|
536
|
-
const select$
|
|
536
|
+
const select$w = function AppScheduleRepresentationSelect() {
|
|
537
537
|
const ScheduledItemRepresentation__unionSelections = selectChildren();
|
|
538
538
|
return {
|
|
539
539
|
kind: 'Fragment',
|
|
@@ -738,21 +738,21 @@ function validate$n(obj, path = 'AppRepresentation') {
|
|
|
738
738
|
return v_error === undefined ? null : v_error;
|
|
739
739
|
}
|
|
740
740
|
const RepresentationType$b = 'AppRepresentation';
|
|
741
|
-
function keyBuilder$
|
|
741
|
+
function keyBuilder$u(luvio, config) {
|
|
742
742
|
return keyPrefix + '::' + RepresentationType$b + ':' + config.id;
|
|
743
743
|
}
|
|
744
744
|
function keyBuilderFromType$8(luvio, object) {
|
|
745
745
|
const keyParams = {
|
|
746
746
|
id: object.id
|
|
747
747
|
};
|
|
748
|
-
return keyBuilder$
|
|
748
|
+
return keyBuilder$u(luvio, keyParams);
|
|
749
749
|
}
|
|
750
750
|
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
751
751
|
return input;
|
|
752
752
|
}
|
|
753
|
-
const select$
|
|
754
|
-
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$
|
|
755
|
-
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$
|
|
753
|
+
const select$v = function AppRepresentationSelect() {
|
|
754
|
+
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$D();
|
|
755
|
+
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$w();
|
|
756
756
|
return {
|
|
757
757
|
kind: 'Fragment',
|
|
758
758
|
version: VERSION$h,
|
|
@@ -1012,7 +1012,7 @@ function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
return input;
|
|
1014
1014
|
}
|
|
1015
|
-
const select$
|
|
1015
|
+
const select$u = function AppCollectionRepresentationSelect() {
|
|
1016
1016
|
return {
|
|
1017
1017
|
kind: 'Fragment',
|
|
1018
1018
|
version: VERSION$g,
|
|
@@ -1022,7 +1022,7 @@ const select$t = function AppCollectionRepresentationSelect() {
|
|
|
1022
1022
|
name: 'apps',
|
|
1023
1023
|
kind: 'Link',
|
|
1024
1024
|
plural: true,
|
|
1025
|
-
fragment: select$
|
|
1025
|
+
fragment: select$v()
|
|
1026
1026
|
}
|
|
1027
1027
|
]
|
|
1028
1028
|
};
|
|
@@ -1066,22 +1066,22 @@ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
1068
|
|
|
1069
|
-
function select$
|
|
1070
|
-
return select$
|
|
1069
|
+
function select$t(luvio, params) {
|
|
1070
|
+
return select$u();
|
|
1071
1071
|
}
|
|
1072
|
-
function keyBuilder$
|
|
1072
|
+
function keyBuilder$t(luvio, params) {
|
|
1073
1073
|
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ',' + 'type:' + params.queryParams.type + ')';
|
|
1074
1074
|
}
|
|
1075
|
-
function getResponseCacheKeys$
|
|
1076
|
-
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1075
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
1076
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$t(luvio, resourceParams));
|
|
1077
1077
|
}
|
|
1078
|
-
function ingestSuccess$
|
|
1078
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
1079
1079
|
const { body } = response;
|
|
1080
|
-
const key = keyBuilder$
|
|
1080
|
+
const key = keyBuilder$t(luvio, resourceParams);
|
|
1081
1081
|
luvio.storeIngest(key, ingest$a, body);
|
|
1082
1082
|
const snapshot = luvio.storeLookup({
|
|
1083
1083
|
recordId: key,
|
|
1084
|
-
node: select$
|
|
1084
|
+
node: select$t(),
|
|
1085
1085
|
variables: {},
|
|
1086
1086
|
}, snapshotRefresh);
|
|
1087
1087
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1093,7 +1093,7 @@ function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1093
1093
|
return snapshot;
|
|
1094
1094
|
}
|
|
1095
1095
|
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
1096
|
-
const key = keyBuilder$
|
|
1096
|
+
const key = keyBuilder$t(luvio, params);
|
|
1097
1097
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1098
1098
|
const storeMetadataParams = {
|
|
1099
1099
|
ttl: TTL$a,
|
|
@@ -1104,7 +1104,7 @@ function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
|
1104
1104
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1105
1105
|
return errorSnapshot;
|
|
1106
1106
|
}
|
|
1107
|
-
function createResourceRequest$
|
|
1107
|
+
function createResourceRequest$f(config) {
|
|
1108
1108
|
const headers = {};
|
|
1109
1109
|
return {
|
|
1110
1110
|
baseUri: '/services/data/v63.0',
|
|
@@ -1118,61 +1118,61 @@ function createResourceRequest$d(config) {
|
|
|
1118
1118
|
};
|
|
1119
1119
|
}
|
|
1120
1120
|
|
|
1121
|
-
const adapterName$
|
|
1121
|
+
const adapterName$f = 'getApps';
|
|
1122
1122
|
const getApps_ConfigPropertyMetadata = [
|
|
1123
1123
|
generateParamConfigMetadata('templateSourceId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1124
1124
|
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1125
1125
|
];
|
|
1126
|
-
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1127
|
-
const createResourceParams$
|
|
1128
|
-
function keyBuilder$
|
|
1129
|
-
const resourceParams = createResourceParams$
|
|
1130
|
-
return keyBuilder$
|
|
1126
|
+
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, getApps_ConfigPropertyMetadata);
|
|
1127
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$g(getApps_ConfigPropertyMetadata);
|
|
1128
|
+
function keyBuilder$s(luvio, config) {
|
|
1129
|
+
const resourceParams = createResourceParams$f(config);
|
|
1130
|
+
return keyBuilder$t(luvio, resourceParams);
|
|
1131
1131
|
}
|
|
1132
|
-
function typeCheckConfig$
|
|
1132
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
1133
1133
|
const config = {};
|
|
1134
|
-
typeCheckConfig$
|
|
1134
|
+
typeCheckConfig$g(untrustedConfig, config, getApps_ConfigPropertyMetadata);
|
|
1135
1135
|
return config;
|
|
1136
1136
|
}
|
|
1137
|
-
function validateAdapterConfig$
|
|
1137
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
1138
1138
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1139
1139
|
return null;
|
|
1140
1140
|
}
|
|
1141
1141
|
if (process.env.NODE_ENV !== 'production') {
|
|
1142
1142
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1143
1143
|
}
|
|
1144
|
-
const config = typeCheckConfig$
|
|
1144
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
1145
1145
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1146
1146
|
return null;
|
|
1147
1147
|
}
|
|
1148
1148
|
return config;
|
|
1149
1149
|
}
|
|
1150
1150
|
function adapterFragment$9(luvio, config) {
|
|
1151
|
-
createResourceParams$
|
|
1152
|
-
return select$
|
|
1151
|
+
createResourceParams$f(config);
|
|
1152
|
+
return select$t();
|
|
1153
1153
|
}
|
|
1154
1154
|
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
1155
|
-
const snapshot = ingestSuccess$
|
|
1155
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
1156
1156
|
config,
|
|
1157
|
-
resolve: () => buildNetworkSnapshot$
|
|
1157
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
1158
1158
|
});
|
|
1159
1159
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1160
1160
|
}
|
|
1161
1161
|
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
1162
1162
|
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
1163
1163
|
config,
|
|
1164
|
-
resolve: () => buildNetworkSnapshot$
|
|
1164
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
1165
1165
|
});
|
|
1166
1166
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1167
1167
|
}
|
|
1168
|
-
function buildNetworkSnapshot$
|
|
1169
|
-
const resourceParams = createResourceParams$
|
|
1170
|
-
const request = createResourceRequest$
|
|
1168
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
1169
|
+
const resourceParams = createResourceParams$f(config);
|
|
1170
|
+
const request = createResourceRequest$f(resourceParams);
|
|
1171
1171
|
return luvio.dispatchResourceRequest(request, options)
|
|
1172
1172
|
.then((response) => {
|
|
1173
1173
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
1174
1174
|
const cache = new StoreKeyMap();
|
|
1175
|
-
getResponseCacheKeys$
|
|
1175
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
1176
1176
|
return cache;
|
|
1177
1177
|
});
|
|
1178
1178
|
}, (response) => {
|
|
@@ -1180,23 +1180,23 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
1182
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
1183
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1183
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$f, undefined, false);
|
|
1184
1184
|
}
|
|
1185
1185
|
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
1186
1186
|
const { luvio, config } = context;
|
|
1187
1187
|
const selector = {
|
|
1188
|
-
recordId: keyBuilder$
|
|
1188
|
+
recordId: keyBuilder$s(luvio, config),
|
|
1189
1189
|
node: adapterFragment$9(luvio, config),
|
|
1190
1190
|
variables: {},
|
|
1191
1191
|
};
|
|
1192
1192
|
const cacheSnapshot = storeLookup(selector, {
|
|
1193
1193
|
config,
|
|
1194
|
-
resolve: () => buildNetworkSnapshot$
|
|
1194
|
+
resolve: () => buildNetworkSnapshot$f(luvio, config, snapshotRefreshOptions)
|
|
1195
1195
|
});
|
|
1196
1196
|
return cacheSnapshot;
|
|
1197
1197
|
}
|
|
1198
1198
|
const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untrustedConfig, requestContext) {
|
|
1199
|
-
const config = validateAdapterConfig$
|
|
1199
|
+
const config = validateAdapterConfig$f(untrustedConfig, getApps_ConfigPropertyNames);
|
|
1200
1200
|
// Invalid or incomplete config
|
|
1201
1201
|
if (config === null) {
|
|
1202
1202
|
return null;
|
|
@@ -1266,14 +1266,14 @@ function validate$l(obj, path = 'AppResultRepresentation') {
|
|
|
1266
1266
|
return v_error === undefined ? null : v_error;
|
|
1267
1267
|
}
|
|
1268
1268
|
const RepresentationType$9 = 'AppResultRepresentation';
|
|
1269
|
-
function keyBuilder$
|
|
1269
|
+
function keyBuilder$r(luvio, config) {
|
|
1270
1270
|
return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
|
|
1271
1271
|
}
|
|
1272
1272
|
function keyBuilderFromType$7(luvio, object) {
|
|
1273
1273
|
const keyParams = {
|
|
1274
1274
|
id: object.app.id
|
|
1275
1275
|
};
|
|
1276
|
-
return keyBuilder$
|
|
1276
|
+
return keyBuilder$r(luvio, keyParams);
|
|
1277
1277
|
}
|
|
1278
1278
|
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1279
1279
|
const input_app = input.app;
|
|
@@ -1290,7 +1290,7 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1290
1290
|
}, luvio, store, timestamp);
|
|
1291
1291
|
return input;
|
|
1292
1292
|
}
|
|
1293
|
-
const select$
|
|
1293
|
+
const select$s = function AppResultRepresentationSelect() {
|
|
1294
1294
|
return {
|
|
1295
1295
|
kind: 'Fragment',
|
|
1296
1296
|
version: VERSION$f,
|
|
@@ -1299,7 +1299,7 @@ const select$r = function AppResultRepresentationSelect() {
|
|
|
1299
1299
|
{
|
|
1300
1300
|
name: 'app',
|
|
1301
1301
|
kind: 'Link',
|
|
1302
|
-
fragment: select$
|
|
1302
|
+
fragment: select$v()
|
|
1303
1303
|
},
|
|
1304
1304
|
{
|
|
1305
1305
|
name: 'failureMessage',
|
|
@@ -1368,19 +1368,19 @@ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1368
1368
|
getTypeCacheKeys$b(rootKeySet, luvio, input.app);
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
-
function select$
|
|
1372
|
-
return select$
|
|
1371
|
+
function select$r(luvio, params) {
|
|
1372
|
+
return select$s();
|
|
1373
1373
|
}
|
|
1374
|
-
function getResponseCacheKeys$
|
|
1374
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
1375
1375
|
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1376
1376
|
}
|
|
1377
|
-
function ingestSuccess$
|
|
1377
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
1378
1378
|
const { body } = response;
|
|
1379
1379
|
const key = keyBuilderFromType$7(luvio, body);
|
|
1380
1380
|
luvio.storeIngest(key, ingest$9, body);
|
|
1381
1381
|
const snapshot = luvio.storeLookup({
|
|
1382
1382
|
recordId: key,
|
|
1383
|
-
node: select$
|
|
1383
|
+
node: select$r(),
|
|
1384
1384
|
variables: {},
|
|
1385
1385
|
});
|
|
1386
1386
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1391,7 +1391,7 @@ function ingestSuccess$b(luvio, resourceParams, response) {
|
|
|
1391
1391
|
deepFreeze(snapshot.data);
|
|
1392
1392
|
return snapshot;
|
|
1393
1393
|
}
|
|
1394
|
-
function createResourceRequest$
|
|
1394
|
+
function createResourceRequest$e(config) {
|
|
1395
1395
|
const headers = {};
|
|
1396
1396
|
return {
|
|
1397
1397
|
baseUri: '/services/data/v63.0',
|
|
@@ -1405,7 +1405,7 @@ function createResourceRequest$c(config) {
|
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
|
-
const adapterName$
|
|
1408
|
+
const adapterName$e = 'createApp';
|
|
1409
1409
|
const createApp_ConfigPropertyMetadata = [
|
|
1410
1410
|
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1411
1411
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -1418,11 +1418,11 @@ const createApp_ConfigPropertyMetadata = [
|
|
|
1418
1418
|
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1419
1419
|
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1420
1420
|
];
|
|
1421
|
-
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1422
|
-
const createResourceParams$
|
|
1423
|
-
function typeCheckConfig$
|
|
1421
|
+
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, createApp_ConfigPropertyMetadata);
|
|
1422
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$g(createApp_ConfigPropertyMetadata);
|
|
1423
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
1424
1424
|
const config = {};
|
|
1425
|
-
typeCheckConfig$
|
|
1425
|
+
typeCheckConfig$g(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1426
1426
|
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1427
1427
|
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1428
1428
|
const untrustedConfig_templateValues_object = {};
|
|
@@ -1440,30 +1440,30 @@ function typeCheckConfig$c(untrustedConfig) {
|
|
|
1440
1440
|
}
|
|
1441
1441
|
return config;
|
|
1442
1442
|
}
|
|
1443
|
-
function validateAdapterConfig$
|
|
1443
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
1444
1444
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1445
1445
|
return null;
|
|
1446
1446
|
}
|
|
1447
1447
|
if (process.env.NODE_ENV !== 'production') {
|
|
1448
1448
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1449
1449
|
}
|
|
1450
|
-
const config = typeCheckConfig$
|
|
1450
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
1451
1451
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1452
1452
|
return null;
|
|
1453
1453
|
}
|
|
1454
1454
|
return config;
|
|
1455
1455
|
}
|
|
1456
|
-
function buildNetworkSnapshot$
|
|
1457
|
-
const resourceParams = createResourceParams$
|
|
1458
|
-
const request = createResourceRequest$
|
|
1456
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
1457
|
+
const resourceParams = createResourceParams$e(config);
|
|
1458
|
+
const request = createResourceRequest$e(resourceParams);
|
|
1459
1459
|
return luvio.dispatchResourceRequest(request, options)
|
|
1460
1460
|
.then((response) => {
|
|
1461
1461
|
return luvio.handleSuccessResponse(() => {
|
|
1462
|
-
const snapshot = ingestSuccess$
|
|
1462
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
1463
1463
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1464
1464
|
}, () => {
|
|
1465
1465
|
const cache = new StoreKeyMap();
|
|
1466
|
-
getResponseCacheKeys$
|
|
1466
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
1467
1467
|
return cache;
|
|
1468
1468
|
});
|
|
1469
1469
|
}, (response) => {
|
|
@@ -1473,33 +1473,33 @@ function buildNetworkSnapshot$c(luvio, config, options) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
const createAppAdapterFactory = (luvio) => {
|
|
1475
1475
|
return function createApp(untrustedConfig) {
|
|
1476
|
-
const config = validateAdapterConfig$
|
|
1476
|
+
const config = validateAdapterConfig$e(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1477
1477
|
// Invalid or incomplete config
|
|
1478
1478
|
if (config === null) {
|
|
1479
1479
|
throw new Error('Invalid config for "createApp"');
|
|
1480
1480
|
}
|
|
1481
|
-
return buildNetworkSnapshot$
|
|
1481
|
+
return buildNetworkSnapshot$e(luvio, config);
|
|
1482
1482
|
};
|
|
1483
1483
|
};
|
|
1484
1484
|
|
|
1485
|
-
function keyBuilder$
|
|
1486
|
-
return keyBuilder$
|
|
1485
|
+
function keyBuilder$q(luvio, params) {
|
|
1486
|
+
return keyBuilder$u(luvio, {
|
|
1487
1487
|
id: params.urlParams.appIdOrApiName
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
function getResponseCacheKeys$
|
|
1491
|
-
const key = keyBuilder$
|
|
1490
|
+
function getResponseCacheKeys$d(cacheKeyMap, luvio, resourceParams) {
|
|
1491
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
1492
1492
|
cacheKeyMap.set(key, {
|
|
1493
1493
|
namespace: keyPrefix,
|
|
1494
1494
|
representationName: RepresentationType$b,
|
|
1495
1495
|
mergeable: false
|
|
1496
1496
|
});
|
|
1497
1497
|
}
|
|
1498
|
-
function evictSuccess(luvio, resourceParams) {
|
|
1499
|
-
const key = keyBuilder$
|
|
1498
|
+
function evictSuccess$1(luvio, resourceParams) {
|
|
1499
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
1500
1500
|
luvio.storeEvict(key);
|
|
1501
1501
|
}
|
|
1502
|
-
function createResourceRequest$
|
|
1502
|
+
function createResourceRequest$d(config) {
|
|
1503
1503
|
const headers = {};
|
|
1504
1504
|
return {
|
|
1505
1505
|
baseUri: '/services/data/v63.0',
|
|
@@ -1513,41 +1513,41 @@ function createResourceRequest$b(config) {
|
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
const adapterName$
|
|
1516
|
+
const adapterName$d = 'deleteApp';
|
|
1517
1517
|
const deleteApp_ConfigPropertyMetadata = [
|
|
1518
1518
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1519
1519
|
];
|
|
1520
|
-
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1521
|
-
const createResourceParams$
|
|
1522
|
-
function typeCheckConfig$
|
|
1520
|
+
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, deleteApp_ConfigPropertyMetadata);
|
|
1521
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$g(deleteApp_ConfigPropertyMetadata);
|
|
1522
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
1523
1523
|
const config = {};
|
|
1524
|
-
typeCheckConfig$
|
|
1524
|
+
typeCheckConfig$g(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1525
1525
|
return config;
|
|
1526
1526
|
}
|
|
1527
|
-
function validateAdapterConfig$
|
|
1527
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
1528
1528
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1529
1529
|
return null;
|
|
1530
1530
|
}
|
|
1531
1531
|
if (process.env.NODE_ENV !== 'production') {
|
|
1532
1532
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1533
1533
|
}
|
|
1534
|
-
const config = typeCheckConfig$
|
|
1534
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
1535
1535
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1536
1536
|
return null;
|
|
1537
1537
|
}
|
|
1538
1538
|
return config;
|
|
1539
1539
|
}
|
|
1540
|
-
function buildNetworkSnapshot$
|
|
1541
|
-
const resourceParams = createResourceParams$
|
|
1542
|
-
const request = createResourceRequest$
|
|
1540
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
1541
|
+
const resourceParams = createResourceParams$d(config);
|
|
1542
|
+
const request = createResourceRequest$d(resourceParams);
|
|
1543
1543
|
return luvio.dispatchResourceRequest(request, options)
|
|
1544
1544
|
.then(() => {
|
|
1545
1545
|
return luvio.handleSuccessResponse(() => {
|
|
1546
|
-
evictSuccess(luvio, resourceParams);
|
|
1546
|
+
evictSuccess$1(luvio, resourceParams);
|
|
1547
1547
|
return luvio.storeBroadcast();
|
|
1548
1548
|
}, () => {
|
|
1549
1549
|
const cache = new StoreKeyMap();
|
|
1550
|
-
getResponseCacheKeys$
|
|
1550
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams);
|
|
1551
1551
|
return cache;
|
|
1552
1552
|
});
|
|
1553
1553
|
}, (response) => {
|
|
@@ -1557,33 +1557,33 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
const deleteAppAdapterFactory = (luvio) => {
|
|
1559
1559
|
return function AppFrameworkdeleteApp(untrustedConfig) {
|
|
1560
|
-
const config = validateAdapterConfig$
|
|
1560
|
+
const config = validateAdapterConfig$d(untrustedConfig, deleteApp_ConfigPropertyNames);
|
|
1561
1561
|
// Invalid or incomplete config
|
|
1562
1562
|
if (config === null) {
|
|
1563
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1563
|
+
throw new Error(`Invalid config for "${adapterName$d}"`);
|
|
1564
1564
|
}
|
|
1565
|
-
return buildNetworkSnapshot$
|
|
1565
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
1566
1566
|
};
|
|
1567
1567
|
};
|
|
1568
1568
|
|
|
1569
|
-
function select$
|
|
1570
|
-
return select$
|
|
1569
|
+
function select$q(luvio, params) {
|
|
1570
|
+
return select$v();
|
|
1571
1571
|
}
|
|
1572
|
-
function keyBuilder$
|
|
1573
|
-
return keyBuilder$
|
|
1572
|
+
function keyBuilder$p(luvio, params) {
|
|
1573
|
+
return keyBuilder$u(luvio, {
|
|
1574
1574
|
id: params.urlParams.appIdOrApiName
|
|
1575
1575
|
});
|
|
1576
1576
|
}
|
|
1577
|
-
function getResponseCacheKeys$
|
|
1577
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
1578
1578
|
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
1579
1579
|
}
|
|
1580
|
-
function ingestSuccess$
|
|
1580
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
1581
1581
|
const { body } = response;
|
|
1582
|
-
const key = keyBuilder$
|
|
1582
|
+
const key = keyBuilder$p(luvio, resourceParams);
|
|
1583
1583
|
luvio.storeIngest(key, ingest$b, body);
|
|
1584
1584
|
const snapshot = luvio.storeLookup({
|
|
1585
1585
|
recordId: key,
|
|
1586
|
-
node: select$
|
|
1586
|
+
node: select$q(),
|
|
1587
1587
|
variables: {},
|
|
1588
1588
|
}, snapshotRefresh);
|
|
1589
1589
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1595,7 +1595,7 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1595
1595
|
return snapshot;
|
|
1596
1596
|
}
|
|
1597
1597
|
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
1598
|
-
const key = keyBuilder$
|
|
1598
|
+
const key = keyBuilder$p(luvio, params);
|
|
1599
1599
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1600
1600
|
const storeMetadataParams = {
|
|
1601
1601
|
ttl: TTL$b,
|
|
@@ -1606,7 +1606,7 @@ function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
|
1606
1606
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1607
1607
|
return errorSnapshot;
|
|
1608
1608
|
}
|
|
1609
|
-
function createResourceRequest$
|
|
1609
|
+
function createResourceRequest$c(config) {
|
|
1610
1610
|
const headers = {};
|
|
1611
1611
|
return {
|
|
1612
1612
|
baseUri: '/services/data/v63.0',
|
|
@@ -1620,60 +1620,60 @@ function createResourceRequest$a(config) {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
}
|
|
1622
1622
|
|
|
1623
|
-
const adapterName$
|
|
1623
|
+
const adapterName$c = 'getApp';
|
|
1624
1624
|
const getApp_ConfigPropertyMetadata = [
|
|
1625
1625
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1626
1626
|
];
|
|
1627
|
-
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1628
|
-
const createResourceParams$
|
|
1629
|
-
function keyBuilder$
|
|
1630
|
-
const resourceParams = createResourceParams$
|
|
1631
|
-
return keyBuilder$
|
|
1627
|
+
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getApp_ConfigPropertyMetadata);
|
|
1628
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$g(getApp_ConfigPropertyMetadata);
|
|
1629
|
+
function keyBuilder$o(luvio, config) {
|
|
1630
|
+
const resourceParams = createResourceParams$c(config);
|
|
1631
|
+
return keyBuilder$p(luvio, resourceParams);
|
|
1632
1632
|
}
|
|
1633
|
-
function typeCheckConfig$
|
|
1633
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
1634
1634
|
const config = {};
|
|
1635
|
-
typeCheckConfig$
|
|
1635
|
+
typeCheckConfig$g(untrustedConfig, config, getApp_ConfigPropertyMetadata);
|
|
1636
1636
|
return config;
|
|
1637
1637
|
}
|
|
1638
|
-
function validateAdapterConfig$
|
|
1638
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
1639
1639
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1640
1640
|
return null;
|
|
1641
1641
|
}
|
|
1642
1642
|
if (process.env.NODE_ENV !== 'production') {
|
|
1643
1643
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1644
1644
|
}
|
|
1645
|
-
const config = typeCheckConfig$
|
|
1645
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
1646
1646
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1647
1647
|
return null;
|
|
1648
1648
|
}
|
|
1649
1649
|
return config;
|
|
1650
1650
|
}
|
|
1651
1651
|
function adapterFragment$8(luvio, config) {
|
|
1652
|
-
createResourceParams$
|
|
1653
|
-
return select$
|
|
1652
|
+
createResourceParams$c(config);
|
|
1653
|
+
return select$q();
|
|
1654
1654
|
}
|
|
1655
1655
|
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1656
|
-
const snapshot = ingestSuccess$
|
|
1656
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
1657
1657
|
config,
|
|
1658
|
-
resolve: () => buildNetworkSnapshot$
|
|
1658
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
1659
1659
|
});
|
|
1660
1660
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1661
1661
|
}
|
|
1662
1662
|
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
1663
1663
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1664
1664
|
config,
|
|
1665
|
-
resolve: () => buildNetworkSnapshot$
|
|
1665
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
1666
1666
|
});
|
|
1667
1667
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1668
1668
|
}
|
|
1669
|
-
function buildNetworkSnapshot$
|
|
1670
|
-
const resourceParams = createResourceParams$
|
|
1671
|
-
const request = createResourceRequest$
|
|
1669
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
1670
|
+
const resourceParams = createResourceParams$c(config);
|
|
1671
|
+
const request = createResourceRequest$c(resourceParams);
|
|
1672
1672
|
return luvio.dispatchResourceRequest(request, options)
|
|
1673
1673
|
.then((response) => {
|
|
1674
1674
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
1675
1675
|
const cache = new StoreKeyMap();
|
|
1676
|
-
getResponseCacheKeys$
|
|
1676
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
1677
1677
|
return cache;
|
|
1678
1678
|
});
|
|
1679
1679
|
}, (response) => {
|
|
@@ -1681,23 +1681,23 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
1681
1681
|
});
|
|
1682
1682
|
}
|
|
1683
1683
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
1684
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1684
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
1685
1685
|
}
|
|
1686
1686
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1687
1687
|
const { luvio, config } = context;
|
|
1688
1688
|
const selector = {
|
|
1689
|
-
recordId: keyBuilder$
|
|
1689
|
+
recordId: keyBuilder$o(luvio, config),
|
|
1690
1690
|
node: adapterFragment$8(luvio, config),
|
|
1691
1691
|
variables: {},
|
|
1692
1692
|
};
|
|
1693
1693
|
const cacheSnapshot = storeLookup(selector, {
|
|
1694
1694
|
config,
|
|
1695
|
-
resolve: () => buildNetworkSnapshot$
|
|
1695
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
1696
1696
|
});
|
|
1697
1697
|
return cacheSnapshot;
|
|
1698
1698
|
}
|
|
1699
1699
|
const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedConfig, requestContext) {
|
|
1700
|
-
const config = validateAdapterConfig$
|
|
1700
|
+
const config = validateAdapterConfig$c(untrustedConfig, getApp_ConfigPropertyNames);
|
|
1701
1701
|
// Invalid or incomplete config
|
|
1702
1702
|
if (config === null) {
|
|
1703
1703
|
return null;
|
|
@@ -1751,7 +1751,7 @@ function validate$k(obj, path = 'AppActivityItemRepresentation') {
|
|
|
1751
1751
|
return v_error === undefined ? null : v_error;
|
|
1752
1752
|
}
|
|
1753
1753
|
const RepresentationType$8 = 'AppActivityItemRepresentation';
|
|
1754
|
-
function keyBuilder$
|
|
1754
|
+
function keyBuilder$n(luvio, config) {
|
|
1755
1755
|
return keyPrefix + '::' + RepresentationType$8 + ':' + config.appId + ':' + config.id;
|
|
1756
1756
|
}
|
|
1757
1757
|
function keyBuilderFromType$6(luvio, object) {
|
|
@@ -1759,12 +1759,12 @@ function keyBuilderFromType$6(luvio, object) {
|
|
|
1759
1759
|
appId: object.appId,
|
|
1760
1760
|
id: object.id
|
|
1761
1761
|
};
|
|
1762
|
-
return keyBuilder$
|
|
1762
|
+
return keyBuilder$n(luvio, keyParams);
|
|
1763
1763
|
}
|
|
1764
1764
|
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1765
1765
|
return input;
|
|
1766
1766
|
}
|
|
1767
|
-
const select$
|
|
1767
|
+
const select$p = function AppActivityItemRepresentationSelect() {
|
|
1768
1768
|
return {
|
|
1769
1769
|
kind: 'Fragment',
|
|
1770
1770
|
version: VERSION$e,
|
|
@@ -1877,14 +1877,14 @@ function validate$j(obj, path = 'AppActivityCollectionRepresentation') {
|
|
|
1877
1877
|
return v_error === undefined ? null : v_error;
|
|
1878
1878
|
}
|
|
1879
1879
|
const RepresentationType$7 = 'AppActivityCollectionRepresentation';
|
|
1880
|
-
function keyBuilder$
|
|
1880
|
+
function keyBuilder$m(luvio, config) {
|
|
1881
1881
|
return keyPrefix + '::' + RepresentationType$7 + ':' + config.appId;
|
|
1882
1882
|
}
|
|
1883
1883
|
function keyBuilderFromType$5(luvio, object) {
|
|
1884
1884
|
const keyParams = {
|
|
1885
1885
|
appId: object.appId
|
|
1886
1886
|
};
|
|
1887
|
-
return keyBuilder$
|
|
1887
|
+
return keyBuilder$m(luvio, keyParams);
|
|
1888
1888
|
}
|
|
1889
1889
|
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1890
1890
|
const input_items = input.items;
|
|
@@ -1905,7 +1905,7 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
return input;
|
|
1907
1907
|
}
|
|
1908
|
-
const select$
|
|
1908
|
+
const select$o = function AppActivityCollectionRepresentationSelect() {
|
|
1909
1909
|
return {
|
|
1910
1910
|
kind: 'Fragment',
|
|
1911
1911
|
version: VERSION$d,
|
|
@@ -1919,7 +1919,7 @@ const select$n = function AppActivityCollectionRepresentationSelect() {
|
|
|
1919
1919
|
name: 'items',
|
|
1920
1920
|
kind: 'Link',
|
|
1921
1921
|
plural: true,
|
|
1922
|
-
fragment: select$
|
|
1922
|
+
fragment: select$p()
|
|
1923
1923
|
}
|
|
1924
1924
|
]
|
|
1925
1925
|
};
|
|
@@ -1968,24 +1968,24 @@ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
1970
|
|
|
1971
|
-
function select$
|
|
1972
|
-
return select$
|
|
1971
|
+
function select$n(luvio, params) {
|
|
1972
|
+
return select$o();
|
|
1973
1973
|
}
|
|
1974
|
-
function keyBuilder$
|
|
1975
|
-
return keyBuilder$
|
|
1974
|
+
function keyBuilder$l(luvio, params) {
|
|
1975
|
+
return keyBuilder$m(luvio, {
|
|
1976
1976
|
appId: params.urlParams.appIdOrApiName
|
|
1977
1977
|
});
|
|
1978
1978
|
}
|
|
1979
|
-
function getResponseCacheKeys$
|
|
1979
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
1980
1980
|
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1981
1981
|
}
|
|
1982
|
-
function ingestSuccess$
|
|
1982
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
1983
1983
|
const { body } = response;
|
|
1984
|
-
const key = keyBuilder$
|
|
1984
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
1985
1985
|
luvio.storeIngest(key, ingest$7, body);
|
|
1986
1986
|
const snapshot = luvio.storeLookup({
|
|
1987
1987
|
recordId: key,
|
|
1988
|
-
node: select$
|
|
1988
|
+
node: select$n(),
|
|
1989
1989
|
variables: {},
|
|
1990
1990
|
}, snapshotRefresh);
|
|
1991
1991
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1997,7 +1997,7 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1997
1997
|
return snapshot;
|
|
1998
1998
|
}
|
|
1999
1999
|
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
2000
|
-
const key = keyBuilder$
|
|
2000
|
+
const key = keyBuilder$l(luvio, params);
|
|
2001
2001
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2002
2002
|
const storeMetadataParams = {
|
|
2003
2003
|
ttl: TTL$7,
|
|
@@ -2008,7 +2008,7 @@ function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
|
2008
2008
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2009
2009
|
return errorSnapshot;
|
|
2010
2010
|
}
|
|
2011
|
-
function createResourceRequest$
|
|
2011
|
+
function createResourceRequest$b(config) {
|
|
2012
2012
|
const headers = {};
|
|
2013
2013
|
return {
|
|
2014
2014
|
baseUri: '/services/data/v63.0',
|
|
@@ -2022,60 +2022,60 @@ function createResourceRequest$9(config) {
|
|
|
2022
2022
|
};
|
|
2023
2023
|
}
|
|
2024
2024
|
|
|
2025
|
-
const adapterName$
|
|
2025
|
+
const adapterName$b = 'getAppActivities';
|
|
2026
2026
|
const getAppActivities_ConfigPropertyMetadata = [
|
|
2027
2027
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2028
2028
|
];
|
|
2029
|
-
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2030
|
-
const createResourceParams$
|
|
2031
|
-
function keyBuilder$
|
|
2032
|
-
const resourceParams = createResourceParams$
|
|
2033
|
-
return keyBuilder$
|
|
2029
|
+
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getAppActivities_ConfigPropertyMetadata);
|
|
2030
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$g(getAppActivities_ConfigPropertyMetadata);
|
|
2031
|
+
function keyBuilder$k(luvio, config) {
|
|
2032
|
+
const resourceParams = createResourceParams$b(config);
|
|
2033
|
+
return keyBuilder$l(luvio, resourceParams);
|
|
2034
2034
|
}
|
|
2035
|
-
function typeCheckConfig$
|
|
2035
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
2036
2036
|
const config = {};
|
|
2037
|
-
typeCheckConfig$
|
|
2037
|
+
typeCheckConfig$g(untrustedConfig, config, getAppActivities_ConfigPropertyMetadata);
|
|
2038
2038
|
return config;
|
|
2039
2039
|
}
|
|
2040
|
-
function validateAdapterConfig$
|
|
2040
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
2041
2041
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2042
2042
|
return null;
|
|
2043
2043
|
}
|
|
2044
2044
|
if (process.env.NODE_ENV !== 'production') {
|
|
2045
2045
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2046
2046
|
}
|
|
2047
|
-
const config = typeCheckConfig$
|
|
2047
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
2048
2048
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2049
2049
|
return null;
|
|
2050
2050
|
}
|
|
2051
2051
|
return config;
|
|
2052
2052
|
}
|
|
2053
2053
|
function adapterFragment$7(luvio, config) {
|
|
2054
|
-
createResourceParams$
|
|
2055
|
-
return select$
|
|
2054
|
+
createResourceParams$b(config);
|
|
2055
|
+
return select$n();
|
|
2056
2056
|
}
|
|
2057
2057
|
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
2058
|
-
const snapshot = ingestSuccess$
|
|
2058
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
2059
2059
|
config,
|
|
2060
|
-
resolve: () => buildNetworkSnapshot$
|
|
2060
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2061
2061
|
});
|
|
2062
2062
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2063
2063
|
}
|
|
2064
2064
|
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
2065
2065
|
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
2066
2066
|
config,
|
|
2067
|
-
resolve: () => buildNetworkSnapshot$
|
|
2067
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2068
2068
|
});
|
|
2069
2069
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2070
2070
|
}
|
|
2071
|
-
function buildNetworkSnapshot$
|
|
2072
|
-
const resourceParams = createResourceParams$
|
|
2073
|
-
const request = createResourceRequest$
|
|
2071
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
2072
|
+
const resourceParams = createResourceParams$b(config);
|
|
2073
|
+
const request = createResourceRequest$b(resourceParams);
|
|
2074
2074
|
return luvio.dispatchResourceRequest(request, options)
|
|
2075
2075
|
.then((response) => {
|
|
2076
2076
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
2077
2077
|
const cache = new StoreKeyMap();
|
|
2078
|
-
getResponseCacheKeys$
|
|
2078
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
2079
2079
|
return cache;
|
|
2080
2080
|
});
|
|
2081
2081
|
}, (response) => {
|
|
@@ -2083,23 +2083,23 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
2083
2083
|
});
|
|
2084
2084
|
}
|
|
2085
2085
|
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
2086
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2086
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
2087
2087
|
}
|
|
2088
2088
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
2089
2089
|
const { luvio, config } = context;
|
|
2090
2090
|
const selector = {
|
|
2091
|
-
recordId: keyBuilder$
|
|
2091
|
+
recordId: keyBuilder$k(luvio, config),
|
|
2092
2092
|
node: adapterFragment$7(luvio, config),
|
|
2093
2093
|
variables: {},
|
|
2094
2094
|
};
|
|
2095
2095
|
const cacheSnapshot = storeLookup(selector, {
|
|
2096
2096
|
config,
|
|
2097
|
-
resolve: () => buildNetworkSnapshot$
|
|
2097
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2098
2098
|
});
|
|
2099
2099
|
return cacheSnapshot;
|
|
2100
2100
|
}
|
|
2101
2101
|
const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppActivities(untrustedConfig, requestContext) {
|
|
2102
|
-
const config = validateAdapterConfig$
|
|
2102
|
+
const config = validateAdapterConfig$b(untrustedConfig, getAppActivities_ConfigPropertyNames);
|
|
2103
2103
|
// Invalid or incomplete config
|
|
2104
2104
|
if (config === null) {
|
|
2105
2105
|
return null;
|
|
@@ -2108,25 +2108,25 @@ const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppA
|
|
|
2108
2108
|
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
2109
2109
|
};
|
|
2110
2110
|
|
|
2111
|
-
function select$
|
|
2112
|
-
return select$
|
|
2111
|
+
function select$m(luvio, params) {
|
|
2112
|
+
return select$p();
|
|
2113
2113
|
}
|
|
2114
|
-
function keyBuilder$
|
|
2115
|
-
return keyBuilder$
|
|
2114
|
+
function keyBuilder$j(luvio, params) {
|
|
2115
|
+
return keyBuilder$n(luvio, {
|
|
2116
2116
|
appId: params.urlParams.appIdOrApiName,
|
|
2117
2117
|
id: params.urlParams.id
|
|
2118
2118
|
});
|
|
2119
2119
|
}
|
|
2120
|
-
function getResponseCacheKeys$
|
|
2120
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
2121
2121
|
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
2122
2122
|
}
|
|
2123
|
-
function ingestSuccess$
|
|
2123
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
2124
2124
|
const { body } = response;
|
|
2125
|
-
const key = keyBuilder$
|
|
2125
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
2126
2126
|
luvio.storeIngest(key, ingest$8, body);
|
|
2127
2127
|
const snapshot = luvio.storeLookup({
|
|
2128
2128
|
recordId: key,
|
|
2129
|
-
node: select$
|
|
2129
|
+
node: select$m(),
|
|
2130
2130
|
variables: {},
|
|
2131
2131
|
}, snapshotRefresh);
|
|
2132
2132
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2138,7 +2138,7 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2138
2138
|
return snapshot;
|
|
2139
2139
|
}
|
|
2140
2140
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
2141
|
-
const key = keyBuilder$
|
|
2141
|
+
const key = keyBuilder$j(luvio, params);
|
|
2142
2142
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2143
2143
|
const storeMetadataParams = {
|
|
2144
2144
|
ttl: TTL$8,
|
|
@@ -2149,7 +2149,7 @@ function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
|
2149
2149
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2150
2150
|
return errorSnapshot;
|
|
2151
2151
|
}
|
|
2152
|
-
function createResourceRequest$
|
|
2152
|
+
function createResourceRequest$a(config) {
|
|
2153
2153
|
const headers = {};
|
|
2154
2154
|
return {
|
|
2155
2155
|
baseUri: '/services/data/v63.0',
|
|
@@ -2163,61 +2163,61 @@ function createResourceRequest$8(config) {
|
|
|
2163
2163
|
};
|
|
2164
2164
|
}
|
|
2165
2165
|
|
|
2166
|
-
const adapterName$
|
|
2166
|
+
const adapterName$a = 'getAppActivity';
|
|
2167
2167
|
const getAppActivity_ConfigPropertyMetadata = [
|
|
2168
2168
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2169
2169
|
generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2170
2170
|
];
|
|
2171
|
-
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2172
|
-
const createResourceParams$
|
|
2173
|
-
function keyBuilder$
|
|
2174
|
-
const resourceParams = createResourceParams$
|
|
2175
|
-
return keyBuilder$
|
|
2171
|
+
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getAppActivity_ConfigPropertyMetadata);
|
|
2172
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$g(getAppActivity_ConfigPropertyMetadata);
|
|
2173
|
+
function keyBuilder$i(luvio, config) {
|
|
2174
|
+
const resourceParams = createResourceParams$a(config);
|
|
2175
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
2176
2176
|
}
|
|
2177
|
-
function typeCheckConfig$
|
|
2177
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
2178
2178
|
const config = {};
|
|
2179
|
-
typeCheckConfig$
|
|
2179
|
+
typeCheckConfig$g(untrustedConfig, config, getAppActivity_ConfigPropertyMetadata);
|
|
2180
2180
|
return config;
|
|
2181
2181
|
}
|
|
2182
|
-
function validateAdapterConfig$
|
|
2182
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
2183
2183
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2184
2184
|
return null;
|
|
2185
2185
|
}
|
|
2186
2186
|
if (process.env.NODE_ENV !== 'production') {
|
|
2187
2187
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2188
2188
|
}
|
|
2189
|
-
const config = typeCheckConfig$
|
|
2189
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
2190
2190
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2191
2191
|
return null;
|
|
2192
2192
|
}
|
|
2193
2193
|
return config;
|
|
2194
2194
|
}
|
|
2195
2195
|
function adapterFragment$6(luvio, config) {
|
|
2196
|
-
createResourceParams$
|
|
2197
|
-
return select$
|
|
2196
|
+
createResourceParams$a(config);
|
|
2197
|
+
return select$m();
|
|
2198
2198
|
}
|
|
2199
2199
|
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
2200
|
-
const snapshot = ingestSuccess$
|
|
2200
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
2201
2201
|
config,
|
|
2202
|
-
resolve: () => buildNetworkSnapshot$
|
|
2202
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
2203
2203
|
});
|
|
2204
2204
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2205
2205
|
}
|
|
2206
2206
|
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
2207
2207
|
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
2208
2208
|
config,
|
|
2209
|
-
resolve: () => buildNetworkSnapshot$
|
|
2209
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
2210
2210
|
});
|
|
2211
2211
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2212
2212
|
}
|
|
2213
|
-
function buildNetworkSnapshot$
|
|
2214
|
-
const resourceParams = createResourceParams$
|
|
2215
|
-
const request = createResourceRequest$
|
|
2213
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
2214
|
+
const resourceParams = createResourceParams$a(config);
|
|
2215
|
+
const request = createResourceRequest$a(resourceParams);
|
|
2216
2216
|
return luvio.dispatchResourceRequest(request, options)
|
|
2217
2217
|
.then((response) => {
|
|
2218
2218
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
2219
2219
|
const cache = new StoreKeyMap();
|
|
2220
|
-
getResponseCacheKeys$
|
|
2220
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
2221
2221
|
return cache;
|
|
2222
2222
|
});
|
|
2223
2223
|
}, (response) => {
|
|
@@ -2225,23 +2225,23 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
2225
2225
|
});
|
|
2226
2226
|
}
|
|
2227
2227
|
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
2228
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2228
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
2229
2229
|
}
|
|
2230
2230
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
2231
2231
|
const { luvio, config } = context;
|
|
2232
2232
|
const selector = {
|
|
2233
|
-
recordId: keyBuilder$
|
|
2233
|
+
recordId: keyBuilder$i(luvio, config),
|
|
2234
2234
|
node: adapterFragment$6(luvio, config),
|
|
2235
2235
|
variables: {},
|
|
2236
2236
|
};
|
|
2237
2237
|
const cacheSnapshot = storeLookup(selector, {
|
|
2238
2238
|
config,
|
|
2239
|
-
resolve: () => buildNetworkSnapshot$
|
|
2239
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
2240
2240
|
});
|
|
2241
2241
|
return cacheSnapshot;
|
|
2242
2242
|
}
|
|
2243
2243
|
const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppActivity(untrustedConfig, requestContext) {
|
|
2244
|
-
const config = validateAdapterConfig$
|
|
2244
|
+
const config = validateAdapterConfig$a(untrustedConfig, getAppActivity_ConfigPropertyNames);
|
|
2245
2245
|
// Invalid or incomplete config
|
|
2246
2246
|
if (config === null) {
|
|
2247
2247
|
return null;
|
|
@@ -2406,19 +2406,19 @@ function validate$i(obj, path = 'AssetRepresentation') {
|
|
|
2406
2406
|
return v_error === undefined ? null : v_error;
|
|
2407
2407
|
}
|
|
2408
2408
|
const RepresentationType$6 = 'AssetRepresentation';
|
|
2409
|
-
function keyBuilder$
|
|
2409
|
+
function keyBuilder$h(luvio, config) {
|
|
2410
2410
|
return keyPrefix + '::' + RepresentationType$6 + ':' + config.id;
|
|
2411
2411
|
}
|
|
2412
2412
|
function keyBuilderFromType$4(luvio, object) {
|
|
2413
2413
|
const keyParams = {
|
|
2414
2414
|
id: object.id
|
|
2415
2415
|
};
|
|
2416
|
-
return keyBuilder$
|
|
2416
|
+
return keyBuilder$h(luvio, keyParams);
|
|
2417
2417
|
}
|
|
2418
2418
|
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2419
2419
|
return input;
|
|
2420
2420
|
}
|
|
2421
|
-
const select$
|
|
2421
|
+
const select$l = function AssetRepresentationSelect() {
|
|
2422
2422
|
return {
|
|
2423
2423
|
kind: 'Fragment',
|
|
2424
2424
|
version: VERSION$c,
|
|
@@ -2552,14 +2552,14 @@ function validate$h(obj, path = 'AssetCollectionRepresentation') {
|
|
|
2552
2552
|
return v_error === undefined ? null : v_error;
|
|
2553
2553
|
}
|
|
2554
2554
|
const RepresentationType$5 = 'AssetCollectionRepresentation';
|
|
2555
|
-
function keyBuilder$
|
|
2555
|
+
function keyBuilder$g(luvio, config) {
|
|
2556
2556
|
return keyPrefix + '::' + RepresentationType$5 + ':' + config.appId;
|
|
2557
2557
|
}
|
|
2558
2558
|
function keyBuilderFromType$3(luvio, object) {
|
|
2559
2559
|
const keyParams = {
|
|
2560
2560
|
appId: object.appId
|
|
2561
2561
|
};
|
|
2562
|
-
return keyBuilder$
|
|
2562
|
+
return keyBuilder$g(luvio, keyParams);
|
|
2563
2563
|
}
|
|
2564
2564
|
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2565
2565
|
const input_assets = input.assets;
|
|
@@ -2580,7 +2580,7 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
return input;
|
|
2582
2582
|
}
|
|
2583
|
-
const select$
|
|
2583
|
+
const select$k = function AssetCollectionRepresentationSelect() {
|
|
2584
2584
|
return {
|
|
2585
2585
|
kind: 'Fragment',
|
|
2586
2586
|
version: VERSION$b,
|
|
@@ -2594,7 +2594,7 @@ const select$j = function AssetCollectionRepresentationSelect() {
|
|
|
2594
2594
|
name: 'assets',
|
|
2595
2595
|
kind: 'Link',
|
|
2596
2596
|
plural: true,
|
|
2597
|
-
fragment: select$
|
|
2597
|
+
fragment: select$l()
|
|
2598
2598
|
}
|
|
2599
2599
|
]
|
|
2600
2600
|
};
|
|
@@ -2643,24 +2643,24 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
2645
2645
|
|
|
2646
|
-
function select$
|
|
2647
|
-
return select$
|
|
2646
|
+
function select$j(luvio, params) {
|
|
2647
|
+
return select$k();
|
|
2648
2648
|
}
|
|
2649
|
-
function keyBuilder$
|
|
2650
|
-
return keyBuilder$
|
|
2649
|
+
function keyBuilder$f(luvio, params) {
|
|
2650
|
+
return keyBuilder$g(luvio, {
|
|
2651
2651
|
appId: params.urlParams.appIdOrApiName
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
2654
|
-
function getResponseCacheKeys$
|
|
2654
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
2655
2655
|
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
2656
2656
|
}
|
|
2657
|
-
function ingestSuccess$
|
|
2657
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
2658
2658
|
const { body } = response;
|
|
2659
|
-
const key = keyBuilder$
|
|
2659
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
2660
2660
|
luvio.storeIngest(key, ingest$5, body);
|
|
2661
2661
|
const snapshot = luvio.storeLookup({
|
|
2662
2662
|
recordId: key,
|
|
2663
|
-
node: select$
|
|
2663
|
+
node: select$j(),
|
|
2664
2664
|
variables: {},
|
|
2665
2665
|
}, snapshotRefresh);
|
|
2666
2666
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2672,7 +2672,7 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2672
2672
|
return snapshot;
|
|
2673
2673
|
}
|
|
2674
2674
|
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
2675
|
-
const key = keyBuilder$
|
|
2675
|
+
const key = keyBuilder$f(luvio, params);
|
|
2676
2676
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2677
2677
|
const storeMetadataParams = {
|
|
2678
2678
|
ttl: TTL$5,
|
|
@@ -2683,7 +2683,7 @@ function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
|
2683
2683
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2684
2684
|
return errorSnapshot;
|
|
2685
2685
|
}
|
|
2686
|
-
function createResourceRequest$
|
|
2686
|
+
function createResourceRequest$9(config) {
|
|
2687
2687
|
const headers = {};
|
|
2688
2688
|
return {
|
|
2689
2689
|
baseUri: '/services/data/v63.0',
|
|
@@ -2697,62 +2697,62 @@ function createResourceRequest$7(config) {
|
|
|
2697
2697
|
};
|
|
2698
2698
|
}
|
|
2699
2699
|
|
|
2700
|
-
const adapterName$
|
|
2700
|
+
const adapterName$9 = 'getAppAssets';
|
|
2701
2701
|
const getAppAssets_ConfigPropertyMetadata = [
|
|
2702
2702
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2703
2703
|
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2704
2704
|
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2705
2705
|
];
|
|
2706
|
-
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2707
|
-
const createResourceParams$
|
|
2708
|
-
function keyBuilder$
|
|
2709
|
-
const resourceParams = createResourceParams$
|
|
2710
|
-
return keyBuilder$
|
|
2706
|
+
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getAppAssets_ConfigPropertyMetadata);
|
|
2707
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$g(getAppAssets_ConfigPropertyMetadata);
|
|
2708
|
+
function keyBuilder$e(luvio, config) {
|
|
2709
|
+
const resourceParams = createResourceParams$9(config);
|
|
2710
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
2711
2711
|
}
|
|
2712
|
-
function typeCheckConfig$
|
|
2712
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
2713
2713
|
const config = {};
|
|
2714
|
-
typeCheckConfig$
|
|
2714
|
+
typeCheckConfig$g(untrustedConfig, config, getAppAssets_ConfigPropertyMetadata);
|
|
2715
2715
|
return config;
|
|
2716
2716
|
}
|
|
2717
|
-
function validateAdapterConfig$
|
|
2717
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
2718
2718
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2719
2719
|
return null;
|
|
2720
2720
|
}
|
|
2721
2721
|
if (process.env.NODE_ENV !== 'production') {
|
|
2722
2722
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2723
2723
|
}
|
|
2724
|
-
const config = typeCheckConfig$
|
|
2724
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
2725
2725
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2726
2726
|
return null;
|
|
2727
2727
|
}
|
|
2728
2728
|
return config;
|
|
2729
2729
|
}
|
|
2730
2730
|
function adapterFragment$5(luvio, config) {
|
|
2731
|
-
createResourceParams$
|
|
2732
|
-
return select$
|
|
2731
|
+
createResourceParams$9(config);
|
|
2732
|
+
return select$j();
|
|
2733
2733
|
}
|
|
2734
2734
|
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2735
|
-
const snapshot = ingestSuccess$
|
|
2735
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
2736
2736
|
config,
|
|
2737
|
-
resolve: () => buildNetworkSnapshot$
|
|
2737
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
2738
2738
|
});
|
|
2739
2739
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2740
2740
|
}
|
|
2741
2741
|
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
2742
2742
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
2743
2743
|
config,
|
|
2744
|
-
resolve: () => buildNetworkSnapshot$
|
|
2744
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
2745
2745
|
});
|
|
2746
2746
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2747
2747
|
}
|
|
2748
|
-
function buildNetworkSnapshot$
|
|
2749
|
-
const resourceParams = createResourceParams$
|
|
2750
|
-
const request = createResourceRequest$
|
|
2748
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
2749
|
+
const resourceParams = createResourceParams$9(config);
|
|
2750
|
+
const request = createResourceRequest$9(resourceParams);
|
|
2751
2751
|
return luvio.dispatchResourceRequest(request, options)
|
|
2752
2752
|
.then((response) => {
|
|
2753
2753
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
2754
2754
|
const cache = new StoreKeyMap();
|
|
2755
|
-
getResponseCacheKeys$
|
|
2755
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
2756
2756
|
return cache;
|
|
2757
2757
|
});
|
|
2758
2758
|
}, (response) => {
|
|
@@ -2760,23 +2760,23 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
2760
2760
|
});
|
|
2761
2761
|
}
|
|
2762
2762
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
2763
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2763
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
2764
2764
|
}
|
|
2765
2765
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
2766
2766
|
const { luvio, config } = context;
|
|
2767
2767
|
const selector = {
|
|
2768
|
-
recordId: keyBuilder$
|
|
2768
|
+
recordId: keyBuilder$e(luvio, config),
|
|
2769
2769
|
node: adapterFragment$5(luvio, config),
|
|
2770
2770
|
variables: {},
|
|
2771
2771
|
};
|
|
2772
2772
|
const cacheSnapshot = storeLookup(selector, {
|
|
2773
2773
|
config,
|
|
2774
|
-
resolve: () => buildNetworkSnapshot$
|
|
2774
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
2775
2775
|
});
|
|
2776
2776
|
return cacheSnapshot;
|
|
2777
2777
|
}
|
|
2778
2778
|
const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAssets(untrustedConfig, requestContext) {
|
|
2779
|
-
const config = validateAdapterConfig$
|
|
2779
|
+
const config = validateAdapterConfig$9(untrustedConfig, getAppAssets_ConfigPropertyNames);
|
|
2780
2780
|
// Invalid or incomplete config
|
|
2781
2781
|
if (config === null) {
|
|
2782
2782
|
return null;
|
|
@@ -2827,7 +2827,7 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
2827
2827
|
}
|
|
2828
2828
|
return input;
|
|
2829
2829
|
}
|
|
2830
|
-
const select$
|
|
2830
|
+
const select$i = function InstalledAssetCollectionRepresentationSelect() {
|
|
2831
2831
|
return {
|
|
2832
2832
|
kind: 'Fragment',
|
|
2833
2833
|
version: VERSION$a,
|
|
@@ -2837,7 +2837,7 @@ const select$h = function InstalledAssetCollectionRepresentationSelect() {
|
|
|
2837
2837
|
name: 'assets',
|
|
2838
2838
|
kind: 'Link',
|
|
2839
2839
|
plural: true,
|
|
2840
|
-
fragment: select$
|
|
2840
|
+
fragment: select$l()
|
|
2841
2841
|
}
|
|
2842
2842
|
]
|
|
2843
2843
|
};
|
|
@@ -2881,22 +2881,22 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
2883
|
|
|
2884
|
-
function select$
|
|
2885
|
-
return select$
|
|
2884
|
+
function select$h(luvio, params) {
|
|
2885
|
+
return select$i();
|
|
2886
2886
|
}
|
|
2887
|
-
function keyBuilder$
|
|
2887
|
+
function keyBuilder$d(luvio, params) {
|
|
2888
2888
|
return keyPrefix + '::InstalledAssetCollectionRepresentation:(' + 'assetIdOrName:' + params.queryParams.assetIdOrName + ',' + 'assetType:' + params.queryParams.assetType + ')';
|
|
2889
2889
|
}
|
|
2890
|
-
function getResponseCacheKeys$
|
|
2891
|
-
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$
|
|
2890
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
2891
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
2892
2892
|
}
|
|
2893
|
-
function ingestSuccess$
|
|
2893
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
2894
2894
|
const { body } = response;
|
|
2895
|
-
const key = keyBuilder$
|
|
2895
|
+
const key = keyBuilder$d(luvio, resourceParams);
|
|
2896
2896
|
luvio.storeIngest(key, ingest$4, body);
|
|
2897
2897
|
const snapshot = luvio.storeLookup({
|
|
2898
2898
|
recordId: key,
|
|
2899
|
-
node: select$
|
|
2899
|
+
node: select$h(),
|
|
2900
2900
|
variables: {},
|
|
2901
2901
|
}, snapshotRefresh);
|
|
2902
2902
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2908,7 +2908,7 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2908
2908
|
return snapshot;
|
|
2909
2909
|
}
|
|
2910
2910
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2911
|
-
const key = keyBuilder$
|
|
2911
|
+
const key = keyBuilder$d(luvio, params);
|
|
2912
2912
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2913
2913
|
const storeMetadataParams = {
|
|
2914
2914
|
ttl: TTL$4,
|
|
@@ -2919,7 +2919,7 @@ function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
|
2919
2919
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2920
2920
|
return errorSnapshot;
|
|
2921
2921
|
}
|
|
2922
|
-
function createResourceRequest$
|
|
2922
|
+
function createResourceRequest$8(config) {
|
|
2923
2923
|
const headers = {};
|
|
2924
2924
|
return {
|
|
2925
2925
|
baseUri: '/services/data/v63.0',
|
|
@@ -2933,61 +2933,61 @@ function createResourceRequest$6(config) {
|
|
|
2933
2933
|
};
|
|
2934
2934
|
}
|
|
2935
2935
|
|
|
2936
|
-
const adapterName$
|
|
2936
|
+
const adapterName$8 = 'getInstalledAssets';
|
|
2937
2937
|
const getInstalledAssets_ConfigPropertyMetadata = [
|
|
2938
2938
|
generateParamConfigMetadata('assetIdOrName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2939
2939
|
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2940
2940
|
];
|
|
2941
|
-
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2942
|
-
const createResourceParams$
|
|
2943
|
-
function keyBuilder$
|
|
2944
|
-
const resourceParams = createResourceParams$
|
|
2945
|
-
return keyBuilder$
|
|
2941
|
+
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getInstalledAssets_ConfigPropertyMetadata);
|
|
2942
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$g(getInstalledAssets_ConfigPropertyMetadata);
|
|
2943
|
+
function keyBuilder$c(luvio, config) {
|
|
2944
|
+
const resourceParams = createResourceParams$8(config);
|
|
2945
|
+
return keyBuilder$d(luvio, resourceParams);
|
|
2946
2946
|
}
|
|
2947
|
-
function typeCheckConfig$
|
|
2947
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
2948
2948
|
const config = {};
|
|
2949
|
-
typeCheckConfig$
|
|
2949
|
+
typeCheckConfig$g(untrustedConfig, config, getInstalledAssets_ConfigPropertyMetadata);
|
|
2950
2950
|
return config;
|
|
2951
2951
|
}
|
|
2952
|
-
function validateAdapterConfig$
|
|
2952
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
2953
2953
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2954
2954
|
return null;
|
|
2955
2955
|
}
|
|
2956
2956
|
if (process.env.NODE_ENV !== 'production') {
|
|
2957
2957
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2958
2958
|
}
|
|
2959
|
-
const config = typeCheckConfig$
|
|
2959
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
2960
2960
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2961
2961
|
return null;
|
|
2962
2962
|
}
|
|
2963
2963
|
return config;
|
|
2964
2964
|
}
|
|
2965
2965
|
function adapterFragment$4(luvio, config) {
|
|
2966
|
-
createResourceParams$
|
|
2967
|
-
return select$
|
|
2966
|
+
createResourceParams$8(config);
|
|
2967
|
+
return select$h();
|
|
2968
2968
|
}
|
|
2969
2969
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2970
|
-
const snapshot = ingestSuccess$
|
|
2970
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
2971
2971
|
config,
|
|
2972
|
-
resolve: () => buildNetworkSnapshot$
|
|
2972
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2973
2973
|
});
|
|
2974
2974
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2975
2975
|
}
|
|
2976
2976
|
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2977
2977
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2978
2978
|
config,
|
|
2979
|
-
resolve: () => buildNetworkSnapshot$
|
|
2979
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2980
2980
|
});
|
|
2981
2981
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2982
2982
|
}
|
|
2983
|
-
function buildNetworkSnapshot$
|
|
2984
|
-
const resourceParams = createResourceParams$
|
|
2985
|
-
const request = createResourceRequest$
|
|
2983
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
2984
|
+
const resourceParams = createResourceParams$8(config);
|
|
2985
|
+
const request = createResourceRequest$8(resourceParams);
|
|
2986
2986
|
return luvio.dispatchResourceRequest(request, options)
|
|
2987
2987
|
.then((response) => {
|
|
2988
2988
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2989
2989
|
const cache = new StoreKeyMap();
|
|
2990
|
-
getResponseCacheKeys$
|
|
2990
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
2991
2991
|
return cache;
|
|
2992
2992
|
});
|
|
2993
2993
|
}, (response) => {
|
|
@@ -2995,23 +2995,23 @@ function buildNetworkSnapshot$6(luvio, config, options) {
|
|
|
2995
2995
|
});
|
|
2996
2996
|
}
|
|
2997
2997
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2998
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2998
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
2999
2999
|
}
|
|
3000
3000
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
3001
3001
|
const { luvio, config } = context;
|
|
3002
3002
|
const selector = {
|
|
3003
|
-
recordId: keyBuilder$
|
|
3003
|
+
recordId: keyBuilder$c(luvio, config),
|
|
3004
3004
|
node: adapterFragment$4(luvio, config),
|
|
3005
3005
|
variables: {},
|
|
3006
3006
|
};
|
|
3007
3007
|
const cacheSnapshot = storeLookup(selector, {
|
|
3008
3008
|
config,
|
|
3009
|
-
resolve: () => buildNetworkSnapshot$
|
|
3009
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
3010
3010
|
});
|
|
3011
3011
|
return cacheSnapshot;
|
|
3012
3012
|
}
|
|
3013
3013
|
const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getInstalledAssets(untrustedConfig, requestContext) {
|
|
3014
|
-
const config = validateAdapterConfig$
|
|
3014
|
+
const config = validateAdapterConfig$8(untrustedConfig, getInstalledAssets_ConfigPropertyNames);
|
|
3015
3015
|
// Invalid or incomplete config
|
|
3016
3016
|
if (config === null) {
|
|
3017
3017
|
return null;
|
|
@@ -3153,19 +3153,19 @@ function validate$f(obj, path = 'TemplateRepresentation') {
|
|
|
3153
3153
|
return v_error === undefined ? null : v_error;
|
|
3154
3154
|
}
|
|
3155
3155
|
const RepresentationType$3 = 'TemplateRepresentation';
|
|
3156
|
-
function keyBuilder$
|
|
3156
|
+
function keyBuilder$b(luvio, config) {
|
|
3157
3157
|
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
3158
3158
|
}
|
|
3159
3159
|
function keyBuilderFromType$2(luvio, object) {
|
|
3160
3160
|
const keyParams = {
|
|
3161
3161
|
id: object.id
|
|
3162
3162
|
};
|
|
3163
|
-
return keyBuilder$
|
|
3163
|
+
return keyBuilder$b(luvio, keyParams);
|
|
3164
3164
|
}
|
|
3165
3165
|
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3166
3166
|
return input;
|
|
3167
3167
|
}
|
|
3168
|
-
const select$
|
|
3168
|
+
const select$g = function TemplateRepresentationSelect() {
|
|
3169
3169
|
return {
|
|
3170
3170
|
kind: 'Fragment',
|
|
3171
3171
|
version: VERSION$9,
|
|
@@ -3337,7 +3337,7 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
|
3337
3337
|
}
|
|
3338
3338
|
return input;
|
|
3339
3339
|
}
|
|
3340
|
-
const select$
|
|
3340
|
+
const select$f = function TemplateCollectionRepresentationSelect() {
|
|
3341
3341
|
return {
|
|
3342
3342
|
kind: 'Fragment',
|
|
3343
3343
|
version: VERSION$8,
|
|
@@ -3347,7 +3347,7 @@ const select$e = function TemplateCollectionRepresentationSelect() {
|
|
|
3347
3347
|
name: 'templates',
|
|
3348
3348
|
kind: 'Link',
|
|
3349
3349
|
plural: true,
|
|
3350
|
-
fragment: select$
|
|
3350
|
+
fragment: select$g()
|
|
3351
3351
|
}
|
|
3352
3352
|
]
|
|
3353
3353
|
};
|
|
@@ -3391,22 +3391,22 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3391
3391
|
}
|
|
3392
3392
|
}
|
|
3393
3393
|
|
|
3394
|
-
function select$
|
|
3395
|
-
return select$
|
|
3394
|
+
function select$e(luvio, params) {
|
|
3395
|
+
return select$f();
|
|
3396
3396
|
}
|
|
3397
|
-
function keyBuilder$
|
|
3397
|
+
function keyBuilder$a(luvio, params) {
|
|
3398
3398
|
return keyPrefix + '::TemplateCollectionRepresentation:(' + ')';
|
|
3399
3399
|
}
|
|
3400
|
-
function getResponseCacheKeys$
|
|
3401
|
-
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$
|
|
3400
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
3401
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$a());
|
|
3402
3402
|
}
|
|
3403
|
-
function ingestSuccess$
|
|
3403
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
3404
3404
|
const { body } = response;
|
|
3405
|
-
const key = keyBuilder$
|
|
3405
|
+
const key = keyBuilder$a();
|
|
3406
3406
|
luvio.storeIngest(key, ingest$2, body);
|
|
3407
3407
|
const snapshot = luvio.storeLookup({
|
|
3408
3408
|
recordId: key,
|
|
3409
|
-
node: select$
|
|
3409
|
+
node: select$e(),
|
|
3410
3410
|
variables: {},
|
|
3411
3411
|
}, snapshotRefresh);
|
|
3412
3412
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3418,7 +3418,7 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3418
3418
|
return snapshot;
|
|
3419
3419
|
}
|
|
3420
3420
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3421
|
-
const key = keyBuilder$
|
|
3421
|
+
const key = keyBuilder$a();
|
|
3422
3422
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3423
3423
|
const storeMetadataParams = {
|
|
3424
3424
|
ttl: TTL$2,
|
|
@@ -3429,7 +3429,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
|
3429
3429
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3430
3430
|
return errorSnapshot;
|
|
3431
3431
|
}
|
|
3432
|
-
function createResourceRequest$
|
|
3432
|
+
function createResourceRequest$7(config) {
|
|
3433
3433
|
const headers = {};
|
|
3434
3434
|
return {
|
|
3435
3435
|
baseUri: '/services/data/v63.0',
|
|
@@ -3443,57 +3443,57 @@ function createResourceRequest$5(config) {
|
|
|
3443
3443
|
};
|
|
3444
3444
|
}
|
|
3445
3445
|
|
|
3446
|
-
const adapterName$
|
|
3446
|
+
const adapterName$7 = 'getTemplates';
|
|
3447
3447
|
const getTemplates_ConfigPropertyMetadata = [];
|
|
3448
|
-
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3449
|
-
const createResourceParams$
|
|
3450
|
-
function keyBuilder$
|
|
3451
|
-
createResourceParams$
|
|
3452
|
-
return keyBuilder$
|
|
3448
|
+
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getTemplates_ConfigPropertyMetadata);
|
|
3449
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$g(getTemplates_ConfigPropertyMetadata);
|
|
3450
|
+
function keyBuilder$9(luvio, config) {
|
|
3451
|
+
createResourceParams$7(config);
|
|
3452
|
+
return keyBuilder$a();
|
|
3453
3453
|
}
|
|
3454
|
-
function typeCheckConfig$
|
|
3454
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
3455
3455
|
const config = {};
|
|
3456
3456
|
return config;
|
|
3457
3457
|
}
|
|
3458
|
-
function validateAdapterConfig$
|
|
3458
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
3459
3459
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3460
3460
|
return null;
|
|
3461
3461
|
}
|
|
3462
3462
|
if (process.env.NODE_ENV !== 'production') {
|
|
3463
3463
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3464
3464
|
}
|
|
3465
|
-
const config = typeCheckConfig$
|
|
3465
|
+
const config = typeCheckConfig$7();
|
|
3466
3466
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3467
3467
|
return null;
|
|
3468
3468
|
}
|
|
3469
3469
|
return config;
|
|
3470
3470
|
}
|
|
3471
3471
|
function adapterFragment$3(luvio, config) {
|
|
3472
|
-
createResourceParams$
|
|
3473
|
-
return select$
|
|
3472
|
+
createResourceParams$7(config);
|
|
3473
|
+
return select$e();
|
|
3474
3474
|
}
|
|
3475
3475
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3476
|
-
const snapshot = ingestSuccess$
|
|
3476
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
3477
3477
|
config,
|
|
3478
|
-
resolve: () => buildNetworkSnapshot$
|
|
3478
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
3479
3479
|
});
|
|
3480
3480
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3481
3481
|
}
|
|
3482
3482
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3483
3483
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3484
3484
|
config,
|
|
3485
|
-
resolve: () => buildNetworkSnapshot$
|
|
3485
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
3486
3486
|
});
|
|
3487
3487
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3488
3488
|
}
|
|
3489
|
-
function buildNetworkSnapshot$
|
|
3490
|
-
const resourceParams = createResourceParams$
|
|
3491
|
-
const request = createResourceRequest$
|
|
3489
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
3490
|
+
const resourceParams = createResourceParams$7(config);
|
|
3491
|
+
const request = createResourceRequest$7();
|
|
3492
3492
|
return luvio.dispatchResourceRequest(request, options)
|
|
3493
3493
|
.then((response) => {
|
|
3494
3494
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
3495
3495
|
const cache = new StoreKeyMap();
|
|
3496
|
-
getResponseCacheKeys$
|
|
3496
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
3497
3497
|
return cache;
|
|
3498
3498
|
});
|
|
3499
3499
|
}, (response) => {
|
|
@@ -3501,23 +3501,23 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
3501
3501
|
});
|
|
3502
3502
|
}
|
|
3503
3503
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3504
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3504
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
3505
3505
|
}
|
|
3506
3506
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3507
3507
|
const { luvio, config } = context;
|
|
3508
3508
|
const selector = {
|
|
3509
|
-
recordId: keyBuilder$
|
|
3509
|
+
recordId: keyBuilder$9(luvio, config),
|
|
3510
3510
|
node: adapterFragment$3(luvio, config),
|
|
3511
3511
|
variables: {},
|
|
3512
3512
|
};
|
|
3513
3513
|
const cacheSnapshot = storeLookup(selector, {
|
|
3514
3514
|
config,
|
|
3515
|
-
resolve: () => buildNetworkSnapshot$
|
|
3515
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
3516
3516
|
});
|
|
3517
3517
|
return cacheSnapshot;
|
|
3518
3518
|
}
|
|
3519
3519
|
const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplates(untrustedConfig, requestContext) {
|
|
3520
|
-
const config = validateAdapterConfig$
|
|
3520
|
+
const config = validateAdapterConfig$7(untrustedConfig, getTemplates_ConfigPropertyNames);
|
|
3521
3521
|
// Invalid or incomplete config
|
|
3522
3522
|
if (config === null) {
|
|
3523
3523
|
return null;
|
|
@@ -3690,19 +3690,19 @@ function validate$8(obj, path = 'RuleInfoInputRepresentation') {
|
|
|
3690
3690
|
return v_error === undefined ? null : v_error;
|
|
3691
3691
|
}
|
|
3692
3692
|
|
|
3693
|
-
function select$
|
|
3694
|
-
return select$
|
|
3693
|
+
function select$d(luvio, params) {
|
|
3694
|
+
return select$g();
|
|
3695
3695
|
}
|
|
3696
|
-
function getResponseCacheKeys$
|
|
3696
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
3697
3697
|
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
3698
3698
|
}
|
|
3699
|
-
function ingestSuccess$
|
|
3699
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
3700
3700
|
const { body } = response;
|
|
3701
3701
|
const key = keyBuilderFromType$2(luvio, body);
|
|
3702
3702
|
luvio.storeIngest(key, ingest$3, body);
|
|
3703
3703
|
const snapshot = luvio.storeLookup({
|
|
3704
3704
|
recordId: key,
|
|
3705
|
-
node: select$
|
|
3705
|
+
node: select$d(),
|
|
3706
3706
|
variables: {},
|
|
3707
3707
|
});
|
|
3708
3708
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3713,7 +3713,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
3713
3713
|
deepFreeze(snapshot.data);
|
|
3714
3714
|
return snapshot;
|
|
3715
3715
|
}
|
|
3716
|
-
function createResourceRequest$
|
|
3716
|
+
function createResourceRequest$6(config) {
|
|
3717
3717
|
const headers = {};
|
|
3718
3718
|
return {
|
|
3719
3719
|
baseUri: '/services/data/v63.0',
|
|
@@ -3727,7 +3727,7 @@ function createResourceRequest$4(config) {
|
|
|
3727
3727
|
};
|
|
3728
3728
|
}
|
|
3729
3729
|
|
|
3730
|
-
const adapterName$
|
|
3730
|
+
const adapterName$6 = 'createTemplate';
|
|
3731
3731
|
const createTemplate_ConfigPropertyMetadata = [
|
|
3732
3732
|
generateParamConfigMetadata('assetVersion', false, 2 /* Body */, 2 /* Number */),
|
|
3733
3733
|
generateParamConfigMetadata('chainDefinitions', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
@@ -3745,11 +3745,11 @@ const createTemplate_ConfigPropertyMetadata = [
|
|
|
3745
3745
|
generateParamConfigMetadata('templateType', true, 2 /* Body */, 0 /* String */),
|
|
3746
3746
|
generateParamConfigMetadata('variableDefinition', false, 2 /* Body */, 0 /* String */),
|
|
3747
3747
|
];
|
|
3748
|
-
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3749
|
-
const createResourceParams$
|
|
3750
|
-
function typeCheckConfig$
|
|
3748
|
+
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createTemplate_ConfigPropertyMetadata);
|
|
3749
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$g(createTemplate_ConfigPropertyMetadata);
|
|
3750
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
3751
3751
|
const config = {};
|
|
3752
|
-
typeCheckConfig$
|
|
3752
|
+
typeCheckConfig$g(untrustedConfig, config, createTemplate_ConfigPropertyMetadata);
|
|
3753
3753
|
const untrustedConfig_chainDefinitions = untrustedConfig.chainDefinitions;
|
|
3754
3754
|
if (ArrayIsArray$1(untrustedConfig_chainDefinitions)) {
|
|
3755
3755
|
const untrustedConfig_chainDefinitions_array = [];
|
|
@@ -3801,30 +3801,30 @@ function typeCheckConfig$4(untrustedConfig) {
|
|
|
3801
3801
|
}
|
|
3802
3802
|
return config;
|
|
3803
3803
|
}
|
|
3804
|
-
function validateAdapterConfig$
|
|
3804
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
3805
3805
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3806
3806
|
return null;
|
|
3807
3807
|
}
|
|
3808
3808
|
if (process.env.NODE_ENV !== 'production') {
|
|
3809
3809
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3810
3810
|
}
|
|
3811
|
-
const config = typeCheckConfig$
|
|
3811
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
3812
3812
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3813
3813
|
return null;
|
|
3814
3814
|
}
|
|
3815
3815
|
return config;
|
|
3816
3816
|
}
|
|
3817
|
-
function buildNetworkSnapshot$
|
|
3818
|
-
const resourceParams = createResourceParams$
|
|
3819
|
-
const request = createResourceRequest$
|
|
3817
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
3818
|
+
const resourceParams = createResourceParams$6(config);
|
|
3819
|
+
const request = createResourceRequest$6(resourceParams);
|
|
3820
3820
|
return luvio.dispatchResourceRequest(request, options)
|
|
3821
3821
|
.then((response) => {
|
|
3822
3822
|
return luvio.handleSuccessResponse(() => {
|
|
3823
|
-
const snapshot = ingestSuccess$
|
|
3823
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
3824
3824
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3825
3825
|
}, () => {
|
|
3826
3826
|
const cache = new StoreKeyMap();
|
|
3827
|
-
getResponseCacheKeys$
|
|
3827
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
3828
3828
|
return cache;
|
|
3829
3829
|
});
|
|
3830
3830
|
}, (response) => {
|
|
@@ -3834,33 +3834,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
3834
3834
|
}
|
|
3835
3835
|
const createTemplateAdapterFactory = (luvio) => {
|
|
3836
3836
|
return function createTemplate(untrustedConfig) {
|
|
3837
|
-
const config = validateAdapterConfig$
|
|
3837
|
+
const config = validateAdapterConfig$6(untrustedConfig, createTemplate_ConfigPropertyNames);
|
|
3838
3838
|
// Invalid or incomplete config
|
|
3839
3839
|
if (config === null) {
|
|
3840
3840
|
throw new Error('Invalid config for "createTemplate"');
|
|
3841
3841
|
}
|
|
3842
|
-
return buildNetworkSnapshot$
|
|
3842
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
3843
3843
|
};
|
|
3844
3844
|
};
|
|
3845
3845
|
|
|
3846
|
-
function select$
|
|
3847
|
-
return select$
|
|
3846
|
+
function select$c(luvio, params) {
|
|
3847
|
+
return select$g();
|
|
3848
3848
|
}
|
|
3849
|
-
function keyBuilder$
|
|
3850
|
-
return keyBuilder$
|
|
3849
|
+
function keyBuilder$8(luvio, params) {
|
|
3850
|
+
return keyBuilder$b(luvio, {
|
|
3851
3851
|
id: params.urlParams.templateIdOrApiName
|
|
3852
3852
|
});
|
|
3853
3853
|
}
|
|
3854
|
-
function getResponseCacheKeys$
|
|
3854
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
3855
3855
|
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
3856
3856
|
}
|
|
3857
|
-
function ingestSuccess$
|
|
3857
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
3858
3858
|
const { body } = response;
|
|
3859
|
-
const key = keyBuilder$
|
|
3859
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
3860
3860
|
luvio.storeIngest(key, ingest$3, body);
|
|
3861
3861
|
const snapshot = luvio.storeLookup({
|
|
3862
3862
|
recordId: key,
|
|
3863
|
-
node: select$
|
|
3863
|
+
node: select$c(),
|
|
3864
3864
|
variables: {},
|
|
3865
3865
|
}, snapshotRefresh);
|
|
3866
3866
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3872,7 +3872,7 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3872
3872
|
return snapshot;
|
|
3873
3873
|
}
|
|
3874
3874
|
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3875
|
-
const key = keyBuilder$
|
|
3875
|
+
const key = keyBuilder$8(luvio, params);
|
|
3876
3876
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3877
3877
|
const storeMetadataParams = {
|
|
3878
3878
|
ttl: TTL$3,
|
|
@@ -3883,7 +3883,7 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
3883
3883
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3884
3884
|
return errorSnapshot;
|
|
3885
3885
|
}
|
|
3886
|
-
function createResourceRequest$
|
|
3886
|
+
function createResourceRequest$5(config) {
|
|
3887
3887
|
const headers = {};
|
|
3888
3888
|
return {
|
|
3889
3889
|
baseUri: '/services/data/v63.0',
|
|
@@ -3897,60 +3897,60 @@ function createResourceRequest$3(config) {
|
|
|
3897
3897
|
};
|
|
3898
3898
|
}
|
|
3899
3899
|
|
|
3900
|
-
const adapterName$
|
|
3900
|
+
const adapterName$5 = 'getTemplate';
|
|
3901
3901
|
const getTemplate_ConfigPropertyMetadata = [
|
|
3902
3902
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3903
3903
|
];
|
|
3904
|
-
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3905
|
-
const createResourceParams$
|
|
3906
|
-
function keyBuilder$
|
|
3907
|
-
const resourceParams = createResourceParams$
|
|
3908
|
-
return keyBuilder$
|
|
3904
|
+
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getTemplate_ConfigPropertyMetadata);
|
|
3905
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$g(getTemplate_ConfigPropertyMetadata);
|
|
3906
|
+
function keyBuilder$7(luvio, config) {
|
|
3907
|
+
const resourceParams = createResourceParams$5(config);
|
|
3908
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
3909
3909
|
}
|
|
3910
|
-
function typeCheckConfig$
|
|
3910
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
3911
3911
|
const config = {};
|
|
3912
|
-
typeCheckConfig$
|
|
3912
|
+
typeCheckConfig$g(untrustedConfig, config, getTemplate_ConfigPropertyMetadata);
|
|
3913
3913
|
return config;
|
|
3914
3914
|
}
|
|
3915
|
-
function validateAdapterConfig$
|
|
3915
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
3916
3916
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3917
3917
|
return null;
|
|
3918
3918
|
}
|
|
3919
3919
|
if (process.env.NODE_ENV !== 'production') {
|
|
3920
3920
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3921
3921
|
}
|
|
3922
|
-
const config = typeCheckConfig$
|
|
3922
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
3923
3923
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3924
3924
|
return null;
|
|
3925
3925
|
}
|
|
3926
3926
|
return config;
|
|
3927
3927
|
}
|
|
3928
3928
|
function adapterFragment$2(luvio, config) {
|
|
3929
|
-
createResourceParams$
|
|
3930
|
-
return select$
|
|
3929
|
+
createResourceParams$5(config);
|
|
3930
|
+
return select$c();
|
|
3931
3931
|
}
|
|
3932
3932
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3933
|
-
const snapshot = ingestSuccess$
|
|
3933
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
3934
3934
|
config,
|
|
3935
|
-
resolve: () => buildNetworkSnapshot$
|
|
3935
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3936
3936
|
});
|
|
3937
3937
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3938
3938
|
}
|
|
3939
3939
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3940
3940
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3941
3941
|
config,
|
|
3942
|
-
resolve: () => buildNetworkSnapshot$
|
|
3942
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3943
3943
|
});
|
|
3944
3944
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3945
3945
|
}
|
|
3946
|
-
function buildNetworkSnapshot$
|
|
3947
|
-
const resourceParams = createResourceParams$
|
|
3948
|
-
const request = createResourceRequest$
|
|
3946
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
3947
|
+
const resourceParams = createResourceParams$5(config);
|
|
3948
|
+
const request = createResourceRequest$5(resourceParams);
|
|
3949
3949
|
return luvio.dispatchResourceRequest(request, options)
|
|
3950
3950
|
.then((response) => {
|
|
3951
3951
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3952
3952
|
const cache = new StoreKeyMap();
|
|
3953
|
-
getResponseCacheKeys$
|
|
3953
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
3954
3954
|
return cache;
|
|
3955
3955
|
});
|
|
3956
3956
|
}, (response) => {
|
|
@@ -3958,23 +3958,23 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
3958
3958
|
});
|
|
3959
3959
|
}
|
|
3960
3960
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3961
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
3961
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
3962
3962
|
}
|
|
3963
3963
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3964
3964
|
const { luvio, config } = context;
|
|
3965
3965
|
const selector = {
|
|
3966
|
-
recordId: keyBuilder$
|
|
3966
|
+
recordId: keyBuilder$7(luvio, config),
|
|
3967
3967
|
node: adapterFragment$2(luvio, config),
|
|
3968
3968
|
variables: {},
|
|
3969
3969
|
};
|
|
3970
3970
|
const cacheSnapshot = storeLookup(selector, {
|
|
3971
3971
|
config,
|
|
3972
|
-
resolve: () => buildNetworkSnapshot$
|
|
3972
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3973
3973
|
});
|
|
3974
3974
|
return cacheSnapshot;
|
|
3975
3975
|
}
|
|
3976
3976
|
const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(untrustedConfig, requestContext) {
|
|
3977
|
-
const config = validateAdapterConfig$
|
|
3977
|
+
const config = validateAdapterConfig$5(untrustedConfig, getTemplate_ConfigPropertyNames);
|
|
3978
3978
|
// Invalid or incomplete config
|
|
3979
3979
|
if (config === null) {
|
|
3980
3980
|
return null;
|
|
@@ -3983,6 +3983,188 @@ const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(
|
|
|
3983
3983
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
3984
3984
|
};
|
|
3985
3985
|
|
|
3986
|
+
function select$b(luvio, params) {
|
|
3987
|
+
return select$g();
|
|
3988
|
+
}
|
|
3989
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
3990
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
3991
|
+
}
|
|
3992
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
3993
|
+
const { body } = response;
|
|
3994
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
3995
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3996
|
+
const snapshot = luvio.storeLookup({
|
|
3997
|
+
recordId: key,
|
|
3998
|
+
node: select$b(),
|
|
3999
|
+
variables: {},
|
|
4000
|
+
});
|
|
4001
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4002
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4003
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4004
|
+
}
|
|
4005
|
+
}
|
|
4006
|
+
deepFreeze(snapshot.data);
|
|
4007
|
+
return snapshot;
|
|
4008
|
+
}
|
|
4009
|
+
function createResourceRequest$4(config) {
|
|
4010
|
+
const headers = {};
|
|
4011
|
+
return {
|
|
4012
|
+
baseUri: '/services/data/v63.0',
|
|
4013
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '',
|
|
4014
|
+
method: 'patch',
|
|
4015
|
+
body: config.body,
|
|
4016
|
+
urlParams: config.urlParams,
|
|
4017
|
+
queryParams: {},
|
|
4018
|
+
headers,
|
|
4019
|
+
priority: 'normal',
|
|
4020
|
+
};
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4023
|
+
const adapterName$4 = 'updateTemplate';
|
|
4024
|
+
const updateTemplate_ConfigPropertyMetadata = [
|
|
4025
|
+
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4026
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
4027
|
+
generateParamConfigMetadata('releaseInfo', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4028
|
+
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
4029
|
+
];
|
|
4030
|
+
const updateTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, updateTemplate_ConfigPropertyMetadata);
|
|
4031
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$g(updateTemplate_ConfigPropertyMetadata);
|
|
4032
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
4033
|
+
const config = {};
|
|
4034
|
+
typeCheckConfig$g(untrustedConfig, config, updateTemplate_ConfigPropertyMetadata);
|
|
4035
|
+
const untrustedConfig_releaseInfo = untrustedConfig.releaseInfo;
|
|
4036
|
+
const referenceReleaseInfoInputRepresentationValidationError = validate$9(untrustedConfig_releaseInfo);
|
|
4037
|
+
if (referenceReleaseInfoInputRepresentationValidationError === null) {
|
|
4038
|
+
config.releaseInfo = untrustedConfig_releaseInfo;
|
|
4039
|
+
}
|
|
4040
|
+
return config;
|
|
4041
|
+
}
|
|
4042
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
4043
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4044
|
+
return null;
|
|
4045
|
+
}
|
|
4046
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4047
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4048
|
+
}
|
|
4049
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
4050
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4051
|
+
return null;
|
|
4052
|
+
}
|
|
4053
|
+
return config;
|
|
4054
|
+
}
|
|
4055
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
4056
|
+
const resourceParams = createResourceParams$4(config);
|
|
4057
|
+
const request = createResourceRequest$4(resourceParams);
|
|
4058
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4059
|
+
.then((response) => {
|
|
4060
|
+
return luvio.handleSuccessResponse(() => {
|
|
4061
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
4062
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4063
|
+
}, () => {
|
|
4064
|
+
const cache = new StoreKeyMap();
|
|
4065
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
4066
|
+
return cache;
|
|
4067
|
+
});
|
|
4068
|
+
}, (response) => {
|
|
4069
|
+
deepFreeze(response);
|
|
4070
|
+
throw response;
|
|
4071
|
+
});
|
|
4072
|
+
}
|
|
4073
|
+
const updateTemplateAdapterFactory = (luvio) => {
|
|
4074
|
+
return function updateTemplate(untrustedConfig) {
|
|
4075
|
+
const config = validateAdapterConfig$4(untrustedConfig, updateTemplate_ConfigPropertyNames);
|
|
4076
|
+
// Invalid or incomplete config
|
|
4077
|
+
if (config === null) {
|
|
4078
|
+
throw new Error('Invalid config for "updateTemplate"');
|
|
4079
|
+
}
|
|
4080
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
4081
|
+
};
|
|
4082
|
+
};
|
|
4083
|
+
|
|
4084
|
+
function keyBuilder$6(luvio, params) {
|
|
4085
|
+
return keyBuilder$b(luvio, {
|
|
4086
|
+
id: params.urlParams.templateIdOrApiName
|
|
4087
|
+
});
|
|
4088
|
+
}
|
|
4089
|
+
function getResponseCacheKeys$3(cacheKeyMap, luvio, resourceParams) {
|
|
4090
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
4091
|
+
cacheKeyMap.set(key, {
|
|
4092
|
+
namespace: keyPrefix,
|
|
4093
|
+
representationName: RepresentationType$3,
|
|
4094
|
+
mergeable: false
|
|
4095
|
+
});
|
|
4096
|
+
}
|
|
4097
|
+
function evictSuccess(luvio, resourceParams) {
|
|
4098
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
4099
|
+
luvio.storeEvict(key);
|
|
4100
|
+
}
|
|
4101
|
+
function createResourceRequest$3(config) {
|
|
4102
|
+
const headers = {};
|
|
4103
|
+
return {
|
|
4104
|
+
baseUri: '/services/data/v63.0',
|
|
4105
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '',
|
|
4106
|
+
method: 'delete',
|
|
4107
|
+
body: null,
|
|
4108
|
+
urlParams: config.urlParams,
|
|
4109
|
+
queryParams: {},
|
|
4110
|
+
headers,
|
|
4111
|
+
priority: 'normal',
|
|
4112
|
+
};
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
const adapterName$3 = 'deleteTemplate';
|
|
4116
|
+
const deleteTemplate_ConfigPropertyMetadata = [
|
|
4117
|
+
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4118
|
+
];
|
|
4119
|
+
const deleteTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, deleteTemplate_ConfigPropertyMetadata);
|
|
4120
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$g(deleteTemplate_ConfigPropertyMetadata);
|
|
4121
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
4122
|
+
const config = {};
|
|
4123
|
+
typeCheckConfig$g(untrustedConfig, config, deleteTemplate_ConfigPropertyMetadata);
|
|
4124
|
+
return config;
|
|
4125
|
+
}
|
|
4126
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
4127
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4128
|
+
return null;
|
|
4129
|
+
}
|
|
4130
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4131
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4132
|
+
}
|
|
4133
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
4134
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4135
|
+
return null;
|
|
4136
|
+
}
|
|
4137
|
+
return config;
|
|
4138
|
+
}
|
|
4139
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
4140
|
+
const resourceParams = createResourceParams$3(config);
|
|
4141
|
+
const request = createResourceRequest$3(resourceParams);
|
|
4142
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4143
|
+
.then(() => {
|
|
4144
|
+
return luvio.handleSuccessResponse(() => {
|
|
4145
|
+
evictSuccess(luvio, resourceParams);
|
|
4146
|
+
return luvio.storeBroadcast();
|
|
4147
|
+
}, () => {
|
|
4148
|
+
const cache = new StoreKeyMap();
|
|
4149
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams);
|
|
4150
|
+
return cache;
|
|
4151
|
+
});
|
|
4152
|
+
}, (response) => {
|
|
4153
|
+
deepFreeze(response);
|
|
4154
|
+
throw response;
|
|
4155
|
+
});
|
|
4156
|
+
}
|
|
4157
|
+
const deleteTemplateAdapterFactory = (luvio) => {
|
|
4158
|
+
return function AppFrameworkdeleteTemplate(untrustedConfig) {
|
|
4159
|
+
const config = validateAdapterConfig$3(untrustedConfig, deleteTemplate_ConfigPropertyNames);
|
|
4160
|
+
// Invalid or incomplete config
|
|
4161
|
+
if (config === null) {
|
|
4162
|
+
throw new Error(`Invalid config for "${adapterName$3}"`);
|
|
4163
|
+
}
|
|
4164
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
4165
|
+
};
|
|
4166
|
+
};
|
|
4167
|
+
|
|
3986
4168
|
const VERSION$7 = "c0e40695f975d64bf46ee8f48e2b5f38";
|
|
3987
4169
|
function validate$7(obj, path = 'ImageReferenceRepresentation') {
|
|
3988
4170
|
const v_error = (() => {
|
|
@@ -4787,14 +4969,14 @@ const getTemplateConfig_ConfigPropertyMetadata = [
|
|
|
4787
4969
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4788
4970
|
];
|
|
4789
4971
|
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplateConfig_ConfigPropertyMetadata);
|
|
4790
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
4972
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$g(getTemplateConfig_ConfigPropertyMetadata);
|
|
4791
4973
|
function keyBuilder$3(luvio, config) {
|
|
4792
4974
|
const resourceParams = createResourceParams$2(config);
|
|
4793
4975
|
return keyBuilder$4(luvio, resourceParams);
|
|
4794
4976
|
}
|
|
4795
4977
|
function typeCheckConfig$2(untrustedConfig) {
|
|
4796
4978
|
const config = {};
|
|
4797
|
-
typeCheckConfig$
|
|
4979
|
+
typeCheckConfig$g(untrustedConfig, config, getTemplateConfig_ConfigPropertyMetadata);
|
|
4798
4980
|
return config;
|
|
4799
4981
|
}
|
|
4800
4982
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -5027,14 +5209,14 @@ const getTags_ConfigPropertyMetadata = [
|
|
|
5027
5209
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5028
5210
|
];
|
|
5029
5211
|
const getTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTags_ConfigPropertyMetadata);
|
|
5030
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
5212
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$g(getTags_ConfigPropertyMetadata);
|
|
5031
5213
|
function keyBuilder(luvio, config) {
|
|
5032
5214
|
const resourceParams = createResourceParams$1(config);
|
|
5033
5215
|
return keyBuilder$1(luvio, resourceParams);
|
|
5034
5216
|
}
|
|
5035
5217
|
function typeCheckConfig$1(untrustedConfig) {
|
|
5036
5218
|
const config = {};
|
|
5037
|
-
typeCheckConfig$
|
|
5219
|
+
typeCheckConfig$g(untrustedConfig, config, getTags_ConfigPropertyMetadata);
|
|
5038
5220
|
return config;
|
|
5039
5221
|
}
|
|
5040
5222
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -5151,10 +5333,10 @@ const setTags_ConfigPropertyMetadata = [
|
|
|
5151
5333
|
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
5152
5334
|
];
|
|
5153
5335
|
const setTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, setTags_ConfigPropertyMetadata);
|
|
5154
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
5336
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$g(setTags_ConfigPropertyMetadata);
|
|
5155
5337
|
function typeCheckConfig(untrustedConfig) {
|
|
5156
5338
|
const config = {};
|
|
5157
|
-
typeCheckConfig$
|
|
5339
|
+
typeCheckConfig$g(untrustedConfig, config, setTags_ConfigPropertyMetadata);
|
|
5158
5340
|
const untrustedConfig_tags = untrustedConfig.tags;
|
|
5159
5341
|
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
5160
5342
|
const untrustedConfig_tags_object = {};
|
|
@@ -5214,4 +5396,4 @@ const setTagsAdapterFactory = (luvio) => {
|
|
|
5214
5396
|
};
|
|
5215
5397
|
};
|
|
5216
5398
|
|
|
5217
|
-
export { createAppAdapterFactory, createTemplateAdapterFactory, deleteAppAdapterFactory, getAppActivitiesAdapterFactory, getAppActivityAdapterFactory, getAppAdapterFactory, getAppAssetsAdapterFactory, getAppsAdapterFactory, getInstalledAssetsAdapterFactory, getTagsAdapterFactory, getTemplateAdapterFactory, getTemplateConfigAdapterFactory, getTemplatesAdapterFactory, setTagsAdapterFactory };
|
|
5399
|
+
export { createAppAdapterFactory, createTemplateAdapterFactory, deleteAppAdapterFactory, deleteTemplateAdapterFactory, getAppActivitiesAdapterFactory, getAppActivityAdapterFactory, getAppAdapterFactory, getAppAssetsAdapterFactory, getAppsAdapterFactory, getInstalledAssetsAdapterFactory, getTagsAdapterFactory, getTemplateAdapterFactory, getTemplateConfigAdapterFactory, getTemplatesAdapterFactory, setTagsAdapterFactory, updateTemplateAdapterFactory };
|