@salesforce/lds-adapters-analytics-app-framework 1.308.0 → 1.309.0-dev11
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 +954 -315
- package/dist/es/es2018/types/src/generated/adapters/createApp.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/adapters/getAppActivities.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getAppActivity.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getApps.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
- package/dist/es/es2018/types/src/generated/resources/getAppFrameworkApps.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/resources/getAppFrameworkAppsActivitiesByAppIdOrApiName.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getAppFrameworkAppsActivitiesByAppIdOrApiNameAndId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postAppFrameworkApps.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/types/AppActivityCollectionRepresentation.d.ts +51 -0
- package/dist/es/es2018/types/src/generated/types/AppActivityItemInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/AppActivityItemRepresentation.d.ts +57 -0
- package/dist/es/es2018/types/src/generated/types/AppInputRepresentation.d.ts +10 -1
- package/dist/es/es2018/types/src/generated/types/AppRepresentation.d.ts +10 -1
- package/dist/es/es2018/types/src/generated/types/AppResultRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/AssetCollectionRepresentation.d.ts +4 -4
- package/dist/es/es2018/types/src/generated/types/AssetRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/TemplateInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/TemplateRepresentation.d.ts +3 -3
- package/package.json +3 -3
- package/sfdc/index.js +1036 -292
- package/src/raml/api.raml +149 -1
- package/src/raml/luvio.raml +24 -2
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$a, typeCheckConfig as typeCheckConfig$a, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$8 } 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$h = "8747a45321deaf63f65cf74537b07eb6";
|
|
126
|
+
function validate$e(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$c(obj, path = 'UserRepresentation') {
|
|
|
167
167
|
})();
|
|
168
168
|
return v_error === undefined ? null : v_error;
|
|
169
169
|
}
|
|
170
|
-
const select$
|
|
170
|
+
const select$q = function UserRepresentationSelect() {
|
|
171
171
|
return {
|
|
172
172
|
kind: 'Fragment',
|
|
173
|
-
version: VERSION$
|
|
173
|
+
version: VERSION$h,
|
|
174
174
|
private: [],
|
|
175
175
|
selections: [
|
|
176
176
|
{
|
|
@@ -188,7 +188,7 @@ const select$m = function UserRepresentationSelect() {
|
|
|
188
188
|
]
|
|
189
189
|
};
|
|
190
190
|
};
|
|
191
|
-
function equals$
|
|
191
|
+
function equals$e(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$c(existing, incoming) {
|
|
|
207
207
|
return true;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
const VERSION$
|
|
211
|
-
function validate$
|
|
210
|
+
const VERSION$g = "74662b770f974cec987197380f2580ea";
|
|
211
|
+
function validate$d(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$b(obj, path = 'ScheduledTimezoneRepresentation') {
|
|
|
227
227
|
})();
|
|
228
228
|
return v_error === undefined ? null : v_error;
|
|
229
229
|
}
|
|
230
|
-
const select$
|
|
230
|
+
const select$p = function ScheduledTimezoneRepresentationSelect() {
|
|
231
231
|
return {
|
|
232
232
|
kind: 'Fragment',
|
|
233
|
-
version: VERSION$
|
|
233
|
+
version: VERSION$g,
|
|
234
234
|
private: [],
|
|
235
235
|
selections: [
|
|
236
236
|
{
|
|
@@ -248,7 +248,7 @@ const select$l = function ScheduledTimezoneRepresentationSelect() {
|
|
|
248
248
|
]
|
|
249
249
|
};
|
|
250
250
|
};
|
|
251
|
-
function equals$
|
|
251
|
+
function equals$d(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$b(existing, incoming) {
|
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
const VERSION$
|
|
271
|
-
function validate$
|
|
270
|
+
const VERSION$f = "d96bf6818be64d5924beaaad8e684221";
|
|
271
|
+
function validate$c(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$a(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$d(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$a(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$o = function ScheduledTimeRepresentationSelect() {
|
|
298
|
+
const { selections: ScheduledTimezoneRepresentation__selections, opaque: ScheduledTimezoneRepresentation__opaque, } = select$p();
|
|
299
299
|
return {
|
|
300
300
|
kind: 'Fragment',
|
|
301
|
-
version: VERSION$
|
|
301
|
+
version: VERSION$f,
|
|
302
302
|
private: [],
|
|
303
303
|
selections: [
|
|
304
304
|
{
|
|
@@ -317,7 +317,7 @@ const select$k = function ScheduledTimeRepresentationSelect() {
|
|
|
317
317
|
]
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
|
-
function equals$
|
|
320
|
+
function equals$c(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$a(existing, incoming) {
|
|
|
330
330
|
}
|
|
331
331
|
const existing_timezone = existing.timezone;
|
|
332
332
|
const incoming_timezone = incoming.timezone;
|
|
333
|
-
if (!(equals$
|
|
333
|
+
if (!(equals$d(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$e = "91838b86aa135ce828af6242b11ae888";
|
|
340
|
+
const select$n = function HourlyScheduledItemRepresentationSelect() {
|
|
341
|
+
const { selections: ScheduledItemRepresentationSelections } = select$k();
|
|
342
342
|
return {
|
|
343
343
|
kind: 'Fragment',
|
|
344
|
-
version: VERSION$
|
|
344
|
+
version: VERSION$e,
|
|
345
345
|
private: [],
|
|
346
346
|
selections: [
|
|
347
347
|
...ScheduledItemRepresentationSelections,
|
|
@@ -358,12 +358,12 @@ const select$j = function HourlyScheduledItemRepresentationSelect() {
|
|
|
358
358
|
};
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
const VERSION$
|
|
362
|
-
const select$
|
|
363
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
361
|
+
const VERSION$d = "46260a34f0b2c2d7adc7f8c150a8d8fb";
|
|
362
|
+
const select$m = function WeeklyScheduledItemRepresentationSelect() {
|
|
363
|
+
const { selections: ScheduledItemRepresentationSelections } = select$k();
|
|
364
364
|
return {
|
|
365
365
|
kind: 'Fragment',
|
|
366
|
-
version: VERSION$
|
|
366
|
+
version: VERSION$d,
|
|
367
367
|
private: [],
|
|
368
368
|
selections: [
|
|
369
369
|
...ScheduledItemRepresentationSelections,
|
|
@@ -376,12 +376,12 @@ const select$i = function WeeklyScheduledItemRepresentationSelect() {
|
|
|
376
376
|
};
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
const VERSION$
|
|
380
|
-
const select$
|
|
381
|
-
const { selections: ScheduledItemRepresentationSelections } = select$
|
|
379
|
+
const VERSION$c = "dcda6d015a01d9acde5fac241448cfe4";
|
|
380
|
+
const select$l = function DailyScheduledItemRepresentationSelect() {
|
|
381
|
+
const { selections: ScheduledItemRepresentationSelections } = select$k();
|
|
382
382
|
return {
|
|
383
383
|
kind: 'Fragment',
|
|
384
|
-
version: VERSION$
|
|
384
|
+
version: VERSION$c,
|
|
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$b = "193484b4261ca5840b61caaab3dea067";
|
|
399
|
+
function validate$b(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$9(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$c(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$9(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$n();
|
|
427
|
+
const weeklyScheduledItemRepresentationSelections = select$m();
|
|
428
|
+
const dailyScheduledItemRepresentationSelections = select$l();
|
|
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$k = function ScheduledItemRepresentationSelect() {
|
|
441
|
+
const { selections: ScheduledTimeRepresentation__selections, opaque: ScheduledTimeRepresentation__opaque, } = select$o();
|
|
442
442
|
return {
|
|
443
443
|
kind: 'Fragment',
|
|
444
|
-
version: VERSION$
|
|
444
|
+
version: VERSION$b,
|
|
445
445
|
private: [],
|
|
446
446
|
selections: [
|
|
447
447
|
{
|
|
@@ -460,7 +460,7 @@ const select$g = function ScheduledItemRepresentationSelect() {
|
|
|
460
460
|
]
|
|
461
461
|
};
|
|
462
462
|
};
|
|
463
|
-
function equals$
|
|
463
|
+
function equals$b(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$9(existing, incoming) {
|
|
|
473
473
|
}
|
|
474
474
|
const existing_time = existing.time;
|
|
475
475
|
const incoming_time = incoming.time;
|
|
476
|
-
if (!(equals$
|
|
476
|
+
if (!(equals$c(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$a = "06b5da5162febff2692d819c9b718be5";
|
|
483
|
+
function validate$a(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$8(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$b(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$8(obj, path = 'AppScheduleRepresentation') {
|
|
|
543
543
|
})();
|
|
544
544
|
return v_error === undefined ? null : v_error;
|
|
545
545
|
}
|
|
546
|
-
const select$
|
|
546
|
+
const select$j = function AppScheduleRepresentationSelect() {
|
|
547
547
|
const ScheduledItemRepresentation__unionSelections = selectChildren();
|
|
548
548
|
return {
|
|
549
549
|
kind: 'Fragment',
|
|
550
|
-
version: VERSION$
|
|
550
|
+
version: VERSION$a,
|
|
551
551
|
private: [],
|
|
552
552
|
selections: [
|
|
553
553
|
{
|
|
@@ -565,13 +565,13 @@ const select$f = function AppScheduleRepresentationSelect() {
|
|
|
565
565
|
]
|
|
566
566
|
};
|
|
567
567
|
};
|
|
568
|
-
function equals$
|
|
568
|
+
function equals$a(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$b(existing_dataRefreshSchedule, incoming_dataRefreshSchedule)))) {
|
|
575
575
|
return false;
|
|
576
576
|
}
|
|
577
577
|
const existing_url = existing.url;
|
|
@@ -582,13 +582,18 @@ function equals$8(existing, incoming) {
|
|
|
582
582
|
return true;
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
const TTL$
|
|
586
|
-
const VERSION$
|
|
587
|
-
function validate$
|
|
585
|
+
const TTL$9 = 5000;
|
|
586
|
+
const VERSION$9 = "be6294bb853a9581fb3b06a2d8caa5d5";
|
|
587
|
+
function validate$9(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 + '")');
|
|
591
591
|
}
|
|
592
|
+
const obj_activitiesUrl = obj.activitiesUrl;
|
|
593
|
+
const path_activitiesUrl = path + '.activitiesUrl';
|
|
594
|
+
if (typeof obj_activitiesUrl !== 'string') {
|
|
595
|
+
return new TypeError('Expected "string" but received "' + typeof obj_activitiesUrl + '" (at "' + path_activitiesUrl + '")');
|
|
596
|
+
}
|
|
592
597
|
const obj_applicationStatus = obj.applicationStatus;
|
|
593
598
|
const path_applicationStatus = path + '.applicationStatus';
|
|
594
599
|
if (typeof obj_applicationStatus !== 'string') {
|
|
@@ -601,7 +606,7 @@ function validate$7(obj, path = 'AppRepresentation') {
|
|
|
601
606
|
}
|
|
602
607
|
const obj_createdBy = obj.createdBy;
|
|
603
608
|
const path_createdBy = path + '.createdBy';
|
|
604
|
-
const referencepath_createdByValidationError = validate$
|
|
609
|
+
const referencepath_createdByValidationError = validate$e(obj_createdBy, path_createdBy);
|
|
605
610
|
if (referencepath_createdByValidationError !== null) {
|
|
606
611
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_createdBy + '")\n';
|
|
607
612
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -655,7 +660,7 @@ function validate$7(obj, path = 'AppRepresentation') {
|
|
|
655
660
|
}
|
|
656
661
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
657
662
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
658
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
663
|
+
const referencepath_lastModifiedByValidationError = validate$e(obj_lastModifiedBy, path_lastModifiedBy);
|
|
659
664
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
660
665
|
let message = 'Object doesn\'t match UserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
661
666
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -666,6 +671,11 @@ function validate$7(obj, path = 'AppRepresentation') {
|
|
|
666
671
|
if (typeof obj_lastModifiedDate !== 'string') {
|
|
667
672
|
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
668
673
|
}
|
|
674
|
+
const obj_latestActivityUrl = obj.latestActivityUrl;
|
|
675
|
+
const path_latestActivityUrl = path + '.latestActivityUrl';
|
|
676
|
+
if (typeof obj_latestActivityUrl !== 'string') {
|
|
677
|
+
return new TypeError('Expected "string" but received "' + typeof obj_latestActivityUrl + '" (at "' + path_latestActivityUrl + '")');
|
|
678
|
+
}
|
|
669
679
|
const obj_name = obj.name;
|
|
670
680
|
const path_name = path + '.name';
|
|
671
681
|
if (typeof obj_name !== 'string') {
|
|
@@ -675,7 +685,7 @@ function validate$7(obj, path = 'AppRepresentation') {
|
|
|
675
685
|
const path_schedule = path + '.schedule';
|
|
676
686
|
let obj_schedule_union0 = null;
|
|
677
687
|
const obj_schedule_union0_error = (() => {
|
|
678
|
-
const referencepath_scheduleValidationError = validate$
|
|
688
|
+
const referencepath_scheduleValidationError = validate$a(obj_schedule, path_schedule);
|
|
679
689
|
if (referencepath_scheduleValidationError !== null) {
|
|
680
690
|
let message = 'Object doesn\'t match AppScheduleRepresentation (at "' + path_schedule + '")\n';
|
|
681
691
|
message += referencepath_scheduleValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -705,6 +715,11 @@ function validate$7(obj, path = 'AppRepresentation') {
|
|
|
705
715
|
if (typeof obj_templateSourceId !== 'string') {
|
|
706
716
|
return new TypeError('Expected "string" but received "' + typeof obj_templateSourceId + '" (at "' + path_templateSourceId + '")');
|
|
707
717
|
}
|
|
718
|
+
const obj_templateType = obj.templateType;
|
|
719
|
+
const path_templateType = path + '.templateType';
|
|
720
|
+
if (typeof obj_templateType !== 'string') {
|
|
721
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
722
|
+
}
|
|
708
723
|
const obj_templateValues = obj.templateValues;
|
|
709
724
|
const path_templateValues = path + '.templateValues';
|
|
710
725
|
if (typeof obj_templateValues !== 'object' || ArrayIsArray(obj_templateValues) || obj_templateValues === null) {
|
|
@@ -732,27 +747,31 @@ function validate$7(obj, path = 'AppRepresentation') {
|
|
|
732
747
|
})();
|
|
733
748
|
return v_error === undefined ? null : v_error;
|
|
734
749
|
}
|
|
735
|
-
const RepresentationType$
|
|
736
|
-
function keyBuilder$
|
|
737
|
-
return keyPrefix + '::' + RepresentationType$
|
|
750
|
+
const RepresentationType$9 = 'AppRepresentation';
|
|
751
|
+
function keyBuilder$o(luvio, config) {
|
|
752
|
+
return keyPrefix + '::' + RepresentationType$9 + ':' + config.id;
|
|
738
753
|
}
|
|
739
|
-
function keyBuilderFromType$
|
|
754
|
+
function keyBuilderFromType$7(luvio, object) {
|
|
740
755
|
const keyParams = {
|
|
741
756
|
id: object.id
|
|
742
757
|
};
|
|
743
|
-
return keyBuilder$
|
|
758
|
+
return keyBuilder$o(luvio, keyParams);
|
|
744
759
|
}
|
|
745
|
-
function normalize$
|
|
760
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
746
761
|
return input;
|
|
747
762
|
}
|
|
748
|
-
const select$
|
|
749
|
-
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$
|
|
750
|
-
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$
|
|
763
|
+
const select$i = function AppRepresentationSelect() {
|
|
764
|
+
const { selections: UserRepresentation__selections, opaque: UserRepresentation__opaque, } = select$q();
|
|
765
|
+
const { selections: AppScheduleRepresentation__selections, opaque: AppScheduleRepresentation__opaque, } = select$j();
|
|
751
766
|
return {
|
|
752
767
|
kind: 'Fragment',
|
|
753
|
-
version: VERSION$
|
|
768
|
+
version: VERSION$9,
|
|
754
769
|
private: [],
|
|
755
770
|
selections: [
|
|
771
|
+
{
|
|
772
|
+
name: 'activitiesUrl',
|
|
773
|
+
kind: 'Scalar'
|
|
774
|
+
},
|
|
756
775
|
{
|
|
757
776
|
name: 'applicationStatus',
|
|
758
777
|
kind: 'Scalar'
|
|
@@ -795,6 +814,10 @@ const select$e = function AppRepresentationSelect() {
|
|
|
795
814
|
name: 'lastModifiedDate',
|
|
796
815
|
kind: 'Scalar'
|
|
797
816
|
},
|
|
817
|
+
{
|
|
818
|
+
name: 'latestActivityUrl',
|
|
819
|
+
kind: 'Scalar'
|
|
820
|
+
},
|
|
798
821
|
{
|
|
799
822
|
name: 'name',
|
|
800
823
|
kind: 'Scalar'
|
|
@@ -809,6 +832,10 @@ const select$e = function AppRepresentationSelect() {
|
|
|
809
832
|
name: 'templateSourceId',
|
|
810
833
|
kind: 'Scalar'
|
|
811
834
|
},
|
|
835
|
+
{
|
|
836
|
+
name: 'templateType',
|
|
837
|
+
kind: 'Scalar'
|
|
838
|
+
},
|
|
812
839
|
{
|
|
813
840
|
name: 'templateValues',
|
|
814
841
|
kind: 'Object',
|
|
@@ -825,7 +852,12 @@ const select$e = function AppRepresentationSelect() {
|
|
|
825
852
|
]
|
|
826
853
|
};
|
|
827
854
|
};
|
|
828
|
-
function equals$
|
|
855
|
+
function equals$9(existing, incoming) {
|
|
856
|
+
const existing_activitiesUrl = existing.activitiesUrl;
|
|
857
|
+
const incoming_activitiesUrl = incoming.activitiesUrl;
|
|
858
|
+
if (!(existing_activitiesUrl === incoming_activitiesUrl)) {
|
|
859
|
+
return false;
|
|
860
|
+
}
|
|
829
861
|
const existing_applicationStatus = existing.applicationStatus;
|
|
830
862
|
const incoming_applicationStatus = incoming.applicationStatus;
|
|
831
863
|
if (!(existing_applicationStatus === incoming_applicationStatus)) {
|
|
@@ -861,6 +893,11 @@ function equals$7(existing, incoming) {
|
|
|
861
893
|
if (!(existing_lastModifiedDate === incoming_lastModifiedDate)) {
|
|
862
894
|
return false;
|
|
863
895
|
}
|
|
896
|
+
const existing_latestActivityUrl = existing.latestActivityUrl;
|
|
897
|
+
const incoming_latestActivityUrl = incoming.latestActivityUrl;
|
|
898
|
+
if (!(existing_latestActivityUrl === incoming_latestActivityUrl)) {
|
|
899
|
+
return false;
|
|
900
|
+
}
|
|
864
901
|
const existing_name = existing.name;
|
|
865
902
|
const incoming_name = incoming.name;
|
|
866
903
|
if (!(existing_name === incoming_name)) {
|
|
@@ -871,6 +908,11 @@ function equals$7(existing, incoming) {
|
|
|
871
908
|
if (!(existing_templateSourceId === incoming_templateSourceId)) {
|
|
872
909
|
return false;
|
|
873
910
|
}
|
|
911
|
+
const existing_templateType = existing.templateType;
|
|
912
|
+
const incoming_templateType = incoming.templateType;
|
|
913
|
+
if (!(existing_templateType === incoming_templateType)) {
|
|
914
|
+
return false;
|
|
915
|
+
}
|
|
874
916
|
const existing_templateVersion = existing.templateVersion;
|
|
875
917
|
const incoming_templateVersion = incoming.templateVersion;
|
|
876
918
|
if (!(existing_templateVersion === incoming_templateVersion)) {
|
|
@@ -883,7 +925,7 @@ function equals$7(existing, incoming) {
|
|
|
883
925
|
}
|
|
884
926
|
const existing_createdBy = existing.createdBy;
|
|
885
927
|
const incoming_createdBy = incoming.createdBy;
|
|
886
|
-
if (!(equals$
|
|
928
|
+
if (!(equals$e(existing_createdBy, incoming_createdBy))) {
|
|
887
929
|
return false;
|
|
888
930
|
}
|
|
889
931
|
const existing_description = existing.description;
|
|
@@ -893,7 +935,7 @@ function equals$7(existing, incoming) {
|
|
|
893
935
|
}
|
|
894
936
|
const existing_lastModifiedBy = existing.lastModifiedBy;
|
|
895
937
|
const incoming_lastModifiedBy = incoming.lastModifiedBy;
|
|
896
|
-
if (!(equals$
|
|
938
|
+
if (!(equals$e(existing_lastModifiedBy, incoming_lastModifiedBy))) {
|
|
897
939
|
return false;
|
|
898
940
|
}
|
|
899
941
|
const existing_schedule = existing.schedule;
|
|
@@ -901,7 +943,7 @@ function equals$7(existing, incoming) {
|
|
|
901
943
|
if (!(existing_schedule === incoming_schedule
|
|
902
944
|
|| (existing_schedule != null &&
|
|
903
945
|
incoming_schedule != null &&
|
|
904
|
-
equals$
|
|
946
|
+
equals$a(existing_schedule, incoming_schedule)))) {
|
|
905
947
|
return false;
|
|
906
948
|
}
|
|
907
949
|
const existing_templateValues = existing.templateValues;
|
|
@@ -916,31 +958,31 @@ function equals$7(existing, incoming) {
|
|
|
916
958
|
}
|
|
917
959
|
return true;
|
|
918
960
|
}
|
|
919
|
-
const ingest$
|
|
961
|
+
const ingest$9 = function AppRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
920
962
|
if (process.env.NODE_ENV !== 'production') {
|
|
921
|
-
const validateError = validate$
|
|
963
|
+
const validateError = validate$9(input);
|
|
922
964
|
if (validateError !== null) {
|
|
923
965
|
throw validateError;
|
|
924
966
|
}
|
|
925
967
|
}
|
|
926
|
-
const key = keyBuilderFromType$
|
|
927
|
-
const ttlToUse = TTL$
|
|
928
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
968
|
+
const key = keyBuilderFromType$7(luvio, input);
|
|
969
|
+
const ttlToUse = TTL$9;
|
|
970
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "AppFramework", VERSION$9, RepresentationType$9, equals$9);
|
|
929
971
|
return createLink(key);
|
|
930
972
|
};
|
|
931
|
-
function getTypeCacheKeys$
|
|
973
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
932
974
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
933
|
-
const rootKey = keyBuilderFromType$
|
|
975
|
+
const rootKey = keyBuilderFromType$7(luvio, input);
|
|
934
976
|
rootKeySet.set(rootKey, {
|
|
935
977
|
namespace: keyPrefix,
|
|
936
|
-
representationName: RepresentationType$
|
|
978
|
+
representationName: RepresentationType$9,
|
|
937
979
|
mergeable: false
|
|
938
980
|
});
|
|
939
981
|
}
|
|
940
982
|
|
|
941
|
-
const TTL$
|
|
942
|
-
const VERSION$
|
|
943
|
-
function validate$
|
|
983
|
+
const TTL$8 = 5000;
|
|
984
|
+
const VERSION$8 = "1e01d8ae397bfbae02ba4cfae1dac4fc";
|
|
985
|
+
function validate$8(obj, path = 'AppResultRepresentation') {
|
|
944
986
|
const v_error = (() => {
|
|
945
987
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
946
988
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -950,6 +992,32 @@ function validate$6(obj, path = 'AppResultRepresentation') {
|
|
|
950
992
|
if (typeof obj_app !== 'object') {
|
|
951
993
|
return new TypeError('Expected "object" but received "' + typeof obj_app + '" (at "' + path_app + '")');
|
|
952
994
|
}
|
|
995
|
+
const obj_failureMessage = obj.failureMessage;
|
|
996
|
+
const path_failureMessage = path + '.failureMessage';
|
|
997
|
+
let obj_failureMessage_union0 = null;
|
|
998
|
+
const obj_failureMessage_union0_error = (() => {
|
|
999
|
+
if (typeof obj_failureMessage !== 'string') {
|
|
1000
|
+
return new TypeError('Expected "string" but received "' + typeof obj_failureMessage + '" (at "' + path_failureMessage + '")');
|
|
1001
|
+
}
|
|
1002
|
+
})();
|
|
1003
|
+
if (obj_failureMessage_union0_error != null) {
|
|
1004
|
+
obj_failureMessage_union0 = obj_failureMessage_union0_error.message;
|
|
1005
|
+
}
|
|
1006
|
+
let obj_failureMessage_union1 = null;
|
|
1007
|
+
const obj_failureMessage_union1_error = (() => {
|
|
1008
|
+
if (obj_failureMessage !== null) {
|
|
1009
|
+
return new TypeError('Expected "null" but received "' + typeof obj_failureMessage + '" (at "' + path_failureMessage + '")');
|
|
1010
|
+
}
|
|
1011
|
+
})();
|
|
1012
|
+
if (obj_failureMessage_union1_error != null) {
|
|
1013
|
+
obj_failureMessage_union1 = obj_failureMessage_union1_error.message;
|
|
1014
|
+
}
|
|
1015
|
+
if (obj_failureMessage_union0 && obj_failureMessage_union1) {
|
|
1016
|
+
let message = 'Object doesn\'t match union (at "' + path_failureMessage + '")';
|
|
1017
|
+
message += '\n' + obj_failureMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1018
|
+
message += '\n' + obj_failureMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1019
|
+
return new TypeError(message);
|
|
1020
|
+
}
|
|
953
1021
|
const obj_runtimeRequestId = obj.runtimeRequestId;
|
|
954
1022
|
const path_runtimeRequestId = path + '.runtimeRequestId';
|
|
955
1023
|
if (typeof obj_runtimeRequestId !== 'string') {
|
|
@@ -972,20 +1040,20 @@ function validate$6(obj, path = 'AppResultRepresentation') {
|
|
|
972
1040
|
})();
|
|
973
1041
|
return v_error === undefined ? null : v_error;
|
|
974
1042
|
}
|
|
975
|
-
const RepresentationType$
|
|
976
|
-
function keyBuilder$
|
|
977
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1043
|
+
const RepresentationType$8 = 'AppResultRepresentation';
|
|
1044
|
+
function keyBuilder$n(luvio, config) {
|
|
1045
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.id;
|
|
978
1046
|
}
|
|
979
|
-
function keyBuilderFromType$
|
|
1047
|
+
function keyBuilderFromType$6(luvio, object) {
|
|
980
1048
|
const keyParams = {
|
|
981
1049
|
id: object.app.id
|
|
982
1050
|
};
|
|
983
|
-
return keyBuilder$
|
|
1051
|
+
return keyBuilder$n(luvio, keyParams);
|
|
984
1052
|
}
|
|
985
|
-
function normalize$
|
|
1053
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
986
1054
|
const input_app = input.app;
|
|
987
1055
|
const input_app_id = path.fullPath + '__app';
|
|
988
|
-
input.app = ingest$
|
|
1056
|
+
input.app = ingest$9(input_app, {
|
|
989
1057
|
fullPath: input_app_id,
|
|
990
1058
|
propertyName: 'app',
|
|
991
1059
|
parent: {
|
|
@@ -997,53 +1065,700 @@ function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
|
997
1065
|
}, luvio, store, timestamp);
|
|
998
1066
|
return input;
|
|
999
1067
|
}
|
|
1000
|
-
const select$
|
|
1068
|
+
const select$h = function AppResultRepresentationSelect() {
|
|
1069
|
+
return {
|
|
1070
|
+
kind: 'Fragment',
|
|
1071
|
+
version: VERSION$8,
|
|
1072
|
+
private: [],
|
|
1073
|
+
selections: [
|
|
1074
|
+
{
|
|
1075
|
+
name: 'app',
|
|
1076
|
+
kind: 'Link',
|
|
1077
|
+
fragment: select$i()
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
name: 'failureMessage',
|
|
1081
|
+
kind: 'Scalar'
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
name: 'runtimeRequestId',
|
|
1085
|
+
kind: 'Scalar'
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
name: 'state',
|
|
1089
|
+
kind: 'Object',
|
|
1090
|
+
// any
|
|
1091
|
+
}
|
|
1092
|
+
]
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
function equals$8(existing, incoming) {
|
|
1096
|
+
const existing_runtimeRequestId = existing.runtimeRequestId;
|
|
1097
|
+
const incoming_runtimeRequestId = incoming.runtimeRequestId;
|
|
1098
|
+
if (!(existing_runtimeRequestId === incoming_runtimeRequestId)) {
|
|
1099
|
+
return false;
|
|
1100
|
+
}
|
|
1101
|
+
const existing_app = existing.app;
|
|
1102
|
+
const incoming_app = incoming.app;
|
|
1103
|
+
if (!(existing_app.__ref === incoming_app.__ref)) {
|
|
1104
|
+
return false;
|
|
1105
|
+
}
|
|
1106
|
+
const existing_failureMessage = existing.failureMessage;
|
|
1107
|
+
const incoming_failureMessage = incoming.failureMessage;
|
|
1108
|
+
if (!(existing_failureMessage === incoming_failureMessage)) {
|
|
1109
|
+
return false;
|
|
1110
|
+
}
|
|
1111
|
+
const existing_state = existing.state;
|
|
1112
|
+
const incoming_state = incoming.state;
|
|
1113
|
+
const equals_state_props = equalsObject(existing_state, incoming_state, (existing_state_prop, incoming_state_prop) => {
|
|
1114
|
+
if (JSONStringify(incoming_state_prop) !== JSONStringify(existing_state_prop)) {
|
|
1115
|
+
return false;
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
if (equals_state_props === false) {
|
|
1119
|
+
return false;
|
|
1120
|
+
}
|
|
1121
|
+
return true;
|
|
1122
|
+
}
|
|
1123
|
+
const ingest$8 = function AppResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1124
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1125
|
+
const validateError = validate$8(input);
|
|
1126
|
+
if (validateError !== null) {
|
|
1127
|
+
throw validateError;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
const key = keyBuilderFromType$6(luvio, input);
|
|
1131
|
+
const ttlToUse = TTL$8;
|
|
1132
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "AppFramework", VERSION$8, RepresentationType$8, equals$8);
|
|
1133
|
+
return createLink(key);
|
|
1134
|
+
};
|
|
1135
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1136
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1137
|
+
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
1138
|
+
rootKeySet.set(rootKey, {
|
|
1139
|
+
namespace: keyPrefix,
|
|
1140
|
+
representationName: RepresentationType$8,
|
|
1141
|
+
mergeable: false
|
|
1142
|
+
});
|
|
1143
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.app);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
function select$g(luvio, params) {
|
|
1147
|
+
return select$h();
|
|
1148
|
+
}
|
|
1149
|
+
function getResponseCacheKeys$9(storeKeyMap, luvio, resourceParams, response) {
|
|
1150
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1151
|
+
}
|
|
1152
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
1153
|
+
const { body } = response;
|
|
1154
|
+
const key = keyBuilderFromType$6(luvio, body);
|
|
1155
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1156
|
+
const snapshot = luvio.storeLookup({
|
|
1157
|
+
recordId: key,
|
|
1158
|
+
node: select$g(),
|
|
1159
|
+
variables: {},
|
|
1160
|
+
});
|
|
1161
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1162
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1163
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
deepFreeze(snapshot.data);
|
|
1167
|
+
return snapshot;
|
|
1168
|
+
}
|
|
1169
|
+
function createResourceRequest$9(config) {
|
|
1170
|
+
const headers = {};
|
|
1171
|
+
return {
|
|
1172
|
+
baseUri: '/services/data/v62.0',
|
|
1173
|
+
basePath: '/app-framework/apps',
|
|
1174
|
+
method: 'post',
|
|
1175
|
+
body: config.body,
|
|
1176
|
+
urlParams: {},
|
|
1177
|
+
queryParams: {},
|
|
1178
|
+
headers,
|
|
1179
|
+
priority: 'normal',
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
const adapterName$9 = 'createApp';
|
|
1184
|
+
const createApp_ConfigPropertyMetadata = [
|
|
1185
|
+
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1186
|
+
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1187
|
+
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1188
|
+
generateParamConfigMetadata('logLevel', false, 2 /* Body */, 0 /* String */),
|
|
1189
|
+
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1190
|
+
generateParamConfigMetadata('runtimeMethod', false, 2 /* Body */, 0 /* String */),
|
|
1191
|
+
generateParamConfigMetadata('templateSourceId', true, 2 /* Body */, 0 /* String */),
|
|
1192
|
+
generateParamConfigMetadata('templateType', false, 2 /* Body */, 0 /* String */),
|
|
1193
|
+
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1194
|
+
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1195
|
+
];
|
|
1196
|
+
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, createApp_ConfigPropertyMetadata);
|
|
1197
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$a(createApp_ConfigPropertyMetadata);
|
|
1198
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
1199
|
+
const config = {};
|
|
1200
|
+
typeCheckConfig$a(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1201
|
+
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1202
|
+
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1203
|
+
const untrustedConfig_templateValues_object = {};
|
|
1204
|
+
const untrustedConfig_templateValues_keys = Object.keys(untrustedConfig_templateValues);
|
|
1205
|
+
for (let i = 0, arrayLength = untrustedConfig_templateValues_keys.length; i < arrayLength; i++) {
|
|
1206
|
+
const key = untrustedConfig_templateValues_keys[i];
|
|
1207
|
+
const untrustedConfig_templateValues_prop = untrustedConfig_templateValues[key];
|
|
1208
|
+
if (untrustedConfig_templateValues_object !== undefined) {
|
|
1209
|
+
untrustedConfig_templateValues_object[key] = untrustedConfig_templateValues_prop;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
if (untrustedConfig_templateValues_object !== undefined && Object.keys(untrustedConfig_templateValues_object).length >= 0) {
|
|
1213
|
+
config.templateValues = untrustedConfig_templateValues_object;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
return config;
|
|
1217
|
+
}
|
|
1218
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
1219
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1220
|
+
return null;
|
|
1221
|
+
}
|
|
1222
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1223
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1224
|
+
}
|
|
1225
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
1226
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1227
|
+
return null;
|
|
1228
|
+
}
|
|
1229
|
+
return config;
|
|
1230
|
+
}
|
|
1231
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
1232
|
+
const resourceParams = createResourceParams$9(config);
|
|
1233
|
+
const request = createResourceRequest$9(resourceParams);
|
|
1234
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1235
|
+
.then((response) => {
|
|
1236
|
+
return luvio.handleSuccessResponse(() => {
|
|
1237
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
1238
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1239
|
+
}, () => {
|
|
1240
|
+
const cache = new StoreKeyMap();
|
|
1241
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams, response.body);
|
|
1242
|
+
return cache;
|
|
1243
|
+
});
|
|
1244
|
+
}, (response) => {
|
|
1245
|
+
deepFreeze(response);
|
|
1246
|
+
throw response;
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
const createAppAdapterFactory = (luvio) => {
|
|
1250
|
+
return function createApp(untrustedConfig) {
|
|
1251
|
+
const config = validateAdapterConfig$9(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1252
|
+
// Invalid or incomplete config
|
|
1253
|
+
if (config === null) {
|
|
1254
|
+
throw new Error('Invalid config for "createApp"');
|
|
1255
|
+
}
|
|
1256
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
function keyBuilder$m(luvio, params) {
|
|
1261
|
+
return keyBuilder$o(luvio, {
|
|
1262
|
+
id: params.urlParams.appIdOrApiName
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
function getResponseCacheKeys$8(cacheKeyMap, luvio, resourceParams) {
|
|
1266
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
1267
|
+
cacheKeyMap.set(key, {
|
|
1268
|
+
namespace: keyPrefix,
|
|
1269
|
+
representationName: RepresentationType$9,
|
|
1270
|
+
mergeable: false
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
function evictSuccess(luvio, resourceParams) {
|
|
1274
|
+
const key = keyBuilder$m(luvio, resourceParams);
|
|
1275
|
+
luvio.storeEvict(key);
|
|
1276
|
+
}
|
|
1277
|
+
function createResourceRequest$8(config) {
|
|
1278
|
+
const headers = {};
|
|
1279
|
+
return {
|
|
1280
|
+
baseUri: '/services/data/v62.0',
|
|
1281
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '',
|
|
1282
|
+
method: 'delete',
|
|
1283
|
+
body: null,
|
|
1284
|
+
urlParams: config.urlParams,
|
|
1285
|
+
queryParams: {},
|
|
1286
|
+
headers,
|
|
1287
|
+
priority: 'normal',
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
const adapterName$8 = 'deleteApp';
|
|
1292
|
+
const deleteApp_ConfigPropertyMetadata = [
|
|
1293
|
+
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1294
|
+
];
|
|
1295
|
+
const deleteApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, deleteApp_ConfigPropertyMetadata);
|
|
1296
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$a(deleteApp_ConfigPropertyMetadata);
|
|
1297
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
1298
|
+
const config = {};
|
|
1299
|
+
typeCheckConfig$a(untrustedConfig, config, deleteApp_ConfigPropertyMetadata);
|
|
1300
|
+
return config;
|
|
1301
|
+
}
|
|
1302
|
+
function validateAdapterConfig$8(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$8(untrustedConfig);
|
|
1310
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1311
|
+
return null;
|
|
1312
|
+
}
|
|
1313
|
+
return config;
|
|
1314
|
+
}
|
|
1315
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
1316
|
+
const resourceParams = createResourceParams$8(config);
|
|
1317
|
+
const request = createResourceRequest$8(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$8(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$8(untrustedConfig, deleteApp_ConfigPropertyNames);
|
|
1336
|
+
// Invalid or incomplete config
|
|
1337
|
+
if (config === null) {
|
|
1338
|
+
throw new Error(`Invalid config for "${adapterName$8}"`);
|
|
1339
|
+
}
|
|
1340
|
+
return buildNetworkSnapshot$8(luvio, config);
|
|
1341
|
+
};
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
function select$f(luvio, params) {
|
|
1345
|
+
return select$i();
|
|
1346
|
+
}
|
|
1347
|
+
function keyBuilder$l(luvio, params) {
|
|
1348
|
+
return keyBuilder$o(luvio, {
|
|
1349
|
+
id: params.urlParams.appIdOrApiName
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
1353
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response);
|
|
1354
|
+
}
|
|
1355
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
1356
|
+
const { body } = response;
|
|
1357
|
+
const key = keyBuilder$l(luvio, resourceParams);
|
|
1358
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1359
|
+
const snapshot = luvio.storeLookup({
|
|
1360
|
+
recordId: key,
|
|
1361
|
+
node: select$f(),
|
|
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');
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
deepFreeze(snapshot.data);
|
|
1370
|
+
return snapshot;
|
|
1371
|
+
}
|
|
1372
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
1373
|
+
const key = keyBuilder$l(luvio, params);
|
|
1374
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1375
|
+
const storeMetadataParams = {
|
|
1376
|
+
ttl: TTL$9,
|
|
1377
|
+
namespace: keyPrefix,
|
|
1378
|
+
version: VERSION$9,
|
|
1379
|
+
representationName: RepresentationType$9
|
|
1380
|
+
};
|
|
1381
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1382
|
+
return errorSnapshot;
|
|
1383
|
+
}
|
|
1384
|
+
function createResourceRequest$7(config) {
|
|
1385
|
+
const headers = {};
|
|
1386
|
+
return {
|
|
1387
|
+
baseUri: '/services/data/v62.0',
|
|
1388
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '',
|
|
1389
|
+
method: 'get',
|
|
1390
|
+
body: null,
|
|
1391
|
+
urlParams: config.urlParams,
|
|
1392
|
+
queryParams: {},
|
|
1393
|
+
headers,
|
|
1394
|
+
priority: 'normal',
|
|
1395
|
+
};
|
|
1396
|
+
}
|
|
1397
|
+
function createResourceRequestFromRepresentation$5(representation) {
|
|
1398
|
+
const config = {
|
|
1399
|
+
urlParams: {},
|
|
1400
|
+
};
|
|
1401
|
+
config.urlParams.appIdOrApiName = representation.id;
|
|
1402
|
+
return createResourceRequest$7(config);
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
const adapterName$7 = 'getApp';
|
|
1406
|
+
const getApp_ConfigPropertyMetadata = [
|
|
1407
|
+
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1408
|
+
];
|
|
1409
|
+
const getApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, getApp_ConfigPropertyMetadata);
|
|
1410
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$a(getApp_ConfigPropertyMetadata);
|
|
1411
|
+
function keyBuilder$k(luvio, config) {
|
|
1412
|
+
const resourceParams = createResourceParams$7(config);
|
|
1413
|
+
return keyBuilder$l(luvio, resourceParams);
|
|
1414
|
+
}
|
|
1415
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
1416
|
+
const config = {};
|
|
1417
|
+
typeCheckConfig$a(untrustedConfig, config, getApp_ConfigPropertyMetadata);
|
|
1418
|
+
return config;
|
|
1419
|
+
}
|
|
1420
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1421
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1422
|
+
return null;
|
|
1423
|
+
}
|
|
1424
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1425
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1426
|
+
}
|
|
1427
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
1428
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1429
|
+
return null;
|
|
1430
|
+
}
|
|
1431
|
+
return config;
|
|
1432
|
+
}
|
|
1433
|
+
function adapterFragment$7(luvio, config) {
|
|
1434
|
+
createResourceParams$7(config);
|
|
1435
|
+
return select$f();
|
|
1436
|
+
}
|
|
1437
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
1438
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
1439
|
+
config,
|
|
1440
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1441
|
+
});
|
|
1442
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1443
|
+
}
|
|
1444
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
1445
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
1446
|
+
config,
|
|
1447
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1448
|
+
});
|
|
1449
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1450
|
+
}
|
|
1451
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1452
|
+
const resourceParams = createResourceParams$7(config);
|
|
1453
|
+
const request = createResourceRequest$7(resourceParams);
|
|
1454
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1455
|
+
.then((response) => {
|
|
1456
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
1457
|
+
const cache = new StoreKeyMap();
|
|
1458
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
1459
|
+
return cache;
|
|
1460
|
+
});
|
|
1461
|
+
}, (response) => {
|
|
1462
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
1466
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$7, undefined, false);
|
|
1467
|
+
}
|
|
1468
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1469
|
+
const { luvio, config } = context;
|
|
1470
|
+
const selector = {
|
|
1471
|
+
recordId: keyBuilder$k(luvio, config),
|
|
1472
|
+
node: adapterFragment$7(luvio, config),
|
|
1473
|
+
variables: {},
|
|
1474
|
+
};
|
|
1475
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1476
|
+
config,
|
|
1477
|
+
resolve: () => buildNetworkSnapshot$7(luvio, config, snapshotRefreshOptions)
|
|
1478
|
+
});
|
|
1479
|
+
return cacheSnapshot;
|
|
1480
|
+
}
|
|
1481
|
+
const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedConfig, requestContext) {
|
|
1482
|
+
const config = validateAdapterConfig$7(untrustedConfig, getApp_ConfigPropertyNames);
|
|
1483
|
+
// Invalid or incomplete config
|
|
1484
|
+
if (config === null) {
|
|
1485
|
+
return null;
|
|
1486
|
+
}
|
|
1487
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1488
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
1489
|
+
};
|
|
1490
|
+
const notifyChangeFactory$5 = (luvio, options) => {
|
|
1491
|
+
return function getAppFrameworkAppsByAppIdOrApiNameNotifyChange(configs) {
|
|
1492
|
+
const keys = configs.map(c => keyBuilder$o(luvio, c));
|
|
1493
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1494
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1495
|
+
const { key, record: val } = entries[i];
|
|
1496
|
+
const refreshRequest = createResourceRequestFromRepresentation$5(val);
|
|
1497
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
1498
|
+
.then((response) => {
|
|
1499
|
+
return luvio.handleSuccessResponse(() => {
|
|
1500
|
+
const { body } = response;
|
|
1501
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
1502
|
+
return luvio.storeBroadcast();
|
|
1503
|
+
}, () => {
|
|
1504
|
+
const cache = new StoreKeyMap();
|
|
1505
|
+
getTypeCacheKeys$9(cache, luvio, response.body);
|
|
1506
|
+
return cache;
|
|
1507
|
+
});
|
|
1508
|
+
}, (error) => {
|
|
1509
|
+
return luvio.handleErrorResponse(() => {
|
|
1510
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1511
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
1512
|
+
ttl: TTL$9,
|
|
1513
|
+
namespace: keyPrefix,
|
|
1514
|
+
version: VERSION$9,
|
|
1515
|
+
representationName: RepresentationType$9
|
|
1516
|
+
});
|
|
1517
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1518
|
+
});
|
|
1519
|
+
});
|
|
1520
|
+
}
|
|
1521
|
+
});
|
|
1522
|
+
};
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
const TTL$7 = 5000;
|
|
1526
|
+
const VERSION$7 = "b8e879a936b5069ec247355c66198ca7";
|
|
1527
|
+
function validate$7(obj, path = 'AppActivityItemRepresentation') {
|
|
1528
|
+
const v_error = (() => {
|
|
1529
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1530
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1531
|
+
}
|
|
1532
|
+
const obj_activityType = obj.activityType;
|
|
1533
|
+
const path_activityType = path + '.activityType';
|
|
1534
|
+
if (typeof obj_activityType !== 'string') {
|
|
1535
|
+
return new TypeError('Expected "string" but received "' + typeof obj_activityType + '" (at "' + path_activityType + '")');
|
|
1536
|
+
}
|
|
1537
|
+
const obj_appId = obj.appId;
|
|
1538
|
+
const path_appId = path + '.appId';
|
|
1539
|
+
if (typeof obj_appId !== 'string') {
|
|
1540
|
+
return new TypeError('Expected "string" but received "' + typeof obj_appId + '" (at "' + path_appId + '")');
|
|
1541
|
+
}
|
|
1542
|
+
const obj_id = obj.id;
|
|
1543
|
+
const path_id = path + '.id';
|
|
1544
|
+
if (typeof obj_id !== 'string') {
|
|
1545
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1546
|
+
}
|
|
1547
|
+
const obj_runtimeRequest = obj.runtimeRequest;
|
|
1548
|
+
const path_runtimeRequest = path + '.runtimeRequest';
|
|
1549
|
+
if (typeof obj_runtimeRequest !== 'object' || ArrayIsArray(obj_runtimeRequest) || obj_runtimeRequest === null) {
|
|
1550
|
+
return new TypeError('Expected "object" but received "' + typeof obj_runtimeRequest + '" (at "' + path_runtimeRequest + '")');
|
|
1551
|
+
}
|
|
1552
|
+
const obj_runtimeRequest_keys = ObjectKeys(obj_runtimeRequest);
|
|
1553
|
+
for (let i = 0; i < obj_runtimeRequest_keys.length; i++) {
|
|
1554
|
+
const key = obj_runtimeRequest_keys[i];
|
|
1555
|
+
const obj_runtimeRequest_prop = obj_runtimeRequest[key];
|
|
1556
|
+
const path_runtimeRequest_prop = path_runtimeRequest + '["' + key + '"]';
|
|
1557
|
+
if (obj_runtimeRequest_prop === undefined) {
|
|
1558
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_runtimeRequest_prop + '" (at "' + path_runtimeRequest_prop + '")');
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
const obj_url = obj.url;
|
|
1562
|
+
const path_url = path + '.url';
|
|
1563
|
+
if (typeof obj_url !== 'string') {
|
|
1564
|
+
return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
|
|
1565
|
+
}
|
|
1566
|
+
})();
|
|
1567
|
+
return v_error === undefined ? null : v_error;
|
|
1568
|
+
}
|
|
1569
|
+
const RepresentationType$7 = 'AppActivityItemRepresentation';
|
|
1570
|
+
function keyBuilder$j(luvio, config) {
|
|
1571
|
+
return keyPrefix + '::' + RepresentationType$7 + ':' + config.appId + ':' + config.id;
|
|
1572
|
+
}
|
|
1573
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
1574
|
+
const keyParams = {
|
|
1575
|
+
appId: object.appId,
|
|
1576
|
+
id: object.id
|
|
1577
|
+
};
|
|
1578
|
+
return keyBuilder$j(luvio, keyParams);
|
|
1579
|
+
}
|
|
1580
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1581
|
+
return input;
|
|
1582
|
+
}
|
|
1583
|
+
const select$e = function AppActivityItemRepresentationSelect() {
|
|
1584
|
+
return {
|
|
1585
|
+
kind: 'Fragment',
|
|
1586
|
+
version: VERSION$7,
|
|
1587
|
+
private: [],
|
|
1588
|
+
selections: [
|
|
1589
|
+
{
|
|
1590
|
+
name: 'activityType',
|
|
1591
|
+
kind: 'Scalar'
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
name: 'appId',
|
|
1595
|
+
kind: 'Scalar'
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
name: 'id',
|
|
1599
|
+
kind: 'Scalar'
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
name: 'runtimeRequest',
|
|
1603
|
+
kind: 'Object',
|
|
1604
|
+
// any
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
name: 'url',
|
|
1608
|
+
kind: 'Scalar'
|
|
1609
|
+
}
|
|
1610
|
+
]
|
|
1611
|
+
};
|
|
1612
|
+
};
|
|
1613
|
+
function equals$7(existing, incoming) {
|
|
1614
|
+
const existing_activityType = existing.activityType;
|
|
1615
|
+
const incoming_activityType = incoming.activityType;
|
|
1616
|
+
if (!(existing_activityType === incoming_activityType)) {
|
|
1617
|
+
return false;
|
|
1618
|
+
}
|
|
1619
|
+
const existing_appId = existing.appId;
|
|
1620
|
+
const incoming_appId = incoming.appId;
|
|
1621
|
+
if (!(existing_appId === incoming_appId)) {
|
|
1622
|
+
return false;
|
|
1623
|
+
}
|
|
1624
|
+
const existing_id = existing.id;
|
|
1625
|
+
const incoming_id = incoming.id;
|
|
1626
|
+
if (!(existing_id === incoming_id)) {
|
|
1627
|
+
return false;
|
|
1628
|
+
}
|
|
1629
|
+
const existing_url = existing.url;
|
|
1630
|
+
const incoming_url = incoming.url;
|
|
1631
|
+
if (!(existing_url === incoming_url)) {
|
|
1632
|
+
return false;
|
|
1633
|
+
}
|
|
1634
|
+
const existing_runtimeRequest = existing.runtimeRequest;
|
|
1635
|
+
const incoming_runtimeRequest = incoming.runtimeRequest;
|
|
1636
|
+
const equals_runtimeRequest_props = equalsObject(existing_runtimeRequest, incoming_runtimeRequest, (existing_runtimeRequest_prop, incoming_runtimeRequest_prop) => {
|
|
1637
|
+
if (JSONStringify(incoming_runtimeRequest_prop) !== JSONStringify(existing_runtimeRequest_prop)) {
|
|
1638
|
+
return false;
|
|
1639
|
+
}
|
|
1640
|
+
});
|
|
1641
|
+
if (equals_runtimeRequest_props === false) {
|
|
1642
|
+
return false;
|
|
1643
|
+
}
|
|
1644
|
+
return true;
|
|
1645
|
+
}
|
|
1646
|
+
const ingest$7 = function AppActivityItemRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1647
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1648
|
+
const validateError = validate$7(input);
|
|
1649
|
+
if (validateError !== null) {
|
|
1650
|
+
throw validateError;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
1654
|
+
const ttlToUse = TTL$7;
|
|
1655
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "AppFramework", VERSION$7, RepresentationType$7, equals$7);
|
|
1656
|
+
return createLink(key);
|
|
1657
|
+
};
|
|
1658
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1659
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1660
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
1661
|
+
rootKeySet.set(rootKey, {
|
|
1662
|
+
namespace: keyPrefix,
|
|
1663
|
+
representationName: RepresentationType$7,
|
|
1664
|
+
mergeable: false
|
|
1665
|
+
});
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
const TTL$6 = 5000;
|
|
1669
|
+
const VERSION$6 = "e0f049ec23678e696fb7c592c9641c65";
|
|
1670
|
+
function validate$6(obj, path = 'AppActivityCollectionRepresentation') {
|
|
1671
|
+
const v_error = (() => {
|
|
1672
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1673
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1674
|
+
}
|
|
1675
|
+
const obj_appId = obj.appId;
|
|
1676
|
+
const path_appId = path + '.appId';
|
|
1677
|
+
if (typeof obj_appId !== 'string') {
|
|
1678
|
+
return new TypeError('Expected "string" but received "' + typeof obj_appId + '" (at "' + path_appId + '")');
|
|
1679
|
+
}
|
|
1680
|
+
const obj_items = obj.items;
|
|
1681
|
+
const path_items = path + '.items';
|
|
1682
|
+
if (!ArrayIsArray(obj_items)) {
|
|
1683
|
+
return new TypeError('Expected "array" but received "' + typeof obj_items + '" (at "' + path_items + '")');
|
|
1684
|
+
}
|
|
1685
|
+
for (let i = 0; i < obj_items.length; i++) {
|
|
1686
|
+
const obj_items_item = obj_items[i];
|
|
1687
|
+
const path_items_item = path_items + '[' + i + ']';
|
|
1688
|
+
if (typeof obj_items_item !== 'object') {
|
|
1689
|
+
return new TypeError('Expected "object" but received "' + typeof obj_items_item + '" (at "' + path_items_item + '")');
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
})();
|
|
1693
|
+
return v_error === undefined ? null : v_error;
|
|
1694
|
+
}
|
|
1695
|
+
const RepresentationType$6 = 'AppActivityCollectionRepresentation';
|
|
1696
|
+
function keyBuilder$i(luvio, config) {
|
|
1697
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.appId;
|
|
1698
|
+
}
|
|
1699
|
+
function keyBuilderFromType$4(luvio, object) {
|
|
1700
|
+
const keyParams = {
|
|
1701
|
+
appId: object.appId
|
|
1702
|
+
};
|
|
1703
|
+
return keyBuilder$i(luvio, keyParams);
|
|
1704
|
+
}
|
|
1705
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
1706
|
+
const input_items = input.items;
|
|
1707
|
+
const input_items_id = path.fullPath + '__items';
|
|
1708
|
+
for (let i = 0; i < input_items.length; i++) {
|
|
1709
|
+
const input_items_item = input_items[i];
|
|
1710
|
+
let input_items_item_id = input_items_id + '__' + i;
|
|
1711
|
+
input_items[i] = ingest$7(input_items_item, {
|
|
1712
|
+
fullPath: input_items_item_id,
|
|
1713
|
+
propertyName: i,
|
|
1714
|
+
parent: {
|
|
1715
|
+
data: input,
|
|
1716
|
+
key: path.fullPath,
|
|
1717
|
+
existing: existing,
|
|
1718
|
+
},
|
|
1719
|
+
ttl: path.ttl
|
|
1720
|
+
}, luvio, store, timestamp);
|
|
1721
|
+
}
|
|
1722
|
+
return input;
|
|
1723
|
+
}
|
|
1724
|
+
const select$d = function AppActivityCollectionRepresentationSelect() {
|
|
1001
1725
|
return {
|
|
1002
1726
|
kind: 'Fragment',
|
|
1003
1727
|
version: VERSION$6,
|
|
1004
1728
|
private: [],
|
|
1005
1729
|
selections: [
|
|
1006
1730
|
{
|
|
1007
|
-
name: '
|
|
1008
|
-
kind: 'Link',
|
|
1009
|
-
fragment: select$e()
|
|
1010
|
-
},
|
|
1011
|
-
{
|
|
1012
|
-
name: 'runtimeRequestId',
|
|
1731
|
+
name: 'appId',
|
|
1013
1732
|
kind: 'Scalar'
|
|
1014
1733
|
},
|
|
1015
1734
|
{
|
|
1016
|
-
name: '
|
|
1017
|
-
kind: '
|
|
1018
|
-
|
|
1735
|
+
name: 'items',
|
|
1736
|
+
kind: 'Link',
|
|
1737
|
+
plural: true,
|
|
1738
|
+
fragment: select$e()
|
|
1019
1739
|
}
|
|
1020
1740
|
]
|
|
1021
1741
|
};
|
|
1022
1742
|
};
|
|
1023
1743
|
function equals$6(existing, incoming) {
|
|
1024
|
-
const
|
|
1025
|
-
const
|
|
1026
|
-
if (!(
|
|
1027
|
-
return false;
|
|
1028
|
-
}
|
|
1029
|
-
const existing_app = existing.app;
|
|
1030
|
-
const incoming_app = incoming.app;
|
|
1031
|
-
if (!(existing_app.__ref === incoming_app.__ref)) {
|
|
1744
|
+
const existing_appId = existing.appId;
|
|
1745
|
+
const incoming_appId = incoming.appId;
|
|
1746
|
+
if (!(existing_appId === incoming_appId)) {
|
|
1032
1747
|
return false;
|
|
1033
1748
|
}
|
|
1034
|
-
const
|
|
1035
|
-
const
|
|
1036
|
-
const
|
|
1037
|
-
if (
|
|
1749
|
+
const existing_items = existing.items;
|
|
1750
|
+
const incoming_items = incoming.items;
|
|
1751
|
+
const equals_items_items = equalsArray(existing_items, incoming_items, (existing_items_item, incoming_items_item) => {
|
|
1752
|
+
if (!(existing_items_item.__ref === incoming_items_item.__ref)) {
|
|
1038
1753
|
return false;
|
|
1039
1754
|
}
|
|
1040
1755
|
});
|
|
1041
|
-
if (
|
|
1756
|
+
if (equals_items_items === false) {
|
|
1042
1757
|
return false;
|
|
1043
1758
|
}
|
|
1044
1759
|
return true;
|
|
1045
1760
|
}
|
|
1046
|
-
const ingest$6 = function
|
|
1761
|
+
const ingest$6 = function AppActivityCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1047
1762
|
if (process.env.NODE_ENV !== 'production') {
|
|
1048
1763
|
const validateError = validate$6(input);
|
|
1049
1764
|
if (validateError !== null) {
|
|
@@ -1063,24 +1778,32 @@ function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1063
1778
|
representationName: RepresentationType$6,
|
|
1064
1779
|
mergeable: false
|
|
1065
1780
|
});
|
|
1066
|
-
|
|
1781
|
+
const input_items_length = input.items.length;
|
|
1782
|
+
for (let i = 0; i < input_items_length; i++) {
|
|
1783
|
+
getTypeCacheKeys$7(rootKeySet, luvio, input.items[i]);
|
|
1784
|
+
}
|
|
1067
1785
|
}
|
|
1068
1786
|
|
|
1069
1787
|
function select$c(luvio, params) {
|
|
1070
1788
|
return select$d();
|
|
1071
1789
|
}
|
|
1072
|
-
function
|
|
1790
|
+
function keyBuilder$h(luvio, params) {
|
|
1791
|
+
return keyBuilder$i(luvio, {
|
|
1792
|
+
appId: params.urlParams.appIdOrApiName
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
1073
1796
|
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
1074
1797
|
}
|
|
1075
|
-
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
1798
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
1076
1799
|
const { body } = response;
|
|
1077
|
-
const key =
|
|
1800
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
1078
1801
|
luvio.storeIngest(key, ingest$6, body);
|
|
1079
1802
|
const snapshot = luvio.storeLookup({
|
|
1080
1803
|
recordId: key,
|
|
1081
1804
|
node: select$c(),
|
|
1082
1805
|
variables: {},
|
|
1083
|
-
});
|
|
1806
|
+
}, snapshotRefresh);
|
|
1084
1807
|
if (process.env.NODE_ENV !== 'production') {
|
|
1085
1808
|
if (snapshot.state !== 'Fulfilled') {
|
|
1086
1809
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -1089,117 +1812,24 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
1089
1812
|
deepFreeze(snapshot.data);
|
|
1090
1813
|
return snapshot;
|
|
1091
1814
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
method: 'post',
|
|
1098
|
-
body: config.body,
|
|
1099
|
-
urlParams: {},
|
|
1100
|
-
queryParams: {},
|
|
1101
|
-
headers,
|
|
1102
|
-
priority: 'normal',
|
|
1103
|
-
};
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
const adapterName$7 = 'createApp';
|
|
1107
|
-
const createApp_ConfigPropertyMetadata = [
|
|
1108
|
-
generateParamConfigMetadata('assetIcon', false, 2 /* Body */, 0 /* String */),
|
|
1109
|
-
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1110
|
-
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1111
|
-
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
1112
|
-
generateParamConfigMetadata('templateSourceId', true, 2 /* Body */, 0 /* String */),
|
|
1113
|
-
generateParamConfigMetadata('templateValues', false, 2 /* Body */, 4 /* Unsupported */),
|
|
1114
|
-
generateParamConfigMetadata('templateVersion', false, 2 /* Body */, 0 /* String */),
|
|
1115
|
-
];
|
|
1116
|
-
const createApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, createApp_ConfigPropertyMetadata);
|
|
1117
|
-
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$8(createApp_ConfigPropertyMetadata);
|
|
1118
|
-
function typeCheckConfig$7(untrustedConfig) {
|
|
1119
|
-
const config = {};
|
|
1120
|
-
typeCheckConfig$8(untrustedConfig, config, createApp_ConfigPropertyMetadata);
|
|
1121
|
-
const untrustedConfig_templateValues = untrustedConfig.templateValues;
|
|
1122
|
-
if (untrustedIsObject(untrustedConfig_templateValues)) {
|
|
1123
|
-
const untrustedConfig_templateValues_object = {};
|
|
1124
|
-
const untrustedConfig_templateValues_keys = Object.keys(untrustedConfig_templateValues);
|
|
1125
|
-
for (let i = 0, arrayLength = untrustedConfig_templateValues_keys.length; i < arrayLength; i++) {
|
|
1126
|
-
const key = untrustedConfig_templateValues_keys[i];
|
|
1127
|
-
const untrustedConfig_templateValues_prop = untrustedConfig_templateValues[key];
|
|
1128
|
-
if (untrustedConfig_templateValues_object !== undefined) {
|
|
1129
|
-
untrustedConfig_templateValues_object[key] = untrustedConfig_templateValues_prop;
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
|
-
if (untrustedConfig_templateValues_object !== undefined && Object.keys(untrustedConfig_templateValues_object).length >= 0) {
|
|
1133
|
-
config.templateValues = untrustedConfig_templateValues_object;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
return config;
|
|
1137
|
-
}
|
|
1138
|
-
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
1139
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
1140
|
-
return null;
|
|
1141
|
-
}
|
|
1142
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1143
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
1144
|
-
}
|
|
1145
|
-
const config = typeCheckConfig$7(untrustedConfig);
|
|
1146
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1147
|
-
return null;
|
|
1148
|
-
}
|
|
1149
|
-
return config;
|
|
1150
|
-
}
|
|
1151
|
-
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
1152
|
-
const resourceParams = createResourceParams$7(config);
|
|
1153
|
-
const request = createResourceRequest$7(resourceParams);
|
|
1154
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
1155
|
-
.then((response) => {
|
|
1156
|
-
return luvio.handleSuccessResponse(() => {
|
|
1157
|
-
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
1158
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
1159
|
-
}, () => {
|
|
1160
|
-
const cache = new StoreKeyMap();
|
|
1161
|
-
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
1162
|
-
return cache;
|
|
1163
|
-
});
|
|
1164
|
-
}, (response) => {
|
|
1165
|
-
deepFreeze(response);
|
|
1166
|
-
throw response;
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
const createAppAdapterFactory = (luvio) => {
|
|
1170
|
-
return function createApp(untrustedConfig) {
|
|
1171
|
-
const config = validateAdapterConfig$7(untrustedConfig, createApp_ConfigPropertyNames);
|
|
1172
|
-
// Invalid or incomplete config
|
|
1173
|
-
if (config === null) {
|
|
1174
|
-
throw new Error('Invalid config for "createApp"');
|
|
1175
|
-
}
|
|
1176
|
-
return buildNetworkSnapshot$7(luvio, config);
|
|
1177
|
-
};
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
function keyBuilder$g(luvio, params) {
|
|
1181
|
-
return keyBuilder$i(luvio, {
|
|
1182
|
-
id: params.urlParams.appIdOrApiName
|
|
1183
|
-
});
|
|
1184
|
-
}
|
|
1185
|
-
function getResponseCacheKeys$6(cacheKeyMap, luvio, resourceParams) {
|
|
1186
|
-
const key = keyBuilder$g(luvio, resourceParams);
|
|
1187
|
-
cacheKeyMap.set(key, {
|
|
1815
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1816
|
+
const key = keyBuilder$h(luvio, params);
|
|
1817
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1818
|
+
const storeMetadataParams = {
|
|
1819
|
+
ttl: TTL$6,
|
|
1188
1820
|
namespace: keyPrefix,
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
const key = keyBuilder$g(luvio, resourceParams);
|
|
1195
|
-
luvio.storeEvict(key);
|
|
1821
|
+
version: VERSION$6,
|
|
1822
|
+
representationName: RepresentationType$6
|
|
1823
|
+
};
|
|
1824
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1825
|
+
return errorSnapshot;
|
|
1196
1826
|
}
|
|
1197
1827
|
function createResourceRequest$6(config) {
|
|
1198
1828
|
const headers = {};
|
|
1199
1829
|
return {
|
|
1200
1830
|
baseUri: '/services/data/v62.0',
|
|
1201
|
-
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '',
|
|
1202
|
-
method: '
|
|
1831
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '/activities',
|
|
1832
|
+
method: 'get',
|
|
1203
1833
|
body: null,
|
|
1204
1834
|
urlParams: config.urlParams,
|
|
1205
1835
|
queryParams: {},
|
|
@@ -1207,16 +1837,27 @@ function createResourceRequest$6(config) {
|
|
|
1207
1837
|
priority: 'normal',
|
|
1208
1838
|
};
|
|
1209
1839
|
}
|
|
1840
|
+
function createResourceRequestFromRepresentation$4(representation) {
|
|
1841
|
+
const config = {
|
|
1842
|
+
urlParams: {},
|
|
1843
|
+
};
|
|
1844
|
+
config.urlParams.appIdOrApiName = representation.appId;
|
|
1845
|
+
return createResourceRequest$6(config);
|
|
1846
|
+
}
|
|
1210
1847
|
|
|
1211
|
-
const adapterName$6 = '
|
|
1212
|
-
const
|
|
1848
|
+
const adapterName$6 = 'getAppActivities';
|
|
1849
|
+
const getAppActivities_ConfigPropertyMetadata = [
|
|
1213
1850
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1214
1851
|
];
|
|
1215
|
-
const
|
|
1216
|
-
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$
|
|
1852
|
+
const getAppActivities_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getAppActivities_ConfigPropertyMetadata);
|
|
1853
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$a(getAppActivities_ConfigPropertyMetadata);
|
|
1854
|
+
function keyBuilder$g(luvio, config) {
|
|
1855
|
+
const resourceParams = createResourceParams$6(config);
|
|
1856
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
1857
|
+
}
|
|
1217
1858
|
function typeCheckConfig$6(untrustedConfig) {
|
|
1218
1859
|
const config = {};
|
|
1219
|
-
typeCheckConfig$
|
|
1860
|
+
typeCheckConfig$a(untrustedConfig, config, getAppActivities_ConfigPropertyMetadata);
|
|
1220
1861
|
return config;
|
|
1221
1862
|
}
|
|
1222
1863
|
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
@@ -1232,32 +1873,95 @@ function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
|
1232
1873
|
}
|
|
1233
1874
|
return config;
|
|
1234
1875
|
}
|
|
1876
|
+
function adapterFragment$6(luvio, config) {
|
|
1877
|
+
createResourceParams$6(config);
|
|
1878
|
+
return select$c();
|
|
1879
|
+
}
|
|
1880
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
1881
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
1882
|
+
config,
|
|
1883
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1884
|
+
});
|
|
1885
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1886
|
+
}
|
|
1887
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
1888
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
1889
|
+
config,
|
|
1890
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1891
|
+
});
|
|
1892
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1893
|
+
}
|
|
1235
1894
|
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
1236
1895
|
const resourceParams = createResourceParams$6(config);
|
|
1237
1896
|
const request = createResourceRequest$6(resourceParams);
|
|
1238
1897
|
return luvio.dispatchResourceRequest(request, options)
|
|
1239
|
-
.then(() => {
|
|
1240
|
-
return luvio.handleSuccessResponse(() => {
|
|
1241
|
-
evictSuccess(luvio, resourceParams);
|
|
1242
|
-
return luvio.storeBroadcast();
|
|
1243
|
-
}, () => {
|
|
1898
|
+
.then((response) => {
|
|
1899
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
1244
1900
|
const cache = new StoreKeyMap();
|
|
1245
|
-
getResponseCacheKeys$6(cache, luvio, resourceParams);
|
|
1901
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
1246
1902
|
return cache;
|
|
1247
1903
|
});
|
|
1248
1904
|
}, (response) => {
|
|
1249
|
-
|
|
1250
|
-
throw response;
|
|
1905
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
1251
1906
|
});
|
|
1252
1907
|
}
|
|
1253
|
-
|
|
1254
|
-
return
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1908
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1909
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
1910
|
+
}
|
|
1911
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1912
|
+
const { luvio, config } = context;
|
|
1913
|
+
const selector = {
|
|
1914
|
+
recordId: keyBuilder$g(luvio, config),
|
|
1915
|
+
node: adapterFragment$6(luvio, config),
|
|
1916
|
+
variables: {},
|
|
1917
|
+
};
|
|
1918
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1919
|
+
config,
|
|
1920
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1921
|
+
});
|
|
1922
|
+
return cacheSnapshot;
|
|
1923
|
+
}
|
|
1924
|
+
const getAppActivitiesAdapterFactory = (luvio) => function AppFramework__getAppActivities(untrustedConfig, requestContext) {
|
|
1925
|
+
const config = validateAdapterConfig$6(untrustedConfig, getAppActivities_ConfigPropertyNames);
|
|
1926
|
+
// Invalid or incomplete config
|
|
1927
|
+
if (config === null) {
|
|
1928
|
+
return null;
|
|
1929
|
+
}
|
|
1930
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1931
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
1932
|
+
};
|
|
1933
|
+
const notifyChangeFactory$4 = (luvio, options) => {
|
|
1934
|
+
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameNotifyChange(configs) {
|
|
1935
|
+
const keys = configs.map(c => keyBuilder$i(luvio, c));
|
|
1936
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1937
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1938
|
+
const { key, record: val } = entries[i];
|
|
1939
|
+
const refreshRequest = createResourceRequestFromRepresentation$4(val);
|
|
1940
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
1941
|
+
.then((response) => {
|
|
1942
|
+
return luvio.handleSuccessResponse(() => {
|
|
1943
|
+
const { body } = response;
|
|
1944
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
1945
|
+
return luvio.storeBroadcast();
|
|
1946
|
+
}, () => {
|
|
1947
|
+
const cache = new StoreKeyMap();
|
|
1948
|
+
getTypeCacheKeys$6(cache, luvio, response.body);
|
|
1949
|
+
return cache;
|
|
1950
|
+
});
|
|
1951
|
+
}, (error) => {
|
|
1952
|
+
return luvio.handleErrorResponse(() => {
|
|
1953
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
1954
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
1955
|
+
ttl: TTL$6,
|
|
1956
|
+
namespace: keyPrefix,
|
|
1957
|
+
version: VERSION$6,
|
|
1958
|
+
representationName: RepresentationType$6
|
|
1959
|
+
});
|
|
1960
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
1961
|
+
});
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
});
|
|
1261
1965
|
};
|
|
1262
1966
|
};
|
|
1263
1967
|
|
|
@@ -1265,8 +1969,9 @@ function select$b(luvio, params) {
|
|
|
1265
1969
|
return select$e();
|
|
1266
1970
|
}
|
|
1267
1971
|
function keyBuilder$f(luvio, params) {
|
|
1268
|
-
return keyBuilder$
|
|
1269
|
-
|
|
1972
|
+
return keyBuilder$j(luvio, {
|
|
1973
|
+
appId: params.urlParams.appIdOrApiName,
|
|
1974
|
+
id: params.urlParams.id
|
|
1270
1975
|
});
|
|
1271
1976
|
}
|
|
1272
1977
|
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -1305,7 +2010,7 @@ function createResourceRequest$5(config) {
|
|
|
1305
2010
|
const headers = {};
|
|
1306
2011
|
return {
|
|
1307
2012
|
baseUri: '/services/data/v62.0',
|
|
1308
|
-
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '',
|
|
2013
|
+
basePath: '/app-framework/apps/' + config.urlParams.appIdOrApiName + '/activities/' + config.urlParams.id + '',
|
|
1309
2014
|
method: 'get',
|
|
1310
2015
|
body: null,
|
|
1311
2016
|
urlParams: config.urlParams,
|
|
@@ -1318,23 +2023,25 @@ function createResourceRequestFromRepresentation$3(representation) {
|
|
|
1318
2023
|
const config = {
|
|
1319
2024
|
urlParams: {},
|
|
1320
2025
|
};
|
|
1321
|
-
config.urlParams.appIdOrApiName = representation.
|
|
2026
|
+
config.urlParams.appIdOrApiName = representation.appId;
|
|
2027
|
+
config.urlParams.id = representation.id;
|
|
1322
2028
|
return createResourceRequest$5(config);
|
|
1323
2029
|
}
|
|
1324
2030
|
|
|
1325
|
-
const adapterName$5 = '
|
|
1326
|
-
const
|
|
2031
|
+
const adapterName$5 = 'getAppActivity';
|
|
2032
|
+
const getAppActivity_ConfigPropertyMetadata = [
|
|
1327
2033
|
generateParamConfigMetadata('appIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2034
|
+
generateParamConfigMetadata('id', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1328
2035
|
];
|
|
1329
|
-
const
|
|
1330
|
-
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$
|
|
2036
|
+
const getAppActivity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getAppActivity_ConfigPropertyMetadata);
|
|
2037
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$a(getAppActivity_ConfigPropertyMetadata);
|
|
1331
2038
|
function keyBuilder$e(luvio, config) {
|
|
1332
2039
|
const resourceParams = createResourceParams$5(config);
|
|
1333
2040
|
return keyBuilder$f(luvio, resourceParams);
|
|
1334
2041
|
}
|
|
1335
2042
|
function typeCheckConfig$5(untrustedConfig) {
|
|
1336
2043
|
const config = {};
|
|
1337
|
-
typeCheckConfig$
|
|
2044
|
+
typeCheckConfig$a(untrustedConfig, config, getAppActivity_ConfigPropertyMetadata);
|
|
1338
2045
|
return config;
|
|
1339
2046
|
}
|
|
1340
2047
|
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
@@ -1383,7 +2090,7 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
1383
2090
|
});
|
|
1384
2091
|
}
|
|
1385
2092
|
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
1386
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2093
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
1387
2094
|
}
|
|
1388
2095
|
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
1389
2096
|
const { luvio, config } = context;
|
|
@@ -1398,8 +2105,8 @@ function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
|
1398
2105
|
});
|
|
1399
2106
|
return cacheSnapshot;
|
|
1400
2107
|
}
|
|
1401
|
-
const
|
|
1402
|
-
const config = validateAdapterConfig$5(untrustedConfig,
|
|
2108
|
+
const getAppActivityAdapterFactory = (luvio) => function AppFramework__getAppActivity(untrustedConfig, requestContext) {
|
|
2109
|
+
const config = validateAdapterConfig$5(untrustedConfig, getAppActivity_ConfigPropertyNames);
|
|
1403
2110
|
// Invalid or incomplete config
|
|
1404
2111
|
if (config === null) {
|
|
1405
2112
|
return null;
|
|
@@ -1408,8 +2115,8 @@ const getAppAdapterFactory = (luvio) => function AppFramework__getApp(untrustedC
|
|
|
1408
2115
|
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
1409
2116
|
};
|
|
1410
2117
|
const notifyChangeFactory$3 = (luvio, options) => {
|
|
1411
|
-
return function
|
|
1412
|
-
const keys = configs.map(c => keyBuilder$
|
|
2118
|
+
return function getAppFrameworkAppsActivitiesByAppIdOrApiNameAndIdNotifyChange(configs) {
|
|
2119
|
+
const keys = configs.map(c => keyBuilder$j(luvio, c));
|
|
1413
2120
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
1414
2121
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
1415
2122
|
const { key, record: val } = entries[i];
|
|
@@ -1443,12 +2150,17 @@ const notifyChangeFactory$3 = (luvio, options) => {
|
|
|
1443
2150
|
};
|
|
1444
2151
|
|
|
1445
2152
|
const TTL$5 = 5000;
|
|
1446
|
-
const VERSION$5 = "
|
|
2153
|
+
const VERSION$5 = "34bc50b3e68f546eb8e99af16e45d84b";
|
|
1447
2154
|
function validate$5(obj, path = 'AssetRepresentation') {
|
|
1448
2155
|
const v_error = (() => {
|
|
1449
2156
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1450
2157
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1451
2158
|
}
|
|
2159
|
+
const obj_appId = obj.appId;
|
|
2160
|
+
const path_appId = path + '.appId';
|
|
2161
|
+
if (typeof obj_appId !== 'string') {
|
|
2162
|
+
return new TypeError('Expected "string" but received "' + typeof obj_appId + '" (at "' + path_appId + '")');
|
|
2163
|
+
}
|
|
1452
2164
|
const obj_assetIdOrName = obj.assetIdOrName;
|
|
1453
2165
|
const path_assetIdOrName = path + '.assetIdOrName';
|
|
1454
2166
|
if (typeof obj_assetIdOrName !== 'string') {
|
|
@@ -1585,6 +2297,10 @@ const select$a = function AssetRepresentationSelect() {
|
|
|
1585
2297
|
version: VERSION$5,
|
|
1586
2298
|
private: [],
|
|
1587
2299
|
selections: [
|
|
2300
|
+
{
|
|
2301
|
+
name: 'appId',
|
|
2302
|
+
kind: 'Scalar'
|
|
2303
|
+
},
|
|
1588
2304
|
{
|
|
1589
2305
|
name: 'assetIdOrName',
|
|
1590
2306
|
kind: 'Scalar'
|
|
@@ -1613,6 +2329,11 @@ const select$a = function AssetRepresentationSelect() {
|
|
|
1613
2329
|
};
|
|
1614
2330
|
};
|
|
1615
2331
|
function equals$5(existing, incoming) {
|
|
2332
|
+
const existing_appId = existing.appId;
|
|
2333
|
+
const incoming_appId = incoming.appId;
|
|
2334
|
+
if (!(existing_appId === incoming_appId)) {
|
|
2335
|
+
return false;
|
|
2336
|
+
}
|
|
1616
2337
|
const existing_assetIdOrName = existing.assetIdOrName;
|
|
1617
2338
|
const incoming_assetIdOrName = incoming.assetIdOrName;
|
|
1618
2339
|
if (!(existing_assetIdOrName === incoming_assetIdOrName)) {
|
|
@@ -1668,7 +2389,7 @@ function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1668
2389
|
}
|
|
1669
2390
|
|
|
1670
2391
|
const TTL$4 = 5000;
|
|
1671
|
-
const VERSION$4 = "
|
|
2392
|
+
const VERSION$4 = "1a10175fcc2ad43823e47bfbbdf917f6";
|
|
1672
2393
|
function validate$4(obj, path = 'AssetCollectionRepresentation') {
|
|
1673
2394
|
const v_error = (() => {
|
|
1674
2395
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -1696,11 +2417,11 @@ function validate$4(obj, path = 'AssetCollectionRepresentation') {
|
|
|
1696
2417
|
}
|
|
1697
2418
|
const RepresentationType$4 = 'AssetCollectionRepresentation';
|
|
1698
2419
|
function keyBuilder$c(luvio, config) {
|
|
1699
|
-
return keyPrefix + '::' + RepresentationType$4 + ':' + config.
|
|
2420
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.appId;
|
|
1700
2421
|
}
|
|
1701
2422
|
function keyBuilderFromType$2(luvio, object) {
|
|
1702
2423
|
const keyParams = {
|
|
1703
|
-
|
|
2424
|
+
appId: object.appId
|
|
1704
2425
|
};
|
|
1705
2426
|
return keyBuilder$c(luvio, keyParams);
|
|
1706
2427
|
}
|
|
@@ -1791,7 +2512,7 @@ function select$8(luvio, params) {
|
|
|
1791
2512
|
}
|
|
1792
2513
|
function keyBuilder$b(luvio, params) {
|
|
1793
2514
|
return keyBuilder$c(luvio, {
|
|
1794
|
-
|
|
2515
|
+
appId: params.urlParams.appIdOrApiName
|
|
1795
2516
|
});
|
|
1796
2517
|
}
|
|
1797
2518
|
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -1855,14 +2576,14 @@ const getAppAssets_ConfigPropertyMetadata = [
|
|
|
1855
2576
|
generateParamConfigMetadata('templateAssetName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1856
2577
|
];
|
|
1857
2578
|
const getAppAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getAppAssets_ConfigPropertyMetadata);
|
|
1858
|
-
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$
|
|
2579
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$a(getAppAssets_ConfigPropertyMetadata);
|
|
1859
2580
|
function keyBuilder$a(luvio, config) {
|
|
1860
2581
|
const resourceParams = createResourceParams$4(config);
|
|
1861
2582
|
return keyBuilder$b(luvio, resourceParams);
|
|
1862
2583
|
}
|
|
1863
2584
|
function typeCheckConfig$4(untrustedConfig) {
|
|
1864
2585
|
const config = {};
|
|
1865
|
-
typeCheckConfig$
|
|
2586
|
+
typeCheckConfig$a(untrustedConfig, config, getAppAssets_ConfigPropertyMetadata);
|
|
1866
2587
|
return config;
|
|
1867
2588
|
}
|
|
1868
2589
|
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
@@ -1911,7 +2632,7 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
1911
2632
|
});
|
|
1912
2633
|
}
|
|
1913
2634
|
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
1914
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2635
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
1915
2636
|
}
|
|
1916
2637
|
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
1917
2638
|
const { luvio, config } = context;
|
|
@@ -1999,7 +2720,7 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
1999
2720
|
for (let i = 0; i < input_apps.length; i++) {
|
|
2000
2721
|
const input_apps_item = input_apps[i];
|
|
2001
2722
|
let input_apps_item_id = input_apps_id + '__' + i;
|
|
2002
|
-
input_apps[i] = ingest$
|
|
2723
|
+
input_apps[i] = ingest$9(input_apps_item, {
|
|
2003
2724
|
fullPath: input_apps_item_id,
|
|
2004
2725
|
propertyName: i,
|
|
2005
2726
|
parent: {
|
|
@@ -2022,7 +2743,7 @@ const select$7 = function AppCollectionRepresentationSelect() {
|
|
|
2022
2743
|
name: 'apps',
|
|
2023
2744
|
kind: 'Link',
|
|
2024
2745
|
plural: true,
|
|
2025
|
-
fragment: select$
|
|
2746
|
+
fragment: select$i()
|
|
2026
2747
|
}
|
|
2027
2748
|
]
|
|
2028
2749
|
};
|
|
@@ -2062,7 +2783,7 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2062
2783
|
});
|
|
2063
2784
|
const input_apps_length = input.apps.length;
|
|
2064
2785
|
for (let i = 0; i < input_apps_length; i++) {
|
|
2065
|
-
getTypeCacheKeys$
|
|
2786
|
+
getTypeCacheKeys$9(rootKeySet, luvio, input.apps[i]);
|
|
2066
2787
|
}
|
|
2067
2788
|
}
|
|
2068
2789
|
|
|
@@ -2070,7 +2791,7 @@ function select$6(luvio, params) {
|
|
|
2070
2791
|
return select$7();
|
|
2071
2792
|
}
|
|
2072
2793
|
function keyBuilder$9(luvio, params) {
|
|
2073
|
-
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ')';
|
|
2794
|
+
return keyPrefix + '::AppCollectionRepresentation:(' + 'templateSourceId:' + params.queryParams.templateSourceId + ',' + 'type:' + params.queryParams.type + ')';
|
|
2074
2795
|
}
|
|
2075
2796
|
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
2076
2797
|
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
@@ -2121,16 +2842,17 @@ function createResourceRequest$3(config) {
|
|
|
2121
2842
|
const adapterName$3 = 'getApps';
|
|
2122
2843
|
const getApps_ConfigPropertyMetadata = [
|
|
2123
2844
|
generateParamConfigMetadata('templateSourceId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2845
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
2124
2846
|
];
|
|
2125
2847
|
const getApps_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getApps_ConfigPropertyMetadata);
|
|
2126
|
-
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$
|
|
2848
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$a(getApps_ConfigPropertyMetadata);
|
|
2127
2849
|
function keyBuilder$8(luvio, config) {
|
|
2128
2850
|
const resourceParams = createResourceParams$3(config);
|
|
2129
2851
|
return keyBuilder$9(luvio, resourceParams);
|
|
2130
2852
|
}
|
|
2131
2853
|
function typeCheckConfig$3(untrustedConfig) {
|
|
2132
2854
|
const config = {};
|
|
2133
|
-
typeCheckConfig$
|
|
2855
|
+
typeCheckConfig$a(untrustedConfig, config, getApps_ConfigPropertyMetadata);
|
|
2134
2856
|
return config;
|
|
2135
2857
|
}
|
|
2136
2858
|
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
@@ -2179,7 +2901,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
2179
2901
|
});
|
|
2180
2902
|
}
|
|
2181
2903
|
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
2182
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2904
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
2183
2905
|
}
|
|
2184
2906
|
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
2185
2907
|
const { luvio, config } = context;
|
|
@@ -2205,7 +2927,7 @@ const getAppsAdapterFactory = (luvio) => function AppFramework__getApps(untruste
|
|
|
2205
2927
|
};
|
|
2206
2928
|
|
|
2207
2929
|
const TTL$2 = 5000;
|
|
2208
|
-
const VERSION$2 = "
|
|
2930
|
+
const VERSION$2 = "a234a33bacb2228183eba50f4f96aef4";
|
|
2209
2931
|
function validate$2(obj, path = 'TemplateRepresentation') {
|
|
2210
2932
|
const v_error = (() => {
|
|
2211
2933
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -2257,10 +2979,10 @@ function validate$2(obj, path = 'TemplateRepresentation') {
|
|
|
2257
2979
|
if (typeof obj_name !== 'string') {
|
|
2258
2980
|
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2259
2981
|
}
|
|
2260
|
-
const
|
|
2261
|
-
const
|
|
2262
|
-
if (typeof
|
|
2263
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2982
|
+
const obj_templateType = obj.templateType;
|
|
2983
|
+
const path_templateType = path + '.templateType';
|
|
2984
|
+
if (typeof obj_templateType !== 'string') {
|
|
2985
|
+
return new TypeError('Expected "string" but received "' + typeof obj_templateType + '" (at "' + path_templateType + '")');
|
|
2264
2986
|
}
|
|
2265
2987
|
const obj_url = obj.url;
|
|
2266
2988
|
const path_url = path + '.url';
|
|
@@ -2310,7 +3032,7 @@ const select$5 = function TemplateRepresentationSelect() {
|
|
|
2310
3032
|
kind: 'Scalar'
|
|
2311
3033
|
},
|
|
2312
3034
|
{
|
|
2313
|
-
name: '
|
|
3035
|
+
name: 'templateType',
|
|
2314
3036
|
kind: 'Scalar'
|
|
2315
3037
|
},
|
|
2316
3038
|
{
|
|
@@ -2341,9 +3063,9 @@ function equals$2(existing, incoming) {
|
|
|
2341
3063
|
if (!(existing_name === incoming_name)) {
|
|
2342
3064
|
return false;
|
|
2343
3065
|
}
|
|
2344
|
-
const
|
|
2345
|
-
const
|
|
2346
|
-
if (!(
|
|
3066
|
+
const existing_templateType = existing.templateType;
|
|
3067
|
+
const incoming_templateType = incoming.templateType;
|
|
3068
|
+
if (!(existing_templateType === incoming_templateType)) {
|
|
2347
3069
|
return false;
|
|
2348
3070
|
}
|
|
2349
3071
|
const existing_url = existing.url;
|
|
@@ -2446,14 +3168,14 @@ const getTemplate_ConfigPropertyMetadata = [
|
|
|
2446
3168
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2447
3169
|
];
|
|
2448
3170
|
const getTemplate_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getTemplate_ConfigPropertyMetadata);
|
|
2449
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
3171
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$a(getTemplate_ConfigPropertyMetadata);
|
|
2450
3172
|
function keyBuilder$5(luvio, config) {
|
|
2451
3173
|
const resourceParams = createResourceParams$2(config);
|
|
2452
3174
|
return keyBuilder$6(luvio, resourceParams);
|
|
2453
3175
|
}
|
|
2454
3176
|
function typeCheckConfig$2(untrustedConfig) {
|
|
2455
3177
|
const config = {};
|
|
2456
|
-
typeCheckConfig$
|
|
3178
|
+
typeCheckConfig$a(untrustedConfig, config, getTemplate_ConfigPropertyMetadata);
|
|
2457
3179
|
return config;
|
|
2458
3180
|
}
|
|
2459
3181
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -2502,7 +3224,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
2502
3224
|
});
|
|
2503
3225
|
}
|
|
2504
3226
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
2505
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3227
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
2506
3228
|
}
|
|
2507
3229
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
2508
3230
|
const { luvio, config } = context;
|
|
@@ -2712,14 +3434,14 @@ const getTemplateConfig_ConfigPropertyMetadata = [
|
|
|
2712
3434
|
generateParamConfigMetadata('templateIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2713
3435
|
];
|
|
2714
3436
|
const getTemplateConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getTemplateConfig_ConfigPropertyMetadata);
|
|
2715
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
3437
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$a(getTemplateConfig_ConfigPropertyMetadata);
|
|
2716
3438
|
function keyBuilder$2(luvio, config) {
|
|
2717
3439
|
const resourceParams = createResourceParams$1(config);
|
|
2718
3440
|
return keyBuilder$3(luvio, resourceParams);
|
|
2719
3441
|
}
|
|
2720
3442
|
function typeCheckConfig$1(untrustedConfig) {
|
|
2721
3443
|
const config = {};
|
|
2722
|
-
typeCheckConfig$
|
|
3444
|
+
typeCheckConfig$a(untrustedConfig, config, getTemplateConfig_ConfigPropertyMetadata);
|
|
2723
3445
|
return config;
|
|
2724
3446
|
}
|
|
2725
3447
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -2768,7 +3490,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
2768
3490
|
});
|
|
2769
3491
|
}
|
|
2770
3492
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
2771
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3493
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
2772
3494
|
}
|
|
2773
3495
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
2774
3496
|
const { luvio, config } = context;
|
|
@@ -2978,7 +3700,7 @@ function createResourceRequest(config) {
|
|
|
2978
3700
|
const adapterName = 'getTemplates';
|
|
2979
3701
|
const getTemplates_ConfigPropertyMetadata = [];
|
|
2980
3702
|
const getTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getTemplates_ConfigPropertyMetadata);
|
|
2981
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
3703
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$a(getTemplates_ConfigPropertyMetadata);
|
|
2982
3704
|
function keyBuilder(luvio, config) {
|
|
2983
3705
|
createResourceParams(config);
|
|
2984
3706
|
return keyBuilder$1();
|
|
@@ -3033,7 +3755,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
3033
3755
|
});
|
|
3034
3756
|
}
|
|
3035
3757
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3036
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3758
|
+
return buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
3037
3759
|
}
|
|
3038
3760
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3039
3761
|
const { luvio, config } = context;
|
|
@@ -3061,6 +3783,10 @@ const getTemplatesAdapterFactory = (luvio) => function AppFramework__getTemplate
|
|
|
3061
3783
|
let createApp;
|
|
3062
3784
|
let deleteApp;
|
|
3063
3785
|
let getApp;
|
|
3786
|
+
let getAppActivities;
|
|
3787
|
+
let getAppActivitiesNotifyChange;
|
|
3788
|
+
let getAppActivity;
|
|
3789
|
+
let getAppActivityNotifyChange;
|
|
3064
3790
|
let getAppAssets;
|
|
3065
3791
|
let getAppAssetsNotifyChange;
|
|
3066
3792
|
let getAppNotifyChange;
|
|
@@ -3072,12 +3798,16 @@ let getTemplateNotifyChange;
|
|
|
3072
3798
|
let getTemplates;
|
|
3073
3799
|
// Imperative GET Adapters
|
|
3074
3800
|
let getApp_imperative;
|
|
3801
|
+
let getAppActivities_imperative;
|
|
3802
|
+
let getAppActivity_imperative;
|
|
3075
3803
|
let getAppAssets_imperative;
|
|
3076
3804
|
let getApps_imperative;
|
|
3077
3805
|
let getTemplate_imperative;
|
|
3078
3806
|
let getTemplateConfig_imperative;
|
|
3079
3807
|
let getTemplates_imperative;
|
|
3080
3808
|
const getAppMetadata = { apiFamily: 'AppFramework', name: 'getApp', ttl: 5000 };
|
|
3809
|
+
const getAppActivitiesMetadata = { apiFamily: 'AppFramework', name: 'getAppActivities', ttl: 5000 };
|
|
3810
|
+
const getAppActivityMetadata = { apiFamily: 'AppFramework', name: 'getAppActivity', ttl: 5000 };
|
|
3081
3811
|
const getAppAssetsMetadata = { apiFamily: 'AppFramework', name: 'getAppAssets', ttl: 5000 };
|
|
3082
3812
|
const getAppsMetadata = { apiFamily: 'AppFramework', name: 'getApps', ttl: 5000 };
|
|
3083
3813
|
const getTemplateMetadata = { apiFamily: 'AppFramework', name: 'getTemplate', ttl: 5000 };
|
|
@@ -3091,6 +3821,8 @@ const getTemplatesMetadata = { apiFamily: 'AppFramework', name: 'getTemplates',
|
|
|
3091
3821
|
function bindExportsTo(luvio) {
|
|
3092
3822
|
// LDS Adapters
|
|
3093
3823
|
const getApp_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getApp', getAppAdapterFactory), getAppMetadata);
|
|
3824
|
+
const getAppActivities_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getAppActivities', getAppActivitiesAdapterFactory), getAppActivitiesMetadata);
|
|
3825
|
+
const getAppActivity_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getAppActivity', getAppActivityAdapterFactory), getAppActivityMetadata);
|
|
3094
3826
|
const getAppAssets_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getAppAssets', getAppAssetsAdapterFactory), getAppAssetsMetadata);
|
|
3095
3827
|
const getApps_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getApps', getAppsAdapterFactory), getAppsMetadata);
|
|
3096
3828
|
const getTemplate_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getTemplate', getTemplateAdapterFactory), getTemplateMetadata);
|
|
@@ -3102,11 +3834,15 @@ function bindExportsTo(luvio) {
|
|
|
3102
3834
|
}
|
|
3103
3835
|
return {
|
|
3104
3836
|
createApp: unwrapSnapshotData(createAppAdapterFactory),
|
|
3105
|
-
deleteApp: createLDSAdapter(luvio, adapterName$
|
|
3837
|
+
deleteApp: createLDSAdapter(luvio, adapterName$8, deleteAppAdapterFactory),
|
|
3106
3838
|
getApp: createWireAdapterConstructor(luvio, getApp_ldsAdapter, getAppMetadata),
|
|
3839
|
+
getAppActivities: createWireAdapterConstructor(luvio, getAppActivities_ldsAdapter, getAppActivitiesMetadata),
|
|
3840
|
+
getAppActivitiesNotifyChange: createLDSAdapter(luvio, 'getAppActivitiesNotifyChange', notifyChangeFactory$4),
|
|
3841
|
+
getAppActivity: createWireAdapterConstructor(luvio, getAppActivity_ldsAdapter, getAppActivityMetadata),
|
|
3842
|
+
getAppActivityNotifyChange: createLDSAdapter(luvio, 'getAppActivityNotifyChange', notifyChangeFactory$3),
|
|
3107
3843
|
getAppAssets: createWireAdapterConstructor(luvio, getAppAssets_ldsAdapter, getAppAssetsMetadata),
|
|
3108
3844
|
getAppAssetsNotifyChange: createLDSAdapter(luvio, 'getAppAssetsNotifyChange', notifyChangeFactory$2),
|
|
3109
|
-
getAppNotifyChange: createLDSAdapter(luvio, 'getAppNotifyChange', notifyChangeFactory$
|
|
3845
|
+
getAppNotifyChange: createLDSAdapter(luvio, 'getAppNotifyChange', notifyChangeFactory$5),
|
|
3110
3846
|
getApps: createWireAdapterConstructor(luvio, getApps_ldsAdapter, getAppsMetadata),
|
|
3111
3847
|
getTemplate: createWireAdapterConstructor(luvio, getTemplate_ldsAdapter, getTemplateMetadata),
|
|
3112
3848
|
getTemplateConfig: createWireAdapterConstructor(luvio, getTemplateConfig_ldsAdapter, getTemplateConfigMetadata),
|
|
@@ -3115,6 +3851,8 @@ function bindExportsTo(luvio) {
|
|
|
3115
3851
|
getTemplates: createWireAdapterConstructor(luvio, getTemplates_ldsAdapter, getTemplatesMetadata),
|
|
3116
3852
|
// Imperative GET Adapters
|
|
3117
3853
|
getApp_imperative: createImperativeAdapter(luvio, getApp_ldsAdapter, getAppMetadata),
|
|
3854
|
+
getAppActivities_imperative: createImperativeAdapter(luvio, getAppActivities_ldsAdapter, getAppActivitiesMetadata),
|
|
3855
|
+
getAppActivity_imperative: createImperativeAdapter(luvio, getAppActivity_ldsAdapter, getAppActivityMetadata),
|
|
3118
3856
|
getAppAssets_imperative: createImperativeAdapter(luvio, getAppAssets_ldsAdapter, getAppAssetsMetadata),
|
|
3119
3857
|
getApps_imperative: createImperativeAdapter(luvio, getApps_ldsAdapter, getAppsMetadata),
|
|
3120
3858
|
getTemplate_imperative: createImperativeAdapter(luvio, getTemplate_ldsAdapter, getTemplateMetadata),
|
|
@@ -3128,6 +3866,10 @@ withDefaultLuvio((luvio) => {
|
|
|
3128
3866
|
createApp,
|
|
3129
3867
|
deleteApp,
|
|
3130
3868
|
getApp,
|
|
3869
|
+
getAppActivities,
|
|
3870
|
+
getAppActivitiesNotifyChange,
|
|
3871
|
+
getAppActivity,
|
|
3872
|
+
getAppActivityNotifyChange,
|
|
3131
3873
|
getAppAssets,
|
|
3132
3874
|
getAppAssetsNotifyChange,
|
|
3133
3875
|
getAppNotifyChange,
|
|
@@ -3138,6 +3880,8 @@ withDefaultLuvio((luvio) => {
|
|
|
3138
3880
|
getTemplateNotifyChange,
|
|
3139
3881
|
getTemplates,
|
|
3140
3882
|
getApp_imperative,
|
|
3883
|
+
getAppActivities_imperative,
|
|
3884
|
+
getAppActivity_imperative,
|
|
3141
3885
|
getAppAssets_imperative,
|
|
3142
3886
|
getApps_imperative,
|
|
3143
3887
|
getTemplate_imperative,
|
|
@@ -3146,5 +3890,5 @@ withDefaultLuvio((luvio) => {
|
|
|
3146
3890
|
} = bindExportsTo(luvio));
|
|
3147
3891
|
});
|
|
3148
3892
|
|
|
3149
|
-
export { createApp, deleteApp, getApp, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getTemplate, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative };
|
|
3150
|
-
// version: 1.
|
|
3893
|
+
export { createApp, deleteApp, getApp, getAppActivities, getAppActivitiesNotifyChange, getAppActivities_imperative, getAppActivity, getAppActivityNotifyChange, getAppActivity_imperative, getAppAssets, getAppAssetsNotifyChange, getAppAssets_imperative, getAppNotifyChange, getApp_imperative, getApps, getApps_imperative, getTemplate, getTemplateConfig, getTemplateConfigNotifyChange, getTemplateConfig_imperative, getTemplateNotifyChange, getTemplate_imperative, getTemplates, getTemplates_imperative };
|
|
3894
|
+
// version: 1.309.0-dev11-e18434ec95
|