@salesforce/lds-adapters-analytics-app-framework 1.320.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 +1468 -748
- package/dist/es/es2018/types/src/generated/adapters/createTemplate.d.ts +35 -0
- 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 +3 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +6 -1
- package/dist/es/es2018/types/src/generated/resources/getAppFrameworkTemplatesTagsByTemplateIdOrApiName.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/postAppFrameworkTemplates.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/resources/putAppFrameworkTemplatesTagsByTemplateIdOrApiName.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/TemplateInputRepresentation.d.ts +15 -11
- package/dist/es/es2018/types/src/generated/types/TemplateRepresentation.d.ts +14 -1
- package/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 +1811 -1033
- package/src/raml/api.raml +84 -4
- package/src/raml/luvio.raml +17 -0
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$e, typeCheckConfig as typeCheckConfig$e, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$a } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -122,8 +122,8 @@ function createLink(ref) {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
const VERSION$
|
|
126
|
-
function validate$
|
|
125
|
+
const VERSION$j = "8747a45321deaf63f65cf74537b07eb6";
|
|
126
|
+
function validate$m(obj, path = 'UserRepresentation') {
|
|
127
127
|
const v_error = (() => {
|
|
128
128
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
129
129
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -167,10 +167,10 @@ function validate$f(obj, path = 'UserRepresentation') {
|
|
|
167
167
|
})();
|
|
168
168
|
return v_error === undefined ? null : v_error;
|
|
169
169
|
}
|
|
170
|
-
const select$
|
|
170
|
+
const select$w = function UserRepresentationSelect() {
|
|
171
171
|
return {
|
|
172
172
|
kind: 'Fragment',
|
|
173
|
-
version: VERSION$
|
|
173
|
+
version: VERSION$j,
|
|
174
174
|
private: [],
|
|
175
175
|
selections: [
|
|
176
176
|
{
|
|
@@ -188,7 +188,7 @@ const select$s = function UserRepresentationSelect() {
|
|
|
188
188
|
]
|
|
189
189
|
};
|
|
190
190
|
};
|
|
191
|
-
function equals$
|
|
191
|
+
function equals$g(existing, incoming) {
|
|
192
192
|
const existing_id = existing.id;
|
|
193
193
|
const incoming_id = incoming.id;
|
|
194
194
|
if (!(existing_id === incoming_id)) {
|
|
@@ -207,8 +207,8 @@ function equals$f(existing, incoming) {
|
|
|
207
207
|
return true;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
const VERSION$
|
|
211
|
-
function validate$
|
|
210
|
+
const VERSION$i = "74662b770f974cec987197380f2580ea";
|
|
211
|
+
function validate$l(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
212
212
|
const v_error = (() => {
|
|
213
213
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
214
214
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -227,10 +227,10 @@ function validate$e(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
|
227
227
|
})();
|
|
228
228
|
return v_error === undefined ? null : v_error;
|
|
229
229
|
}
|
|
230
|
-
const select$
|
|
230
|
+
const select$v = function ScheduledTimezoneRepresentationSelect() {
|
|
231
231
|
return {
|
|
232
232
|
kind: 'Fragment',
|
|
233
|
-
version: VERSION$
|
|
233
|
+
version: VERSION$i,
|
|
234
234
|
private: [],
|
|
235
235
|
selections: [
|
|
236
236
|
{
|
|
@@ -248,7 +248,7 @@ const select$r = function ScheduledTimezoneRepresentationSelect() {
|
|
|
248
248
|
]
|
|
249
249
|
};
|
|
250
250
|
};
|
|
251
|
-
function equals$
|
|
251
|
+
function equals$f(existing, incoming) {
|
|
252
252
|
const existing_name = existing.name;
|
|
253
253
|
const incoming_name = incoming.name;
|
|
254
254
|
if (!(existing_name === incoming_name)) {
|
|
@@ -267,8 +267,8 @@ function equals$e(existing, incoming) {
|
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
const VERSION$
|
|
271
|
-
function validate$
|
|
270
|
+
const VERSION$h = "d96bf6818be64d5924beaaad8e684221";
|
|
271
|
+
function validate$k(obj, path = 'ScheduledTimeRepresentation') {
|
|
272
272
|
const v_error = (() => {
|
|
273
273
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
274
274
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -285,7 +285,7 @@ function validate$d(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
285
285
|
}
|
|
286
286
|
const obj_timezone = obj.timezone;
|
|
287
287
|
const path_timezone = path + '.timezone';
|
|
288
|
-
const referencepath_timezoneValidationError = validate$
|
|
288
|
+
const referencepath_timezoneValidationError = validate$l(obj_timezone, path_timezone);
|
|
289
289
|
if (referencepath_timezoneValidationError !== null) {
|
|
290
290
|
let message = 'Object doesn\'t match ScheduledTimezoneRepresentation (at "' + path_timezone + '")\n';
|
|
291
291
|
message += referencepath_timezoneValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -294,11 +294,11 @@ function validate$d(obj, path = 'ScheduledTimeRepresentation') {
|
|
|
294
294
|
})();
|
|
295
295
|
return v_error === undefined ? null : v_error;
|
|
296
296
|
}
|
|
297
|
-
const select$
|
|
298
|
-
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$
|
|
297
|
+
const select$u = function ScheduledTimeRepresentationSelect() {
|
|
298
|
+
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$v();
|
|
299
299
|
return {
|
|
300
300
|
kind: 'Fragment',
|
|
301
|
-
version: VERSION$
|
|
301
|
+
version: VERSION$h,
|
|
302
302
|
private: [],
|
|
303
303
|
selections: [
|
|
304
304
|
{
|
|
@@ -317,7 +317,7 @@ const select$q = function ScheduledTimeRepresentationSelect() {
|
|
|
317
317
|
]
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
|
-
function equals$
|
|
320
|
+
function equals$e(existing, incoming) {
|
|
321
321
|
const existing_hour = existing.hour;
|
|
322
322
|
const incoming_hour = incoming.hour;
|
|
323
323
|
if (!(existing_hour === incoming_hour)) {
|
|
@@ -330,18 +330,18 @@ function equals$d(existing, incoming) {
|
|
|
330
330
|
}
|
|
331
331
|
const existing_timezone = existing.timezone;
|
|
332
332
|
const incoming_timezone = incoming.timezone;
|
|
333
|
-
if (!(equals$
|
|
333
|
+
if (!(equals$f(existing_timezone, incoming_timezone))) {
|
|
334
334
|
return false;
|
|
335
335
|
}
|
|
336
336
|
return true;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
const VERSION$
|
|
340
|
-
const select$
|
|
341
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
339
|
+
const VERSION$g = "91838b86aa135ce828af6242b11ae888";
|
|
340
|
+
const select$t = function HourlyScheduledItemRepresentationSelect() {
|
|
341
|
+
const { selections: ScheduledItemRepresentationSelections } = select$q();
|
|
342
342
|
return {
|
|
343
343
|
kind: 'Fragment',
|
|
344
|
-
version: VERSION$
|
|
344
|
+
version: VERSION$g,
|
|
345
345
|
private: [],
|
|
346
346
|
selections: [
|
|
347
347
|
...ScheduledItemRepresentationSelections,
|
|
@@ -358,12 +358,12 @@ const select$p = function HourlyScheduledItemRepresentationSelect() {
|
|
|
358
358
|
};
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
const VERSION$
|
|
362
|
-
const select$
|
|
363
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
361
|
+
const VERSION$f = "46260a34f0b2c2d7adc7f8c150a8d8fb";
|
|
362
|
+
const select$s = function WeeklyScheduledItemRepresentationSelect() {
|
|
363
|
+
const { selections: ScheduledItemRepresentationSelections } = select$q();
|
|
364
364
|
return {
|
|
365
365
|
kind: 'Fragment',
|
|
366
|
-
version: VERSION$
|
|
366
|
+
version: VERSION$f,
|
|
367
367
|
private: [],
|
|
368
368
|
selections: [
|
|
369
369
|
...ScheduledItemRepresentationSelections,
|
|
@@ -376,12 +376,12 @@ const select$o = function WeeklyScheduledItemRepresentationSelect() {
|
|
|
376
376
|
};
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
const VERSION$
|
|
380
|
-
const select$
|
|
381
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
379
|
+
const VERSION$e = "dcda6d015a01d9acde5fac241448cfe4";
|
|
380
|
+
const select$r = function DailyScheduledItemRepresentationSelect() {
|
|
381
|
+
const { selections: ScheduledItemRepresentationSelections } = select$q();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$e,
|
|
385
385
|
private: [],
|
|
386
386
|
selections: [
|
|
387
387
|
...ScheduledItemRepresentationSelections,
|
|
@@ -395,8 +395,8 @@ var DiscriminatorValues;
|
|
|
395
395
|
DiscriminatorValues["Weekly"] = "Weekly";
|
|
396
396
|
DiscriminatorValues["Daily"] = "Daily";
|
|
397
397
|
})(DiscriminatorValues || (DiscriminatorValues = {}));
|
|
398
|
-
const VERSION$
|
|
399
|
-
function validate$
|
|
398
|
+
const VERSION$d = "193484b4261ca5840b61caaab3dea067";
|
|
399
|
+
function validate$j(obj, path = 'ScheduledItemRepresentation') {
|
|
400
400
|
const v_error = (() => {
|
|
401
401
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
402
402
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -413,7 +413,7 @@ function validate$c(obj, path = 'ScheduledItemRepresentation') {
|
|
|
413
413
|
}
|
|
414
414
|
const obj_time = obj.time;
|
|
415
415
|
const path_time = path + '.time';
|
|
416
|
-
const referencepath_timeValidationError = validate$
|
|
416
|
+
const referencepath_timeValidationError = validate$k(obj_time, path_time);
|
|
417
417
|
if (referencepath_timeValidationError !== null) {
|
|
418
418
|
let message = 'Object doesn\'t match ScheduledTimeRepresentation (at "' + path_time + '")\n';
|
|
419
419
|
message += referencepath_timeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -423,9 +423,9 @@ function validate$c(obj, path = 'ScheduledItemRepresentation') {
|
|
|
423
423
|
return v_error === undefined ? null : v_error;
|
|
424
424
|
}
|
|
425
425
|
const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
426
|
-
const hourlyScheduledItemRepresentationSelections = select$
|
|
427
|
-
const weeklyScheduledItemRepresentationSelections = select$
|
|
428
|
-
const dailyScheduledItemRepresentationSelections = select$
|
|
426
|
+
const hourlyScheduledItemRepresentationSelections = select$t();
|
|
427
|
+
const weeklyScheduledItemRepresentationSelections = select$s();
|
|
428
|
+
const dailyScheduledItemRepresentationSelections = select$r();
|
|
429
429
|
return {
|
|
430
430
|
kind: 'Fragment',
|
|
431
431
|
union: true,
|
|
@@ -437,11 +437,11 @@ const selectChildren = function ScheduledItemRepresentationSelectChildren() {
|
|
|
437
437
|
}
|
|
438
438
|
};
|
|
439
439
|
};
|
|
440
|
-
const select$
|
|
441
|
-
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$
|
|
440
|
+
const select$q = function ScheduledItemRepresentationSelect() {
|
|
441
|
+
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$u();
|
|
442
442
|
return {
|
|
443
443
|
kind: 'Fragment',
|
|
444
|
-
version: VERSION$
|
|
444
|
+
version: VERSION$d,
|
|
445
445
|
private: [],
|
|
446
446
|
selections: [
|
|
447
447
|
{
|
|
@@ -460,7 +460,7 @@ const select$m = function ScheduledItemRepresentationSelect() {
|
|
|
460
460
|
]
|
|
461
461
|
};
|
|
462
462
|
};
|
|
463
|
-
function equals$
|
|
463
|
+
function equals$d(existing, incoming) {
|
|
464
464
|
const existing_frequency = existing.frequency;
|
|
465
465
|
const incoming_frequency = incoming.frequency;
|
|
466
466
|
if (!(existing_frequency === incoming_frequency)) {
|
|
@@ -473,14 +473,14 @@ function equals$c(existing, incoming) {
|
|
|
473
473
|
}
|
|
474
474
|
const existing_time = existing.time;
|
|
475
475
|
const incoming_time = incoming.time;
|
|
476
|
-
if (!(equals$
|
|
476
|
+
if (!(equals$e(existing_time, incoming_time))) {
|
|
477
477
|
return false;
|
|
478
478
|
}
|
|
479
479
|
return true;
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
const VERSION$
|
|
483
|
-
function validate$
|
|
482
|
+
const VERSION$c = "06b5da5162febff2692d819c9b718be5";
|
|
483
|
+
function validate$i(obj, path = 'AppScheduleRepresentation') {
|
|
484
484
|
const v_error = (() => {
|
|
485
485
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
486
486
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -489,7 +489,7 @@ function validate$b(obj, path = 'AppScheduleRepresentation') {
|
|
|
489
489
|
const path_dataRefreshSchedule = path + '.dataRefreshSchedule';
|
|
490
490
|
let obj_dataRefreshSchedule_union0 = null;
|
|
491
491
|
const obj_dataRefreshSchedule_union0_error = (() => {
|
|
492
|
-
const referencepath_dataRefreshScheduleValidationError = validate$
|
|
492
|
+
const referencepath_dataRefreshScheduleValidationError = validate$j(obj_dataRefreshSchedule, path_dataRefreshSchedule);
|
|
493
493
|
if (referencepath_dataRefreshScheduleValidationError !== null) {
|
|
494
494
|
let message = 'Object doesn\'t match ScheduledItemRepresentation (at "' + path_dataRefreshSchedule + '")\n';
|
|
495
495
|
message += referencepath_dataRefreshScheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -543,11 +543,11 @@ function validate$b(obj, path = 'AppScheduleRepresentation') {
|
|
|
543
543
|
})();
|
|
544
544
|
return v_error === undefined ? null : v_error;
|
|
545
545
|
}
|
|
546
|
-
const select$
|
|
546
|
+
const select$p = function AppScheduleRepresentationSelect() {
|
|
547
547
|
const ScheduledItemRepresentation__unionSelections = selectChildren();
|
|
548
548
|
return {
|
|
549
549
|
kind: 'Fragment',
|
|
550
|
-
version: VERSION$
|
|
550
|
+
version: VERSION$c,
|
|
551
551
|
private: [],
|
|
552
552
|
selections: [
|
|
553
553
|
{
|
|
@@ -565,13 +565,13 @@ const select$l = function AppScheduleRepresentationSelect() {
|
|
|
565
565
|
]
|
|
566
566
|
};
|
|
567
567
|
};
|
|
568
|
-
function equals$
|
|
568
|
+
function equals$c(existing, incoming) {
|
|
569
569
|
const existing_dataRefreshSchedule = existing.dataRefreshSchedule;
|
|
570
570
|
const incoming_dataRefreshSchedule = incoming.dataRefreshSchedule;
|
|
571
571
|
if (!(existing_dataRefreshSchedule === incoming_dataRefreshSchedule
|
|
572
572
|
|| (existing_dataRefreshSchedule != null &&
|
|
573
573
|
incoming_dataRefreshSchedule != null &&
|
|
574
|
-
equals$
|
|
574
|
+
equals$d(existing_dataRefreshSchedule, incoming_dataRefreshSchedule)))) {
|
|
575
575
|
return false;
|
|
576
576
|
}
|
|
577
577
|
const existing_url = existing.url;
|
|
@@ -582,9 +582,9 @@ function equals$b(existing, incoming) {
|
|
|
582
582
|
return true;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
const TTL$
|
|
586
|
-
const VERSION$
|
|
587
|
-
function validate$
|
|
585
|
+
const TTL$b = 5000;
|
|
586
|
+
const VERSION$b = "be6294bb853a9581fb3b06a2d8caa5d5";
|
|
587
|
+
function validate$h(obj, path = 'AppRepresentation') {
|
|
588
588
|
const v_error = (() => {
|
|
589
589
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
590
590
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -606,7 +606,7 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
606
606
|
}
|
|
607
607
|
const obj_createdBy = obj.createdBy;
|
|
608
608
|
const path_createdBy = path + '.createdBy';
|
|
609
|
-
const referencepath_createdByValidationError = validate$
|
|
609
|
+
const referencepath_createdByValidationError = validate$m(obj_createdBy, path_createdBy);
|
|
610
610
|
if (referencepath_createdByValidationError !== null) {
|
|
611
611
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_createdBy + '")\n';
|
|
612
612
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -660,7 +660,7 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
660
660
|
}
|
|
661
661
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
662
662
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
663
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
663
|
+
const referencepath_lastModifiedByValidationError = validate$m(obj_lastModifiedBy, path_lastModifiedBy);
|
|
664
664
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
665
665
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
666
666
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -685,7 +685,7 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
685
685
|
const path_schedule = path + '.schedule';
|
|
686
686
|
let obj_schedule_union0 = null;
|
|
687
687
|
const obj_schedule_union0_error = (() => {
|
|
688
|
-
const referencepath_scheduleValidationError = validate$
|
|
688
|
+
const referencepath_scheduleValidationError = validate$i(obj_schedule, path_schedule);
|
|
689
689
|
if (referencepath_scheduleValidationError !== null) {
|
|
690
690
|
let message = 'Object doesn\'t match AppScheduleRepresentation (at "' + path_schedule + '")\n';
|
|
691
691
|
message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -747,25 +747,25 @@ function validate$a(obj, path = 'AppRepresentation') {
|
|
|
747
747
|
})();
|
|
748
748
|
return v_error === undefined ? null : v_error;
|
|
749
749
|
}
|
|
750
|
-
const RepresentationType$
|
|
751
|
-
function keyBuilder$
|
|
752
|
-
return keyPrefix + '::' + RepresentationType$
|
|
750
|
+
const RepresentationType$b = 'AppRepresentation';
|
|
751
|
+
function keyBuilder$t(luvio, config) {
|
|
752
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.id;
|
|
753
753
|
}
|
|
754
|
-
function keyBuilderFromType$
|
|
754
|
+
function keyBuilderFromType$8(luvio, object) {
|
|
755
755
|
const keyParams = {
|
|
756
756
|
id: object.id
|
|
757
757
|
};
|
|
758
|
-
return keyBuilder$
|
|
758
|
+
return keyBuilder$t(luvio, keyParams);
|
|
759
759
|
}
|
|
760
|
-
function normalize$
|
|
760
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
761
761
|
return input;
|
|
762
762
|
}
|
|
763
|
-
const select$
|
|
764
|
-
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$
|
|
765
|
-
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$
|
|
763
|
+
const select$o = function AppRepresentationSelect() {
|
|
764
|
+
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$w();
|
|
765
|
+
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$p();
|
|
766
766
|
return {
|
|
767
767
|
kind: 'Fragment',
|
|
768
|
-
version: VERSION$
|
|
768
|
+
version: VERSION$b,
|
|
769
769
|
private: [],
|
|
770
770
|
selections: [
|
|
771
771
|
{
|
|
@@ -852,7 +852,7 @@ const select$k = function AppRepresentationSelect() {
|
|
|
852
852
|
]
|
|
853
853
|
};
|
|
854
854
|
};
|
|
855
|
-
function equals$
|
|
855
|
+
function equals$b(existing, incoming) {
|
|
856
856
|
const existing_activitiesUrl = existing.activitiesUrl;
|
|
857
857
|
const incoming_activitiesUrl = incoming.activitiesUrl;
|
|
858
858
|
if (!(existing_activitiesUrl === incoming_activitiesUrl)) {
|
|
@@ -925,7 +925,7 @@ function equals$a(existing, incoming) {
|
|
|
925
925
|
}
|
|
926
926
|
const existing_createdBy = existing.createdBy;
|
|
927
927
|
const incoming_createdBy = incoming.createdBy;
|
|
928
|
-
if (!(equals$
|
|
928
|
+
if (!(equals$g(existing_createdBy, incoming_createdBy))) {
|
|
929
929
|
return false;
|
|
930
930
|
}
|
|
931
931
|
const existing_description = existing.description;
|
|
@@ -935,7 +935,7 @@ function equals$a(existing, incoming) {
|
|
|
935
935
|
}
|
|
936
936
|
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
937
937
|
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
938
|
-
if (!(equals$
|
|
938
|
+
if (!(equals$g(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
939
939
|
return false;
|
|
940
940
|
}
|
|
941
941
|
const existing_schedule = existing.schedule;
|
|
@@ -943,7 +943,7 @@ function equals$a(existing, incoming) {
|
|
|
943
943
|
if (!(existing_schedule === incoming_schedule
|
|
944
944
|
|| (existing_schedule != null &&
|
|
945
945
|
incoming_schedule != null &&
|
|
946
|
-
equals$
|
|
946
|
+
equals$c(existing_schedule, incoming_schedule)))) {
|
|
947
947
|
return false;
|
|
948
948
|
}
|
|
949
949
|
const existing_templateValues = existing.templateValues;
|
|
@@ -958,31 +958,31 @@ function equals$a(existing, incoming) {
|
|
|
958
958
|
}
|
|
959
959
|
return true;
|
|
960
960
|
}
|
|
961
|
-
const ingest$
|
|
961
|
+
const ingest$b = function AppRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
962
962
|
if (process.env.NODE_ENV !== 'production') {
|
|
963
|
-
const validateError = validate$
|
|
963
|
+
const validateError = validate$h(input);
|
|
964
964
|
if (validateError !== null) {
|
|
965
965
|
throw validateError;
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
const key = keyBuilderFromType$
|
|
969
|
-
const ttlToUse = TTL$
|
|
970
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
968
|
+
const key = keyBuilderFromType$8(luvio, input);
|
|
969
|
+
const ttlToUse = TTL$b;
|
|
970
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "AppFramework", VERSION$b, RepresentationType$b, equals$b);
|
|
971
971
|
return createLink(key);
|
|
972
972
|
};
|
|
973
|
-
function getTypeCacheKeys$
|
|
973
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
974
974
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
975
|
-
const rootKey = keyBuilderFromType$
|
|
975
|
+
const rootKey = keyBuilderFromType$8(luvio, input);
|
|
976
976
|
rootKeySet.set(rootKey, {
|
|
977
977
|
namespace: keyPrefix,
|
|
978
|
-
representationName: RepresentationType$
|
|
978
|
+
representationName: RepresentationType$b,
|
|
979
979
|
mergeable: false
|
|
980
980
|
});
|
|
981
981
|
}
|
|
982
982
|
|
|
983
|
-
const TTL$
|
|
984
|
-
const VERSION$
|
|
985
|
-
function validate$
|
|
983
|
+
const TTL$a = 5000;
|
|
984
|
+
const VERSION$a = "1e01d8ae397bfbae02ba4cfae1dac4fc";
|
|
985
|
+
function validate$g(obj, path = 'AppResultRepresentation') {
|
|
986
986
|
const v_error = (() => {
|
|
987
987
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
988
988
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1040,20 +1040,20 @@ function validate$9(obj, path = 'AppResultRepresentation') {
|
|
|
1040
1040
|
})();
|
|
1041
1041
|
return v_error === undefined ? null : v_error;
|
|
1042
1042
|
}
|
|
1043
|
-
const RepresentationType$
|
|
1044
|
-
function keyBuilder$
|
|
1045
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1043
|
+
const RepresentationType$a = 'AppResultRepresentation';
|
|
1044
|
+
function keyBuilder$s(luvio, config) {
|
|
1045
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.id;
|
|
1046
1046
|
}
|
|
1047
|
-
function keyBuilderFromType$
|
|
1047
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
1048
1048
|
const keyParams = {
|
|
1049
1049
|
id: object.app.id
|
|
1050
1050
|
};
|
|
1051
|
-
return keyBuilder$
|
|
1051
|
+
return keyBuilder$s(luvio, keyParams);
|
|
1052
1052
|
}
|
|
1053
|
-
function normalize$
|
|
1053
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
1054
1054
|
const input_app = input.app;
|
|
1055
1055
|
const input_app_id = path.fullPath + '__app';
|
|
1056
|
-
input.app = ingest$
|
|
1056
|
+
input.app = ingest$b(input_app, {
|
|
1057
1057
|
fullPath: input_app_id,
|
|
1058
1058
|
propertyName: 'app',
|
|
1059
1059
|
parent: {
|
|
@@ -1065,16 +1065,16 @@ function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
|
1065
1065
|
}, luvio, store, timestamp);
|
|
1066
1066
|
return input;
|
|
1067
1067
|
}
|
|
1068
|
-
const select$
|
|
1068
|
+
const select$n = function AppResultRepresentationSelect() {
|
|
1069
1069
|
return {
|
|
1070
1070
|
kind: 'Fragment',
|
|
1071
|
-
version: VERSION$
|
|
1071
|
+
version: VERSION$a,
|
|
1072
1072
|
private: [],
|
|
1073
1073
|
selections: [
|
|
1074
1074
|
{
|
|
1075
1075
|
name: 'app',
|
|
1076
1076
|
kind: 'Link',
|
|
1077
|
-
fragment: select$
|
|
1077
|
+
fragment: select$o()
|
|
1078
1078
|
},
|
|
1079
1079
|
{
|
|
1080
1080
|
name: 'failureMessage',
|
|
@@ -1092,7 +1092,7 @@ const select$j = function AppResultRepresentationSelect() {
|
|
|
1092
1092
|
]
|
|
1093
1093
|
};
|
|
1094
1094
|
};
|
|
1095
|
-
function equals$
|
|
1095
|
+
function equals$a(existing, incoming) {
|
|
1096
1096
|
const existing_runtimeRequestId = existing.runtimeRequestId;
|
|
1097
1097
|
const incoming_runtimeRequestId = incoming.runtimeRequestId;
|
|
1098
1098
|
if (!(existing_runtimeRequestId === incoming_runtimeRequestId)) {
|
|
@@ -1120,42 +1120,42 @@ function equals$9(existing, incoming) {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
return true;
|
|
1122
1122
|
}
|
|
1123
|
-
const ingest$
|
|
1123
|
+
const ingest$a = function AppResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1124
1124
|
if (process.env.NODE_ENV !== 'production') {
|
|
1125
|
-
const validateError = validate$
|
|
1125
|
+
const validateError = validate$g(input);
|
|
1126
1126
|
if (validateError !== null) {
|
|
1127
1127
|
throw validateError;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
const key = keyBuilderFromType$
|
|
1131
|
-
const ttlToUse = TTL$
|
|
1132
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1130
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
1131
|
+
const ttlToUse = TTL$a;
|
|
1132
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "AppFramework", VERSION$a, RepresentationType$a, equals$a);
|
|
1133
1133
|
return createLink(key);
|
|
1134
1134
|
};
|
|
1135
|
-
function getTypeCacheKeys$
|
|
1135
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
1136
1136
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1137
|
-
const rootKey = keyBuilderFromType$
|
|
1137
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
1138
1138
|
rootKeySet.set(rootKey, {
|
|
1139
1139
|
namespace: keyPrefix,
|
|
1140
|
-
representationName: RepresentationType$
|
|
1140
|
+
representationName: RepresentationType$a,
|
|
1141
1141
|
mergeable: false
|
|
1142
1142
|
});
|
|
1143
|
-
getTypeCacheKeys$
|
|
1143
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.app);
|
|
1144
1144
|
}
|
|
1145
1145
|
|
|
1146
|
-
function select$
|
|
1147
|
-
return select$
|
|
1146
|
+
function select$m(luvio, params) {
|
|
1147
|
+
return select$n();
|
|
1148
1148
|
}
|
|
1149
|
-
function getResponseCacheKeys$
|
|
1150
|
-
getTypeCacheKeys$
|
|
1149
|
+
function getResponseCacheKeys$d(storeKeyMap, luvio, resourceParams, response) {
|
|
1150
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
1151
1151
|
}
|
|
1152
|
-
function ingestSuccess$
|
|
1152
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
1153
1153
|
const { body } = response;
|
|
1154
|
-
const key = keyBuilderFromType$
|
|
1155
|
-
luvio.storeIngest(key, ingest$
|
|
1154
|
+
const key = keyBuilderFromType$7(luvio, body);
|
|
1155
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1156
1156
|
const snapshot = luvio.storeLookup({
|
|
1157
1157
|
recordId: key,
|
|
1158
|
-
node: select$
|
|
1158
|
+
node: select$m(),
|
|
1159
1159
|
variables: {},
|
|
1160
1160
|
});
|
|
1161
1161
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1166,7 +1166,7 @@ function ingestSuccess$9(luvio, resourceParams, response) {
|
|
|
1166
1166
|
deepFreeze(snapshot.data);
|
|
1167
1167
|
return snapshot;
|
|
1168
1168
|
}
|
|
1169
|
-
function createResourceRequest$
|
|
1169
|
+
function createResourceRequest$d(config) {
|
|
1170
1170
|
const headers = {};
|
|
1171
1171
|
return {
|
|
1172
1172
|
baseUri: '/services/data/v63.0',
|
|
@@ -1180,7 +1180,7 @@ function createResourceRequest$a(config) {
|
|
|
1180
1180
|
};
|
|
1181
1181
|
}
|
|
1182
1182
|
|
|
1183
|
-
const adapterName$
|
|
1183
|
+
const adapterName$d = 'createApp';
|
|
1184
1184
|
const createApp_ConfigPropertyMetadata = [
|
|
1185
1185
|
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1186
1186
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -1193,11 +1193,11 @@ const createApp_ConfigPropertyMetadata = [
|
|
|
1193
1193
|
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1194
1194
|
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1195
1195
|
];
|
|
1196
|
-
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1197
|
-
const createResourceParams$
|
|
1198
|
-
function typeCheckConfig$
|
|
1196
|
+
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, createApp_ConfigPropertyMetadata);
|
|
1197
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$e(createApp_ConfigPropertyMetadata);
|
|
1198
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
1199
1199
|
const config = {};
|
|
1200
|
-
typeCheckConfig$
|
|
1200
|
+
typeCheckConfig$e(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1201
1201
|
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1202
1202
|
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1203
1203
|
const untrustedConfig_templateValues_object = {};
|
|
@@ -1215,30 +1215,30 @@ function typeCheckConfig$a(untrustedConfig) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
return config;
|
|
1217
1217
|
}
|
|
1218
|
-
function validateAdapterConfig$
|
|
1218
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
1219
1219
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1220
1220
|
return null;
|
|
1221
1221
|
}
|
|
1222
1222
|
if (process.env.NODE_ENV !== 'production') {
|
|
1223
1223
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1224
1224
|
}
|
|
1225
|
-
const config = typeCheckConfig$
|
|
1225
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
1226
1226
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1227
1227
|
return null;
|
|
1228
1228
|
}
|
|
1229
1229
|
return config;
|
|
1230
1230
|
}
|
|
1231
|
-
function buildNetworkSnapshot$
|
|
1232
|
-
const resourceParams = createResourceParams$
|
|
1233
|
-
const request = createResourceRequest$
|
|
1231
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
1232
|
+
const resourceParams = createResourceParams$d(config);
|
|
1233
|
+
const request = createResourceRequest$d(resourceParams);
|
|
1234
1234
|
return luvio.dispatchResourceRequest(request, options)
|
|
1235
1235
|
.then((response) => {
|
|
1236
1236
|
return luvio.handleSuccessResponse(() => {
|
|
1237
|
-
const snapshot = ingestSuccess$
|
|
1237
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
1238
1238
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1239
1239
|
}, () => {
|
|
1240
1240
|
const cache = new StoreKeyMap();
|
|
1241
|
-
getResponseCacheKeys$
|
|
1241
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams, response.body);
|
|
1242
1242
|
return cache;
|
|
1243
1243
|
});
|
|
1244
1244
|
}, (response) => {
|
|
@@ -1248,140 +1248,690 @@ function buildNetworkSnapshot$a(luvio, config, options) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
const createAppAdapterFactory = (luvio) => {
|
|
1250
1250
|
return function createApp(untrustedConfig) {
|
|
1251
|
-
const config = validateAdapterConfig$
|
|
1251
|
+
const config = validateAdapterConfig$d(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1252
1252
|
// Invalid or incomplete config
|
|
1253
1253
|
if (config === null) {
|
|
1254
1254
|
throw new Error('Invalid config for "createApp"');
|
|
1255
1255
|
}
|
|
1256
|
-
return buildNetworkSnapshot$
|
|
1256
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
1257
1257
|
};
|
|
1258
1258
|
};
|
|
1259
1259
|
|
|
1260
|
-
function
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
urlParams: config.urlParams,
|
|
1285
|
-
queryParams: {},
|
|
1286
|
-
headers,
|
|
1287
|
-
priority: 'normal',
|
|
1288
|
-
};
|
|
1260
|
+
function validate$f(obj, path = 'ChainDefinitionInputRepresentation') {
|
|
1261
|
+
const v_error = (() => {
|
|
1262
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1263
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1264
|
+
}
|
|
1265
|
+
const obj_file = obj.file;
|
|
1266
|
+
const path_file = path + '.file';
|
|
1267
|
+
if (typeof obj_file !== 'string') {
|
|
1268
|
+
return new TypeError('Expected "string" but received "' + typeof obj_file + '" (at "' + path_file + '")');
|
|
1269
|
+
}
|
|
1270
|
+
if (obj.name !== undefined) {
|
|
1271
|
+
const obj_name = obj.name;
|
|
1272
|
+
const path_name = path + '.name';
|
|
1273
|
+
if (typeof obj_name !== 'string') {
|
|
1274
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
const obj_type = obj.type;
|
|
1278
|
+
const path_type = path + '.type';
|
|
1279
|
+
if (typeof obj_type !== 'string') {
|
|
1280
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1281
|
+
}
|
|
1282
|
+
})();
|
|
1283
|
+
return v_error === undefined ? null : v_error;
|
|
1289
1284
|
}
|
|
1290
1285
|
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteApp_ConfigPropertyMetadata);
|
|
1296
|
-
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$b(deleteApp_ConfigPropertyMetadata);
|
|
1297
|
-
function typeCheckConfig$9(untrustedConfig) {
|
|
1298
|
-
const config = {};
|
|
1299
|
-
typeCheckConfig$b(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1300
|
-
return config;
|
|
1301
|
-
}
|
|
1302
|
-
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1303
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
1304
|
-
return null;
|
|
1305
|
-
}
|
|
1306
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1307
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
1308
|
-
}
|
|
1309
|
-
const config = typeCheckConfig$9(untrustedConfig);
|
|
1310
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1311
|
-
return null;
|
|
1312
|
-
}
|
|
1313
|
-
return config;
|
|
1314
|
-
}
|
|
1315
|
-
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1316
|
-
const resourceParams = createResourceParams$9(config);
|
|
1317
|
-
const request = createResourceRequest$9(resourceParams);
|
|
1318
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
1319
|
-
.then(() => {
|
|
1320
|
-
return luvio.handleSuccessResponse(() => {
|
|
1321
|
-
evictSuccess(luvio, resourceParams);
|
|
1322
|
-
return luvio.storeBroadcast();
|
|
1323
|
-
}, () => {
|
|
1324
|
-
const cache = new StoreKeyMap();
|
|
1325
|
-
getResponseCacheKeys$9(cache, luvio, resourceParams);
|
|
1326
|
-
return cache;
|
|
1327
|
-
});
|
|
1328
|
-
}, (response) => {
|
|
1329
|
-
deepFreeze(response);
|
|
1330
|
-
throw response;
|
|
1331
|
-
});
|
|
1332
|
-
}
|
|
1333
|
-
const deleteAppAdapterFactory = (luvio) => {
|
|
1334
|
-
return function AppFrameworkdeleteApp(untrustedConfig) {
|
|
1335
|
-
const config = validateAdapterConfig$9(untrustedConfig, deleteApp_ConfigPropertyNames);
|
|
1336
|
-
// Invalid or incomplete config
|
|
1337
|
-
if (config === null) {
|
|
1338
|
-
throw new Error(`Invalid config for "${adapterName$9}"`);
|
|
1286
|
+
function validate$e(obj, path = 'NamespacedReferenceInputRepresentation') {
|
|
1287
|
+
const v_error = (() => {
|
|
1288
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1289
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1339
1290
|
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1291
|
+
const obj_name = obj.name;
|
|
1292
|
+
const path_name = path + '.name';
|
|
1293
|
+
if (typeof obj_name !== 'string') {
|
|
1294
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1295
|
+
}
|
|
1296
|
+
const obj_namespace = obj.namespace;
|
|
1297
|
+
const path_namespace = path + '.namespace';
|
|
1298
|
+
if (typeof obj_namespace !== 'string') {
|
|
1299
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1300
|
+
}
|
|
1301
|
+
})();
|
|
1302
|
+
return v_error === undefined ? null : v_error;
|
|
1303
|
+
}
|
|
1343
1304
|
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1305
|
+
function validate$d(obj, path = 'TemplatePreviewInputRepresentation') {
|
|
1306
|
+
const v_error = (() => {
|
|
1307
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1308
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1309
|
+
}
|
|
1310
|
+
if (obj.description !== undefined) {
|
|
1311
|
+
const obj_description = obj.description;
|
|
1312
|
+
const path_description = path + '.description';
|
|
1313
|
+
if (typeof obj_description !== 'string') {
|
|
1314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
const obj_label = obj.label;
|
|
1318
|
+
const path_label = path + '.label';
|
|
1319
|
+
if (typeof obj_label !== 'string') {
|
|
1320
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1321
|
+
}
|
|
1322
|
+
const obj_name = obj.name;
|
|
1323
|
+
const path_name = path + '.name';
|
|
1324
|
+
if (typeof obj_name !== 'string') {
|
|
1325
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1326
|
+
}
|
|
1327
|
+
if (obj.namespace !== undefined) {
|
|
1328
|
+
const obj_namespace = obj.namespace;
|
|
1329
|
+
const path_namespace = path + '.namespace';
|
|
1330
|
+
if (typeof obj_namespace !== 'string') {
|
|
1331
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespace + '" (at "' + path_namespace + '")');
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
})();
|
|
1335
|
+
return v_error === undefined ? null : v_error;
|
|
1346
1336
|
}
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1337
|
+
|
|
1338
|
+
function validate$c(obj, path = 'TemplateIconsInputRepresentation') {
|
|
1339
|
+
const v_error = (() => {
|
|
1340
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1341
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1342
|
+
}
|
|
1343
|
+
if (obj.appBadge !== undefined) {
|
|
1344
|
+
const obj_appBadge = obj.appBadge;
|
|
1345
|
+
const path_appBadge = path + '.appBadge';
|
|
1346
|
+
const referencepath_appBadgeValidationError = validate$e(obj_appBadge, path_appBadge);
|
|
1347
|
+
if (referencepath_appBadgeValidationError !== null) {
|
|
1348
|
+
let message = 'Object doesn\'t match NamespacedReferenceInputRepresentation (at "' + path_appBadge + '")\n';
|
|
1349
|
+
message += referencepath_appBadgeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1350
|
+
return new TypeError(message);
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
if (obj.templateBadge !== undefined) {
|
|
1354
|
+
const obj_templateBadge = obj.templateBadge;
|
|
1355
|
+
const path_templateBadge = path + '.templateBadge';
|
|
1356
|
+
const referencepath_templateBadgeValidationError = validate$e(obj_templateBadge, path_templateBadge);
|
|
1357
|
+
if (referencepath_templateBadgeValidationError !== null) {
|
|
1358
|
+
let message = 'Object doesn\'t match NamespacedReferenceInputRepresentation (at "' + path_templateBadge + '")\n';
|
|
1359
|
+
message += referencepath_templateBadgeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1360
|
+
return new TypeError(message);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
if (obj.templatePreviews !== undefined) {
|
|
1364
|
+
const obj_templatePreviews = obj.templatePreviews;
|
|
1365
|
+
const path_templatePreviews = path + '.templatePreviews';
|
|
1366
|
+
if (!ArrayIsArray(obj_templatePreviews)) {
|
|
1367
|
+
return new TypeError('Expected "array" but received "' + typeof obj_templatePreviews + '" (at "' + path_templatePreviews + '")');
|
|
1368
|
+
}
|
|
1369
|
+
for (let i = 0; i < obj_templatePreviews.length; i++) {
|
|
1370
|
+
const obj_templatePreviews_item = obj_templatePreviews[i];
|
|
1371
|
+
const path_templatePreviews_item = path_templatePreviews + '[' + i + ']';
|
|
1372
|
+
const referencepath_templatePreviews_itemValidationError = validate$d(obj_templatePreviews_item, path_templatePreviews_item);
|
|
1373
|
+
if (referencepath_templatePreviews_itemValidationError !== null) {
|
|
1374
|
+
let message = 'Object doesn\'t match TemplatePreviewInputRepresentation (at "' + path_templatePreviews_item + '")\n';
|
|
1375
|
+
message += referencepath_templatePreviews_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1376
|
+
return new TypeError(message);
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
})();
|
|
1381
|
+
return v_error === undefined ? null : v_error;
|
|
1351
1382
|
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1383
|
+
|
|
1384
|
+
function validate$b(obj, path = 'ReleaseInfoInputRepresentation') {
|
|
1385
|
+
const v_error = (() => {
|
|
1386
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1387
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1388
|
+
}
|
|
1389
|
+
if (obj.notesFile !== undefined) {
|
|
1390
|
+
const obj_notesFile = obj.notesFile;
|
|
1391
|
+
const path_notesFile = path + '.notesFile';
|
|
1392
|
+
if (typeof obj_notesFile !== 'string') {
|
|
1393
|
+
return new TypeError('Expected "string" but received "' + typeof obj_notesFile + '" (at "' + path_notesFile + '")');
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const obj_templateVersion = obj.templateVersion;
|
|
1397
|
+
const path_templateVersion = path + '.templateVersion';
|
|
1398
|
+
if (typeof obj_templateVersion !== 'string') {
|
|
1399
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateVersion + '" (at "' + path_templateVersion + '")');
|
|
1400
|
+
}
|
|
1401
|
+
})();
|
|
1402
|
+
return v_error === undefined ? null : v_error;
|
|
1354
1403
|
}
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
recordId: key,
|
|
1361
|
-
node: select$h(),
|
|
1362
|
-
variables: {},
|
|
1363
|
-
}, snapshotRefresh);
|
|
1364
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1365
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
1366
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1404
|
+
|
|
1405
|
+
function validate$a(obj, path = 'RuleInfoInputRepresentation') {
|
|
1406
|
+
const v_error = (() => {
|
|
1407
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1408
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1367
1409
|
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1410
|
+
const obj_file = obj.file;
|
|
1411
|
+
const path_file = path + '.file';
|
|
1412
|
+
if (typeof obj_file !== 'string') {
|
|
1413
|
+
return new TypeError('Expected "string" but received "' + typeof obj_file + '" (at "' + path_file + '")');
|
|
1414
|
+
}
|
|
1415
|
+
const obj_type = obj.type;
|
|
1416
|
+
const path_type = path + '.type';
|
|
1417
|
+
if (typeof obj_type !== 'string') {
|
|
1418
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1419
|
+
}
|
|
1420
|
+
})();
|
|
1421
|
+
return v_error === undefined ? null : v_error;
|
|
1371
1422
|
}
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1423
|
+
|
|
1424
|
+
const TTL$9 = 5000;
|
|
1425
|
+
const VERSION$9 = "7b301696f68bda5cea09d0c20ea77f58";
|
|
1426
|
+
function validate$9(obj, path = 'TemplateRepresentation') {
|
|
1427
|
+
const v_error = (() => {
|
|
1428
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1429
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1430
|
+
}
|
|
1431
|
+
const obj_configurationUrl = obj.configurationUrl;
|
|
1432
|
+
const path_configurationUrl = path + '.configurationUrl';
|
|
1433
|
+
if (typeof obj_configurationUrl !== 'string') {
|
|
1434
|
+
return new TypeError('Expected "string" but received "' + typeof obj_configurationUrl + '" (at "' + path_configurationUrl + '")');
|
|
1435
|
+
}
|
|
1436
|
+
const obj_createdDate = obj.createdDate;
|
|
1437
|
+
const path_createdDate = path + '.createdDate';
|
|
1438
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1439
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1440
|
+
}
|
|
1441
|
+
const obj_description = obj.description;
|
|
1442
|
+
const path_description = path + '.description';
|
|
1443
|
+
let obj_description_union0 = null;
|
|
1444
|
+
const obj_description_union0_error = (() => {
|
|
1445
|
+
if (typeof obj_description !== 'string') {
|
|
1446
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1447
|
+
}
|
|
1448
|
+
})();
|
|
1449
|
+
if (obj_description_union0_error != null) {
|
|
1450
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1451
|
+
}
|
|
1452
|
+
let obj_description_union1 = null;
|
|
1453
|
+
const obj_description_union1_error = (() => {
|
|
1454
|
+
if (obj_description !== null) {
|
|
1455
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1456
|
+
}
|
|
1457
|
+
})();
|
|
1458
|
+
if (obj_description_union1_error != null) {
|
|
1459
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1460
|
+
}
|
|
1461
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1462
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1463
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1464
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1465
|
+
return new TypeError(message);
|
|
1466
|
+
}
|
|
1467
|
+
const obj_id = obj.id;
|
|
1468
|
+
const path_id = path + '.id';
|
|
1469
|
+
if (typeof obj_id !== 'string') {
|
|
1470
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1471
|
+
}
|
|
1472
|
+
const obj_label = obj.label;
|
|
1473
|
+
const path_label = path + '.label';
|
|
1474
|
+
if (typeof obj_label !== 'string') {
|
|
1475
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
1476
|
+
}
|
|
1477
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
1478
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
1479
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
1480
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
1481
|
+
}
|
|
1482
|
+
const obj_name = obj.name;
|
|
1483
|
+
const path_name = path + '.name';
|
|
1484
|
+
if (typeof obj_name !== 'string') {
|
|
1485
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1486
|
+
}
|
|
1487
|
+
const obj_tags = obj.tags;
|
|
1488
|
+
const path_tags = path + '.tags';
|
|
1489
|
+
if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
|
|
1490
|
+
return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
1491
|
+
}
|
|
1492
|
+
const obj_tags_keys = ObjectKeys(obj_tags);
|
|
1493
|
+
for (let i = 0; i < obj_tags_keys.length; i++) {
|
|
1494
|
+
const key = obj_tags_keys[i];
|
|
1495
|
+
const obj_tags_prop = obj_tags[key];
|
|
1496
|
+
const path_tags_prop = path_tags + '["' + key + '"]';
|
|
1497
|
+
if (obj_tags_prop === undefined) {
|
|
1498
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
const obj_templateType = obj.templateType;
|
|
1502
|
+
const path_templateType = path + '.templateType';
|
|
1503
|
+
if (typeof obj_templateType !== 'string') {
|
|
1504
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
1505
|
+
}
|
|
1506
|
+
const obj_url = obj.url;
|
|
1507
|
+
const path_url = path + '.url';
|
|
1508
|
+
if (typeof obj_url !== 'string') {
|
|
1509
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1510
|
+
}
|
|
1511
|
+
})();
|
|
1512
|
+
return v_error === undefined ? null : v_error;
|
|
1383
1513
|
}
|
|
1384
|
-
|
|
1514
|
+
const RepresentationType$9 = 'TemplateRepresentation';
|
|
1515
|
+
function keyBuilder$r(luvio, config) {
|
|
1516
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
|
|
1517
|
+
}
|
|
1518
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
1519
|
+
const keyParams = {
|
|
1520
|
+
id: object.id
|
|
1521
|
+
};
|
|
1522
|
+
return keyBuilder$r(luvio, keyParams);
|
|
1523
|
+
}
|
|
1524
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
1525
|
+
return input;
|
|
1526
|
+
}
|
|
1527
|
+
const select$l = function TemplateRepresentationSelect() {
|
|
1528
|
+
return {
|
|
1529
|
+
kind: 'Fragment',
|
|
1530
|
+
version: VERSION$9,
|
|
1531
|
+
private: [],
|
|
1532
|
+
selections: [
|
|
1533
|
+
{
|
|
1534
|
+
name: 'configurationUrl',
|
|
1535
|
+
kind: 'Scalar'
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: 'createdDate',
|
|
1539
|
+
kind: 'Scalar'
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
name: 'description',
|
|
1543
|
+
kind: 'Scalar'
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: 'id',
|
|
1547
|
+
kind: 'Scalar'
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
name: 'label',
|
|
1551
|
+
kind: 'Scalar'
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
name: 'lastModifiedDate',
|
|
1555
|
+
kind: 'Scalar'
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
name: 'name',
|
|
1559
|
+
kind: 'Scalar'
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
name: 'tags',
|
|
1563
|
+
kind: 'Object',
|
|
1564
|
+
// any
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: 'templateType',
|
|
1568
|
+
kind: 'Scalar'
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
name: 'url',
|
|
1572
|
+
kind: 'Scalar'
|
|
1573
|
+
}
|
|
1574
|
+
]
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
function equals$9(existing, incoming) {
|
|
1578
|
+
const existing_configurationUrl = existing.configurationUrl;
|
|
1579
|
+
const incoming_configurationUrl = incoming.configurationUrl;
|
|
1580
|
+
if (!(existing_configurationUrl === incoming_configurationUrl)) {
|
|
1581
|
+
return false;
|
|
1582
|
+
}
|
|
1583
|
+
const existing_createdDate = existing.createdDate;
|
|
1584
|
+
const incoming_createdDate = incoming.createdDate;
|
|
1585
|
+
if (!(existing_createdDate === incoming_createdDate)) {
|
|
1586
|
+
return false;
|
|
1587
|
+
}
|
|
1588
|
+
const existing_id = existing.id;
|
|
1589
|
+
const incoming_id = incoming.id;
|
|
1590
|
+
if (!(existing_id === incoming_id)) {
|
|
1591
|
+
return false;
|
|
1592
|
+
}
|
|
1593
|
+
const existing_label = existing.label;
|
|
1594
|
+
const incoming_label = incoming.label;
|
|
1595
|
+
if (!(existing_label === incoming_label)) {
|
|
1596
|
+
return false;
|
|
1597
|
+
}
|
|
1598
|
+
const existing_lastModifiedDate = existing.lastModifiedDate;
|
|
1599
|
+
const incoming_lastModifiedDate = incoming.lastModifiedDate;
|
|
1600
|
+
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
1601
|
+
return false;
|
|
1602
|
+
}
|
|
1603
|
+
const existing_name = existing.name;
|
|
1604
|
+
const incoming_name = incoming.name;
|
|
1605
|
+
if (!(existing_name === incoming_name)) {
|
|
1606
|
+
return false;
|
|
1607
|
+
}
|
|
1608
|
+
const existing_templateType = existing.templateType;
|
|
1609
|
+
const incoming_templateType = incoming.templateType;
|
|
1610
|
+
if (!(existing_templateType === incoming_templateType)) {
|
|
1611
|
+
return false;
|
|
1612
|
+
}
|
|
1613
|
+
const existing_url = existing.url;
|
|
1614
|
+
const incoming_url = incoming.url;
|
|
1615
|
+
if (!(existing_url === incoming_url)) {
|
|
1616
|
+
return false;
|
|
1617
|
+
}
|
|
1618
|
+
const existing_description = existing.description;
|
|
1619
|
+
const incoming_description = incoming.description;
|
|
1620
|
+
if (!(existing_description === incoming_description)) {
|
|
1621
|
+
return false;
|
|
1622
|
+
}
|
|
1623
|
+
const existing_tags = existing.tags;
|
|
1624
|
+
const incoming_tags = incoming.tags;
|
|
1625
|
+
const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
|
|
1626
|
+
if (JSONStringify(incoming_tags_prop) !== JSONStringify(existing_tags_prop)) {
|
|
1627
|
+
return false;
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
if (equals_tags_props === false) {
|
|
1631
|
+
return false;
|
|
1632
|
+
}
|
|
1633
|
+
return true;
|
|
1634
|
+
}
|
|
1635
|
+
const ingest$9 = function TemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1636
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1637
|
+
const validateError = validate$9(input);
|
|
1638
|
+
if (validateError !== null) {
|
|
1639
|
+
throw validateError;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1643
|
+
const ttlToUse = TTL$9;
|
|
1644
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "AppFramework", VERSION$9, RepresentationType$9, equals$9);
|
|
1645
|
+
return createLink(key);
|
|
1646
|
+
};
|
|
1647
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
1648
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1649
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1650
|
+
rootKeySet.set(rootKey, {
|
|
1651
|
+
namespace: keyPrefix,
|
|
1652
|
+
representationName: RepresentationType$9,
|
|
1653
|
+
mergeable: false
|
|
1654
|
+
});
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
function select$k(luvio, params) {
|
|
1658
|
+
return select$l();
|
|
1659
|
+
}
|
|
1660
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
1661
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1662
|
+
}
|
|
1663
|
+
function ingestSuccess$b(luvio, resourceParams, response) {
|
|
1664
|
+
const { body } = response;
|
|
1665
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
1666
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1667
|
+
const snapshot = luvio.storeLookup({
|
|
1668
|
+
recordId: key,
|
|
1669
|
+
node: select$k(),
|
|
1670
|
+
variables: {},
|
|
1671
|
+
});
|
|
1672
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1673
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1674
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
deepFreeze(snapshot.data);
|
|
1678
|
+
return snapshot;
|
|
1679
|
+
}
|
|
1680
|
+
function createResourceRequest$c(config) {
|
|
1681
|
+
const headers = {};
|
|
1682
|
+
return {
|
|
1683
|
+
baseUri: '/services/data/v63.0',
|
|
1684
|
+
basePath: '/app-framework/templates',
|
|
1685
|
+
method: 'post',
|
|
1686
|
+
body: config.body,
|
|
1687
|
+
urlParams: {},
|
|
1688
|
+
queryParams: {},
|
|
1689
|
+
headers,
|
|
1690
|
+
priority: 'normal',
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
const adapterName$c = 'createTemplate';
|
|
1695
|
+
const createTemplate_ConfigPropertyMetadata = [
|
|
1696
|
+
generateParamConfigMetadata('assetVersion', false, 2 /* Body */, 2 /* Number */),
|
|
1697
|
+
generateParamConfigMetadata('chainDefinitions', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1698
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1699
|
+
generateParamConfigMetadata('icons', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1700
|
+
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
1701
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1702
|
+
generateParamConfigMetadata('layoutDefinition', false, 2 /* Body */, 0 /* String */),
|
|
1703
|
+
generateParamConfigMetadata('maxAppCount', false, 2 /* Body */, 3 /* Integer */),
|
|
1704
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1705
|
+
generateParamConfigMetadata('namespace', false, 2 /* Body */, 0 /* String */),
|
|
1706
|
+
generateParamConfigMetadata('releaseInfo', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1707
|
+
generateParamConfigMetadata('rules', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1708
|
+
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1709
|
+
generateParamConfigMetadata('templateType', true, 2 /* Body */, 0 /* String */),
|
|
1710
|
+
generateParamConfigMetadata('variableDefinition', false, 2 /* Body */, 0 /* String */),
|
|
1711
|
+
];
|
|
1712
|
+
const createTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, createTemplate_ConfigPropertyMetadata);
|
|
1713
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$e(createTemplate_ConfigPropertyMetadata);
|
|
1714
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
1715
|
+
const config = {};
|
|
1716
|
+
typeCheckConfig$e(untrustedConfig, config, createTemplate_ConfigPropertyMetadata);
|
|
1717
|
+
const untrustedConfig_chainDefinitions = untrustedConfig.chainDefinitions;
|
|
1718
|
+
if (ArrayIsArray$1(untrustedConfig_chainDefinitions)) {
|
|
1719
|
+
const untrustedConfig_chainDefinitions_array = [];
|
|
1720
|
+
for (let i = 0, arrayLength = untrustedConfig_chainDefinitions.length; i < arrayLength; i++) {
|
|
1721
|
+
const untrustedConfig_chainDefinitions_item = untrustedConfig_chainDefinitions[i];
|
|
1722
|
+
const referenceChainDefinitionInputRepresentationValidationError = validate$f(untrustedConfig_chainDefinitions_item);
|
|
1723
|
+
if (referenceChainDefinitionInputRepresentationValidationError === null) {
|
|
1724
|
+
untrustedConfig_chainDefinitions_array.push(untrustedConfig_chainDefinitions_item);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
config.chainDefinitions = untrustedConfig_chainDefinitions_array;
|
|
1728
|
+
}
|
|
1729
|
+
const untrustedConfig_icons = untrustedConfig.icons;
|
|
1730
|
+
const referenceTemplateIconsInputRepresentationValidationError = validate$c(untrustedConfig_icons);
|
|
1731
|
+
if (referenceTemplateIconsInputRepresentationValidationError === null) {
|
|
1732
|
+
config.icons = untrustedConfig_icons;
|
|
1733
|
+
}
|
|
1734
|
+
const untrustedConfig_releaseInfo = untrustedConfig.releaseInfo;
|
|
1735
|
+
const referenceReleaseInfoInputRepresentationValidationError = validate$b(untrustedConfig_releaseInfo);
|
|
1736
|
+
if (referenceReleaseInfoInputRepresentationValidationError === null) {
|
|
1737
|
+
config.releaseInfo = untrustedConfig_releaseInfo;
|
|
1738
|
+
}
|
|
1739
|
+
const untrustedConfig_rules = untrustedConfig.rules;
|
|
1740
|
+
if (ArrayIsArray$1(untrustedConfig_rules)) {
|
|
1741
|
+
const untrustedConfig_rules_array = [];
|
|
1742
|
+
for (let i = 0, arrayLength = untrustedConfig_rules.length; i < arrayLength; i++) {
|
|
1743
|
+
const untrustedConfig_rules_item = untrustedConfig_rules[i];
|
|
1744
|
+
const referenceRuleInfoInputRepresentationValidationError = validate$a(untrustedConfig_rules_item);
|
|
1745
|
+
if (referenceRuleInfoInputRepresentationValidationError === null) {
|
|
1746
|
+
untrustedConfig_rules_array.push(untrustedConfig_rules_item);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
config.rules = untrustedConfig_rules_array;
|
|
1750
|
+
}
|
|
1751
|
+
const untrustedConfig_tags = untrustedConfig.tags;
|
|
1752
|
+
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
1753
|
+
const untrustedConfig_tags_object = {};
|
|
1754
|
+
const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
|
|
1755
|
+
for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
|
|
1756
|
+
const key = untrustedConfig_tags_keys[i];
|
|
1757
|
+
const untrustedConfig_tags_prop = untrustedConfig_tags[key];
|
|
1758
|
+
if (untrustedConfig_tags_object !== undefined) {
|
|
1759
|
+
untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
|
|
1763
|
+
config.tags = untrustedConfig_tags_object;
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
return config;
|
|
1767
|
+
}
|
|
1768
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
1769
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1770
|
+
return null;
|
|
1771
|
+
}
|
|
1772
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1773
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1774
|
+
}
|
|
1775
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
1776
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1777
|
+
return null;
|
|
1778
|
+
}
|
|
1779
|
+
return config;
|
|
1780
|
+
}
|
|
1781
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
1782
|
+
const resourceParams = createResourceParams$c(config);
|
|
1783
|
+
const request = createResourceRequest$c(resourceParams);
|
|
1784
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1785
|
+
.then((response) => {
|
|
1786
|
+
return luvio.handleSuccessResponse(() => {
|
|
1787
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response);
|
|
1788
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1789
|
+
}, () => {
|
|
1790
|
+
const cache = new StoreKeyMap();
|
|
1791
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
1792
|
+
return cache;
|
|
1793
|
+
});
|
|
1794
|
+
}, (response) => {
|
|
1795
|
+
deepFreeze(response);
|
|
1796
|
+
throw response;
|
|
1797
|
+
});
|
|
1798
|
+
}
|
|
1799
|
+
const createTemplateAdapterFactory = (luvio) => {
|
|
1800
|
+
return function createTemplate(untrustedConfig) {
|
|
1801
|
+
const config = validateAdapterConfig$c(untrustedConfig, createTemplate_ConfigPropertyNames);
|
|
1802
|
+
// Invalid or incomplete config
|
|
1803
|
+
if (config === null) {
|
|
1804
|
+
throw new Error('Invalid config for "createTemplate"');
|
|
1805
|
+
}
|
|
1806
|
+
return buildNetworkSnapshot$c(luvio, config);
|
|
1807
|
+
};
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
function keyBuilder$q(luvio, params) {
|
|
1811
|
+
return keyBuilder$t(luvio, {
|
|
1812
|
+
id: params.urlParams.appIdOrApiName
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
function getResponseCacheKeys$b(cacheKeyMap, luvio, resourceParams) {
|
|
1816
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
1817
|
+
cacheKeyMap.set(key, {
|
|
1818
|
+
namespace: keyPrefix,
|
|
1819
|
+
representationName: RepresentationType$b,
|
|
1820
|
+
mergeable: false
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
function evictSuccess(luvio, resourceParams) {
|
|
1824
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
1825
|
+
luvio.storeEvict(key);
|
|
1826
|
+
}
|
|
1827
|
+
function createResourceRequest$b(config) {
|
|
1828
|
+
const headers = {};
|
|
1829
|
+
return {
|
|
1830
|
+
baseUri: '/services/data/v63.0',
|
|
1831
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '',
|
|
1832
|
+
method: 'delete',
|
|
1833
|
+
body: null,
|
|
1834
|
+
urlParams: config.urlParams,
|
|
1835
|
+
queryParams: {},
|
|
1836
|
+
headers,
|
|
1837
|
+
priority: 'normal',
|
|
1838
|
+
};
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
const adapterName$b = 'deleteApp';
|
|
1842
|
+
const deleteApp_ConfigPropertyMetadata = [
|
|
1843
|
+
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1844
|
+
];
|
|
1845
|
+
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, deleteApp_ConfigPropertyMetadata);
|
|
1846
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$e(deleteApp_ConfigPropertyMetadata);
|
|
1847
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
1848
|
+
const config = {};
|
|
1849
|
+
typeCheckConfig$e(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1850
|
+
return config;
|
|
1851
|
+
}
|
|
1852
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
1853
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1854
|
+
return null;
|
|
1855
|
+
}
|
|
1856
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1857
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1858
|
+
}
|
|
1859
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
1860
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1861
|
+
return null;
|
|
1862
|
+
}
|
|
1863
|
+
return config;
|
|
1864
|
+
}
|
|
1865
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
1866
|
+
const resourceParams = createResourceParams$b(config);
|
|
1867
|
+
const request = createResourceRequest$b(resourceParams);
|
|
1868
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1869
|
+
.then(() => {
|
|
1870
|
+
return luvio.handleSuccessResponse(() => {
|
|
1871
|
+
evictSuccess(luvio, resourceParams);
|
|
1872
|
+
return luvio.storeBroadcast();
|
|
1873
|
+
}, () => {
|
|
1874
|
+
const cache = new StoreKeyMap();
|
|
1875
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams);
|
|
1876
|
+
return cache;
|
|
1877
|
+
});
|
|
1878
|
+
}, (response) => {
|
|
1879
|
+
deepFreeze(response);
|
|
1880
|
+
throw response;
|
|
1881
|
+
});
|
|
1882
|
+
}
|
|
1883
|
+
const deleteAppAdapterFactory = (luvio) => {
|
|
1884
|
+
return function AppFrameworkdeleteApp(untrustedConfig) {
|
|
1885
|
+
const config = validateAdapterConfig$b(untrustedConfig, deleteApp_ConfigPropertyNames);
|
|
1886
|
+
// Invalid or incomplete config
|
|
1887
|
+
if (config === null) {
|
|
1888
|
+
throw new Error(`Invalid config for "${adapterName$b}"`);
|
|
1889
|
+
}
|
|
1890
|
+
return buildNetworkSnapshot$b(luvio, config);
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
|
|
1894
|
+
function select$j(luvio, params) {
|
|
1895
|
+
return select$o();
|
|
1896
|
+
}
|
|
1897
|
+
function keyBuilder$p(luvio, params) {
|
|
1898
|
+
return keyBuilder$t(luvio, {
|
|
1899
|
+
id: params.urlParams.appIdOrApiName
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
1903
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
1904
|
+
}
|
|
1905
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
1906
|
+
const { body } = response;
|
|
1907
|
+
const key = keyBuilder$p(luvio, resourceParams);
|
|
1908
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
1909
|
+
const snapshot = luvio.storeLookup({
|
|
1910
|
+
recordId: key,
|
|
1911
|
+
node: select$j(),
|
|
1912
|
+
variables: {},
|
|
1913
|
+
}, snapshotRefresh);
|
|
1914
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1915
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1916
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
deepFreeze(snapshot.data);
|
|
1920
|
+
return snapshot;
|
|
1921
|
+
}
|
|
1922
|
+
function ingestError$9(luvio, params, error, snapshotRefresh) {
|
|
1923
|
+
const key = keyBuilder$p(luvio, params);
|
|
1924
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1925
|
+
const storeMetadataParams = {
|
|
1926
|
+
ttl: TTL$b,
|
|
1927
|
+
namespace: keyPrefix,
|
|
1928
|
+
version: VERSION$b,
|
|
1929
|
+
representationName: RepresentationType$b
|
|
1930
|
+
};
|
|
1931
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1932
|
+
return errorSnapshot;
|
|
1933
|
+
}
|
|
1934
|
+
function createResourceRequest$a(config) {
|
|
1385
1935
|
const headers = {};
|
|
1386
1936
|
return {
|
|
1387
1937
|
baseUri: '/services/data/v63.0',
|
|
@@ -1394,125 +1944,125 @@ function createResourceRequest$8(config) {
|
|
|
1394
1944
|
priority: 'normal',
|
|
1395
1945
|
};
|
|
1396
1946
|
}
|
|
1397
|
-
function createResourceRequestFromRepresentation$
|
|
1947
|
+
function createResourceRequestFromRepresentation$6(representation) {
|
|
1398
1948
|
const config = {
|
|
1399
1949
|
urlParams: {},
|
|
1400
1950
|
};
|
|
1401
1951
|
config.urlParams.appIdOrApiName = representation.id;
|
|
1402
|
-
return createResourceRequest$
|
|
1952
|
+
return createResourceRequest$a(config);
|
|
1403
1953
|
}
|
|
1404
1954
|
|
|
1405
|
-
const adapterName$
|
|
1955
|
+
const adapterName$a = 'getApp';
|
|
1406
1956
|
const getApp_ConfigPropertyMetadata = [
|
|
1407
1957
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1408
1958
|
];
|
|
1409
|
-
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1410
|
-
const createResourceParams$
|
|
1411
|
-
function keyBuilder$
|
|
1412
|
-
const resourceParams = createResourceParams$
|
|
1413
|
-
return keyBuilder$
|
|
1959
|
+
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, getApp_ConfigPropertyMetadata);
|
|
1960
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$e(getApp_ConfigPropertyMetadata);
|
|
1961
|
+
function keyBuilder$o(luvio, config) {
|
|
1962
|
+
const resourceParams = createResourceParams$a(config);
|
|
1963
|
+
return keyBuilder$p(luvio, resourceParams);
|
|
1414
1964
|
}
|
|
1415
|
-
function typeCheckConfig$
|
|
1965
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
1416
1966
|
const config = {};
|
|
1417
|
-
typeCheckConfig$
|
|
1967
|
+
typeCheckConfig$e(untrustedConfig, config, getApp_ConfigPropertyMetadata);
|
|
1418
1968
|
return config;
|
|
1419
1969
|
}
|
|
1420
|
-
function validateAdapterConfig$
|
|
1970
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
1421
1971
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1422
1972
|
return null;
|
|
1423
1973
|
}
|
|
1424
1974
|
if (process.env.NODE_ENV !== 'production') {
|
|
1425
1975
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1426
1976
|
}
|
|
1427
|
-
const config = typeCheckConfig$
|
|
1977
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
1428
1978
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1429
1979
|
return null;
|
|
1430
1980
|
}
|
|
1431
1981
|
return config;
|
|
1432
1982
|
}
|
|
1433
|
-
function adapterFragment$
|
|
1434
|
-
createResourceParams$
|
|
1435
|
-
return select$
|
|
1983
|
+
function adapterFragment$9(luvio, config) {
|
|
1984
|
+
createResourceParams$a(config);
|
|
1985
|
+
return select$j();
|
|
1436
1986
|
}
|
|
1437
|
-
function onFetchResponseSuccess$
|
|
1438
|
-
const snapshot = ingestSuccess$
|
|
1987
|
+
function onFetchResponseSuccess$9(luvio, config, resourceParams, response) {
|
|
1988
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
1439
1989
|
config,
|
|
1440
|
-
resolve: () => buildNetworkSnapshot$
|
|
1990
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1441
1991
|
});
|
|
1442
1992
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1443
1993
|
}
|
|
1444
|
-
function onFetchResponseError$
|
|
1445
|
-
const snapshot = ingestError$
|
|
1994
|
+
function onFetchResponseError$9(luvio, config, resourceParams, response) {
|
|
1995
|
+
const snapshot = ingestError$9(luvio, resourceParams, response, {
|
|
1446
1996
|
config,
|
|
1447
|
-
resolve: () => buildNetworkSnapshot$
|
|
1997
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1448
1998
|
});
|
|
1449
1999
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1450
2000
|
}
|
|
1451
|
-
function buildNetworkSnapshot$
|
|
1452
|
-
const resourceParams = createResourceParams$
|
|
1453
|
-
const request = createResourceRequest$
|
|
2001
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
2002
|
+
const resourceParams = createResourceParams$a(config);
|
|
2003
|
+
const request = createResourceRequest$a(resourceParams);
|
|
1454
2004
|
return luvio.dispatchResourceRequest(request, options)
|
|
1455
2005
|
.then((response) => {
|
|
1456
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2006
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$9(luvio, config, resourceParams, response), () => {
|
|
1457
2007
|
const cache = new StoreKeyMap();
|
|
1458
|
-
getResponseCacheKeys$
|
|
2008
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
1459
2009
|
return cache;
|
|
1460
2010
|
});
|
|
1461
2011
|
}, (response) => {
|
|
1462
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2012
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$9(luvio, config, resourceParams, response));
|
|
1463
2013
|
});
|
|
1464
2014
|
}
|
|
1465
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1466
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2015
|
+
function buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext) {
|
|
2016
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$a, undefined, false);
|
|
1467
2017
|
}
|
|
1468
|
-
function buildCachedSnapshotCachePolicy$
|
|
2018
|
+
function buildCachedSnapshotCachePolicy$9(context, storeLookup) {
|
|
1469
2019
|
const { luvio, config } = context;
|
|
1470
2020
|
const selector = {
|
|
1471
|
-
recordId: keyBuilder$
|
|
1472
|
-
node: adapterFragment$
|
|
2021
|
+
recordId: keyBuilder$o(luvio, config),
|
|
2022
|
+
node: adapterFragment$9(luvio, config),
|
|
1473
2023
|
variables: {},
|
|
1474
2024
|
};
|
|
1475
2025
|
const cacheSnapshot = storeLookup(selector, {
|
|
1476
2026
|
config,
|
|
1477
|
-
resolve: () => buildNetworkSnapshot$
|
|
2027
|
+
resolve: () => buildNetworkSnapshot$a(luvio, config, snapshotRefreshOptions)
|
|
1478
2028
|
});
|
|
1479
2029
|
return cacheSnapshot;
|
|
1480
2030
|
}
|
|
1481
2031
|
const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedConfig, requestContext) {
|
|
1482
|
-
const config = validateAdapterConfig$
|
|
2032
|
+
const config = validateAdapterConfig$a(untrustedConfig, getApp_ConfigPropertyNames);
|
|
1483
2033
|
// Invalid or incomplete config
|
|
1484
2034
|
if (config === null) {
|
|
1485
2035
|
return null;
|
|
1486
2036
|
}
|
|
1487
2037
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1488
|
-
buildCachedSnapshotCachePolicy$
|
|
2038
|
+
buildCachedSnapshotCachePolicy$9, buildNetworkSnapshotCachePolicy$9);
|
|
1489
2039
|
};
|
|
1490
|
-
const notifyChangeFactory$
|
|
2040
|
+
const notifyChangeFactory$6 = (luvio, options) => {
|
|
1491
2041
|
return function getAppFrameworkAppsByAppIdOrApiNameNotifyChange(configs) {
|
|
1492
|
-
const keys = configs.map(c => keyBuilder$
|
|
2042
|
+
const keys = configs.map(c => keyBuilder$t(luvio, c));
|
|
1493
2043
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1494
2044
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1495
2045
|
const { key, record: val } = entries[i];
|
|
1496
|
-
const refreshRequest = createResourceRequestFromRepresentation$
|
|
2046
|
+
const refreshRequest = createResourceRequestFromRepresentation$6(val);
|
|
1497
2047
|
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
1498
2048
|
.then((response) => {
|
|
1499
2049
|
return luvio.handleSuccessResponse(() => {
|
|
1500
2050
|
const { body } = response;
|
|
1501
|
-
luvio.storeIngest(key, ingest$
|
|
2051
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
1502
2052
|
return luvio.storeBroadcast();
|
|
1503
2053
|
}, () => {
|
|
1504
2054
|
const cache = new StoreKeyMap();
|
|
1505
|
-
getTypeCacheKeys$
|
|
2055
|
+
getTypeCacheKeys$b(cache, luvio, response.body);
|
|
1506
2056
|
return cache;
|
|
1507
2057
|
});
|
|
1508
2058
|
}, (error) => {
|
|
1509
2059
|
return luvio.handleErrorResponse(() => {
|
|
1510
2060
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1511
2061
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
1512
|
-
ttl: TTL$
|
|
2062
|
+
ttl: TTL$b,
|
|
1513
2063
|
namespace: keyPrefix,
|
|
1514
|
-
version: VERSION$
|
|
1515
|
-
representationName: RepresentationType$
|
|
2064
|
+
version: VERSION$b,
|
|
2065
|
+
representationName: RepresentationType$b
|
|
1516
2066
|
});
|
|
1517
2067
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1518
2068
|
});
|
|
@@ -1567,7 +2117,7 @@ function validate$8(obj, path = 'AppActivityItemRepresentation') {
|
|
|
1567
2117
|
return v_error === undefined ? null : v_error;
|
|
1568
2118
|
}
|
|
1569
2119
|
const RepresentationType$8 = 'AppActivityItemRepresentation';
|
|
1570
|
-
function keyBuilder$
|
|
2120
|
+
function keyBuilder$n(luvio, config) {
|
|
1571
2121
|
return keyPrefix + '::' + RepresentationType$8 + ':' + config.appId + ':' + config.id;
|
|
1572
2122
|
}
|
|
1573
2123
|
function keyBuilderFromType$5(luvio, object) {
|
|
@@ -1575,12 +2125,12 @@ function keyBuilderFromType$5(luvio, object) {
|
|
|
1575
2125
|
appId: object.appId,
|
|
1576
2126
|
id: object.id
|
|
1577
2127
|
};
|
|
1578
|
-
return keyBuilder$
|
|
2128
|
+
return keyBuilder$n(luvio, keyParams);
|
|
1579
2129
|
}
|
|
1580
2130
|
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1581
2131
|
return input;
|
|
1582
2132
|
}
|
|
1583
|
-
const select$
|
|
2133
|
+
const select$i = function AppActivityItemRepresentationSelect() {
|
|
1584
2134
|
return {
|
|
1585
2135
|
kind: 'Fragment',
|
|
1586
2136
|
version: VERSION$8,
|
|
@@ -1693,14 +2243,14 @@ function validate$7(obj, path = 'AppActivityCollectionRepresentation') {
|
|
|
1693
2243
|
return v_error === undefined ? null : v_error;
|
|
1694
2244
|
}
|
|
1695
2245
|
const RepresentationType$7 = 'AppActivityCollectionRepresentation';
|
|
1696
|
-
function keyBuilder$
|
|
2246
|
+
function keyBuilder$m(luvio, config) {
|
|
1697
2247
|
return keyPrefix + '::' + RepresentationType$7 + ':' + config.appId;
|
|
1698
2248
|
}
|
|
1699
2249
|
function keyBuilderFromType$4(luvio, object) {
|
|
1700
2250
|
const keyParams = {
|
|
1701
2251
|
appId: object.appId
|
|
1702
2252
|
};
|
|
1703
|
-
return keyBuilder$
|
|
2253
|
+
return keyBuilder$m(luvio, keyParams);
|
|
1704
2254
|
}
|
|
1705
2255
|
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1706
2256
|
const input_items = input.items;
|
|
@@ -1721,7 +2271,7 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
1721
2271
|
}
|
|
1722
2272
|
return input;
|
|
1723
2273
|
}
|
|
1724
|
-
const select$
|
|
2274
|
+
const select$h = function AppActivityCollectionRepresentationSelect() {
|
|
1725
2275
|
return {
|
|
1726
2276
|
kind: 'Fragment',
|
|
1727
2277
|
version: VERSION$7,
|
|
@@ -1735,7 +2285,7 @@ const select$f = function AppActivityCollectionRepresentationSelect() {
|
|
|
1735
2285
|
name: 'items',
|
|
1736
2286
|
kind: 'Link',
|
|
1737
2287
|
plural: true,
|
|
1738
|
-
fragment: select$
|
|
2288
|
+
fragment: select$i()
|
|
1739
2289
|
}
|
|
1740
2290
|
]
|
|
1741
2291
|
};
|
|
@@ -1784,24 +2334,24 @@ function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1784
2334
|
}
|
|
1785
2335
|
}
|
|
1786
2336
|
|
|
1787
|
-
function select$
|
|
1788
|
-
return select$
|
|
2337
|
+
function select$g(luvio, params) {
|
|
2338
|
+
return select$h();
|
|
1789
2339
|
}
|
|
1790
|
-
function keyBuilder$
|
|
1791
|
-
return keyBuilder$
|
|
2340
|
+
function keyBuilder$l(luvio, params) {
|
|
2341
|
+
return keyBuilder$m(luvio, {
|
|
1792
2342
|
appId: params.urlParams.appIdOrApiName
|
|
1793
2343
|
});
|
|
1794
2344
|
}
|
|
1795
|
-
function getResponseCacheKeys$
|
|
2345
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1796
2346
|
getTypeCacheKeys$7(storeKeyMap, luvio, response);
|
|
1797
2347
|
}
|
|
1798
|
-
function ingestSuccess$
|
|
2348
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
1799
2349
|
const { body } = response;
|
|
1800
|
-
const key = keyBuilder$
|
|
2350
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
1801
2351
|
luvio.storeIngest(key, ingest$7, body);
|
|
1802
2352
|
const snapshot = luvio.storeLookup({
|
|
1803
2353
|
recordId: key,
|
|
1804
|
-
node: select$
|
|
2354
|
+
node: select$g(),
|
|
1805
2355
|
variables: {},
|
|
1806
2356
|
}, snapshotRefresh);
|
|
1807
2357
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1812,8 +2362,8 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1812
2362
|
deepFreeze(snapshot.data);
|
|
1813
2363
|
return snapshot;
|
|
1814
2364
|
}
|
|
1815
|
-
function ingestError$
|
|
1816
|
-
const key = keyBuilder$
|
|
2365
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
2366
|
+
const key = keyBuilder$l(luvio, params);
|
|
1817
2367
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1818
2368
|
const storeMetadataParams = {
|
|
1819
2369
|
ttl: TTL$7,
|
|
@@ -1824,7 +2374,7 @@ function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
|
1824
2374
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1825
2375
|
return errorSnapshot;
|
|
1826
2376
|
}
|
|
1827
|
-
function createResourceRequest$
|
|
2377
|
+
function createResourceRequest$9(config) {
|
|
1828
2378
|
const headers = {};
|
|
1829
2379
|
return {
|
|
1830
2380
|
baseUri: '/services/data/v63.0',
|
|
@@ -1837,106 +2387,106 @@ function createResourceRequest$7(config) {
|
|
|
1837
2387
|
priority: 'normal',
|
|
1838
2388
|
};
|
|
1839
2389
|
}
|
|
1840
|
-
function createResourceRequestFromRepresentation$
|
|
2390
|
+
function createResourceRequestFromRepresentation$5(representation) {
|
|
1841
2391
|
const config = {
|
|
1842
2392
|
urlParams: {},
|
|
1843
2393
|
};
|
|
1844
2394
|
config.urlParams.appIdOrApiName = representation.appId;
|
|
1845
|
-
return createResourceRequest$
|
|
2395
|
+
return createResourceRequest$9(config);
|
|
1846
2396
|
}
|
|
1847
2397
|
|
|
1848
|
-
const adapterName$
|
|
2398
|
+
const adapterName$9 = 'getAppActivities';
|
|
1849
2399
|
const getAppActivities_ConfigPropertyMetadata = [
|
|
1850
2400
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1851
2401
|
];
|
|
1852
|
-
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1853
|
-
const createResourceParams$
|
|
1854
|
-
function keyBuilder$
|
|
1855
|
-
const resourceParams = createResourceParams$
|
|
1856
|
-
return keyBuilder$
|
|
2402
|
+
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, getAppActivities_ConfigPropertyMetadata);
|
|
2403
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$e(getAppActivities_ConfigPropertyMetadata);
|
|
2404
|
+
function keyBuilder$k(luvio, config) {
|
|
2405
|
+
const resourceParams = createResourceParams$9(config);
|
|
2406
|
+
return keyBuilder$l(luvio, resourceParams);
|
|
1857
2407
|
}
|
|
1858
|
-
function typeCheckConfig$
|
|
2408
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1859
2409
|
const config = {};
|
|
1860
|
-
typeCheckConfig$
|
|
2410
|
+
typeCheckConfig$e(untrustedConfig, config, getAppActivities_ConfigPropertyMetadata);
|
|
1861
2411
|
return config;
|
|
1862
2412
|
}
|
|
1863
|
-
function validateAdapterConfig$
|
|
2413
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1864
2414
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1865
2415
|
return null;
|
|
1866
2416
|
}
|
|
1867
2417
|
if (process.env.NODE_ENV !== 'production') {
|
|
1868
2418
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1869
2419
|
}
|
|
1870
|
-
const config = typeCheckConfig$
|
|
2420
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1871
2421
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1872
2422
|
return null;
|
|
1873
2423
|
}
|
|
1874
2424
|
return config;
|
|
1875
2425
|
}
|
|
1876
|
-
function adapterFragment$
|
|
1877
|
-
createResourceParams$
|
|
1878
|
-
return select$
|
|
2426
|
+
function adapterFragment$8(luvio, config) {
|
|
2427
|
+
createResourceParams$9(config);
|
|
2428
|
+
return select$g();
|
|
1879
2429
|
}
|
|
1880
|
-
function onFetchResponseSuccess$
|
|
1881
|
-
const snapshot = ingestSuccess$
|
|
2430
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
2431
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
1882
2432
|
config,
|
|
1883
|
-
resolve: () => buildNetworkSnapshot$
|
|
2433
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1884
2434
|
});
|
|
1885
2435
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1886
2436
|
}
|
|
1887
|
-
function onFetchResponseError$
|
|
1888
|
-
const snapshot = ingestError$
|
|
2437
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
2438
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
1889
2439
|
config,
|
|
1890
|
-
resolve: () => buildNetworkSnapshot$
|
|
2440
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1891
2441
|
});
|
|
1892
2442
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1893
2443
|
}
|
|
1894
|
-
function buildNetworkSnapshot$
|
|
1895
|
-
const resourceParams = createResourceParams$
|
|
1896
|
-
const request = createResourceRequest$
|
|
2444
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
2445
|
+
const resourceParams = createResourceParams$9(config);
|
|
2446
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1897
2447
|
return luvio.dispatchResourceRequest(request, options)
|
|
1898
2448
|
.then((response) => {
|
|
1899
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2449
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
1900
2450
|
const cache = new StoreKeyMap();
|
|
1901
|
-
getResponseCacheKeys$
|
|
2451
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1902
2452
|
return cache;
|
|
1903
2453
|
});
|
|
1904
2454
|
}, (response) => {
|
|
1905
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2455
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
1906
2456
|
});
|
|
1907
2457
|
}
|
|
1908
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1909
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2458
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
2459
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$9, undefined, false);
|
|
1910
2460
|
}
|
|
1911
|
-
function buildCachedSnapshotCachePolicy$
|
|
2461
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
1912
2462
|
const { luvio, config } = context;
|
|
1913
2463
|
const selector = {
|
|
1914
|
-
recordId: keyBuilder$
|
|
1915
|
-
node: adapterFragment$
|
|
2464
|
+
recordId: keyBuilder$k(luvio, config),
|
|
2465
|
+
node: adapterFragment$8(luvio, config),
|
|
1916
2466
|
variables: {},
|
|
1917
2467
|
};
|
|
1918
2468
|
const cacheSnapshot = storeLookup(selector, {
|
|
1919
2469
|
config,
|
|
1920
|
-
resolve: () => buildNetworkSnapshot$
|
|
2470
|
+
resolve: () => buildNetworkSnapshot$9(luvio, config, snapshotRefreshOptions)
|
|
1921
2471
|
});
|
|
1922
2472
|
return cacheSnapshot;
|
|
1923
2473
|
}
|
|
1924
2474
|
const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppActivities(untrustedConfig, requestContext) {
|
|
1925
|
-
const config = validateAdapterConfig$
|
|
2475
|
+
const config = validateAdapterConfig$9(untrustedConfig, getAppActivities_ConfigPropertyNames);
|
|
1926
2476
|
// Invalid or incomplete config
|
|
1927
2477
|
if (config === null) {
|
|
1928
2478
|
return null;
|
|
1929
2479
|
}
|
|
1930
2480
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1931
|
-
buildCachedSnapshotCachePolicy$
|
|
2481
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
1932
2482
|
};
|
|
1933
|
-
const notifyChangeFactory$
|
|
2483
|
+
const notifyChangeFactory$5 = (luvio, options) => {
|
|
1934
2484
|
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameNotifyChange(configs) {
|
|
1935
|
-
const keys = configs.map(c => keyBuilder$
|
|
2485
|
+
const keys = configs.map(c => keyBuilder$m(luvio, c));
|
|
1936
2486
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1937
2487
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1938
2488
|
const { key, record: val } = entries[i];
|
|
1939
|
-
const refreshRequest = createResourceRequestFromRepresentation$
|
|
2489
|
+
const refreshRequest = createResourceRequestFromRepresentation$5(val);
|
|
1940
2490
|
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
1941
2491
|
.then((response) => {
|
|
1942
2492
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -1965,25 +2515,25 @@ const notifyChangeFactory$4 = (luvio, options) => {
|
|
|
1965
2515
|
};
|
|
1966
2516
|
};
|
|
1967
2517
|
|
|
1968
|
-
function select$
|
|
1969
|
-
return select$
|
|
2518
|
+
function select$f(luvio, params) {
|
|
2519
|
+
return select$i();
|
|
1970
2520
|
}
|
|
1971
|
-
function keyBuilder$
|
|
1972
|
-
return keyBuilder$
|
|
2521
|
+
function keyBuilder$j(luvio, params) {
|
|
2522
|
+
return keyBuilder$n(luvio, {
|
|
1973
2523
|
appId: params.urlParams.appIdOrApiName,
|
|
1974
2524
|
id: params.urlParams.id
|
|
1975
2525
|
});
|
|
1976
2526
|
}
|
|
1977
|
-
function getResponseCacheKeys$
|
|
2527
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
1978
2528
|
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1979
2529
|
}
|
|
1980
|
-
function ingestSuccess$
|
|
2530
|
+
function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
1981
2531
|
const { body } = response;
|
|
1982
|
-
const key = keyBuilder$
|
|
2532
|
+
const key = keyBuilder$j(luvio, resourceParams);
|
|
1983
2533
|
luvio.storeIngest(key, ingest$8, body);
|
|
1984
2534
|
const snapshot = luvio.storeLookup({
|
|
1985
2535
|
recordId: key,
|
|
1986
|
-
node: select$
|
|
2536
|
+
node: select$f(),
|
|
1987
2537
|
variables: {},
|
|
1988
2538
|
}, snapshotRefresh);
|
|
1989
2539
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1994,8 +2544,8 @@ function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1994
2544
|
deepFreeze(snapshot.data);
|
|
1995
2545
|
return snapshot;
|
|
1996
2546
|
}
|
|
1997
|
-
function ingestError$
|
|
1998
|
-
const key = keyBuilder$
|
|
2547
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
2548
|
+
const key = keyBuilder$j(luvio, params);
|
|
1999
2549
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2000
2550
|
const storeMetadataParams = {
|
|
2001
2551
|
ttl: TTL$8,
|
|
@@ -2006,7 +2556,7 @@ function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
|
2006
2556
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2007
2557
|
return errorSnapshot;
|
|
2008
2558
|
}
|
|
2009
|
-
function createResourceRequest$
|
|
2559
|
+
function createResourceRequest$8(config) {
|
|
2010
2560
|
const headers = {};
|
|
2011
2561
|
return {
|
|
2012
2562
|
baseUri: '/services/data/v63.0',
|
|
@@ -2019,108 +2569,108 @@ function createResourceRequest$6(config) {
|
|
|
2019
2569
|
priority: 'normal',
|
|
2020
2570
|
};
|
|
2021
2571
|
}
|
|
2022
|
-
function createResourceRequestFromRepresentation$
|
|
2572
|
+
function createResourceRequestFromRepresentation$4(representation) {
|
|
2023
2573
|
const config = {
|
|
2024
2574
|
urlParams: {},
|
|
2025
2575
|
};
|
|
2026
2576
|
config.urlParams.appIdOrApiName = representation.appId;
|
|
2027
2577
|
config.urlParams.id = representation.id;
|
|
2028
|
-
return createResourceRequest$
|
|
2578
|
+
return createResourceRequest$8(config);
|
|
2029
2579
|
}
|
|
2030
2580
|
|
|
2031
|
-
const adapterName$
|
|
2581
|
+
const adapterName$8 = 'getAppActivity';
|
|
2032
2582
|
const getAppActivity_ConfigPropertyMetadata = [
|
|
2033
2583
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2034
2584
|
generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2035
2585
|
];
|
|
2036
|
-
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2037
|
-
const createResourceParams$
|
|
2038
|
-
function keyBuilder$
|
|
2039
|
-
const resourceParams = createResourceParams$
|
|
2040
|
-
return keyBuilder$
|
|
2586
|
+
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getAppActivity_ConfigPropertyMetadata);
|
|
2587
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$e(getAppActivity_ConfigPropertyMetadata);
|
|
2588
|
+
function keyBuilder$i(luvio, config) {
|
|
2589
|
+
const resourceParams = createResourceParams$8(config);
|
|
2590
|
+
return keyBuilder$j(luvio, resourceParams);
|
|
2041
2591
|
}
|
|
2042
|
-
function typeCheckConfig$
|
|
2592
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
2043
2593
|
const config = {};
|
|
2044
|
-
typeCheckConfig$
|
|
2594
|
+
typeCheckConfig$e(untrustedConfig, config, getAppActivity_ConfigPropertyMetadata);
|
|
2045
2595
|
return config;
|
|
2046
2596
|
}
|
|
2047
|
-
function validateAdapterConfig$
|
|
2597
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
2048
2598
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2049
2599
|
return null;
|
|
2050
2600
|
}
|
|
2051
2601
|
if (process.env.NODE_ENV !== 'production') {
|
|
2052
2602
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2053
2603
|
}
|
|
2054
|
-
const config = typeCheckConfig$
|
|
2604
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
2055
2605
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2056
2606
|
return null;
|
|
2057
2607
|
}
|
|
2058
2608
|
return config;
|
|
2059
2609
|
}
|
|
2060
|
-
function adapterFragment$
|
|
2061
|
-
createResourceParams$
|
|
2062
|
-
return select$
|
|
2610
|
+
function adapterFragment$7(luvio, config) {
|
|
2611
|
+
createResourceParams$8(config);
|
|
2612
|
+
return select$f();
|
|
2063
2613
|
}
|
|
2064
|
-
function onFetchResponseSuccess$
|
|
2065
|
-
const snapshot = ingestSuccess$
|
|
2614
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
2615
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response, {
|
|
2066
2616
|
config,
|
|
2067
|
-
resolve: () => buildNetworkSnapshot$
|
|
2617
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2068
2618
|
});
|
|
2069
2619
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2070
2620
|
}
|
|
2071
|
-
function onFetchResponseError$
|
|
2072
|
-
const snapshot = ingestError$
|
|
2621
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
2622
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
2073
2623
|
config,
|
|
2074
|
-
resolve: () => buildNetworkSnapshot$
|
|
2624
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2075
2625
|
});
|
|
2076
2626
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2077
2627
|
}
|
|
2078
|
-
function buildNetworkSnapshot$
|
|
2079
|
-
const resourceParams = createResourceParams$
|
|
2080
|
-
const request = createResourceRequest$
|
|
2628
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
2629
|
+
const resourceParams = createResourceParams$8(config);
|
|
2630
|
+
const request = createResourceRequest$8(resourceParams);
|
|
2081
2631
|
return luvio.dispatchResourceRequest(request, options)
|
|
2082
2632
|
.then((response) => {
|
|
2083
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2633
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
2084
2634
|
const cache = new StoreKeyMap();
|
|
2085
|
-
getResponseCacheKeys$
|
|
2635
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
2086
2636
|
return cache;
|
|
2087
2637
|
});
|
|
2088
2638
|
}, (response) => {
|
|
2089
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2639
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
2090
2640
|
});
|
|
2091
2641
|
}
|
|
2092
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2093
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2642
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
2643
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
2094
2644
|
}
|
|
2095
|
-
function buildCachedSnapshotCachePolicy$
|
|
2645
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
2096
2646
|
const { luvio, config } = context;
|
|
2097
2647
|
const selector = {
|
|
2098
|
-
recordId: keyBuilder$
|
|
2099
|
-
node: adapterFragment$
|
|
2648
|
+
recordId: keyBuilder$i(luvio, config),
|
|
2649
|
+
node: adapterFragment$7(luvio, config),
|
|
2100
2650
|
variables: {},
|
|
2101
2651
|
};
|
|
2102
2652
|
const cacheSnapshot = storeLookup(selector, {
|
|
2103
2653
|
config,
|
|
2104
|
-
resolve: () => buildNetworkSnapshot$
|
|
2654
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2105
2655
|
});
|
|
2106
2656
|
return cacheSnapshot;
|
|
2107
2657
|
}
|
|
2108
2658
|
const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppActivity(untrustedConfig, requestContext) {
|
|
2109
|
-
const config = validateAdapterConfig$
|
|
2659
|
+
const config = validateAdapterConfig$8(untrustedConfig, getAppActivity_ConfigPropertyNames);
|
|
2110
2660
|
// Invalid or incomplete config
|
|
2111
2661
|
if (config === null) {
|
|
2112
2662
|
return null;
|
|
2113
2663
|
}
|
|
2114
2664
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2115
|
-
buildCachedSnapshotCachePolicy$
|
|
2665
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
2116
2666
|
};
|
|
2117
|
-
const notifyChangeFactory$
|
|
2667
|
+
const notifyChangeFactory$4 = (luvio, options) => {
|
|
2118
2668
|
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameAndIdNotifyChange(configs) {
|
|
2119
|
-
const keys = configs.map(c => keyBuilder$
|
|
2669
|
+
const keys = configs.map(c => keyBuilder$n(luvio, c));
|
|
2120
2670
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
2121
2671
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
2122
2672
|
const { key, record: val } = entries[i];
|
|
2123
|
-
const refreshRequest = createResourceRequestFromRepresentation$
|
|
2673
|
+
const refreshRequest = createResourceRequestFromRepresentation$4(val);
|
|
2124
2674
|
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
2125
2675
|
.then((response) => {
|
|
2126
2676
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -2305,19 +2855,19 @@ function validate$6(obj, path = 'AssetRepresentation') {
|
|
|
2305
2855
|
return v_error === undefined ? null : v_error;
|
|
2306
2856
|
}
|
|
2307
2857
|
const RepresentationType$6 = 'AssetRepresentation';
|
|
2308
|
-
function keyBuilder$
|
|
2858
|
+
function keyBuilder$h(luvio, config) {
|
|
2309
2859
|
return keyPrefix + '::' + RepresentationType$6 + ':' + config.id;
|
|
2310
2860
|
}
|
|
2311
2861
|
function keyBuilderFromType$3(luvio, object) {
|
|
2312
2862
|
const keyParams = {
|
|
2313
2863
|
id: object.id
|
|
2314
2864
|
};
|
|
2315
|
-
return keyBuilder$
|
|
2865
|
+
return keyBuilder$h(luvio, keyParams);
|
|
2316
2866
|
}
|
|
2317
2867
|
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
2318
2868
|
return input;
|
|
2319
2869
|
}
|
|
2320
|
-
const select$
|
|
2870
|
+
const select$e = function AssetRepresentationSelect() {
|
|
2321
2871
|
return {
|
|
2322
2872
|
kind: 'Fragment',
|
|
2323
2873
|
version: VERSION$6,
|
|
@@ -2389,85 +2939,374 @@ function equals$6(existing, incoming) {
|
|
|
2389
2939
|
if (!(existing_templateAssetSourceName === incoming_templateAssetSourceName)) {
|
|
2390
2940
|
return false;
|
|
2391
2941
|
}
|
|
2392
|
-
const existing_templateSourceId = existing.templateSourceId;
|
|
2393
|
-
const incoming_templateSourceId = incoming.templateSourceId;
|
|
2394
|
-
if (!(existing_templateSourceId === incoming_templateSourceId)) {
|
|
2395
|
-
return false;
|
|
2942
|
+
const existing_templateSourceId = existing.templateSourceId;
|
|
2943
|
+
const incoming_templateSourceId = incoming.templateSourceId;
|
|
2944
|
+
if (!(existing_templateSourceId === incoming_templateSourceId)) {
|
|
2945
|
+
return false;
|
|
2946
|
+
}
|
|
2947
|
+
const existing_type = existing.type;
|
|
2948
|
+
const incoming_type = incoming.type;
|
|
2949
|
+
if (!(existing_type === incoming_type)) {
|
|
2950
|
+
return false;
|
|
2951
|
+
}
|
|
2952
|
+
return true;
|
|
2953
|
+
}
|
|
2954
|
+
const ingest$6 = function AssetRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2955
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2956
|
+
const validateError = validate$6(input);
|
|
2957
|
+
if (validateError !== null) {
|
|
2958
|
+
throw validateError;
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
const key = keyBuilderFromType$3(luvio, input);
|
|
2962
|
+
const ttlToUse = TTL$6;
|
|
2963
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "AppFramework", VERSION$6, RepresentationType$6, equals$6);
|
|
2964
|
+
return createLink(key);
|
|
2965
|
+
};
|
|
2966
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
2967
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2968
|
+
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
2969
|
+
rootKeySet.set(rootKey, {
|
|
2970
|
+
namespace: keyPrefix,
|
|
2971
|
+
representationName: RepresentationType$6,
|
|
2972
|
+
mergeable: false
|
|
2973
|
+
});
|
|
2974
|
+
}
|
|
2975
|
+
|
|
2976
|
+
const TTL$5 = 5000;
|
|
2977
|
+
const VERSION$5 = "1a10175fcc2ad43823e47bfbbdf917f6";
|
|
2978
|
+
function validate$5(obj, path = 'AssetCollectionRepresentation') {
|
|
2979
|
+
const v_error = (() => {
|
|
2980
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2981
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2982
|
+
}
|
|
2983
|
+
const obj_appId = obj.appId;
|
|
2984
|
+
const path_appId = path + '.appId';
|
|
2985
|
+
if (typeof obj_appId !== 'string') {
|
|
2986
|
+
return new TypeError('Expected "string" but received "' + typeof obj_appId + '" (at "' + path_appId + '")');
|
|
2987
|
+
}
|
|
2988
|
+
const obj_assets = obj.assets;
|
|
2989
|
+
const path_assets = path + '.assets';
|
|
2990
|
+
if (!ArrayIsArray(obj_assets)) {
|
|
2991
|
+
return new TypeError('Expected "array" but received "' + typeof obj_assets + '" (at "' + path_assets + '")');
|
|
2992
|
+
}
|
|
2993
|
+
for (let i = 0; i < obj_assets.length; i++) {
|
|
2994
|
+
const obj_assets_item = obj_assets[i];
|
|
2995
|
+
const path_assets_item = path_assets + '[' + i + ']';
|
|
2996
|
+
if (typeof obj_assets_item !== 'object') {
|
|
2997
|
+
return new TypeError('Expected "object" but received "' + typeof obj_assets_item + '" (at "' + path_assets_item + '")');
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
})();
|
|
3001
|
+
return v_error === undefined ? null : v_error;
|
|
3002
|
+
}
|
|
3003
|
+
const RepresentationType$5 = 'AssetCollectionRepresentation';
|
|
3004
|
+
function keyBuilder$g(luvio, config) {
|
|
3005
|
+
return keyPrefix + '::' + RepresentationType$5 + ':' + config.appId;
|
|
3006
|
+
}
|
|
3007
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
3008
|
+
const keyParams = {
|
|
3009
|
+
appId: object.appId
|
|
3010
|
+
};
|
|
3011
|
+
return keyBuilder$g(luvio, keyParams);
|
|
3012
|
+
}
|
|
3013
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
3014
|
+
const input_assets = input.assets;
|
|
3015
|
+
const input_assets_id = path.fullPath + '__assets';
|
|
3016
|
+
for (let i = 0; i < input_assets.length; i++) {
|
|
3017
|
+
const input_assets_item = input_assets[i];
|
|
3018
|
+
let input_assets_item_id = input_assets_id + '__' + i;
|
|
3019
|
+
input_assets[i] = ingest$6(input_assets_item, {
|
|
3020
|
+
fullPath: input_assets_item_id,
|
|
3021
|
+
propertyName: i,
|
|
3022
|
+
parent: {
|
|
3023
|
+
data: input,
|
|
3024
|
+
key: path.fullPath,
|
|
3025
|
+
existing: existing,
|
|
3026
|
+
},
|
|
3027
|
+
ttl: path.ttl
|
|
3028
|
+
}, luvio, store, timestamp);
|
|
3029
|
+
}
|
|
3030
|
+
return input;
|
|
3031
|
+
}
|
|
3032
|
+
const select$d = function AssetCollectionRepresentationSelect() {
|
|
3033
|
+
return {
|
|
3034
|
+
kind: 'Fragment',
|
|
3035
|
+
version: VERSION$5,
|
|
3036
|
+
private: [],
|
|
3037
|
+
selections: [
|
|
3038
|
+
{
|
|
3039
|
+
name: 'appId',
|
|
3040
|
+
kind: 'Scalar'
|
|
3041
|
+
},
|
|
3042
|
+
{
|
|
3043
|
+
name: 'assets',
|
|
3044
|
+
kind: 'Link',
|
|
3045
|
+
plural: true,
|
|
3046
|
+
fragment: select$e()
|
|
3047
|
+
}
|
|
3048
|
+
]
|
|
3049
|
+
};
|
|
3050
|
+
};
|
|
3051
|
+
function equals$5(existing, incoming) {
|
|
3052
|
+
const existing_appId = existing.appId;
|
|
3053
|
+
const incoming_appId = incoming.appId;
|
|
3054
|
+
if (!(existing_appId === incoming_appId)) {
|
|
3055
|
+
return false;
|
|
3056
|
+
}
|
|
3057
|
+
const existing_assets = existing.assets;
|
|
3058
|
+
const incoming_assets = incoming.assets;
|
|
3059
|
+
const equals_assets_items = equalsArray(existing_assets, incoming_assets, (existing_assets_item, incoming_assets_item) => {
|
|
3060
|
+
if (!(existing_assets_item.__ref === incoming_assets_item.__ref)) {
|
|
3061
|
+
return false;
|
|
3062
|
+
}
|
|
3063
|
+
});
|
|
3064
|
+
if (equals_assets_items === false) {
|
|
3065
|
+
return false;
|
|
3066
|
+
}
|
|
3067
|
+
return true;
|
|
3068
|
+
}
|
|
3069
|
+
const ingest$5 = function AssetCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3070
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3071
|
+
const validateError = validate$5(input);
|
|
3072
|
+
if (validateError !== null) {
|
|
3073
|
+
throw validateError;
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
3077
|
+
const ttlToUse = TTL$5;
|
|
3078
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "AppFramework", VERSION$5, RepresentationType$5, equals$5);
|
|
3079
|
+
return createLink(key);
|
|
3080
|
+
};
|
|
3081
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
3082
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3083
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
3084
|
+
rootKeySet.set(rootKey, {
|
|
3085
|
+
namespace: keyPrefix,
|
|
3086
|
+
representationName: RepresentationType$5,
|
|
3087
|
+
mergeable: false
|
|
3088
|
+
});
|
|
3089
|
+
const input_assets_length = input.assets.length;
|
|
3090
|
+
for (let i = 0; i < input_assets_length; i++) {
|
|
3091
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.assets[i]);
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
function select$c(luvio, params) {
|
|
3096
|
+
return select$d();
|
|
3097
|
+
}
|
|
3098
|
+
function keyBuilder$f(luvio, params) {
|
|
3099
|
+
return keyBuilder$g(luvio, {
|
|
3100
|
+
appId: params.urlParams.appIdOrApiName
|
|
3101
|
+
});
|
|
3102
|
+
}
|
|
3103
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
3104
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response);
|
|
3105
|
+
}
|
|
3106
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
3107
|
+
const { body } = response;
|
|
3108
|
+
const key = keyBuilder$f(luvio, resourceParams);
|
|
3109
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3110
|
+
const snapshot = luvio.storeLookup({
|
|
3111
|
+
recordId: key,
|
|
3112
|
+
node: select$c(),
|
|
3113
|
+
variables: {},
|
|
3114
|
+
}, snapshotRefresh);
|
|
3115
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3116
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3117
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
deepFreeze(snapshot.data);
|
|
3121
|
+
return snapshot;
|
|
3122
|
+
}
|
|
3123
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
3124
|
+
const key = keyBuilder$f(luvio, params);
|
|
3125
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3126
|
+
const storeMetadataParams = {
|
|
3127
|
+
ttl: TTL$5,
|
|
3128
|
+
namespace: keyPrefix,
|
|
3129
|
+
version: VERSION$5,
|
|
3130
|
+
representationName: RepresentationType$5
|
|
3131
|
+
};
|
|
3132
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3133
|
+
return errorSnapshot;
|
|
3134
|
+
}
|
|
3135
|
+
function createResourceRequest$7(config) {
|
|
3136
|
+
const headers = {};
|
|
3137
|
+
return {
|
|
3138
|
+
baseUri: '/services/data/v63.0',
|
|
3139
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '/assets',
|
|
3140
|
+
method: 'get',
|
|
3141
|
+
body: null,
|
|
3142
|
+
urlParams: config.urlParams,
|
|
3143
|
+
queryParams: config.queryParams,
|
|
3144
|
+
headers,
|
|
3145
|
+
priority: 'normal',
|
|
3146
|
+
};
|
|
3147
|
+
}
|
|
3148
|
+
function createResourceRequestFromRepresentation$3(representation) {
|
|
3149
|
+
const config = {
|
|
3150
|
+
urlParams: {},
|
|
3151
|
+
queryParams: {},
|
|
3152
|
+
};
|
|
3153
|
+
config.urlParams.appIdOrApiName = representation.appId;
|
|
3154
|
+
return createResourceRequest$7(config);
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
const adapterName$7 = 'getAppAssets';
|
|
3158
|
+
const getAppAssets_ConfigPropertyMetadata = [
|
|
3159
|
+
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3160
|
+
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3161
|
+
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3162
|
+
];
|
|
3163
|
+
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getAppAssets_ConfigPropertyMetadata);
|
|
3164
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$e(getAppAssets_ConfigPropertyMetadata);
|
|
3165
|
+
function keyBuilder$e(luvio, config) {
|
|
3166
|
+
const resourceParams = createResourceParams$7(config);
|
|
3167
|
+
return keyBuilder$f(luvio, resourceParams);
|
|
3168
|
+
}
|
|
3169
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
3170
|
+
const config = {};
|
|
3171
|
+
typeCheckConfig$e(untrustedConfig, config, getAppAssets_ConfigPropertyMetadata);
|
|
3172
|
+
return config;
|
|
3173
|
+
}
|
|
3174
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
3175
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3176
|
+
return null;
|
|
3177
|
+
}
|
|
3178
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3179
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2396
3180
|
}
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
return false;
|
|
3181
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
3182
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3183
|
+
return null;
|
|
2401
3184
|
}
|
|
2402
|
-
return
|
|
3185
|
+
return config;
|
|
2403
3186
|
}
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
3187
|
+
function adapterFragment$6(luvio, config) {
|
|
3188
|
+
createResourceParams$7(config);
|
|
3189
|
+
return select$c();
|
|
3190
|
+
}
|
|
3191
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
3192
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
3193
|
+
config,
|
|
3194
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
3195
|
+
});
|
|
3196
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3197
|
+
}
|
|
3198
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
3199
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
3200
|
+
config,
|
|
3201
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
3202
|
+
});
|
|
3203
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3204
|
+
}
|
|
3205
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
3206
|
+
const resourceParams = createResourceParams$7(config);
|
|
3207
|
+
const request = createResourceRequest$7(resourceParams);
|
|
3208
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3209
|
+
.then((response) => {
|
|
3210
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
3211
|
+
const cache = new StoreKeyMap();
|
|
3212
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
3213
|
+
return cache;
|
|
3214
|
+
});
|
|
3215
|
+
}, (response) => {
|
|
3216
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
3217
|
+
});
|
|
3218
|
+
}
|
|
3219
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
3220
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
3221
|
+
}
|
|
3222
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
3223
|
+
const { luvio, config } = context;
|
|
3224
|
+
const selector = {
|
|
3225
|
+
recordId: keyBuilder$e(luvio, config),
|
|
3226
|
+
node: adapterFragment$6(luvio, config),
|
|
3227
|
+
variables: {},
|
|
3228
|
+
};
|
|
3229
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3230
|
+
config,
|
|
3231
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
2423
3232
|
});
|
|
3233
|
+
return cacheSnapshot;
|
|
2424
3234
|
}
|
|
3235
|
+
const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAssets(untrustedConfig, requestContext) {
|
|
3236
|
+
const config = validateAdapterConfig$7(untrustedConfig, getAppAssets_ConfigPropertyNames);
|
|
3237
|
+
// Invalid or incomplete config
|
|
3238
|
+
if (config === null) {
|
|
3239
|
+
return null;
|
|
3240
|
+
}
|
|
3241
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3242
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
3243
|
+
};
|
|
3244
|
+
const notifyChangeFactory$3 = (luvio, options) => {
|
|
3245
|
+
return function getAppFrameworkAppsAssetsByAppIdOrApiNameNotifyChange(configs) {
|
|
3246
|
+
const keys = configs.map(c => keyBuilder$g(luvio, c));
|
|
3247
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
3248
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
3249
|
+
const { key, record: val } = entries[i];
|
|
3250
|
+
const refreshRequest = createResourceRequestFromRepresentation$3(val);
|
|
3251
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
3252
|
+
.then((response) => {
|
|
3253
|
+
return luvio.handleSuccessResponse(() => {
|
|
3254
|
+
const { body } = response;
|
|
3255
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
3256
|
+
return luvio.storeBroadcast();
|
|
3257
|
+
}, () => {
|
|
3258
|
+
const cache = new StoreKeyMap();
|
|
3259
|
+
getTypeCacheKeys$5(cache, luvio, response.body);
|
|
3260
|
+
return cache;
|
|
3261
|
+
});
|
|
3262
|
+
}, (error) => {
|
|
3263
|
+
return luvio.handleErrorResponse(() => {
|
|
3264
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
3265
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
3266
|
+
ttl: TTL$5,
|
|
3267
|
+
namespace: keyPrefix,
|
|
3268
|
+
version: VERSION$5,
|
|
3269
|
+
representationName: RepresentationType$5
|
|
3270
|
+
});
|
|
3271
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
3272
|
+
});
|
|
3273
|
+
});
|
|
3274
|
+
}
|
|
3275
|
+
});
|
|
3276
|
+
};
|
|
3277
|
+
};
|
|
2425
3278
|
|
|
2426
|
-
const TTL$
|
|
2427
|
-
const VERSION$
|
|
2428
|
-
function validate$
|
|
3279
|
+
const TTL$4 = 5000;
|
|
3280
|
+
const VERSION$4 = "2dd7266897d8b84ea0207582ca533d29";
|
|
3281
|
+
function validate$4(obj, path = 'AppCollectionRepresentation') {
|
|
2429
3282
|
const v_error = (() => {
|
|
2430
3283
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2431
3284
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2432
3285
|
}
|
|
2433
|
-
const
|
|
2434
|
-
const
|
|
2435
|
-
if (
|
|
2436
|
-
return new TypeError('Expected "
|
|
2437
|
-
}
|
|
2438
|
-
const obj_assets = obj.assets;
|
|
2439
|
-
const path_assets = path + '.assets';
|
|
2440
|
-
if (!ArrayIsArray(obj_assets)) {
|
|
2441
|
-
return new TypeError('Expected "array" but received "' + typeof obj_assets + '" (at "' + path_assets + '")');
|
|
3286
|
+
const obj_apps = obj.apps;
|
|
3287
|
+
const path_apps = path + '.apps';
|
|
3288
|
+
if (!ArrayIsArray(obj_apps)) {
|
|
3289
|
+
return new TypeError('Expected "array" but received "' + typeof obj_apps + '" (at "' + path_apps + '")');
|
|
2442
3290
|
}
|
|
2443
|
-
for (let i = 0; i <
|
|
2444
|
-
const
|
|
2445
|
-
const
|
|
2446
|
-
if (typeof
|
|
2447
|
-
return new TypeError('Expected "object" but received "' + typeof
|
|
3291
|
+
for (let i = 0; i < obj_apps.length; i++) {
|
|
3292
|
+
const obj_apps_item = obj_apps[i];
|
|
3293
|
+
const path_apps_item = path_apps + '[' + i + ']';
|
|
3294
|
+
if (typeof obj_apps_item !== 'object') {
|
|
3295
|
+
return new TypeError('Expected "object" but received "' + typeof obj_apps_item + '" (at "' + path_apps_item + '")');
|
|
2448
3296
|
}
|
|
2449
3297
|
}
|
|
2450
3298
|
})();
|
|
2451
3299
|
return v_error === undefined ? null : v_error;
|
|
2452
3300
|
}
|
|
2453
|
-
const RepresentationType$
|
|
2454
|
-
function
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
}
|
|
2463
|
-
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
2464
|
-
const input_assets = input.assets;
|
|
2465
|
-
const input_assets_id = path.fullPath + '__assets';
|
|
2466
|
-
for (let i = 0; i < input_assets.length; i++) {
|
|
2467
|
-
const input_assets_item = input_assets[i];
|
|
2468
|
-
let input_assets_item_id = input_assets_id + '__' + i;
|
|
2469
|
-
input_assets[i] = ingest$6(input_assets_item, {
|
|
2470
|
-
fullPath: input_assets_item_id,
|
|
3301
|
+
const RepresentationType$4 = 'AppCollectionRepresentation';
|
|
3302
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
3303
|
+
const input_apps = input.apps;
|
|
3304
|
+
const input_apps_id = path.fullPath + '__apps';
|
|
3305
|
+
for (let i = 0; i < input_apps.length; i++) {
|
|
3306
|
+
const input_apps_item = input_apps[i];
|
|
3307
|
+
let input_apps_item_id = input_apps_id + '__' + i;
|
|
3308
|
+
input_apps[i] = ingest$b(input_apps_item, {
|
|
3309
|
+
fullPath: input_apps_item_id,
|
|
2471
3310
|
propertyName: i,
|
|
2472
3311
|
parent: {
|
|
2473
3312
|
data: input,
|
|
@@ -2479,66 +3318,57 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
2479
3318
|
}
|
|
2480
3319
|
return input;
|
|
2481
3320
|
}
|
|
2482
|
-
const select$b = function
|
|
3321
|
+
const select$b = function AppCollectionRepresentationSelect() {
|
|
2483
3322
|
return {
|
|
2484
3323
|
kind: 'Fragment',
|
|
2485
|
-
version: VERSION$
|
|
3324
|
+
version: VERSION$4,
|
|
2486
3325
|
private: [],
|
|
2487
3326
|
selections: [
|
|
2488
3327
|
{
|
|
2489
|
-
name: '
|
|
2490
|
-
kind: 'Scalar'
|
|
2491
|
-
},
|
|
2492
|
-
{
|
|
2493
|
-
name: 'assets',
|
|
3328
|
+
name: 'apps',
|
|
2494
3329
|
kind: 'Link',
|
|
2495
3330
|
plural: true,
|
|
2496
|
-
fragment: select$
|
|
3331
|
+
fragment: select$o()
|
|
2497
3332
|
}
|
|
2498
3333
|
]
|
|
2499
3334
|
};
|
|
2500
3335
|
};
|
|
2501
|
-
function equals$
|
|
2502
|
-
const
|
|
2503
|
-
const
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
}
|
|
2507
|
-
const existing_assets = existing.assets;
|
|
2508
|
-
const incoming_assets = incoming.assets;
|
|
2509
|
-
const equals_assets_items = equalsArray(existing_assets, incoming_assets, (existing_assets_item, incoming_assets_item) => {
|
|
2510
|
-
if (!(existing_assets_item.__ref === incoming_assets_item.__ref)) {
|
|
3336
|
+
function equals$4(existing, incoming) {
|
|
3337
|
+
const existing_apps = existing.apps;
|
|
3338
|
+
const incoming_apps = incoming.apps;
|
|
3339
|
+
const equals_apps_items = equalsArray(existing_apps, incoming_apps, (existing_apps_item, incoming_apps_item) => {
|
|
3340
|
+
if (!(existing_apps_item.__ref === incoming_apps_item.__ref)) {
|
|
2511
3341
|
return false;
|
|
2512
3342
|
}
|
|
2513
3343
|
});
|
|
2514
|
-
if (
|
|
3344
|
+
if (equals_apps_items === false) {
|
|
2515
3345
|
return false;
|
|
2516
3346
|
}
|
|
2517
3347
|
return true;
|
|
2518
3348
|
}
|
|
2519
|
-
const ingest$
|
|
3349
|
+
const ingest$4 = function AppCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2520
3350
|
if (process.env.NODE_ENV !== 'production') {
|
|
2521
|
-
const validateError = validate$
|
|
3351
|
+
const validateError = validate$4(input);
|
|
2522
3352
|
if (validateError !== null) {
|
|
2523
3353
|
throw validateError;
|
|
2524
3354
|
}
|
|
2525
3355
|
}
|
|
2526
|
-
const key =
|
|
2527
|
-
const ttlToUse = TTL$
|
|
2528
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3356
|
+
const key = path.fullPath;
|
|
3357
|
+
const ttlToUse = TTL$4;
|
|
3358
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "AppFramework", VERSION$4, RepresentationType$4, equals$4);
|
|
2529
3359
|
return createLink(key);
|
|
2530
3360
|
};
|
|
2531
|
-
function getTypeCacheKeys$
|
|
3361
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
2532
3362
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2533
|
-
const rootKey =
|
|
3363
|
+
const rootKey = fullPathFactory();
|
|
2534
3364
|
rootKeySet.set(rootKey, {
|
|
2535
3365
|
namespace: keyPrefix,
|
|
2536
|
-
representationName: RepresentationType$
|
|
3366
|
+
representationName: RepresentationType$4,
|
|
2537
3367
|
mergeable: false
|
|
2538
3368
|
});
|
|
2539
|
-
const
|
|
2540
|
-
for (let i = 0; i <
|
|
2541
|
-
getTypeCacheKeys$
|
|
3369
|
+
const input_apps_length = input.apps.length;
|
|
3370
|
+
for (let i = 0; i < input_apps_length; i++) {
|
|
3371
|
+
getTypeCacheKeys$b(rootKeySet, luvio, input.apps[i]);
|
|
2542
3372
|
}
|
|
2543
3373
|
}
|
|
2544
3374
|
|
|
@@ -2546,17 +3376,15 @@ function select$a(luvio, params) {
|
|
|
2546
3376
|
return select$b();
|
|
2547
3377
|
}
|
|
2548
3378
|
function keyBuilder$d(luvio, params) {
|
|
2549
|
-
return
|
|
2550
|
-
appId: params.urlParams.appIdOrApiName
|
|
2551
|
-
});
|
|
3379
|
+
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ',' + 'type:' + params.queryParams.type + ')';
|
|
2552
3380
|
}
|
|
2553
|
-
function getResponseCacheKeys$
|
|
2554
|
-
getTypeCacheKeys$
|
|
3381
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
3382
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$d(luvio, resourceParams));
|
|
2555
3383
|
}
|
|
2556
|
-
function ingestSuccess$
|
|
3384
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
2557
3385
|
const { body } = response;
|
|
2558
3386
|
const key = keyBuilder$d(luvio, resourceParams);
|
|
2559
|
-
luvio.storeIngest(key, ingest$
|
|
3387
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2560
3388
|
const snapshot = luvio.storeLookup({
|
|
2561
3389
|
recordId: key,
|
|
2562
3390
|
node: select$a(),
|
|
@@ -2574,92 +3402,83 @@ function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
|
2574
3402
|
const key = keyBuilder$d(luvio, params);
|
|
2575
3403
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2576
3404
|
const storeMetadataParams = {
|
|
2577
|
-
ttl: TTL$
|
|
3405
|
+
ttl: TTL$4,
|
|
2578
3406
|
namespace: keyPrefix,
|
|
2579
|
-
version: VERSION$
|
|
2580
|
-
representationName: RepresentationType$
|
|
3407
|
+
version: VERSION$4,
|
|
3408
|
+
representationName: RepresentationType$4
|
|
2581
3409
|
};
|
|
2582
3410
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2583
3411
|
return errorSnapshot;
|
|
2584
3412
|
}
|
|
2585
|
-
function createResourceRequest$
|
|
3413
|
+
function createResourceRequest$6(config) {
|
|
2586
3414
|
const headers = {};
|
|
2587
3415
|
return {
|
|
2588
3416
|
baseUri: '/services/data/v63.0',
|
|
2589
|
-
basePath: '/app-framework/apps
|
|
3417
|
+
basePath: '/app-framework/apps',
|
|
2590
3418
|
method: 'get',
|
|
2591
3419
|
body: null,
|
|
2592
|
-
urlParams: config.urlParams,
|
|
2593
|
-
queryParams: config.queryParams,
|
|
2594
|
-
headers,
|
|
2595
|
-
priority: 'normal',
|
|
2596
|
-
};
|
|
2597
|
-
}
|
|
2598
|
-
function createResourceRequestFromRepresentation$2(representation) {
|
|
2599
|
-
const config = {
|
|
2600
3420
|
urlParams: {},
|
|
2601
|
-
queryParams:
|
|
3421
|
+
queryParams: config.queryParams,
|
|
3422
|
+
headers,
|
|
3423
|
+
priority: 'normal',
|
|
2602
3424
|
};
|
|
2603
|
-
config.urlParams.appIdOrApiName = representation.appId;
|
|
2604
|
-
return createResourceRequest$5(config);
|
|
2605
3425
|
}
|
|
2606
3426
|
|
|
2607
|
-
const adapterName$
|
|
2608
|
-
const
|
|
2609
|
-
generateParamConfigMetadata('
|
|
2610
|
-
generateParamConfigMetadata('
|
|
2611
|
-
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3427
|
+
const adapterName$6 = 'getApps';
|
|
3428
|
+
const getApps_ConfigPropertyMetadata = [
|
|
3429
|
+
generateParamConfigMetadata('templateSourceId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3430
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2612
3431
|
];
|
|
2613
|
-
const
|
|
2614
|
-
const createResourceParams$
|
|
3432
|
+
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getApps_ConfigPropertyMetadata);
|
|
3433
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$e(getApps_ConfigPropertyMetadata);
|
|
2615
3434
|
function keyBuilder$c(luvio, config) {
|
|
2616
|
-
const resourceParams = createResourceParams$
|
|
3435
|
+
const resourceParams = createResourceParams$6(config);
|
|
2617
3436
|
return keyBuilder$d(luvio, resourceParams);
|
|
2618
3437
|
}
|
|
2619
|
-
function typeCheckConfig$
|
|
3438
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
2620
3439
|
const config = {};
|
|
2621
|
-
typeCheckConfig$
|
|
3440
|
+
typeCheckConfig$e(untrustedConfig, config, getApps_ConfigPropertyMetadata);
|
|
2622
3441
|
return config;
|
|
2623
3442
|
}
|
|
2624
|
-
function validateAdapterConfig$
|
|
3443
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
2625
3444
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2626
3445
|
return null;
|
|
2627
3446
|
}
|
|
2628
3447
|
if (process.env.NODE_ENV !== 'production') {
|
|
2629
3448
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2630
3449
|
}
|
|
2631
|
-
const config = typeCheckConfig$
|
|
3450
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
2632
3451
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2633
3452
|
return null;
|
|
2634
3453
|
}
|
|
2635
3454
|
return config;
|
|
2636
3455
|
}
|
|
2637
3456
|
function adapterFragment$5(luvio, config) {
|
|
2638
|
-
createResourceParams$
|
|
3457
|
+
createResourceParams$6(config);
|
|
2639
3458
|
return select$a();
|
|
2640
3459
|
}
|
|
2641
3460
|
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
2642
|
-
const snapshot = ingestSuccess$
|
|
3461
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
2643
3462
|
config,
|
|
2644
|
-
resolve: () => buildNetworkSnapshot$
|
|
3463
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2645
3464
|
});
|
|
2646
3465
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2647
3466
|
}
|
|
2648
3467
|
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
2649
3468
|
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
2650
3469
|
config,
|
|
2651
|
-
resolve: () => buildNetworkSnapshot$
|
|
3470
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2652
3471
|
});
|
|
2653
3472
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2654
3473
|
}
|
|
2655
|
-
function buildNetworkSnapshot$
|
|
2656
|
-
const resourceParams = createResourceParams$
|
|
2657
|
-
const request = createResourceRequest$
|
|
3474
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
3475
|
+
const resourceParams = createResourceParams$6(config);
|
|
3476
|
+
const request = createResourceRequest$6(resourceParams);
|
|
2658
3477
|
return luvio.dispatchResourceRequest(request, options)
|
|
2659
3478
|
.then((response) => {
|
|
2660
3479
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
2661
3480
|
const cache = new StoreKeyMap();
|
|
2662
|
-
getResponseCacheKeys$
|
|
3481
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
2663
3482
|
return cache;
|
|
2664
3483
|
});
|
|
2665
3484
|
}, (response) => {
|
|
@@ -2667,7 +3486,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
2667
3486
|
});
|
|
2668
3487
|
}
|
|
2669
3488
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
2670
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3489
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
2671
3490
|
}
|
|
2672
3491
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
2673
3492
|
const { luvio, config } = context;
|
|
@@ -2678,12 +3497,12 @@ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
|
2678
3497
|
};
|
|
2679
3498
|
const cacheSnapshot = storeLookup(selector, {
|
|
2680
3499
|
config,
|
|
2681
|
-
resolve: () => buildNetworkSnapshot$
|
|
3500
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
2682
3501
|
});
|
|
2683
3502
|
return cacheSnapshot;
|
|
2684
3503
|
}
|
|
2685
|
-
const
|
|
2686
|
-
const config = validateAdapterConfig$
|
|
3504
|
+
const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untrustedConfig, requestContext) {
|
|
3505
|
+
const config = validateAdapterConfig$6(untrustedConfig, getApps_ConfigPropertyNames);
|
|
2687
3506
|
// Invalid or incomplete config
|
|
2688
3507
|
if (config === null) {
|
|
2689
3508
|
return null;
|
|
@@ -2691,72 +3510,38 @@ const getAppAssetsAdapterFactory = (luvio) => function AppFramework__getAppAsset
|
|
|
2691
3510
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2692
3511
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
2693
3512
|
};
|
|
2694
|
-
const notifyChangeFactory$2 = (luvio, options) => {
|
|
2695
|
-
return function getAppFrameworkAppsAssetsByAppIdOrApiNameNotifyChange(configs) {
|
|
2696
|
-
const keys = configs.map(c => keyBuilder$e(luvio, c));
|
|
2697
|
-
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
2698
|
-
for (let i = 0, len = entries.length; i < len; i++) {
|
|
2699
|
-
const { key, record: val } = entries[i];
|
|
2700
|
-
const refreshRequest = createResourceRequestFromRepresentation$2(val);
|
|
2701
|
-
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
2702
|
-
.then((response) => {
|
|
2703
|
-
return luvio.handleSuccessResponse(() => {
|
|
2704
|
-
const { body } = response;
|
|
2705
|
-
luvio.storeIngest(key, ingest$5, body);
|
|
2706
|
-
return luvio.storeBroadcast();
|
|
2707
|
-
}, () => {
|
|
2708
|
-
const cache = new StoreKeyMap();
|
|
2709
|
-
getTypeCacheKeys$5(cache, luvio, response.body);
|
|
2710
|
-
return cache;
|
|
2711
|
-
});
|
|
2712
|
-
}, (error) => {
|
|
2713
|
-
return luvio.handleErrorResponse(() => {
|
|
2714
|
-
const errorSnapshot = luvio.errorSnapshot(error);
|
|
2715
|
-
luvio.storeIngestError(key, errorSnapshot, {
|
|
2716
|
-
ttl: TTL$5,
|
|
2717
|
-
namespace: keyPrefix,
|
|
2718
|
-
version: VERSION$5,
|
|
2719
|
-
representationName: RepresentationType$5
|
|
2720
|
-
});
|
|
2721
|
-
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
2722
|
-
});
|
|
2723
|
-
});
|
|
2724
|
-
}
|
|
2725
|
-
});
|
|
2726
|
-
};
|
|
2727
|
-
};
|
|
2728
3513
|
|
|
2729
|
-
const TTL$
|
|
2730
|
-
const VERSION$
|
|
2731
|
-
function validate$
|
|
3514
|
+
const TTL$3 = 5000;
|
|
3515
|
+
const VERSION$3 = "4b0d1bee319e31459f529b802621d6b8";
|
|
3516
|
+
function validate$3(obj, path = 'InstalledAssetCollectionRepresentation') {
|
|
2732
3517
|
const v_error = (() => {
|
|
2733
3518
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2734
3519
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2735
3520
|
}
|
|
2736
|
-
const
|
|
2737
|
-
const
|
|
2738
|
-
if (!ArrayIsArray(
|
|
2739
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
3521
|
+
const obj_assets = obj.assets;
|
|
3522
|
+
const path_assets = path + '.assets';
|
|
3523
|
+
if (!ArrayIsArray(obj_assets)) {
|
|
3524
|
+
return new TypeError('Expected "array" but received "' + typeof obj_assets + '" (at "' + path_assets + '")');
|
|
2740
3525
|
}
|
|
2741
|
-
for (let i = 0; i <
|
|
2742
|
-
const
|
|
2743
|
-
const
|
|
2744
|
-
if (typeof
|
|
2745
|
-
return new TypeError('Expected "object" but received "' + typeof
|
|
3526
|
+
for (let i = 0; i < obj_assets.length; i++) {
|
|
3527
|
+
const obj_assets_item = obj_assets[i];
|
|
3528
|
+
const path_assets_item = path_assets + '[' + i + ']';
|
|
3529
|
+
if (typeof obj_assets_item !== 'object') {
|
|
3530
|
+
return new TypeError('Expected "object" but received "' + typeof obj_assets_item + '" (at "' + path_assets_item + '")');
|
|
2746
3531
|
}
|
|
2747
3532
|
}
|
|
2748
3533
|
})();
|
|
2749
3534
|
return v_error === undefined ? null : v_error;
|
|
2750
3535
|
}
|
|
2751
|
-
const RepresentationType$
|
|
2752
|
-
function normalize$
|
|
2753
|
-
const
|
|
2754
|
-
const
|
|
2755
|
-
for (let i = 0; i <
|
|
2756
|
-
const
|
|
2757
|
-
let
|
|
2758
|
-
|
|
2759
|
-
fullPath:
|
|
3536
|
+
const RepresentationType$3 = 'InstalledAssetCollectionRepresentation';
|
|
3537
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3538
|
+
const input_assets = input.assets;
|
|
3539
|
+
const input_assets_id = path.fullPath + '__assets';
|
|
3540
|
+
for (let i = 0; i < input_assets.length; i++) {
|
|
3541
|
+
const input_assets_item = input_assets[i];
|
|
3542
|
+
let input_assets_item_id = input_assets_id + '__' + i;
|
|
3543
|
+
input_assets[i] = ingest$6(input_assets_item, {
|
|
3544
|
+
fullPath: input_assets_item_id,
|
|
2760
3545
|
propertyName: i,
|
|
2761
3546
|
parent: {
|
|
2762
3547
|
data: input,
|
|
@@ -2768,57 +3553,57 @@ function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
|
2768
3553
|
}
|
|
2769
3554
|
return input;
|
|
2770
3555
|
}
|
|
2771
|
-
const select$9 = function
|
|
3556
|
+
const select$9 = function InstalledAssetCollectionRepresentationSelect() {
|
|
2772
3557
|
return {
|
|
2773
3558
|
kind: 'Fragment',
|
|
2774
|
-
version: VERSION$
|
|
3559
|
+
version: VERSION$3,
|
|
2775
3560
|
private: [],
|
|
2776
3561
|
selections: [
|
|
2777
3562
|
{
|
|
2778
|
-
name: '
|
|
3563
|
+
name: 'assets',
|
|
2779
3564
|
kind: 'Link',
|
|
2780
3565
|
plural: true,
|
|
2781
|
-
fragment: select$
|
|
3566
|
+
fragment: select$e()
|
|
2782
3567
|
}
|
|
2783
3568
|
]
|
|
2784
3569
|
};
|
|
2785
3570
|
};
|
|
2786
|
-
function equals$
|
|
2787
|
-
const
|
|
2788
|
-
const
|
|
2789
|
-
const
|
|
2790
|
-
if (!(
|
|
3571
|
+
function equals$3(existing, incoming) {
|
|
3572
|
+
const existing_assets = existing.assets;
|
|
3573
|
+
const incoming_assets = incoming.assets;
|
|
3574
|
+
const equals_assets_items = equalsArray(existing_assets, incoming_assets, (existing_assets_item, incoming_assets_item) => {
|
|
3575
|
+
if (!(existing_assets_item.__ref === incoming_assets_item.__ref)) {
|
|
2791
3576
|
return false;
|
|
2792
3577
|
}
|
|
2793
3578
|
});
|
|
2794
|
-
if (
|
|
3579
|
+
if (equals_assets_items === false) {
|
|
2795
3580
|
return false;
|
|
2796
3581
|
}
|
|
2797
3582
|
return true;
|
|
2798
3583
|
}
|
|
2799
|
-
const ingest$
|
|
3584
|
+
const ingest$3 = function InstalledAssetCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2800
3585
|
if (process.env.NODE_ENV !== 'production') {
|
|
2801
|
-
const validateError = validate$
|
|
3586
|
+
const validateError = validate$3(input);
|
|
2802
3587
|
if (validateError !== null) {
|
|
2803
3588
|
throw validateError;
|
|
2804
3589
|
}
|
|
2805
3590
|
}
|
|
2806
3591
|
const key = path.fullPath;
|
|
2807
|
-
const ttlToUse = TTL$
|
|
2808
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3592
|
+
const ttlToUse = TTL$3;
|
|
3593
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "AppFramework", VERSION$3, RepresentationType$3, equals$3);
|
|
2809
3594
|
return createLink(key);
|
|
2810
3595
|
};
|
|
2811
|
-
function getTypeCacheKeys$
|
|
3596
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
2812
3597
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2813
3598
|
const rootKey = fullPathFactory();
|
|
2814
3599
|
rootKeySet.set(rootKey, {
|
|
2815
3600
|
namespace: keyPrefix,
|
|
2816
|
-
representationName: RepresentationType$
|
|
3601
|
+
representationName: RepresentationType$3,
|
|
2817
3602
|
mergeable: false
|
|
2818
3603
|
});
|
|
2819
|
-
const
|
|
2820
|
-
for (let i = 0; i <
|
|
2821
|
-
getTypeCacheKeys$
|
|
3604
|
+
const input_assets_length = input.assets.length;
|
|
3605
|
+
for (let i = 0; i < input_assets_length; i++) {
|
|
3606
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.assets[i]);
|
|
2822
3607
|
}
|
|
2823
3608
|
}
|
|
2824
3609
|
|
|
@@ -2826,15 +3611,15 @@ function select$8(luvio, params) {
|
|
|
2826
3611
|
return select$9();
|
|
2827
3612
|
}
|
|
2828
3613
|
function keyBuilder$b(luvio, params) {
|
|
2829
|
-
return keyPrefix + '::
|
|
3614
|
+
return keyPrefix + '::InstalledAssetCollectionRepresentation:(' + 'assetIdOrName:' + params.queryParams.assetIdOrName + ',' + 'assetType:' + params.queryParams.assetType + ')';
|
|
2830
3615
|
}
|
|
2831
|
-
function getResponseCacheKeys$
|
|
2832
|
-
getTypeCacheKeys$
|
|
3616
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
3617
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$b(luvio, resourceParams));
|
|
2833
3618
|
}
|
|
2834
|
-
function ingestSuccess$
|
|
3619
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
2835
3620
|
const { body } = response;
|
|
2836
3621
|
const key = keyBuilder$b(luvio, resourceParams);
|
|
2837
|
-
luvio.storeIngest(key, ingest$
|
|
3622
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
2838
3623
|
const snapshot = luvio.storeLookup({
|
|
2839
3624
|
recordId: key,
|
|
2840
3625
|
node: select$8(),
|
|
@@ -2852,19 +3637,19 @@ function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
|
2852
3637
|
const key = keyBuilder$b(luvio, params);
|
|
2853
3638
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2854
3639
|
const storeMetadataParams = {
|
|
2855
|
-
ttl: TTL$
|
|
3640
|
+
ttl: TTL$3,
|
|
2856
3641
|
namespace: keyPrefix,
|
|
2857
|
-
version: VERSION$
|
|
2858
|
-
representationName: RepresentationType$
|
|
3642
|
+
version: VERSION$3,
|
|
3643
|
+
representationName: RepresentationType$3
|
|
2859
3644
|
};
|
|
2860
3645
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2861
3646
|
return errorSnapshot;
|
|
2862
3647
|
}
|
|
2863
|
-
function createResourceRequest$
|
|
3648
|
+
function createResourceRequest$5(config) {
|
|
2864
3649
|
const headers = {};
|
|
2865
3650
|
return {
|
|
2866
3651
|
baseUri: '/services/data/v63.0',
|
|
2867
|
-
basePath: '/app-framework/
|
|
3652
|
+
basePath: '/app-framework/installed-assets',
|
|
2868
3653
|
method: 'get',
|
|
2869
3654
|
body: null,
|
|
2870
3655
|
urlParams: {},
|
|
@@ -2874,61 +3659,61 @@ function createResourceRequest$4(config) {
|
|
|
2874
3659
|
};
|
|
2875
3660
|
}
|
|
2876
3661
|
|
|
2877
|
-
const adapterName$
|
|
2878
|
-
const
|
|
2879
|
-
generateParamConfigMetadata('
|
|
2880
|
-
generateParamConfigMetadata('
|
|
3662
|
+
const adapterName$5 = 'getInstalledAssets';
|
|
3663
|
+
const getInstalledAssets_ConfigPropertyMetadata = [
|
|
3664
|
+
generateParamConfigMetadata('assetIdOrName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3665
|
+
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2881
3666
|
];
|
|
2882
|
-
const
|
|
2883
|
-
const createResourceParams$
|
|
3667
|
+
const getInstalledAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getInstalledAssets_ConfigPropertyMetadata);
|
|
3668
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$e(getInstalledAssets_ConfigPropertyMetadata);
|
|
2884
3669
|
function keyBuilder$a(luvio, config) {
|
|
2885
|
-
const resourceParams = createResourceParams$
|
|
3670
|
+
const resourceParams = createResourceParams$5(config);
|
|
2886
3671
|
return keyBuilder$b(luvio, resourceParams);
|
|
2887
3672
|
}
|
|
2888
|
-
function typeCheckConfig$
|
|
3673
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2889
3674
|
const config = {};
|
|
2890
|
-
typeCheckConfig$
|
|
3675
|
+
typeCheckConfig$e(untrustedConfig, config, getInstalledAssets_ConfigPropertyMetadata);
|
|
2891
3676
|
return config;
|
|
2892
3677
|
}
|
|
2893
|
-
function validateAdapterConfig$
|
|
3678
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2894
3679
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2895
3680
|
return null;
|
|
2896
3681
|
}
|
|
2897
3682
|
if (process.env.NODE_ENV !== 'production') {
|
|
2898
3683
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2899
3684
|
}
|
|
2900
|
-
const config = typeCheckConfig$
|
|
3685
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2901
3686
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2902
3687
|
return null;
|
|
2903
3688
|
}
|
|
2904
3689
|
return config;
|
|
2905
3690
|
}
|
|
2906
3691
|
function adapterFragment$4(luvio, config) {
|
|
2907
|
-
createResourceParams$
|
|
3692
|
+
createResourceParams$5(config);
|
|
2908
3693
|
return select$8();
|
|
2909
3694
|
}
|
|
2910
3695
|
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2911
|
-
const snapshot = ingestSuccess$
|
|
3696
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
2912
3697
|
config,
|
|
2913
|
-
resolve: () => buildNetworkSnapshot$
|
|
3698
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2914
3699
|
});
|
|
2915
3700
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2916
3701
|
}
|
|
2917
3702
|
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2918
3703
|
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2919
3704
|
config,
|
|
2920
|
-
resolve: () => buildNetworkSnapshot$
|
|
3705
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2921
3706
|
});
|
|
2922
3707
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2923
3708
|
}
|
|
2924
|
-
function buildNetworkSnapshot$
|
|
2925
|
-
const resourceParams = createResourceParams$
|
|
2926
|
-
const request = createResourceRequest$
|
|
3709
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
3710
|
+
const resourceParams = createResourceParams$5(config);
|
|
3711
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2927
3712
|
return luvio.dispatchResourceRequest(request, options)
|
|
2928
3713
|
.then((response) => {
|
|
2929
3714
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2930
3715
|
const cache = new StoreKeyMap();
|
|
2931
|
-
getResponseCacheKeys$
|
|
3716
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
2932
3717
|
return cache;
|
|
2933
3718
|
});
|
|
2934
3719
|
}, (response) => {
|
|
@@ -2936,7 +3721,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
2936
3721
|
});
|
|
2937
3722
|
}
|
|
2938
3723
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2939
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3724
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
2940
3725
|
}
|
|
2941
3726
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2942
3727
|
const { luvio, config } = context;
|
|
@@ -2947,12 +3732,12 @@ function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
|
2947
3732
|
};
|
|
2948
3733
|
const cacheSnapshot = storeLookup(selector, {
|
|
2949
3734
|
config,
|
|
2950
|
-
resolve: () => buildNetworkSnapshot$
|
|
3735
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
2951
3736
|
});
|
|
2952
3737
|
return cacheSnapshot;
|
|
2953
3738
|
}
|
|
2954
|
-
const
|
|
2955
|
-
const config = validateAdapterConfig$
|
|
3739
|
+
const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getInstalledAssets(untrustedConfig, requestContext) {
|
|
3740
|
+
const config = validateAdapterConfig$5(untrustedConfig, getInstalledAssets_ConfigPropertyNames);
|
|
2956
3741
|
// Invalid or incomplete config
|
|
2957
3742
|
if (config === null) {
|
|
2958
3743
|
return null;
|
|
@@ -2961,115 +3746,121 @@ const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untruste
|
|
|
2961
3746
|
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2962
3747
|
};
|
|
2963
3748
|
|
|
2964
|
-
const TTL$
|
|
2965
|
-
const VERSION$
|
|
2966
|
-
function validate$
|
|
3749
|
+
const TTL$2 = 5000;
|
|
3750
|
+
const VERSION$2 = "59b25959d9663f1074e0b8d401e3c3a3";
|
|
3751
|
+
function validate$2(obj, path = 'TemplateTagCollectionRepresentation') {
|
|
2967
3752
|
const v_error = (() => {
|
|
2968
3753
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2969
3754
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2970
3755
|
}
|
|
2971
|
-
const
|
|
2972
|
-
const
|
|
2973
|
-
if (
|
|
2974
|
-
return new TypeError('Expected "
|
|
2975
|
-
}
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
const
|
|
2979
|
-
|
|
2980
|
-
|
|
3756
|
+
const obj_tags = obj.tags;
|
|
3757
|
+
const path_tags = path + '.tags';
|
|
3758
|
+
if (typeof obj_tags !== 'object' || ArrayIsArray(obj_tags) || obj_tags === null) {
|
|
3759
|
+
return new TypeError('Expected "object" but received "' + typeof obj_tags + '" (at "' + path_tags + '")');
|
|
3760
|
+
}
|
|
3761
|
+
const obj_tags_keys = ObjectKeys(obj_tags);
|
|
3762
|
+
for (let i = 0; i < obj_tags_keys.length; i++) {
|
|
3763
|
+
const key = obj_tags_keys[i];
|
|
3764
|
+
const obj_tags_prop = obj_tags[key];
|
|
3765
|
+
const path_tags_prop = path_tags + '["' + key + '"]';
|
|
3766
|
+
if (obj_tags_prop === undefined) {
|
|
3767
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_tags_prop + '" (at "' + path_tags_prop + '")');
|
|
2981
3768
|
}
|
|
2982
3769
|
}
|
|
3770
|
+
const obj_templateId = obj.templateId;
|
|
3771
|
+
const path_templateId = path + '.templateId';
|
|
3772
|
+
if (typeof obj_templateId !== 'string') {
|
|
3773
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateId + '" (at "' + path_templateId + '")');
|
|
3774
|
+
}
|
|
2983
3775
|
})();
|
|
2984
3776
|
return v_error === undefined ? null : v_error;
|
|
2985
3777
|
}
|
|
2986
|
-
const RepresentationType$
|
|
2987
|
-
function
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
data: input,
|
|
2998
|
-
key: path.fullPath,
|
|
2999
|
-
existing: existing,
|
|
3000
|
-
},
|
|
3001
|
-
ttl: path.ttl
|
|
3002
|
-
}, luvio, store, timestamp);
|
|
3003
|
-
}
|
|
3778
|
+
const RepresentationType$2 = 'TemplateTagCollectionRepresentation';
|
|
3779
|
+
function keyBuilder$9(luvio, config) {
|
|
3780
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
3781
|
+
}
|
|
3782
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
3783
|
+
const keyParams = {
|
|
3784
|
+
id: object.templateId
|
|
3785
|
+
};
|
|
3786
|
+
return keyBuilder$9(luvio, keyParams);
|
|
3787
|
+
}
|
|
3788
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3004
3789
|
return input;
|
|
3005
3790
|
}
|
|
3006
|
-
const select$7 = function
|
|
3791
|
+
const select$7 = function TemplateTagCollectionRepresentationSelect() {
|
|
3007
3792
|
return {
|
|
3008
3793
|
kind: 'Fragment',
|
|
3009
|
-
version: VERSION$
|
|
3794
|
+
version: VERSION$2,
|
|
3010
3795
|
private: [],
|
|
3011
3796
|
selections: [
|
|
3012
3797
|
{
|
|
3013
|
-
name: '
|
|
3014
|
-
kind: '
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3798
|
+
name: 'tags',
|
|
3799
|
+
kind: 'Object',
|
|
3800
|
+
// any
|
|
3801
|
+
},
|
|
3802
|
+
{
|
|
3803
|
+
name: 'templateId',
|
|
3804
|
+
kind: 'Scalar'
|
|
3805
|
+
}
|
|
3806
|
+
]
|
|
3807
|
+
};
|
|
3808
|
+
};
|
|
3809
|
+
function equals$2(existing, incoming) {
|
|
3810
|
+
const existing_templateId = existing.templateId;
|
|
3811
|
+
const incoming_templateId = incoming.templateId;
|
|
3812
|
+
if (!(existing_templateId === incoming_templateId)) {
|
|
3813
|
+
return false;
|
|
3814
|
+
}
|
|
3815
|
+
const existing_tags = existing.tags;
|
|
3816
|
+
const incoming_tags = incoming.tags;
|
|
3817
|
+
const equals_tags_props = equalsObject(existing_tags, incoming_tags, (existing_tags_prop, incoming_tags_prop) => {
|
|
3818
|
+
if (JSONStringify(incoming_tags_prop) !== JSONStringify(existing_tags_prop)) {
|
|
3026
3819
|
return false;
|
|
3027
3820
|
}
|
|
3028
3821
|
});
|
|
3029
|
-
if (
|
|
3822
|
+
if (equals_tags_props === false) {
|
|
3030
3823
|
return false;
|
|
3031
3824
|
}
|
|
3032
3825
|
return true;
|
|
3033
3826
|
}
|
|
3034
|
-
const ingest$
|
|
3827
|
+
const ingest$2 = function TemplateTagCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3035
3828
|
if (process.env.NODE_ENV !== 'production') {
|
|
3036
|
-
const validateError = validate$
|
|
3829
|
+
const validateError = validate$2(input);
|
|
3037
3830
|
if (validateError !== null) {
|
|
3038
3831
|
throw validateError;
|
|
3039
3832
|
}
|
|
3040
3833
|
}
|
|
3041
|
-
const key =
|
|
3042
|
-
const ttlToUse = TTL$
|
|
3043
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
3834
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
3835
|
+
const ttlToUse = TTL$2;
|
|
3836
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "AppFramework", VERSION$2, RepresentationType$2, equals$2);
|
|
3044
3837
|
return createLink(key);
|
|
3045
3838
|
};
|
|
3046
|
-
function getTypeCacheKeys$
|
|
3839
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3047
3840
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3048
|
-
const rootKey =
|
|
3841
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3049
3842
|
rootKeySet.set(rootKey, {
|
|
3050
3843
|
namespace: keyPrefix,
|
|
3051
|
-
representationName: RepresentationType$
|
|
3844
|
+
representationName: RepresentationType$2,
|
|
3052
3845
|
mergeable: false
|
|
3053
3846
|
});
|
|
3054
|
-
const input_assets_length = input.assets.length;
|
|
3055
|
-
for (let i = 0; i < input_assets_length; i++) {
|
|
3056
|
-
getTypeCacheKeys$6(rootKeySet, luvio, input.assets[i]);
|
|
3057
|
-
}
|
|
3058
3847
|
}
|
|
3059
3848
|
|
|
3060
3849
|
function select$6(luvio, params) {
|
|
3061
3850
|
return select$7();
|
|
3062
3851
|
}
|
|
3063
|
-
function keyBuilder$
|
|
3064
|
-
return
|
|
3852
|
+
function keyBuilder$8(luvio, params) {
|
|
3853
|
+
return keyBuilder$9(luvio, {
|
|
3854
|
+
id: params.urlParams.templateIdOrApiName
|
|
3855
|
+
});
|
|
3065
3856
|
}
|
|
3066
|
-
function getResponseCacheKeys$
|
|
3067
|
-
getTypeCacheKeys$
|
|
3857
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
3858
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
3068
3859
|
}
|
|
3069
|
-
function ingestSuccess$
|
|
3860
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
3070
3861
|
const { body } = response;
|
|
3071
|
-
const key = keyBuilder$
|
|
3072
|
-
luvio.storeIngest(key, ingest$
|
|
3862
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
3863
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
3073
3864
|
const snapshot = luvio.storeLookup({
|
|
3074
3865
|
recordId: key,
|
|
3075
3866
|
node: select$6(),
|
|
@@ -3084,312 +3875,176 @@ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
3084
3875
|
return snapshot;
|
|
3085
3876
|
}
|
|
3086
3877
|
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
3087
|
-
const key = keyBuilder$
|
|
3878
|
+
const key = keyBuilder$8(luvio, params);
|
|
3088
3879
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3089
3880
|
const storeMetadataParams = {
|
|
3090
|
-
ttl: TTL$
|
|
3881
|
+
ttl: TTL$2,
|
|
3091
3882
|
namespace: keyPrefix,
|
|
3092
|
-
version: VERSION$
|
|
3093
|
-
representationName: RepresentationType$
|
|
3883
|
+
version: VERSION$2,
|
|
3884
|
+
representationName: RepresentationType$2
|
|
3094
3885
|
};
|
|
3095
3886
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3096
3887
|
return errorSnapshot;
|
|
3097
3888
|
}
|
|
3098
|
-
function createResourceRequest$
|
|
3889
|
+
function createResourceRequest$4(config) {
|
|
3099
3890
|
const headers = {};
|
|
3100
3891
|
return {
|
|
3101
3892
|
baseUri: '/services/data/v63.0',
|
|
3102
|
-
basePath: '/app-framework/
|
|
3893
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '/tags',
|
|
3103
3894
|
method: 'get',
|
|
3104
3895
|
body: null,
|
|
3105
|
-
urlParams:
|
|
3106
|
-
queryParams:
|
|
3896
|
+
urlParams: config.urlParams,
|
|
3897
|
+
queryParams: {},
|
|
3107
3898
|
headers,
|
|
3108
3899
|
priority: 'normal',
|
|
3109
3900
|
};
|
|
3110
3901
|
}
|
|
3902
|
+
function createResourceRequestFromRepresentation$2(representation) {
|
|
3903
|
+
const config = {
|
|
3904
|
+
urlParams: {},
|
|
3905
|
+
};
|
|
3906
|
+
config.urlParams.templateIdOrApiName = representation.templateId;
|
|
3907
|
+
return createResourceRequest$4(config);
|
|
3908
|
+
}
|
|
3111
3909
|
|
|
3112
|
-
const adapterName$
|
|
3113
|
-
const
|
|
3114
|
-
generateParamConfigMetadata('
|
|
3115
|
-
generateParamConfigMetadata('assetType', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3910
|
+
const adapterName$4 = 'getTags';
|
|
3911
|
+
const getTags_ConfigPropertyMetadata = [
|
|
3912
|
+
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3116
3913
|
];
|
|
3117
|
-
const
|
|
3118
|
-
const createResourceParams$
|
|
3119
|
-
function keyBuilder$
|
|
3120
|
-
const resourceParams = createResourceParams$
|
|
3121
|
-
return keyBuilder$
|
|
3914
|
+
const getTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getTags_ConfigPropertyMetadata);
|
|
3915
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$e(getTags_ConfigPropertyMetadata);
|
|
3916
|
+
function keyBuilder$7(luvio, config) {
|
|
3917
|
+
const resourceParams = createResourceParams$4(config);
|
|
3918
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
3122
3919
|
}
|
|
3123
|
-
function typeCheckConfig$
|
|
3920
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
3124
3921
|
const config = {};
|
|
3125
|
-
typeCheckConfig$
|
|
3922
|
+
typeCheckConfig$e(untrustedConfig, config, getTags_ConfigPropertyMetadata);
|
|
3126
3923
|
return config;
|
|
3127
3924
|
}
|
|
3128
|
-
function validateAdapterConfig$
|
|
3925
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
3129
3926
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3130
3927
|
return null;
|
|
3131
3928
|
}
|
|
3132
3929
|
if (process.env.NODE_ENV !== 'production') {
|
|
3133
3930
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3134
3931
|
}
|
|
3135
|
-
const config = typeCheckConfig$
|
|
3932
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
3136
3933
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3137
3934
|
return null;
|
|
3138
3935
|
}
|
|
3139
3936
|
return config;
|
|
3140
3937
|
}
|
|
3141
3938
|
function adapterFragment$3(luvio, config) {
|
|
3142
|
-
createResourceParams$
|
|
3939
|
+
createResourceParams$4(config);
|
|
3143
3940
|
return select$6();
|
|
3144
3941
|
}
|
|
3145
3942
|
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
3146
|
-
const snapshot = ingestSuccess$
|
|
3943
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
3147
3944
|
config,
|
|
3148
|
-
resolve: () => buildNetworkSnapshot$
|
|
3945
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3149
3946
|
});
|
|
3150
3947
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3151
3948
|
}
|
|
3152
3949
|
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
3153
3950
|
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
3154
3951
|
config,
|
|
3155
|
-
resolve: () => buildNetworkSnapshot$
|
|
3952
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3156
3953
|
});
|
|
3157
3954
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3158
3955
|
}
|
|
3159
|
-
function buildNetworkSnapshot$
|
|
3160
|
-
const resourceParams = createResourceParams$
|
|
3161
|
-
const request = createResourceRequest$
|
|
3956
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
3957
|
+
const resourceParams = createResourceParams$4(config);
|
|
3958
|
+
const request = createResourceRequest$4(resourceParams);
|
|
3162
3959
|
return luvio.dispatchResourceRequest(request, options)
|
|
3163
3960
|
.then((response) => {
|
|
3164
3961
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
3165
3962
|
const cache = new StoreKeyMap();
|
|
3166
|
-
getResponseCacheKeys$
|
|
3963
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
3167
3964
|
return cache;
|
|
3168
3965
|
});
|
|
3169
3966
|
}, (response) => {
|
|
3170
3967
|
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
3171
3968
|
});
|
|
3172
3969
|
}
|
|
3173
|
-
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3174
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3175
|
-
}
|
|
3176
|
-
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3177
|
-
const { luvio, config } = context;
|
|
3178
|
-
const selector = {
|
|
3179
|
-
recordId: keyBuilder$
|
|
3180
|
-
node: adapterFragment$3(luvio, config),
|
|
3181
|
-
variables: {},
|
|
3182
|
-
};
|
|
3183
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
3184
|
-
config,
|
|
3185
|
-
resolve: () => buildNetworkSnapshot$
|
|
3186
|
-
});
|
|
3187
|
-
return cacheSnapshot;
|
|
3188
|
-
}
|
|
3189
|
-
const getInstalledAssetsAdapterFactory = (luvio) => function AppFramework__getInstalledAssets(untrustedConfig, requestContext) {
|
|
3190
|
-
const config = validateAdapterConfig$3(untrustedConfig, getInstalledAssets_ConfigPropertyNames);
|
|
3191
|
-
// Invalid or incomplete config
|
|
3192
|
-
if (config === null) {
|
|
3193
|
-
return null;
|
|
3194
|
-
}
|
|
3195
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3196
|
-
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
3197
|
-
};
|
|
3198
|
-
|
|
3199
|
-
const TTL$2 = 5000;
|
|
3200
|
-
const VERSION$2 = "a234a33bacb2228183eba50f4f96aef4";
|
|
3201
|
-
function validate$2(obj, path = 'TemplateRepresentation') {
|
|
3202
|
-
const v_error = (() => {
|
|
3203
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3204
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3205
|
-
}
|
|
3206
|
-
const obj_configurationUrl = obj.configurationUrl;
|
|
3207
|
-
const path_configurationUrl = path + '.configurationUrl';
|
|
3208
|
-
if (typeof obj_configurationUrl !== 'string') {
|
|
3209
|
-
return new TypeError('Expected "string" but received "' + typeof obj_configurationUrl + '" (at "' + path_configurationUrl + '")');
|
|
3210
|
-
}
|
|
3211
|
-
const obj_description = obj.description;
|
|
3212
|
-
const path_description = path + '.description';
|
|
3213
|
-
let obj_description_union0 = null;
|
|
3214
|
-
const obj_description_union0_error = (() => {
|
|
3215
|
-
if (typeof obj_description !== 'string') {
|
|
3216
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3217
|
-
}
|
|
3218
|
-
})();
|
|
3219
|
-
if (obj_description_union0_error != null) {
|
|
3220
|
-
obj_description_union0 = obj_description_union0_error.message;
|
|
3221
|
-
}
|
|
3222
|
-
let obj_description_union1 = null;
|
|
3223
|
-
const obj_description_union1_error = (() => {
|
|
3224
|
-
if (obj_description !== null) {
|
|
3225
|
-
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3226
|
-
}
|
|
3227
|
-
})();
|
|
3228
|
-
if (obj_description_union1_error != null) {
|
|
3229
|
-
obj_description_union1 = obj_description_union1_error.message;
|
|
3230
|
-
}
|
|
3231
|
-
if (obj_description_union0 && obj_description_union1) {
|
|
3232
|
-
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
3233
|
-
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3234
|
-
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3235
|
-
return new TypeError(message);
|
|
3236
|
-
}
|
|
3237
|
-
const obj_id = obj.id;
|
|
3238
|
-
const path_id = path + '.id';
|
|
3239
|
-
if (typeof obj_id !== 'string') {
|
|
3240
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3241
|
-
}
|
|
3242
|
-
const obj_label = obj.label;
|
|
3243
|
-
const path_label = path + '.label';
|
|
3244
|
-
if (typeof obj_label !== 'string') {
|
|
3245
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3246
|
-
}
|
|
3247
|
-
const obj_name = obj.name;
|
|
3248
|
-
const path_name = path + '.name';
|
|
3249
|
-
if (typeof obj_name !== 'string') {
|
|
3250
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3251
|
-
}
|
|
3252
|
-
const obj_templateType = obj.templateType;
|
|
3253
|
-
const path_templateType = path + '.templateType';
|
|
3254
|
-
if (typeof obj_templateType !== 'string') {
|
|
3255
|
-
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
3256
|
-
}
|
|
3257
|
-
const obj_url = obj.url;
|
|
3258
|
-
const path_url = path + '.url';
|
|
3259
|
-
if (typeof obj_url !== 'string') {
|
|
3260
|
-
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
3261
|
-
}
|
|
3262
|
-
})();
|
|
3263
|
-
return v_error === undefined ? null : v_error;
|
|
3264
|
-
}
|
|
3265
|
-
const RepresentationType$2 = 'TemplateRepresentation';
|
|
3266
|
-
function keyBuilder$7(luvio, config) {
|
|
3267
|
-
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
3268
|
-
}
|
|
3269
|
-
function keyBuilderFromType$1(luvio, object) {
|
|
3270
|
-
const keyParams = {
|
|
3271
|
-
id: object.id
|
|
3272
|
-
};
|
|
3273
|
-
return keyBuilder$7(luvio, keyParams);
|
|
3274
|
-
}
|
|
3275
|
-
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3276
|
-
return input;
|
|
3277
|
-
}
|
|
3278
|
-
const select$5 = function TemplateRepresentationSelect() {
|
|
3279
|
-
return {
|
|
3280
|
-
kind: 'Fragment',
|
|
3281
|
-
version: VERSION$2,
|
|
3282
|
-
private: [],
|
|
3283
|
-
selections: [
|
|
3284
|
-
{
|
|
3285
|
-
name: 'configurationUrl',
|
|
3286
|
-
kind: 'Scalar'
|
|
3287
|
-
},
|
|
3288
|
-
{
|
|
3289
|
-
name: 'description',
|
|
3290
|
-
kind: 'Scalar'
|
|
3291
|
-
},
|
|
3292
|
-
{
|
|
3293
|
-
name: 'id',
|
|
3294
|
-
kind: 'Scalar'
|
|
3295
|
-
},
|
|
3296
|
-
{
|
|
3297
|
-
name: 'label',
|
|
3298
|
-
kind: 'Scalar'
|
|
3299
|
-
},
|
|
3300
|
-
{
|
|
3301
|
-
name: 'name',
|
|
3302
|
-
kind: 'Scalar'
|
|
3303
|
-
},
|
|
3304
|
-
{
|
|
3305
|
-
name: 'templateType',
|
|
3306
|
-
kind: 'Scalar'
|
|
3307
|
-
},
|
|
3308
|
-
{
|
|
3309
|
-
name: 'url',
|
|
3310
|
-
kind: 'Scalar'
|
|
3311
|
-
}
|
|
3312
|
-
]
|
|
3313
|
-
};
|
|
3314
|
-
};
|
|
3315
|
-
function equals$2(existing, incoming) {
|
|
3316
|
-
const existing_configurationUrl = existing.configurationUrl;
|
|
3317
|
-
const incoming_configurationUrl = incoming.configurationUrl;
|
|
3318
|
-
if (!(existing_configurationUrl === incoming_configurationUrl)) {
|
|
3319
|
-
return false;
|
|
3320
|
-
}
|
|
3321
|
-
const existing_id = existing.id;
|
|
3322
|
-
const incoming_id = incoming.id;
|
|
3323
|
-
if (!(existing_id === incoming_id)) {
|
|
3324
|
-
return false;
|
|
3325
|
-
}
|
|
3326
|
-
const existing_label = existing.label;
|
|
3327
|
-
const incoming_label = incoming.label;
|
|
3328
|
-
if (!(existing_label === incoming_label)) {
|
|
3329
|
-
return false;
|
|
3330
|
-
}
|
|
3331
|
-
const existing_name = existing.name;
|
|
3332
|
-
const incoming_name = incoming.name;
|
|
3333
|
-
if (!(existing_name === incoming_name)) {
|
|
3334
|
-
return false;
|
|
3335
|
-
}
|
|
3336
|
-
const existing_templateType = existing.templateType;
|
|
3337
|
-
const incoming_templateType = incoming.templateType;
|
|
3338
|
-
if (!(existing_templateType === incoming_templateType)) {
|
|
3339
|
-
return false;
|
|
3340
|
-
}
|
|
3341
|
-
const existing_url = existing.url;
|
|
3342
|
-
const incoming_url = incoming.url;
|
|
3343
|
-
if (!(existing_url === incoming_url)) {
|
|
3344
|
-
return false;
|
|
3345
|
-
}
|
|
3346
|
-
const existing_description = existing.description;
|
|
3347
|
-
const incoming_description = incoming.description;
|
|
3348
|
-
if (!(existing_description === incoming_description)) {
|
|
3349
|
-
return false;
|
|
3350
|
-
}
|
|
3351
|
-
return true;
|
|
3352
|
-
}
|
|
3353
|
-
const ingest$2 = function TemplateRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3354
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3355
|
-
const validateError = validate$2(input);
|
|
3356
|
-
if (validateError !== null) {
|
|
3357
|
-
throw validateError;
|
|
3358
|
-
}
|
|
3359
|
-
}
|
|
3360
|
-
const key = keyBuilderFromType$1(luvio, input);
|
|
3361
|
-
const ttlToUse = TTL$2;
|
|
3362
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "AppFramework", VERSION$2, RepresentationType$2, equals$2);
|
|
3363
|
-
return createLink(key);
|
|
3364
|
-
};
|
|
3365
|
-
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3366
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3367
|
-
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
3368
|
-
rootKeySet.set(rootKey, {
|
|
3369
|
-
namespace: keyPrefix,
|
|
3370
|
-
representationName: RepresentationType$2,
|
|
3371
|
-
mergeable: false
|
|
3970
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
3971
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
3972
|
+
}
|
|
3973
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
3974
|
+
const { luvio, config } = context;
|
|
3975
|
+
const selector = {
|
|
3976
|
+
recordId: keyBuilder$7(luvio, config),
|
|
3977
|
+
node: adapterFragment$3(luvio, config),
|
|
3978
|
+
variables: {},
|
|
3979
|
+
};
|
|
3980
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3981
|
+
config,
|
|
3982
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3372
3983
|
});
|
|
3984
|
+
return cacheSnapshot;
|
|
3373
3985
|
}
|
|
3986
|
+
const getTagsAdapterFactory = (luvio) => function AppFramework__getTags(untrustedConfig, requestContext) {
|
|
3987
|
+
const config = validateAdapterConfig$4(untrustedConfig, getTags_ConfigPropertyNames);
|
|
3988
|
+
// Invalid or incomplete config
|
|
3989
|
+
if (config === null) {
|
|
3990
|
+
return null;
|
|
3991
|
+
}
|
|
3992
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3993
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
3994
|
+
};
|
|
3995
|
+
const notifyChangeFactory$2 = (luvio, options) => {
|
|
3996
|
+
return function getAppFrameworkTemplatesTagsByTemplateIdOrApiNameNotifyChange(configs) {
|
|
3997
|
+
const keys = configs.map(c => keyBuilder$9(luvio, c));
|
|
3998
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
3999
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
4000
|
+
const { key, record: val } = entries[i];
|
|
4001
|
+
const refreshRequest = createResourceRequestFromRepresentation$2(val);
|
|
4002
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
4003
|
+
.then((response) => {
|
|
4004
|
+
return luvio.handleSuccessResponse(() => {
|
|
4005
|
+
const { body } = response;
|
|
4006
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
4007
|
+
return luvio.storeBroadcast();
|
|
4008
|
+
}, () => {
|
|
4009
|
+
const cache = new StoreKeyMap();
|
|
4010
|
+
getTypeCacheKeys$2(cache, luvio, response.body);
|
|
4011
|
+
return cache;
|
|
4012
|
+
});
|
|
4013
|
+
}, (error) => {
|
|
4014
|
+
return luvio.handleErrorResponse(() => {
|
|
4015
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
4016
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
4017
|
+
ttl: TTL$2,
|
|
4018
|
+
namespace: keyPrefix,
|
|
4019
|
+
version: VERSION$2,
|
|
4020
|
+
representationName: RepresentationType$2
|
|
4021
|
+
});
|
|
4022
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
4023
|
+
});
|
|
4024
|
+
});
|
|
4025
|
+
}
|
|
4026
|
+
});
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
3374
4029
|
|
|
3375
|
-
function select$
|
|
3376
|
-
return select$
|
|
4030
|
+
function select$5(luvio, params) {
|
|
4031
|
+
return select$l();
|
|
3377
4032
|
}
|
|
3378
4033
|
function keyBuilder$6(luvio, params) {
|
|
3379
|
-
return keyBuilder$
|
|
4034
|
+
return keyBuilder$r(luvio, {
|
|
3380
4035
|
id: params.urlParams.templateIdOrApiName
|
|
3381
4036
|
});
|
|
3382
4037
|
}
|
|
3383
|
-
function getResponseCacheKeys$
|
|
3384
|
-
getTypeCacheKeys$
|
|
4038
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
4039
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
3385
4040
|
}
|
|
3386
|
-
function ingestSuccess$
|
|
4041
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
3387
4042
|
const { body } = response;
|
|
3388
4043
|
const key = keyBuilder$6(luvio, resourceParams);
|
|
3389
|
-
luvio.storeIngest(key, ingest$
|
|
4044
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3390
4045
|
const snapshot = luvio.storeLookup({
|
|
3391
4046
|
recordId: key,
|
|
3392
|
-
node: select$
|
|
4047
|
+
node: select$5(),
|
|
3393
4048
|
variables: {},
|
|
3394
4049
|
}, snapshotRefresh);
|
|
3395
4050
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3404,15 +4059,15 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
|
3404
4059
|
const key = keyBuilder$6(luvio, params);
|
|
3405
4060
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3406
4061
|
const storeMetadataParams = {
|
|
3407
|
-
ttl: TTL$
|
|
4062
|
+
ttl: TTL$9,
|
|
3408
4063
|
namespace: keyPrefix,
|
|
3409
|
-
version: VERSION$
|
|
3410
|
-
representationName: RepresentationType$
|
|
4064
|
+
version: VERSION$9,
|
|
4065
|
+
representationName: RepresentationType$9
|
|
3411
4066
|
};
|
|
3412
4067
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3413
4068
|
return errorSnapshot;
|
|
3414
4069
|
}
|
|
3415
|
-
function createResourceRequest$
|
|
4070
|
+
function createResourceRequest$3(config) {
|
|
3416
4071
|
const headers = {};
|
|
3417
4072
|
return {
|
|
3418
4073
|
baseUri: '/services/data/v63.0',
|
|
@@ -3430,63 +4085,63 @@ function createResourceRequestFromRepresentation$1(representation) {
|
|
|
3430
4085
|
urlParams: {},
|
|
3431
4086
|
};
|
|
3432
4087
|
config.urlParams.templateIdOrApiName = representation.id;
|
|
3433
|
-
return createResourceRequest$
|
|
4088
|
+
return createResourceRequest$3(config);
|
|
3434
4089
|
}
|
|
3435
4090
|
|
|
3436
|
-
const adapterName$
|
|
4091
|
+
const adapterName$3 = 'getTemplate';
|
|
3437
4092
|
const getTemplate_ConfigPropertyMetadata = [
|
|
3438
4093
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3439
4094
|
];
|
|
3440
|
-
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3441
|
-
const createResourceParams$
|
|
4095
|
+
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getTemplate_ConfigPropertyMetadata);
|
|
4096
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$e(getTemplate_ConfigPropertyMetadata);
|
|
3442
4097
|
function keyBuilder$5(luvio, config) {
|
|
3443
|
-
const resourceParams = createResourceParams$
|
|
4098
|
+
const resourceParams = createResourceParams$3(config);
|
|
3444
4099
|
return keyBuilder$6(luvio, resourceParams);
|
|
3445
4100
|
}
|
|
3446
|
-
function typeCheckConfig$
|
|
4101
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
3447
4102
|
const config = {};
|
|
3448
|
-
typeCheckConfig$
|
|
4103
|
+
typeCheckConfig$e(untrustedConfig, config, getTemplate_ConfigPropertyMetadata);
|
|
3449
4104
|
return config;
|
|
3450
4105
|
}
|
|
3451
|
-
function validateAdapterConfig$
|
|
4106
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
3452
4107
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3453
4108
|
return null;
|
|
3454
4109
|
}
|
|
3455
4110
|
if (process.env.NODE_ENV !== 'production') {
|
|
3456
4111
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3457
4112
|
}
|
|
3458
|
-
const config = typeCheckConfig$
|
|
4113
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
3459
4114
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3460
4115
|
return null;
|
|
3461
4116
|
}
|
|
3462
4117
|
return config;
|
|
3463
4118
|
}
|
|
3464
4119
|
function adapterFragment$2(luvio, config) {
|
|
3465
|
-
createResourceParams$
|
|
3466
|
-
return select$
|
|
4120
|
+
createResourceParams$3(config);
|
|
4121
|
+
return select$5();
|
|
3467
4122
|
}
|
|
3468
4123
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3469
|
-
const snapshot = ingestSuccess$
|
|
4124
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
3470
4125
|
config,
|
|
3471
|
-
resolve: () => buildNetworkSnapshot$
|
|
4126
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3472
4127
|
});
|
|
3473
4128
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3474
4129
|
}
|
|
3475
4130
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3476
4131
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3477
4132
|
config,
|
|
3478
|
-
resolve: () => buildNetworkSnapshot$
|
|
4133
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3479
4134
|
});
|
|
3480
4135
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3481
4136
|
}
|
|
3482
|
-
function buildNetworkSnapshot$
|
|
3483
|
-
const resourceParams = createResourceParams$
|
|
3484
|
-
const request = createResourceRequest$
|
|
4137
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
4138
|
+
const resourceParams = createResourceParams$3(config);
|
|
4139
|
+
const request = createResourceRequest$3(resourceParams);
|
|
3485
4140
|
return luvio.dispatchResourceRequest(request, options)
|
|
3486
4141
|
.then((response) => {
|
|
3487
4142
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3488
4143
|
const cache = new StoreKeyMap();
|
|
3489
|
-
getResponseCacheKeys$
|
|
4144
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
3490
4145
|
return cache;
|
|
3491
4146
|
});
|
|
3492
4147
|
}, (response) => {
|
|
@@ -3494,7 +4149,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3494
4149
|
});
|
|
3495
4150
|
}
|
|
3496
4151
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3497
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4152
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
3498
4153
|
}
|
|
3499
4154
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3500
4155
|
const { luvio, config } = context;
|
|
@@ -3505,12 +4160,12 @@ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
|
3505
4160
|
};
|
|
3506
4161
|
const cacheSnapshot = storeLookup(selector, {
|
|
3507
4162
|
config,
|
|
3508
|
-
resolve: () => buildNetworkSnapshot$
|
|
4163
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3509
4164
|
});
|
|
3510
4165
|
return cacheSnapshot;
|
|
3511
4166
|
}
|
|
3512
4167
|
const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(untrustedConfig, requestContext) {
|
|
3513
|
-
const config = validateAdapterConfig$
|
|
4168
|
+
const config = validateAdapterConfig$3(untrustedConfig, getTemplate_ConfigPropertyNames);
|
|
3514
4169
|
// Invalid or incomplete config
|
|
3515
4170
|
if (config === null) {
|
|
3516
4171
|
return null;
|
|
@@ -3520,7 +4175,7 @@ const getTemplateAdapterFactory = (luvio) => function AppFramework__getTemplate(
|
|
|
3520
4175
|
};
|
|
3521
4176
|
const notifyChangeFactory$1 = (luvio, options) => {
|
|
3522
4177
|
return function getAppFrameworkTemplatesByTemplateIdOrApiNameNotifyChange(configs) {
|
|
3523
|
-
const keys = configs.map(c => keyBuilder$
|
|
4178
|
+
const keys = configs.map(c => keyBuilder$r(luvio, c));
|
|
3524
4179
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
3525
4180
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
3526
4181
|
const { key, record: val } = entries[i];
|
|
@@ -3529,21 +4184,21 @@ const notifyChangeFactory$1 = (luvio, options) => {
|
|
|
3529
4184
|
.then((response) => {
|
|
3530
4185
|
return luvio.handleSuccessResponse(() => {
|
|
3531
4186
|
const { body } = response;
|
|
3532
|
-
luvio.storeIngest(key, ingest$
|
|
4187
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
3533
4188
|
return luvio.storeBroadcast();
|
|
3534
4189
|
}, () => {
|
|
3535
4190
|
const cache = new StoreKeyMap();
|
|
3536
|
-
getTypeCacheKeys$
|
|
4191
|
+
getTypeCacheKeys$9(cache, luvio, response.body);
|
|
3537
4192
|
return cache;
|
|
3538
4193
|
});
|
|
3539
4194
|
}, (error) => {
|
|
3540
4195
|
return luvio.handleErrorResponse(() => {
|
|
3541
4196
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
3542
4197
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
3543
|
-
ttl: TTL$
|
|
4198
|
+
ttl: TTL$9,
|
|
3544
4199
|
namespace: keyPrefix,
|
|
3545
|
-
version: VERSION$
|
|
3546
|
-
representationName: RepresentationType$
|
|
4200
|
+
version: VERSION$9,
|
|
4201
|
+
representationName: RepresentationType$9
|
|
3547
4202
|
});
|
|
3548
4203
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
3549
4204
|
});
|
|
@@ -3586,7 +4241,7 @@ function keyBuilderFromType(luvio, object) {
|
|
|
3586
4241
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
3587
4242
|
return input;
|
|
3588
4243
|
}
|
|
3589
|
-
const select$
|
|
4244
|
+
const select$4 = function TemplateConfigurationRepresentationSelect() {
|
|
3590
4245
|
return {
|
|
3591
4246
|
kind: 'Fragment',
|
|
3592
4247
|
version: VERSION$1,
|
|
@@ -3638,24 +4293,24 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3638
4293
|
});
|
|
3639
4294
|
}
|
|
3640
4295
|
|
|
3641
|
-
function select$
|
|
3642
|
-
return select$
|
|
4296
|
+
function select$3(luvio, params) {
|
|
4297
|
+
return select$4();
|
|
3643
4298
|
}
|
|
3644
4299
|
function keyBuilder$3(luvio, params) {
|
|
3645
4300
|
return keyBuilder$4(luvio, {
|
|
3646
4301
|
id: params.urlParams.templateIdOrApiName
|
|
3647
4302
|
});
|
|
3648
4303
|
}
|
|
3649
|
-
function getResponseCacheKeys$
|
|
4304
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
3650
4305
|
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
3651
4306
|
}
|
|
3652
|
-
function ingestSuccess$
|
|
4307
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
3653
4308
|
const { body } = response;
|
|
3654
4309
|
const key = keyBuilder$3(luvio, resourceParams);
|
|
3655
4310
|
luvio.storeIngest(key, ingest$1, body);
|
|
3656
4311
|
const snapshot = luvio.storeLookup({
|
|
3657
4312
|
recordId: key,
|
|
3658
|
-
node: select$
|
|
4313
|
+
node: select$3(),
|
|
3659
4314
|
variables: {},
|
|
3660
4315
|
}, snapshotRefresh);
|
|
3661
4316
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3678,7 +4333,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
|
3678
4333
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3679
4334
|
return errorSnapshot;
|
|
3680
4335
|
}
|
|
3681
|
-
function createResourceRequest$
|
|
4336
|
+
function createResourceRequest$2(config) {
|
|
3682
4337
|
const headers = {};
|
|
3683
4338
|
return {
|
|
3684
4339
|
baseUri: '/services/data/v63.0',
|
|
@@ -3696,63 +4351,63 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
3696
4351
|
urlParams: {},
|
|
3697
4352
|
};
|
|
3698
4353
|
config.urlParams.templateIdOrApiName = representation.id;
|
|
3699
|
-
return createResourceRequest$
|
|
4354
|
+
return createResourceRequest$2(config);
|
|
3700
4355
|
}
|
|
3701
4356
|
|
|
3702
|
-
const adapterName$
|
|
4357
|
+
const adapterName$2 = 'getTemplateConfig';
|
|
3703
4358
|
const getTemplateConfig_ConfigPropertyMetadata = [
|
|
3704
4359
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3705
4360
|
];
|
|
3706
|
-
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
3707
|
-
const createResourceParams$
|
|
4361
|
+
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplateConfig_ConfigPropertyMetadata);
|
|
4362
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$e(getTemplateConfig_ConfigPropertyMetadata);
|
|
3708
4363
|
function keyBuilder$2(luvio, config) {
|
|
3709
|
-
const resourceParams = createResourceParams$
|
|
4364
|
+
const resourceParams = createResourceParams$2(config);
|
|
3710
4365
|
return keyBuilder$3(luvio, resourceParams);
|
|
3711
4366
|
}
|
|
3712
|
-
function typeCheckConfig$
|
|
4367
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
3713
4368
|
const config = {};
|
|
3714
|
-
typeCheckConfig$
|
|
4369
|
+
typeCheckConfig$e(untrustedConfig, config, getTemplateConfig_ConfigPropertyMetadata);
|
|
3715
4370
|
return config;
|
|
3716
4371
|
}
|
|
3717
|
-
function validateAdapterConfig$
|
|
4372
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
3718
4373
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3719
4374
|
return null;
|
|
3720
4375
|
}
|
|
3721
4376
|
if (process.env.NODE_ENV !== 'production') {
|
|
3722
4377
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3723
4378
|
}
|
|
3724
|
-
const config = typeCheckConfig$
|
|
4379
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
3725
4380
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3726
4381
|
return null;
|
|
3727
4382
|
}
|
|
3728
4383
|
return config;
|
|
3729
4384
|
}
|
|
3730
4385
|
function adapterFragment$1(luvio, config) {
|
|
3731
|
-
createResourceParams$
|
|
3732
|
-
return select$
|
|
4386
|
+
createResourceParams$2(config);
|
|
4387
|
+
return select$3();
|
|
3733
4388
|
}
|
|
3734
4389
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
3735
|
-
const snapshot = ingestSuccess$
|
|
4390
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
3736
4391
|
config,
|
|
3737
|
-
resolve: () => buildNetworkSnapshot$
|
|
4392
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3738
4393
|
});
|
|
3739
4394
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3740
4395
|
}
|
|
3741
4396
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
3742
4397
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
3743
4398
|
config,
|
|
3744
|
-
resolve: () => buildNetworkSnapshot$
|
|
4399
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3745
4400
|
});
|
|
3746
4401
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
3747
4402
|
}
|
|
3748
|
-
function buildNetworkSnapshot$
|
|
3749
|
-
const resourceParams = createResourceParams$
|
|
3750
|
-
const request = createResourceRequest$
|
|
4403
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
4404
|
+
const resourceParams = createResourceParams$2(config);
|
|
4405
|
+
const request = createResourceRequest$2(resourceParams);
|
|
3751
4406
|
return luvio.dispatchResourceRequest(request, options)
|
|
3752
4407
|
.then((response) => {
|
|
3753
4408
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
3754
4409
|
const cache = new StoreKeyMap();
|
|
3755
|
-
getResponseCacheKeys$
|
|
4410
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
3756
4411
|
return cache;
|
|
3757
4412
|
});
|
|
3758
4413
|
}, (response) => {
|
|
@@ -3760,7 +4415,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
3760
4415
|
});
|
|
3761
4416
|
}
|
|
3762
4417
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3763
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4418
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3764
4419
|
}
|
|
3765
4420
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3766
4421
|
const { luvio, config } = context;
|
|
@@ -3771,12 +4426,12 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
3771
4426
|
};
|
|
3772
4427
|
const cacheSnapshot = storeLookup(selector, {
|
|
3773
4428
|
config,
|
|
3774
|
-
resolve: () => buildNetworkSnapshot$
|
|
4429
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
3775
4430
|
});
|
|
3776
4431
|
return cacheSnapshot;
|
|
3777
4432
|
}
|
|
3778
4433
|
const getTemplateConfigAdapterFactory = (luvio) => function AppFramework__getTemplateConfig(untrustedConfig, requestContext) {
|
|
3779
|
-
const config = validateAdapterConfig$
|
|
4434
|
+
const config = validateAdapterConfig$2(untrustedConfig, getTemplateConfig_ConfigPropertyNames);
|
|
3780
4435
|
// Invalid or incomplete config
|
|
3781
4436
|
if (config === null) {
|
|
3782
4437
|
return null;
|
|
@@ -3848,7 +4503,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
3848
4503
|
for (let i = 0; i < input_templates.length; i++) {
|
|
3849
4504
|
const input_templates_item = input_templates[i];
|
|
3850
4505
|
let input_templates_item_id = input_templates_id + '__' + i;
|
|
3851
|
-
input_templates[i] = ingest$
|
|
4506
|
+
input_templates[i] = ingest$9(input_templates_item, {
|
|
3852
4507
|
fullPath: input_templates_item_id,
|
|
3853
4508
|
propertyName: i,
|
|
3854
4509
|
parent: {
|
|
@@ -3861,7 +4516,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
3861
4516
|
}
|
|
3862
4517
|
return input;
|
|
3863
4518
|
}
|
|
3864
|
-
const select$
|
|
4519
|
+
const select$2 = function TemplateCollectionRepresentationSelect() {
|
|
3865
4520
|
return {
|
|
3866
4521
|
kind: 'Fragment',
|
|
3867
4522
|
version: VERSION,
|
|
@@ -3871,7 +4526,7 @@ const select$1 = function TemplateCollectionRepresentationSelect() {
|
|
|
3871
4526
|
name: 'templates',
|
|
3872
4527
|
kind: 'Link',
|
|
3873
4528
|
plural: true,
|
|
3874
|
-
fragment: select$
|
|
4529
|
+
fragment: select$l()
|
|
3875
4530
|
}
|
|
3876
4531
|
]
|
|
3877
4532
|
};
|
|
@@ -3911,26 +4566,26 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3911
4566
|
});
|
|
3912
4567
|
const input_templates_length = input.templates.length;
|
|
3913
4568
|
for (let i = 0; i < input_templates_length; i++) {
|
|
3914
|
-
getTypeCacheKeys$
|
|
4569
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.templates[i]);
|
|
3915
4570
|
}
|
|
3916
4571
|
}
|
|
3917
4572
|
|
|
3918
|
-
function select(luvio, params) {
|
|
3919
|
-
return select$
|
|
4573
|
+
function select$1(luvio, params) {
|
|
4574
|
+
return select$2();
|
|
3920
4575
|
}
|
|
3921
4576
|
function keyBuilder$1(luvio, params) {
|
|
3922
4577
|
return keyPrefix + '::TemplateCollectionRepresentation:(' + ')';
|
|
3923
4578
|
}
|
|
3924
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4579
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
3925
4580
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1());
|
|
3926
4581
|
}
|
|
3927
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
4582
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
3928
4583
|
const { body } = response;
|
|
3929
4584
|
const key = keyBuilder$1();
|
|
3930
4585
|
luvio.storeIngest(key, ingest, body);
|
|
3931
4586
|
const snapshot = luvio.storeLookup({
|
|
3932
4587
|
recordId: key,
|
|
3933
|
-
node: select(),
|
|
4588
|
+
node: select$1(),
|
|
3934
4589
|
variables: {},
|
|
3935
4590
|
}, snapshotRefresh);
|
|
3936
4591
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3953,7 +4608,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
|
|
|
3953
4608
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
3954
4609
|
return errorSnapshot;
|
|
3955
4610
|
}
|
|
3956
|
-
function createResourceRequest(config) {
|
|
4611
|
+
function createResourceRequest$1(config) {
|
|
3957
4612
|
const headers = {};
|
|
3958
4613
|
return {
|
|
3959
4614
|
baseUri: '/services/data/v63.0',
|
|
@@ -3967,57 +4622,57 @@ function createResourceRequest(config) {
|
|
|
3967
4622
|
};
|
|
3968
4623
|
}
|
|
3969
4624
|
|
|
3970
|
-
const adapterName = 'getTemplates';
|
|
4625
|
+
const adapterName$1 = 'getTemplates';
|
|
3971
4626
|
const getTemplates_ConfigPropertyMetadata = [];
|
|
3972
|
-
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTemplates_ConfigPropertyMetadata);
|
|
3973
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
4627
|
+
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTemplates_ConfigPropertyMetadata);
|
|
4628
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$e(getTemplates_ConfigPropertyMetadata);
|
|
3974
4629
|
function keyBuilder(luvio, config) {
|
|
3975
|
-
createResourceParams(config);
|
|
4630
|
+
createResourceParams$1(config);
|
|
3976
4631
|
return keyBuilder$1();
|
|
3977
4632
|
}
|
|
3978
|
-
function typeCheckConfig(untrustedConfig) {
|
|
4633
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
3979
4634
|
const config = {};
|
|
3980
4635
|
return config;
|
|
3981
4636
|
}
|
|
3982
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4637
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
3983
4638
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
3984
4639
|
return null;
|
|
3985
4640
|
}
|
|
3986
4641
|
if (process.env.NODE_ENV !== 'production') {
|
|
3987
4642
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
3988
4643
|
}
|
|
3989
|
-
const config = typeCheckConfig();
|
|
4644
|
+
const config = typeCheckConfig$1();
|
|
3990
4645
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3991
4646
|
return null;
|
|
3992
4647
|
}
|
|
3993
4648
|
return config;
|
|
3994
4649
|
}
|
|
3995
4650
|
function adapterFragment(luvio, config) {
|
|
3996
|
-
createResourceParams(config);
|
|
3997
|
-
return select();
|
|
4651
|
+
createResourceParams$1(config);
|
|
4652
|
+
return select$1();
|
|
3998
4653
|
}
|
|
3999
4654
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
4000
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
4655
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
4001
4656
|
config,
|
|
4002
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4657
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4003
4658
|
});
|
|
4004
4659
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4005
4660
|
}
|
|
4006
4661
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
4007
4662
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
4008
4663
|
config,
|
|
4009
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4664
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4010
4665
|
});
|
|
4011
4666
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
4012
4667
|
}
|
|
4013
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
4014
|
-
const resourceParams = createResourceParams(config);
|
|
4015
|
-
const request = createResourceRequest();
|
|
4668
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
4669
|
+
const resourceParams = createResourceParams$1(config);
|
|
4670
|
+
const request = createResourceRequest$1();
|
|
4016
4671
|
return luvio.dispatchResourceRequest(request, options)
|
|
4017
4672
|
.then((response) => {
|
|
4018
4673
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
4019
4674
|
const cache = new StoreKeyMap();
|
|
4020
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
4675
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
4021
4676
|
return cache;
|
|
4022
4677
|
});
|
|
4023
4678
|
}, (response) => {
|
|
@@ -4025,7 +4680,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
4025
4680
|
});
|
|
4026
4681
|
}
|
|
4027
4682
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
4028
|
-
return buildNetworkSnapshotCachePolicy$
|
|
4683
|
+
return buildNetworkSnapshotCachePolicy$a(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
4029
4684
|
}
|
|
4030
4685
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
4031
4686
|
const { luvio, config } = context;
|
|
@@ -4036,12 +4691,12 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
4036
4691
|
};
|
|
4037
4692
|
const cacheSnapshot = storeLookup(selector, {
|
|
4038
4693
|
config,
|
|
4039
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
4694
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
4040
4695
|
});
|
|
4041
4696
|
return cacheSnapshot;
|
|
4042
4697
|
}
|
|
4043
4698
|
const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplates(untrustedConfig, requestContext) {
|
|
4044
|
-
const config = validateAdapterConfig(untrustedConfig, getTemplates_ConfigPropertyNames);
|
|
4699
|
+
const config = validateAdapterConfig$1(untrustedConfig, getTemplates_ConfigPropertyNames);
|
|
4045
4700
|
// Invalid or incomplete config
|
|
4046
4701
|
if (config === null) {
|
|
4047
4702
|
return null;
|
|
@@ -4050,7 +4705,114 @@ const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplate
|
|
|
4050
4705
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
4051
4706
|
};
|
|
4052
4707
|
|
|
4708
|
+
function select(luvio, params) {
|
|
4709
|
+
return select$7();
|
|
4710
|
+
}
|
|
4711
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
4712
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
4713
|
+
}
|
|
4714
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
4715
|
+
const { body } = response;
|
|
4716
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
4717
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
4718
|
+
const snapshot = luvio.storeLookup({
|
|
4719
|
+
recordId: key,
|
|
4720
|
+
node: select(),
|
|
4721
|
+
variables: {},
|
|
4722
|
+
});
|
|
4723
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4724
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
4725
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4728
|
+
deepFreeze(snapshot.data);
|
|
4729
|
+
return snapshot;
|
|
4730
|
+
}
|
|
4731
|
+
function createResourceRequest(config) {
|
|
4732
|
+
const headers = {};
|
|
4733
|
+
return {
|
|
4734
|
+
baseUri: '/services/data/v63.0',
|
|
4735
|
+
basePath: '/app-framework/templates/' + config.urlParams.templateIdOrApiName + '/tags',
|
|
4736
|
+
method: 'put',
|
|
4737
|
+
body: config.body,
|
|
4738
|
+
urlParams: config.urlParams,
|
|
4739
|
+
queryParams: {},
|
|
4740
|
+
headers,
|
|
4741
|
+
priority: 'normal',
|
|
4742
|
+
};
|
|
4743
|
+
}
|
|
4744
|
+
|
|
4745
|
+
const adapterName = 'setTags';
|
|
4746
|
+
const setTags_ConfigPropertyMetadata = [
|
|
4747
|
+
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
4748
|
+
generateParamConfigMetadata('tags', false, 2 /* Body */, 4 /* Unsupported */),
|
|
4749
|
+
];
|
|
4750
|
+
const setTags_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, setTags_ConfigPropertyMetadata);
|
|
4751
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$e(setTags_ConfigPropertyMetadata);
|
|
4752
|
+
function typeCheckConfig(untrustedConfig) {
|
|
4753
|
+
const config = {};
|
|
4754
|
+
typeCheckConfig$e(untrustedConfig, config, setTags_ConfigPropertyMetadata);
|
|
4755
|
+
const untrustedConfig_tags = untrustedConfig.tags;
|
|
4756
|
+
if (untrustedIsObject(untrustedConfig_tags)) {
|
|
4757
|
+
const untrustedConfig_tags_object = {};
|
|
4758
|
+
const untrustedConfig_tags_keys = Object.keys(untrustedConfig_tags);
|
|
4759
|
+
for (let i = 0, arrayLength = untrustedConfig_tags_keys.length; i < arrayLength; i++) {
|
|
4760
|
+
const key = untrustedConfig_tags_keys[i];
|
|
4761
|
+
const untrustedConfig_tags_prop = untrustedConfig_tags[key];
|
|
4762
|
+
if (untrustedConfig_tags_object !== undefined) {
|
|
4763
|
+
untrustedConfig_tags_object[key] = untrustedConfig_tags_prop;
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
if (untrustedConfig_tags_object !== undefined && Object.keys(untrustedConfig_tags_object).length >= 0) {
|
|
4767
|
+
config.tags = untrustedConfig_tags_object;
|
|
4768
|
+
}
|
|
4769
|
+
}
|
|
4770
|
+
return config;
|
|
4771
|
+
}
|
|
4772
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
4773
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
4774
|
+
return null;
|
|
4775
|
+
}
|
|
4776
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4777
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
4778
|
+
}
|
|
4779
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
4780
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
4781
|
+
return null;
|
|
4782
|
+
}
|
|
4783
|
+
return config;
|
|
4784
|
+
}
|
|
4785
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
4786
|
+
const resourceParams = createResourceParams(config);
|
|
4787
|
+
const request = createResourceRequest(resourceParams);
|
|
4788
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
4789
|
+
.then((response) => {
|
|
4790
|
+
return luvio.handleSuccessResponse(() => {
|
|
4791
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
4792
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
4793
|
+
}, () => {
|
|
4794
|
+
const cache = new StoreKeyMap();
|
|
4795
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
4796
|
+
return cache;
|
|
4797
|
+
});
|
|
4798
|
+
}, (response) => {
|
|
4799
|
+
deepFreeze(response);
|
|
4800
|
+
throw response;
|
|
4801
|
+
});
|
|
4802
|
+
}
|
|
4803
|
+
const setTagsAdapterFactory = (luvio) => {
|
|
4804
|
+
return function setTags(untrustedConfig) {
|
|
4805
|
+
const config = validateAdapterConfig(untrustedConfig, setTags_ConfigPropertyNames);
|
|
4806
|
+
// Invalid or incomplete config
|
|
4807
|
+
if (config === null) {
|
|
4808
|
+
throw new Error('Invalid config for "setTags"');
|
|
4809
|
+
}
|
|
4810
|
+
return buildNetworkSnapshot(luvio, config);
|
|
4811
|
+
};
|
|
4812
|
+
};
|
|
4813
|
+
|
|
4053
4814
|
let createApp;
|
|
4815
|
+
let createTemplate;
|
|
4054
4816
|
let deleteApp;
|
|
4055
4817
|
let getApp;
|
|
4056
4818
|
let getAppActivities;
|
|
@@ -4062,11 +4824,14 @@ let getAppAssetsNotifyChange;
|
|
|
4062
4824
|
let getAppNotifyChange;
|
|
4063
4825
|
let getApps;
|
|
4064
4826
|
let getInstalledAssets;
|
|
4827
|
+
let getTags;
|
|
4828
|
+
let getTagsNotifyChange;
|
|
4065
4829
|
let getTemplate;
|
|
4066
4830
|
let getTemplateConfig;
|
|
4067
4831
|
let getTemplateConfigNotifyChange;
|
|
4068
4832
|
let getTemplateNotifyChange;
|
|
4069
4833
|
let getTemplates;
|
|
4834
|
+
let setTags;
|
|
4070
4835
|
// Imperative GET Adapters
|
|
4071
4836
|
let getApp_imperative;
|
|
4072
4837
|
let getAppActivities_imperative;
|
|
@@ -4074,6 +4839,7 @@ let getAppActivity_imperative;
|
|
|
4074
4839
|
let getAppAssets_imperative;
|
|
4075
4840
|
let getApps_imperative;
|
|
4076
4841
|
let getInstalledAssets_imperative;
|
|
4842
|
+
let getTags_imperative;
|
|
4077
4843
|
let getTemplate_imperative;
|
|
4078
4844
|
let getTemplateConfig_imperative;
|
|
4079
4845
|
let getTemplates_imperative;
|
|
@@ -4087,6 +4853,7 @@ const getInstalledAssetsMetadata = {
|
|
|
4087
4853
|
name: 'getInstalledAssets',
|
|
4088
4854
|
ttl: 5000,
|
|
4089
4855
|
};
|
|
4856
|
+
const getTagsMetadata = { apiFamily: 'AppFramework', name: 'getTags', ttl: 5000 };
|
|
4090
4857
|
const getTemplateMetadata = { apiFamily: 'AppFramework', name: 'getTemplate', ttl: 5000 };
|
|
4091
4858
|
const getTemplateConfigMetadata = {
|
|
4092
4859
|
apiFamily: 'AppFramework',
|
|
@@ -4103,6 +4870,7 @@ function bindExportsTo(luvio) {
|
|
|
4103
4870
|
const getAppAssets_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getAppAssets', getAppAssetsAdapterFactory), getAppAssetsMetadata);
|
|
4104
4871
|
const getApps_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getApps', getAppsAdapterFactory), getAppsMetadata);
|
|
4105
4872
|
const getInstalledAssets_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getInstalledAssets', getInstalledAssetsAdapterFactory), getInstalledAssetsMetadata);
|
|
4873
|
+
const getTags_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTags', getTagsAdapterFactory), getTagsMetadata);
|
|
4106
4874
|
const getTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTemplate', getTemplateAdapterFactory), getTemplateMetadata);
|
|
4107
4875
|
const getTemplateConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTemplateConfig', getTemplateConfigAdapterFactory), getTemplateConfigMetadata);
|
|
4108
4876
|
const getTemplates_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTemplates', getTemplatesAdapterFactory), getTemplatesMetadata);
|
|
@@ -4112,22 +4880,26 @@ function bindExportsTo(luvio) {
|
|
|
4112
4880
|
}
|
|
4113
4881
|
return {
|
|
4114
4882
|
createApp: unwrapSnapshotData(createAppAdapterFactory),
|
|
4115
|
-
|
|
4883
|
+
createTemplate: unwrapSnapshotData(createTemplateAdapterFactory),
|
|
4884
|
+
deleteApp: createLDSAdapter(luvio, adapterName$b, deleteAppAdapterFactory),
|
|
4116
4885
|
getApp: createWireAdapterConstructor(luvio, getApp_ldsAdapter, getAppMetadata),
|
|
4117
4886
|
getAppActivities: createWireAdapterConstructor(luvio, getAppActivities_ldsAdapter, getAppActivitiesMetadata),
|
|
4118
|
-
getAppActivitiesNotifyChange: createLDSAdapter(luvio, 'getAppActivitiesNotifyChange', notifyChangeFactory$
|
|
4887
|
+
getAppActivitiesNotifyChange: createLDSAdapter(luvio, 'getAppActivitiesNotifyChange', notifyChangeFactory$5),
|
|
4119
4888
|
getAppActivity: createWireAdapterConstructor(luvio, getAppActivity_ldsAdapter, getAppActivityMetadata),
|
|
4120
|
-
getAppActivityNotifyChange: createLDSAdapter(luvio, 'getAppActivityNotifyChange', notifyChangeFactory$
|
|
4889
|
+
getAppActivityNotifyChange: createLDSAdapter(luvio, 'getAppActivityNotifyChange', notifyChangeFactory$4),
|
|
4121
4890
|
getAppAssets: createWireAdapterConstructor(luvio, getAppAssets_ldsAdapter, getAppAssetsMetadata),
|
|
4122
|
-
getAppAssetsNotifyChange: createLDSAdapter(luvio, 'getAppAssetsNotifyChange', notifyChangeFactory$
|
|
4123
|
-
getAppNotifyChange: createLDSAdapter(luvio, 'getAppNotifyChange', notifyChangeFactory$
|
|
4891
|
+
getAppAssetsNotifyChange: createLDSAdapter(luvio, 'getAppAssetsNotifyChange', notifyChangeFactory$3),
|
|
4892
|
+
getAppNotifyChange: createLDSAdapter(luvio, 'getAppNotifyChange', notifyChangeFactory$6),
|
|
4124
4893
|
getApps: createWireAdapterConstructor(luvio, getApps_ldsAdapter, getAppsMetadata),
|
|
4125
4894
|
getInstalledAssets: createWireAdapterConstructor(luvio, getInstalledAssets_ldsAdapter, getInstalledAssetsMetadata),
|
|
4895
|
+
getTags: createWireAdapterConstructor(luvio, getTags_ldsAdapter, getTagsMetadata),
|
|
4896
|
+
getTagsNotifyChange: createLDSAdapter(luvio, 'getTagsNotifyChange', notifyChangeFactory$2),
|
|
4126
4897
|
getTemplate: createWireAdapterConstructor(luvio, getTemplate_ldsAdapter, getTemplateMetadata),
|
|
4127
4898
|
getTemplateConfig: createWireAdapterConstructor(luvio, getTemplateConfig_ldsAdapter, getTemplateConfigMetadata),
|
|
4128
4899
|
getTemplateConfigNotifyChange: createLDSAdapter(luvio, 'getTemplateConfigNotifyChange', notifyChangeFactory),
|
|
4129
4900
|
getTemplateNotifyChange: createLDSAdapter(luvio, 'getTemplateNotifyChange', notifyChangeFactory$1),
|
|
4130
4901
|
getTemplates: createWireAdapterConstructor(luvio, getTemplates_ldsAdapter, getTemplatesMetadata),
|
|
4902
|
+
setTags: unwrapSnapshotData(setTagsAdapterFactory),
|
|
4131
4903
|
// Imperative GET Adapters
|
|
4132
4904
|
getApp_imperative: createImperativeAdapter(luvio, getApp_ldsAdapter, getAppMetadata),
|
|
4133
4905
|
getAppActivities_imperative: createImperativeAdapter(luvio, getAppActivities_ldsAdapter, getAppActivitiesMetadata),
|
|
@@ -4135,6 +4907,7 @@ function bindExportsTo(luvio) {
|
|
|
4135
4907
|
getAppAssets_imperative: createImperativeAdapter(luvio, getAppAssets_ldsAdapter, getAppAssetsMetadata),
|
|
4136
4908
|
getApps_imperative: createImperativeAdapter(luvio, getApps_ldsAdapter, getAppsMetadata),
|
|
4137
4909
|
getInstalledAssets_imperative: createImperativeAdapter(luvio, getInstalledAssets_ldsAdapter, getInstalledAssetsMetadata),
|
|
4910
|
+
getTags_imperative: createImperativeAdapter(luvio, getTags_ldsAdapter, getTagsMetadata),
|
|
4138
4911
|
getTemplate_imperative: createImperativeAdapter(luvio, getTemplate_ldsAdapter, getTemplateMetadata),
|
|
4139
4912
|
getTemplateConfig_imperative: createImperativeAdapter(luvio, getTemplateConfig_ldsAdapter, getTemplateConfigMetadata),
|
|
4140
4913
|
getTemplates_imperative: createImperativeAdapter(luvio, getTemplates_ldsAdapter, getTemplatesMetadata),
|
|
@@ -4144,6 +4917,7 @@ function bindExportsTo(luvio) {
|
|
|
4144
4917
|
withDefaultLuvio((luvio) => {
|
|
4145
4918
|
({
|
|
4146
4919
|
createApp,
|
|
4920
|
+
createTemplate,
|
|
4147
4921
|
deleteApp,
|
|
4148
4922
|
getApp,
|
|
4149
4923
|
getAppActivities,
|
|
@@ -4155,22 +4929,26 @@ withDefaultLuvio((luvio) => {
|
|
|
4155
4929
|
getAppNotifyChange,
|
|
4156
4930
|
getApps,
|
|
4157
4931
|
getInstalledAssets,
|
|
4932
|
+
getTags,
|
|
4933
|
+
getTagsNotifyChange,
|
|
4158
4934
|
getTemplate,
|
|
4159
4935
|
getTemplateConfig,
|
|
4160
4936
|
getTemplateConfigNotifyChange,
|
|
4161
4937
|
getTemplateNotifyChange,
|
|
4162
4938
|
getTemplates,
|
|
4939
|
+
setTags,
|
|
4163
4940
|
getApp_imperative,
|
|
4164
4941
|
getAppActivities_imperative,
|
|
4165
4942
|
getAppActivity_imperative,
|
|
4166
4943
|
getAppAssets_imperative,
|
|
4167
4944
|
getApps_imperative,
|
|
4168
4945
|
getInstalledAssets_imperative,
|
|
4946
|
+
getTags_imperative,
|
|
4169
4947
|
getTemplate_imperative,
|
|
4170
4948
|
getTemplateConfig_imperative,
|
|
4171
4949
|
getTemplates_imperative,
|
|
4172
4950
|
} = bindExportsTo(luvio));
|
|
4173
4951
|
});
|
|
4174
4952
|
|
|
4175
|
-
export { createApp, deleteApp, getApp, getAppActivities, getAppActivitiesNotifyChange, getAppActivities_imperative, getAppActivity, getAppActivityNotifyChange, getAppActivity_imperative, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getInstalledAssets, getInstalledAssets_imperative, getTemplate, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative };
|
|
4176
|
-
// version: 1.
|
|
4953
|
+
export { createApp, createTemplate, deleteApp, getApp, getAppActivities, getAppActivitiesNotifyChange, getAppActivities_imperative, getAppActivity, getAppActivityNotifyChange, getAppActivity_imperative, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getInstalledAssets, getInstalledAssets_imperative, getTags, getTagsNotifyChange, getTags_imperative, getTemplate, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative, setTags };
|
|
4954
|
+
// version: 1.322.0-87f682c9f3
|