@salesforce/lds-adapters-analytics-app-framework 1.332.0-dev6 → 1.332.0-dev8
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 +262 -139
- package/dist/es/es2018/types/src/generated/adapters/updateApp.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -1
- package/dist/es/es2018/types/src/generated/resources/putAppFrameworkAppsByAppIdOrApiName.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/types/AppRepresentation.d.ts +5 -2
- package/dist/es/es2018/types/src/generated/types/AppUpdateRepresentation.d.ts +41 -0
- package/package.json +3 -3
- package/sfdc/index.js +568 -442
- package/src/raml/api.raml +40 -1
- package/src/raml/luvio.raml +3 -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$i, StoreKeyMap, createResourceParams as createResourceParams$i } 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$z(obj, path = 'UserRepresentation') {
|
|
|
157
157
|
})();
|
|
158
158
|
return v_error === undefined ? null : v_error;
|
|
159
159
|
}
|
|
160
|
-
const select$
|
|
160
|
+
const select$L = function UserRepresentationSelect() {
|
|
161
161
|
return {
|
|
162
162
|
kind: 'Fragment',
|
|
163
163
|
version: VERSION$v,
|
|
@@ -217,7 +217,7 @@ function validate$y(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
|
217
217
|
})();
|
|
218
218
|
return v_error === undefined ? null : v_error;
|
|
219
219
|
}
|
|
220
|
-
const select$
|
|
220
|
+
const select$K = function ScheduledTimezoneRepresentationSelect() {
|
|
221
221
|
return {
|
|
222
222
|
kind: 'Fragment',
|
|
223
223
|
version: VERSION$u,
|
|
@@ -284,8 +284,8 @@ function validate$x(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$J = function ScheduledTimeRepresentationSelect() {
|
|
288
|
+
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$K();
|
|
289
289
|
return {
|
|
290
290
|
kind: 'Fragment',
|
|
291
291
|
version: VERSION$t,
|
|
@@ -327,8 +327,8 @@ function equals$q(existing, incoming) {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
const VERSION$s = "91838b86aa135ce828af6242b11ae888";
|
|
330
|
-
const select$
|
|
331
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
330
|
+
const select$I = function HourlyScheduledItemRepresentationSelect() {
|
|
331
|
+
const { selections: ScheduledItemRepresentationSelections } = select$F();
|
|
332
332
|
return {
|
|
333
333
|
kind: 'Fragment',
|
|
334
334
|
version: VERSION$s,
|
|
@@ -349,8 +349,8 @@ const select$H = function HourlyScheduledItemRepresentationSelect() {
|
|
|
349
349
|
};
|
|
350
350
|
|
|
351
351
|
const VERSION$r = "46260a34f0b2c2d7adc7f8c150a8d8fb";
|
|
352
|
-
const select$
|
|
353
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
352
|
+
const select$H = function WeeklyScheduledItemRepresentationSelect() {
|
|
353
|
+
const { selections: ScheduledItemRepresentationSelections } = select$F();
|
|
354
354
|
return {
|
|
355
355
|
kind: 'Fragment',
|
|
356
356
|
version: VERSION$r,
|
|
@@ -367,8 +367,8 @@ const select$G = function WeeklyScheduledItemRepresentationSelect() {
|
|
|
367
367
|
};
|
|
368
368
|
|
|
369
369
|
const VERSION$q = "dcda6d015a01d9acde5fac241448cfe4";
|
|
370
|
-
const select$
|
|
371
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
370
|
+
const select$G = function DailyScheduledItemRepresentationSelect() {
|
|
371
|
+
const { selections: ScheduledItemRepresentationSelections } = select$F();
|
|
372
372
|
return {
|
|
373
373
|
kind: 'Fragment',
|
|
374
374
|
version: VERSION$q,
|
|
@@ -413,9 +413,9 @@ function validate$w(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$I();
|
|
417
|
+
const weeklyScheduledItemRepresentationSelections = select$H();
|
|
418
|
+
const dailyScheduledItemRepresentationSelections = select$G();
|
|
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$F = function ScheduledItemRepresentationSelect() {
|
|
431
|
+
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$J();
|
|
432
432
|
return {
|
|
433
433
|
kind: 'Fragment',
|
|
434
434
|
version: VERSION$p,
|
|
@@ -533,7 +533,7 @@ function validate$v(obj, path = 'AppScheduleRepresentation') {
|
|
|
533
533
|
})();
|
|
534
534
|
return v_error === undefined ? null : v_error;
|
|
535
535
|
}
|
|
536
|
-
const select$
|
|
536
|
+
const select$E = function AppScheduleRepresentationSelect() {
|
|
537
537
|
const ScheduledItemRepresentation__unionSelections = selectChildren();
|
|
538
538
|
return {
|
|
539
539
|
kind: 'Fragment',
|
|
@@ -573,7 +573,7 @@ function equals$o(existing, incoming) {
|
|
|
573
573
|
}
|
|
574
574
|
|
|
575
575
|
const TTL$c = 5000;
|
|
576
|
-
const VERSION$n = "
|
|
576
|
+
const VERSION$n = "18531c618e98e8d042ebd75a49a45b36";
|
|
577
577
|
function validate$u(obj, path = 'AppRepresentation') {
|
|
578
578
|
const v_error = (() => {
|
|
579
579
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -671,6 +671,11 @@ function validate$u(obj, path = 'AppRepresentation') {
|
|
|
671
671
|
if (typeof obj_name !== 'string') {
|
|
672
672
|
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
673
673
|
}
|
|
674
|
+
const obj_refreshUrl = obj.refreshUrl;
|
|
675
|
+
const path_refreshUrl = path + '.refreshUrl';
|
|
676
|
+
if (typeof obj_refreshUrl !== 'string') {
|
|
677
|
+
return new TypeError('Expected "string" but received "' + typeof obj_refreshUrl + '" (at "' + path_refreshUrl + '")');
|
|
678
|
+
}
|
|
674
679
|
const obj_schedule = obj.schedule;
|
|
675
680
|
const path_schedule = path + '.schedule';
|
|
676
681
|
let obj_schedule_union0 = null;
|
|
@@ -750,9 +755,9 @@ function keyBuilderFromType$9(luvio, object) {
|
|
|
750
755
|
function normalize$c(input, existing, path, luvio, store, timestamp) {
|
|
751
756
|
return input;
|
|
752
757
|
}
|
|
753
|
-
const select$
|
|
754
|
-
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$
|
|
755
|
-
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$
|
|
758
|
+
const select$D = function AppRepresentationSelect() {
|
|
759
|
+
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$L();
|
|
760
|
+
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$E();
|
|
756
761
|
return {
|
|
757
762
|
kind: 'Fragment',
|
|
758
763
|
version: VERSION$n,
|
|
@@ -812,6 +817,10 @@ const select$C = function AppRepresentationSelect() {
|
|
|
812
817
|
name: 'name',
|
|
813
818
|
kind: 'Scalar'
|
|
814
819
|
},
|
|
820
|
+
{
|
|
821
|
+
name: 'refreshUrl',
|
|
822
|
+
kind: 'Scalar'
|
|
823
|
+
},
|
|
815
824
|
{
|
|
816
825
|
name: 'schedule',
|
|
817
826
|
kind: 'Object',
|
|
@@ -893,6 +902,11 @@ function equals$n(existing, incoming) {
|
|
|
893
902
|
if (!(existing_name === incoming_name)) {
|
|
894
903
|
return false;
|
|
895
904
|
}
|
|
905
|
+
const existing_refreshUrl = existing.refreshUrl;
|
|
906
|
+
const incoming_refreshUrl = incoming.refreshUrl;
|
|
907
|
+
if (!(existing_refreshUrl === incoming_refreshUrl)) {
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
896
910
|
const existing_templateSourceId = existing.templateSourceId;
|
|
897
911
|
const incoming_templateSourceId = incoming.templateSourceId;
|
|
898
912
|
if (!(existing_templateSourceId === incoming_templateSourceId)) {
|
|
@@ -1012,7 +1026,7 @@ function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
|
1012
1026
|
}
|
|
1013
1027
|
return input;
|
|
1014
1028
|
}
|
|
1015
|
-
const select$
|
|
1029
|
+
const select$C = function AppCollectionRepresentationSelect() {
|
|
1016
1030
|
return {
|
|
1017
1031
|
kind: 'Fragment',
|
|
1018
1032
|
version: VERSION$m,
|
|
@@ -1022,7 +1036,7 @@ const select$B = function AppCollectionRepresentationSelect() {
|
|
|
1022
1036
|
name: 'apps',
|
|
1023
1037
|
kind: 'Link',
|
|
1024
1038
|
plural: true,
|
|
1025
|
-
fragment: select$
|
|
1039
|
+
fragment: select$D()
|
|
1026
1040
|
}
|
|
1027
1041
|
]
|
|
1028
1042
|
};
|
|
@@ -1066,22 +1080,22 @@ function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1066
1080
|
}
|
|
1067
1081
|
}
|
|
1068
1082
|
|
|
1069
|
-
function select$
|
|
1070
|
-
return select$
|
|
1083
|
+
function select$B(luvio, params) {
|
|
1084
|
+
return select$C();
|
|
1071
1085
|
}
|
|
1072
1086
|
function keyBuilder$u(luvio, params) {
|
|
1073
1087
|
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ',' + 'type:' + params.queryParams.type + ')';
|
|
1074
1088
|
}
|
|
1075
|
-
function getResponseCacheKeys$
|
|
1089
|
+
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
1076
1090
|
getTypeCacheKeys$b(storeKeyMap, luvio, response, () => keyBuilder$u(luvio, resourceParams));
|
|
1077
1091
|
}
|
|
1078
|
-
function ingestSuccess$
|
|
1092
|
+
function ingestSuccess$f(luvio, resourceParams, response, snapshotRefresh) {
|
|
1079
1093
|
const { body } = response;
|
|
1080
1094
|
const key = keyBuilder$u(luvio, resourceParams);
|
|
1081
1095
|
luvio.storeIngest(key, ingest$b, body);
|
|
1082
1096
|
const snapshot = luvio.storeLookup({
|
|
1083
1097
|
recordId: key,
|
|
1084
|
-
node: select$
|
|
1098
|
+
node: select$B(),
|
|
1085
1099
|
variables: {},
|
|
1086
1100
|
}, snapshotRefresh);
|
|
1087
1101
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1104,7 +1118,7 @@ function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
|
1104
1118
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1105
1119
|
return errorSnapshot;
|
|
1106
1120
|
}
|
|
1107
|
-
function createResourceRequest$
|
|
1121
|
+
function createResourceRequest$h(config) {
|
|
1108
1122
|
const headers = {};
|
|
1109
1123
|
return {
|
|
1110
1124
|
baseUri: '/services/data/v63.0',
|
|
@@ -1118,61 +1132,61 @@ function createResourceRequest$g(config) {
|
|
|
1118
1132
|
};
|
|
1119
1133
|
}
|
|
1120
1134
|
|
|
1121
|
-
const adapterName$
|
|
1135
|
+
const adapterName$h = 'getApps';
|
|
1122
1136
|
const getApps_ConfigPropertyMetadata = [
|
|
1123
1137
|
generateParamConfigMetadata('templateSourceId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1124
1138
|
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1125
1139
|
];
|
|
1126
|
-
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1127
|
-
const createResourceParams$
|
|
1140
|
+
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, getApps_ConfigPropertyMetadata);
|
|
1141
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$i(getApps_ConfigPropertyMetadata);
|
|
1128
1142
|
function keyBuilder$t(luvio, config) {
|
|
1129
|
-
const resourceParams = createResourceParams$
|
|
1143
|
+
const resourceParams = createResourceParams$h(config);
|
|
1130
1144
|
return keyBuilder$u(luvio, resourceParams);
|
|
1131
1145
|
}
|
|
1132
|
-
function typeCheckConfig$
|
|
1146
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
1133
1147
|
const config = {};
|
|
1134
|
-
typeCheckConfig$
|
|
1148
|
+
typeCheckConfig$i(untrustedConfig, config, getApps_ConfigPropertyMetadata);
|
|
1135
1149
|
return config;
|
|
1136
1150
|
}
|
|
1137
|
-
function validateAdapterConfig$
|
|
1151
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
1138
1152
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1139
1153
|
return null;
|
|
1140
1154
|
}
|
|
1141
1155
|
if (process.env.NODE_ENV !== 'production') {
|
|
1142
1156
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1143
1157
|
}
|
|
1144
|
-
const config = typeCheckConfig$
|
|
1158
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
1145
1159
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1146
1160
|
return null;
|
|
1147
1161
|
}
|
|
1148
1162
|
return config;
|
|
1149
1163
|
}
|
|
1150
1164
|
function adapterFragment$9(luvio, config) {
|
|
1151
|
-
createResourceParams$
|
|
1152
|
-
return select$
|
|
1165
|
+
createResourceParams$h(config);
|
|
1166
|
+
return select$B();
|
|
1153
1167
|
}
|
|
1154
1168
|
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
1155
|
-
const snapshot = ingestSuccess$
|
|
1169
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response, {
|
|
1156
1170
|
config,
|
|
1157
|
-
resolve: () => buildNetworkSnapshot$
|
|
1171
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
1158
1172
|
});
|
|
1159
1173
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1160
1174
|
}
|
|
1161
1175
|
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
1162
1176
|
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
1163
1177
|
config,
|
|
1164
|
-
resolve: () => buildNetworkSnapshot$
|
|
1178
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
1165
1179
|
});
|
|
1166
1180
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1167
1181
|
}
|
|
1168
|
-
function buildNetworkSnapshot$
|
|
1169
|
-
const resourceParams = createResourceParams$
|
|
1170
|
-
const request = createResourceRequest$
|
|
1182
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
1183
|
+
const resourceParams = createResourceParams$h(config);
|
|
1184
|
+
const request = createResourceRequest$h(resourceParams);
|
|
1171
1185
|
return luvio.dispatchResourceRequest(request, options)
|
|
1172
1186
|
.then((response) => {
|
|
1173
1187
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
1174
1188
|
const cache = new StoreKeyMap();
|
|
1175
|
-
getResponseCacheKeys$
|
|
1189
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
1176
1190
|
return cache;
|
|
1177
1191
|
});
|
|
1178
1192
|
}, (response) => {
|
|
@@ -1180,7 +1194,7 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
1180
1194
|
});
|
|
1181
1195
|
}
|
|
1182
1196
|
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
1183
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1197
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$h, undefined, false);
|
|
1184
1198
|
}
|
|
1185
1199
|
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
1186
1200
|
const { luvio, config } = context;
|
|
@@ -1191,12 +1205,12 @@ function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
|
1191
1205
|
};
|
|
1192
1206
|
const cacheSnapshot = storeLookup(selector, {
|
|
1193
1207
|
config,
|
|
1194
|
-
resolve: () => buildNetworkSnapshot$
|
|
1208
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
1195
1209
|
});
|
|
1196
1210
|
return cacheSnapshot;
|
|
1197
1211
|
}
|
|
1198
1212
|
const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untrustedConfig, requestContext) {
|
|
1199
|
-
const config = validateAdapterConfig$
|
|
1213
|
+
const config = validateAdapterConfig$h(untrustedConfig, getApps_ConfigPropertyNames);
|
|
1200
1214
|
// Invalid or incomplete config
|
|
1201
1215
|
if (config === null) {
|
|
1202
1216
|
return null;
|
|
@@ -1290,7 +1304,7 @@ function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
|
1290
1304
|
}, luvio, store, timestamp);
|
|
1291
1305
|
return input;
|
|
1292
1306
|
}
|
|
1293
|
-
const select$
|
|
1307
|
+
const select$A = function AppResultRepresentationSelect() {
|
|
1294
1308
|
return {
|
|
1295
1309
|
kind: 'Fragment',
|
|
1296
1310
|
version: VERSION$l,
|
|
@@ -1299,7 +1313,7 @@ const select$z = function AppResultRepresentationSelect() {
|
|
|
1299
1313
|
{
|
|
1300
1314
|
name: 'app',
|
|
1301
1315
|
kind: 'Link',
|
|
1302
|
-
fragment: select$
|
|
1316
|
+
fragment: select$D()
|
|
1303
1317
|
},
|
|
1304
1318
|
{
|
|
1305
1319
|
name: 'failureMessage',
|
|
@@ -1368,19 +1382,19 @@ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1368
1382
|
getTypeCacheKeys$c(rootKeySet, luvio, input.app);
|
|
1369
1383
|
}
|
|
1370
1384
|
|
|
1371
|
-
function select$
|
|
1372
|
-
return select$
|
|
1385
|
+
function select$z(luvio, params) {
|
|
1386
|
+
return select$A();
|
|
1373
1387
|
}
|
|
1374
|
-
function getResponseCacheKeys$
|
|
1388
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
1375
1389
|
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
1376
1390
|
}
|
|
1377
|
-
function ingestSuccess$
|
|
1391
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
1378
1392
|
const { body } = response;
|
|
1379
1393
|
const key = keyBuilderFromType$8(luvio, body);
|
|
1380
1394
|
luvio.storeIngest(key, ingest$a, body);
|
|
1381
1395
|
const snapshot = luvio.storeLookup({
|
|
1382
1396
|
recordId: key,
|
|
1383
|
-
node: select$
|
|
1397
|
+
node: select$z(),
|
|
1384
1398
|
variables: {},
|
|
1385
1399
|
});
|
|
1386
1400
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1391,7 +1405,7 @@ function ingestSuccess$d(luvio, resourceParams, response) {
|
|
|
1391
1405
|
deepFreeze(snapshot.data);
|
|
1392
1406
|
return snapshot;
|
|
1393
1407
|
}
|
|
1394
|
-
function createResourceRequest$
|
|
1408
|
+
function createResourceRequest$g(config) {
|
|
1395
1409
|
const headers = {};
|
|
1396
1410
|
return {
|
|
1397
1411
|
baseUri: '/services/data/v63.0',
|
|
@@ -1405,7 +1419,7 @@ function createResourceRequest$f(config) {
|
|
|
1405
1419
|
};
|
|
1406
1420
|
}
|
|
1407
1421
|
|
|
1408
|
-
const adapterName$
|
|
1422
|
+
const adapterName$g = 'createApp';
|
|
1409
1423
|
const createApp_ConfigPropertyMetadata = [
|
|
1410
1424
|
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1411
1425
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -1418,11 +1432,11 @@ const createApp_ConfigPropertyMetadata = [
|
|
|
1418
1432
|
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1419
1433
|
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1420
1434
|
];
|
|
1421
|
-
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1422
|
-
const createResourceParams$
|
|
1423
|
-
function typeCheckConfig$
|
|
1435
|
+
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, createApp_ConfigPropertyMetadata);
|
|
1436
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$i(createApp_ConfigPropertyMetadata);
|
|
1437
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
1424
1438
|
const config = {};
|
|
1425
|
-
typeCheckConfig$
|
|
1439
|
+
typeCheckConfig$i(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1426
1440
|
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1427
1441
|
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1428
1442
|
const untrustedConfig_templateValues_object = {};
|
|
@@ -1440,30 +1454,30 @@ function typeCheckConfig$f(untrustedConfig) {
|
|
|
1440
1454
|
}
|
|
1441
1455
|
return config;
|
|
1442
1456
|
}
|
|
1443
|
-
function validateAdapterConfig$
|
|
1457
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
1444
1458
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1445
1459
|
return null;
|
|
1446
1460
|
}
|
|
1447
1461
|
if (process.env.NODE_ENV !== 'production') {
|
|
1448
1462
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1449
1463
|
}
|
|
1450
|
-
const config = typeCheckConfig$
|
|
1464
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
1451
1465
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1452
1466
|
return null;
|
|
1453
1467
|
}
|
|
1454
1468
|
return config;
|
|
1455
1469
|
}
|
|
1456
|
-
function buildNetworkSnapshot$
|
|
1457
|
-
const resourceParams = createResourceParams$
|
|
1458
|
-
const request = createResourceRequest$
|
|
1470
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
1471
|
+
const resourceParams = createResourceParams$g(config);
|
|
1472
|
+
const request = createResourceRequest$g(resourceParams);
|
|
1459
1473
|
return luvio.dispatchResourceRequest(request, options)
|
|
1460
1474
|
.then((response) => {
|
|
1461
1475
|
return luvio.handleSuccessResponse(() => {
|
|
1462
|
-
const snapshot = ingestSuccess$
|
|
1476
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
1463
1477
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1464
1478
|
}, () => {
|
|
1465
1479
|
const cache = new StoreKeyMap();
|
|
1466
|
-
getResponseCacheKeys$
|
|
1480
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
1467
1481
|
return cache;
|
|
1468
1482
|
});
|
|
1469
1483
|
}, (response) => {
|
|
@@ -1473,12 +1487,12 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
1473
1487
|
}
|
|
1474
1488
|
const createAppAdapterFactory = (luvio) => {
|
|
1475
1489
|
return function createApp(untrustedConfig) {
|
|
1476
|
-
const config = validateAdapterConfig$
|
|
1490
|
+
const config = validateAdapterConfig$g(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1477
1491
|
// Invalid or incomplete config
|
|
1478
1492
|
if (config === null) {
|
|
1479
1493
|
throw new Error('Invalid config for "createApp"');
|
|
1480
1494
|
}
|
|
1481
|
-
return buildNetworkSnapshot$
|
|
1495
|
+
return buildNetworkSnapshot$g(luvio, config);
|
|
1482
1496
|
};
|
|
1483
1497
|
};
|
|
1484
1498
|
|
|
@@ -1487,7 +1501,7 @@ function keyBuilder$r(luvio, params) {
|
|
|
1487
1501
|
id: params.urlParams.appIdOrApiName
|
|
1488
1502
|
});
|
|
1489
1503
|
}
|
|
1490
|
-
function getResponseCacheKeys$
|
|
1504
|
+
function getResponseCacheKeys$f(cacheKeyMap, luvio, resourceParams) {
|
|
1491
1505
|
const key = keyBuilder$r(luvio, resourceParams);
|
|
1492
1506
|
cacheKeyMap.set(key, {
|
|
1493
1507
|
namespace: keyPrefix,
|
|
@@ -1499,7 +1513,7 @@ function evictSuccess$1(luvio, resourceParams) {
|
|
|
1499
1513
|
const key = keyBuilder$r(luvio, resourceParams);
|
|
1500
1514
|
luvio.storeEvict(key);
|
|
1501
1515
|
}
|
|
1502
|
-
function createResourceRequest$
|
|
1516
|
+
function createResourceRequest$f(config) {
|
|
1503
1517
|
const headers = {};
|
|
1504
1518
|
return {
|
|
1505
1519
|
baseUri: '/services/data/v63.0',
|
|
@@ -1513,33 +1527,33 @@ function createResourceRequest$e(config) {
|
|
|
1513
1527
|
};
|
|
1514
1528
|
}
|
|
1515
1529
|
|
|
1516
|
-
const adapterName$
|
|
1530
|
+
const adapterName$f = 'deleteApp';
|
|
1517
1531
|
const deleteApp_ConfigPropertyMetadata = [
|
|
1518
1532
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1519
1533
|
];
|
|
1520
|
-
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1521
|
-
const createResourceParams$
|
|
1522
|
-
function typeCheckConfig$
|
|
1534
|
+
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, deleteApp_ConfigPropertyMetadata);
|
|
1535
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$i(deleteApp_ConfigPropertyMetadata);
|
|
1536
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
1523
1537
|
const config = {};
|
|
1524
|
-
typeCheckConfig$
|
|
1538
|
+
typeCheckConfig$i(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1525
1539
|
return config;
|
|
1526
1540
|
}
|
|
1527
|
-
function validateAdapterConfig$
|
|
1541
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
1528
1542
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1529
1543
|
return null;
|
|
1530
1544
|
}
|
|
1531
1545
|
if (process.env.NODE_ENV !== 'production') {
|
|
1532
1546
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1533
1547
|
}
|
|
1534
|
-
const config = typeCheckConfig$
|
|
1548
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
1535
1549
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1536
1550
|
return null;
|
|
1537
1551
|
}
|
|
1538
1552
|
return config;
|
|
1539
1553
|
}
|
|
1540
|
-
function buildNetworkSnapshot$
|
|
1541
|
-
const resourceParams = createResourceParams$
|
|
1542
|
-
const request = createResourceRequest$
|
|
1554
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
1555
|
+
const resourceParams = createResourceParams$f(config);
|
|
1556
|
+
const request = createResourceRequest$f(resourceParams);
|
|
1543
1557
|
return luvio.dispatchResourceRequest(request, options)
|
|
1544
1558
|
.then(() => {
|
|
1545
1559
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -1547,7 +1561,7 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
1547
1561
|
return luvio.storeBroadcast();
|
|
1548
1562
|
}, () => {
|
|
1549
1563
|
const cache = new StoreKeyMap();
|
|
1550
|
-
getResponseCacheKeys$
|
|
1564
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams);
|
|
1551
1565
|
return cache;
|
|
1552
1566
|
});
|
|
1553
1567
|
}, (response) => {
|
|
@@ -1557,33 +1571,33 @@ function buildNetworkSnapshot$e(luvio, config, options) {
|
|
|
1557
1571
|
}
|
|
1558
1572
|
const deleteAppAdapterFactory = (luvio) => {
|
|
1559
1573
|
return function AppFrameworkdeleteApp(untrustedConfig) {
|
|
1560
|
-
const config = validateAdapterConfig$
|
|
1574
|
+
const config = validateAdapterConfig$f(untrustedConfig, deleteApp_ConfigPropertyNames);
|
|
1561
1575
|
// Invalid or incomplete config
|
|
1562
1576
|
if (config === null) {
|
|
1563
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1577
|
+
throw new Error(`Invalid config for "${adapterName$f}"`);
|
|
1564
1578
|
}
|
|
1565
|
-
return buildNetworkSnapshot$
|
|
1579
|
+
return buildNetworkSnapshot$f(luvio, config);
|
|
1566
1580
|
};
|
|
1567
1581
|
};
|
|
1568
1582
|
|
|
1569
|
-
function select$
|
|
1570
|
-
return select$
|
|
1583
|
+
function select$y(luvio, params) {
|
|
1584
|
+
return select$D();
|
|
1571
1585
|
}
|
|
1572
1586
|
function keyBuilder$q(luvio, params) {
|
|
1573
1587
|
return keyBuilder$v(luvio, {
|
|
1574
1588
|
id: params.urlParams.appIdOrApiName
|
|
1575
1589
|
});
|
|
1576
1590
|
}
|
|
1577
|
-
function getResponseCacheKeys$
|
|
1591
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
1578
1592
|
getTypeCacheKeys$c(storeKeyMap, luvio, response);
|
|
1579
1593
|
}
|
|
1580
|
-
function ingestSuccess$
|
|
1594
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
1581
1595
|
const { body } = response;
|
|
1582
1596
|
const key = keyBuilder$q(luvio, resourceParams);
|
|
1583
1597
|
luvio.storeIngest(key, ingest$c, body);
|
|
1584
1598
|
const snapshot = luvio.storeLookup({
|
|
1585
1599
|
recordId: key,
|
|
1586
|
-
node: select$
|
|
1600
|
+
node: select$y(),
|
|
1587
1601
|
variables: {},
|
|
1588
1602
|
}, snapshotRefresh);
|
|
1589
1603
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1606,7 +1620,7 @@ function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
|
1606
1620
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1607
1621
|
return errorSnapshot;
|
|
1608
1622
|
}
|
|
1609
|
-
function createResourceRequest$
|
|
1623
|
+
function createResourceRequest$e(config) {
|
|
1610
1624
|
const headers = {};
|
|
1611
1625
|
return {
|
|
1612
1626
|
baseUri: '/services/data/v63.0',
|
|
@@ -1620,60 +1634,60 @@ function createResourceRequest$d(config) {
|
|
|
1620
1634
|
};
|
|
1621
1635
|
}
|
|
1622
1636
|
|
|
1623
|
-
const adapterName$
|
|
1637
|
+
const adapterName$e = 'getApp';
|
|
1624
1638
|
const getApp_ConfigPropertyMetadata = [
|
|
1625
1639
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1626
1640
|
];
|
|
1627
|
-
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1628
|
-
const createResourceParams$
|
|
1641
|
+
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, getApp_ConfigPropertyMetadata);
|
|
1642
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$i(getApp_ConfigPropertyMetadata);
|
|
1629
1643
|
function keyBuilder$p(luvio, config) {
|
|
1630
|
-
const resourceParams = createResourceParams$
|
|
1644
|
+
const resourceParams = createResourceParams$e(config);
|
|
1631
1645
|
return keyBuilder$q(luvio, resourceParams);
|
|
1632
1646
|
}
|
|
1633
|
-
function typeCheckConfig$
|
|
1647
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
1634
1648
|
const config = {};
|
|
1635
|
-
typeCheckConfig$
|
|
1649
|
+
typeCheckConfig$i(untrustedConfig, config, getApp_ConfigPropertyMetadata);
|
|
1636
1650
|
return config;
|
|
1637
1651
|
}
|
|
1638
|
-
function validateAdapterConfig$
|
|
1652
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
1639
1653
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1640
1654
|
return null;
|
|
1641
1655
|
}
|
|
1642
1656
|
if (process.env.NODE_ENV !== 'production') {
|
|
1643
1657
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1644
1658
|
}
|
|
1645
|
-
const config = typeCheckConfig$
|
|
1659
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
1646
1660
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1647
1661
|
return null;
|
|
1648
1662
|
}
|
|
1649
1663
|
return config;
|
|
1650
1664
|
}
|
|
1651
1665
|
function adapterFragment$8(luvio, config) {
|
|
1652
|
-
createResourceParams$
|
|
1653
|
-
return select$
|
|
1666
|
+
createResourceParams$e(config);
|
|
1667
|
+
return select$y();
|
|
1654
1668
|
}
|
|
1655
1669
|
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1656
|
-
const snapshot = ingestSuccess$
|
|
1670
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
1657
1671
|
config,
|
|
1658
|
-
resolve: () => buildNetworkSnapshot$
|
|
1672
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
1659
1673
|
});
|
|
1660
1674
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1661
1675
|
}
|
|
1662
1676
|
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
1663
1677
|
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1664
1678
|
config,
|
|
1665
|
-
resolve: () => buildNetworkSnapshot$
|
|
1679
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
1666
1680
|
});
|
|
1667
1681
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1668
1682
|
}
|
|
1669
|
-
function buildNetworkSnapshot$
|
|
1670
|
-
const resourceParams = createResourceParams$
|
|
1671
|
-
const request = createResourceRequest$
|
|
1683
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
1684
|
+
const resourceParams = createResourceParams$e(config);
|
|
1685
|
+
const request = createResourceRequest$e(resourceParams);
|
|
1672
1686
|
return luvio.dispatchResourceRequest(request, options)
|
|
1673
1687
|
.then((response) => {
|
|
1674
1688
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
1675
1689
|
const cache = new StoreKeyMap();
|
|
1676
|
-
getResponseCacheKeys$
|
|
1690
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
1677
1691
|
return cache;
|
|
1678
1692
|
});
|
|
1679
1693
|
}, (response) => {
|
|
@@ -1681,7 +1695,7 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
1681
1695
|
});
|
|
1682
1696
|
}
|
|
1683
1697
|
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
1684
|
-
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1698
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, undefined, false);
|
|
1685
1699
|
}
|
|
1686
1700
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1687
1701
|
const { luvio, config } = context;
|
|
@@ -1692,12 +1706,12 @@ function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
|
1692
1706
|
};
|
|
1693
1707
|
const cacheSnapshot = storeLookup(selector, {
|
|
1694
1708
|
config,
|
|
1695
|
-
resolve: () => buildNetworkSnapshot$
|
|
1709
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
1696
1710
|
});
|
|
1697
1711
|
return cacheSnapshot;
|
|
1698
1712
|
}
|
|
1699
1713
|
const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedConfig, requestContext) {
|
|
1700
|
-
const config = validateAdapterConfig$
|
|
1714
|
+
const config = validateAdapterConfig$e(untrustedConfig, getApp_ConfigPropertyNames);
|
|
1701
1715
|
// Invalid or incomplete config
|
|
1702
1716
|
if (config === null) {
|
|
1703
1717
|
return null;
|
|
@@ -1706,6 +1720,115 @@ const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedC
|
|
|
1706
1720
|
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
1707
1721
|
};
|
|
1708
1722
|
|
|
1723
|
+
function select$x(luvio, params) {
|
|
1724
|
+
return select$A();
|
|
1725
|
+
}
|
|
1726
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
1727
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
1728
|
+
}
|
|
1729
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
1730
|
+
const { body } = response;
|
|
1731
|
+
const key = keyBuilderFromType$8(luvio, body);
|
|
1732
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1733
|
+
const snapshot = luvio.storeLookup({
|
|
1734
|
+
recordId: key,
|
|
1735
|
+
node: select$x(),
|
|
1736
|
+
variables: {},
|
|
1737
|
+
});
|
|
1738
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1739
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1740
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
deepFreeze(snapshot.data);
|
|
1744
|
+
return snapshot;
|
|
1745
|
+
}
|
|
1746
|
+
function createResourceRequest$d(config) {
|
|
1747
|
+
const headers = {};
|
|
1748
|
+
return {
|
|
1749
|
+
baseUri: '/services/data/v63.0',
|
|
1750
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '',
|
|
1751
|
+
method: 'put',
|
|
1752
|
+
body: config.body,
|
|
1753
|
+
urlParams: config.urlParams,
|
|
1754
|
+
queryParams: {},
|
|
1755
|
+
headers,
|
|
1756
|
+
priority: 'normal',
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
const adapterName$d = 'updateApp';
|
|
1761
|
+
const updateApp_ConfigPropertyMetadata = [
|
|
1762
|
+
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1763
|
+
generateParamConfigMetadata('logLevel', false, 2 /* Body */, 0 /* String */),
|
|
1764
|
+
generateParamConfigMetadata('runtimeMethod', false, 2 /* Body */, 0 /* String */),
|
|
1765
|
+
generateParamConfigMetadata('templateSourceId', true, 2 /* Body */, 0 /* String */),
|
|
1766
|
+
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1767
|
+
];
|
|
1768
|
+
const updateApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, updateApp_ConfigPropertyMetadata);
|
|
1769
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$i(updateApp_ConfigPropertyMetadata);
|
|
1770
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
1771
|
+
const config = {};
|
|
1772
|
+
typeCheckConfig$i(untrustedConfig, config, updateApp_ConfigPropertyMetadata);
|
|
1773
|
+
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1774
|
+
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1775
|
+
const untrustedConfig_templateValues_object = {};
|
|
1776
|
+
const untrustedConfig_templateValues_keys = Object.keys(untrustedConfig_templateValues);
|
|
1777
|
+
for (let i = 0, arrayLength = untrustedConfig_templateValues_keys.length; i < arrayLength; i++) {
|
|
1778
|
+
const key = untrustedConfig_templateValues_keys[i];
|
|
1779
|
+
const untrustedConfig_templateValues_prop = untrustedConfig_templateValues[key];
|
|
1780
|
+
if (untrustedConfig_templateValues_object !== undefined) {
|
|
1781
|
+
untrustedConfig_templateValues_object[key] = untrustedConfig_templateValues_prop;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
if (untrustedConfig_templateValues_object !== undefined && Object.keys(untrustedConfig_templateValues_object).length >= 0) {
|
|
1785
|
+
config.templateValues = untrustedConfig_templateValues_object;
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
return config;
|
|
1789
|
+
}
|
|
1790
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
1791
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1792
|
+
return null;
|
|
1793
|
+
}
|
|
1794
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1795
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1796
|
+
}
|
|
1797
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
1798
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1799
|
+
return null;
|
|
1800
|
+
}
|
|
1801
|
+
return config;
|
|
1802
|
+
}
|
|
1803
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
1804
|
+
const resourceParams = createResourceParams$d(config);
|
|
1805
|
+
const request = createResourceRequest$d(resourceParams);
|
|
1806
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1807
|
+
.then((response) => {
|
|
1808
|
+
return luvio.handleSuccessResponse(() => {
|
|
1809
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
1810
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1811
|
+
}, () => {
|
|
1812
|
+
const cache = new StoreKeyMap();
|
|
1813
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
1814
|
+
return cache;
|
|
1815
|
+
});
|
|
1816
|
+
}, (response) => {
|
|
1817
|
+
deepFreeze(response);
|
|
1818
|
+
throw response;
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
const updateAppAdapterFactory = (luvio) => {
|
|
1822
|
+
return function updateApp(untrustedConfig) {
|
|
1823
|
+
const config = validateAdapterConfig$d(untrustedConfig, updateApp_ConfigPropertyNames);
|
|
1824
|
+
// Invalid or incomplete config
|
|
1825
|
+
if (config === null) {
|
|
1826
|
+
throw new Error('Invalid config for "updateApp"');
|
|
1827
|
+
}
|
|
1828
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1709
1832
|
const TTL$9 = 5000;
|
|
1710
1833
|
const VERSION$k = "b8e879a936b5069ec247355c66198ca7";
|
|
1711
1834
|
function validate$r(obj, path = 'AppActivityItemRepresentation') {
|
|
@@ -2027,14 +2150,14 @@ const getAppActivities_ConfigPropertyMetadata = [
|
|
|
2027
2150
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2028
2151
|
];
|
|
2029
2152
|
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getAppActivities_ConfigPropertyMetadata);
|
|
2030
|
-
const createResourceParams$c = /*#__PURE__*/ createResourceParams$
|
|
2153
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$i(getAppActivities_ConfigPropertyMetadata);
|
|
2031
2154
|
function keyBuilder$l(luvio, config) {
|
|
2032
2155
|
const resourceParams = createResourceParams$c(config);
|
|
2033
2156
|
return keyBuilder$m(luvio, resourceParams);
|
|
2034
2157
|
}
|
|
2035
2158
|
function typeCheckConfig$c(untrustedConfig) {
|
|
2036
2159
|
const config = {};
|
|
2037
|
-
typeCheckConfig$
|
|
2160
|
+
typeCheckConfig$i(untrustedConfig, config, getAppActivities_ConfigPropertyMetadata);
|
|
2038
2161
|
return config;
|
|
2039
2162
|
}
|
|
2040
2163
|
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
@@ -2169,14 +2292,14 @@ const getAppActivity_ConfigPropertyMetadata = [
|
|
|
2169
2292
|
generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2170
2293
|
];
|
|
2171
2294
|
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getAppActivity_ConfigPropertyMetadata);
|
|
2172
|
-
const createResourceParams$b = /*#__PURE__*/ createResourceParams$
|
|
2295
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$i(getAppActivity_ConfigPropertyMetadata);
|
|
2173
2296
|
function keyBuilder$j(luvio, config) {
|
|
2174
2297
|
const resourceParams = createResourceParams$b(config);
|
|
2175
2298
|
return keyBuilder$k(luvio, resourceParams);
|
|
2176
2299
|
}
|
|
2177
2300
|
function typeCheckConfig$b(untrustedConfig) {
|
|
2178
2301
|
const config = {};
|
|
2179
|
-
typeCheckConfig$
|
|
2302
|
+
typeCheckConfig$i(untrustedConfig, config, getAppActivity_ConfigPropertyMetadata);
|
|
2180
2303
|
return config;
|
|
2181
2304
|
}
|
|
2182
2305
|
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
@@ -2704,14 +2827,14 @@ const getAppAssets_ConfigPropertyMetadata = [
|
|
|
2704
2827
|
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2705
2828
|
];
|
|
2706
2829
|
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getAppAssets_ConfigPropertyMetadata);
|
|
2707
|
-
const createResourceParams$a = /*#__PURE__*/ createResourceParams$
|
|
2830
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$i(getAppAssets_ConfigPropertyMetadata);
|
|
2708
2831
|
function keyBuilder$f(luvio, config) {
|
|
2709
2832
|
const resourceParams = createResourceParams$a(config);
|
|
2710
2833
|
return keyBuilder$g(luvio, resourceParams);
|
|
2711
2834
|
}
|
|
2712
2835
|
function typeCheckConfig$a(untrustedConfig) {
|
|
2713
2836
|
const config = {};
|
|
2714
|
-
typeCheckConfig$
|
|
2837
|
+
typeCheckConfig$i(untrustedConfig, config, getAppAssets_ConfigPropertyMetadata);
|
|
2715
2838
|
return config;
|
|
2716
2839
|
}
|
|
2717
2840
|
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
@@ -2939,14 +3062,14 @@ const getInstalledAssets_ConfigPropertyMetadata = [
|
|
|
2939
3062
|
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2940
3063
|
];
|
|
2941
3064
|
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getInstalledAssets_ConfigPropertyMetadata);
|
|
2942
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$
|
|
3065
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$i(getInstalledAssets_ConfigPropertyMetadata);
|
|
2943
3066
|
function keyBuilder$d(luvio, config) {
|
|
2944
3067
|
const resourceParams = createResourceParams$9(config);
|
|
2945
3068
|
return keyBuilder$e(luvio, resourceParams);
|
|
2946
3069
|
}
|
|
2947
3070
|
function typeCheckConfig$9(untrustedConfig) {
|
|
2948
3071
|
const config = {};
|
|
2949
|
-
typeCheckConfig$
|
|
3072
|
+
typeCheckConfig$i(untrustedConfig, config, getInstalledAssets_ConfigPropertyMetadata);
|
|
2950
3073
|
return config;
|
|
2951
3074
|
}
|
|
2952
3075
|
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
@@ -4583,7 +4706,7 @@ function createResourceRequest$8(config) {
|
|
|
4583
4706
|
const adapterName$8 = 'getTemplates';
|
|
4584
4707
|
const getTemplates_ConfigPropertyMetadata = [];
|
|
4585
4708
|
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getTemplates_ConfigPropertyMetadata);
|
|
4586
|
-
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$
|
|
4709
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$i(getTemplates_ConfigPropertyMetadata);
|
|
4587
4710
|
function keyBuilder$a(luvio, config) {
|
|
4588
4711
|
createResourceParams$8(config);
|
|
4589
4712
|
return keyBuilder$b();
|
|
@@ -4883,10 +5006,10 @@ const createTemplate_ConfigPropertyMetadata = [
|
|
|
4883
5006
|
generateParamConfigMetadata('variableDefinition', false, 2 /* Body */, 0 /* String */),
|
|
4884
5007
|
];
|
|
4885
5008
|
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createTemplate_ConfigPropertyMetadata);
|
|
4886
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
5009
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$i(createTemplate_ConfigPropertyMetadata);
|
|
4887
5010
|
function typeCheckConfig$7(untrustedConfig) {
|
|
4888
5011
|
const config = {};
|
|
4889
|
-
typeCheckConfig$
|
|
5012
|
+
typeCheckConfig$i(untrustedConfig, config, createTemplate_ConfigPropertyMetadata);
|
|
4890
5013
|
const untrustedConfig_chainDefinitions = untrustedConfig.chainDefinitions;
|
|
4891
5014
|
if (ArrayIsArray$1(untrustedConfig_chainDefinitions)) {
|
|
4892
5015
|
const untrustedConfig_chainDefinitions_array = [];
|
|
@@ -5039,14 +5162,14 @@ const getTemplate_ConfigPropertyMetadata = [
|
|
|
5039
5162
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5040
5163
|
];
|
|
5041
5164
|
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getTemplate_ConfigPropertyMetadata);
|
|
5042
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
5165
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$i(getTemplate_ConfigPropertyMetadata);
|
|
5043
5166
|
function keyBuilder$8(luvio, config) {
|
|
5044
5167
|
const resourceParams = createResourceParams$6(config);
|
|
5045
5168
|
return keyBuilder$9(luvio, resourceParams);
|
|
5046
5169
|
}
|
|
5047
5170
|
function typeCheckConfig$6(untrustedConfig) {
|
|
5048
5171
|
const config = {};
|
|
5049
|
-
typeCheckConfig$
|
|
5172
|
+
typeCheckConfig$i(untrustedConfig, config, getTemplate_ConfigPropertyMetadata);
|
|
5050
5173
|
return config;
|
|
5051
5174
|
}
|
|
5052
5175
|
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
@@ -5165,10 +5288,10 @@ const updateTemplate_ConfigPropertyMetadata = [
|
|
|
5165
5288
|
generateParamConfigMetadata('label', false, 2 /* Body */, 0 /* String */),
|
|
5166
5289
|
];
|
|
5167
5290
|
const updateTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, updateTemplate_ConfigPropertyMetadata);
|
|
5168
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
5291
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$i(updateTemplate_ConfigPropertyMetadata);
|
|
5169
5292
|
function typeCheckConfig$5(untrustedConfig) {
|
|
5170
5293
|
const config = {};
|
|
5171
|
-
typeCheckConfig$
|
|
5294
|
+
typeCheckConfig$i(untrustedConfig, config, updateTemplate_ConfigPropertyMetadata);
|
|
5172
5295
|
const untrustedConfig_releaseInfo = untrustedConfig.releaseInfo;
|
|
5173
5296
|
const referenceReleaseInfoInputRepresentationValidationError = validate$a(untrustedConfig_releaseInfo);
|
|
5174
5297
|
if (referenceReleaseInfoInputRepresentationValidationError === null) {
|
|
@@ -5254,10 +5377,10 @@ const deleteTemplate_ConfigPropertyMetadata = [
|
|
|
5254
5377
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5255
5378
|
];
|
|
5256
5379
|
const deleteTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, deleteTemplate_ConfigPropertyMetadata);
|
|
5257
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
5380
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$i(deleteTemplate_ConfigPropertyMetadata);
|
|
5258
5381
|
function typeCheckConfig$4(untrustedConfig) {
|
|
5259
5382
|
const config = {};
|
|
5260
|
-
typeCheckConfig$
|
|
5383
|
+
typeCheckConfig$i(untrustedConfig, config, deleteTemplate_ConfigPropertyMetadata);
|
|
5261
5384
|
return config;
|
|
5262
5385
|
}
|
|
5263
5386
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -5959,14 +6082,14 @@ const getTemplateConfig_ConfigPropertyMetadata = [
|
|
|
5959
6082
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
5960
6083
|
];
|
|
5961
6084
|
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getTemplateConfig_ConfigPropertyMetadata);
|
|
5962
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
6085
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$i(getTemplateConfig_ConfigPropertyMetadata);
|
|
5963
6086
|
function keyBuilder$4(luvio, config) {
|
|
5964
6087
|
const resourceParams = createResourceParams$3(config);
|
|
5965
6088
|
return keyBuilder$5(luvio, resourceParams);
|
|
5966
6089
|
}
|
|
5967
6090
|
function typeCheckConfig$3(untrustedConfig) {
|
|
5968
6091
|
const config = {};
|
|
5969
|
-
typeCheckConfig$
|
|
6092
|
+
typeCheckConfig$i(untrustedConfig, config, getTemplateConfig_ConfigPropertyMetadata);
|
|
5970
6093
|
return config;
|
|
5971
6094
|
}
|
|
5972
6095
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -6312,10 +6435,10 @@ const readinessCheck_ConfigPropertyMetadata = [
|
|
|
6312
6435
|
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
6313
6436
|
];
|
|
6314
6437
|
const readinessCheck_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, readinessCheck_ConfigPropertyMetadata);
|
|
6315
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
6438
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$i(readinessCheck_ConfigPropertyMetadata);
|
|
6316
6439
|
function typeCheckConfig$2(untrustedConfig) {
|
|
6317
6440
|
const config = {};
|
|
6318
|
-
typeCheckConfig$
|
|
6441
|
+
typeCheckConfig$i(untrustedConfig, config, readinessCheck_ConfigPropertyMetadata);
|
|
6319
6442
|
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
6320
6443
|
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
6321
6444
|
const untrustedConfig_templateValues_object = {};
|
|
@@ -6534,14 +6657,14 @@ const getTags_ConfigPropertyMetadata = [
|
|
|
6534
6657
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
6535
6658
|
];
|
|
6536
6659
|
const getTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTags_ConfigPropertyMetadata);
|
|
6537
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
6660
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$i(getTags_ConfigPropertyMetadata);
|
|
6538
6661
|
function keyBuilder(luvio, config) {
|
|
6539
6662
|
const resourceParams = createResourceParams$1(config);
|
|
6540
6663
|
return keyBuilder$1(luvio, resourceParams);
|
|
6541
6664
|
}
|
|
6542
6665
|
function typeCheckConfig$1(untrustedConfig) {
|
|
6543
6666
|
const config = {};
|
|
6544
|
-
typeCheckConfig$
|
|
6667
|
+
typeCheckConfig$i(untrustedConfig, config, getTags_ConfigPropertyMetadata);
|
|
6545
6668
|
return config;
|
|
6546
6669
|
}
|
|
6547
6670
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -6658,10 +6781,10 @@ const setTags_ConfigPropertyMetadata = [
|
|
|
6658
6781
|
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
6659
6782
|
];
|
|
6660
6783
|
const setTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, setTags_ConfigPropertyMetadata);
|
|
6661
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
6784
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$i(setTags_ConfigPropertyMetadata);
|
|
6662
6785
|
function typeCheckConfig(untrustedConfig) {
|
|
6663
6786
|
const config = {};
|
|
6664
|
-
typeCheckConfig$
|
|
6787
|
+
typeCheckConfig$i(untrustedConfig, config, setTags_ConfigPropertyMetadata);
|
|
6665
6788
|
const untrustedConfig_tags = untrustedConfig.tags;
|
|
6666
6789
|
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
6667
6790
|
const untrustedConfig_tags_object = {};
|
|
@@ -6721,4 +6844,4 @@ const setTagsAdapterFactory = (luvio) => {
|
|
|
6721
6844
|
};
|
|
6722
6845
|
};
|
|
6723
6846
|
|
|
6724
|
-
export { createAppAdapterFactory, createTemplateAdapterFactory, deleteAppAdapterFactory, deleteTemplateAdapterFactory, getAppActivitiesAdapterFactory, getAppActivityAdapterFactory, getAppAdapterFactory, getAppAssetsAdapterFactory, getAppsAdapterFactory, getInstalledAssetsAdapterFactory, getTagsAdapterFactory, getTemplateAdapterFactory, getTemplateConfigAdapterFactory, getTemplatesAdapterFactory, readinessCheckAdapterFactory, setTagsAdapterFactory, updateTemplateAdapterFactory };
|
|
6847
|
+
export { createAppAdapterFactory, createTemplateAdapterFactory, deleteAppAdapterFactory, deleteTemplateAdapterFactory, getAppActivitiesAdapterFactory, getAppActivityAdapterFactory, getAppAdapterFactory, getAppAssetsAdapterFactory, getAppsAdapterFactory, getInstalledAssetsAdapterFactory, getTagsAdapterFactory, getTemplateAdapterFactory, getTemplateConfigAdapterFactory, getTemplatesAdapterFactory, readinessCheckAdapterFactory, setTagsAdapterFactory, updateAppAdapterFactory, updateTemplateAdapterFactory };
|