@salesforce/lds-adapters-analytics-app-framework 1.321.0 → 1.322.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 +1115 -769
- package/dist/es/es2018/types/src/generated/adapters/getTags.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/setTags.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
- package/dist/es/es2018/types/src/generated/resources/getAppFrameworkTemplatesTagsByTemplateIdOrApiName.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/putAppFrameworkTemplatesTagsByTemplateIdOrApiName.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/TemplateTagCollectionInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/TemplateTagCollectionRepresentation.d.ts +45 -0
- package/package.json +3 -3
- package/sfdc/index.js +1143 -742
- package/src/raml/api.raml +51 -0
- package/src/raml/luvio.raml +14 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a, typeCheckConfig as typeCheckConfig$e, StoreKeyMap, createResourceParams as createResourceParams$e } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -112,8 +112,8 @@ function createLink(ref) {
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
const VERSION$
|
|
116
|
-
function validate$
|
|
115
|
+
const VERSION$j = "8747a45321deaf63f65cf74537b07eb6";
|
|
116
|
+
function validate$m(obj, path = 'UserRepresentation') {
|
|
117
117
|
const v_error = (() => {
|
|
118
118
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
119
119
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -157,10 +157,10 @@ function validate$l(obj, path = 'UserRepresentation') {
|
|
|
157
157
|
})();
|
|
158
158
|
return v_error === undefined ? null : v_error;
|
|
159
159
|
}
|
|
160
|
-
const select$
|
|
160
|
+
const select$w = function UserRepresentationSelect() {
|
|
161
161
|
return {
|
|
162
162
|
kind: 'Fragment',
|
|
163
|
-
version: VERSION$
|
|
163
|
+
version: VERSION$j,
|
|
164
164
|
private: [],
|
|
165
165
|
selections: [
|
|
166
166
|
{
|
|
@@ -178,7 +178,7 @@ const select$t = function UserRepresentationSelect() {
|
|
|
178
178
|
]
|
|
179
179
|
};
|
|
180
180
|
};
|
|
181
|
-
function equals$
|
|
181
|
+
function equals$g(existing, incoming) {
|
|
182
182
|
const existing_id = existing.id;
|
|
183
183
|
const incoming_id = incoming.id;
|
|
184
184
|
if (!(existing_id === incoming_id)) {
|
|
@@ -197,8 +197,8 @@ function equals$f(existing, incoming) {
|
|
|
197
197
|
return true;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
const VERSION$
|
|
201
|
-
function validate$
|
|
200
|
+
const VERSION$i = "74662b770f974cec987197380f2580ea";
|
|
201
|
+
function validate$l(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
202
202
|
const v_error = (() => {
|
|
203
203
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
204
204
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -217,10 +217,10 @@ function validate$k(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
|
217
217
|
})();
|
|
218
218
|
return v_error === undefined ? null : v_error;
|
|
219
219
|
}
|
|
220
|
-
const select$
|
|
220
|
+
const select$v = function ScheduledTimezoneRepresentationSelect() {
|
|
221
221
|
return {
|
|
222
222
|
kind: 'Fragment',
|
|
223
|
-
version: VERSION$
|
|
223
|
+
version: VERSION$i,
|
|
224
224
|
private: [],
|
|
225
225
|
selections: [
|
|
226
226
|
{
|
|
@@ -238,7 +238,7 @@ const select$s = function ScheduledTimezoneRepresentationSelect() {
|
|
|
238
238
|
]
|
|
239
239
|
};
|
|
240
240
|
};
|
|
241
|
-
function equals$
|
|
241
|
+
function equals$f(existing, incoming) {
|
|
242
242
|
const existing_name = existing.name;
|
|
243
243
|
const incoming_name = incoming.name;
|
|
244
244
|
if (!(existing_name === incoming_name)) {
|
|
@@ -257,8 +257,8 @@ function equals$e(existing, incoming) {
|
|
|
257
257
|
return true;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
const VERSION$
|
|
261
|
-
function validate$
|
|
260
|
+
const VERSION$h = "d96bf6818be64d5924beaaad8e684221";
|
|
261
|
+
function validate$k(obj, path = 'ScheduledTimeRepresentation') {
|
|
262
262
|
const v_error = (() => {
|
|
263
263
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
264
264
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -275,7 +275,7 @@ function validate$j(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
275
275
|
}
|
|
276
276
|
const obj_timezone = obj.timezone;
|
|
277
277
|
const path_timezone = path + '.timezone';
|
|
278
|
-
const referencepath_timezoneValidationError = validate$
|
|
278
|
+
const referencepath_timezoneValidationError = validate$l(obj_timezone, path_timezone);
|
|
279
279
|
if (referencepath_timezoneValidationError !== null) {
|
|
280
280
|
let message = 'Object doesn\'t match ScheduledTimezoneRepresentation (at "' + path_timezone + '")\n';
|
|
281
281
|
message += referencepath_timezoneValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -284,11 +284,11 @@ function validate$j(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
284
284
|
})();
|
|
285
285
|
return v_error === undefined ? null : v_error;
|
|
286
286
|
}
|
|
287
|
-
const select$
|
|
288
|
-
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$
|
|
287
|
+
const select$u = function ScheduledTimeRepresentationSelect() {
|
|
288
|
+
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$v();
|
|
289
289
|
return {
|
|
290
290
|
kind: 'Fragment',
|
|
291
|
-
version: VERSION$
|
|
291
|
+
version: VERSION$h,
|
|
292
292
|
private: [],
|
|
293
293
|
selections: [
|
|
294
294
|
{
|
|
@@ -307,7 +307,7 @@ const select$r = function ScheduledTimeRepresentationSelect() {
|
|
|
307
307
|
]
|
|
308
308
|
};
|
|
309
309
|
};
|
|
310
|
-
function equals$
|
|
310
|
+
function equals$e(existing, incoming) {
|
|
311
311
|
const existing_hour = existing.hour;
|
|
312
312
|
const incoming_hour = incoming.hour;
|
|
313
313
|
if (!(existing_hour === incoming_hour)) {
|
|
@@ -320,18 +320,18 @@ function equals$d(existing, incoming) {
|
|
|
320
320
|
}
|
|
321
321
|
const existing_timezone = existing.timezone;
|
|
322
322
|
const incoming_timezone = incoming.timezone;
|
|
323
|
-
if (!(equals$
|
|
323
|
+
if (!(equals$f(existing_timezone, incoming_timezone))) {
|
|
324
324
|
return false;
|
|
325
325
|
}
|
|
326
326
|
return true;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
const VERSION$
|
|
330
|
-
const select$
|
|
331
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
329
|
+
const VERSION$g = "91838b86aa135ce828af6242b11ae888";
|
|
330
|
+
const select$t = function HourlyScheduledItemRepresentationSelect() {
|
|
331
|
+
const { selections: ScheduledItemRepresentationSelections } = select$q();
|
|
332
332
|
return {
|
|
333
333
|
kind: 'Fragment',
|
|
334
|
-
version: VERSION$
|
|
334
|
+
version: VERSION$g,
|
|
335
335
|
private: [],
|
|
336
336
|
selections: [
|
|
337
337
|
...ScheduledItemRepresentationSelections,
|
|
@@ -348,12 +348,12 @@ const select$q = function HourlyScheduledItemRepresentationSelect() {
|
|
|
348
348
|
};
|
|
349
349
|
};
|
|
350
350
|
|
|
351
|
-
const VERSION$
|
|
352
|
-
const select$
|
|
353
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
351
|
+
const VERSION$f = "46260a34f0b2c2d7adc7f8c150a8d8fb";
|
|
352
|
+
const select$s = function WeeklyScheduledItemRepresentationSelect() {
|
|
353
|
+
const { selections: ScheduledItemRepresentationSelections } = select$q();
|
|
354
354
|
return {
|
|
355
355
|
kind: 'Fragment',
|
|
356
|
-
version: VERSION$
|
|
356
|
+
version: VERSION$f,
|
|
357
357
|
private: [],
|
|
358
358
|
selections: [
|
|
359
359
|
...ScheduledItemRepresentationSelections,
|
|
@@ -366,12 +366,12 @@ const select$p = function WeeklyScheduledItemRepresentationSelect() {
|
|
|
366
366
|
};
|
|
367
367
|
};
|
|
368
368
|
|
|
369
|
-
const VERSION$
|
|
370
|
-
const select$
|
|
371
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
369
|
+
const VERSION$e = "dcda6d015a01d9acde5fac241448cfe4";
|
|
370
|
+
const select$r = function DailyScheduledItemRepresentationSelect() {
|
|
371
|
+
const { selections: ScheduledItemRepresentationSelections } = select$q();
|
|
372
372
|
return {
|
|
373
373
|
kind: 'Fragment',
|
|
374
|
-
version: VERSION$
|
|
374
|
+
version: VERSION$e,
|
|
375
375
|
private: [],
|
|
376
376
|
selections: [
|
|
377
377
|
...ScheduledItemRepresentationSelections,
|
|
@@ -385,8 +385,8 @@ var DiscriminatorValues;
|
|
|
385
385
|
DiscriminatorValues["Weekly"] = "Weekly";
|
|
386
386
|
DiscriminatorValues["Daily"] = "Daily";
|
|
387
387
|
})(DiscriminatorValues || (DiscriminatorValues = {}));
|
|
388
|
-
const VERSION$
|
|
389
|
-
function validate$
|
|
388
|
+
const VERSION$d = "193484b4261ca5840b61caaab3dea067";
|
|
389
|
+
function validate$j(obj, path = 'ScheduledItemRepresentation') {
|
|
390
390
|
const v_error = (() => {
|
|
391
391
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
392
392
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -403,7 +403,7 @@ function validate$i(obj, path = 'ScheduledItemRepresentation') {
|
|
|
403
403
|
}
|
|
404
404
|
const obj_time = obj.time;
|
|
405
405
|
const path_time = path + '.time';
|
|
406
|
-
const referencepath_timeValidationError = validate$
|
|
406
|
+
const referencepath_timeValidationError = validate$k(obj_time, path_time);
|
|
407
407
|
if (referencepath_timeValidationError !== null) {
|
|
408
408
|
let message = 'Object doesn\'t match ScheduledTimeRepresentation (at "' + path_time + '")\n';
|
|
409
409
|
message += referencepath_timeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -413,9 +413,9 @@ function validate$i(obj, path = 'ScheduledItemRepresentation') {
|
|
|
413
413
|
return v_error === undefined ? null : v_error;
|
|
414
414
|
}
|
|
415
415
|
const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
416
|
-
const hourlyScheduledItemRepresentationSelections = select$
|
|
417
|
-
const weeklyScheduledItemRepresentationSelections = select$
|
|
418
|
-
const dailyScheduledItemRepresentationSelections = select$
|
|
416
|
+
const hourlyScheduledItemRepresentationSelections = select$t();
|
|
417
|
+
const weeklyScheduledItemRepresentationSelections = select$s();
|
|
418
|
+
const dailyScheduledItemRepresentationSelections = select$r();
|
|
419
419
|
return {
|
|
420
420
|
kind: 'Fragment',
|
|
421
421
|
union: true,
|
|
@@ -427,11 +427,11 @@ const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
|
427
427
|
}
|
|
428
428
|
};
|
|
429
429
|
};
|
|
430
|
-
const select$
|
|
431
|
-
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$
|
|
430
|
+
const select$q = function ScheduledItemRepresentationSelect() {
|
|
431
|
+
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$u();
|
|
432
432
|
return {
|
|
433
433
|
kind: 'Fragment',
|
|
434
|
-
version: VERSION$
|
|
434
|
+
version: VERSION$d,
|
|
435
435
|
private: [],
|
|
436
436
|
selections: [
|
|
437
437
|
{
|
|
@@ -450,7 +450,7 @@ const select$n = function ScheduledItemRepresentationSelect() {
|
|
|
450
450
|
]
|
|
451
451
|
};
|
|
452
452
|
};
|
|
453
|
-
function equals$
|
|
453
|
+
function equals$d(existing, incoming) {
|
|
454
454
|
const existing_frequency = existing.frequency;
|
|
455
455
|
const incoming_frequency = incoming.frequency;
|
|
456
456
|
if (!(existing_frequency === incoming_frequency)) {
|
|
@@ -463,14 +463,14 @@ function equals$c(existing, incoming) {
|
|
|
463
463
|
}
|
|
464
464
|
const existing_time = existing.time;
|
|
465
465
|
const incoming_time = incoming.time;
|
|
466
|
-
if (!(equals$
|
|
466
|
+
if (!(equals$e(existing_time, incoming_time))) {
|
|
467
467
|
return false;
|
|
468
468
|
}
|
|
469
469
|
return true;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
|
-
const VERSION$
|
|
473
|
-
function validate$
|
|
472
|
+
const VERSION$c = "06b5da5162febff2692d819c9b718be5";
|
|
473
|
+
function validate$i(obj, path = 'AppScheduleRepresentation') {
|
|
474
474
|
const v_error = (() => {
|
|
475
475
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
476
476
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -479,7 +479,7 @@ function validate$h(obj, path = 'AppScheduleRepresentation') {
|
|
|
479
479
|
const path_dataRefreshSchedule = path + '.dataRefreshSchedule';
|
|
480
480
|
let obj_dataRefreshSchedule_union0 = null;
|
|
481
481
|
const obj_dataRefreshSchedule_union0_error = (() => {
|
|
482
|
-
const referencepath_dataRefreshScheduleValidationError = validate$
|
|
482
|
+
const referencepath_dataRefreshScheduleValidationError = validate$j(obj_dataRefreshSchedule, path_dataRefreshSchedule);
|
|
483
483
|
if (referencepath_dataRefreshScheduleValidationError !== null) {
|
|
484
484
|
let message = 'Object doesn\'t match ScheduledItemRepresentation (at "' + path_dataRefreshSchedule + '")\n';
|
|
485
485
|
message += referencepath_dataRefreshScheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -533,11 +533,11 @@ function validate$h(obj, path = 'AppScheduleRepresentation') {
|
|
|
533
533
|
})();
|
|
534
534
|
return v_error === undefined ? null : v_error;
|
|
535
535
|
}
|
|
536
|
-
const select$
|
|
536
|
+
const select$p = function AppScheduleRepresentationSelect() {
|
|
537
537
|
const ScheduledItemRepresentation__unionSelections = selectChildren();
|
|
538
538
|
return {
|
|
539
539
|
kind: 'Fragment',
|
|
540
|
-
version: VERSION$
|
|
540
|
+
version: VERSION$c,
|
|
541
541
|
private: [],
|
|
542
542
|
selections: [
|
|
543
543
|
{
|
|
@@ -555,13 +555,13 @@ const select$m = function AppScheduleRepresentationSelect() {
|
|
|
555
555
|
]
|
|
556
556
|
};
|
|
557
557
|
};
|
|
558
|
-
function equals$
|
|
558
|
+
function equals$c(existing, incoming) {
|
|
559
559
|
const existing_dataRefreshSchedule = existing.dataRefreshSchedule;
|
|
560
560
|
const incoming_dataRefreshSchedule = incoming.dataRefreshSchedule;
|
|
561
561
|
if (!(existing_dataRefreshSchedule === incoming_dataRefreshSchedule
|
|
562
562
|
|| (existing_dataRefreshSchedule != null &&
|
|
563
563
|
incoming_dataRefreshSchedule != null &&
|
|
564
|
-
equals$
|
|
564
|
+
equals$d(existing_dataRefreshSchedule, incoming_dataRefreshSchedule)))) {
|
|
565
565
|
return false;
|
|
566
566
|
}
|
|
567
567
|
const existing_url = existing.url;
|
|
@@ -572,9 +572,9 @@ function equals$b(existing, incoming) {
|
|
|
572
572
|
return true;
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
const TTL$
|
|
576
|
-
const VERSION$
|
|
577
|
-
function validate$
|
|
575
|
+
const TTL$b = 5000;
|
|
576
|
+
const VERSION$b = "be6294bb853a9581fb3b06a2d8caa5d5";
|
|
577
|
+
function validate$h(obj, path = 'AppRepresentation') {
|
|
578
578
|
const v_error = (() => {
|
|
579
579
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
580
580
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -596,7 +596,7 @@ function validate$g(obj, path = 'AppRepresentation') {
|
|
|
596
596
|
}
|
|
597
597
|
const obj_createdBy = obj.createdBy;
|
|
598
598
|
const path_createdBy = path + '.createdBy';
|
|
599
|
-
const referencepath_createdByValidationError = validate$
|
|
599
|
+
const referencepath_createdByValidationError = validate$m(obj_createdBy, path_createdBy);
|
|
600
600
|
if (referencepath_createdByValidationError !== null) {
|
|
601
601
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_createdBy + '")\n';
|
|
602
602
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -650,7 +650,7 @@ function validate$g(obj, path = 'AppRepresentation') {
|
|
|
650
650
|
}
|
|
651
651
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
652
652
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
653
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
653
|
+
const referencepath_lastModifiedByValidationError = validate$m(obj_lastModifiedBy, path_lastModifiedBy);
|
|
654
654
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
655
655
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
656
656
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -675,7 +675,7 @@ function validate$g(obj, path = 'AppRepresentation') {
|
|
|
675
675
|
const path_schedule = path + '.schedule';
|
|
676
676
|
let obj_schedule_union0 = null;
|
|
677
677
|
const obj_schedule_union0_error = (() => {
|
|
678
|
-
const referencepath_scheduleValidationError = validate$
|
|
678
|
+
const referencepath_scheduleValidationError = validate$i(obj_schedule, path_schedule);
|
|
679
679
|
if (referencepath_scheduleValidationError !== null) {
|
|
680
680
|
let message = 'Object doesn\'t match AppScheduleRepresentation (at "' + path_schedule + '")\n';
|
|
681
681
|
message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -737,25 +737,25 @@ function validate$g(obj, path = 'AppRepresentation') {
|
|
|
737
737
|
})();
|
|
738
738
|
return v_error === undefined ? null : v_error;
|
|
739
739
|
}
|
|
740
|
-
const RepresentationType$
|
|
741
|
-
function keyBuilder$
|
|
742
|
-
return keyPrefix + '::' + RepresentationType$
|
|
740
|
+
const RepresentationType$b = 'AppRepresentation';
|
|
741
|
+
function keyBuilder$t(luvio, config) {
|
|
742
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.id;
|
|
743
743
|
}
|
|
744
|
-
function keyBuilderFromType$
|
|
744
|
+
function keyBuilderFromType$8(luvio, object) {
|
|
745
745
|
const keyParams = {
|
|
746
746
|
id: object.id
|
|
747
747
|
};
|
|
748
|
-
return keyBuilder$
|
|
748
|
+
return keyBuilder$t(luvio, keyParams);
|
|
749
749
|
}
|
|
750
|
-
function normalize$
|
|
750
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
751
751
|
return input;
|
|
752
752
|
}
|
|
753
|
-
const select$
|
|
754
|
-
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$
|
|
755
|
-
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$
|
|
753
|
+
const select$o = function AppRepresentationSelect() {
|
|
754
|
+
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$w();
|
|
755
|
+
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$p();
|
|
756
756
|
return {
|
|
757
757
|
kind: 'Fragment',
|
|
758
|
-
version: VERSION$
|
|
758
|
+
version: VERSION$b,
|
|
759
759
|
private: [],
|
|
760
760
|
selections: [
|
|
761
761
|
{
|
|
@@ -842,7 +842,7 @@ const select$l = function AppRepresentationSelect() {
|
|
|
842
842
|
]
|
|
843
843
|
};
|
|
844
844
|
};
|
|
845
|
-
function equals$
|
|
845
|
+
function equals$b(existing, incoming) {
|
|
846
846
|
const existing_activitiesUrl = existing.activitiesUrl;
|
|
847
847
|
const incoming_activitiesUrl = incoming.activitiesUrl;
|
|
848
848
|
if (!(existing_activitiesUrl === incoming_activitiesUrl)) {
|
|
@@ -915,7 +915,7 @@ function equals$a(existing, incoming) {
|
|
|
915
915
|
}
|
|
916
916
|
const existing_createdBy = existing.createdBy;
|
|
917
917
|
const incoming_createdBy = incoming.createdBy;
|
|
918
|
-
if (!(equals$
|
|
918
|
+
if (!(equals$g(existing_createdBy, incoming_createdBy))) {
|
|
919
919
|
return false;
|
|
920
920
|
}
|
|
921
921
|
const existing_description = existing.description;
|
|
@@ -925,7 +925,7 @@ function equals$a(existing, incoming) {
|
|
|
925
925
|
}
|
|
926
926
|
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
927
927
|
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
928
|
-
if (!(equals$
|
|
928
|
+
if (!(equals$g(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
929
929
|
return false;
|
|
930
930
|
}
|
|
931
931
|
const existing_schedule = existing.schedule;
|
|
@@ -933,7 +933,7 @@ function equals$a(existing, incoming) {
|
|
|
933
933
|
if (!(existing_schedule === incoming_schedule
|
|
934
934
|
|| (existing_schedule != null &&
|
|
935
935
|
incoming_schedule != null &&
|
|
936
|
-
equals$
|
|
936
|
+
equals$c(existing_schedule, incoming_schedule)))) {
|
|
937
937
|
return false;
|
|
938
938
|
}
|
|
939
939
|
const existing_templateValues = existing.templateValues;
|
|
@@ -948,31 +948,31 @@ function equals$a(existing, incoming) {
|
|
|
948
948
|
}
|
|
949
949
|
return true;
|
|
950
950
|
}
|
|
951
|
-
const ingest$
|
|
951
|
+
const ingest$b = function AppRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
952
952
|
if (process.env.NODE_ENV !== 'production') {
|
|
953
|
-
const validateError = validate$
|
|
953
|
+
const validateError = validate$h(input);
|
|
954
954
|
if (validateError !== null) {
|
|
955
955
|
throw validateError;
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
|
-
const key = keyBuilderFromType$
|
|
959
|
-
const ttlToUse = TTL$
|
|
960
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
958
|
+
const key = keyBuilderFromType$8(luvio, input);
|
|
959
|
+
const ttlToUse = TTL$b;
|
|
960
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "AppFramework", VERSION$b, RepresentationType$b, equals$b);
|
|
961
961
|
return createLink(key);
|
|
962
962
|
};
|
|
963
|
-
function getTypeCacheKeys$
|
|
963
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
964
964
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
965
|
-
const rootKey = keyBuilderFromType$
|
|
965
|
+
const rootKey = keyBuilderFromType$8(luvio, input);
|
|
966
966
|
rootKeySet.set(rootKey, {
|
|
967
967
|
namespace: keyPrefix,
|
|
968
|
-
representationName: RepresentationType$
|
|
968
|
+
representationName: RepresentationType$b,
|
|
969
969
|
mergeable: false
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
|
|
973
|
-
const TTL$
|
|
974
|
-
const VERSION$
|
|
975
|
-
function validate$
|
|
973
|
+
const TTL$a = 5000;
|
|
974
|
+
const VERSION$a = "2dd7266897d8b84ea0207582ca533d29";
|
|
975
|
+
function validate$g(obj, path = 'AppCollectionRepresentation') {
|
|
976
976
|
const v_error = (() => {
|
|
977
977
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
978
978
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -992,14 +992,14 @@ function validate$f(obj, path = 'AppCollectionRepresentation') {
|
|
|
992
992
|
})();
|
|
993
993
|
return v_error === undefined ? null : v_error;
|
|
994
994
|
}
|
|
995
|
-
const RepresentationType$
|
|
996
|
-
function normalize$
|
|
995
|
+
const RepresentationType$a = 'AppCollectionRepresentation';
|
|
996
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
997
997
|
const input_apps = input.apps;
|
|
998
998
|
const input_apps_id = path.fullPath + '__apps';
|
|
999
999
|
for (let i = 0; i < input_apps.length; i++) {
|
|
1000
1000
|
const input_apps_item = input_apps[i];
|
|
1001
1001
|
let input_apps_item_id = input_apps_id + '__' + i;
|
|
1002
|
-
input_apps[i] = ingest$
|
|
1002
|
+
input_apps[i] = ingest$b(input_apps_item, {
|
|
1003
1003
|
fullPath: input_apps_item_id,
|
|
1004
1004
|
propertyName: i,
|
|
1005
1005
|
parent: {
|
|
@@ -1012,22 +1012,22 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
return input;
|
|
1014
1014
|
}
|
|
1015
|
-
const select$
|
|
1015
|
+
const select$n = function AppCollectionRepresentationSelect() {
|
|
1016
1016
|
return {
|
|
1017
1017
|
kind: 'Fragment',
|
|
1018
|
-
version: VERSION$
|
|
1018
|
+
version: VERSION$a,
|
|
1019
1019
|
private: [],
|
|
1020
1020
|
selections: [
|
|
1021
1021
|
{
|
|
1022
1022
|
name: 'apps',
|
|
1023
1023
|
kind: 'Link',
|
|
1024
1024
|
plural: true,
|
|
1025
|
-
fragment: select$
|
|
1025
|
+
fragment: select$o()
|
|
1026
1026
|
}
|
|
1027
1027
|
]
|
|
1028
1028
|
};
|
|
1029
1029
|
};
|
|
1030
|
-
function equals$
|
|
1030
|
+
function equals$a(existing, incoming) {
|
|
1031
1031
|
const existing_apps = existing.apps;
|
|
1032
1032
|
const incoming_apps = incoming.apps;
|
|
1033
1033
|
const equals_apps_items = equalsArray(existing_apps, incoming_apps, (existing_apps_item, incoming_apps_item) => {
|
|
@@ -1040,48 +1040,48 @@ function equals$9(existing, incoming) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
return true;
|
|
1042
1042
|
}
|
|
1043
|
-
const ingest$
|
|
1043
|
+
const ingest$a = function AppCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1044
1044
|
if (process.env.NODE_ENV !== 'production') {
|
|
1045
|
-
const validateError = validate$
|
|
1045
|
+
const validateError = validate$g(input);
|
|
1046
1046
|
if (validateError !== null) {
|
|
1047
1047
|
throw validateError;
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
const key = path.fullPath;
|
|
1051
|
-
const ttlToUse = TTL$
|
|
1052
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1051
|
+
const ttlToUse = TTL$a;
|
|
1052
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "AppFramework", VERSION$a, RepresentationType$a, equals$a);
|
|
1053
1053
|
return createLink(key);
|
|
1054
1054
|
};
|
|
1055
|
-
function getTypeCacheKeys$
|
|
1055
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
1056
1056
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1057
1057
|
const rootKey = fullPathFactory();
|
|
1058
1058
|
rootKeySet.set(rootKey, {
|
|
1059
1059
|
namespace: keyPrefix,
|
|
1060
|
-
representationName: RepresentationType$
|
|
1060
|
+
representationName: RepresentationType$a,
|
|
1061
1061
|
mergeable: false
|
|
1062
1062
|
});
|
|
1063
1063
|
const input_apps_length = input.apps.length;
|
|
1064
1064
|
for (let i = 0; i < input_apps_length; i++) {
|
|
1065
|
-
getTypeCacheKeys$
|
|
1065
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.apps[i]);
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
1068
|
|
|
1069
|
-
function select$
|
|
1070
|
-
return select$
|
|
1069
|
+
function select$m(luvio, params) {
|
|
1070
|
+
return select$n();
|
|
1071
1071
|
}
|
|
1072
|
-
function keyBuilder$
|
|
1072
|
+
function keyBuilder$s(luvio, params) {
|
|
1073
1073
|
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ',' + 'type:' + params.queryParams.type + ')';
|
|
1074
1074
|
}
|
|
1075
|
-
function getResponseCacheKeys$
|
|
1076
|
-
getTypeCacheKeys$
|
|
1075
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
1076
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response, () => keyBuilder$s(luvio, resourceParams));
|
|
1077
1077
|
}
|
|
1078
|
-
function ingestSuccess$
|
|
1078
|
+
function ingestSuccess$c(luvio, resourceParams, response, snapshotRefresh) {
|
|
1079
1079
|
const { body } = response;
|
|
1080
|
-
const key = keyBuilder$
|
|
1081
|
-
luvio.storeIngest(key, ingest$
|
|
1080
|
+
const key = keyBuilder$s(luvio, resourceParams);
|
|
1081
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1082
1082
|
const snapshot = luvio.storeLookup({
|
|
1083
1083
|
recordId: key,
|
|
1084
|
-
node: select$
|
|
1084
|
+
node: select$m(),
|
|
1085
1085
|
variables: {},
|
|
1086
1086
|
}, snapshotRefresh);
|
|
1087
1087
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1092,19 +1092,19 @@ function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1092
1092
|
deepFreeze(snapshot.data);
|
|
1093
1093
|
return snapshot;
|
|
1094
1094
|
}
|
|
1095
|
-
function ingestError$
|
|
1096
|
-
const key = keyBuilder$
|
|
1095
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
1096
|
+
const key = keyBuilder$s(luvio, params);
|
|
1097
1097
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1098
1098
|
const storeMetadataParams = {
|
|
1099
|
-
ttl: TTL$
|
|
1099
|
+
ttl: TTL$a,
|
|
1100
1100
|
namespace: keyPrefix,
|
|
1101
|
-
version: VERSION$
|
|
1102
|
-
representationName: RepresentationType$
|
|
1101
|
+
version: VERSION$a,
|
|
1102
|
+
representationName: RepresentationType$a
|
|
1103
1103
|
};
|
|
1104
1104
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1105
1105
|
return errorSnapshot;
|
|
1106
1106
|
}
|
|
1107
|
-
function createResourceRequest$
|
|
1107
|
+
function createResourceRequest$d(config) {
|
|
1108
1108
|
const headers = {};
|
|
1109
1109
|
return {
|
|
1110
1110
|
baseUri: '/services/data/v63.0',
|
|
@@ -1118,96 +1118,96 @@ function createResourceRequest$b(config) {
|
|
|
1118
1118
|
};
|
|
1119
1119
|
}
|
|
1120
1120
|
|
|
1121
|
-
const adapterName$
|
|
1121
|
+
const adapterName$d = 'getApps';
|
|
1122
1122
|
const getApps_ConfigPropertyMetadata = [
|
|
1123
1123
|
generateParamConfigMetadata('templateSourceId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1124
1124
|
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1125
1125
|
];
|
|
1126
|
-
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1127
|
-
const createResourceParams$
|
|
1128
|
-
function keyBuilder$
|
|
1129
|
-
const resourceParams = createResourceParams$
|
|
1130
|
-
return keyBuilder$
|
|
1126
|
+
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, getApps_ConfigPropertyMetadata);
|
|
1127
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$e(getApps_ConfigPropertyMetadata);
|
|
1128
|
+
function keyBuilder$r(luvio, config) {
|
|
1129
|
+
const resourceParams = createResourceParams$d(config);
|
|
1130
|
+
return keyBuilder$s(luvio, resourceParams);
|
|
1131
1131
|
}
|
|
1132
|
-
function typeCheckConfig$
|
|
1132
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
1133
1133
|
const config = {};
|
|
1134
|
-
typeCheckConfig$
|
|
1134
|
+
typeCheckConfig$e(untrustedConfig, config, getApps_ConfigPropertyMetadata);
|
|
1135
1135
|
return config;
|
|
1136
1136
|
}
|
|
1137
|
-
function validateAdapterConfig$
|
|
1137
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
1138
1138
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1139
1139
|
return null;
|
|
1140
1140
|
}
|
|
1141
1141
|
if (process.env.NODE_ENV !== 'production') {
|
|
1142
1142
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1143
1143
|
}
|
|
1144
|
-
const config = typeCheckConfig$
|
|
1144
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
1145
1145
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1146
1146
|
return null;
|
|
1147
1147
|
}
|
|
1148
1148
|
return config;
|
|
1149
1149
|
}
|
|
1150
|
-
function adapterFragment$
|
|
1151
|
-
createResourceParams$
|
|
1152
|
-
return select$
|
|
1150
|
+
function adapterFragment$9(luvio, config) {
|
|
1151
|
+
createResourceParams$d(config);
|
|
1152
|
+
return select$m();
|
|
1153
1153
|
}
|
|
1154
|
-
function onFetchResponseSuccess$
|
|
1155
|
-
const snapshot = ingestSuccess$
|
|
1154
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
1155
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response, {
|
|
1156
1156
|
config,
|
|
1157
|
-
resolve: () => buildNetworkSnapshot$
|
|
1157
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
1158
1158
|
});
|
|
1159
1159
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1160
1160
|
}
|
|
1161
|
-
function onFetchResponseError$
|
|
1162
|
-
const snapshot = ingestError$
|
|
1161
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
1162
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
1163
1163
|
config,
|
|
1164
|
-
resolve: () => buildNetworkSnapshot$
|
|
1164
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
1165
1165
|
});
|
|
1166
1166
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1167
1167
|
}
|
|
1168
|
-
function buildNetworkSnapshot$
|
|
1169
|
-
const resourceParams = createResourceParams$
|
|
1170
|
-
const request = createResourceRequest$
|
|
1168
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
1169
|
+
const resourceParams = createResourceParams$d(config);
|
|
1170
|
+
const request = createResourceRequest$d(resourceParams);
|
|
1171
1171
|
return luvio.dispatchResourceRequest(request, options)
|
|
1172
1172
|
.then((response) => {
|
|
1173
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1173
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
1174
1174
|
const cache = new StoreKeyMap();
|
|
1175
|
-
getResponseCacheKeys$
|
|
1175
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
1176
1176
|
return cache;
|
|
1177
1177
|
});
|
|
1178
1178
|
}, (response) => {
|
|
1179
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1179
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
1180
1180
|
});
|
|
1181
1181
|
}
|
|
1182
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1183
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1182
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
1183
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$d, undefined, false);
|
|
1184
1184
|
}
|
|
1185
|
-
function buildCachedSnapshotCachePolicy$
|
|
1185
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
1186
1186
|
const { luvio, config } = context;
|
|
1187
1187
|
const selector = {
|
|
1188
|
-
recordId: keyBuilder$
|
|
1189
|
-
node: adapterFragment$
|
|
1188
|
+
recordId: keyBuilder$r(luvio, config),
|
|
1189
|
+
node: adapterFragment$9(luvio, config),
|
|
1190
1190
|
variables: {},
|
|
1191
1191
|
};
|
|
1192
1192
|
const cacheSnapshot = storeLookup(selector, {
|
|
1193
1193
|
config,
|
|
1194
|
-
resolve: () => buildNetworkSnapshot$
|
|
1194
|
+
resolve: () => buildNetworkSnapshot$d(luvio, config, snapshotRefreshOptions)
|
|
1195
1195
|
});
|
|
1196
1196
|
return cacheSnapshot;
|
|
1197
1197
|
}
|
|
1198
1198
|
const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untrustedConfig, requestContext) {
|
|
1199
|
-
const config = validateAdapterConfig$
|
|
1199
|
+
const config = validateAdapterConfig$d(untrustedConfig, getApps_ConfigPropertyNames);
|
|
1200
1200
|
// Invalid or incomplete config
|
|
1201
1201
|
if (config === null) {
|
|
1202
1202
|
return null;
|
|
1203
1203
|
}
|
|
1204
1204
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1205
|
-
buildCachedSnapshotCachePolicy$
|
|
1205
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
1206
1206
|
};
|
|
1207
1207
|
|
|
1208
|
-
const TTL$
|
|
1209
|
-
const VERSION$
|
|
1210
|
-
function validate$
|
|
1208
|
+
const TTL$9 = 5000;
|
|
1209
|
+
const VERSION$9 = "1e01d8ae397bfbae02ba4cfae1dac4fc";
|
|
1210
|
+
function validate$f(obj, path = 'AppResultRepresentation') {
|
|
1211
1211
|
const v_error = (() => {
|
|
1212
1212
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1213
1213
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1265,20 +1265,20 @@ function validate$e(obj, path = 'AppResultRepresentation') {
|
|
|
1265
1265
|
})();
|
|
1266
1266
|
return v_error === undefined ? null : v_error;
|
|
1267
1267
|
}
|
|
1268
|
-
const RepresentationType$
|
|
1269
|
-
function keyBuilder$
|
|
1270
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1268
|
+
const RepresentationType$9 = 'AppResultRepresentation';
|
|
1269
|
+
function keyBuilder$q(luvio, config) {
|
|
1270
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
|
|
1271
1271
|
}
|
|
1272
|
-
function keyBuilderFromType$
|
|
1272
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
1273
1273
|
const keyParams = {
|
|
1274
1274
|
id: object.app.id
|
|
1275
1275
|
};
|
|
1276
|
-
return keyBuilder$
|
|
1276
|
+
return keyBuilder$q(luvio, keyParams);
|
|
1277
1277
|
}
|
|
1278
|
-
function normalize$
|
|
1278
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1279
1279
|
const input_app = input.app;
|
|
1280
1280
|
const input_app_id = path.fullPath + '__app';
|
|
1281
|
-
input.app = ingest$
|
|
1281
|
+
input.app = ingest$b(input_app, {
|
|
1282
1282
|
fullPath: input_app_id,
|
|
1283
1283
|
propertyName: 'app',
|
|
1284
1284
|
parent: {
|
|
@@ -1290,16 +1290,16 @@ function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
|
1290
1290
|
}, luvio, store, timestamp);
|
|
1291
1291
|
return input;
|
|
1292
1292
|
}
|
|
1293
|
-
const select$
|
|
1293
|
+
const select$l = function AppResultRepresentationSelect() {
|
|
1294
1294
|
return {
|
|
1295
1295
|
kind: 'Fragment',
|
|
1296
|
-
version: VERSION$
|
|
1296
|
+
version: VERSION$9,
|
|
1297
1297
|
private: [],
|
|
1298
1298
|
selections: [
|
|
1299
1299
|
{
|
|
1300
1300
|
name: 'app',
|
|
1301
1301
|
kind: 'Link',
|
|
1302
|
-
fragment: select$
|
|
1302
|
+
fragment: select$o()
|
|
1303
1303
|
},
|
|
1304
1304
|
{
|
|
1305
1305
|
name: 'failureMessage',
|
|
@@ -1317,7 +1317,7 @@ const select$i = function AppResultRepresentationSelect() {
|
|
|
1317
1317
|
]
|
|
1318
1318
|
};
|
|
1319
1319
|
};
|
|
1320
|
-
function equals$
|
|
1320
|
+
function equals$9(existing, incoming) {
|
|
1321
1321
|
const existing_runtimeRequestId = existing.runtimeRequestId;
|
|
1322
1322
|
const incoming_runtimeRequestId = incoming.runtimeRequestId;
|
|
1323
1323
|
if (!(existing_runtimeRequestId === incoming_runtimeRequestId)) {
|
|
@@ -1345,42 +1345,42 @@ function equals$8(existing, incoming) {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
return true;
|
|
1347
1347
|
}
|
|
1348
|
-
const ingest$
|
|
1348
|
+
const ingest$9 = function AppResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1349
1349
|
if (process.env.NODE_ENV !== 'production') {
|
|
1350
|
-
const validateError = validate$
|
|
1350
|
+
const validateError = validate$f(input);
|
|
1351
1351
|
if (validateError !== null) {
|
|
1352
1352
|
throw validateError;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
const key = keyBuilderFromType$
|
|
1356
|
-
const ttlToUse = TTL$
|
|
1357
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1355
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
1356
|
+
const ttlToUse = TTL$9;
|
|
1357
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "AppFramework", VERSION$9, RepresentationType$9, equals$9);
|
|
1358
1358
|
return createLink(key);
|
|
1359
1359
|
};
|
|
1360
|
-
function getTypeCacheKeys$
|
|
1360
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1361
1361
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1362
|
-
const rootKey = keyBuilderFromType$
|
|
1362
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
1363
1363
|
rootKeySet.set(rootKey, {
|
|
1364
1364
|
namespace: keyPrefix,
|
|
1365
|
-
representationName: RepresentationType$
|
|
1365
|
+
representationName: RepresentationType$9,
|
|
1366
1366
|
mergeable: false
|
|
1367
1367
|
});
|
|
1368
|
-
getTypeCacheKeys$
|
|
1368
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.app);
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
-
function select$
|
|
1372
|
-
return select$
|
|
1371
|
+
function select$k(luvio, params) {
|
|
1372
|
+
return select$l();
|
|
1373
1373
|
}
|
|
1374
|
-
function getResponseCacheKeys$
|
|
1375
|
-
getTypeCacheKeys$
|
|
1374
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
1375
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1376
1376
|
}
|
|
1377
|
-
function ingestSuccess$
|
|
1377
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
1378
1378
|
const { body } = response;
|
|
1379
|
-
const key = keyBuilderFromType$
|
|
1380
|
-
luvio.storeIngest(key, ingest$
|
|
1379
|
+
const key = keyBuilderFromType$7(luvio, body);
|
|
1380
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1381
1381
|
const snapshot = luvio.storeLookup({
|
|
1382
1382
|
recordId: key,
|
|
1383
|
-
node: select$
|
|
1383
|
+
node: select$k(),
|
|
1384
1384
|
variables: {},
|
|
1385
1385
|
});
|
|
1386
1386
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1391,7 +1391,7 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
1391
1391
|
deepFreeze(snapshot.data);
|
|
1392
1392
|
return snapshot;
|
|
1393
1393
|
}
|
|
1394
|
-
function createResourceRequest$
|
|
1394
|
+
function createResourceRequest$c(config) {
|
|
1395
1395
|
const headers = {};
|
|
1396
1396
|
return {
|
|
1397
1397
|
baseUri: '/services/data/v63.0',
|
|
@@ -1405,7 +1405,7 @@ function createResourceRequest$a(config) {
|
|
|
1405
1405
|
};
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
|
-
const adapterName$
|
|
1408
|
+
const adapterName$c = 'createApp';
|
|
1409
1409
|
const createApp_ConfigPropertyMetadata = [
|
|
1410
1410
|
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1411
1411
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -1418,11 +1418,11 @@ const createApp_ConfigPropertyMetadata = [
|
|
|
1418
1418
|
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1419
1419
|
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1420
1420
|
];
|
|
1421
|
-
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1422
|
-
const createResourceParams$
|
|
1423
|
-
function typeCheckConfig$
|
|
1421
|
+
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, createApp_ConfigPropertyMetadata);
|
|
1422
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$e(createApp_ConfigPropertyMetadata);
|
|
1423
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
1424
1424
|
const config = {};
|
|
1425
|
-
typeCheckConfig$
|
|
1425
|
+
typeCheckConfig$e(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1426
1426
|
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1427
1427
|
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1428
1428
|
const untrustedConfig_templateValues_object = {};
|
|
@@ -1440,30 +1440,30 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
1440
1440
|
}
|
|
1441
1441
|
return config;
|
|
1442
1442
|
}
|
|
1443
|
-
function validateAdapterConfig$
|
|
1443
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
1444
1444
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1445
1445
|
return null;
|
|
1446
1446
|
}
|
|
1447
1447
|
if (process.env.NODE_ENV !== 'production') {
|
|
1448
1448
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1449
1449
|
}
|
|
1450
|
-
const config = typeCheckConfig$
|
|
1450
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
1451
1451
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1452
1452
|
return null;
|
|
1453
1453
|
}
|
|
1454
1454
|
return config;
|
|
1455
1455
|
}
|
|
1456
|
-
function buildNetworkSnapshot$
|
|
1457
|
-
const resourceParams = createResourceParams$
|
|
1458
|
-
const request = createResourceRequest$
|
|
1456
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
1457
|
+
const resourceParams = createResourceParams$c(config);
|
|
1458
|
+
const request = createResourceRequest$c(resourceParams);
|
|
1459
1459
|
return luvio.dispatchResourceRequest(request, options)
|
|
1460
1460
|
.then((response) => {
|
|
1461
1461
|
return luvio.handleSuccessResponse(() => {
|
|
1462
|
-
const snapshot = ingestSuccess$
|
|
1462
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
1463
1463
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1464
1464
|
}, () => {
|
|
1465
1465
|
const cache = new StoreKeyMap();
|
|
1466
|
-
getResponseCacheKeys$
|
|
1466
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
1467
1467
|
return cache;
|
|
1468
1468
|
});
|
|
1469
1469
|
}, (response) => {
|
|
@@ -1473,33 +1473,33 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
const createAppAdapterFactory = (luvio) => {
|
|
1475
1475
|
return function createApp(untrustedConfig) {
|
|
1476
|
-
const config = validateAdapterConfig$
|
|
1476
|
+
const config = validateAdapterConfig$c(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1477
1477
|
// Invalid or incomplete config
|
|
1478
1478
|
if (config === null) {
|
|
1479
1479
|
throw new Error('Invalid config for "createApp"');
|
|
1480
1480
|
}
|
|
1481
|
-
return buildNetworkSnapshot$
|
|
1481
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
1482
1482
|
};
|
|
1483
1483
|
};
|
|
1484
1484
|
|
|
1485
|
-
function keyBuilder$
|
|
1486
|
-
return keyBuilder$
|
|
1485
|
+
function keyBuilder$p(luvio, params) {
|
|
1486
|
+
return keyBuilder$t(luvio, {
|
|
1487
1487
|
id: params.urlParams.appIdOrApiName
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
function getResponseCacheKeys$
|
|
1491
|
-
const key = keyBuilder$
|
|
1490
|
+
function getResponseCacheKeys$b(cacheKeyMap, luvio, resourceParams) {
|
|
1491
|
+
const key = keyBuilder$p(luvio, resourceParams);
|
|
1492
1492
|
cacheKeyMap.set(key, {
|
|
1493
1493
|
namespace: keyPrefix,
|
|
1494
|
-
representationName: RepresentationType$
|
|
1494
|
+
representationName: RepresentationType$b,
|
|
1495
1495
|
mergeable: false
|
|
1496
1496
|
});
|
|
1497
1497
|
}
|
|
1498
1498
|
function evictSuccess(luvio, resourceParams) {
|
|
1499
|
-
const key = keyBuilder$
|
|
1499
|
+
const key = keyBuilder$p(luvio, resourceParams);
|
|
1500
1500
|
luvio.storeEvict(key);
|
|
1501
1501
|
}
|
|
1502
|
-
function createResourceRequest$
|
|
1502
|
+
function createResourceRequest$b(config) {
|
|
1503
1503
|
const headers = {};
|
|
1504
1504
|
return {
|
|
1505
1505
|
baseUri: '/services/data/v63.0',
|
|
@@ -1513,33 +1513,33 @@ function createResourceRequest$9(config) {
|
|
|
1513
1513
|
};
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
const adapterName$
|
|
1516
|
+
const adapterName$b = 'deleteApp';
|
|
1517
1517
|
const deleteApp_ConfigPropertyMetadata = [
|
|
1518
1518
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1519
1519
|
];
|
|
1520
|
-
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1521
|
-
const createResourceParams$
|
|
1522
|
-
function typeCheckConfig$
|
|
1520
|
+
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, deleteApp_ConfigPropertyMetadata);
|
|
1521
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$e(deleteApp_ConfigPropertyMetadata);
|
|
1522
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
1523
1523
|
const config = {};
|
|
1524
|
-
typeCheckConfig$
|
|
1524
|
+
typeCheckConfig$e(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1525
1525
|
return config;
|
|
1526
1526
|
}
|
|
1527
|
-
function validateAdapterConfig$
|
|
1527
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
1528
1528
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1529
1529
|
return null;
|
|
1530
1530
|
}
|
|
1531
1531
|
if (process.env.NODE_ENV !== 'production') {
|
|
1532
1532
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1533
1533
|
}
|
|
1534
|
-
const config = typeCheckConfig$
|
|
1534
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
1535
1535
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1536
1536
|
return null;
|
|
1537
1537
|
}
|
|
1538
1538
|
return config;
|
|
1539
1539
|
}
|
|
1540
|
-
function buildNetworkSnapshot$
|
|
1541
|
-
const resourceParams = createResourceParams$
|
|
1542
|
-
const request = createResourceRequest$
|
|
1540
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
1541
|
+
const resourceParams = createResourceParams$b(config);
|
|
1542
|
+
const request = createResourceRequest$b(resourceParams);
|
|
1543
1543
|
return luvio.dispatchResourceRequest(request, options)
|
|
1544
1544
|
.then(() => {
|
|
1545
1545
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -1547,7 +1547,7 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
1547
1547
|
return luvio.storeBroadcast();
|
|
1548
1548
|
}, () => {
|
|
1549
1549
|
const cache = new StoreKeyMap();
|
|
1550
|
-
getResponseCacheKeys$
|
|
1550
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams);
|
|
1551
1551
|
return cache;
|
|
1552
1552
|
});
|
|
1553
1553
|
}, (response) => {
|
|
@@ -1557,33 +1557,33 @@ function buildNetworkSnapshot$9(luvio, config, options) {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
const deleteAppAdapterFactory = (luvio) => {
|
|
1559
1559
|
return function AppFrameworkdeleteApp(untrustedConfig) {
|
|
1560
|
-
const config = validateAdapterConfig$
|
|
1560
|
+
const config = validateAdapterConfig$b(untrustedConfig, deleteApp_ConfigPropertyNames);
|
|
1561
1561
|
// Invalid or incomplete config
|
|
1562
1562
|
if (config === null) {
|
|
1563
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1563
|
+
throw new Error(`Invalid config for "${adapterName$b}"`);
|
|
1564
1564
|
}
|
|
1565
|
-
return buildNetworkSnapshot$
|
|
1565
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
1566
1566
|
};
|
|
1567
1567
|
};
|
|
1568
1568
|
|
|
1569
|
-
function select$
|
|
1570
|
-
return select$
|
|
1569
|
+
function select$j(luvio, params) {
|
|
1570
|
+
return select$o();
|
|
1571
1571
|
}
|
|
1572
|
-
function keyBuilder$
|
|
1573
|
-
return keyBuilder$
|
|
1572
|
+
function keyBuilder$o(luvio, params) {
|
|
1573
|
+
return keyBuilder$t(luvio, {
|
|
1574
1574
|
id: params.urlParams.appIdOrApiName
|
|
1575
1575
|
});
|
|
1576
1576
|
}
|
|
1577
|
-
function getResponseCacheKeys$
|
|
1578
|
-
getTypeCacheKeys$
|
|
1577
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
1578
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
1579
1579
|
}
|
|
1580
|
-
function ingestSuccess$
|
|
1580
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
1581
1581
|
const { body } = response;
|
|
1582
|
-
const key = keyBuilder$
|
|
1583
|
-
luvio.storeIngest(key, ingest$
|
|
1582
|
+
const key = keyBuilder$o(luvio, resourceParams);
|
|
1583
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
1584
1584
|
const snapshot = luvio.storeLookup({
|
|
1585
1585
|
recordId: key,
|
|
1586
|
-
node: select$
|
|
1586
|
+
node: select$j(),
|
|
1587
1587
|
variables: {},
|
|
1588
1588
|
}, snapshotRefresh);
|
|
1589
1589
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1594,19 +1594,19 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1594
1594
|
deepFreeze(snapshot.data);
|
|
1595
1595
|
return snapshot;
|
|
1596
1596
|
}
|
|
1597
|
-
function ingestError$
|
|
1598
|
-
const key = keyBuilder$
|
|
1597
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
1598
|
+
const key = keyBuilder$o(luvio, params);
|
|
1599
1599
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1600
1600
|
const storeMetadataParams = {
|
|
1601
|
-
ttl: TTL$
|
|
1601
|
+
ttl: TTL$b,
|
|
1602
1602
|
namespace: keyPrefix,
|
|
1603
|
-
version: VERSION$
|
|
1604
|
-
representationName: RepresentationType$
|
|
1603
|
+
version: VERSION$b,
|
|
1604
|
+
representationName: RepresentationType$b
|
|
1605
1605
|
};
|
|
1606
1606
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1607
1607
|
return errorSnapshot;
|
|
1608
1608
|
}
|
|
1609
|
-
function createResourceRequest$
|
|
1609
|
+
function createResourceRequest$a(config) {
|
|
1610
1610
|
const headers = {};
|
|
1611
1611
|
return {
|
|
1612
1612
|
baseUri: '/services/data/v63.0',
|
|
@@ -1620,95 +1620,95 @@ function createResourceRequest$8(config) {
|
|
|
1620
1620
|
};
|
|
1621
1621
|
}
|
|
1622
1622
|
|
|
1623
|
-
const adapterName$
|
|
1623
|
+
const adapterName$a = 'getApp';
|
|
1624
1624
|
const getApp_ConfigPropertyMetadata = [
|
|
1625
1625
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1626
1626
|
];
|
|
1627
|
-
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1628
|
-
const createResourceParams$
|
|
1629
|
-
function keyBuilder$
|
|
1630
|
-
const resourceParams = createResourceParams$
|
|
1631
|
-
return keyBuilder$
|
|
1627
|
+
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getApp_ConfigPropertyMetadata);
|
|
1628
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$e(getApp_ConfigPropertyMetadata);
|
|
1629
|
+
function keyBuilder$n(luvio, config) {
|
|
1630
|
+
const resourceParams = createResourceParams$a(config);
|
|
1631
|
+
return keyBuilder$o(luvio, resourceParams);
|
|
1632
1632
|
}
|
|
1633
|
-
function typeCheckConfig$
|
|
1633
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
1634
1634
|
const config = {};
|
|
1635
|
-
typeCheckConfig$
|
|
1635
|
+
typeCheckConfig$e(untrustedConfig, config, getApp_ConfigPropertyMetadata);
|
|
1636
1636
|
return config;
|
|
1637
1637
|
}
|
|
1638
|
-
function validateAdapterConfig$
|
|
1638
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
1639
1639
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1640
1640
|
return null;
|
|
1641
1641
|
}
|
|
1642
1642
|
if (process.env.NODE_ENV !== 'production') {
|
|
1643
1643
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1644
1644
|
}
|
|
1645
|
-
const config = typeCheckConfig$
|
|
1645
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
1646
1646
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1647
1647
|
return null;
|
|
1648
1648
|
}
|
|
1649
1649
|
return config;
|
|
1650
1650
|
}
|
|
1651
|
-
function adapterFragment$
|
|
1652
|
-
createResourceParams$
|
|
1653
|
-
return select$
|
|
1651
|
+
function adapterFragment$8(luvio, config) {
|
|
1652
|
+
createResourceParams$a(config);
|
|
1653
|
+
return select$j();
|
|
1654
1654
|
}
|
|
1655
|
-
function onFetchResponseSuccess$
|
|
1656
|
-
const snapshot = ingestSuccess$
|
|
1655
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
1656
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
1657
1657
|
config,
|
|
1658
|
-
resolve: () => buildNetworkSnapshot$
|
|
1658
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1659
1659
|
});
|
|
1660
1660
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1661
1661
|
}
|
|
1662
|
-
function onFetchResponseError$
|
|
1663
|
-
const snapshot = ingestError$
|
|
1662
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
1663
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1664
1664
|
config,
|
|
1665
|
-
resolve: () => buildNetworkSnapshot$
|
|
1665
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1666
1666
|
});
|
|
1667
1667
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1668
1668
|
}
|
|
1669
|
-
function buildNetworkSnapshot$
|
|
1670
|
-
const resourceParams = createResourceParams$
|
|
1671
|
-
const request = createResourceRequest$
|
|
1669
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
1670
|
+
const resourceParams = createResourceParams$a(config);
|
|
1671
|
+
const request = createResourceRequest$a(resourceParams);
|
|
1672
1672
|
return luvio.dispatchResourceRequest(request, options)
|
|
1673
1673
|
.then((response) => {
|
|
1674
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1674
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
1675
1675
|
const cache = new StoreKeyMap();
|
|
1676
|
-
getResponseCacheKeys$
|
|
1676
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
1677
1677
|
return cache;
|
|
1678
1678
|
});
|
|
1679
1679
|
}, (response) => {
|
|
1680
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1680
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
1681
1681
|
});
|
|
1682
1682
|
}
|
|
1683
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1684
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1683
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
1684
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
1685
1685
|
}
|
|
1686
|
-
function buildCachedSnapshotCachePolicy$
|
|
1686
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1687
1687
|
const { luvio, config } = context;
|
|
1688
1688
|
const selector = {
|
|
1689
|
-
recordId: keyBuilder$
|
|
1690
|
-
node: adapterFragment$
|
|
1689
|
+
recordId: keyBuilder$n(luvio, config),
|
|
1690
|
+
node: adapterFragment$8(luvio, config),
|
|
1691
1691
|
variables: {},
|
|
1692
1692
|
};
|
|
1693
1693
|
const cacheSnapshot = storeLookup(selector, {
|
|
1694
1694
|
config,
|
|
1695
|
-
resolve: () => buildNetworkSnapshot$
|
|
1695
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1696
1696
|
});
|
|
1697
1697
|
return cacheSnapshot;
|
|
1698
1698
|
}
|
|
1699
1699
|
const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedConfig, requestContext) {
|
|
1700
|
-
const config = validateAdapterConfig$
|
|
1700
|
+
const config = validateAdapterConfig$a(untrustedConfig, getApp_ConfigPropertyNames);
|
|
1701
1701
|
// Invalid or incomplete config
|
|
1702
1702
|
if (config === null) {
|
|
1703
1703
|
return null;
|
|
1704
1704
|
}
|
|
1705
1705
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1706
|
-
buildCachedSnapshotCachePolicy$
|
|
1706
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
1707
1707
|
};
|
|
1708
1708
|
|
|
1709
|
-
const TTL$
|
|
1710
|
-
const VERSION$
|
|
1711
|
-
function validate$
|
|
1709
|
+
const TTL$8 = 5000;
|
|
1710
|
+
const VERSION$8 = "b8e879a936b5069ec247355c66198ca7";
|
|
1711
|
+
function validate$e(obj, path = 'AppActivityItemRepresentation') {
|
|
1712
1712
|
const v_error = (() => {
|
|
1713
1713
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1714
1714
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1750,24 +1750,24 @@ function validate$d(obj, path = 'AppActivityItemRepresentation') {
|
|
|
1750
1750
|
})();
|
|
1751
1751
|
return v_error === undefined ? null : v_error;
|
|
1752
1752
|
}
|
|
1753
|
-
const RepresentationType$
|
|
1754
|
-
function keyBuilder$
|
|
1755
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1753
|
+
const RepresentationType$8 = 'AppActivityItemRepresentation';
|
|
1754
|
+
function keyBuilder$m(luvio, config) {
|
|
1755
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.appId + ':' + config.id;
|
|
1756
1756
|
}
|
|
1757
|
-
function keyBuilderFromType$
|
|
1757
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
1758
1758
|
const keyParams = {
|
|
1759
1759
|
appId: object.appId,
|
|
1760
1760
|
id: object.id
|
|
1761
1761
|
};
|
|
1762
|
-
return keyBuilder$
|
|
1762
|
+
return keyBuilder$m(luvio, keyParams);
|
|
1763
1763
|
}
|
|
1764
|
-
function normalize$
|
|
1764
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1765
1765
|
return input;
|
|
1766
1766
|
}
|
|
1767
|
-
const select$
|
|
1767
|
+
const select$i = function AppActivityItemRepresentationSelect() {
|
|
1768
1768
|
return {
|
|
1769
1769
|
kind: 'Fragment',
|
|
1770
|
-
version: VERSION$
|
|
1770
|
+
version: VERSION$8,
|
|
1771
1771
|
private: [],
|
|
1772
1772
|
selections: [
|
|
1773
1773
|
{
|
|
@@ -1794,7 +1794,7 @@ const select$f = function AppActivityItemRepresentationSelect() {
|
|
|
1794
1794
|
]
|
|
1795
1795
|
};
|
|
1796
1796
|
};
|
|
1797
|
-
function equals$
|
|
1797
|
+
function equals$8(existing, incoming) {
|
|
1798
1798
|
const existing_activityType = existing.activityType;
|
|
1799
1799
|
const incoming_activityType = incoming.activityType;
|
|
1800
1800
|
if (!(existing_activityType === incoming_activityType)) {
|
|
@@ -1827,31 +1827,31 @@ function equals$7(existing, incoming) {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
return true;
|
|
1829
1829
|
}
|
|
1830
|
-
const ingest$
|
|
1830
|
+
const ingest$8 = function AppActivityItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1831
1831
|
if (process.env.NODE_ENV !== 'production') {
|
|
1832
|
-
const validateError = validate$
|
|
1832
|
+
const validateError = validate$e(input);
|
|
1833
1833
|
if (validateError !== null) {
|
|
1834
1834
|
throw validateError;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
const key = keyBuilderFromType$
|
|
1838
|
-
const ttlToUse = TTL$
|
|
1839
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1837
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1838
|
+
const ttlToUse = TTL$8;
|
|
1839
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "AppFramework", VERSION$8, RepresentationType$8, equals$8);
|
|
1840
1840
|
return createLink(key);
|
|
1841
1841
|
};
|
|
1842
|
-
function getTypeCacheKeys$
|
|
1842
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1843
1843
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1844
|
-
const rootKey = keyBuilderFromType$
|
|
1844
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1845
1845
|
rootKeySet.set(rootKey, {
|
|
1846
1846
|
namespace: keyPrefix,
|
|
1847
|
-
representationName: RepresentationType$
|
|
1847
|
+
representationName: RepresentationType$8,
|
|
1848
1848
|
mergeable: false
|
|
1849
1849
|
});
|
|
1850
1850
|
}
|
|
1851
1851
|
|
|
1852
|
-
const TTL$
|
|
1853
|
-
const VERSION$
|
|
1854
|
-
function validate$
|
|
1852
|
+
const TTL$7 = 5000;
|
|
1853
|
+
const VERSION$7 = "e0f049ec23678e696fb7c592c9641c65";
|
|
1854
|
+
function validate$d(obj, path = 'AppActivityCollectionRepresentation') {
|
|
1855
1855
|
const v_error = (() => {
|
|
1856
1856
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1857
1857
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1876,23 +1876,23 @@ function validate$c(obj, path = 'AppActivityCollectionRepresentation') {
|
|
|
1876
1876
|
})();
|
|
1877
1877
|
return v_error === undefined ? null : v_error;
|
|
1878
1878
|
}
|
|
1879
|
-
const RepresentationType$
|
|
1880
|
-
function keyBuilder$
|
|
1881
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1879
|
+
const RepresentationType$7 = 'AppActivityCollectionRepresentation';
|
|
1880
|
+
function keyBuilder$l(luvio, config) {
|
|
1881
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.appId;
|
|
1882
1882
|
}
|
|
1883
|
-
function keyBuilderFromType$
|
|
1883
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
1884
1884
|
const keyParams = {
|
|
1885
1885
|
appId: object.appId
|
|
1886
1886
|
};
|
|
1887
|
-
return keyBuilder$
|
|
1887
|
+
return keyBuilder$l(luvio, keyParams);
|
|
1888
1888
|
}
|
|
1889
|
-
function normalize$
|
|
1889
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1890
1890
|
const input_items = input.items;
|
|
1891
1891
|
const input_items_id = path.fullPath + '__items';
|
|
1892
1892
|
for (let i = 0; i < input_items.length; i++) {
|
|
1893
1893
|
const input_items_item = input_items[i];
|
|
1894
1894
|
let input_items_item_id = input_items_id + '__' + i;
|
|
1895
|
-
input_items[i] = ingest$
|
|
1895
|
+
input_items[i] = ingest$8(input_items_item, {
|
|
1896
1896
|
fullPath: input_items_item_id,
|
|
1897
1897
|
propertyName: i,
|
|
1898
1898
|
parent: {
|
|
@@ -1905,10 +1905,10 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
1905
1905
|
}
|
|
1906
1906
|
return input;
|
|
1907
1907
|
}
|
|
1908
|
-
const select$
|
|
1908
|
+
const select$h = function AppActivityCollectionRepresentationSelect() {
|
|
1909
1909
|
return {
|
|
1910
1910
|
kind: 'Fragment',
|
|
1911
|
-
version: VERSION$
|
|
1911
|
+
version: VERSION$7,
|
|
1912
1912
|
private: [],
|
|
1913
1913
|
selections: [
|
|
1914
1914
|
{
|
|
@@ -1919,12 +1919,12 @@ const select$e = function AppActivityCollectionRepresentationSelect() {
|
|
|
1919
1919
|
name: 'items',
|
|
1920
1920
|
kind: 'Link',
|
|
1921
1921
|
plural: true,
|
|
1922
|
-
fragment: select$
|
|
1922
|
+
fragment: select$i()
|
|
1923
1923
|
}
|
|
1924
1924
|
]
|
|
1925
1925
|
};
|
|
1926
1926
|
};
|
|
1927
|
-
function equals$
|
|
1927
|
+
function equals$7(existing, incoming) {
|
|
1928
1928
|
const existing_appId = existing.appId;
|
|
1929
1929
|
const incoming_appId = incoming.appId;
|
|
1930
1930
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -1942,50 +1942,50 @@ function equals$6(existing, incoming) {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
return true;
|
|
1944
1944
|
}
|
|
1945
|
-
const ingest$
|
|
1945
|
+
const ingest$7 = function AppActivityCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1946
1946
|
if (process.env.NODE_ENV !== 'production') {
|
|
1947
|
-
const validateError = validate$
|
|
1947
|
+
const validateError = validate$d(input);
|
|
1948
1948
|
if (validateError !== null) {
|
|
1949
1949
|
throw validateError;
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
|
-
const key = keyBuilderFromType$
|
|
1953
|
-
const ttlToUse = TTL$
|
|
1954
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1952
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
1953
|
+
const ttlToUse = TTL$7;
|
|
1954
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "AppFramework", VERSION$7, RepresentationType$7, equals$7);
|
|
1955
1955
|
return createLink(key);
|
|
1956
1956
|
};
|
|
1957
|
-
function getTypeCacheKeys$
|
|
1957
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1958
1958
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1959
|
-
const rootKey = keyBuilderFromType$
|
|
1959
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
1960
1960
|
rootKeySet.set(rootKey, {
|
|
1961
1961
|
namespace: keyPrefix,
|
|
1962
|
-
representationName: RepresentationType$
|
|
1962
|
+
representationName: RepresentationType$7,
|
|
1963
1963
|
mergeable: false
|
|
1964
1964
|
});
|
|
1965
1965
|
const input_items_length = input.items.length;
|
|
1966
1966
|
for (let i = 0; i < input_items_length; i++) {
|
|
1967
|
-
getTypeCacheKeys$
|
|
1967
|
+
getTypeCacheKeys$8(rootKeySet, luvio, input.items[i]);
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
1970
|
|
|
1971
|
-
function select$
|
|
1972
|
-
return select$
|
|
1971
|
+
function select$g(luvio, params) {
|
|
1972
|
+
return select$h();
|
|
1973
1973
|
}
|
|
1974
|
-
function keyBuilder$
|
|
1975
|
-
return keyBuilder$
|
|
1974
|
+
function keyBuilder$k(luvio, params) {
|
|
1975
|
+
return keyBuilder$l(luvio, {
|
|
1976
1976
|
appId: params.urlParams.appIdOrApiName
|
|
1977
1977
|
});
|
|
1978
1978
|
}
|
|
1979
|
-
function getResponseCacheKeys$
|
|
1980
|
-
getTypeCacheKeys$
|
|
1979
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1980
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1981
1981
|
}
|
|
1982
|
-
function ingestSuccess$
|
|
1982
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
1983
1983
|
const { body } = response;
|
|
1984
|
-
const key = keyBuilder$
|
|
1985
|
-
luvio.storeIngest(key, ingest$
|
|
1984
|
+
const key = keyBuilder$k(luvio, resourceParams);
|
|
1985
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1986
1986
|
const snapshot = luvio.storeLookup({
|
|
1987
1987
|
recordId: key,
|
|
1988
|
-
node: select$
|
|
1988
|
+
node: select$g(),
|
|
1989
1989
|
variables: {},
|
|
1990
1990
|
}, snapshotRefresh);
|
|
1991
1991
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1996,19 +1996,19 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1996
1996
|
deepFreeze(snapshot.data);
|
|
1997
1997
|
return snapshot;
|
|
1998
1998
|
}
|
|
1999
|
-
function ingestError$
|
|
2000
|
-
const key = keyBuilder$
|
|
1999
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
2000
|
+
const key = keyBuilder$k(luvio, params);
|
|
2001
2001
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2002
2002
|
const storeMetadataParams = {
|
|
2003
|
-
ttl: TTL$
|
|
2003
|
+
ttl: TTL$7,
|
|
2004
2004
|
namespace: keyPrefix,
|
|
2005
|
-
version: VERSION$
|
|
2006
|
-
representationName: RepresentationType$
|
|
2005
|
+
version: VERSION$7,
|
|
2006
|
+
representationName: RepresentationType$7
|
|
2007
2007
|
};
|
|
2008
2008
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2009
2009
|
return errorSnapshot;
|
|
2010
2010
|
}
|
|
2011
|
-
function createResourceRequest$
|
|
2011
|
+
function createResourceRequest$9(config) {
|
|
2012
2012
|
const headers = {};
|
|
2013
2013
|
return {
|
|
2014
2014
|
baseUri: '/services/data/v63.0',
|
|
@@ -2022,111 +2022,111 @@ function createResourceRequest$7(config) {
|
|
|
2022
2022
|
};
|
|
2023
2023
|
}
|
|
2024
2024
|
|
|
2025
|
-
const adapterName$
|
|
2025
|
+
const adapterName$9 = 'getAppActivities';
|
|
2026
2026
|
const getAppActivities_ConfigPropertyMetadata = [
|
|
2027
2027
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2028
2028
|
];
|
|
2029
|
-
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2030
|
-
const createResourceParams$
|
|
2031
|
-
function keyBuilder$
|
|
2032
|
-
const resourceParams = createResourceParams$
|
|
2033
|
-
return keyBuilder$
|
|
2029
|
+
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getAppActivities_ConfigPropertyMetadata);
|
|
2030
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$e(getAppActivities_ConfigPropertyMetadata);
|
|
2031
|
+
function keyBuilder$j(luvio, config) {
|
|
2032
|
+
const resourceParams = createResourceParams$9(config);
|
|
2033
|
+
return keyBuilder$k(luvio, resourceParams);
|
|
2034
2034
|
}
|
|
2035
|
-
function typeCheckConfig$
|
|
2035
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
2036
2036
|
const config = {};
|
|
2037
|
-
typeCheckConfig$
|
|
2037
|
+
typeCheckConfig$e(untrustedConfig, config, getAppActivities_ConfigPropertyMetadata);
|
|
2038
2038
|
return config;
|
|
2039
2039
|
}
|
|
2040
|
-
function validateAdapterConfig$
|
|
2040
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
2041
2041
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2042
2042
|
return null;
|
|
2043
2043
|
}
|
|
2044
2044
|
if (process.env.NODE_ENV !== 'production') {
|
|
2045
2045
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2046
2046
|
}
|
|
2047
|
-
const config = typeCheckConfig$
|
|
2047
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
2048
2048
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2049
2049
|
return null;
|
|
2050
2050
|
}
|
|
2051
2051
|
return config;
|
|
2052
2052
|
}
|
|
2053
|
-
function adapterFragment$
|
|
2054
|
-
createResourceParams$
|
|
2055
|
-
return select$
|
|
2053
|
+
function adapterFragment$7(luvio, config) {
|
|
2054
|
+
createResourceParams$9(config);
|
|
2055
|
+
return select$g();
|
|
2056
2056
|
}
|
|
2057
|
-
function onFetchResponseSuccess$
|
|
2058
|
-
const snapshot = ingestSuccess$
|
|
2057
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
2058
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
2059
2059
|
config,
|
|
2060
|
-
resolve: () => buildNetworkSnapshot$
|
|
2060
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
2061
2061
|
});
|
|
2062
2062
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2063
2063
|
}
|
|
2064
|
-
function onFetchResponseError$
|
|
2065
|
-
const snapshot = ingestError$
|
|
2064
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
2065
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
2066
2066
|
config,
|
|
2067
|
-
resolve: () => buildNetworkSnapshot$
|
|
2067
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
2068
2068
|
});
|
|
2069
2069
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2070
2070
|
}
|
|
2071
|
-
function buildNetworkSnapshot$
|
|
2072
|
-
const resourceParams = createResourceParams$
|
|
2073
|
-
const request = createResourceRequest$
|
|
2071
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
2072
|
+
const resourceParams = createResourceParams$9(config);
|
|
2073
|
+
const request = createResourceRequest$9(resourceParams);
|
|
2074
2074
|
return luvio.dispatchResourceRequest(request, options)
|
|
2075
2075
|
.then((response) => {
|
|
2076
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2076
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
2077
2077
|
const cache = new StoreKeyMap();
|
|
2078
|
-
getResponseCacheKeys$
|
|
2078
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
2079
2079
|
return cache;
|
|
2080
2080
|
});
|
|
2081
2081
|
}, (response) => {
|
|
2082
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2082
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
2083
2083
|
});
|
|
2084
2084
|
}
|
|
2085
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2086
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2085
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
2086
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
2087
2087
|
}
|
|
2088
|
-
function buildCachedSnapshotCachePolicy$
|
|
2088
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
2089
2089
|
const { luvio, config } = context;
|
|
2090
2090
|
const selector = {
|
|
2091
|
-
recordId: keyBuilder$
|
|
2092
|
-
node: adapterFragment$
|
|
2091
|
+
recordId: keyBuilder$j(luvio, config),
|
|
2092
|
+
node: adapterFragment$7(luvio, config),
|
|
2093
2093
|
variables: {},
|
|
2094
2094
|
};
|
|
2095
2095
|
const cacheSnapshot = storeLookup(selector, {
|
|
2096
2096
|
config,
|
|
2097
|
-
resolve: () => buildNetworkSnapshot$
|
|
2097
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
2098
2098
|
});
|
|
2099
2099
|
return cacheSnapshot;
|
|
2100
2100
|
}
|
|
2101
2101
|
const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppActivities(untrustedConfig, requestContext) {
|
|
2102
|
-
const config = validateAdapterConfig$
|
|
2102
|
+
const config = validateAdapterConfig$9(untrustedConfig, getAppActivities_ConfigPropertyNames);
|
|
2103
2103
|
// Invalid or incomplete config
|
|
2104
2104
|
if (config === null) {
|
|
2105
2105
|
return null;
|
|
2106
2106
|
}
|
|
2107
2107
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2108
|
-
buildCachedSnapshotCachePolicy$
|
|
2108
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
2109
2109
|
};
|
|
2110
2110
|
|
|
2111
|
-
function select$
|
|
2112
|
-
return select$
|
|
2111
|
+
function select$f(luvio, params) {
|
|
2112
|
+
return select$i();
|
|
2113
2113
|
}
|
|
2114
|
-
function keyBuilder$
|
|
2115
|
-
return keyBuilder$
|
|
2114
|
+
function keyBuilder$i(luvio, params) {
|
|
2115
|
+
return keyBuilder$m(luvio, {
|
|
2116
2116
|
appId: params.urlParams.appIdOrApiName,
|
|
2117
2117
|
id: params.urlParams.id
|
|
2118
2118
|
});
|
|
2119
2119
|
}
|
|
2120
|
-
function getResponseCacheKeys$
|
|
2121
|
-
getTypeCacheKeys$
|
|
2120
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
2121
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
2122
2122
|
}
|
|
2123
|
-
function ingestSuccess$
|
|
2123
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
2124
2124
|
const { body } = response;
|
|
2125
|
-
const key = keyBuilder$
|
|
2126
|
-
luvio.storeIngest(key, ingest$
|
|
2125
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
2126
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
2127
2127
|
const snapshot = luvio.storeLookup({
|
|
2128
2128
|
recordId: key,
|
|
2129
|
-
node: select$
|
|
2129
|
+
node: select$f(),
|
|
2130
2130
|
variables: {},
|
|
2131
2131
|
}, snapshotRefresh);
|
|
2132
2132
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2137,19 +2137,19 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2137
2137
|
deepFreeze(snapshot.data);
|
|
2138
2138
|
return snapshot;
|
|
2139
2139
|
}
|
|
2140
|
-
function ingestError$
|
|
2141
|
-
const key = keyBuilder$
|
|
2140
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
2141
|
+
const key = keyBuilder$i(luvio, params);
|
|
2142
2142
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2143
2143
|
const storeMetadataParams = {
|
|
2144
|
-
ttl: TTL$
|
|
2144
|
+
ttl: TTL$8,
|
|
2145
2145
|
namespace: keyPrefix,
|
|
2146
|
-
version: VERSION$
|
|
2147
|
-
representationName: RepresentationType$
|
|
2146
|
+
version: VERSION$8,
|
|
2147
|
+
representationName: RepresentationType$8
|
|
2148
2148
|
};
|
|
2149
2149
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2150
2150
|
return errorSnapshot;
|
|
2151
2151
|
}
|
|
2152
|
-
function createResourceRequest$
|
|
2152
|
+
function createResourceRequest$8(config) {
|
|
2153
2153
|
const headers = {};
|
|
2154
2154
|
return {
|
|
2155
2155
|
baseUri: '/services/data/v63.0',
|
|
@@ -2163,96 +2163,96 @@ function createResourceRequest$6(config) {
|
|
|
2163
2163
|
};
|
|
2164
2164
|
}
|
|
2165
2165
|
|
|
2166
|
-
const adapterName$
|
|
2166
|
+
const adapterName$8 = 'getAppActivity';
|
|
2167
2167
|
const getAppActivity_ConfigPropertyMetadata = [
|
|
2168
2168
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2169
2169
|
generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2170
2170
|
];
|
|
2171
|
-
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2172
|
-
const createResourceParams$
|
|
2173
|
-
function keyBuilder$
|
|
2174
|
-
const resourceParams = createResourceParams$
|
|
2175
|
-
return keyBuilder$
|
|
2171
|
+
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getAppActivity_ConfigPropertyMetadata);
|
|
2172
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$e(getAppActivity_ConfigPropertyMetadata);
|
|
2173
|
+
function keyBuilder$h(luvio, config) {
|
|
2174
|
+
const resourceParams = createResourceParams$8(config);
|
|
2175
|
+
return keyBuilder$i(luvio, resourceParams);
|
|
2176
2176
|
}
|
|
2177
|
-
function typeCheckConfig$
|
|
2177
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
2178
2178
|
const config = {};
|
|
2179
|
-
typeCheckConfig$
|
|
2179
|
+
typeCheckConfig$e(untrustedConfig, config, getAppActivity_ConfigPropertyMetadata);
|
|
2180
2180
|
return config;
|
|
2181
2181
|
}
|
|
2182
|
-
function validateAdapterConfig$
|
|
2182
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
2183
2183
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2184
2184
|
return null;
|
|
2185
2185
|
}
|
|
2186
2186
|
if (process.env.NODE_ENV !== 'production') {
|
|
2187
2187
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2188
2188
|
}
|
|
2189
|
-
const config = typeCheckConfig$
|
|
2189
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
2190
2190
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2191
2191
|
return null;
|
|
2192
2192
|
}
|
|
2193
2193
|
return config;
|
|
2194
2194
|
}
|
|
2195
|
-
function adapterFragment$
|
|
2196
|
-
createResourceParams$
|
|
2197
|
-
return select$
|
|
2195
|
+
function adapterFragment$6(luvio, config) {
|
|
2196
|
+
createResourceParams$8(config);
|
|
2197
|
+
return select$f();
|
|
2198
2198
|
}
|
|
2199
|
-
function onFetchResponseSuccess$
|
|
2200
|
-
const snapshot = ingestSuccess$
|
|
2199
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
2200
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
2201
2201
|
config,
|
|
2202
|
-
resolve: () => buildNetworkSnapshot$
|
|
2202
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2203
2203
|
});
|
|
2204
2204
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2205
2205
|
}
|
|
2206
|
-
function onFetchResponseError$
|
|
2207
|
-
const snapshot = ingestError$
|
|
2206
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
2207
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
2208
2208
|
config,
|
|
2209
|
-
resolve: () => buildNetworkSnapshot$
|
|
2209
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2210
2210
|
});
|
|
2211
2211
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2212
2212
|
}
|
|
2213
|
-
function buildNetworkSnapshot$
|
|
2214
|
-
const resourceParams = createResourceParams$
|
|
2215
|
-
const request = createResourceRequest$
|
|
2213
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
2214
|
+
const resourceParams = createResourceParams$8(config);
|
|
2215
|
+
const request = createResourceRequest$8(resourceParams);
|
|
2216
2216
|
return luvio.dispatchResourceRequest(request, options)
|
|
2217
2217
|
.then((response) => {
|
|
2218
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2218
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
2219
2219
|
const cache = new StoreKeyMap();
|
|
2220
|
-
getResponseCacheKeys$
|
|
2220
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
2221
2221
|
return cache;
|
|
2222
2222
|
});
|
|
2223
2223
|
}, (response) => {
|
|
2224
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2224
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
2225
2225
|
});
|
|
2226
2226
|
}
|
|
2227
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2228
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2227
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
2228
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
2229
2229
|
}
|
|
2230
|
-
function buildCachedSnapshotCachePolicy$
|
|
2230
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
2231
2231
|
const { luvio, config } = context;
|
|
2232
2232
|
const selector = {
|
|
2233
|
-
recordId: keyBuilder$
|
|
2234
|
-
node: adapterFragment$
|
|
2233
|
+
recordId: keyBuilder$h(luvio, config),
|
|
2234
|
+
node: adapterFragment$6(luvio, config),
|
|
2235
2235
|
variables: {},
|
|
2236
2236
|
};
|
|
2237
2237
|
const cacheSnapshot = storeLookup(selector, {
|
|
2238
2238
|
config,
|
|
2239
|
-
resolve: () => buildNetworkSnapshot$
|
|
2239
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2240
2240
|
});
|
|
2241
2241
|
return cacheSnapshot;
|
|
2242
2242
|
}
|
|
2243
2243
|
const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppActivity(untrustedConfig, requestContext) {
|
|
2244
|
-
const config = validateAdapterConfig$
|
|
2244
|
+
const config = validateAdapterConfig$8(untrustedConfig, getAppActivity_ConfigPropertyNames);
|
|
2245
2245
|
// Invalid or incomplete config
|
|
2246
2246
|
if (config === null) {
|
|
2247
2247
|
return null;
|
|
2248
2248
|
}
|
|
2249
2249
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2250
|
-
buildCachedSnapshotCachePolicy$
|
|
2250
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
2251
2251
|
};
|
|
2252
2252
|
|
|
2253
|
-
const TTL$
|
|
2254
|
-
const VERSION$
|
|
2255
|
-
function validate$
|
|
2253
|
+
const TTL$6 = 5000;
|
|
2254
|
+
const VERSION$6 = "b91a35834fb34f4f6cede2d5dc29dc5d";
|
|
2255
|
+
function validate$c(obj, path = 'AssetRepresentation') {
|
|
2256
2256
|
const v_error = (() => {
|
|
2257
2257
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2258
2258
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2405,23 +2405,23 @@ function validate$b(obj, path = 'AssetRepresentation') {
|
|
|
2405
2405
|
})();
|
|
2406
2406
|
return v_error === undefined ? null : v_error;
|
|
2407
2407
|
}
|
|
2408
|
-
const RepresentationType$
|
|
2409
|
-
function keyBuilder$
|
|
2410
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2408
|
+
const RepresentationType$6 = 'AssetRepresentation';
|
|
2409
|
+
function keyBuilder$g(luvio, config) {
|
|
2410
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.id;
|
|
2411
2411
|
}
|
|
2412
|
-
function keyBuilderFromType$
|
|
2412
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
2413
2413
|
const keyParams = {
|
|
2414
2414
|
id: object.id
|
|
2415
2415
|
};
|
|
2416
|
-
return keyBuilder$
|
|
2416
|
+
return keyBuilder$g(luvio, keyParams);
|
|
2417
2417
|
}
|
|
2418
|
-
function normalize$
|
|
2418
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2419
2419
|
return input;
|
|
2420
2420
|
}
|
|
2421
|
-
const select$
|
|
2421
|
+
const select$e = function AssetRepresentationSelect() {
|
|
2422
2422
|
return {
|
|
2423
2423
|
kind: 'Fragment',
|
|
2424
|
-
version: VERSION$
|
|
2424
|
+
version: VERSION$6,
|
|
2425
2425
|
private: [],
|
|
2426
2426
|
selections: [
|
|
2427
2427
|
{
|
|
@@ -2459,7 +2459,7 @@ const select$b = function AssetRepresentationSelect() {
|
|
|
2459
2459
|
]
|
|
2460
2460
|
};
|
|
2461
2461
|
};
|
|
2462
|
-
function equals$
|
|
2462
|
+
function equals$6(existing, incoming) {
|
|
2463
2463
|
const existing_appId = existing.appId;
|
|
2464
2464
|
const incoming_appId = incoming.appId;
|
|
2465
2465
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -2502,31 +2502,31 @@ function equals$5(existing, incoming) {
|
|
|
2502
2502
|
}
|
|
2503
2503
|
return true;
|
|
2504
2504
|
}
|
|
2505
|
-
const ingest$
|
|
2505
|
+
const ingest$6 = function AssetRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2506
2506
|
if (process.env.NODE_ENV !== 'production') {
|
|
2507
|
-
const validateError = validate$
|
|
2507
|
+
const validateError = validate$c(input);
|
|
2508
2508
|
if (validateError !== null) {
|
|
2509
2509
|
throw validateError;
|
|
2510
2510
|
}
|
|
2511
2511
|
}
|
|
2512
|
-
const key = keyBuilderFromType$
|
|
2513
|
-
const ttlToUse = TTL$
|
|
2514
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2512
|
+
const key = keyBuilderFromType$4(luvio, input);
|
|
2513
|
+
const ttlToUse = TTL$6;
|
|
2514
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "AppFramework", VERSION$6, RepresentationType$6, equals$6);
|
|
2515
2515
|
return createLink(key);
|
|
2516
2516
|
};
|
|
2517
|
-
function getTypeCacheKeys$
|
|
2517
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2518
2518
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2519
|
-
const rootKey = keyBuilderFromType$
|
|
2519
|
+
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
2520
2520
|
rootKeySet.set(rootKey, {
|
|
2521
2521
|
namespace: keyPrefix,
|
|
2522
|
-
representationName: RepresentationType$
|
|
2522
|
+
representationName: RepresentationType$6,
|
|
2523
2523
|
mergeable: false
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
2526
2526
|
|
|
2527
|
-
const TTL$
|
|
2528
|
-
const VERSION$
|
|
2529
|
-
function validate$
|
|
2527
|
+
const TTL$5 = 5000;
|
|
2528
|
+
const VERSION$5 = "1a10175fcc2ad43823e47bfbbdf917f6";
|
|
2529
|
+
function validate$b(obj, path = 'AssetCollectionRepresentation') {
|
|
2530
2530
|
const v_error = (() => {
|
|
2531
2531
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2532
2532
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2551,23 +2551,23 @@ function validate$a(obj, path = 'AssetCollectionRepresentation') {
|
|
|
2551
2551
|
})();
|
|
2552
2552
|
return v_error === undefined ? null : v_error;
|
|
2553
2553
|
}
|
|
2554
|
-
const RepresentationType$
|
|
2555
|
-
function keyBuilder$
|
|
2556
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2554
|
+
const RepresentationType$5 = 'AssetCollectionRepresentation';
|
|
2555
|
+
function keyBuilder$f(luvio, config) {
|
|
2556
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.appId;
|
|
2557
2557
|
}
|
|
2558
|
-
function keyBuilderFromType$
|
|
2558
|
+
function keyBuilderFromType$3(luvio, object) {
|
|
2559
2559
|
const keyParams = {
|
|
2560
2560
|
appId: object.appId
|
|
2561
2561
|
};
|
|
2562
|
-
return keyBuilder$
|
|
2562
|
+
return keyBuilder$f(luvio, keyParams);
|
|
2563
2563
|
}
|
|
2564
|
-
function normalize$
|
|
2564
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2565
2565
|
const input_assets = input.assets;
|
|
2566
2566
|
const input_assets_id = path.fullPath + '__assets';
|
|
2567
2567
|
for (let i = 0; i < input_assets.length; i++) {
|
|
2568
2568
|
const input_assets_item = input_assets[i];
|
|
2569
2569
|
let input_assets_item_id = input_assets_id + '__' + i;
|
|
2570
|
-
input_assets[i] = ingest$
|
|
2570
|
+
input_assets[i] = ingest$6(input_assets_item, {
|
|
2571
2571
|
fullPath: input_assets_item_id,
|
|
2572
2572
|
propertyName: i,
|
|
2573
2573
|
parent: {
|
|
@@ -2580,10 +2580,10 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
2580
2580
|
}
|
|
2581
2581
|
return input;
|
|
2582
2582
|
}
|
|
2583
|
-
const select$
|
|
2583
|
+
const select$d = function AssetCollectionRepresentationSelect() {
|
|
2584
2584
|
return {
|
|
2585
2585
|
kind: 'Fragment',
|
|
2586
|
-
version: VERSION$
|
|
2586
|
+
version: VERSION$5,
|
|
2587
2587
|
private: [],
|
|
2588
2588
|
selections: [
|
|
2589
2589
|
{
|
|
@@ -2594,12 +2594,12 @@ const select$a = function AssetCollectionRepresentationSelect() {
|
|
|
2594
2594
|
name: 'assets',
|
|
2595
2595
|
kind: 'Link',
|
|
2596
2596
|
plural: true,
|
|
2597
|
-
fragment: select$
|
|
2597
|
+
fragment: select$e()
|
|
2598
2598
|
}
|
|
2599
2599
|
]
|
|
2600
2600
|
};
|
|
2601
2601
|
};
|
|
2602
|
-
function equals$
|
|
2602
|
+
function equals$5(existing, incoming) {
|
|
2603
2603
|
const existing_appId = existing.appId;
|
|
2604
2604
|
const incoming_appId = incoming.appId;
|
|
2605
2605
|
if (!(existing_appId === incoming_appId)) {
|
|
@@ -2617,50 +2617,50 @@ function equals$4(existing, incoming) {
|
|
|
2617
2617
|
}
|
|
2618
2618
|
return true;
|
|
2619
2619
|
}
|
|
2620
|
-
const ingest$
|
|
2620
|
+
const ingest$5 = function AssetCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2621
2621
|
if (process.env.NODE_ENV !== 'production') {
|
|
2622
|
-
const validateError = validate$
|
|
2622
|
+
const validateError = validate$b(input);
|
|
2623
2623
|
if (validateError !== null) {
|
|
2624
2624
|
throw validateError;
|
|
2625
2625
|
}
|
|
2626
2626
|
}
|
|
2627
|
-
const key = keyBuilderFromType$
|
|
2628
|
-
const ttlToUse = TTL$
|
|
2629
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2627
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
2628
|
+
const ttlToUse = TTL$5;
|
|
2629
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "AppFramework", VERSION$5, RepresentationType$5, equals$5);
|
|
2630
2630
|
return createLink(key);
|
|
2631
2631
|
};
|
|
2632
|
-
function getTypeCacheKeys$
|
|
2632
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
2633
2633
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2634
|
-
const rootKey = keyBuilderFromType$
|
|
2634
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
2635
2635
|
rootKeySet.set(rootKey, {
|
|
2636
2636
|
namespace: keyPrefix,
|
|
2637
|
-
representationName: RepresentationType$
|
|
2637
|
+
representationName: RepresentationType$5,
|
|
2638
2638
|
mergeable: false
|
|
2639
2639
|
});
|
|
2640
2640
|
const input_assets_length = input.assets.length;
|
|
2641
2641
|
for (let i = 0; i < input_assets_length; i++) {
|
|
2642
|
-
getTypeCacheKeys$
|
|
2642
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.assets[i]);
|
|
2643
2643
|
}
|
|
2644
2644
|
}
|
|
2645
2645
|
|
|
2646
|
-
function select$
|
|
2647
|
-
return select$
|
|
2646
|
+
function select$c(luvio, params) {
|
|
2647
|
+
return select$d();
|
|
2648
2648
|
}
|
|
2649
|
-
function keyBuilder$
|
|
2650
|
-
return keyBuilder$
|
|
2649
|
+
function keyBuilder$e(luvio, params) {
|
|
2650
|
+
return keyBuilder$f(luvio, {
|
|
2651
2651
|
appId: params.urlParams.appIdOrApiName
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
2654
|
-
function getResponseCacheKeys$
|
|
2655
|
-
getTypeCacheKeys$
|
|
2654
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
2655
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
2656
2656
|
}
|
|
2657
|
-
function ingestSuccess$
|
|
2657
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
2658
2658
|
const { body } = response;
|
|
2659
|
-
const key = keyBuilder$
|
|
2660
|
-
luvio.storeIngest(key, ingest$
|
|
2659
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
2660
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2661
2661
|
const snapshot = luvio.storeLookup({
|
|
2662
2662
|
recordId: key,
|
|
2663
|
-
node: select$
|
|
2663
|
+
node: select$c(),
|
|
2664
2664
|
variables: {},
|
|
2665
2665
|
}, snapshotRefresh);
|
|
2666
2666
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2671,19 +2671,19 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2671
2671
|
deepFreeze(snapshot.data);
|
|
2672
2672
|
return snapshot;
|
|
2673
2673
|
}
|
|
2674
|
-
function ingestError$
|
|
2675
|
-
const key = keyBuilder$
|
|
2674
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
2675
|
+
const key = keyBuilder$e(luvio, params);
|
|
2676
2676
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2677
2677
|
const storeMetadataParams = {
|
|
2678
|
-
ttl: TTL$
|
|
2678
|
+
ttl: TTL$5,
|
|
2679
2679
|
namespace: keyPrefix,
|
|
2680
|
-
version: VERSION$
|
|
2681
|
-
representationName: RepresentationType$
|
|
2680
|
+
version: VERSION$5,
|
|
2681
|
+
representationName: RepresentationType$5
|
|
2682
2682
|
};
|
|
2683
2683
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2684
2684
|
return errorSnapshot;
|
|
2685
2685
|
}
|
|
2686
|
-
function createResourceRequest$
|
|
2686
|
+
function createResourceRequest$7(config) {
|
|
2687
2687
|
const headers = {};
|
|
2688
2688
|
return {
|
|
2689
2689
|
baseUri: '/services/data/v63.0',
|
|
@@ -2697,97 +2697,97 @@ function createResourceRequest$5(config) {
|
|
|
2697
2697
|
};
|
|
2698
2698
|
}
|
|
2699
2699
|
|
|
2700
|
-
const adapterName$
|
|
2700
|
+
const adapterName$7 = 'getAppAssets';
|
|
2701
2701
|
const getAppAssets_ConfigPropertyMetadata = [
|
|
2702
2702
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2703
2703
|
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2704
2704
|
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2705
2705
|
];
|
|
2706
|
-
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2707
|
-
const createResourceParams$
|
|
2708
|
-
function keyBuilder$
|
|
2709
|
-
const resourceParams = createResourceParams$
|
|
2710
|
-
return keyBuilder$
|
|
2706
|
+
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getAppAssets_ConfigPropertyMetadata);
|
|
2707
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$e(getAppAssets_ConfigPropertyMetadata);
|
|
2708
|
+
function keyBuilder$d(luvio, config) {
|
|
2709
|
+
const resourceParams = createResourceParams$7(config);
|
|
2710
|
+
return keyBuilder$e(luvio, resourceParams);
|
|
2711
2711
|
}
|
|
2712
|
-
function typeCheckConfig$
|
|
2712
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
2713
2713
|
const config = {};
|
|
2714
|
-
typeCheckConfig$
|
|
2714
|
+
typeCheckConfig$e(untrustedConfig, config, getAppAssets_ConfigPropertyMetadata);
|
|
2715
2715
|
return config;
|
|
2716
2716
|
}
|
|
2717
|
-
function validateAdapterConfig$
|
|
2717
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
2718
2718
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2719
2719
|
return null;
|
|
2720
2720
|
}
|
|
2721
2721
|
if (process.env.NODE_ENV !== 'production') {
|
|
2722
2722
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2723
2723
|
}
|
|
2724
|
-
const config = typeCheckConfig$
|
|
2724
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
2725
2725
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2726
2726
|
return null;
|
|
2727
2727
|
}
|
|
2728
2728
|
return config;
|
|
2729
2729
|
}
|
|
2730
|
-
function adapterFragment$
|
|
2731
|
-
createResourceParams$
|
|
2732
|
-
return select$
|
|
2730
|
+
function adapterFragment$5(luvio, config) {
|
|
2731
|
+
createResourceParams$7(config);
|
|
2732
|
+
return select$c();
|
|
2733
2733
|
}
|
|
2734
|
-
function onFetchResponseSuccess$
|
|
2735
|
-
const snapshot = ingestSuccess$
|
|
2734
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2735
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
2736
2736
|
config,
|
|
2737
|
-
resolve: () => buildNetworkSnapshot$
|
|
2737
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2738
2738
|
});
|
|
2739
2739
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2740
2740
|
}
|
|
2741
|
-
function onFetchResponseError$
|
|
2742
|
-
const snapshot = ingestError$
|
|
2741
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
2742
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
2743
2743
|
config,
|
|
2744
|
-
resolve: () => buildNetworkSnapshot$
|
|
2744
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2745
2745
|
});
|
|
2746
2746
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2747
2747
|
}
|
|
2748
|
-
function buildNetworkSnapshot$
|
|
2749
|
-
const resourceParams = createResourceParams$
|
|
2750
|
-
const request = createResourceRequest$
|
|
2748
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
2749
|
+
const resourceParams = createResourceParams$7(config);
|
|
2750
|
+
const request = createResourceRequest$7(resourceParams);
|
|
2751
2751
|
return luvio.dispatchResourceRequest(request, options)
|
|
2752
2752
|
.then((response) => {
|
|
2753
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2753
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
2754
2754
|
const cache = new StoreKeyMap();
|
|
2755
|
-
getResponseCacheKeys$
|
|
2755
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
2756
2756
|
return cache;
|
|
2757
2757
|
});
|
|
2758
2758
|
}, (response) => {
|
|
2759
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2759
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
2760
2760
|
});
|
|
2761
2761
|
}
|
|
2762
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2763
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2762
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
2763
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
2764
2764
|
}
|
|
2765
|
-
function buildCachedSnapshotCachePolicy$
|
|
2765
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
2766
2766
|
const { luvio, config } = context;
|
|
2767
2767
|
const selector = {
|
|
2768
|
-
recordId: keyBuilder$
|
|
2769
|
-
node: adapterFragment$
|
|
2768
|
+
recordId: keyBuilder$d(luvio, config),
|
|
2769
|
+
node: adapterFragment$5(luvio, config),
|
|
2770
2770
|
variables: {},
|
|
2771
2771
|
};
|
|
2772
2772
|
const cacheSnapshot = storeLookup(selector, {
|
|
2773
2773
|
config,
|
|
2774
|
-
resolve: () => buildNetworkSnapshot$
|
|
2774
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2775
2775
|
});
|
|
2776
2776
|
return cacheSnapshot;
|
|
2777
2777
|
}
|
|
2778
2778
|
const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAssets(untrustedConfig, requestContext) {
|
|
2779
|
-
const config = validateAdapterConfig$
|
|
2779
|
+
const config = validateAdapterConfig$7(untrustedConfig, getAppAssets_ConfigPropertyNames);
|
|
2780
2780
|
// Invalid or incomplete config
|
|
2781
2781
|
if (config === null) {
|
|
2782
2782
|
return null;
|
|
2783
2783
|
}
|
|
2784
2784
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2785
|
-
buildCachedSnapshotCachePolicy$
|
|
2785
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
2786
2786
|
};
|
|
2787
2787
|
|
|
2788
|
-
const TTL$
|
|
2789
|
-
const VERSION$
|
|
2790
|
-
function validate$
|
|
2788
|
+
const TTL$4 = 5000;
|
|
2789
|
+
const VERSION$4 = "4b0d1bee319e31459f529b802621d6b8";
|
|
2790
|
+
function validate$a(obj, path = 'InstalledAssetCollectionRepresentation') {
|
|
2791
2791
|
const v_error = (() => {
|
|
2792
2792
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2793
2793
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2807,14 +2807,14 @@ function validate$9(obj, path = 'InstalledAssetCollectionRepresentation') {
|
|
|
2807
2807
|
})();
|
|
2808
2808
|
return v_error === undefined ? null : v_error;
|
|
2809
2809
|
}
|
|
2810
|
-
const RepresentationType$
|
|
2811
|
-
function normalize$
|
|
2810
|
+
const RepresentationType$4 = 'InstalledAssetCollectionRepresentation';
|
|
2811
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
2812
2812
|
const input_assets = input.assets;
|
|
2813
2813
|
const input_assets_id = path.fullPath + '__assets';
|
|
2814
2814
|
for (let i = 0; i < input_assets.length; i++) {
|
|
2815
2815
|
const input_assets_item = input_assets[i];
|
|
2816
2816
|
let input_assets_item_id = input_assets_id + '__' + i;
|
|
2817
|
-
input_assets[i] = ingest$
|
|
2817
|
+
input_assets[i] = ingest$6(input_assets_item, {
|
|
2818
2818
|
fullPath: input_assets_item_id,
|
|
2819
2819
|
propertyName: i,
|
|
2820
2820
|
parent: {
|
|
@@ -2827,22 +2827,22 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
2827
2827
|
}
|
|
2828
2828
|
return input;
|
|
2829
2829
|
}
|
|
2830
|
-
const select$
|
|
2830
|
+
const select$b = function InstalledAssetCollectionRepresentationSelect() {
|
|
2831
2831
|
return {
|
|
2832
2832
|
kind: 'Fragment',
|
|
2833
|
-
version: VERSION$
|
|
2833
|
+
version: VERSION$4,
|
|
2834
2834
|
private: [],
|
|
2835
2835
|
selections: [
|
|
2836
2836
|
{
|
|
2837
2837
|
name: 'assets',
|
|
2838
2838
|
kind: 'Link',
|
|
2839
2839
|
plural: true,
|
|
2840
|
-
fragment: select$
|
|
2840
|
+
fragment: select$e()
|
|
2841
2841
|
}
|
|
2842
2842
|
]
|
|
2843
2843
|
};
|
|
2844
2844
|
};
|
|
2845
|
-
function equals$
|
|
2845
|
+
function equals$4(existing, incoming) {
|
|
2846
2846
|
const existing_assets = existing.assets;
|
|
2847
2847
|
const incoming_assets = incoming.assets;
|
|
2848
2848
|
const equals_assets_items = equalsArray(existing_assets, incoming_assets, (existing_assets_item, incoming_assets_item) => {
|
|
@@ -2855,48 +2855,48 @@ function equals$3(existing, incoming) {
|
|
|
2855
2855
|
}
|
|
2856
2856
|
return true;
|
|
2857
2857
|
}
|
|
2858
|
-
const ingest$
|
|
2858
|
+
const ingest$4 = function InstalledAssetCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2859
2859
|
if (process.env.NODE_ENV !== 'production') {
|
|
2860
|
-
const validateError = validate$
|
|
2860
|
+
const validateError = validate$a(input);
|
|
2861
2861
|
if (validateError !== null) {
|
|
2862
2862
|
throw validateError;
|
|
2863
2863
|
}
|
|
2864
2864
|
}
|
|
2865
2865
|
const key = path.fullPath;
|
|
2866
|
-
const ttlToUse = TTL$
|
|
2867
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2866
|
+
const ttlToUse = TTL$4;
|
|
2867
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "AppFramework", VERSION$4, RepresentationType$4, equals$4);
|
|
2868
2868
|
return createLink(key);
|
|
2869
2869
|
};
|
|
2870
|
-
function getTypeCacheKeys$
|
|
2870
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
2871
2871
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2872
2872
|
const rootKey = fullPathFactory();
|
|
2873
2873
|
rootKeySet.set(rootKey, {
|
|
2874
2874
|
namespace: keyPrefix,
|
|
2875
|
-
representationName: RepresentationType$
|
|
2875
|
+
representationName: RepresentationType$4,
|
|
2876
2876
|
mergeable: false
|
|
2877
2877
|
});
|
|
2878
2878
|
const input_assets_length = input.assets.length;
|
|
2879
2879
|
for (let i = 0; i < input_assets_length; i++) {
|
|
2880
|
-
getTypeCacheKeys$
|
|
2880
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.assets[i]);
|
|
2881
2881
|
}
|
|
2882
2882
|
}
|
|
2883
2883
|
|
|
2884
|
-
function select$
|
|
2885
|
-
return select$
|
|
2884
|
+
function select$a(luvio, params) {
|
|
2885
|
+
return select$b();
|
|
2886
2886
|
}
|
|
2887
|
-
function keyBuilder$
|
|
2887
|
+
function keyBuilder$c(luvio, params) {
|
|
2888
2888
|
return keyPrefix + '::InstalledAssetCollectionRepresentation:(' + 'assetIdOrName:' + params.queryParams.assetIdOrName + ',' + 'assetType:' + params.queryParams.assetType + ')';
|
|
2889
2889
|
}
|
|
2890
|
-
function getResponseCacheKeys$
|
|
2891
|
-
getTypeCacheKeys$
|
|
2890
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
2891
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$c(luvio, resourceParams));
|
|
2892
2892
|
}
|
|
2893
|
-
function ingestSuccess$
|
|
2893
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
2894
2894
|
const { body } = response;
|
|
2895
|
-
const key = keyBuilder$
|
|
2896
|
-
luvio.storeIngest(key, ingest$
|
|
2895
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
2896
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2897
2897
|
const snapshot = luvio.storeLookup({
|
|
2898
2898
|
recordId: key,
|
|
2899
|
-
node: select$
|
|
2899
|
+
node: select$a(),
|
|
2900
2900
|
variables: {},
|
|
2901
2901
|
}, snapshotRefresh);
|
|
2902
2902
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2907,19 +2907,19 @@ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2907
2907
|
deepFreeze(snapshot.data);
|
|
2908
2908
|
return snapshot;
|
|
2909
2909
|
}
|
|
2910
|
-
function ingestError$
|
|
2911
|
-
const key = keyBuilder$
|
|
2910
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2911
|
+
const key = keyBuilder$c(luvio, params);
|
|
2912
2912
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2913
2913
|
const storeMetadataParams = {
|
|
2914
|
-
ttl: TTL$
|
|
2914
|
+
ttl: TTL$4,
|
|
2915
2915
|
namespace: keyPrefix,
|
|
2916
|
-
version: VERSION$
|
|
2917
|
-
representationName: RepresentationType$
|
|
2916
|
+
version: VERSION$4,
|
|
2917
|
+
representationName: RepresentationType$4
|
|
2918
2918
|
};
|
|
2919
2919
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2920
2920
|
return errorSnapshot;
|
|
2921
2921
|
}
|
|
2922
|
-
function createResourceRequest$
|
|
2922
|
+
function createResourceRequest$6(config) {
|
|
2923
2923
|
const headers = {};
|
|
2924
2924
|
return {
|
|
2925
2925
|
baseUri: '/services/data/v63.0',
|
|
@@ -2933,96 +2933,96 @@ function createResourceRequest$4(config) {
|
|
|
2933
2933
|
};
|
|
2934
2934
|
}
|
|
2935
2935
|
|
|
2936
|
-
const adapterName$
|
|
2936
|
+
const adapterName$6 = 'getInstalledAssets';
|
|
2937
2937
|
const getInstalledAssets_ConfigPropertyMetadata = [
|
|
2938
2938
|
generateParamConfigMetadata('assetIdOrName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2939
2939
|
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2940
2940
|
];
|
|
2941
|
-
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2942
|
-
const createResourceParams$
|
|
2943
|
-
function keyBuilder$
|
|
2944
|
-
const resourceParams = createResourceParams$
|
|
2945
|
-
return keyBuilder$
|
|
2941
|
+
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getInstalledAssets_ConfigPropertyMetadata);
|
|
2942
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$e(getInstalledAssets_ConfigPropertyMetadata);
|
|
2943
|
+
function keyBuilder$b(luvio, config) {
|
|
2944
|
+
const resourceParams = createResourceParams$6(config);
|
|
2945
|
+
return keyBuilder$c(luvio, resourceParams);
|
|
2946
2946
|
}
|
|
2947
|
-
function typeCheckConfig$
|
|
2947
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
2948
2948
|
const config = {};
|
|
2949
|
-
typeCheckConfig$
|
|
2949
|
+
typeCheckConfig$e(untrustedConfig, config, getInstalledAssets_ConfigPropertyMetadata);
|
|
2950
2950
|
return config;
|
|
2951
2951
|
}
|
|
2952
|
-
function validateAdapterConfig$
|
|
2952
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
2953
2953
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2954
2954
|
return null;
|
|
2955
2955
|
}
|
|
2956
2956
|
if (process.env.NODE_ENV !== 'production') {
|
|
2957
2957
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2958
2958
|
}
|
|
2959
|
-
const config = typeCheckConfig$
|
|
2959
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
2960
2960
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2961
2961
|
return null;
|
|
2962
2962
|
}
|
|
2963
2963
|
return config;
|
|
2964
2964
|
}
|
|
2965
|
-
function adapterFragment$
|
|
2966
|
-
createResourceParams$
|
|
2967
|
-
return select$
|
|
2965
|
+
function adapterFragment$4(luvio, config) {
|
|
2966
|
+
createResourceParams$6(config);
|
|
2967
|
+
return select$a();
|
|
2968
2968
|
}
|
|
2969
|
-
function onFetchResponseSuccess$
|
|
2970
|
-
const snapshot = ingestSuccess$
|
|
2969
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2970
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
2971
2971
|
config,
|
|
2972
|
-
resolve: () => buildNetworkSnapshot$
|
|
2972
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2973
2973
|
});
|
|
2974
2974
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2975
2975
|
}
|
|
2976
|
-
function onFetchResponseError$
|
|
2977
|
-
const snapshot = ingestError$
|
|
2976
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2977
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2978
2978
|
config,
|
|
2979
|
-
resolve: () => buildNetworkSnapshot$
|
|
2979
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2980
2980
|
});
|
|
2981
2981
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2982
2982
|
}
|
|
2983
|
-
function buildNetworkSnapshot$
|
|
2984
|
-
const resourceParams = createResourceParams$
|
|
2985
|
-
const request = createResourceRequest$
|
|
2983
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
2984
|
+
const resourceParams = createResourceParams$6(config);
|
|
2985
|
+
const request = createResourceRequest$6(resourceParams);
|
|
2986
2986
|
return luvio.dispatchResourceRequest(request, options)
|
|
2987
2987
|
.then((response) => {
|
|
2988
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2988
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2989
2989
|
const cache = new StoreKeyMap();
|
|
2990
|
-
getResponseCacheKeys$
|
|
2990
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
2991
2991
|
return cache;
|
|
2992
2992
|
});
|
|
2993
2993
|
}, (response) => {
|
|
2994
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2994
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
2995
2995
|
});
|
|
2996
2996
|
}
|
|
2997
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2998
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2997
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2998
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
2999
2999
|
}
|
|
3000
|
-
function buildCachedSnapshotCachePolicy$
|
|
3000
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
3001
3001
|
const { luvio, config } = context;
|
|
3002
3002
|
const selector = {
|
|
3003
|
-
recordId: keyBuilder$
|
|
3004
|
-
node: adapterFragment$
|
|
3003
|
+
recordId: keyBuilder$b(luvio, config),
|
|
3004
|
+
node: adapterFragment$4(luvio, config),
|
|
3005
3005
|
variables: {},
|
|
3006
3006
|
};
|
|
3007
3007
|
const cacheSnapshot = storeLookup(selector, {
|
|
3008
3008
|
config,
|
|
3009
|
-
resolve: () => buildNetworkSnapshot$
|
|
3009
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
3010
3010
|
});
|
|
3011
3011
|
return cacheSnapshot;
|
|
3012
3012
|
}
|
|
3013
3013
|
const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getInstalledAssets(untrustedConfig, requestContext) {
|
|
3014
|
-
const config = validateAdapterConfig$
|
|
3014
|
+
const config = validateAdapterConfig$6(untrustedConfig, getInstalledAssets_ConfigPropertyNames);
|
|
3015
3015
|
// Invalid or incomplete config
|
|
3016
3016
|
if (config === null) {
|
|
3017
3017
|
return null;
|
|
3018
3018
|
}
|
|
3019
3019
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3020
|
-
buildCachedSnapshotCachePolicy$
|
|
3020
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
3021
3021
|
};
|
|
3022
3022
|
|
|
3023
|
-
const TTL$
|
|
3024
|
-
const VERSION$
|
|
3025
|
-
function validate$
|
|
3023
|
+
const TTL$3 = 5000;
|
|
3024
|
+
const VERSION$3 = "7b301696f68bda5cea09d0c20ea77f58";
|
|
3025
|
+
function validate$9(obj, path = 'TemplateRepresentation') {
|
|
3026
3026
|
const v_error = (() => {
|
|
3027
3027
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3028
3028
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3110,23 +3110,23 @@ function validate$8(obj, path = 'TemplateRepresentation') {
|
|
|
3110
3110
|
})();
|
|
3111
3111
|
return v_error === undefined ? null : v_error;
|
|
3112
3112
|
}
|
|
3113
|
-
const RepresentationType$
|
|
3114
|
-
function keyBuilder$
|
|
3115
|
-
return keyPrefix + '::' + RepresentationType$
|
|
3113
|
+
const RepresentationType$3 = 'TemplateRepresentation';
|
|
3114
|
+
function keyBuilder$a(luvio, config) {
|
|
3115
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
3116
3116
|
}
|
|
3117
|
-
function keyBuilderFromType$
|
|
3117
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
3118
3118
|
const keyParams = {
|
|
3119
3119
|
id: object.id
|
|
3120
3120
|
};
|
|
3121
|
-
return keyBuilder$
|
|
3121
|
+
return keyBuilder$a(luvio, keyParams);
|
|
3122
3122
|
}
|
|
3123
|
-
function normalize$
|
|
3123
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3124
3124
|
return input;
|
|
3125
3125
|
}
|
|
3126
|
-
const select$
|
|
3126
|
+
const select$9 = function TemplateRepresentationSelect() {
|
|
3127
3127
|
return {
|
|
3128
3128
|
kind: 'Fragment',
|
|
3129
|
-
version: VERSION$
|
|
3129
|
+
version: VERSION$3,
|
|
3130
3130
|
private: [],
|
|
3131
3131
|
selections: [
|
|
3132
3132
|
{
|
|
@@ -3173,7 +3173,7 @@ const select$6 = function TemplateRepresentationSelect() {
|
|
|
3173
3173
|
]
|
|
3174
3174
|
};
|
|
3175
3175
|
};
|
|
3176
|
-
function equals$
|
|
3176
|
+
function equals$3(existing, incoming) {
|
|
3177
3177
|
const existing_configurationUrl = existing.configurationUrl;
|
|
3178
3178
|
const incoming_configurationUrl = incoming.configurationUrl;
|
|
3179
3179
|
if (!(existing_configurationUrl === incoming_configurationUrl)) {
|
|
@@ -3231,31 +3231,31 @@ function equals$2(existing, incoming) {
|
|
|
3231
3231
|
}
|
|
3232
3232
|
return true;
|
|
3233
3233
|
}
|
|
3234
|
-
const ingest$
|
|
3234
|
+
const ingest$3 = function TemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3235
3235
|
if (process.env.NODE_ENV !== 'production') {
|
|
3236
|
-
const validateError = validate$
|
|
3236
|
+
const validateError = validate$9(input);
|
|
3237
3237
|
if (validateError !== null) {
|
|
3238
3238
|
throw validateError;
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
|
-
const key = keyBuilderFromType$
|
|
3242
|
-
const ttlToUse = TTL$
|
|
3243
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3241
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
3242
|
+
const ttlToUse = TTL$3;
|
|
3243
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "AppFramework", VERSION$3, RepresentationType$3, equals$3);
|
|
3244
3244
|
return createLink(key);
|
|
3245
3245
|
};
|
|
3246
|
-
function getTypeCacheKeys$
|
|
3246
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
3247
3247
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3248
|
-
const rootKey = keyBuilderFromType$
|
|
3248
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
3249
3249
|
rootKeySet.set(rootKey, {
|
|
3250
3250
|
namespace: keyPrefix,
|
|
3251
|
-
representationName: RepresentationType$
|
|
3251
|
+
representationName: RepresentationType$3,
|
|
3252
3252
|
mergeable: false
|
|
3253
3253
|
});
|
|
3254
3254
|
}
|
|
3255
3255
|
|
|
3256
|
-
const TTL$
|
|
3257
|
-
const VERSION$
|
|
3258
|
-
function validate$
|
|
3256
|
+
const TTL$2 = 5000;
|
|
3257
|
+
const VERSION$2 = "4d3fc84707ae344f06fb99bd22e68f46";
|
|
3258
|
+
function validate$8(obj, path = 'TemplateCollectionRepresentation') {
|
|
3259
3259
|
const v_error = (() => {
|
|
3260
3260
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3261
3261
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3275,14 +3275,14 @@ function validate$7(obj, path = 'TemplateCollectionRepresentation') {
|
|
|
3275
3275
|
})();
|
|
3276
3276
|
return v_error === undefined ? null : v_error;
|
|
3277
3277
|
}
|
|
3278
|
-
const RepresentationType$
|
|
3279
|
-
function normalize$
|
|
3278
|
+
const RepresentationType$2 = 'TemplateCollectionRepresentation';
|
|
3279
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3280
3280
|
const input_templates = input.templates;
|
|
3281
3281
|
const input_templates_id = path.fullPath + '__templates';
|
|
3282
3282
|
for (let i = 0; i < input_templates.length; i++) {
|
|
3283
3283
|
const input_templates_item = input_templates[i];
|
|
3284
3284
|
let input_templates_item_id = input_templates_id + '__' + i;
|
|
3285
|
-
input_templates[i] = ingest$
|
|
3285
|
+
input_templates[i] = ingest$3(input_templates_item, {
|
|
3286
3286
|
fullPath: input_templates_item_id,
|
|
3287
3287
|
propertyName: i,
|
|
3288
3288
|
parent: {
|
|
@@ -3295,22 +3295,22 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
|
3295
3295
|
}
|
|
3296
3296
|
return input;
|
|
3297
3297
|
}
|
|
3298
|
-
const select$
|
|
3298
|
+
const select$8 = function TemplateCollectionRepresentationSelect() {
|
|
3299
3299
|
return {
|
|
3300
3300
|
kind: 'Fragment',
|
|
3301
|
-
version: VERSION$
|
|
3301
|
+
version: VERSION$2,
|
|
3302
3302
|
private: [],
|
|
3303
3303
|
selections: [
|
|
3304
3304
|
{
|
|
3305
3305
|
name: 'templates',
|
|
3306
3306
|
kind: 'Link',
|
|
3307
3307
|
plural: true,
|
|
3308
|
-
fragment: select$
|
|
3308
|
+
fragment: select$9()
|
|
3309
3309
|
}
|
|
3310
3310
|
]
|
|
3311
3311
|
};
|
|
3312
3312
|
};
|
|
3313
|
-
function equals$
|
|
3313
|
+
function equals$2(existing, incoming) {
|
|
3314
3314
|
const existing_templates = existing.templates;
|
|
3315
3315
|
const incoming_templates = incoming.templates;
|
|
3316
3316
|
const equals_templates_items = equalsArray(existing_templates, incoming_templates, (existing_templates_item, incoming_templates_item) => {
|
|
@@ -3323,48 +3323,48 @@ function equals$1(existing, incoming) {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
return true;
|
|
3325
3325
|
}
|
|
3326
|
-
const ingest$
|
|
3326
|
+
const ingest$2 = function TemplateCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3327
3327
|
if (process.env.NODE_ENV !== 'production') {
|
|
3328
|
-
const validateError = validate$
|
|
3328
|
+
const validateError = validate$8(input);
|
|
3329
3329
|
if (validateError !== null) {
|
|
3330
3330
|
throw validateError;
|
|
3331
3331
|
}
|
|
3332
3332
|
}
|
|
3333
3333
|
const key = path.fullPath;
|
|
3334
|
-
const ttlToUse = TTL$
|
|
3335
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3334
|
+
const ttlToUse = TTL$2;
|
|
3335
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "AppFramework", VERSION$2, RepresentationType$2, equals$2);
|
|
3336
3336
|
return createLink(key);
|
|
3337
3337
|
};
|
|
3338
|
-
function getTypeCacheKeys$
|
|
3338
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3339
3339
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3340
3340
|
const rootKey = fullPathFactory();
|
|
3341
3341
|
rootKeySet.set(rootKey, {
|
|
3342
3342
|
namespace: keyPrefix,
|
|
3343
|
-
representationName: RepresentationType$
|
|
3343
|
+
representationName: RepresentationType$2,
|
|
3344
3344
|
mergeable: false
|
|
3345
3345
|
});
|
|
3346
3346
|
const input_templates_length = input.templates.length;
|
|
3347
3347
|
for (let i = 0; i < input_templates_length; i++) {
|
|
3348
|
-
getTypeCacheKeys$
|
|
3348
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.templates[i]);
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
3351
|
|
|
3352
|
-
function select$
|
|
3353
|
-
return select$
|
|
3352
|
+
function select$7(luvio, params) {
|
|
3353
|
+
return select$8();
|
|
3354
3354
|
}
|
|
3355
|
-
function keyBuilder$
|
|
3355
|
+
function keyBuilder$9(luvio, params) {
|
|
3356
3356
|
return keyPrefix + '::TemplateCollectionRepresentation:(' + ')';
|
|
3357
3357
|
}
|
|
3358
|
-
function getResponseCacheKeys$
|
|
3359
|
-
getTypeCacheKeys$
|
|
3358
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
3359
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$9());
|
|
3360
3360
|
}
|
|
3361
|
-
function ingestSuccess$
|
|
3361
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
3362
3362
|
const { body } = response;
|
|
3363
|
-
const key = keyBuilder$
|
|
3364
|
-
luvio.storeIngest(key, ingest$
|
|
3363
|
+
const key = keyBuilder$9();
|
|
3364
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
3365
3365
|
const snapshot = luvio.storeLookup({
|
|
3366
3366
|
recordId: key,
|
|
3367
|
-
node: select$
|
|
3367
|
+
node: select$7(),
|
|
3368
3368
|
variables: {},
|
|
3369
3369
|
}, snapshotRefresh);
|
|
3370
3370
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3375,19 +3375,19 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3375
3375
|
deepFreeze(snapshot.data);
|
|
3376
3376
|
return snapshot;
|
|
3377
3377
|
}
|
|
3378
|
-
function ingestError$
|
|
3379
|
-
const key = keyBuilder$
|
|
3378
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3379
|
+
const key = keyBuilder$9();
|
|
3380
3380
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3381
3381
|
const storeMetadataParams = {
|
|
3382
|
-
ttl: TTL$
|
|
3382
|
+
ttl: TTL$2,
|
|
3383
3383
|
namespace: keyPrefix,
|
|
3384
|
-
version: VERSION$
|
|
3385
|
-
representationName: RepresentationType$
|
|
3384
|
+
version: VERSION$2,
|
|
3385
|
+
representationName: RepresentationType$2
|
|
3386
3386
|
};
|
|
3387
3387
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3388
3388
|
return errorSnapshot;
|
|
3389
3389
|
}
|
|
3390
|
-
function createResourceRequest$
|
|
3390
|
+
function createResourceRequest$5(config) {
|
|
3391
3391
|
const headers = {};
|
|
3392
3392
|
return {
|
|
3393
3393
|
baseUri: '/services/data/v63.0',
|
|
@@ -3401,90 +3401,90 @@ function createResourceRequest$3(config) {
|
|
|
3401
3401
|
};
|
|
3402
3402
|
}
|
|
3403
3403
|
|
|
3404
|
-
const adapterName$
|
|
3404
|
+
const adapterName$5 = 'getTemplates';
|
|
3405
3405
|
const getTemplates_ConfigPropertyMetadata = [];
|
|
3406
|
-
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3407
|
-
const createResourceParams$
|
|
3408
|
-
function keyBuilder$
|
|
3409
|
-
createResourceParams$
|
|
3410
|
-
return keyBuilder$
|
|
3406
|
+
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getTemplates_ConfigPropertyMetadata);
|
|
3407
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$e(getTemplates_ConfigPropertyMetadata);
|
|
3408
|
+
function keyBuilder$8(luvio, config) {
|
|
3409
|
+
createResourceParams$5(config);
|
|
3410
|
+
return keyBuilder$9();
|
|
3411
3411
|
}
|
|
3412
|
-
function typeCheckConfig$
|
|
3412
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
3413
3413
|
const config = {};
|
|
3414
3414
|
return config;
|
|
3415
3415
|
}
|
|
3416
|
-
function validateAdapterConfig$
|
|
3416
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
3417
3417
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3418
3418
|
return null;
|
|
3419
3419
|
}
|
|
3420
3420
|
if (process.env.NODE_ENV !== 'production') {
|
|
3421
3421
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3422
3422
|
}
|
|
3423
|
-
const config = typeCheckConfig$
|
|
3423
|
+
const config = typeCheckConfig$5();
|
|
3424
3424
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3425
3425
|
return null;
|
|
3426
3426
|
}
|
|
3427
3427
|
return config;
|
|
3428
3428
|
}
|
|
3429
|
-
function adapterFragment$
|
|
3430
|
-
createResourceParams$
|
|
3431
|
-
return select$
|
|
3429
|
+
function adapterFragment$3(luvio, config) {
|
|
3430
|
+
createResourceParams$5(config);
|
|
3431
|
+
return select$7();
|
|
3432
3432
|
}
|
|
3433
|
-
function onFetchResponseSuccess$
|
|
3434
|
-
const snapshot = ingestSuccess$
|
|
3433
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3434
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
3435
3435
|
config,
|
|
3436
|
-
resolve: () => buildNetworkSnapshot$
|
|
3436
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3437
3437
|
});
|
|
3438
3438
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3439
3439
|
}
|
|
3440
|
-
function onFetchResponseError$
|
|
3441
|
-
const snapshot = ingestError$
|
|
3440
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3441
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3442
3442
|
config,
|
|
3443
|
-
resolve: () => buildNetworkSnapshot$
|
|
3443
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3444
3444
|
});
|
|
3445
3445
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3446
3446
|
}
|
|
3447
|
-
function buildNetworkSnapshot$
|
|
3448
|
-
const resourceParams = createResourceParams$
|
|
3449
|
-
const request = createResourceRequest$
|
|
3447
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
3448
|
+
const resourceParams = createResourceParams$5(config);
|
|
3449
|
+
const request = createResourceRequest$5();
|
|
3450
3450
|
return luvio.dispatchResourceRequest(request, options)
|
|
3451
3451
|
.then((response) => {
|
|
3452
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3452
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
3453
3453
|
const cache = new StoreKeyMap();
|
|
3454
|
-
getResponseCacheKeys$
|
|
3454
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
3455
3455
|
return cache;
|
|
3456
3456
|
});
|
|
3457
3457
|
}, (response) => {
|
|
3458
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3458
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
3459
3459
|
});
|
|
3460
3460
|
}
|
|
3461
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3462
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3461
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3462
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
3463
3463
|
}
|
|
3464
|
-
function buildCachedSnapshotCachePolicy$
|
|
3464
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3465
3465
|
const { luvio, config } = context;
|
|
3466
3466
|
const selector = {
|
|
3467
|
-
recordId: keyBuilder$
|
|
3468
|
-
node: adapterFragment$
|
|
3467
|
+
recordId: keyBuilder$8(luvio, config),
|
|
3468
|
+
node: adapterFragment$3(luvio, config),
|
|
3469
3469
|
variables: {},
|
|
3470
3470
|
};
|
|
3471
3471
|
const cacheSnapshot = storeLookup(selector, {
|
|
3472
3472
|
config,
|
|
3473
|
-
resolve: () => buildNetworkSnapshot$
|
|
3473
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
3474
3474
|
});
|
|
3475
3475
|
return cacheSnapshot;
|
|
3476
3476
|
}
|
|
3477
3477
|
const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplates(untrustedConfig, requestContext) {
|
|
3478
|
-
const config = validateAdapterConfig$
|
|
3478
|
+
const config = validateAdapterConfig$5(untrustedConfig, getTemplates_ConfigPropertyNames);
|
|
3479
3479
|
// Invalid or incomplete config
|
|
3480
3480
|
if (config === null) {
|
|
3481
3481
|
return null;
|
|
3482
3482
|
}
|
|
3483
3483
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3484
|
-
buildCachedSnapshotCachePolicy$
|
|
3484
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
3485
3485
|
};
|
|
3486
3486
|
|
|
3487
|
-
function validate$
|
|
3487
|
+
function validate$7(obj, path = 'ChainDefinitionInputRepresentation') {
|
|
3488
3488
|
const v_error = (() => {
|
|
3489
3489
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3490
3490
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3510,7 +3510,7 @@ function validate$6(obj, path = 'ChainDefinitionInputRepresentation') {
|
|
|
3510
3510
|
return v_error === undefined ? null : v_error;
|
|
3511
3511
|
}
|
|
3512
3512
|
|
|
3513
|
-
function validate$
|
|
3513
|
+
function validate$6(obj, path = 'NamespacedReferenceInputRepresentation') {
|
|
3514
3514
|
const v_error = (() => {
|
|
3515
3515
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3516
3516
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3529,7 +3529,7 @@ function validate$5(obj, path = 'NamespacedReferenceInputRepresentation') {
|
|
|
3529
3529
|
return v_error === undefined ? null : v_error;
|
|
3530
3530
|
}
|
|
3531
3531
|
|
|
3532
|
-
function validate$
|
|
3532
|
+
function validate$5(obj, path = 'TemplatePreviewInputRepresentation') {
|
|
3533
3533
|
const v_error = (() => {
|
|
3534
3534
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3535
3535
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3562,7 +3562,7 @@ function validate$4(obj, path = 'TemplatePreviewInputRepresentation') {
|
|
|
3562
3562
|
return v_error === undefined ? null : v_error;
|
|
3563
3563
|
}
|
|
3564
3564
|
|
|
3565
|
-
function validate$
|
|
3565
|
+
function validate$4(obj, path = 'TemplateIconsInputRepresentation') {
|
|
3566
3566
|
const v_error = (() => {
|
|
3567
3567
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3568
3568
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3570,7 +3570,7 @@ function validate$3(obj, path = 'TemplateIconsInputRepresentation') {
|
|
|
3570
3570
|
if (obj.appBadge !== undefined) {
|
|
3571
3571
|
const obj_appBadge = obj.appBadge;
|
|
3572
3572
|
const path_appBadge = path + '.appBadge';
|
|
3573
|
-
const referencepath_appBadgeValidationError = validate$
|
|
3573
|
+
const referencepath_appBadgeValidationError = validate$6(obj_appBadge, path_appBadge);
|
|
3574
3574
|
if (referencepath_appBadgeValidationError !== null) {
|
|
3575
3575
|
let message = 'Object doesn\'t match NamespacedReferenceInputRepresentation (at "' + path_appBadge + '")\n';
|
|
3576
3576
|
message += referencepath_appBadgeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3580,7 +3580,7 @@ function validate$3(obj, path = 'TemplateIconsInputRepresentation') {
|
|
|
3580
3580
|
if (obj.templateBadge !== undefined) {
|
|
3581
3581
|
const obj_templateBadge = obj.templateBadge;
|
|
3582
3582
|
const path_templateBadge = path + '.templateBadge';
|
|
3583
|
-
const referencepath_templateBadgeValidationError = validate$
|
|
3583
|
+
const referencepath_templateBadgeValidationError = validate$6(obj_templateBadge, path_templateBadge);
|
|
3584
3584
|
if (referencepath_templateBadgeValidationError !== null) {
|
|
3585
3585
|
let message = 'Object doesn\'t match NamespacedReferenceInputRepresentation (at "' + path_templateBadge + '")\n';
|
|
3586
3586
|
message += referencepath_templateBadgeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3596,7 +3596,7 @@ function validate$3(obj, path = 'TemplateIconsInputRepresentation') {
|
|
|
3596
3596
|
for (let i = 0; i < obj_templatePreviews.length; i++) {
|
|
3597
3597
|
const obj_templatePreviews_item = obj_templatePreviews[i];
|
|
3598
3598
|
const path_templatePreviews_item = path_templatePreviews + '[' + i + ']';
|
|
3599
|
-
const referencepath_templatePreviews_itemValidationError = validate$
|
|
3599
|
+
const referencepath_templatePreviews_itemValidationError = validate$5(obj_templatePreviews_item, path_templatePreviews_item);
|
|
3600
3600
|
if (referencepath_templatePreviews_itemValidationError !== null) {
|
|
3601
3601
|
let message = 'Object doesn\'t match TemplatePreviewInputRepresentation (at "' + path_templatePreviews_item + '")\n';
|
|
3602
3602
|
message += referencepath_templatePreviews_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -3608,7 +3608,7 @@ function validate$3(obj, path = 'TemplateIconsInputRepresentation') {
|
|
|
3608
3608
|
return v_error === undefined ? null : v_error;
|
|
3609
3609
|
}
|
|
3610
3610
|
|
|
3611
|
-
function validate$
|
|
3611
|
+
function validate$3(obj, path = 'ReleaseInfoInputRepresentation') {
|
|
3612
3612
|
const v_error = (() => {
|
|
3613
3613
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3614
3614
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3629,7 +3629,7 @@ function validate$2(obj, path = 'ReleaseInfoInputRepresentation') {
|
|
|
3629
3629
|
return v_error === undefined ? null : v_error;
|
|
3630
3630
|
}
|
|
3631
3631
|
|
|
3632
|
-
function validate$
|
|
3632
|
+
function validate$2(obj, path = 'RuleInfoInputRepresentation') {
|
|
3633
3633
|
const v_error = (() => {
|
|
3634
3634
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3635
3635
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3648,19 +3648,19 @@ function validate$1(obj, path = 'RuleInfoInputRepresentation') {
|
|
|
3648
3648
|
return v_error === undefined ? null : v_error;
|
|
3649
3649
|
}
|
|
3650
3650
|
|
|
3651
|
-
function select$
|
|
3652
|
-
return select$
|
|
3651
|
+
function select$6(luvio, params) {
|
|
3652
|
+
return select$9();
|
|
3653
3653
|
}
|
|
3654
|
-
function getResponseCacheKeys$
|
|
3655
|
-
getTypeCacheKeys$
|
|
3654
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
3655
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
3656
3656
|
}
|
|
3657
|
-
function ingestSuccess$
|
|
3657
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
3658
3658
|
const { body } = response;
|
|
3659
|
-
const key = keyBuilderFromType$
|
|
3660
|
-
luvio.storeIngest(key, ingest$
|
|
3659
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
3660
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3661
3661
|
const snapshot = luvio.storeLookup({
|
|
3662
3662
|
recordId: key,
|
|
3663
|
-
node: select$
|
|
3663
|
+
node: select$6(),
|
|
3664
3664
|
variables: {},
|
|
3665
3665
|
});
|
|
3666
3666
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3671,7 +3671,7 @@ function ingestSuccess$2(luvio, resourceParams, response) {
|
|
|
3671
3671
|
deepFreeze(snapshot.data);
|
|
3672
3672
|
return snapshot;
|
|
3673
3673
|
}
|
|
3674
|
-
function createResourceRequest$
|
|
3674
|
+
function createResourceRequest$4(config) {
|
|
3675
3675
|
const headers = {};
|
|
3676
3676
|
return {
|
|
3677
3677
|
baseUri: '/services/data/v63.0',
|
|
@@ -3685,7 +3685,7 @@ function createResourceRequest$2(config) {
|
|
|
3685
3685
|
};
|
|
3686
3686
|
}
|
|
3687
3687
|
|
|
3688
|
-
const adapterName$
|
|
3688
|
+
const adapterName$4 = 'createTemplate';
|
|
3689
3689
|
const createTemplate_ConfigPropertyMetadata = [
|
|
3690
3690
|
generateParamConfigMetadata('assetVersion', false, 2 /* Body */, 2 /* Number */),
|
|
3691
3691
|
generateParamConfigMetadata('chainDefinitions', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
@@ -3703,17 +3703,17 @@ const createTemplate_ConfigPropertyMetadata = [
|
|
|
3703
3703
|
generateParamConfigMetadata('templateType', true, 2 /* Body */, 0 /* String */),
|
|
3704
3704
|
generateParamConfigMetadata('variableDefinition', false, 2 /* Body */, 0 /* String */),
|
|
3705
3705
|
];
|
|
3706
|
-
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3707
|
-
const createResourceParams$
|
|
3708
|
-
function typeCheckConfig$
|
|
3706
|
+
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createTemplate_ConfigPropertyMetadata);
|
|
3707
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$e(createTemplate_ConfigPropertyMetadata);
|
|
3708
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
3709
3709
|
const config = {};
|
|
3710
|
-
typeCheckConfig$
|
|
3710
|
+
typeCheckConfig$e(untrustedConfig, config, createTemplate_ConfigPropertyMetadata);
|
|
3711
3711
|
const untrustedConfig_chainDefinitions = untrustedConfig.chainDefinitions;
|
|
3712
3712
|
if (ArrayIsArray$1(untrustedConfig_chainDefinitions)) {
|
|
3713
3713
|
const untrustedConfig_chainDefinitions_array = [];
|
|
3714
3714
|
for (let i = 0, arrayLength = untrustedConfig_chainDefinitions.length; i < arrayLength; i++) {
|
|
3715
3715
|
const untrustedConfig_chainDefinitions_item = untrustedConfig_chainDefinitions[i];
|
|
3716
|
-
const referenceChainDefinitionInputRepresentationValidationError = validate$
|
|
3716
|
+
const referenceChainDefinitionInputRepresentationValidationError = validate$7(untrustedConfig_chainDefinitions_item);
|
|
3717
3717
|
if (referenceChainDefinitionInputRepresentationValidationError === null) {
|
|
3718
3718
|
untrustedConfig_chainDefinitions_array.push(untrustedConfig_chainDefinitions_item);
|
|
3719
3719
|
}
|
|
@@ -3721,12 +3721,12 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
3721
3721
|
config.chainDefinitions = untrustedConfig_chainDefinitions_array;
|
|
3722
3722
|
}
|
|
3723
3723
|
const untrustedConfig_icons = untrustedConfig.icons;
|
|
3724
|
-
const referenceTemplateIconsInputRepresentationValidationError = validate$
|
|
3724
|
+
const referenceTemplateIconsInputRepresentationValidationError = validate$4(untrustedConfig_icons);
|
|
3725
3725
|
if (referenceTemplateIconsInputRepresentationValidationError === null) {
|
|
3726
3726
|
config.icons = untrustedConfig_icons;
|
|
3727
3727
|
}
|
|
3728
3728
|
const untrustedConfig_releaseInfo = untrustedConfig.releaseInfo;
|
|
3729
|
-
const referenceReleaseInfoInputRepresentationValidationError = validate$
|
|
3729
|
+
const referenceReleaseInfoInputRepresentationValidationError = validate$3(untrustedConfig_releaseInfo);
|
|
3730
3730
|
if (referenceReleaseInfoInputRepresentationValidationError === null) {
|
|
3731
3731
|
config.releaseInfo = untrustedConfig_releaseInfo;
|
|
3732
3732
|
}
|
|
@@ -3735,7 +3735,7 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
3735
3735
|
const untrustedConfig_rules_array = [];
|
|
3736
3736
|
for (let i = 0, arrayLength = untrustedConfig_rules.length; i < arrayLength; i++) {
|
|
3737
3737
|
const untrustedConfig_rules_item = untrustedConfig_rules[i];
|
|
3738
|
-
const referenceRuleInfoInputRepresentationValidationError = validate$
|
|
3738
|
+
const referenceRuleInfoInputRepresentationValidationError = validate$2(untrustedConfig_rules_item);
|
|
3739
3739
|
if (referenceRuleInfoInputRepresentationValidationError === null) {
|
|
3740
3740
|
untrustedConfig_rules_array.push(untrustedConfig_rules_item);
|
|
3741
3741
|
}
|
|
@@ -3759,30 +3759,30 @@ function typeCheckConfig$2(untrustedConfig) {
|
|
|
3759
3759
|
}
|
|
3760
3760
|
return config;
|
|
3761
3761
|
}
|
|
3762
|
-
function validateAdapterConfig$
|
|
3762
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
3763
3763
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3764
3764
|
return null;
|
|
3765
3765
|
}
|
|
3766
3766
|
if (process.env.NODE_ENV !== 'production') {
|
|
3767
3767
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3768
3768
|
}
|
|
3769
|
-
const config = typeCheckConfig$
|
|
3769
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
3770
3770
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3771
3771
|
return null;
|
|
3772
3772
|
}
|
|
3773
3773
|
return config;
|
|
3774
3774
|
}
|
|
3775
|
-
function buildNetworkSnapshot$
|
|
3776
|
-
const resourceParams = createResourceParams$
|
|
3777
|
-
const request = createResourceRequest$
|
|
3775
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
3776
|
+
const resourceParams = createResourceParams$4(config);
|
|
3777
|
+
const request = createResourceRequest$4(resourceParams);
|
|
3778
3778
|
return luvio.dispatchResourceRequest(request, options)
|
|
3779
3779
|
.then((response) => {
|
|
3780
3780
|
return luvio.handleSuccessResponse(() => {
|
|
3781
|
-
const snapshot = ingestSuccess$
|
|
3781
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
3782
3782
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3783
3783
|
}, () => {
|
|
3784
3784
|
const cache = new StoreKeyMap();
|
|
3785
|
-
getResponseCacheKeys$
|
|
3785
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
3786
3786
|
return cache;
|
|
3787
3787
|
});
|
|
3788
3788
|
}, (response) => {
|
|
@@ -3792,33 +3792,33 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3792
3792
|
}
|
|
3793
3793
|
const createTemplateAdapterFactory = (luvio) => {
|
|
3794
3794
|
return function createTemplate(untrustedConfig) {
|
|
3795
|
-
const config = validateAdapterConfig$
|
|
3795
|
+
const config = validateAdapterConfig$4(untrustedConfig, createTemplate_ConfigPropertyNames);
|
|
3796
3796
|
// Invalid or incomplete config
|
|
3797
3797
|
if (config === null) {
|
|
3798
3798
|
throw new Error('Invalid config for "createTemplate"');
|
|
3799
3799
|
}
|
|
3800
|
-
return buildNetworkSnapshot$
|
|
3800
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
3801
3801
|
};
|
|
3802
3802
|
};
|
|
3803
3803
|
|
|
3804
|
-
function select$
|
|
3805
|
-
return select$
|
|
3804
|
+
function select$5(luvio, params) {
|
|
3805
|
+
return select$9();
|
|
3806
3806
|
}
|
|
3807
|
-
function keyBuilder$
|
|
3808
|
-
return keyBuilder$
|
|
3807
|
+
function keyBuilder$7(luvio, params) {
|
|
3808
|
+
return keyBuilder$a(luvio, {
|
|
3809
3809
|
id: params.urlParams.templateIdOrApiName
|
|
3810
3810
|
});
|
|
3811
3811
|
}
|
|
3812
|
-
function getResponseCacheKeys$
|
|
3813
|
-
getTypeCacheKeys$
|
|
3812
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
3813
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response);
|
|
3814
3814
|
}
|
|
3815
|
-
function ingestSuccess$
|
|
3815
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
3816
3816
|
const { body } = response;
|
|
3817
|
-
const key = keyBuilder$
|
|
3818
|
-
luvio.storeIngest(key, ingest$
|
|
3817
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
3818
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3819
3819
|
const snapshot = luvio.storeLookup({
|
|
3820
3820
|
recordId: key,
|
|
3821
|
-
node: select$
|
|
3821
|
+
node: select$5(),
|
|
3822
3822
|
variables: {},
|
|
3823
3823
|
}, snapshotRefresh);
|
|
3824
3824
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3829,19 +3829,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3829
3829
|
deepFreeze(snapshot.data);
|
|
3830
3830
|
return snapshot;
|
|
3831
3831
|
}
|
|
3832
|
-
function ingestError$
|
|
3833
|
-
const key = keyBuilder$
|
|
3832
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3833
|
+
const key = keyBuilder$7(luvio, params);
|
|
3834
3834
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3835
3835
|
const storeMetadataParams = {
|
|
3836
|
-
ttl: TTL$
|
|
3836
|
+
ttl: TTL$3,
|
|
3837
3837
|
namespace: keyPrefix,
|
|
3838
|
-
version: VERSION$
|
|
3839
|
-
representationName: RepresentationType$
|
|
3838
|
+
version: VERSION$3,
|
|
3839
|
+
representationName: RepresentationType$3
|
|
3840
3840
|
};
|
|
3841
3841
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3842
3842
|
return errorSnapshot;
|
|
3843
3843
|
}
|
|
3844
|
-
function createResourceRequest$
|
|
3844
|
+
function createResourceRequest$3(config) {
|
|
3845
3845
|
const headers = {};
|
|
3846
3846
|
return {
|
|
3847
3847
|
baseUri: '/services/data/v63.0',
|
|
@@ -3855,95 +3855,95 @@ function createResourceRequest$1(config) {
|
|
|
3855
3855
|
};
|
|
3856
3856
|
}
|
|
3857
3857
|
|
|
3858
|
-
const adapterName$
|
|
3858
|
+
const adapterName$3 = 'getTemplate';
|
|
3859
3859
|
const getTemplate_ConfigPropertyMetadata = [
|
|
3860
3860
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3861
3861
|
];
|
|
3862
|
-
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3863
|
-
const createResourceParams$
|
|
3864
|
-
function keyBuilder$
|
|
3865
|
-
const resourceParams = createResourceParams$
|
|
3866
|
-
return keyBuilder$
|
|
3862
|
+
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getTemplate_ConfigPropertyMetadata);
|
|
3863
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$e(getTemplate_ConfigPropertyMetadata);
|
|
3864
|
+
function keyBuilder$6(luvio, config) {
|
|
3865
|
+
const resourceParams = createResourceParams$3(config);
|
|
3866
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
3867
3867
|
}
|
|
3868
|
-
function typeCheckConfig$
|
|
3868
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
3869
3869
|
const config = {};
|
|
3870
|
-
typeCheckConfig$
|
|
3870
|
+
typeCheckConfig$e(untrustedConfig, config, getTemplate_ConfigPropertyMetadata);
|
|
3871
3871
|
return config;
|
|
3872
3872
|
}
|
|
3873
|
-
function validateAdapterConfig$
|
|
3873
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
3874
3874
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3875
3875
|
return null;
|
|
3876
3876
|
}
|
|
3877
3877
|
if (process.env.NODE_ENV !== 'production') {
|
|
3878
3878
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3879
3879
|
}
|
|
3880
|
-
const config = typeCheckConfig$
|
|
3880
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
3881
3881
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3882
3882
|
return null;
|
|
3883
3883
|
}
|
|
3884
3884
|
return config;
|
|
3885
3885
|
}
|
|
3886
|
-
function adapterFragment$
|
|
3887
|
-
createResourceParams$
|
|
3888
|
-
return select$
|
|
3886
|
+
function adapterFragment$2(luvio, config) {
|
|
3887
|
+
createResourceParams$3(config);
|
|
3888
|
+
return select$5();
|
|
3889
3889
|
}
|
|
3890
|
-
function onFetchResponseSuccess$
|
|
3891
|
-
const snapshot = ingestSuccess$
|
|
3890
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3891
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
3892
3892
|
config,
|
|
3893
|
-
resolve: () => buildNetworkSnapshot$
|
|
3893
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3894
3894
|
});
|
|
3895
3895
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3896
3896
|
}
|
|
3897
|
-
function onFetchResponseError$
|
|
3898
|
-
const snapshot = ingestError$
|
|
3897
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3898
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3899
3899
|
config,
|
|
3900
|
-
resolve: () => buildNetworkSnapshot$
|
|
3900
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3901
3901
|
});
|
|
3902
3902
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3903
3903
|
}
|
|
3904
|
-
function buildNetworkSnapshot$
|
|
3905
|
-
const resourceParams = createResourceParams$
|
|
3906
|
-
const request = createResourceRequest$
|
|
3907
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
3904
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
3905
|
+
const resourceParams = createResourceParams$3(config);
|
|
3906
|
+
const request = createResourceRequest$3(resourceParams);
|
|
3907
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3908
3908
|
.then((response) => {
|
|
3909
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
3909
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3910
3910
|
const cache = new StoreKeyMap();
|
|
3911
|
-
getResponseCacheKeys$
|
|
3911
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
3912
3912
|
return cache;
|
|
3913
3913
|
});
|
|
3914
3914
|
}, (response) => {
|
|
3915
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
3915
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
3916
3916
|
});
|
|
3917
3917
|
}
|
|
3918
|
-
function buildNetworkSnapshotCachePolicy$
|
|
3919
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3918
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3919
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
3920
3920
|
}
|
|
3921
|
-
function buildCachedSnapshotCachePolicy$
|
|
3921
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3922
3922
|
const { luvio, config } = context;
|
|
3923
3923
|
const selector = {
|
|
3924
|
-
recordId: keyBuilder$
|
|
3925
|
-
node: adapterFragment$
|
|
3924
|
+
recordId: keyBuilder$6(luvio, config),
|
|
3925
|
+
node: adapterFragment$2(luvio, config),
|
|
3926
3926
|
variables: {},
|
|
3927
3927
|
};
|
|
3928
3928
|
const cacheSnapshot = storeLookup(selector, {
|
|
3929
3929
|
config,
|
|
3930
|
-
resolve: () => buildNetworkSnapshot$
|
|
3930
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3931
3931
|
});
|
|
3932
3932
|
return cacheSnapshot;
|
|
3933
3933
|
}
|
|
3934
3934
|
const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(untrustedConfig, requestContext) {
|
|
3935
|
-
const config = validateAdapterConfig$
|
|
3935
|
+
const config = validateAdapterConfig$3(untrustedConfig, getTemplate_ConfigPropertyNames);
|
|
3936
3936
|
// Invalid or incomplete config
|
|
3937
3937
|
if (config === null) {
|
|
3938
3938
|
return null;
|
|
3939
3939
|
}
|
|
3940
3940
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3941
|
-
buildCachedSnapshotCachePolicy$
|
|
3941
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
3942
3942
|
};
|
|
3943
3943
|
|
|
3944
|
-
const TTL = 5000;
|
|
3945
|
-
const VERSION = "e6fefdec79109bdf21676f6faa21f07d";
|
|
3946
|
-
function validate(obj, path = 'TemplateConfigurationRepresentation') {
|
|
3944
|
+
const TTL$1 = 5000;
|
|
3945
|
+
const VERSION$1 = "e6fefdec79109bdf21676f6faa21f07d";
|
|
3946
|
+
function validate$1(obj, path = 'TemplateConfigurationRepresentation') {
|
|
3947
3947
|
const v_error = (() => {
|
|
3948
3948
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3949
3949
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -3961,23 +3961,23 @@ function validate(obj, path = 'TemplateConfigurationRepresentation') {
|
|
|
3961
3961
|
})();
|
|
3962
3962
|
return v_error === undefined ? null : v_error;
|
|
3963
3963
|
}
|
|
3964
|
-
const RepresentationType = 'TemplateConfigurationRepresentation';
|
|
3965
|
-
function keyBuilder$
|
|
3966
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
3964
|
+
const RepresentationType$1 = 'TemplateConfigurationRepresentation';
|
|
3965
|
+
function keyBuilder$5(luvio, config) {
|
|
3966
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
3967
3967
|
}
|
|
3968
|
-
function keyBuilderFromType(luvio, object) {
|
|
3968
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
3969
3969
|
const keyParams = {
|
|
3970
3970
|
id: object.id
|
|
3971
3971
|
};
|
|
3972
|
-
return keyBuilder$
|
|
3972
|
+
return keyBuilder$5(luvio, keyParams);
|
|
3973
3973
|
}
|
|
3974
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
3974
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3975
3975
|
return input;
|
|
3976
3976
|
}
|
|
3977
|
-
const select$
|
|
3977
|
+
const select$4 = function TemplateConfigurationRepresentationSelect() {
|
|
3978
3978
|
return {
|
|
3979
3979
|
kind: 'Fragment',
|
|
3980
|
-
version: VERSION,
|
|
3980
|
+
version: VERSION$1,
|
|
3981
3981
|
private: [],
|
|
3982
3982
|
selections: [
|
|
3983
3983
|
{
|
|
@@ -3991,7 +3991,7 @@ const select$1 = function TemplateConfigurationRepresentationSelect() {
|
|
|
3991
3991
|
]
|
|
3992
3992
|
};
|
|
3993
3993
|
};
|
|
3994
|
-
function equals(existing, incoming) {
|
|
3994
|
+
function equals$1(existing, incoming) {
|
|
3995
3995
|
const existing_id = existing.id;
|
|
3996
3996
|
const incoming_id = incoming.id;
|
|
3997
3997
|
if (!(existing_id === incoming_id)) {
|
|
@@ -4004,7 +4004,247 @@ function equals(existing, incoming) {
|
|
|
4004
4004
|
}
|
|
4005
4005
|
return true;
|
|
4006
4006
|
}
|
|
4007
|
-
const ingest = function TemplateConfigurationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4007
|
+
const ingest$1 = function TemplateConfigurationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4008
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4009
|
+
const validateError = validate$1(input);
|
|
4010
|
+
if (validateError !== null) {
|
|
4011
|
+
throw validateError;
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
4015
|
+
const ttlToUse = TTL$1;
|
|
4016
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "AppFramework", VERSION$1, RepresentationType$1, equals$1);
|
|
4017
|
+
return createLink(key);
|
|
4018
|
+
};
|
|
4019
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
4020
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
4021
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
4022
|
+
rootKeySet.set(rootKey, {
|
|
4023
|
+
namespace: keyPrefix,
|
|
4024
|
+
representationName: RepresentationType$1,
|
|
4025
|
+
mergeable: false
|
|
4026
|
+
});
|
|
4027
|
+
}
|
|
4028
|
+
|
|
4029
|
+
function select$3(luvio, params) {
|
|
4030
|
+
return select$4();
|
|
4031
|
+
}
|
|
4032
|
+
function keyBuilder$4(luvio, params) {
|
|
4033
|
+
return keyBuilder$5(luvio, {
|
|
4034
|
+
id: params.urlParams.templateIdOrApiName
|
|
4035
|
+
});
|
|
4036
|
+
}
|
|
4037
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
4038
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
4039
|
+
}
|
|
4040
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
4041
|
+
const { body } = response;
|
|
4042
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
4043
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
4044
|
+
const snapshot = luvio.storeLookup({
|
|
4045
|
+
recordId: key,
|
|
4046
|
+
node: select$3(),
|
|
4047
|
+
variables: {},
|
|
4048
|
+
}, snapshotRefresh);
|
|
4049
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4050
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4051
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4052
|
+
}
|
|
4053
|
+
}
|
|
4054
|
+
deepFreeze(snapshot.data);
|
|
4055
|
+
return snapshot;
|
|
4056
|
+
}
|
|
4057
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
4058
|
+
const key = keyBuilder$4(luvio, params);
|
|
4059
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
4060
|
+
const storeMetadataParams = {
|
|
4061
|
+
ttl: TTL$1,
|
|
4062
|
+
namespace: keyPrefix,
|
|
4063
|
+
version: VERSION$1,
|
|
4064
|
+
representationName: RepresentationType$1
|
|
4065
|
+
};
|
|
4066
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4067
|
+
return errorSnapshot;
|
|
4068
|
+
}
|
|
4069
|
+
function createResourceRequest$2(config) {
|
|
4070
|
+
const headers = {};
|
|
4071
|
+
return {
|
|
4072
|
+
baseUri: '/services/data/v63.0',
|
|
4073
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '/configuration',
|
|
4074
|
+
method: 'get',
|
|
4075
|
+
body: null,
|
|
4076
|
+
urlParams: config.urlParams,
|
|
4077
|
+
queryParams: {},
|
|
4078
|
+
headers,
|
|
4079
|
+
priority: 'normal',
|
|
4080
|
+
};
|
|
4081
|
+
}
|
|
4082
|
+
|
|
4083
|
+
const adapterName$2 = 'getTemplateConfig';
|
|
4084
|
+
const getTemplateConfig_ConfigPropertyMetadata = [
|
|
4085
|
+
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4086
|
+
];
|
|
4087
|
+
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplateConfig_ConfigPropertyMetadata);
|
|
4088
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$e(getTemplateConfig_ConfigPropertyMetadata);
|
|
4089
|
+
function keyBuilder$3(luvio, config) {
|
|
4090
|
+
const resourceParams = createResourceParams$2(config);
|
|
4091
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
4092
|
+
}
|
|
4093
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
4094
|
+
const config = {};
|
|
4095
|
+
typeCheckConfig$e(untrustedConfig, config, getTemplateConfig_ConfigPropertyMetadata);
|
|
4096
|
+
return config;
|
|
4097
|
+
}
|
|
4098
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
4099
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4100
|
+
return null;
|
|
4101
|
+
}
|
|
4102
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4103
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4104
|
+
}
|
|
4105
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
4106
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4107
|
+
return null;
|
|
4108
|
+
}
|
|
4109
|
+
return config;
|
|
4110
|
+
}
|
|
4111
|
+
function adapterFragment$1(luvio, config) {
|
|
4112
|
+
createResourceParams$2(config);
|
|
4113
|
+
return select$3();
|
|
4114
|
+
}
|
|
4115
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
4116
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
4117
|
+
config,
|
|
4118
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4119
|
+
});
|
|
4120
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4121
|
+
}
|
|
4122
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
4123
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
4124
|
+
config,
|
|
4125
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4126
|
+
});
|
|
4127
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4128
|
+
}
|
|
4129
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
4130
|
+
const resourceParams = createResourceParams$2(config);
|
|
4131
|
+
const request = createResourceRequest$2(resourceParams);
|
|
4132
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4133
|
+
.then((response) => {
|
|
4134
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
4135
|
+
const cache = new StoreKeyMap();
|
|
4136
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
4137
|
+
return cache;
|
|
4138
|
+
});
|
|
4139
|
+
}, (response) => {
|
|
4140
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
4141
|
+
});
|
|
4142
|
+
}
|
|
4143
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
4144
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
4145
|
+
}
|
|
4146
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
4147
|
+
const { luvio, config } = context;
|
|
4148
|
+
const selector = {
|
|
4149
|
+
recordId: keyBuilder$3(luvio, config),
|
|
4150
|
+
node: adapterFragment$1(luvio, config),
|
|
4151
|
+
variables: {},
|
|
4152
|
+
};
|
|
4153
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
4154
|
+
config,
|
|
4155
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
4156
|
+
});
|
|
4157
|
+
return cacheSnapshot;
|
|
4158
|
+
}
|
|
4159
|
+
const getTemplateConfigAdapterFactory = (luvio) => function AppFramework__getTemplateConfig(untrustedConfig, requestContext) {
|
|
4160
|
+
const config = validateAdapterConfig$2(untrustedConfig, getTemplateConfig_ConfigPropertyNames);
|
|
4161
|
+
// Invalid or incomplete config
|
|
4162
|
+
if (config === null) {
|
|
4163
|
+
return null;
|
|
4164
|
+
}
|
|
4165
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
4166
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
4167
|
+
};
|
|
4168
|
+
|
|
4169
|
+
const TTL = 5000;
|
|
4170
|
+
const VERSION = "59b25959d9663f1074e0b8d401e3c3a3";
|
|
4171
|
+
function validate(obj, path = 'TemplateTagCollectionRepresentation') {
|
|
4172
|
+
const v_error = (() => {
|
|
4173
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
4174
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
4175
|
+
}
|
|
4176
|
+
const obj_tags = obj.tags;
|
|
4177
|
+
const path_tags = path + '.tags';
|
|
4178
|
+
if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
|
|
4179
|
+
return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
4180
|
+
}
|
|
4181
|
+
const obj_tags_keys = ObjectKeys(obj_tags);
|
|
4182
|
+
for (let i = 0; i < obj_tags_keys.length; i++) {
|
|
4183
|
+
const key = obj_tags_keys[i];
|
|
4184
|
+
const obj_tags_prop = obj_tags[key];
|
|
4185
|
+
const path_tags_prop = path_tags + '["' + key + '"]';
|
|
4186
|
+
if (obj_tags_prop === undefined) {
|
|
4187
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
const obj_templateId = obj.templateId;
|
|
4191
|
+
const path_templateId = path + '.templateId';
|
|
4192
|
+
if (typeof obj_templateId !== 'string') {
|
|
4193
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateId + '" (at "' + path_templateId + '")');
|
|
4194
|
+
}
|
|
4195
|
+
})();
|
|
4196
|
+
return v_error === undefined ? null : v_error;
|
|
4197
|
+
}
|
|
4198
|
+
const RepresentationType = 'TemplateTagCollectionRepresentation';
|
|
4199
|
+
function keyBuilder$2(luvio, config) {
|
|
4200
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
4201
|
+
}
|
|
4202
|
+
function keyBuilderFromType(luvio, object) {
|
|
4203
|
+
const keyParams = {
|
|
4204
|
+
id: object.templateId
|
|
4205
|
+
};
|
|
4206
|
+
return keyBuilder$2(luvio, keyParams);
|
|
4207
|
+
}
|
|
4208
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
4209
|
+
return input;
|
|
4210
|
+
}
|
|
4211
|
+
const select$2 = function TemplateTagCollectionRepresentationSelect() {
|
|
4212
|
+
return {
|
|
4213
|
+
kind: 'Fragment',
|
|
4214
|
+
version: VERSION,
|
|
4215
|
+
private: [],
|
|
4216
|
+
selections: [
|
|
4217
|
+
{
|
|
4218
|
+
name: 'tags',
|
|
4219
|
+
kind: 'Object',
|
|
4220
|
+
// any
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
name: 'templateId',
|
|
4224
|
+
kind: 'Scalar'
|
|
4225
|
+
}
|
|
4226
|
+
]
|
|
4227
|
+
};
|
|
4228
|
+
};
|
|
4229
|
+
function equals(existing, incoming) {
|
|
4230
|
+
const existing_templateId = existing.templateId;
|
|
4231
|
+
const incoming_templateId = incoming.templateId;
|
|
4232
|
+
if (!(existing_templateId === incoming_templateId)) {
|
|
4233
|
+
return false;
|
|
4234
|
+
}
|
|
4235
|
+
const existing_tags = existing.tags;
|
|
4236
|
+
const incoming_tags = incoming.tags;
|
|
4237
|
+
const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
|
|
4238
|
+
if (JSONStringify(incoming_tags_prop) !== JSONStringify(existing_tags_prop)) {
|
|
4239
|
+
return false;
|
|
4240
|
+
}
|
|
4241
|
+
});
|
|
4242
|
+
if (equals_tags_props === false) {
|
|
4243
|
+
return false;
|
|
4244
|
+
}
|
|
4245
|
+
return true;
|
|
4246
|
+
}
|
|
4247
|
+
const ingest = function TemplateTagCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
4008
4248
|
if (process.env.NODE_ENV !== 'production') {
|
|
4009
4249
|
const validateError = validate(input);
|
|
4010
4250
|
if (validateError !== null) {
|
|
@@ -4026,24 +4266,24 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
4026
4266
|
});
|
|
4027
4267
|
}
|
|
4028
4268
|
|
|
4029
|
-
function select(luvio, params) {
|
|
4030
|
-
return select$
|
|
4269
|
+
function select$1(luvio, params) {
|
|
4270
|
+
return select$2();
|
|
4031
4271
|
}
|
|
4032
4272
|
function keyBuilder$1(luvio, params) {
|
|
4033
4273
|
return keyBuilder$2(luvio, {
|
|
4034
4274
|
id: params.urlParams.templateIdOrApiName
|
|
4035
4275
|
});
|
|
4036
4276
|
}
|
|
4037
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4277
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
4038
4278
|
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
4039
4279
|
}
|
|
4040
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
4280
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
4041
4281
|
const { body } = response;
|
|
4042
4282
|
const key = keyBuilder$1(luvio, resourceParams);
|
|
4043
4283
|
luvio.storeIngest(key, ingest, body);
|
|
4044
4284
|
const snapshot = luvio.storeLookup({
|
|
4045
4285
|
recordId: key,
|
|
4046
|
-
node: select(),
|
|
4286
|
+
node: select$1(),
|
|
4047
4287
|
variables: {},
|
|
4048
4288
|
}, snapshotRefresh);
|
|
4049
4289
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -4066,11 +4306,11 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
4066
4306
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
4067
4307
|
return errorSnapshot;
|
|
4068
4308
|
}
|
|
4069
|
-
function createResourceRequest(config) {
|
|
4309
|
+
function createResourceRequest$1(config) {
|
|
4070
4310
|
const headers = {};
|
|
4071
4311
|
return {
|
|
4072
4312
|
baseUri: '/services/data/v63.0',
|
|
4073
|
-
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '/
|
|
4313
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '/tags',
|
|
4074
4314
|
method: 'get',
|
|
4075
4315
|
body: null,
|
|
4076
4316
|
urlParams: config.urlParams,
|
|
@@ -4080,60 +4320,60 @@ function createResourceRequest(config) {
|
|
|
4080
4320
|
};
|
|
4081
4321
|
}
|
|
4082
4322
|
|
|
4083
|
-
const adapterName = '
|
|
4084
|
-
const
|
|
4323
|
+
const adapterName$1 = 'getTags';
|
|
4324
|
+
const getTags_ConfigPropertyMetadata = [
|
|
4085
4325
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4086
4326
|
];
|
|
4087
|
-
const
|
|
4088
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
4327
|
+
const getTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTags_ConfigPropertyMetadata);
|
|
4328
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$e(getTags_ConfigPropertyMetadata);
|
|
4089
4329
|
function keyBuilder(luvio, config) {
|
|
4090
|
-
const resourceParams = createResourceParams(config);
|
|
4330
|
+
const resourceParams = createResourceParams$1(config);
|
|
4091
4331
|
return keyBuilder$1(luvio, resourceParams);
|
|
4092
4332
|
}
|
|
4093
|
-
function typeCheckConfig(untrustedConfig) {
|
|
4333
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
4094
4334
|
const config = {};
|
|
4095
|
-
typeCheckConfig$
|
|
4335
|
+
typeCheckConfig$e(untrustedConfig, config, getTags_ConfigPropertyMetadata);
|
|
4096
4336
|
return config;
|
|
4097
4337
|
}
|
|
4098
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4338
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
4099
4339
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
4100
4340
|
return null;
|
|
4101
4341
|
}
|
|
4102
4342
|
if (process.env.NODE_ENV !== 'production') {
|
|
4103
4343
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
4104
4344
|
}
|
|
4105
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
4345
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
4106
4346
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4107
4347
|
return null;
|
|
4108
4348
|
}
|
|
4109
4349
|
return config;
|
|
4110
4350
|
}
|
|
4111
4351
|
function adapterFragment(luvio, config) {
|
|
4112
|
-
createResourceParams(config);
|
|
4113
|
-
return select();
|
|
4352
|
+
createResourceParams$1(config);
|
|
4353
|
+
return select$1();
|
|
4114
4354
|
}
|
|
4115
4355
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
4116
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
4356
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
4117
4357
|
config,
|
|
4118
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4358
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4119
4359
|
});
|
|
4120
4360
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4121
4361
|
}
|
|
4122
4362
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
4123
4363
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
4124
4364
|
config,
|
|
4125
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4365
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4126
4366
|
});
|
|
4127
4367
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4128
4368
|
}
|
|
4129
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
4130
|
-
const resourceParams = createResourceParams(config);
|
|
4131
|
-
const request = createResourceRequest(resourceParams);
|
|
4369
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
4370
|
+
const resourceParams = createResourceParams$1(config);
|
|
4371
|
+
const request = createResourceRequest$1(resourceParams);
|
|
4132
4372
|
return luvio.dispatchResourceRequest(request, options)
|
|
4133
4373
|
.then((response) => {
|
|
4134
4374
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
4135
4375
|
const cache = new StoreKeyMap();
|
|
4136
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
4376
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
4137
4377
|
return cache;
|
|
4138
4378
|
});
|
|
4139
4379
|
}, (response) => {
|
|
@@ -4141,7 +4381,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
4141
4381
|
});
|
|
4142
4382
|
}
|
|
4143
4383
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4144
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4384
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
4145
4385
|
}
|
|
4146
4386
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4147
4387
|
const { luvio, config } = context;
|
|
@@ -4152,12 +4392,12 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
4152
4392
|
};
|
|
4153
4393
|
const cacheSnapshot = storeLookup(selector, {
|
|
4154
4394
|
config,
|
|
4155
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4395
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4156
4396
|
});
|
|
4157
4397
|
return cacheSnapshot;
|
|
4158
4398
|
}
|
|
4159
|
-
const
|
|
4160
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
4399
|
+
const getTagsAdapterFactory = (luvio) => function AppFramework__getTags(untrustedConfig, requestContext) {
|
|
4400
|
+
const config = validateAdapterConfig$1(untrustedConfig, getTags_ConfigPropertyNames);
|
|
4161
4401
|
// Invalid or incomplete config
|
|
4162
4402
|
if (config === null) {
|
|
4163
4403
|
return null;
|
|
@@ -4166,4 +4406,110 @@ const getTemplateConfigAdapterFactory = (luvio) => function AppFramework__getTem
|
|
|
4166
4406
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
4167
4407
|
};
|
|
4168
4408
|
|
|
4169
|
-
|
|
4409
|
+
function select(luvio, params) {
|
|
4410
|
+
return select$2();
|
|
4411
|
+
}
|
|
4412
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4413
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
4414
|
+
}
|
|
4415
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
4416
|
+
const { body } = response;
|
|
4417
|
+
const key = keyBuilderFromType(luvio, body);
|
|
4418
|
+
luvio.storeIngest(key, ingest, body);
|
|
4419
|
+
const snapshot = luvio.storeLookup({
|
|
4420
|
+
recordId: key,
|
|
4421
|
+
node: select(),
|
|
4422
|
+
variables: {},
|
|
4423
|
+
});
|
|
4424
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4425
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4426
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
deepFreeze(snapshot.data);
|
|
4430
|
+
return snapshot;
|
|
4431
|
+
}
|
|
4432
|
+
function createResourceRequest(config) {
|
|
4433
|
+
const headers = {};
|
|
4434
|
+
return {
|
|
4435
|
+
baseUri: '/services/data/v63.0',
|
|
4436
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '/tags',
|
|
4437
|
+
method: 'put',
|
|
4438
|
+
body: config.body,
|
|
4439
|
+
urlParams: config.urlParams,
|
|
4440
|
+
queryParams: {},
|
|
4441
|
+
headers,
|
|
4442
|
+
priority: 'normal',
|
|
4443
|
+
};
|
|
4444
|
+
}
|
|
4445
|
+
|
|
4446
|
+
const adapterName = 'setTags';
|
|
4447
|
+
const setTags_ConfigPropertyMetadata = [
|
|
4448
|
+
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4449
|
+
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4450
|
+
];
|
|
4451
|
+
const setTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, setTags_ConfigPropertyMetadata);
|
|
4452
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$e(setTags_ConfigPropertyMetadata);
|
|
4453
|
+
function typeCheckConfig(untrustedConfig) {
|
|
4454
|
+
const config = {};
|
|
4455
|
+
typeCheckConfig$e(untrustedConfig, config, setTags_ConfigPropertyMetadata);
|
|
4456
|
+
const untrustedConfig_tags = untrustedConfig.tags;
|
|
4457
|
+
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
4458
|
+
const untrustedConfig_tags_object = {};
|
|
4459
|
+
const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
|
|
4460
|
+
for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
|
|
4461
|
+
const key = untrustedConfig_tags_keys[i];
|
|
4462
|
+
const untrustedConfig_tags_prop = untrustedConfig_tags[key];
|
|
4463
|
+
if (untrustedConfig_tags_object !== undefined) {
|
|
4464
|
+
untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
|
+
if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
|
|
4468
|
+
config.tags = untrustedConfig_tags_object;
|
|
4469
|
+
}
|
|
4470
|
+
}
|
|
4471
|
+
return config;
|
|
4472
|
+
}
|
|
4473
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4474
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4475
|
+
return null;
|
|
4476
|
+
}
|
|
4477
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4478
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4479
|
+
}
|
|
4480
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
4481
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4482
|
+
return null;
|
|
4483
|
+
}
|
|
4484
|
+
return config;
|
|
4485
|
+
}
|
|
4486
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
4487
|
+
const resourceParams = createResourceParams(config);
|
|
4488
|
+
const request = createResourceRequest(resourceParams);
|
|
4489
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4490
|
+
.then((response) => {
|
|
4491
|
+
return luvio.handleSuccessResponse(() => {
|
|
4492
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
4493
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4494
|
+
}, () => {
|
|
4495
|
+
const cache = new StoreKeyMap();
|
|
4496
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
4497
|
+
return cache;
|
|
4498
|
+
});
|
|
4499
|
+
}, (response) => {
|
|
4500
|
+
deepFreeze(response);
|
|
4501
|
+
throw response;
|
|
4502
|
+
});
|
|
4503
|
+
}
|
|
4504
|
+
const setTagsAdapterFactory = (luvio) => {
|
|
4505
|
+
return function setTags(untrustedConfig) {
|
|
4506
|
+
const config = validateAdapterConfig(untrustedConfig, setTags_ConfigPropertyNames);
|
|
4507
|
+
// Invalid or incomplete config
|
|
4508
|
+
if (config === null) {
|
|
4509
|
+
throw new Error('Invalid config for "setTags"');
|
|
4510
|
+
}
|
|
4511
|
+
return buildNetworkSnapshot(luvio, config);
|
|
4512
|
+
};
|
|
4513
|
+
};
|
|
4514
|
+
|
|
4515
|
+
export { createAppAdapterFactory, createTemplateAdapterFactory, deleteAppAdapterFactory, getAppActivitiesAdapterFactory, getAppActivityAdapterFactory, getAppAdapterFactory, getAppAssetsAdapterFactory, getAppsAdapterFactory, getInstalledAssetsAdapterFactory, getTagsAdapterFactory, getTemplateAdapterFactory, getTemplateConfigAdapterFactory, getTemplatesAdapterFactory, setTagsAdapterFactory };
|