@salesforce/lds-adapters-analytics-app-framework 1.319.0 → 1.321.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/analytics-app-framework.js +664 -290
- package/dist/es/es2018/types/src/generated/adapters/createTemplate.d.ts +35 -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/postAppFrameworkTemplates.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/TemplateInputRepresentation.d.ts +15 -11
- package/dist/es/es2018/types/src/generated/types/TemplateRepresentation.d.ts +14 -1
- package/package.json +3 -3
- package/sfdc/index.js +888 -511
- package/src/raml/api.raml +33 -4
- package/src/raml/luvio.raml +3 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$c, typeCheckConfig as typeCheckConfig$c, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$9 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -123,7 +123,7 @@ function createLink(ref) {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
const VERSION$i = "8747a45321deaf63f65cf74537b07eb6";
|
|
126
|
-
function validate$
|
|
126
|
+
function validate$l(obj, path = 'UserRepresentation') {
|
|
127
127
|
const v_error = (() => {
|
|
128
128
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
129
129
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -167,7 +167,7 @@ function validate$f(obj, path = 'UserRepresentation') {
|
|
|
167
167
|
})();
|
|
168
168
|
return v_error === undefined ? null : v_error;
|
|
169
169
|
}
|
|
170
|
-
const select$
|
|
170
|
+
const select$t = function UserRepresentationSelect() {
|
|
171
171
|
return {
|
|
172
172
|
kind: 'Fragment',
|
|
173
173
|
version: VERSION$i,
|
|
@@ -208,7 +208,7 @@ function equals$f(existing, incoming) {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
const VERSION$h = "74662b770f974cec987197380f2580ea";
|
|
211
|
-
function validate$
|
|
211
|
+
function validate$k(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
212
212
|
const v_error = (() => {
|
|
213
213
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
214
214
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -227,7 +227,7 @@ function validate$e(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
|
227
227
|
})();
|
|
228
228
|
return v_error === undefined ? null : v_error;
|
|
229
229
|
}
|
|
230
|
-
const select$
|
|
230
|
+
const select$s = function ScheduledTimezoneRepresentationSelect() {
|
|
231
231
|
return {
|
|
232
232
|
kind: 'Fragment',
|
|
233
233
|
version: VERSION$h,
|
|
@@ -268,7 +268,7 @@ function equals$e(existing, incoming) {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
const VERSION$g = "d96bf6818be64d5924beaaad8e684221";
|
|
271
|
-
function validate$
|
|
271
|
+
function validate$j(obj, path = 'ScheduledTimeRepresentation') {
|
|
272
272
|
const v_error = (() => {
|
|
273
273
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
274
274
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -285,7 +285,7 @@ function validate$d(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
285
285
|
}
|
|
286
286
|
const obj_timezone = obj.timezone;
|
|
287
287
|
const path_timezone = path + '.timezone';
|
|
288
|
-
const referencepath_timezoneValidationError = validate$
|
|
288
|
+
const referencepath_timezoneValidationError = validate$k(obj_timezone, path_timezone);
|
|
289
289
|
if (referencepath_timezoneValidationError !== null) {
|
|
290
290
|
let message = 'Object doesn\'t match ScheduledTimezoneRepresentation (at "' + path_timezone + '")\n';
|
|
291
291
|
message += referencepath_timezoneValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -294,8 +294,8 @@ function validate$d(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
294
294
|
})();
|
|
295
295
|
return v_error === undefined ? null : v_error;
|
|
296
296
|
}
|
|
297
|
-
const select$
|
|
298
|
-
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$
|
|
297
|
+
const select$r = function ScheduledTimeRepresentationSelect() {
|
|
298
|
+
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$s();
|
|
299
299
|
return {
|
|
300
300
|
kind: 'Fragment',
|
|
301
301
|
version: VERSION$g,
|
|
@@ -337,8 +337,8 @@ function equals$d(existing, incoming) {
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
const VERSION$f = "91838b86aa135ce828af6242b11ae888";
|
|
340
|
-
const select$
|
|
341
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
340
|
+
const select$q = function HourlyScheduledItemRepresentationSelect() {
|
|
341
|
+
const { selections: ScheduledItemRepresentationSelections } = select$n();
|
|
342
342
|
return {
|
|
343
343
|
kind: 'Fragment',
|
|
344
344
|
version: VERSION$f,
|
|
@@ -359,8 +359,8 @@ const select$p = function HourlyScheduledItemRepresentationSelect() {
|
|
|
359
359
|
};
|
|
360
360
|
|
|
361
361
|
const VERSION$e = "46260a34f0b2c2d7adc7f8c150a8d8fb";
|
|
362
|
-
const select$
|
|
363
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
362
|
+
const select$p = function WeeklyScheduledItemRepresentationSelect() {
|
|
363
|
+
const { selections: ScheduledItemRepresentationSelections } = select$n();
|
|
364
364
|
return {
|
|
365
365
|
kind: 'Fragment',
|
|
366
366
|
version: VERSION$e,
|
|
@@ -377,8 +377,8 @@ const select$o = function WeeklyScheduledItemRepresentationSelect() {
|
|
|
377
377
|
};
|
|
378
378
|
|
|
379
379
|
const VERSION$d = "dcda6d015a01d9acde5fac241448cfe4";
|
|
380
|
-
const select$
|
|
381
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
380
|
+
const select$o = function DailyScheduledItemRepresentationSelect() {
|
|
381
|
+
const { selections: ScheduledItemRepresentationSelections } = select$n();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
384
|
version: VERSION$d,
|
|
@@ -396,7 +396,7 @@ var DiscriminatorValues;
|
|
|
396
396
|
DiscriminatorValues["Daily"] = "Daily";
|
|
397
397
|
})(DiscriminatorValues || (DiscriminatorValues = {}));
|
|
398
398
|
const VERSION$c = "193484b4261ca5840b61caaab3dea067";
|
|
399
|
-
function validate$
|
|
399
|
+
function validate$i(obj, path = 'ScheduledItemRepresentation') {
|
|
400
400
|
const v_error = (() => {
|
|
401
401
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
402
402
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -413,7 +413,7 @@ function validate$c(obj, path = 'ScheduledItemRepresentation') {
|
|
|
413
413
|
}
|
|
414
414
|
const obj_time = obj.time;
|
|
415
415
|
const path_time = path + '.time';
|
|
416
|
-
const referencepath_timeValidationError = validate$
|
|
416
|
+
const referencepath_timeValidationError = validate$j(obj_time, path_time);
|
|
417
417
|
if (referencepath_timeValidationError !== null) {
|
|
418
418
|
let message = 'Object doesn\'t match ScheduledTimeRepresentation (at "' + path_time + '")\n';
|
|
419
419
|
message += referencepath_timeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -423,9 +423,9 @@ function validate$c(obj, path = 'ScheduledItemRepresentation') {
|
|
|
423
423
|
return v_error === undefined ? null : v_error;
|
|
424
424
|
}
|
|
425
425
|
const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
426
|
-
const hourlyScheduledItemRepresentationSelections = select$
|
|
427
|
-
const weeklyScheduledItemRepresentationSelections = select$
|
|
428
|
-
const dailyScheduledItemRepresentationSelections = select$
|
|
426
|
+
const hourlyScheduledItemRepresentationSelections = select$q();
|
|
427
|
+
const weeklyScheduledItemRepresentationSelections = select$p();
|
|
428
|
+
const dailyScheduledItemRepresentationSelections = select$o();
|
|
429
429
|
return {
|
|
430
430
|
kind: 'Fragment',
|
|
431
431
|
union: true,
|
|
@@ -437,8 +437,8 @@ const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
};
|
|
440
|
-
const select$
|
|
441
|
-
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$
|
|
440
|
+
const select$n = function ScheduledItemRepresentationSelect() {
|
|
441
|
+
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$r();
|
|
442
442
|
return {
|
|
443
443
|
kind: 'Fragment',
|
|
444
444
|
version: VERSION$c,
|
|
@@ -480,7 +480,7 @@ function equals$c(existing, incoming) {
|
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
const VERSION$b = "06b5da5162febff2692d819c9b718be5";
|
|
483
|
-
function validate$
|
|
483
|
+
function validate$h(obj, path = 'AppScheduleRepresentation') {
|
|
484
484
|
const v_error = (() => {
|
|
485
485
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
486
486
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -489,7 +489,7 @@ function validate$b(obj, path = 'AppScheduleRepresentation') {
|
|
|
489
489
|
const path_dataRefreshSchedule = path + '.dataRefreshSchedule';
|
|
490
490
|
let obj_dataRefreshSchedule_union0 = null;
|
|
491
491
|
const obj_dataRefreshSchedule_union0_error = (() => {
|
|
492
|
-
const referencepath_dataRefreshScheduleValidationError = validate$
|
|
492
|
+
const referencepath_dataRefreshScheduleValidationError = validate$i(obj_dataRefreshSchedule, path_dataRefreshSchedule);
|
|
493
493
|
if (referencepath_dataRefreshScheduleValidationError !== null) {
|
|
494
494
|
let message = 'Object doesn\'t match ScheduledItemRepresentation (at "' + path_dataRefreshSchedule + '")\n';
|
|
495
495
|
message += referencepath_dataRefreshScheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -543,7 +543,7 @@ function validate$b(obj, path = 'AppScheduleRepresentation') {
|
|
|
543
543
|
})();
|
|
544
544
|
return v_error === undefined ? null : v_error;
|
|
545
545
|
}
|
|
546
|
-
const select$
|
|
546
|
+
const select$m = function AppScheduleRepresentationSelect() {
|
|
547
547
|
const ScheduledItemRepresentation__unionSelections = selectChildren();
|
|
548
548
|
return {
|
|
549
549
|
kind: 'Fragment',
|
|
@@ -584,7 +584,7 @@ function equals$b(existing, incoming) {
|
|
|
584
584
|
|
|
585
585
|
const TTL$a = 5000;
|
|
586
586
|
const VERSION$a = "be6294bb853a9581fb3b06a2d8caa5d5";
|
|
587
|
-
function validate$
|
|
587
|
+
function validate$g(obj, path = 'AppRepresentation') {
|
|
588
588
|
const v_error = (() => {
|
|
589
589
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
590
590
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -606,7 +606,7 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
606
606
|
}
|
|
607
607
|
const obj_createdBy = obj.createdBy;
|
|
608
608
|
const path_createdBy = path + '.createdBy';
|
|
609
|
-
const referencepath_createdByValidationError = validate$
|
|
609
|
+
const referencepath_createdByValidationError = validate$l(obj_createdBy, path_createdBy);
|
|
610
610
|
if (referencepath_createdByValidationError !== null) {
|
|
611
611
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_createdBy + '")\n';
|
|
612
612
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -660,7 +660,7 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
660
660
|
}
|
|
661
661
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
662
662
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
663
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
663
|
+
const referencepath_lastModifiedByValidationError = validate$l(obj_lastModifiedBy, path_lastModifiedBy);
|
|
664
664
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
665
665
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
666
666
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -685,7 +685,7 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
685
685
|
const path_schedule = path + '.schedule';
|
|
686
686
|
let obj_schedule_union0 = null;
|
|
687
687
|
const obj_schedule_union0_error = (() => {
|
|
688
|
-
const referencepath_scheduleValidationError = validate$
|
|
688
|
+
const referencepath_scheduleValidationError = validate$h(obj_schedule, path_schedule);
|
|
689
689
|
if (referencepath_scheduleValidationError !== null) {
|
|
690
690
|
let message = 'Object doesn\'t match AppScheduleRepresentation (at "' + path_schedule + '")\n';
|
|
691
691
|
message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -760,9 +760,9 @@ function keyBuilderFromType$7(luvio, object) {
|
|
|
760
760
|
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
761
761
|
return input;
|
|
762
762
|
}
|
|
763
|
-
const select$
|
|
764
|
-
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$
|
|
765
|
-
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$
|
|
763
|
+
const select$l = function AppRepresentationSelect() {
|
|
764
|
+
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$t();
|
|
765
|
+
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$m();
|
|
766
766
|
return {
|
|
767
767
|
kind: 'Fragment',
|
|
768
768
|
version: VERSION$a,
|
|
@@ -960,7 +960,7 @@ function equals$a(existing, incoming) {
|
|
|
960
960
|
}
|
|
961
961
|
const ingest$a = function AppRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
962
962
|
if (process.env.NODE_ENV !== 'production') {
|
|
963
|
-
const validateError = validate$
|
|
963
|
+
const validateError = validate$g(input);
|
|
964
964
|
if (validateError !== null) {
|
|
965
965
|
throw validateError;
|
|
966
966
|
}
|
|
@@ -982,7 +982,7 @@ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
982
982
|
|
|
983
983
|
const TTL$9 = 5000;
|
|
984
984
|
const VERSION$9 = "1e01d8ae397bfbae02ba4cfae1dac4fc";
|
|
985
|
-
function validate$
|
|
985
|
+
function validate$f(obj, path = 'AppResultRepresentation') {
|
|
986
986
|
const v_error = (() => {
|
|
987
987
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
988
988
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1065,7 +1065,7 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1065
1065
|
}, luvio, store, timestamp);
|
|
1066
1066
|
return input;
|
|
1067
1067
|
}
|
|
1068
|
-
const select$
|
|
1068
|
+
const select$k = function AppResultRepresentationSelect() {
|
|
1069
1069
|
return {
|
|
1070
1070
|
kind: 'Fragment',
|
|
1071
1071
|
version: VERSION$9,
|
|
@@ -1074,7 +1074,7 @@ const select$j = function AppResultRepresentationSelect() {
|
|
|
1074
1074
|
{
|
|
1075
1075
|
name: 'app',
|
|
1076
1076
|
kind: 'Link',
|
|
1077
|
-
fragment: select$
|
|
1077
|
+
fragment: select$l()
|
|
1078
1078
|
},
|
|
1079
1079
|
{
|
|
1080
1080
|
name: 'failureMessage',
|
|
@@ -1122,7 +1122,7 @@ function equals$9(existing, incoming) {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
const ingest$9 = function AppResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1124
1124
|
if (process.env.NODE_ENV !== 'production') {
|
|
1125
|
-
const validateError = validate$
|
|
1125
|
+
const validateError = validate$f(input);
|
|
1126
1126
|
if (validateError !== null) {
|
|
1127
1127
|
throw validateError;
|
|
1128
1128
|
}
|
|
@@ -1143,19 +1143,530 @@ function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1143
1143
|
getTypeCacheKeys$a(rootKeySet, luvio, input.app);
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
|
-
function select$
|
|
1147
|
-
return select$
|
|
1146
|
+
function select$j(luvio, params) {
|
|
1147
|
+
return select$k();
|
|
1148
|
+
}
|
|
1149
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
1150
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1151
|
+
}
|
|
1152
|
+
function ingestSuccess$a(luvio, resourceParams, response) {
|
|
1153
|
+
const { body } = response;
|
|
1154
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
1155
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1156
|
+
const snapshot = luvio.storeLookup({
|
|
1157
|
+
recordId: key,
|
|
1158
|
+
node: select$j(),
|
|
1159
|
+
variables: {},
|
|
1160
|
+
});
|
|
1161
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1162
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1163
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
deepFreeze(snapshot.data);
|
|
1167
|
+
return snapshot;
|
|
1168
|
+
}
|
|
1169
|
+
function createResourceRequest$b(config) {
|
|
1170
|
+
const headers = {};
|
|
1171
|
+
return {
|
|
1172
|
+
baseUri: '/services/data/v63.0',
|
|
1173
|
+
basePath: '/app-framework/apps',
|
|
1174
|
+
method: 'post',
|
|
1175
|
+
body: config.body,
|
|
1176
|
+
urlParams: {},
|
|
1177
|
+
queryParams: {},
|
|
1178
|
+
headers,
|
|
1179
|
+
priority: 'normal',
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
const adapterName$b = 'createApp';
|
|
1184
|
+
const createApp_ConfigPropertyMetadata = [
|
|
1185
|
+
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1186
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1187
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1188
|
+
generateParamConfigMetadata('logLevel', false, 2 /* Body */, 0 /* String */),
|
|
1189
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1190
|
+
generateParamConfigMetadata('runtimeMethod', false, 2 /* Body */, 0 /* String */),
|
|
1191
|
+
generateParamConfigMetadata('templateSourceId', true, 2 /* Body */, 0 /* String */),
|
|
1192
|
+
generateParamConfigMetadata('templateType', false, 2 /* Body */, 0 /* String */),
|
|
1193
|
+
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1194
|
+
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1195
|
+
];
|
|
1196
|
+
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, createApp_ConfigPropertyMetadata);
|
|
1197
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$c(createApp_ConfigPropertyMetadata);
|
|
1198
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
1199
|
+
const config = {};
|
|
1200
|
+
typeCheckConfig$c(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1201
|
+
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1202
|
+
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1203
|
+
const untrustedConfig_templateValues_object = {};
|
|
1204
|
+
const untrustedConfig_templateValues_keys = Object.keys(untrustedConfig_templateValues);
|
|
1205
|
+
for (let i = 0, arrayLength = untrustedConfig_templateValues_keys.length; i < arrayLength; i++) {
|
|
1206
|
+
const key = untrustedConfig_templateValues_keys[i];
|
|
1207
|
+
const untrustedConfig_templateValues_prop = untrustedConfig_templateValues[key];
|
|
1208
|
+
if (untrustedConfig_templateValues_object !== undefined) {
|
|
1209
|
+
untrustedConfig_templateValues_object[key] = untrustedConfig_templateValues_prop;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
if (untrustedConfig_templateValues_object !== undefined && Object.keys(untrustedConfig_templateValues_object).length >= 0) {
|
|
1213
|
+
config.templateValues = untrustedConfig_templateValues_object;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
return config;
|
|
1217
|
+
}
|
|
1218
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
1219
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1220
|
+
return null;
|
|
1221
|
+
}
|
|
1222
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1223
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1224
|
+
}
|
|
1225
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
1226
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1227
|
+
return null;
|
|
1228
|
+
}
|
|
1229
|
+
return config;
|
|
1230
|
+
}
|
|
1231
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
1232
|
+
const resourceParams = createResourceParams$b(config);
|
|
1233
|
+
const request = createResourceRequest$b(resourceParams);
|
|
1234
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1235
|
+
.then((response) => {
|
|
1236
|
+
return luvio.handleSuccessResponse(() => {
|
|
1237
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response);
|
|
1238
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1239
|
+
}, () => {
|
|
1240
|
+
const cache = new StoreKeyMap();
|
|
1241
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
1242
|
+
return cache;
|
|
1243
|
+
});
|
|
1244
|
+
}, (response) => {
|
|
1245
|
+
deepFreeze(response);
|
|
1246
|
+
throw response;
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
const createAppAdapterFactory = (luvio) => {
|
|
1250
|
+
return function createApp(untrustedConfig) {
|
|
1251
|
+
const config = validateAdapterConfig$b(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1252
|
+
// Invalid or incomplete config
|
|
1253
|
+
if (config === null) {
|
|
1254
|
+
throw new Error('Invalid config for "createApp"');
|
|
1255
|
+
}
|
|
1256
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
function validate$e(obj, path = 'ChainDefinitionInputRepresentation') {
|
|
1261
|
+
const v_error = (() => {
|
|
1262
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1263
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1264
|
+
}
|
|
1265
|
+
const obj_file = obj.file;
|
|
1266
|
+
const path_file = path + '.file';
|
|
1267
|
+
if (typeof obj_file !== 'string') {
|
|
1268
|
+
return new TypeError('Expected "string" but received "' + typeof obj_file + '" (at "' + path_file + '")');
|
|
1269
|
+
}
|
|
1270
|
+
if (obj.name !== undefined) {
|
|
1271
|
+
const obj_name = obj.name;
|
|
1272
|
+
const path_name = path + '.name';
|
|
1273
|
+
if (typeof obj_name !== 'string') {
|
|
1274
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
const obj_type = obj.type;
|
|
1278
|
+
const path_type = path + '.type';
|
|
1279
|
+
if (typeof obj_type !== 'string') {
|
|
1280
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1281
|
+
}
|
|
1282
|
+
})();
|
|
1283
|
+
return v_error === undefined ? null : v_error;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
function validate$d(obj, path = 'NamespacedReferenceInputRepresentation') {
|
|
1287
|
+
const v_error = (() => {
|
|
1288
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1289
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1290
|
+
}
|
|
1291
|
+
const obj_name = obj.name;
|
|
1292
|
+
const path_name = path + '.name';
|
|
1293
|
+
if (typeof obj_name !== 'string') {
|
|
1294
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1295
|
+
}
|
|
1296
|
+
const obj_namespace = obj.namespace;
|
|
1297
|
+
const path_namespace = path + '.namespace';
|
|
1298
|
+
if (typeof obj_namespace !== 'string') {
|
|
1299
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1300
|
+
}
|
|
1301
|
+
})();
|
|
1302
|
+
return v_error === undefined ? null : v_error;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
function validate$c(obj, path = 'TemplatePreviewInputRepresentation') {
|
|
1306
|
+
const v_error = (() => {
|
|
1307
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1308
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1309
|
+
}
|
|
1310
|
+
if (obj.description !== undefined) {
|
|
1311
|
+
const obj_description = obj.description;
|
|
1312
|
+
const path_description = path + '.description';
|
|
1313
|
+
if (typeof obj_description !== 'string') {
|
|
1314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
const obj_label = obj.label;
|
|
1318
|
+
const path_label = path + '.label';
|
|
1319
|
+
if (typeof obj_label !== 'string') {
|
|
1320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1321
|
+
}
|
|
1322
|
+
const obj_name = obj.name;
|
|
1323
|
+
const path_name = path + '.name';
|
|
1324
|
+
if (typeof obj_name !== 'string') {
|
|
1325
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1326
|
+
}
|
|
1327
|
+
if (obj.namespace !== undefined) {
|
|
1328
|
+
const obj_namespace = obj.namespace;
|
|
1329
|
+
const path_namespace = path + '.namespace';
|
|
1330
|
+
if (typeof obj_namespace !== 'string') {
|
|
1331
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
})();
|
|
1335
|
+
return v_error === undefined ? null : v_error;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
function validate$b(obj, path = 'TemplateIconsInputRepresentation') {
|
|
1339
|
+
const v_error = (() => {
|
|
1340
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1341
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1342
|
+
}
|
|
1343
|
+
if (obj.appBadge !== undefined) {
|
|
1344
|
+
const obj_appBadge = obj.appBadge;
|
|
1345
|
+
const path_appBadge = path + '.appBadge';
|
|
1346
|
+
const referencepath_appBadgeValidationError = validate$d(obj_appBadge, path_appBadge);
|
|
1347
|
+
if (referencepath_appBadgeValidationError !== null) {
|
|
1348
|
+
let message = 'Object doesn\'t match NamespacedReferenceInputRepresentation (at "' + path_appBadge + '")\n';
|
|
1349
|
+
message += referencepath_appBadgeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1350
|
+
return new TypeError(message);
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
if (obj.templateBadge !== undefined) {
|
|
1354
|
+
const obj_templateBadge = obj.templateBadge;
|
|
1355
|
+
const path_templateBadge = path + '.templateBadge';
|
|
1356
|
+
const referencepath_templateBadgeValidationError = validate$d(obj_templateBadge, path_templateBadge);
|
|
1357
|
+
if (referencepath_templateBadgeValidationError !== null) {
|
|
1358
|
+
let message = 'Object doesn\'t match NamespacedReferenceInputRepresentation (at "' + path_templateBadge + '")\n';
|
|
1359
|
+
message += referencepath_templateBadgeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1360
|
+
return new TypeError(message);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
if (obj.templatePreviews !== undefined) {
|
|
1364
|
+
const obj_templatePreviews = obj.templatePreviews;
|
|
1365
|
+
const path_templatePreviews = path + '.templatePreviews';
|
|
1366
|
+
if (!ArrayIsArray(obj_templatePreviews)) {
|
|
1367
|
+
return new TypeError('Expected "array" but received "' + typeof obj_templatePreviews + '" (at "' + path_templatePreviews + '")');
|
|
1368
|
+
}
|
|
1369
|
+
for (let i = 0; i < obj_templatePreviews.length; i++) {
|
|
1370
|
+
const obj_templatePreviews_item = obj_templatePreviews[i];
|
|
1371
|
+
const path_templatePreviews_item = path_templatePreviews + '[' + i + ']';
|
|
1372
|
+
const referencepath_templatePreviews_itemValidationError = validate$c(obj_templatePreviews_item, path_templatePreviews_item);
|
|
1373
|
+
if (referencepath_templatePreviews_itemValidationError !== null) {
|
|
1374
|
+
let message = 'Object doesn\'t match TemplatePreviewInputRepresentation (at "' + path_templatePreviews_item + '")\n';
|
|
1375
|
+
message += referencepath_templatePreviews_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1376
|
+
return new TypeError(message);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
})();
|
|
1381
|
+
return v_error === undefined ? null : v_error;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
function validate$a(obj, path = 'ReleaseInfoInputRepresentation') {
|
|
1385
|
+
const v_error = (() => {
|
|
1386
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1387
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1388
|
+
}
|
|
1389
|
+
if (obj.notesFile !== undefined) {
|
|
1390
|
+
const obj_notesFile = obj.notesFile;
|
|
1391
|
+
const path_notesFile = path + '.notesFile';
|
|
1392
|
+
if (typeof obj_notesFile !== 'string') {
|
|
1393
|
+
return new TypeError('Expected "string" but received "' + typeof obj_notesFile + '" (at "' + path_notesFile + '")');
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const obj_templateVersion = obj.templateVersion;
|
|
1397
|
+
const path_templateVersion = path + '.templateVersion';
|
|
1398
|
+
if (typeof obj_templateVersion !== 'string') {
|
|
1399
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateVersion + '" (at "' + path_templateVersion + '")');
|
|
1400
|
+
}
|
|
1401
|
+
})();
|
|
1402
|
+
return v_error === undefined ? null : v_error;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
function validate$9(obj, path = 'RuleInfoInputRepresentation') {
|
|
1406
|
+
const v_error = (() => {
|
|
1407
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1408
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1409
|
+
}
|
|
1410
|
+
const obj_file = obj.file;
|
|
1411
|
+
const path_file = path + '.file';
|
|
1412
|
+
if (typeof obj_file !== 'string') {
|
|
1413
|
+
return new TypeError('Expected "string" but received "' + typeof obj_file + '" (at "' + path_file + '")');
|
|
1414
|
+
}
|
|
1415
|
+
const obj_type = obj.type;
|
|
1416
|
+
const path_type = path + '.type';
|
|
1417
|
+
if (typeof obj_type !== 'string') {
|
|
1418
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1419
|
+
}
|
|
1420
|
+
})();
|
|
1421
|
+
return v_error === undefined ? null : v_error;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
const TTL$8 = 5000;
|
|
1425
|
+
const VERSION$8 = "7b301696f68bda5cea09d0c20ea77f58";
|
|
1426
|
+
function validate$8(obj, path = 'TemplateRepresentation') {
|
|
1427
|
+
const v_error = (() => {
|
|
1428
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1429
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1430
|
+
}
|
|
1431
|
+
const obj_configurationUrl = obj.configurationUrl;
|
|
1432
|
+
const path_configurationUrl = path + '.configurationUrl';
|
|
1433
|
+
if (typeof obj_configurationUrl !== 'string') {
|
|
1434
|
+
return new TypeError('Expected "string" but received "' + typeof obj_configurationUrl + '" (at "' + path_configurationUrl + '")');
|
|
1435
|
+
}
|
|
1436
|
+
const obj_createdDate = obj.createdDate;
|
|
1437
|
+
const path_createdDate = path + '.createdDate';
|
|
1438
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1439
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1440
|
+
}
|
|
1441
|
+
const obj_description = obj.description;
|
|
1442
|
+
const path_description = path + '.description';
|
|
1443
|
+
let obj_description_union0 = null;
|
|
1444
|
+
const obj_description_union0_error = (() => {
|
|
1445
|
+
if (typeof obj_description !== 'string') {
|
|
1446
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1447
|
+
}
|
|
1448
|
+
})();
|
|
1449
|
+
if (obj_description_union0_error != null) {
|
|
1450
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1451
|
+
}
|
|
1452
|
+
let obj_description_union1 = null;
|
|
1453
|
+
const obj_description_union1_error = (() => {
|
|
1454
|
+
if (obj_description !== null) {
|
|
1455
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1456
|
+
}
|
|
1457
|
+
})();
|
|
1458
|
+
if (obj_description_union1_error != null) {
|
|
1459
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1460
|
+
}
|
|
1461
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1462
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1463
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1464
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1465
|
+
return new TypeError(message);
|
|
1466
|
+
}
|
|
1467
|
+
const obj_id = obj.id;
|
|
1468
|
+
const path_id = path + '.id';
|
|
1469
|
+
if (typeof obj_id !== 'string') {
|
|
1470
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1471
|
+
}
|
|
1472
|
+
const obj_label = obj.label;
|
|
1473
|
+
const path_label = path + '.label';
|
|
1474
|
+
if (typeof obj_label !== 'string') {
|
|
1475
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1476
|
+
}
|
|
1477
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1478
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1479
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1480
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1481
|
+
}
|
|
1482
|
+
const obj_name = obj.name;
|
|
1483
|
+
const path_name = path + '.name';
|
|
1484
|
+
if (typeof obj_name !== 'string') {
|
|
1485
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1486
|
+
}
|
|
1487
|
+
const obj_tags = obj.tags;
|
|
1488
|
+
const path_tags = path + '.tags';
|
|
1489
|
+
if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
|
|
1490
|
+
return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
1491
|
+
}
|
|
1492
|
+
const obj_tags_keys = ObjectKeys(obj_tags);
|
|
1493
|
+
for (let i = 0; i < obj_tags_keys.length; i++) {
|
|
1494
|
+
const key = obj_tags_keys[i];
|
|
1495
|
+
const obj_tags_prop = obj_tags[key];
|
|
1496
|
+
const path_tags_prop = path_tags + '["' + key + '"]';
|
|
1497
|
+
if (obj_tags_prop === undefined) {
|
|
1498
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
const obj_templateType = obj.templateType;
|
|
1502
|
+
const path_templateType = path + '.templateType';
|
|
1503
|
+
if (typeof obj_templateType !== 'string') {
|
|
1504
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
1505
|
+
}
|
|
1506
|
+
const obj_url = obj.url;
|
|
1507
|
+
const path_url = path + '.url';
|
|
1508
|
+
if (typeof obj_url !== 'string') {
|
|
1509
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1510
|
+
}
|
|
1511
|
+
})();
|
|
1512
|
+
return v_error === undefined ? null : v_error;
|
|
1513
|
+
}
|
|
1514
|
+
const RepresentationType$8 = 'TemplateRepresentation';
|
|
1515
|
+
function keyBuilder$o(luvio, config) {
|
|
1516
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.id;
|
|
1517
|
+
}
|
|
1518
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
1519
|
+
const keyParams = {
|
|
1520
|
+
id: object.id
|
|
1521
|
+
};
|
|
1522
|
+
return keyBuilder$o(luvio, keyParams);
|
|
1523
|
+
}
|
|
1524
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1525
|
+
return input;
|
|
1526
|
+
}
|
|
1527
|
+
const select$i = function TemplateRepresentationSelect() {
|
|
1528
|
+
return {
|
|
1529
|
+
kind: 'Fragment',
|
|
1530
|
+
version: VERSION$8,
|
|
1531
|
+
private: [],
|
|
1532
|
+
selections: [
|
|
1533
|
+
{
|
|
1534
|
+
name: 'configurationUrl',
|
|
1535
|
+
kind: 'Scalar'
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: 'createdDate',
|
|
1539
|
+
kind: 'Scalar'
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
name: 'description',
|
|
1543
|
+
kind: 'Scalar'
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: 'id',
|
|
1547
|
+
kind: 'Scalar'
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
name: 'label',
|
|
1551
|
+
kind: 'Scalar'
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
name: 'lastModifiedDate',
|
|
1555
|
+
kind: 'Scalar'
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
name: 'name',
|
|
1559
|
+
kind: 'Scalar'
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
name: 'tags',
|
|
1563
|
+
kind: 'Object',
|
|
1564
|
+
// any
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: 'templateType',
|
|
1568
|
+
kind: 'Scalar'
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
name: 'url',
|
|
1572
|
+
kind: 'Scalar'
|
|
1573
|
+
}
|
|
1574
|
+
]
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
function equals$8(existing, incoming) {
|
|
1578
|
+
const existing_configurationUrl = existing.configurationUrl;
|
|
1579
|
+
const incoming_configurationUrl = incoming.configurationUrl;
|
|
1580
|
+
if (!(existing_configurationUrl === incoming_configurationUrl)) {
|
|
1581
|
+
return false;
|
|
1582
|
+
}
|
|
1583
|
+
const existing_createdDate = existing.createdDate;
|
|
1584
|
+
const incoming_createdDate = incoming.createdDate;
|
|
1585
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
1586
|
+
return false;
|
|
1587
|
+
}
|
|
1588
|
+
const existing_id = existing.id;
|
|
1589
|
+
const incoming_id = incoming.id;
|
|
1590
|
+
if (!(existing_id === incoming_id)) {
|
|
1591
|
+
return false;
|
|
1592
|
+
}
|
|
1593
|
+
const existing_label = existing.label;
|
|
1594
|
+
const incoming_label = incoming.label;
|
|
1595
|
+
if (!(existing_label === incoming_label)) {
|
|
1596
|
+
return false;
|
|
1597
|
+
}
|
|
1598
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
1599
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
1600
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
1601
|
+
return false;
|
|
1602
|
+
}
|
|
1603
|
+
const existing_name = existing.name;
|
|
1604
|
+
const incoming_name = incoming.name;
|
|
1605
|
+
if (!(existing_name === incoming_name)) {
|
|
1606
|
+
return false;
|
|
1607
|
+
}
|
|
1608
|
+
const existing_templateType = existing.templateType;
|
|
1609
|
+
const incoming_templateType = incoming.templateType;
|
|
1610
|
+
if (!(existing_templateType === incoming_templateType)) {
|
|
1611
|
+
return false;
|
|
1612
|
+
}
|
|
1613
|
+
const existing_url = existing.url;
|
|
1614
|
+
const incoming_url = incoming.url;
|
|
1615
|
+
if (!(existing_url === incoming_url)) {
|
|
1616
|
+
return false;
|
|
1617
|
+
}
|
|
1618
|
+
const existing_description = existing.description;
|
|
1619
|
+
const incoming_description = incoming.description;
|
|
1620
|
+
if (!(existing_description === incoming_description)) {
|
|
1621
|
+
return false;
|
|
1622
|
+
}
|
|
1623
|
+
const existing_tags = existing.tags;
|
|
1624
|
+
const incoming_tags = incoming.tags;
|
|
1625
|
+
const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
|
|
1626
|
+
if (JSONStringify(incoming_tags_prop) !== JSONStringify(existing_tags_prop)) {
|
|
1627
|
+
return false;
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
if (equals_tags_props === false) {
|
|
1631
|
+
return false;
|
|
1632
|
+
}
|
|
1633
|
+
return true;
|
|
1634
|
+
}
|
|
1635
|
+
const ingest$8 = function TemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1636
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1637
|
+
const validateError = validate$8(input);
|
|
1638
|
+
if (validateError !== null) {
|
|
1639
|
+
throw validateError;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
1643
|
+
const ttlToUse = TTL$8;
|
|
1644
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "AppFramework", VERSION$8, RepresentationType$8, equals$8);
|
|
1645
|
+
return createLink(key);
|
|
1646
|
+
};
|
|
1647
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1648
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1649
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
1650
|
+
rootKeySet.set(rootKey, {
|
|
1651
|
+
namespace: keyPrefix,
|
|
1652
|
+
representationName: RepresentationType$8,
|
|
1653
|
+
mergeable: false
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
function select$h(luvio, params) {
|
|
1658
|
+
return select$i();
|
|
1148
1659
|
}
|
|
1149
1660
|
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
1150
|
-
getTypeCacheKeys$
|
|
1661
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1151
1662
|
}
|
|
1152
1663
|
function ingestSuccess$9(luvio, resourceParams, response) {
|
|
1153
1664
|
const { body } = response;
|
|
1154
|
-
const key = keyBuilderFromType$
|
|
1155
|
-
luvio.storeIngest(key, ingest$
|
|
1665
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
1666
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1156
1667
|
const snapshot = luvio.storeLookup({
|
|
1157
1668
|
recordId: key,
|
|
1158
|
-
node: select$
|
|
1669
|
+
node: select$h(),
|
|
1159
1670
|
variables: {},
|
|
1160
1671
|
});
|
|
1161
1672
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1170,7 +1681,7 @@ function createResourceRequest$a(config) {
|
|
|
1170
1681
|
const headers = {};
|
|
1171
1682
|
return {
|
|
1172
1683
|
baseUri: '/services/data/v63.0',
|
|
1173
|
-
basePath: '/app-framework/
|
|
1684
|
+
basePath: '/app-framework/templates',
|
|
1174
1685
|
method: 'post',
|
|
1175
1686
|
body: config.body,
|
|
1176
1687
|
urlParams: {},
|
|
@@ -1180,37 +1691,76 @@ function createResourceRequest$a(config) {
|
|
|
1180
1691
|
};
|
|
1181
1692
|
}
|
|
1182
1693
|
|
|
1183
|
-
const adapterName$a = '
|
|
1184
|
-
const
|
|
1185
|
-
generateParamConfigMetadata('
|
|
1694
|
+
const adapterName$a = 'createTemplate';
|
|
1695
|
+
const createTemplate_ConfigPropertyMetadata = [
|
|
1696
|
+
generateParamConfigMetadata('assetVersion', false, 2 /* Body */, 2 /* Number */),
|
|
1697
|
+
generateParamConfigMetadata('chainDefinitions', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1186
1698
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1699
|
+
generateParamConfigMetadata('icons', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1700
|
+
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
1187
1701
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1188
|
-
generateParamConfigMetadata('
|
|
1702
|
+
generateParamConfigMetadata('layoutDefinition', false, 2 /* Body */, 0 /* String */),
|
|
1703
|
+
generateParamConfigMetadata('maxAppCount', false, 2 /* Body */, 3 /* Integer */),
|
|
1189
1704
|
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1190
|
-
generateParamConfigMetadata('
|
|
1191
|
-
generateParamConfigMetadata('
|
|
1192
|
-
generateParamConfigMetadata('
|
|
1193
|
-
generateParamConfigMetadata('
|
|
1194
|
-
generateParamConfigMetadata('
|
|
1705
|
+
generateParamConfigMetadata('namespace', false, 2 /* Body */, 0 /* String */),
|
|
1706
|
+
generateParamConfigMetadata('releaseInfo', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1707
|
+
generateParamConfigMetadata('rules', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1708
|
+
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1709
|
+
generateParamConfigMetadata('templateType', true, 2 /* Body */, 0 /* String */),
|
|
1710
|
+
generateParamConfigMetadata('variableDefinition', false, 2 /* Body */, 0 /* String */),
|
|
1195
1711
|
];
|
|
1196
|
-
const
|
|
1197
|
-
const createResourceParams$a = /*#__PURE__*/ createResourceParams$
|
|
1712
|
+
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createTemplate_ConfigPropertyMetadata);
|
|
1713
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$c(createTemplate_ConfigPropertyMetadata);
|
|
1198
1714
|
function typeCheckConfig$a(untrustedConfig) {
|
|
1199
1715
|
const config = {};
|
|
1200
|
-
typeCheckConfig$
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
untrustedConfig_templateValues_object[key] = untrustedConfig_templateValues_prop;
|
|
1716
|
+
typeCheckConfig$c(untrustedConfig, config, createTemplate_ConfigPropertyMetadata);
|
|
1717
|
+
const untrustedConfig_chainDefinitions = untrustedConfig.chainDefinitions;
|
|
1718
|
+
if (ArrayIsArray$1(untrustedConfig_chainDefinitions)) {
|
|
1719
|
+
const untrustedConfig_chainDefinitions_array = [];
|
|
1720
|
+
for (let i = 0, arrayLength = untrustedConfig_chainDefinitions.length; i < arrayLength; i++) {
|
|
1721
|
+
const untrustedConfig_chainDefinitions_item = untrustedConfig_chainDefinitions[i];
|
|
1722
|
+
const referenceChainDefinitionInputRepresentationValidationError = validate$e(untrustedConfig_chainDefinitions_item);
|
|
1723
|
+
if (referenceChainDefinitionInputRepresentationValidationError === null) {
|
|
1724
|
+
untrustedConfig_chainDefinitions_array.push(untrustedConfig_chainDefinitions_item);
|
|
1210
1725
|
}
|
|
1211
1726
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1727
|
+
config.chainDefinitions = untrustedConfig_chainDefinitions_array;
|
|
1728
|
+
}
|
|
1729
|
+
const untrustedConfig_icons = untrustedConfig.icons;
|
|
1730
|
+
const referenceTemplateIconsInputRepresentationValidationError = validate$b(untrustedConfig_icons);
|
|
1731
|
+
if (referenceTemplateIconsInputRepresentationValidationError === null) {
|
|
1732
|
+
config.icons = untrustedConfig_icons;
|
|
1733
|
+
}
|
|
1734
|
+
const untrustedConfig_releaseInfo = untrustedConfig.releaseInfo;
|
|
1735
|
+
const referenceReleaseInfoInputRepresentationValidationError = validate$a(untrustedConfig_releaseInfo);
|
|
1736
|
+
if (referenceReleaseInfoInputRepresentationValidationError === null) {
|
|
1737
|
+
config.releaseInfo = untrustedConfig_releaseInfo;
|
|
1738
|
+
}
|
|
1739
|
+
const untrustedConfig_rules = untrustedConfig.rules;
|
|
1740
|
+
if (ArrayIsArray$1(untrustedConfig_rules)) {
|
|
1741
|
+
const untrustedConfig_rules_array = [];
|
|
1742
|
+
for (let i = 0, arrayLength = untrustedConfig_rules.length; i < arrayLength; i++) {
|
|
1743
|
+
const untrustedConfig_rules_item = untrustedConfig_rules[i];
|
|
1744
|
+
const referenceRuleInfoInputRepresentationValidationError = validate$9(untrustedConfig_rules_item);
|
|
1745
|
+
if (referenceRuleInfoInputRepresentationValidationError === null) {
|
|
1746
|
+
untrustedConfig_rules_array.push(untrustedConfig_rules_item);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
config.rules = untrustedConfig_rules_array;
|
|
1750
|
+
}
|
|
1751
|
+
const untrustedConfig_tags = untrustedConfig.tags;
|
|
1752
|
+
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
1753
|
+
const untrustedConfig_tags_object = {};
|
|
1754
|
+
const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
|
|
1755
|
+
for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
|
|
1756
|
+
const key = untrustedConfig_tags_keys[i];
|
|
1757
|
+
const untrustedConfig_tags_prop = untrustedConfig_tags[key];
|
|
1758
|
+
if (untrustedConfig_tags_object !== undefined) {
|
|
1759
|
+
untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
|
|
1763
|
+
config.tags = untrustedConfig_tags_object;
|
|
1214
1764
|
}
|
|
1215
1765
|
}
|
|
1216
1766
|
return config;
|
|
@@ -1246,24 +1796,24 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
1246
1796
|
throw response;
|
|
1247
1797
|
});
|
|
1248
1798
|
}
|
|
1249
|
-
const
|
|
1250
|
-
return function
|
|
1251
|
-
const config = validateAdapterConfig$a(untrustedConfig,
|
|
1799
|
+
const createTemplateAdapterFactory = (luvio) => {
|
|
1800
|
+
return function createTemplate(untrustedConfig) {
|
|
1801
|
+
const config = validateAdapterConfig$a(untrustedConfig, createTemplate_ConfigPropertyNames);
|
|
1252
1802
|
// Invalid or incomplete config
|
|
1253
1803
|
if (config === null) {
|
|
1254
|
-
throw new Error('Invalid config for "
|
|
1804
|
+
throw new Error('Invalid config for "createTemplate"');
|
|
1255
1805
|
}
|
|
1256
1806
|
return buildNetworkSnapshot$a(luvio, config);
|
|
1257
1807
|
};
|
|
1258
1808
|
};
|
|
1259
1809
|
|
|
1260
|
-
function keyBuilder$
|
|
1810
|
+
function keyBuilder$n(luvio, params) {
|
|
1261
1811
|
return keyBuilder$q(luvio, {
|
|
1262
1812
|
id: params.urlParams.appIdOrApiName
|
|
1263
1813
|
});
|
|
1264
1814
|
}
|
|
1265
1815
|
function getResponseCacheKeys$9(cacheKeyMap, luvio, resourceParams) {
|
|
1266
|
-
const key = keyBuilder$
|
|
1816
|
+
const key = keyBuilder$n(luvio, resourceParams);
|
|
1267
1817
|
cacheKeyMap.set(key, {
|
|
1268
1818
|
namespace: keyPrefix,
|
|
1269
1819
|
representationName: RepresentationType$a,
|
|
@@ -1271,7 +1821,7 @@ function getResponseCacheKeys$9(cacheKeyMap, luvio, resourceParams) {
|
|
|
1271
1821
|
});
|
|
1272
1822
|
}
|
|
1273
1823
|
function evictSuccess(luvio, resourceParams) {
|
|
1274
|
-
const key = keyBuilder$
|
|
1824
|
+
const key = keyBuilder$n(luvio, resourceParams);
|
|
1275
1825
|
luvio.storeEvict(key);
|
|
1276
1826
|
}
|
|
1277
1827
|
function createResourceRequest$9(config) {
|
|
@@ -1293,10 +1843,10 @@ const deleteApp_ConfigPropertyMetadata = [
|
|
|
1293
1843
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1294
1844
|
];
|
|
1295
1845
|
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteApp_ConfigPropertyMetadata);
|
|
1296
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$
|
|
1846
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$c(deleteApp_ConfigPropertyMetadata);
|
|
1297
1847
|
function typeCheckConfig$9(untrustedConfig) {
|
|
1298
1848
|
const config = {};
|
|
1299
|
-
typeCheckConfig$
|
|
1849
|
+
typeCheckConfig$c(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1300
1850
|
return config;
|
|
1301
1851
|
}
|
|
1302
1852
|
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
@@ -1341,10 +1891,10 @@ const deleteAppAdapterFactory = (luvio) => {
|
|
|
1341
1891
|
};
|
|
1342
1892
|
};
|
|
1343
1893
|
|
|
1344
|
-
function select$
|
|
1345
|
-
return select$
|
|
1894
|
+
function select$g(luvio, params) {
|
|
1895
|
+
return select$l();
|
|
1346
1896
|
}
|
|
1347
|
-
function keyBuilder$
|
|
1897
|
+
function keyBuilder$m(luvio, params) {
|
|
1348
1898
|
return keyBuilder$q(luvio, {
|
|
1349
1899
|
id: params.urlParams.appIdOrApiName
|
|
1350
1900
|
});
|
|
@@ -1354,11 +1904,11 @@ function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
|
1354
1904
|
}
|
|
1355
1905
|
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1356
1906
|
const { body } = response;
|
|
1357
|
-
const key = keyBuilder$
|
|
1907
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
1358
1908
|
luvio.storeIngest(key, ingest$a, body);
|
|
1359
1909
|
const snapshot = luvio.storeLookup({
|
|
1360
1910
|
recordId: key,
|
|
1361
|
-
node: select$
|
|
1911
|
+
node: select$g(),
|
|
1362
1912
|
variables: {},
|
|
1363
1913
|
}, snapshotRefresh);
|
|
1364
1914
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1370,7 +1920,7 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1370
1920
|
return snapshot;
|
|
1371
1921
|
}
|
|
1372
1922
|
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
1373
|
-
const key = keyBuilder$
|
|
1923
|
+
const key = keyBuilder$m(luvio, params);
|
|
1374
1924
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1375
1925
|
const storeMetadataParams = {
|
|
1376
1926
|
ttl: TTL$a,
|
|
@@ -1407,14 +1957,14 @@ const getApp_ConfigPropertyMetadata = [
|
|
|
1407
1957
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1408
1958
|
];
|
|
1409
1959
|
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getApp_ConfigPropertyMetadata);
|
|
1410
|
-
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$
|
|
1411
|
-
function keyBuilder$
|
|
1960
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$c(getApp_ConfigPropertyMetadata);
|
|
1961
|
+
function keyBuilder$l(luvio, config) {
|
|
1412
1962
|
const resourceParams = createResourceParams$8(config);
|
|
1413
|
-
return keyBuilder$
|
|
1963
|
+
return keyBuilder$m(luvio, resourceParams);
|
|
1414
1964
|
}
|
|
1415
1965
|
function typeCheckConfig$8(untrustedConfig) {
|
|
1416
1966
|
const config = {};
|
|
1417
|
-
typeCheckConfig$
|
|
1967
|
+
typeCheckConfig$c(untrustedConfig, config, getApp_ConfigPropertyMetadata);
|
|
1418
1968
|
return config;
|
|
1419
1969
|
}
|
|
1420
1970
|
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
@@ -1432,7 +1982,7 @@ function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
|
1432
1982
|
}
|
|
1433
1983
|
function adapterFragment$8(luvio, config) {
|
|
1434
1984
|
createResourceParams$8(config);
|
|
1435
|
-
return select$
|
|
1985
|
+
return select$g();
|
|
1436
1986
|
}
|
|
1437
1987
|
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1438
1988
|
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
@@ -1468,7 +2018,7 @@ function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext
|
|
|
1468
2018
|
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1469
2019
|
const { luvio, config } = context;
|
|
1470
2020
|
const selector = {
|
|
1471
|
-
recordId: keyBuilder$
|
|
2021
|
+
recordId: keyBuilder$l(luvio, config),
|
|
1472
2022
|
node: adapterFragment$8(luvio, config),
|
|
1473
2023
|
variables: {},
|
|
1474
2024
|
};
|
|
@@ -1522,9 +2072,9 @@ const notifyChangeFactory$5 = (luvio, options) => {
|
|
|
1522
2072
|
};
|
|
1523
2073
|
};
|
|
1524
2074
|
|
|
1525
|
-
const TTL$
|
|
1526
|
-
const VERSION$
|
|
1527
|
-
function validate$
|
|
2075
|
+
const TTL$7 = 5000;
|
|
2076
|
+
const VERSION$7 = "b8e879a936b5069ec247355c66198ca7";
|
|
2077
|
+
function validate$7(obj, path = 'AppActivityItemRepresentation') {
|
|
1528
2078
|
const v_error = (() => {
|
|
1529
2079
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1530
2080
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1566,24 +2116,24 @@ function validate$8(obj, path = 'AppActivityItemRepresentation') {
|
|
|
1566
2116
|
})();
|
|
1567
2117
|
return v_error === undefined ? null : v_error;
|
|
1568
2118
|
}
|
|
1569
|
-
const RepresentationType$
|
|
1570
|
-
function keyBuilder$
|
|
1571
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2119
|
+
const RepresentationType$7 = 'AppActivityItemRepresentation';
|
|
2120
|
+
function keyBuilder$k(luvio, config) {
|
|
2121
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.appId + ':' + config.id;
|
|
1572
2122
|
}
|
|
1573
|
-
function keyBuilderFromType$
|
|
2123
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
1574
2124
|
const keyParams = {
|
|
1575
2125
|
appId: object.appId,
|
|
1576
2126
|
id: object.id
|
|
1577
2127
|
};
|
|
1578
|
-
return keyBuilder$
|
|
2128
|
+
return keyBuilder$k(luvio, keyParams);
|
|
1579
2129
|
}
|
|
1580
|
-
function normalize$
|
|
2130
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1581
2131
|
return input;
|
|
1582
2132
|
}
|
|
1583
|
-
const select$
|
|
2133
|
+
const select$f = function AppActivityItemRepresentationSelect() {
|
|
1584
2134
|
return {
|
|
1585
2135
|
kind: 'Fragment',
|
|
1586
|
-
version: VERSION$
|
|
2136
|
+
version: VERSION$7,
|
|
1587
2137
|
private: [],
|
|
1588
2138
|
selections: [
|
|
1589
2139
|
{
|
|
@@ -1610,7 +2160,7 @@ const select$g = function AppActivityItemRepresentationSelect() {
|
|
|
1610
2160
|
]
|
|
1611
2161
|
};
|
|
1612
2162
|
};
|
|
1613
|
-
function equals$
|
|
2163
|
+
function equals$7(existing, incoming) {
|
|
1614
2164
|
const existing_activityType = existing.activityType;
|
|
1615
2165
|
const incoming_activityType = incoming.activityType;
|
|
1616
2166
|
if (!(existing_activityType === incoming_activityType)) {
|
|
@@ -1643,31 +2193,31 @@ function equals$8(existing, incoming) {
|
|
|
1643
2193
|
}
|
|
1644
2194
|
return true;
|
|
1645
2195
|
}
|
|
1646
|
-
const ingest$
|
|
2196
|
+
const ingest$7 = function AppActivityItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1647
2197
|
if (process.env.NODE_ENV !== 'production') {
|
|
1648
|
-
const validateError = validate$
|
|
2198
|
+
const validateError = validate$7(input);
|
|
1649
2199
|
if (validateError !== null) {
|
|
1650
2200
|
throw validateError;
|
|
1651
2201
|
}
|
|
1652
2202
|
}
|
|
1653
|
-
const key = keyBuilderFromType$
|
|
1654
|
-
const ttlToUse = TTL$
|
|
1655
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2203
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
2204
|
+
const ttlToUse = TTL$7;
|
|
2205
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "AppFramework", VERSION$7, RepresentationType$7, equals$7);
|
|
1656
2206
|
return createLink(key);
|
|
1657
2207
|
};
|
|
1658
|
-
function getTypeCacheKeys$
|
|
2208
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1659
2209
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1660
|
-
const rootKey = keyBuilderFromType$
|
|
2210
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
1661
2211
|
rootKeySet.set(rootKey, {
|
|
1662
2212
|
namespace: keyPrefix,
|
|
1663
|
-
representationName: RepresentationType$
|
|
2213
|
+
representationName: RepresentationType$7,
|
|
1664
2214
|
mergeable: false
|
|
1665
2215
|
});
|
|
1666
2216
|
}
|
|
1667
2217
|
|
|
1668
|
-
const TTL$
|
|
1669
|
-
const VERSION$
|
|
1670
|
-
function validate$
|
|
2218
|
+
const TTL$6 = 5000;
|
|
2219
|
+
const VERSION$6 = "e0f049ec23678e696fb7c592c9641c65";
|
|
2220
|
+
function validate$6(obj, path = 'AppActivityCollectionRepresentation') {
|
|
1671
2221
|
const v_error = (() => {
|
|
1672
2222
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1673
2223
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1692,23 +2242,23 @@ function validate$7(obj, path = 'AppActivityCollectionRepresentation') {
|
|
|
1692
2242
|
})();
|
|
1693
2243
|
return v_error === undefined ? null : v_error;
|
|
1694
2244
|
}
|
|
1695
|
-
const RepresentationType$
|
|
1696
|
-
function keyBuilder$
|
|
1697
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2245
|
+
const RepresentationType$6 = 'AppActivityCollectionRepresentation';
|
|
2246
|
+
function keyBuilder$j(luvio, config) {
|
|
2247
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.appId;
|
|
1698
2248
|
}
|
|
1699
|
-
function keyBuilderFromType$
|
|
2249
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
1700
2250
|
const keyParams = {
|
|
1701
2251
|
appId: object.appId
|
|
1702
2252
|
};
|
|
1703
|
-
return keyBuilder$
|
|
2253
|
+
return keyBuilder$j(luvio, keyParams);
|
|
1704
2254
|
}
|
|
1705
|
-
function normalize$
|
|
2255
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
1706
2256
|
const input_items = input.items;
|
|
1707
2257
|
const input_items_id = path.fullPath + '__items';
|
|
1708
2258
|
for (let i = 0; i < input_items.length; i++) {
|
|
1709
2259
|
const input_items_item = input_items[i];
|
|
1710
2260
|
let input_items_item_id = input_items_id + '__' + i;
|
|
1711
|
-
input_items[i] = ingest$
|
|
2261
|
+
input_items[i] = ingest$7(input_items_item, {
|
|
1712
2262
|
fullPath: input_items_item_id,
|
|
1713
2263
|
propertyName: i,
|
|
1714
2264
|
parent: {
|
|
@@ -1721,10 +2271,10 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
1721
2271
|
}
|
|
1722
2272
|
return input;
|
|
1723
2273
|
}
|
|
1724
|
-
const select$
|
|
2274
|
+
const select$e = function AppActivityCollectionRepresentationSelect() {
|
|
1725
2275
|
return {
|
|
1726
2276
|
kind: 'Fragment',
|
|
1727
|
-
version: VERSION$
|
|
2277
|
+
version: VERSION$6,
|
|
1728
2278
|
private: [],
|
|
1729
2279
|
selections: [
|
|
1730
2280
|
{
|
|
@@ -1735,12 +2285,12 @@ const select$f = function AppActivityCollectionRepresentationSelect() {
|
|
|
1735
2285
|
name: 'items',
|
|
1736
2286
|
kind: 'Link',
|
|
1737
2287
|
plural: true,
|
|
1738
|
-
fragment: select$
|
|
2288
|
+
fragment: select$f()
|
|
1739
2289
|
}
|
|
1740
2290
|
]
|
|
1741
2291
|
};
|
|
1742
2292
|
};
|
|
1743
|
-
function equals$
|
|
2293
|
+
function equals$6(existing, incoming) {
|
|
1744
2294
|
const existing_appId = existing.appId;
|
|
1745
2295
|
const incoming_appId = incoming.appId;
|
|
1746
2296
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -1758,50 +2308,50 @@ function equals$7(existing, incoming) {
|
|
|
1758
2308
|
}
|
|
1759
2309
|
return true;
|
|
1760
2310
|
}
|
|
1761
|
-
const ingest$
|
|
2311
|
+
const ingest$6 = function AppActivityCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1762
2312
|
if (process.env.NODE_ENV !== 'production') {
|
|
1763
|
-
const validateError = validate$
|
|
2313
|
+
const validateError = validate$6(input);
|
|
1764
2314
|
if (validateError !== null) {
|
|
1765
2315
|
throw validateError;
|
|
1766
2316
|
}
|
|
1767
2317
|
}
|
|
1768
|
-
const key = keyBuilderFromType$
|
|
1769
|
-
const ttlToUse = TTL$
|
|
1770
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2318
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
2319
|
+
const ttlToUse = TTL$6;
|
|
2320
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "AppFramework", VERSION$6, RepresentationType$6, equals$6);
|
|
1771
2321
|
return createLink(key);
|
|
1772
2322
|
};
|
|
1773
|
-
function getTypeCacheKeys$
|
|
2323
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
1774
2324
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1775
|
-
const rootKey = keyBuilderFromType$
|
|
2325
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1776
2326
|
rootKeySet.set(rootKey, {
|
|
1777
2327
|
namespace: keyPrefix,
|
|
1778
|
-
representationName: RepresentationType$
|
|
2328
|
+
representationName: RepresentationType$6,
|
|
1779
2329
|
mergeable: false
|
|
1780
2330
|
});
|
|
1781
2331
|
const input_items_length = input.items.length;
|
|
1782
2332
|
for (let i = 0; i < input_items_length; i++) {
|
|
1783
|
-
getTypeCacheKeys$
|
|
2333
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.items[i]);
|
|
1784
2334
|
}
|
|
1785
2335
|
}
|
|
1786
2336
|
|
|
1787
|
-
function select$
|
|
1788
|
-
return select$
|
|
2337
|
+
function select$d(luvio, params) {
|
|
2338
|
+
return select$e();
|
|
1789
2339
|
}
|
|
1790
|
-
function keyBuilder$
|
|
1791
|
-
return keyBuilder$
|
|
2340
|
+
function keyBuilder$i(luvio, params) {
|
|
2341
|
+
return keyBuilder$j(luvio, {
|
|
1792
2342
|
appId: params.urlParams.appIdOrApiName
|
|
1793
2343
|
});
|
|
1794
2344
|
}
|
|
1795
2345
|
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1796
|
-
getTypeCacheKeys$
|
|
2346
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
1797
2347
|
}
|
|
1798
2348
|
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
1799
2349
|
const { body } = response;
|
|
1800
|
-
const key = keyBuilder$
|
|
1801
|
-
luvio.storeIngest(key, ingest$
|
|
2350
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
2351
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
1802
2352
|
const snapshot = luvio.storeLookup({
|
|
1803
2353
|
recordId: key,
|
|
1804
|
-
node: select$
|
|
2354
|
+
node: select$d(),
|
|
1805
2355
|
variables: {},
|
|
1806
2356
|
}, snapshotRefresh);
|
|
1807
2357
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1813,13 +2363,13 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1813
2363
|
return snapshot;
|
|
1814
2364
|
}
|
|
1815
2365
|
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
1816
|
-
const key = keyBuilder$
|
|
2366
|
+
const key = keyBuilder$i(luvio, params);
|
|
1817
2367
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1818
2368
|
const storeMetadataParams = {
|
|
1819
|
-
ttl: TTL$
|
|
2369
|
+
ttl: TTL$6,
|
|
1820
2370
|
namespace: keyPrefix,
|
|
1821
|
-
version: VERSION$
|
|
1822
|
-
representationName: RepresentationType$
|
|
2371
|
+
version: VERSION$6,
|
|
2372
|
+
representationName: RepresentationType$6
|
|
1823
2373
|
};
|
|
1824
2374
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1825
2375
|
return errorSnapshot;
|
|
@@ -1850,14 +2400,14 @@ const getAppActivities_ConfigPropertyMetadata = [
|
|
|
1850
2400
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1851
2401
|
];
|
|
1852
2402
|
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getAppActivities_ConfigPropertyMetadata);
|
|
1853
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$
|
|
1854
|
-
function keyBuilder$
|
|
2403
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$c(getAppActivities_ConfigPropertyMetadata);
|
|
2404
|
+
function keyBuilder$h(luvio, config) {
|
|
1855
2405
|
const resourceParams = createResourceParams$7(config);
|
|
1856
|
-
return keyBuilder$
|
|
2406
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
1857
2407
|
}
|
|
1858
2408
|
function typeCheckConfig$7(untrustedConfig) {
|
|
1859
2409
|
const config = {};
|
|
1860
|
-
typeCheckConfig$
|
|
2410
|
+
typeCheckConfig$c(untrustedConfig, config, getAppActivities_ConfigPropertyMetadata);
|
|
1861
2411
|
return config;
|
|
1862
2412
|
}
|
|
1863
2413
|
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
@@ -1875,7 +2425,7 @@ function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
|
1875
2425
|
}
|
|
1876
2426
|
function adapterFragment$7(luvio, config) {
|
|
1877
2427
|
createResourceParams$7(config);
|
|
1878
|
-
return select$
|
|
2428
|
+
return select$d();
|
|
1879
2429
|
}
|
|
1880
2430
|
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
1881
2431
|
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
@@ -1911,7 +2461,7 @@ function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext
|
|
|
1911
2461
|
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1912
2462
|
const { luvio, config } = context;
|
|
1913
2463
|
const selector = {
|
|
1914
|
-
recordId: keyBuilder$
|
|
2464
|
+
recordId: keyBuilder$h(luvio, config),
|
|
1915
2465
|
node: adapterFragment$7(luvio, config),
|
|
1916
2466
|
variables: {},
|
|
1917
2467
|
};
|
|
@@ -1932,7 +2482,7 @@ const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppA
|
|
|
1932
2482
|
};
|
|
1933
2483
|
const notifyChangeFactory$4 = (luvio, options) => {
|
|
1934
2484
|
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameNotifyChange(configs) {
|
|
1935
|
-
const keys = configs.map(c => keyBuilder$
|
|
2485
|
+
const keys = configs.map(c => keyBuilder$j(luvio, c));
|
|
1936
2486
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1937
2487
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1938
2488
|
const { key, record: val } = entries[i];
|
|
@@ -1941,21 +2491,21 @@ const notifyChangeFactory$4 = (luvio, options) => {
|
|
|
1941
2491
|
.then((response) => {
|
|
1942
2492
|
return luvio.handleSuccessResponse(() => {
|
|
1943
2493
|
const { body } = response;
|
|
1944
|
-
luvio.storeIngest(key, ingest$
|
|
2494
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
1945
2495
|
return luvio.storeBroadcast();
|
|
1946
2496
|
}, () => {
|
|
1947
2497
|
const cache = new StoreKeyMap();
|
|
1948
|
-
getTypeCacheKeys$
|
|
2498
|
+
getTypeCacheKeys$6(cache, luvio, response.body);
|
|
1949
2499
|
return cache;
|
|
1950
2500
|
});
|
|
1951
2501
|
}, (error) => {
|
|
1952
2502
|
return luvio.handleErrorResponse(() => {
|
|
1953
2503
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1954
2504
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
1955
|
-
ttl: TTL$
|
|
2505
|
+
ttl: TTL$6,
|
|
1956
2506
|
namespace: keyPrefix,
|
|
1957
|
-
version: VERSION$
|
|
1958
|
-
representationName: RepresentationType$
|
|
2507
|
+
version: VERSION$6,
|
|
2508
|
+
representationName: RepresentationType$6
|
|
1959
2509
|
});
|
|
1960
2510
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1961
2511
|
});
|
|
@@ -1965,25 +2515,25 @@ const notifyChangeFactory$4 = (luvio, options) => {
|
|
|
1965
2515
|
};
|
|
1966
2516
|
};
|
|
1967
2517
|
|
|
1968
|
-
function select$
|
|
1969
|
-
return select$
|
|
2518
|
+
function select$c(luvio, params) {
|
|
2519
|
+
return select$f();
|
|
1970
2520
|
}
|
|
1971
|
-
function keyBuilder$
|
|
1972
|
-
return keyBuilder$
|
|
2521
|
+
function keyBuilder$g(luvio, params) {
|
|
2522
|
+
return keyBuilder$k(luvio, {
|
|
1973
2523
|
appId: params.urlParams.appIdOrApiName,
|
|
1974
2524
|
id: params.urlParams.id
|
|
1975
2525
|
});
|
|
1976
2526
|
}
|
|
1977
2527
|
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
1978
|
-
getTypeCacheKeys$
|
|
2528
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1979
2529
|
}
|
|
1980
2530
|
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
1981
2531
|
const { body } = response;
|
|
1982
|
-
const key = keyBuilder$
|
|
1983
|
-
luvio.storeIngest(key, ingest$
|
|
2532
|
+
const key = keyBuilder$g(luvio, resourceParams);
|
|
2533
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1984
2534
|
const snapshot = luvio.storeLookup({
|
|
1985
2535
|
recordId: key,
|
|
1986
|
-
node: select$
|
|
2536
|
+
node: select$c(),
|
|
1987
2537
|
variables: {},
|
|
1988
2538
|
}, snapshotRefresh);
|
|
1989
2539
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1995,13 +2545,13 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1995
2545
|
return snapshot;
|
|
1996
2546
|
}
|
|
1997
2547
|
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1998
|
-
const key = keyBuilder$
|
|
2548
|
+
const key = keyBuilder$g(luvio, params);
|
|
1999
2549
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2000
2550
|
const storeMetadataParams = {
|
|
2001
|
-
ttl: TTL$
|
|
2551
|
+
ttl: TTL$7,
|
|
2002
2552
|
namespace: keyPrefix,
|
|
2003
|
-
version: VERSION$
|
|
2004
|
-
representationName: RepresentationType$
|
|
2553
|
+
version: VERSION$7,
|
|
2554
|
+
representationName: RepresentationType$7
|
|
2005
2555
|
};
|
|
2006
2556
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2007
2557
|
return errorSnapshot;
|
|
@@ -2034,14 +2584,14 @@ const getAppActivity_ConfigPropertyMetadata = [
|
|
|
2034
2584
|
generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2035
2585
|
];
|
|
2036
2586
|
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getAppActivity_ConfigPropertyMetadata);
|
|
2037
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
2038
|
-
function keyBuilder$
|
|
2587
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$c(getAppActivity_ConfigPropertyMetadata);
|
|
2588
|
+
function keyBuilder$f(luvio, config) {
|
|
2039
2589
|
const resourceParams = createResourceParams$6(config);
|
|
2040
|
-
return keyBuilder$
|
|
2590
|
+
return keyBuilder$g(luvio, resourceParams);
|
|
2041
2591
|
}
|
|
2042
2592
|
function typeCheckConfig$6(untrustedConfig) {
|
|
2043
2593
|
const config = {};
|
|
2044
|
-
typeCheckConfig$
|
|
2594
|
+
typeCheckConfig$c(untrustedConfig, config, getAppActivity_ConfigPropertyMetadata);
|
|
2045
2595
|
return config;
|
|
2046
2596
|
}
|
|
2047
2597
|
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
@@ -2059,7 +2609,7 @@ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
|
2059
2609
|
}
|
|
2060
2610
|
function adapterFragment$6(luvio, config) {
|
|
2061
2611
|
createResourceParams$6(config);
|
|
2062
|
-
return select$
|
|
2612
|
+
return select$c();
|
|
2063
2613
|
}
|
|
2064
2614
|
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
2065
2615
|
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
@@ -2095,7 +2645,7 @@ function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext
|
|
|
2095
2645
|
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
2096
2646
|
const { luvio, config } = context;
|
|
2097
2647
|
const selector = {
|
|
2098
|
-
recordId: keyBuilder$
|
|
2648
|
+
recordId: keyBuilder$f(luvio, config),
|
|
2099
2649
|
node: adapterFragment$6(luvio, config),
|
|
2100
2650
|
variables: {},
|
|
2101
2651
|
};
|
|
@@ -2116,7 +2666,7 @@ const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppAct
|
|
|
2116
2666
|
};
|
|
2117
2667
|
const notifyChangeFactory$3 = (luvio, options) => {
|
|
2118
2668
|
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameAndIdNotifyChange(configs) {
|
|
2119
|
-
const keys = configs.map(c => keyBuilder$
|
|
2669
|
+
const keys = configs.map(c => keyBuilder$k(luvio, c));
|
|
2120
2670
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
2121
2671
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
2122
2672
|
const { key, record: val } = entries[i];
|
|
@@ -2125,21 +2675,21 @@ const notifyChangeFactory$3 = (luvio, options) => {
|
|
|
2125
2675
|
.then((response) => {
|
|
2126
2676
|
return luvio.handleSuccessResponse(() => {
|
|
2127
2677
|
const { body } = response;
|
|
2128
|
-
luvio.storeIngest(key, ingest$
|
|
2678
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
2129
2679
|
return luvio.storeBroadcast();
|
|
2130
2680
|
}, () => {
|
|
2131
2681
|
const cache = new StoreKeyMap();
|
|
2132
|
-
getTypeCacheKeys$
|
|
2682
|
+
getTypeCacheKeys$7(cache, luvio, response.body);
|
|
2133
2683
|
return cache;
|
|
2134
2684
|
});
|
|
2135
2685
|
}, (error) => {
|
|
2136
2686
|
return luvio.handleErrorResponse(() => {
|
|
2137
2687
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
2138
2688
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
2139
|
-
ttl: TTL$
|
|
2689
|
+
ttl: TTL$7,
|
|
2140
2690
|
namespace: keyPrefix,
|
|
2141
|
-
version: VERSION$
|
|
2142
|
-
representationName: RepresentationType$
|
|
2691
|
+
version: VERSION$7,
|
|
2692
|
+
representationName: RepresentationType$7
|
|
2143
2693
|
});
|
|
2144
2694
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
2145
2695
|
});
|
|
@@ -2149,9 +2699,9 @@ const notifyChangeFactory$3 = (luvio, options) => {
|
|
|
2149
2699
|
};
|
|
2150
2700
|
};
|
|
2151
2701
|
|
|
2152
|
-
const TTL$
|
|
2153
|
-
const VERSION$
|
|
2154
|
-
function validate$
|
|
2702
|
+
const TTL$5 = 5000;
|
|
2703
|
+
const VERSION$5 = "b91a35834fb34f4f6cede2d5dc29dc5d";
|
|
2704
|
+
function validate$5(obj, path = 'AssetRepresentation') {
|
|
2155
2705
|
const v_error = (() => {
|
|
2156
2706
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2157
2707
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2304,23 +2854,23 @@ function validate$6(obj, path = 'AssetRepresentation') {
|
|
|
2304
2854
|
})();
|
|
2305
2855
|
return v_error === undefined ? null : v_error;
|
|
2306
2856
|
}
|
|
2307
|
-
const RepresentationType$
|
|
2308
|
-
function keyBuilder$
|
|
2309
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2857
|
+
const RepresentationType$5 = 'AssetRepresentation';
|
|
2858
|
+
function keyBuilder$e(luvio, config) {
|
|
2859
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.id;
|
|
2310
2860
|
}
|
|
2311
|
-
function keyBuilderFromType$
|
|
2861
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
2312
2862
|
const keyParams = {
|
|
2313
2863
|
id: object.id
|
|
2314
2864
|
};
|
|
2315
|
-
return keyBuilder$
|
|
2865
|
+
return keyBuilder$e(luvio, keyParams);
|
|
2316
2866
|
}
|
|
2317
|
-
function normalize$
|
|
2867
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2318
2868
|
return input;
|
|
2319
2869
|
}
|
|
2320
|
-
const select$
|
|
2870
|
+
const select$b = function AssetRepresentationSelect() {
|
|
2321
2871
|
return {
|
|
2322
2872
|
kind: 'Fragment',
|
|
2323
|
-
version: VERSION$
|
|
2873
|
+
version: VERSION$5,
|
|
2324
2874
|
private: [],
|
|
2325
2875
|
selections: [
|
|
2326
2876
|
{
|
|
@@ -2358,7 +2908,7 @@ const select$c = function AssetRepresentationSelect() {
|
|
|
2358
2908
|
]
|
|
2359
2909
|
};
|
|
2360
2910
|
};
|
|
2361
|
-
function equals$
|
|
2911
|
+
function equals$5(existing, incoming) {
|
|
2362
2912
|
const existing_appId = existing.appId;
|
|
2363
2913
|
const incoming_appId = incoming.appId;
|
|
2364
2914
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -2401,31 +2951,31 @@ function equals$6(existing, incoming) {
|
|
|
2401
2951
|
}
|
|
2402
2952
|
return true;
|
|
2403
2953
|
}
|
|
2404
|
-
const ingest$
|
|
2954
|
+
const ingest$5 = function AssetRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2405
2955
|
if (process.env.NODE_ENV !== 'production') {
|
|
2406
|
-
const validateError = validate$
|
|
2956
|
+
const validateError = validate$5(input);
|
|
2407
2957
|
if (validateError !== null) {
|
|
2408
2958
|
throw validateError;
|
|
2409
2959
|
}
|
|
2410
2960
|
}
|
|
2411
|
-
const key = keyBuilderFromType$
|
|
2412
|
-
const ttlToUse = TTL$
|
|
2413
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2961
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
2962
|
+
const ttlToUse = TTL$5;
|
|
2963
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "AppFramework", VERSION$5, RepresentationType$5, equals$5);
|
|
2414
2964
|
return createLink(key);
|
|
2415
2965
|
};
|
|
2416
|
-
function getTypeCacheKeys$
|
|
2966
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
2417
2967
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2418
|
-
const rootKey = keyBuilderFromType$
|
|
2968
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2419
2969
|
rootKeySet.set(rootKey, {
|
|
2420
2970
|
namespace: keyPrefix,
|
|
2421
|
-
representationName: RepresentationType$
|
|
2971
|
+
representationName: RepresentationType$5,
|
|
2422
2972
|
mergeable: false
|
|
2423
2973
|
});
|
|
2424
2974
|
}
|
|
2425
2975
|
|
|
2426
|
-
const TTL$
|
|
2427
|
-
const VERSION$
|
|
2428
|
-
function validate$
|
|
2976
|
+
const TTL$4 = 5000;
|
|
2977
|
+
const VERSION$4 = "1a10175fcc2ad43823e47bfbbdf917f6";
|
|
2978
|
+
function validate$4(obj, path = 'AssetCollectionRepresentation') {
|
|
2429
2979
|
const v_error = (() => {
|
|
2430
2980
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2431
2981
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2450,23 +3000,23 @@ function validate$5(obj, path = 'AssetCollectionRepresentation') {
|
|
|
2450
3000
|
})();
|
|
2451
3001
|
return v_error === undefined ? null : v_error;
|
|
2452
3002
|
}
|
|
2453
|
-
const RepresentationType$
|
|
2454
|
-
function keyBuilder$
|
|
2455
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3003
|
+
const RepresentationType$4 = 'AssetCollectionRepresentation';
|
|
3004
|
+
function keyBuilder$d(luvio, config) {
|
|
3005
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.appId;
|
|
2456
3006
|
}
|
|
2457
|
-
function keyBuilderFromType$
|
|
3007
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
2458
3008
|
const keyParams = {
|
|
2459
3009
|
appId: object.appId
|
|
2460
3010
|
};
|
|
2461
|
-
return keyBuilder$
|
|
3011
|
+
return keyBuilder$d(luvio, keyParams);
|
|
2462
3012
|
}
|
|
2463
|
-
function normalize$
|
|
3013
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
2464
3014
|
const input_assets = input.assets;
|
|
2465
3015
|
const input_assets_id = path.fullPath + '__assets';
|
|
2466
3016
|
for (let i = 0; i < input_assets.length; i++) {
|
|
2467
3017
|
const input_assets_item = input_assets[i];
|
|
2468
3018
|
let input_assets_item_id = input_assets_id + '__' + i;
|
|
2469
|
-
input_assets[i] = ingest$
|
|
3019
|
+
input_assets[i] = ingest$5(input_assets_item, {
|
|
2470
3020
|
fullPath: input_assets_item_id,
|
|
2471
3021
|
propertyName: i,
|
|
2472
3022
|
parent: {
|
|
@@ -2479,10 +3029,10 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
2479
3029
|
}
|
|
2480
3030
|
return input;
|
|
2481
3031
|
}
|
|
2482
|
-
const select$
|
|
3032
|
+
const select$a = function AssetCollectionRepresentationSelect() {
|
|
2483
3033
|
return {
|
|
2484
3034
|
kind: 'Fragment',
|
|
2485
|
-
version: VERSION$
|
|
3035
|
+
version: VERSION$4,
|
|
2486
3036
|
private: [],
|
|
2487
3037
|
selections: [
|
|
2488
3038
|
{
|
|
@@ -2493,12 +3043,12 @@ const select$b = function AssetCollectionRepresentationSelect() {
|
|
|
2493
3043
|
name: 'assets',
|
|
2494
3044
|
kind: 'Link',
|
|
2495
3045
|
plural: true,
|
|
2496
|
-
fragment: select$
|
|
3046
|
+
fragment: select$b()
|
|
2497
3047
|
}
|
|
2498
3048
|
]
|
|
2499
3049
|
};
|
|
2500
3050
|
};
|
|
2501
|
-
function equals$
|
|
3051
|
+
function equals$4(existing, incoming) {
|
|
2502
3052
|
const existing_appId = existing.appId;
|
|
2503
3053
|
const incoming_appId = incoming.appId;
|
|
2504
3054
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -2516,50 +3066,50 @@ function equals$5(existing, incoming) {
|
|
|
2516
3066
|
}
|
|
2517
3067
|
return true;
|
|
2518
3068
|
}
|
|
2519
|
-
const ingest$
|
|
3069
|
+
const ingest$4 = function AssetCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2520
3070
|
if (process.env.NODE_ENV !== 'production') {
|
|
2521
|
-
const validateError = validate$
|
|
3071
|
+
const validateError = validate$4(input);
|
|
2522
3072
|
if (validateError !== null) {
|
|
2523
3073
|
throw validateError;
|
|
2524
3074
|
}
|
|
2525
3075
|
}
|
|
2526
|
-
const key = keyBuilderFromType$
|
|
2527
|
-
const ttlToUse = TTL$
|
|
2528
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3076
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
3077
|
+
const ttlToUse = TTL$4;
|
|
3078
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "AppFramework", VERSION$4, RepresentationType$4, equals$4);
|
|
2529
3079
|
return createLink(key);
|
|
2530
3080
|
};
|
|
2531
|
-
function getTypeCacheKeys$
|
|
3081
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
2532
3082
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2533
|
-
const rootKey = keyBuilderFromType$
|
|
3083
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
2534
3084
|
rootKeySet.set(rootKey, {
|
|
2535
3085
|
namespace: keyPrefix,
|
|
2536
|
-
representationName: RepresentationType$
|
|
3086
|
+
representationName: RepresentationType$4,
|
|
2537
3087
|
mergeable: false
|
|
2538
3088
|
});
|
|
2539
3089
|
const input_assets_length = input.assets.length;
|
|
2540
3090
|
for (let i = 0; i < input_assets_length; i++) {
|
|
2541
|
-
getTypeCacheKeys$
|
|
3091
|
+
getTypeCacheKeys$5(rootKeySet, luvio, input.assets[i]);
|
|
2542
3092
|
}
|
|
2543
3093
|
}
|
|
2544
3094
|
|
|
2545
|
-
function select$
|
|
2546
|
-
return select$
|
|
3095
|
+
function select$9(luvio, params) {
|
|
3096
|
+
return select$a();
|
|
2547
3097
|
}
|
|
2548
|
-
function keyBuilder$
|
|
2549
|
-
return keyBuilder$
|
|
3098
|
+
function keyBuilder$c(luvio, params) {
|
|
3099
|
+
return keyBuilder$d(luvio, {
|
|
2550
3100
|
appId: params.urlParams.appIdOrApiName
|
|
2551
3101
|
});
|
|
2552
3102
|
}
|
|
2553
3103
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
2554
|
-
getTypeCacheKeys$
|
|
3104
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
2555
3105
|
}
|
|
2556
3106
|
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
2557
3107
|
const { body } = response;
|
|
2558
|
-
const key = keyBuilder$
|
|
2559
|
-
luvio.storeIngest(key, ingest$
|
|
3108
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
3109
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2560
3110
|
const snapshot = luvio.storeLookup({
|
|
2561
3111
|
recordId: key,
|
|
2562
|
-
node: select$
|
|
3112
|
+
node: select$9(),
|
|
2563
3113
|
variables: {},
|
|
2564
3114
|
}, snapshotRefresh);
|
|
2565
3115
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2571,13 +3121,13 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2571
3121
|
return snapshot;
|
|
2572
3122
|
}
|
|
2573
3123
|
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
2574
|
-
const key = keyBuilder$
|
|
3124
|
+
const key = keyBuilder$c(luvio, params);
|
|
2575
3125
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2576
3126
|
const storeMetadataParams = {
|
|
2577
|
-
ttl: TTL$
|
|
3127
|
+
ttl: TTL$4,
|
|
2578
3128
|
namespace: keyPrefix,
|
|
2579
|
-
version: VERSION$
|
|
2580
|
-
representationName: RepresentationType$
|
|
3129
|
+
version: VERSION$4,
|
|
3130
|
+
representationName: RepresentationType$4
|
|
2581
3131
|
};
|
|
2582
3132
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2583
3133
|
return errorSnapshot;
|
|
@@ -2611,14 +3161,14 @@ const getAppAssets_ConfigPropertyMetadata = [
|
|
|
2611
3161
|
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2612
3162
|
];
|
|
2613
3163
|
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getAppAssets_ConfigPropertyMetadata);
|
|
2614
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
2615
|
-
function keyBuilder$
|
|
3164
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$c(getAppAssets_ConfigPropertyMetadata);
|
|
3165
|
+
function keyBuilder$b(luvio, config) {
|
|
2616
3166
|
const resourceParams = createResourceParams$5(config);
|
|
2617
|
-
return keyBuilder$
|
|
3167
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
2618
3168
|
}
|
|
2619
3169
|
function typeCheckConfig$5(untrustedConfig) {
|
|
2620
3170
|
const config = {};
|
|
2621
|
-
typeCheckConfig$
|
|
3171
|
+
typeCheckConfig$c(untrustedConfig, config, getAppAssets_ConfigPropertyMetadata);
|
|
2622
3172
|
return config;
|
|
2623
3173
|
}
|
|
2624
3174
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -2636,7 +3186,7 @@ function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
|
2636
3186
|
}
|
|
2637
3187
|
function adapterFragment$5(luvio, config) {
|
|
2638
3188
|
createResourceParams$5(config);
|
|
2639
|
-
return select$
|
|
3189
|
+
return select$9();
|
|
2640
3190
|
}
|
|
2641
3191
|
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2642
3192
|
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
@@ -2672,7 +3222,7 @@ function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext
|
|
|
2672
3222
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
2673
3223
|
const { luvio, config } = context;
|
|
2674
3224
|
const selector = {
|
|
2675
|
-
recordId: keyBuilder$
|
|
3225
|
+
recordId: keyBuilder$b(luvio, config),
|
|
2676
3226
|
node: adapterFragment$5(luvio, config),
|
|
2677
3227
|
variables: {},
|
|
2678
3228
|
};
|
|
@@ -2693,7 +3243,7 @@ const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAsset
|
|
|
2693
3243
|
};
|
|
2694
3244
|
const notifyChangeFactory$2 = (luvio, options) => {
|
|
2695
3245
|
return function getAppFrameworkAppsAssetsByAppIdOrApiNameNotifyChange(configs) {
|
|
2696
|
-
const keys = configs.map(c => keyBuilder$
|
|
3246
|
+
const keys = configs.map(c => keyBuilder$d(luvio, c));
|
|
2697
3247
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
2698
3248
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
2699
3249
|
const { key, record: val } = entries[i];
|
|
@@ -2702,21 +3252,21 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
2702
3252
|
.then((response) => {
|
|
2703
3253
|
return luvio.handleSuccessResponse(() => {
|
|
2704
3254
|
const { body } = response;
|
|
2705
|
-
luvio.storeIngest(key, ingest$
|
|
3255
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2706
3256
|
return luvio.storeBroadcast();
|
|
2707
3257
|
}, () => {
|
|
2708
3258
|
const cache = new StoreKeyMap();
|
|
2709
|
-
getTypeCacheKeys$
|
|
3259
|
+
getTypeCacheKeys$4(cache, luvio, response.body);
|
|
2710
3260
|
return cache;
|
|
2711
3261
|
});
|
|
2712
3262
|
}, (error) => {
|
|
2713
3263
|
return luvio.handleErrorResponse(() => {
|
|
2714
3264
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
2715
3265
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
2716
|
-
ttl: TTL$
|
|
3266
|
+
ttl: TTL$4,
|
|
2717
3267
|
namespace: keyPrefix,
|
|
2718
|
-
version: VERSION$
|
|
2719
|
-
representationName: RepresentationType$
|
|
3268
|
+
version: VERSION$4,
|
|
3269
|
+
representationName: RepresentationType$4
|
|
2720
3270
|
});
|
|
2721
3271
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
2722
3272
|
});
|
|
@@ -2726,9 +3276,9 @@ const notifyChangeFactory$2 = (luvio, options) => {
|
|
|
2726
3276
|
};
|
|
2727
3277
|
};
|
|
2728
3278
|
|
|
2729
|
-
const TTL$
|
|
2730
|
-
const VERSION$
|
|
2731
|
-
function validate$
|
|
3279
|
+
const TTL$3 = 5000;
|
|
3280
|
+
const VERSION$3 = "2dd7266897d8b84ea0207582ca533d29";
|
|
3281
|
+
function validate$3(obj, path = 'AppCollectionRepresentation') {
|
|
2732
3282
|
const v_error = (() => {
|
|
2733
3283
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2734
3284
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2748,8 +3298,8 @@ function validate$4(obj, path = 'AppCollectionRepresentation') {
|
|
|
2748
3298
|
})();
|
|
2749
3299
|
return v_error === undefined ? null : v_error;
|
|
2750
3300
|
}
|
|
2751
|
-
const RepresentationType$
|
|
2752
|
-
function normalize$
|
|
3301
|
+
const RepresentationType$3 = 'AppCollectionRepresentation';
|
|
3302
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
2753
3303
|
const input_apps = input.apps;
|
|
2754
3304
|
const input_apps_id = path.fullPath + '__apps';
|
|
2755
3305
|
for (let i = 0; i < input_apps.length; i++) {
|
|
@@ -2768,22 +3318,22 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
2768
3318
|
}
|
|
2769
3319
|
return input;
|
|
2770
3320
|
}
|
|
2771
|
-
const select$
|
|
3321
|
+
const select$8 = function AppCollectionRepresentationSelect() {
|
|
2772
3322
|
return {
|
|
2773
3323
|
kind: 'Fragment',
|
|
2774
|
-
version: VERSION$
|
|
3324
|
+
version: VERSION$3,
|
|
2775
3325
|
private: [],
|
|
2776
3326
|
selections: [
|
|
2777
3327
|
{
|
|
2778
3328
|
name: 'apps',
|
|
2779
3329
|
kind: 'Link',
|
|
2780
3330
|
plural: true,
|
|
2781
|
-
fragment: select$
|
|
3331
|
+
fragment: select$l()
|
|
2782
3332
|
}
|
|
2783
3333
|
]
|
|
2784
3334
|
};
|
|
2785
3335
|
};
|
|
2786
|
-
function equals$
|
|
3336
|
+
function equals$3(existing, incoming) {
|
|
2787
3337
|
const existing_apps = existing.apps;
|
|
2788
3338
|
const incoming_apps = incoming.apps;
|
|
2789
3339
|
const equals_apps_items = equalsArray(existing_apps, incoming_apps, (existing_apps_item, incoming_apps_item) => {
|
|
@@ -2796,24 +3346,24 @@ function equals$4(existing, incoming) {
|
|
|
2796
3346
|
}
|
|
2797
3347
|
return true;
|
|
2798
3348
|
}
|
|
2799
|
-
const ingest$
|
|
3349
|
+
const ingest$3 = function AppCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2800
3350
|
if (process.env.NODE_ENV !== 'production') {
|
|
2801
|
-
const validateError = validate$
|
|
3351
|
+
const validateError = validate$3(input);
|
|
2802
3352
|
if (validateError !== null) {
|
|
2803
3353
|
throw validateError;
|
|
2804
3354
|
}
|
|
2805
3355
|
}
|
|
2806
3356
|
const key = path.fullPath;
|
|
2807
|
-
const ttlToUse = TTL$
|
|
2808
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3357
|
+
const ttlToUse = TTL$3;
|
|
3358
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "AppFramework", VERSION$3, RepresentationType$3, equals$3);
|
|
2809
3359
|
return createLink(key);
|
|
2810
3360
|
};
|
|
2811
|
-
function getTypeCacheKeys$
|
|
3361
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
2812
3362
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2813
3363
|
const rootKey = fullPathFactory();
|
|
2814
3364
|
rootKeySet.set(rootKey, {
|
|
2815
3365
|
namespace: keyPrefix,
|
|
2816
|
-
representationName: RepresentationType$
|
|
3366
|
+
representationName: RepresentationType$3,
|
|
2817
3367
|
mergeable: false
|
|
2818
3368
|
});
|
|
2819
3369
|
const input_apps_length = input.apps.length;
|
|
@@ -2822,22 +3372,22 @@ function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2822
3372
|
}
|
|
2823
3373
|
}
|
|
2824
3374
|
|
|
2825
|
-
function select$
|
|
2826
|
-
return select$
|
|
3375
|
+
function select$7(luvio, params) {
|
|
3376
|
+
return select$8();
|
|
2827
3377
|
}
|
|
2828
|
-
function keyBuilder$
|
|
3378
|
+
function keyBuilder$a(luvio, params) {
|
|
2829
3379
|
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ',' + 'type:' + params.queryParams.type + ')';
|
|
2830
3380
|
}
|
|
2831
3381
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
2832
|
-
getTypeCacheKeys$
|
|
3382
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
2833
3383
|
}
|
|
2834
3384
|
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
2835
3385
|
const { body } = response;
|
|
2836
|
-
const key = keyBuilder$
|
|
2837
|
-
luvio.storeIngest(key, ingest$
|
|
3386
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
3387
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2838
3388
|
const snapshot = luvio.storeLookup({
|
|
2839
3389
|
recordId: key,
|
|
2840
|
-
node: select$
|
|
3390
|
+
node: select$7(),
|
|
2841
3391
|
variables: {},
|
|
2842
3392
|
}, snapshotRefresh);
|
|
2843
3393
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2849,13 +3399,13 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2849
3399
|
return snapshot;
|
|
2850
3400
|
}
|
|
2851
3401
|
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2852
|
-
const key = keyBuilder$
|
|
3402
|
+
const key = keyBuilder$a(luvio, params);
|
|
2853
3403
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2854
3404
|
const storeMetadataParams = {
|
|
2855
|
-
ttl: TTL$
|
|
3405
|
+
ttl: TTL$3,
|
|
2856
3406
|
namespace: keyPrefix,
|
|
2857
|
-
version: VERSION$
|
|
2858
|
-
representationName: RepresentationType$
|
|
3407
|
+
version: VERSION$3,
|
|
3408
|
+
representationName: RepresentationType$3
|
|
2859
3409
|
};
|
|
2860
3410
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2861
3411
|
return errorSnapshot;
|
|
@@ -2880,14 +3430,14 @@ const getApps_ConfigPropertyMetadata = [
|
|
|
2880
3430
|
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2881
3431
|
];
|
|
2882
3432
|
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getApps_ConfigPropertyMetadata);
|
|
2883
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
2884
|
-
function keyBuilder$
|
|
3433
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$c(getApps_ConfigPropertyMetadata);
|
|
3434
|
+
function keyBuilder$9(luvio, config) {
|
|
2885
3435
|
const resourceParams = createResourceParams$4(config);
|
|
2886
|
-
return keyBuilder$
|
|
3436
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
2887
3437
|
}
|
|
2888
3438
|
function typeCheckConfig$4(untrustedConfig) {
|
|
2889
3439
|
const config = {};
|
|
2890
|
-
typeCheckConfig$
|
|
3440
|
+
typeCheckConfig$c(untrustedConfig, config, getApps_ConfigPropertyMetadata);
|
|
2891
3441
|
return config;
|
|
2892
3442
|
}
|
|
2893
3443
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -2905,7 +3455,7 @@ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
|
2905
3455
|
}
|
|
2906
3456
|
function adapterFragment$4(luvio, config) {
|
|
2907
3457
|
createResourceParams$4(config);
|
|
2908
|
-
return select$
|
|
3458
|
+
return select$7();
|
|
2909
3459
|
}
|
|
2910
3460
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2911
3461
|
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
@@ -2941,7 +3491,7 @@ function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext
|
|
|
2941
3491
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2942
3492
|
const { luvio, config } = context;
|
|
2943
3493
|
const selector = {
|
|
2944
|
-
recordId: keyBuilder$
|
|
3494
|
+
recordId: keyBuilder$9(luvio, config),
|
|
2945
3495
|
node: adapterFragment$4(luvio, config),
|
|
2946
3496
|
variables: {},
|
|
2947
3497
|
};
|
|
@@ -2961,9 +3511,9 @@ const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untruste
|
|
|
2961
3511
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2962
3512
|
};
|
|
2963
3513
|
|
|
2964
|
-
const TTL$
|
|
2965
|
-
const VERSION$
|
|
2966
|
-
function validate$
|
|
3514
|
+
const TTL$2 = 5000;
|
|
3515
|
+
const VERSION$2 = "4b0d1bee319e31459f529b802621d6b8";
|
|
3516
|
+
function validate$2(obj, path = 'InstalledAssetCollectionRepresentation') {
|
|
2967
3517
|
const v_error = (() => {
|
|
2968
3518
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2969
3519
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2983,14 +3533,14 @@ function validate$3(obj, path = 'InstalledAssetCollectionRepresentation') {
|
|
|
2983
3533
|
})();
|
|
2984
3534
|
return v_error === undefined ? null : v_error;
|
|
2985
3535
|
}
|
|
2986
|
-
const RepresentationType$
|
|
2987
|
-
function normalize$
|
|
3536
|
+
const RepresentationType$2 = 'InstalledAssetCollectionRepresentation';
|
|
3537
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
2988
3538
|
const input_assets = input.assets;
|
|
2989
3539
|
const input_assets_id = path.fullPath + '__assets';
|
|
2990
3540
|
for (let i = 0; i < input_assets.length; i++) {
|
|
2991
3541
|
const input_assets_item = input_assets[i];
|
|
2992
3542
|
let input_assets_item_id = input_assets_id + '__' + i;
|
|
2993
|
-
input_assets[i] = ingest$
|
|
3543
|
+
input_assets[i] = ingest$5(input_assets_item, {
|
|
2994
3544
|
fullPath: input_assets_item_id,
|
|
2995
3545
|
propertyName: i,
|
|
2996
3546
|
parent: {
|
|
@@ -3003,22 +3553,22 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
3003
3553
|
}
|
|
3004
3554
|
return input;
|
|
3005
3555
|
}
|
|
3006
|
-
const select$
|
|
3556
|
+
const select$6 = function InstalledAssetCollectionRepresentationSelect() {
|
|
3007
3557
|
return {
|
|
3008
3558
|
kind: 'Fragment',
|
|
3009
|
-
version: VERSION$
|
|
3559
|
+
version: VERSION$2,
|
|
3010
3560
|
private: [],
|
|
3011
3561
|
selections: [
|
|
3012
3562
|
{
|
|
3013
3563
|
name: 'assets',
|
|
3014
3564
|
kind: 'Link',
|
|
3015
3565
|
plural: true,
|
|
3016
|
-
fragment: select$
|
|
3566
|
+
fragment: select$b()
|
|
3017
3567
|
}
|
|
3018
3568
|
]
|
|
3019
3569
|
};
|
|
3020
3570
|
};
|
|
3021
|
-
function equals$
|
|
3571
|
+
function equals$2(existing, incoming) {
|
|
3022
3572
|
const existing_assets = existing.assets;
|
|
3023
3573
|
const incoming_assets = incoming.assets;
|
|
3024
3574
|
const equals_assets_items = equalsArray(existing_assets, incoming_assets, (existing_assets_item, incoming_assets_item) => {
|
|
@@ -3031,48 +3581,48 @@ function equals$3(existing, incoming) {
|
|
|
3031
3581
|
}
|
|
3032
3582
|
return true;
|
|
3033
3583
|
}
|
|
3034
|
-
const ingest$
|
|
3584
|
+
const ingest$2 = function InstalledAssetCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3035
3585
|
if (process.env.NODE_ENV !== 'production') {
|
|
3036
|
-
const validateError = validate$
|
|
3586
|
+
const validateError = validate$2(input);
|
|
3037
3587
|
if (validateError !== null) {
|
|
3038
3588
|
throw validateError;
|
|
3039
3589
|
}
|
|
3040
3590
|
}
|
|
3041
3591
|
const key = path.fullPath;
|
|
3042
|
-
const ttlToUse = TTL$
|
|
3043
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3592
|
+
const ttlToUse = TTL$2;
|
|
3593
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "AppFramework", VERSION$2, RepresentationType$2, equals$2);
|
|
3044
3594
|
return createLink(key);
|
|
3045
3595
|
};
|
|
3046
|
-
function getTypeCacheKeys$
|
|
3596
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3047
3597
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3048
3598
|
const rootKey = fullPathFactory();
|
|
3049
3599
|
rootKeySet.set(rootKey, {
|
|
3050
3600
|
namespace: keyPrefix,
|
|
3051
|
-
representationName: RepresentationType$
|
|
3601
|
+
representationName: RepresentationType$2,
|
|
3052
3602
|
mergeable: false
|
|
3053
3603
|
});
|
|
3054
3604
|
const input_assets_length = input.assets.length;
|
|
3055
3605
|
for (let i = 0; i < input_assets_length; i++) {
|
|
3056
|
-
getTypeCacheKeys$
|
|
3606
|
+
getTypeCacheKeys$5(rootKeySet, luvio, input.assets[i]);
|
|
3057
3607
|
}
|
|
3058
3608
|
}
|
|
3059
3609
|
|
|
3060
|
-
function select$
|
|
3061
|
-
return select$
|
|
3610
|
+
function select$5(luvio, params) {
|
|
3611
|
+
return select$6();
|
|
3062
3612
|
}
|
|
3063
|
-
function keyBuilder$
|
|
3613
|
+
function keyBuilder$8(luvio, params) {
|
|
3064
3614
|
return keyPrefix + '::InstalledAssetCollectionRepresentation:(' + 'assetIdOrName:' + params.queryParams.assetIdOrName + ',' + 'assetType:' + params.queryParams.assetType + ')';
|
|
3065
3615
|
}
|
|
3066
3616
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
3067
|
-
getTypeCacheKeys$
|
|
3617
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
3068
3618
|
}
|
|
3069
3619
|
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
3070
3620
|
const { body } = response;
|
|
3071
|
-
const key = keyBuilder$
|
|
3072
|
-
luvio.storeIngest(key, ingest$
|
|
3621
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
3622
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
3073
3623
|
const snapshot = luvio.storeLookup({
|
|
3074
3624
|
recordId: key,
|
|
3075
|
-
node: select$
|
|
3625
|
+
node: select$5(),
|
|
3076
3626
|
variables: {},
|
|
3077
3627
|
}, snapshotRefresh);
|
|
3078
3628
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3084,13 +3634,13 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3084
3634
|
return snapshot;
|
|
3085
3635
|
}
|
|
3086
3636
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3087
|
-
const key = keyBuilder$
|
|
3637
|
+
const key = keyBuilder$8(luvio, params);
|
|
3088
3638
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3089
3639
|
const storeMetadataParams = {
|
|
3090
|
-
ttl: TTL$
|
|
3640
|
+
ttl: TTL$2,
|
|
3091
3641
|
namespace: keyPrefix,
|
|
3092
|
-
version: VERSION$
|
|
3093
|
-
representationName: RepresentationType$
|
|
3642
|
+
version: VERSION$2,
|
|
3643
|
+
representationName: RepresentationType$2
|
|
3094
3644
|
};
|
|
3095
3645
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3096
3646
|
return errorSnapshot;
|
|
@@ -3115,14 +3665,14 @@ const getInstalledAssets_ConfigPropertyMetadata = [
|
|
|
3115
3665
|
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3116
3666
|
];
|
|
3117
3667
|
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getInstalledAssets_ConfigPropertyMetadata);
|
|
3118
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
3119
|
-
function keyBuilder$
|
|
3668
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$c(getInstalledAssets_ConfigPropertyMetadata);
|
|
3669
|
+
function keyBuilder$7(luvio, config) {
|
|
3120
3670
|
const resourceParams = createResourceParams$3(config);
|
|
3121
|
-
return keyBuilder$
|
|
3671
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
3122
3672
|
}
|
|
3123
3673
|
function typeCheckConfig$3(untrustedConfig) {
|
|
3124
3674
|
const config = {};
|
|
3125
|
-
typeCheckConfig$
|
|
3675
|
+
typeCheckConfig$c(untrustedConfig, config, getInstalledAssets_ConfigPropertyMetadata);
|
|
3126
3676
|
return config;
|
|
3127
3677
|
}
|
|
3128
3678
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -3140,7 +3690,7 @@ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
|
3140
3690
|
}
|
|
3141
3691
|
function adapterFragment$3(luvio, config) {
|
|
3142
3692
|
createResourceParams$3(config);
|
|
3143
|
-
return select$
|
|
3693
|
+
return select$5();
|
|
3144
3694
|
}
|
|
3145
3695
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3146
3696
|
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
@@ -3176,7 +3726,7 @@ function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext
|
|
|
3176
3726
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3177
3727
|
const { luvio, config } = context;
|
|
3178
3728
|
const selector = {
|
|
3179
|
-
recordId: keyBuilder$
|
|
3729
|
+
recordId: keyBuilder$7(luvio, config),
|
|
3180
3730
|
node: adapterFragment$3(luvio, config),
|
|
3181
3731
|
variables: {},
|
|
3182
3732
|
};
|
|
@@ -3196,197 +3746,21 @@ const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getIn
|
|
|
3196
3746
|
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
3197
3747
|
};
|
|
3198
3748
|
|
|
3199
|
-
const TTL$2 = 5000;
|
|
3200
|
-
const VERSION$2 = "a234a33bacb2228183eba50f4f96aef4";
|
|
3201
|
-
function validate$2(obj, path = 'TemplateRepresentation') {
|
|
3202
|
-
const v_error = (() => {
|
|
3203
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3204
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3205
|
-
}
|
|
3206
|
-
const obj_configurationUrl = obj.configurationUrl;
|
|
3207
|
-
const path_configurationUrl = path + '.configurationUrl';
|
|
3208
|
-
if (typeof obj_configurationUrl !== 'string') {
|
|
3209
|
-
return new TypeError('Expected "string" but received "' + typeof obj_configurationUrl + '" (at "' + path_configurationUrl + '")');
|
|
3210
|
-
}
|
|
3211
|
-
const obj_description = obj.description;
|
|
3212
|
-
const path_description = path + '.description';
|
|
3213
|
-
let obj_description_union0 = null;
|
|
3214
|
-
const obj_description_union0_error = (() => {
|
|
3215
|
-
if (typeof obj_description !== 'string') {
|
|
3216
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3217
|
-
}
|
|
3218
|
-
})();
|
|
3219
|
-
if (obj_description_union0_error != null) {
|
|
3220
|
-
obj_description_union0 = obj_description_union0_error.message;
|
|
3221
|
-
}
|
|
3222
|
-
let obj_description_union1 = null;
|
|
3223
|
-
const obj_description_union1_error = (() => {
|
|
3224
|
-
if (obj_description !== null) {
|
|
3225
|
-
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3226
|
-
}
|
|
3227
|
-
})();
|
|
3228
|
-
if (obj_description_union1_error != null) {
|
|
3229
|
-
obj_description_union1 = obj_description_union1_error.message;
|
|
3230
|
-
}
|
|
3231
|
-
if (obj_description_union0 && obj_description_union1) {
|
|
3232
|
-
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
3233
|
-
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3234
|
-
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3235
|
-
return new TypeError(message);
|
|
3236
|
-
}
|
|
3237
|
-
const obj_id = obj.id;
|
|
3238
|
-
const path_id = path + '.id';
|
|
3239
|
-
if (typeof obj_id !== 'string') {
|
|
3240
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3241
|
-
}
|
|
3242
|
-
const obj_label = obj.label;
|
|
3243
|
-
const path_label = path + '.label';
|
|
3244
|
-
if (typeof obj_label !== 'string') {
|
|
3245
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3246
|
-
}
|
|
3247
|
-
const obj_name = obj.name;
|
|
3248
|
-
const path_name = path + '.name';
|
|
3249
|
-
if (typeof obj_name !== 'string') {
|
|
3250
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3251
|
-
}
|
|
3252
|
-
const obj_templateType = obj.templateType;
|
|
3253
|
-
const path_templateType = path + '.templateType';
|
|
3254
|
-
if (typeof obj_templateType !== 'string') {
|
|
3255
|
-
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
3256
|
-
}
|
|
3257
|
-
const obj_url = obj.url;
|
|
3258
|
-
const path_url = path + '.url';
|
|
3259
|
-
if (typeof obj_url !== 'string') {
|
|
3260
|
-
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
3261
|
-
}
|
|
3262
|
-
})();
|
|
3263
|
-
return v_error === undefined ? null : v_error;
|
|
3264
|
-
}
|
|
3265
|
-
const RepresentationType$2 = 'TemplateRepresentation';
|
|
3266
|
-
function keyBuilder$7(luvio, config) {
|
|
3267
|
-
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
3268
|
-
}
|
|
3269
|
-
function keyBuilderFromType$1(luvio, object) {
|
|
3270
|
-
const keyParams = {
|
|
3271
|
-
id: object.id
|
|
3272
|
-
};
|
|
3273
|
-
return keyBuilder$7(luvio, keyParams);
|
|
3274
|
-
}
|
|
3275
|
-
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3276
|
-
return input;
|
|
3277
|
-
}
|
|
3278
|
-
const select$5 = function TemplateRepresentationSelect() {
|
|
3279
|
-
return {
|
|
3280
|
-
kind: 'Fragment',
|
|
3281
|
-
version: VERSION$2,
|
|
3282
|
-
private: [],
|
|
3283
|
-
selections: [
|
|
3284
|
-
{
|
|
3285
|
-
name: 'configurationUrl',
|
|
3286
|
-
kind: 'Scalar'
|
|
3287
|
-
},
|
|
3288
|
-
{
|
|
3289
|
-
name: 'description',
|
|
3290
|
-
kind: 'Scalar'
|
|
3291
|
-
},
|
|
3292
|
-
{
|
|
3293
|
-
name: 'id',
|
|
3294
|
-
kind: 'Scalar'
|
|
3295
|
-
},
|
|
3296
|
-
{
|
|
3297
|
-
name: 'label',
|
|
3298
|
-
kind: 'Scalar'
|
|
3299
|
-
},
|
|
3300
|
-
{
|
|
3301
|
-
name: 'name',
|
|
3302
|
-
kind: 'Scalar'
|
|
3303
|
-
},
|
|
3304
|
-
{
|
|
3305
|
-
name: 'templateType',
|
|
3306
|
-
kind: 'Scalar'
|
|
3307
|
-
},
|
|
3308
|
-
{
|
|
3309
|
-
name: 'url',
|
|
3310
|
-
kind: 'Scalar'
|
|
3311
|
-
}
|
|
3312
|
-
]
|
|
3313
|
-
};
|
|
3314
|
-
};
|
|
3315
|
-
function equals$2(existing, incoming) {
|
|
3316
|
-
const existing_configurationUrl = existing.configurationUrl;
|
|
3317
|
-
const incoming_configurationUrl = incoming.configurationUrl;
|
|
3318
|
-
if (!(existing_configurationUrl === incoming_configurationUrl)) {
|
|
3319
|
-
return false;
|
|
3320
|
-
}
|
|
3321
|
-
const existing_id = existing.id;
|
|
3322
|
-
const incoming_id = incoming.id;
|
|
3323
|
-
if (!(existing_id === incoming_id)) {
|
|
3324
|
-
return false;
|
|
3325
|
-
}
|
|
3326
|
-
const existing_label = existing.label;
|
|
3327
|
-
const incoming_label = incoming.label;
|
|
3328
|
-
if (!(existing_label === incoming_label)) {
|
|
3329
|
-
return false;
|
|
3330
|
-
}
|
|
3331
|
-
const existing_name = existing.name;
|
|
3332
|
-
const incoming_name = incoming.name;
|
|
3333
|
-
if (!(existing_name === incoming_name)) {
|
|
3334
|
-
return false;
|
|
3335
|
-
}
|
|
3336
|
-
const existing_templateType = existing.templateType;
|
|
3337
|
-
const incoming_templateType = incoming.templateType;
|
|
3338
|
-
if (!(existing_templateType === incoming_templateType)) {
|
|
3339
|
-
return false;
|
|
3340
|
-
}
|
|
3341
|
-
const existing_url = existing.url;
|
|
3342
|
-
const incoming_url = incoming.url;
|
|
3343
|
-
if (!(existing_url === incoming_url)) {
|
|
3344
|
-
return false;
|
|
3345
|
-
}
|
|
3346
|
-
const existing_description = existing.description;
|
|
3347
|
-
const incoming_description = incoming.description;
|
|
3348
|
-
if (!(existing_description === incoming_description)) {
|
|
3349
|
-
return false;
|
|
3350
|
-
}
|
|
3351
|
-
return true;
|
|
3352
|
-
}
|
|
3353
|
-
const ingest$2 = function TemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3354
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3355
|
-
const validateError = validate$2(input);
|
|
3356
|
-
if (validateError !== null) {
|
|
3357
|
-
throw validateError;
|
|
3358
|
-
}
|
|
3359
|
-
}
|
|
3360
|
-
const key = keyBuilderFromType$1(luvio, input);
|
|
3361
|
-
const ttlToUse = TTL$2;
|
|
3362
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "AppFramework", VERSION$2, RepresentationType$2, equals$2);
|
|
3363
|
-
return createLink(key);
|
|
3364
|
-
};
|
|
3365
|
-
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3366
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3367
|
-
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3368
|
-
rootKeySet.set(rootKey, {
|
|
3369
|
-
namespace: keyPrefix,
|
|
3370
|
-
representationName: RepresentationType$2,
|
|
3371
|
-
mergeable: false
|
|
3372
|
-
});
|
|
3373
|
-
}
|
|
3374
|
-
|
|
3375
3749
|
function select$4(luvio, params) {
|
|
3376
|
-
return select$
|
|
3750
|
+
return select$i();
|
|
3377
3751
|
}
|
|
3378
3752
|
function keyBuilder$6(luvio, params) {
|
|
3379
|
-
return keyBuilder$
|
|
3753
|
+
return keyBuilder$o(luvio, {
|
|
3380
3754
|
id: params.urlParams.templateIdOrApiName
|
|
3381
3755
|
});
|
|
3382
3756
|
}
|
|
3383
3757
|
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
3384
|
-
getTypeCacheKeys$
|
|
3758
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
3385
3759
|
}
|
|
3386
3760
|
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
3387
3761
|
const { body } = response;
|
|
3388
3762
|
const key = keyBuilder$6(luvio, resourceParams);
|
|
3389
|
-
luvio.storeIngest(key, ingest$
|
|
3763
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
3390
3764
|
const snapshot = luvio.storeLookup({
|
|
3391
3765
|
recordId: key,
|
|
3392
3766
|
node: select$4(),
|
|
@@ -3404,10 +3778,10 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
3404
3778
|
const key = keyBuilder$6(luvio, params);
|
|
3405
3779
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3406
3780
|
const storeMetadataParams = {
|
|
3407
|
-
ttl: TTL$
|
|
3781
|
+
ttl: TTL$8,
|
|
3408
3782
|
namespace: keyPrefix,
|
|
3409
|
-
version: VERSION$
|
|
3410
|
-
representationName: RepresentationType$
|
|
3783
|
+
version: VERSION$8,
|
|
3784
|
+
representationName: RepresentationType$8
|
|
3411
3785
|
};
|
|
3412
3786
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3413
3787
|
return errorSnapshot;
|
|
@@ -3438,14 +3812,14 @@ const getTemplate_ConfigPropertyMetadata = [
|
|
|
3438
3812
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3439
3813
|
];
|
|
3440
3814
|
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplate_ConfigPropertyMetadata);
|
|
3441
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
3815
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$c(getTemplate_ConfigPropertyMetadata);
|
|
3442
3816
|
function keyBuilder$5(luvio, config) {
|
|
3443
3817
|
const resourceParams = createResourceParams$2(config);
|
|
3444
3818
|
return keyBuilder$6(luvio, resourceParams);
|
|
3445
3819
|
}
|
|
3446
3820
|
function typeCheckConfig$2(untrustedConfig) {
|
|
3447
3821
|
const config = {};
|
|
3448
|
-
typeCheckConfig$
|
|
3822
|
+
typeCheckConfig$c(untrustedConfig, config, getTemplate_ConfigPropertyMetadata);
|
|
3449
3823
|
return config;
|
|
3450
3824
|
}
|
|
3451
3825
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -3520,7 +3894,7 @@ const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(
|
|
|
3520
3894
|
};
|
|
3521
3895
|
const notifyChangeFactory$1 = (luvio, options) => {
|
|
3522
3896
|
return function getAppFrameworkTemplatesByTemplateIdOrApiNameNotifyChange(configs) {
|
|
3523
|
-
const keys = configs.map(c => keyBuilder$
|
|
3897
|
+
const keys = configs.map(c => keyBuilder$o(luvio, c));
|
|
3524
3898
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
3525
3899
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
3526
3900
|
const { key, record: val } = entries[i];
|
|
@@ -3529,21 +3903,21 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
3529
3903
|
.then((response) => {
|
|
3530
3904
|
return luvio.handleSuccessResponse(() => {
|
|
3531
3905
|
const { body } = response;
|
|
3532
|
-
luvio.storeIngest(key, ingest$
|
|
3906
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
3533
3907
|
return luvio.storeBroadcast();
|
|
3534
3908
|
}, () => {
|
|
3535
3909
|
const cache = new StoreKeyMap();
|
|
3536
|
-
getTypeCacheKeys$
|
|
3910
|
+
getTypeCacheKeys$8(cache, luvio, response.body);
|
|
3537
3911
|
return cache;
|
|
3538
3912
|
});
|
|
3539
3913
|
}, (error) => {
|
|
3540
3914
|
return luvio.handleErrorResponse(() => {
|
|
3541
3915
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
3542
3916
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
3543
|
-
ttl: TTL$
|
|
3917
|
+
ttl: TTL$8,
|
|
3544
3918
|
namespace: keyPrefix,
|
|
3545
|
-
version: VERSION$
|
|
3546
|
-
representationName: RepresentationType$
|
|
3919
|
+
version: VERSION$8,
|
|
3920
|
+
representationName: RepresentationType$8
|
|
3547
3921
|
});
|
|
3548
3922
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
3549
3923
|
});
|
|
@@ -3704,14 +4078,14 @@ const getTemplateConfig_ConfigPropertyMetadata = [
|
|
|
3704
4078
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3705
4079
|
];
|
|
3706
4080
|
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTemplateConfig_ConfigPropertyMetadata);
|
|
3707
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
4081
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$c(getTemplateConfig_ConfigPropertyMetadata);
|
|
3708
4082
|
function keyBuilder$2(luvio, config) {
|
|
3709
4083
|
const resourceParams = createResourceParams$1(config);
|
|
3710
4084
|
return keyBuilder$3(luvio, resourceParams);
|
|
3711
4085
|
}
|
|
3712
4086
|
function typeCheckConfig$1(untrustedConfig) {
|
|
3713
4087
|
const config = {};
|
|
3714
|
-
typeCheckConfig$
|
|
4088
|
+
typeCheckConfig$c(untrustedConfig, config, getTemplateConfig_ConfigPropertyMetadata);
|
|
3715
4089
|
return config;
|
|
3716
4090
|
}
|
|
3717
4091
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -3848,7 +4222,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
3848
4222
|
for (let i = 0; i < input_templates.length; i++) {
|
|
3849
4223
|
const input_templates_item = input_templates[i];
|
|
3850
4224
|
let input_templates_item_id = input_templates_id + '__' + i;
|
|
3851
|
-
input_templates[i] = ingest$
|
|
4225
|
+
input_templates[i] = ingest$8(input_templates_item, {
|
|
3852
4226
|
fullPath: input_templates_item_id,
|
|
3853
4227
|
propertyName: i,
|
|
3854
4228
|
parent: {
|
|
@@ -3871,7 +4245,7 @@ const select$1 = function TemplateCollectionRepresentationSelect() {
|
|
|
3871
4245
|
name: 'templates',
|
|
3872
4246
|
kind: 'Link',
|
|
3873
4247
|
plural: true,
|
|
3874
|
-
fragment: select$
|
|
4248
|
+
fragment: select$i()
|
|
3875
4249
|
}
|
|
3876
4250
|
]
|
|
3877
4251
|
};
|
|
@@ -3911,7 +4285,7 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3911
4285
|
});
|
|
3912
4286
|
const input_templates_length = input.templates.length;
|
|
3913
4287
|
for (let i = 0; i < input_templates_length; i++) {
|
|
3914
|
-
getTypeCacheKeys$
|
|
4288
|
+
getTypeCacheKeys$8(rootKeySet, luvio, input.templates[i]);
|
|
3915
4289
|
}
|
|
3916
4290
|
}
|
|
3917
4291
|
|
|
@@ -3970,7 +4344,7 @@ function createResourceRequest(config) {
|
|
|
3970
4344
|
const adapterName = 'getTemplates';
|
|
3971
4345
|
const getTemplates_ConfigPropertyMetadata = [];
|
|
3972
4346
|
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTemplates_ConfigPropertyMetadata);
|
|
3973
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
4347
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$c(getTemplates_ConfigPropertyMetadata);
|
|
3974
4348
|
function keyBuilder(luvio, config) {
|
|
3975
4349
|
createResourceParams(config);
|
|
3976
4350
|
return keyBuilder$1();
|
|
@@ -4051,6 +4425,7 @@ const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplate
|
|
|
4051
4425
|
};
|
|
4052
4426
|
|
|
4053
4427
|
let createApp;
|
|
4428
|
+
let createTemplate;
|
|
4054
4429
|
let deleteApp;
|
|
4055
4430
|
let getApp;
|
|
4056
4431
|
let getAppActivities;
|
|
@@ -4112,6 +4487,7 @@ function bindExportsTo(luvio) {
|
|
|
4112
4487
|
}
|
|
4113
4488
|
return {
|
|
4114
4489
|
createApp: unwrapSnapshotData(createAppAdapterFactory),
|
|
4490
|
+
createTemplate: unwrapSnapshotData(createTemplateAdapterFactory),
|
|
4115
4491
|
deleteApp: createLDSAdapter(luvio, adapterName$9, deleteAppAdapterFactory),
|
|
4116
4492
|
getApp: createWireAdapterConstructor(luvio, getApp_ldsAdapter, getAppMetadata),
|
|
4117
4493
|
getAppActivities: createWireAdapterConstructor(luvio, getAppActivities_ldsAdapter, getAppActivitiesMetadata),
|
|
@@ -4144,6 +4520,7 @@ function bindExportsTo(luvio) {
|
|
|
4144
4520
|
withDefaultLuvio((luvio) => {
|
|
4145
4521
|
({
|
|
4146
4522
|
createApp,
|
|
4523
|
+
createTemplate,
|
|
4147
4524
|
deleteApp,
|
|
4148
4525
|
getApp,
|
|
4149
4526
|
getAppActivities,
|
|
@@ -4172,5 +4549,5 @@ withDefaultLuvio((luvio) => {
|
|
|
4172
4549
|
} = bindExportsTo(luvio));
|
|
4173
4550
|
});
|
|
4174
4551
|
|
|
4175
|
-
export { createApp, deleteApp, getApp, getAppActivities, getAppActivitiesNotifyChange, getAppActivities_imperative, getAppActivity, getAppActivityNotifyChange, getAppActivity_imperative, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getInstalledAssets, getInstalledAssets_imperative, getTemplate, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative };
|
|
4176
|
-
// version: 1.
|
|
4552
|
+
export { createApp, createTemplate, deleteApp, getApp, getAppActivities, getAppActivitiesNotifyChange, getAppActivities_imperative, getAppActivity, getAppActivityNotifyChange, getAppActivity_imperative, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getInstalledAssets, getInstalledAssets_imperative, getTemplate, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative };
|
|
4553
|
+
// version: 1.321.0-40847d67a8
|