@salesforce/lds-adapters-platform-enablement 1.244.0 → 1.246.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/es2018/platform-enablement.js +684 -164
- package/dist/es/es2018/types/src/generated/adapters/getProgramSummaryCollection.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getProgramSummaryCollectionForCommunity.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/adapters/selfEnrollInEnablementProgram.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/unenrollFromEnablementProgram.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
- package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesEnablementProgramSummaryCollectionByCommunityId.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectEnablementProgramSummaryCollection.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectEnablementProgramActionsEnrollByEnablementProgramId.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectEnablementProgramActionsUnenrollByEnablementProgramId.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/types/EnablementProgramSelfEnrollmentRepresentation.d.ts +38 -0
- package/package.json +1 -1
- package/sfdc/index.js +726 -180
- package/src/raml/api.raml +120 -26
- package/src/raml/luvio.raml +21 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$5, typeCheckConfig as typeCheckConfig$7, StoreKeyMap, createResourceParams as createResourceParams$7 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -98,8 +98,8 @@ var DiscriminatorValues;
|
|
|
98
98
|
DiscriminatorValues["Section"] = "Section";
|
|
99
99
|
DiscriminatorValues["Milestone"] = "Milestone";
|
|
100
100
|
})(DiscriminatorValues || (DiscriminatorValues = {}));
|
|
101
|
-
const VERSION$
|
|
102
|
-
function validate$
|
|
101
|
+
const VERSION$4 = "a9470f37b0d95500b425222897fff882";
|
|
102
|
+
function validate$4(obj, path = 'EnablementProgramSummaryItemRepresentation') {
|
|
103
103
|
const v_error = (() => {
|
|
104
104
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
105
105
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -132,10 +132,10 @@ function validate$3(obj, path = 'EnablementProgramSummaryItemRepresentation') {
|
|
|
132
132
|
})();
|
|
133
133
|
return v_error === undefined ? null : v_error;
|
|
134
134
|
}
|
|
135
|
-
const select$
|
|
135
|
+
const select$b = function EnablementProgramSummaryItemRepresentationSelect() {
|
|
136
136
|
return {
|
|
137
137
|
kind: 'Fragment',
|
|
138
|
-
version: VERSION$
|
|
138
|
+
version: VERSION$4,
|
|
139
139
|
private: [],
|
|
140
140
|
selections: [
|
|
141
141
|
{
|
|
@@ -161,7 +161,7 @@ const select$6 = function EnablementProgramSummaryItemRepresentationSelect() {
|
|
|
161
161
|
]
|
|
162
162
|
};
|
|
163
163
|
};
|
|
164
|
-
function equals$
|
|
164
|
+
function equals$4(existing, incoming) {
|
|
165
165
|
const existing_sequenceNumber = existing.sequenceNumber;
|
|
166
166
|
const incoming_sequenceNumber = incoming.sequenceNumber;
|
|
167
167
|
if (!(existing_sequenceNumber === incoming_sequenceNumber)) {
|
|
@@ -190,9 +190,9 @@ function equals$3(existing, incoming) {
|
|
|
190
190
|
return true;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
const VERSION$
|
|
194
|
-
function validate$
|
|
195
|
-
const validateEnablementProgramSummaryItemRepresentation_validateError = validate$
|
|
193
|
+
const VERSION$3 = "089f71c87963595d39413fc588e5385b";
|
|
194
|
+
function validate$3(obj, path = 'EnablementProgramSummaryMilestoneRepresentation') {
|
|
195
|
+
const validateEnablementProgramSummaryItemRepresentation_validateError = validate$4(obj, path);
|
|
196
196
|
if (validateEnablementProgramSummaryItemRepresentation_validateError !== null) {
|
|
197
197
|
return validateEnablementProgramSummaryItemRepresentation_validateError;
|
|
198
198
|
}
|
|
@@ -494,11 +494,11 @@ function validate$2(obj, path = 'EnablementProgramSummaryMilestoneRepresentation
|
|
|
494
494
|
})();
|
|
495
495
|
return v_error === undefined ? null : v_error;
|
|
496
496
|
}
|
|
497
|
-
const select$
|
|
498
|
-
const { selections: EnablementProgramSummaryItemRepresentationSelections } = select$
|
|
497
|
+
const select$a = function EnablementProgramSummaryMilestoneRepresentationSelect() {
|
|
498
|
+
const { selections: EnablementProgramSummaryItemRepresentationSelections } = select$b();
|
|
499
499
|
return {
|
|
500
500
|
kind: 'Fragment',
|
|
501
|
-
version: VERSION$
|
|
501
|
+
version: VERSION$3,
|
|
502
502
|
private: [],
|
|
503
503
|
selections: [
|
|
504
504
|
...EnablementProgramSummaryItemRepresentationSelections,
|
|
@@ -553,8 +553,8 @@ const select$5 = function EnablementProgramSummaryMilestoneRepresentationSelect(
|
|
|
553
553
|
]
|
|
554
554
|
};
|
|
555
555
|
};
|
|
556
|
-
function equals$
|
|
557
|
-
if (equals$
|
|
556
|
+
function equals$3(existing, incoming) {
|
|
557
|
+
if (equals$4(existing, incoming) === false) {
|
|
558
558
|
return false;
|
|
559
559
|
}
|
|
560
560
|
const existing_programDay = existing.programDay;
|
|
@@ -620,9 +620,9 @@ function equals$2(existing, incoming) {
|
|
|
620
620
|
return true;
|
|
621
621
|
}
|
|
622
622
|
|
|
623
|
-
const TTL = 15000;
|
|
624
|
-
const VERSION$
|
|
625
|
-
function validate$
|
|
623
|
+
const TTL$1 = 15000;
|
|
624
|
+
const VERSION$2 = "8c024832561adc9be3b12d390c61abe5";
|
|
625
|
+
function validate$2(obj, path = 'EnablementProgramSummaryRepresentation') {
|
|
626
626
|
const v_error = (() => {
|
|
627
627
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
628
628
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -752,7 +752,7 @@ function validate$1(obj, path = 'EnablementProgramSummaryRepresentation') {
|
|
|
752
752
|
const path_outcome = path + '.outcome';
|
|
753
753
|
let obj_outcome_union0 = null;
|
|
754
754
|
const obj_outcome_union0_error = (() => {
|
|
755
|
-
const referencepath_outcomeValidationError = validate$
|
|
755
|
+
const referencepath_outcomeValidationError = validate$3(obj_outcome, path_outcome);
|
|
756
756
|
if (referencepath_outcomeValidationError !== null) {
|
|
757
757
|
let message = 'Object doesn\'t match EnablementProgramSummaryMilestoneRepresentation (at "' + path_outcome + '")\n';
|
|
758
758
|
message += referencepath_outcomeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -839,24 +839,24 @@ function validate$1(obj, path = 'EnablementProgramSummaryRepresentation') {
|
|
|
839
839
|
})();
|
|
840
840
|
return v_error === undefined ? null : v_error;
|
|
841
841
|
}
|
|
842
|
-
const RepresentationType$
|
|
843
|
-
function keyBuilder$
|
|
844
|
-
return keyPrefix + '::' + RepresentationType$
|
|
842
|
+
const RepresentationType$2 = 'EnablementProgramSummaryRepresentation';
|
|
843
|
+
function keyBuilder$b(luvio, config) {
|
|
844
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + (config.enablement_program_id === null ? '' : config.enablement_program_id);
|
|
845
845
|
}
|
|
846
|
-
function keyBuilderFromType(luvio, object) {
|
|
846
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
847
847
|
const keyParams = {
|
|
848
848
|
enablement_program_id: object.id
|
|
849
849
|
};
|
|
850
|
-
return keyBuilder$
|
|
850
|
+
return keyBuilder$b(luvio, keyParams);
|
|
851
851
|
}
|
|
852
|
-
function normalize$
|
|
852
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
853
853
|
return input;
|
|
854
854
|
}
|
|
855
|
-
const select$
|
|
856
|
-
const { selections: EnablementProgramSummaryMilestoneRepresentation__selections, opaque: EnablementProgramSummaryMilestoneRepresentation__opaque, } = select$
|
|
855
|
+
const select$9 = function EnablementProgramSummaryRepresentationSelect() {
|
|
856
|
+
const { selections: EnablementProgramSummaryMilestoneRepresentation__selections, opaque: EnablementProgramSummaryMilestoneRepresentation__opaque, } = select$a();
|
|
857
857
|
return {
|
|
858
858
|
kind: 'Fragment',
|
|
859
|
-
version: VERSION$
|
|
859
|
+
version: VERSION$2,
|
|
860
860
|
private: [],
|
|
861
861
|
selections: [
|
|
862
862
|
{
|
|
@@ -906,7 +906,7 @@ const select$4 = function EnablementProgramSummaryRepresentationSelect() {
|
|
|
906
906
|
]
|
|
907
907
|
};
|
|
908
908
|
};
|
|
909
|
-
function equals$
|
|
909
|
+
function equals$2(existing, incoming) {
|
|
910
910
|
const existing_doesAllowSelfEnrollment = existing.doesAllowSelfEnrollment;
|
|
911
911
|
const incoming_doesAllowSelfEnrollment = incoming.doesAllowSelfEnrollment;
|
|
912
912
|
if (!(existing_doesAllowSelfEnrollment === incoming_doesAllowSelfEnrollment)) {
|
|
@@ -952,7 +952,7 @@ function equals$1(existing, incoming) {
|
|
|
952
952
|
if (!(existing_outcome === incoming_outcome
|
|
953
953
|
|| (existing_outcome != null &&
|
|
954
954
|
incoming_outcome != null &&
|
|
955
|
-
equals$
|
|
955
|
+
equals$3(existing_outcome, incoming_outcome)))) {
|
|
956
956
|
return false;
|
|
957
957
|
}
|
|
958
958
|
const existing_systemModStamp = existing.systemModStamp;
|
|
@@ -975,30 +975,30 @@ function equals$1(existing, incoming) {
|
|
|
975
975
|
}
|
|
976
976
|
return true;
|
|
977
977
|
}
|
|
978
|
-
const ingest$
|
|
978
|
+
const ingest$2 = function EnablementProgramSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
979
979
|
if (process.env.NODE_ENV !== 'production') {
|
|
980
|
-
const validateError = validate$
|
|
980
|
+
const validateError = validate$2(input);
|
|
981
981
|
if (validateError !== null) {
|
|
982
982
|
throw validateError;
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
const key = keyBuilderFromType(luvio, input);
|
|
986
|
-
const ttlToUse = TTL;
|
|
987
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
985
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
986
|
+
const ttlToUse = TTL$1;
|
|
987
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "enablement", VERSION$2, RepresentationType$2, equals$2);
|
|
988
988
|
return createLink(key);
|
|
989
989
|
};
|
|
990
|
-
function getTypeCacheKeys$
|
|
990
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
991
991
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
992
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
992
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
993
993
|
rootKeySet.set(rootKey, {
|
|
994
994
|
namespace: keyPrefix,
|
|
995
|
-
representationName: RepresentationType$
|
|
995
|
+
representationName: RepresentationType$2,
|
|
996
996
|
mergeable: false
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
|
-
const VERSION = "7ef7adad59a82a6a2a4ab4ba77434b67";
|
|
1001
|
-
function validate(obj, path = 'EnablementProgramSummaryListRepresentation') {
|
|
1000
|
+
const VERSION$1 = "7ef7adad59a82a6a2a4ab4ba77434b67";
|
|
1001
|
+
function validate$1(obj, path = 'EnablementProgramSummaryListRepresentation') {
|
|
1002
1002
|
const v_error = (() => {
|
|
1003
1003
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1004
1004
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1023,14 +1023,14 @@ function validate(obj, path = 'EnablementProgramSummaryListRepresentation') {
|
|
|
1023
1023
|
})();
|
|
1024
1024
|
return v_error === undefined ? null : v_error;
|
|
1025
1025
|
}
|
|
1026
|
-
const RepresentationType = 'EnablementProgramSummaryListRepresentation';
|
|
1027
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1026
|
+
const RepresentationType$1 = 'EnablementProgramSummaryListRepresentation';
|
|
1027
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1028
1028
|
const input_programSummaryList = input.programSummaryList;
|
|
1029
1029
|
const input_programSummaryList_id = path.fullPath + '__programSummaryList';
|
|
1030
1030
|
for (let i = 0; i < input_programSummaryList.length; i++) {
|
|
1031
1031
|
const input_programSummaryList_item = input_programSummaryList[i];
|
|
1032
1032
|
let input_programSummaryList_item_id = input_programSummaryList_id + '__' + i;
|
|
1033
|
-
input_programSummaryList[i] = ingest$
|
|
1033
|
+
input_programSummaryList[i] = ingest$2(input_programSummaryList_item, {
|
|
1034
1034
|
fullPath: input_programSummaryList_item_id,
|
|
1035
1035
|
propertyName: i,
|
|
1036
1036
|
parent: {
|
|
@@ -1043,10 +1043,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
return input;
|
|
1045
1045
|
}
|
|
1046
|
-
const select$
|
|
1046
|
+
const select$8 = function EnablementProgramSummaryListRepresentationSelect() {
|
|
1047
1047
|
return {
|
|
1048
1048
|
kind: 'Fragment',
|
|
1049
|
-
version: VERSION,
|
|
1049
|
+
version: VERSION$1,
|
|
1050
1050
|
private: [],
|
|
1051
1051
|
selections: [
|
|
1052
1052
|
{
|
|
@@ -1057,12 +1057,12 @@ const select$3 = function EnablementProgramSummaryListRepresentationSelect() {
|
|
|
1057
1057
|
name: 'programSummaryList',
|
|
1058
1058
|
kind: 'Link',
|
|
1059
1059
|
plural: true,
|
|
1060
|
-
fragment: select$
|
|
1060
|
+
fragment: select$9()
|
|
1061
1061
|
}
|
|
1062
1062
|
]
|
|
1063
1063
|
};
|
|
1064
1064
|
};
|
|
1065
|
-
function equals(existing, incoming) {
|
|
1065
|
+
function equals$1(existing, incoming) {
|
|
1066
1066
|
const existing_hasMore = existing.hasMore;
|
|
1067
1067
|
const incoming_hasMore = incoming.hasMore;
|
|
1068
1068
|
if (!(existing_hasMore === incoming_hasMore)) {
|
|
@@ -1080,48 +1080,48 @@ function equals(existing, incoming) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
return true;
|
|
1082
1082
|
}
|
|
1083
|
-
const ingest = function EnablementProgramSummaryListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1083
|
+
const ingest$1 = function EnablementProgramSummaryListRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1084
1084
|
if (process.env.NODE_ENV !== 'production') {
|
|
1085
|
-
const validateError = validate(input);
|
|
1085
|
+
const validateError = validate$1(input);
|
|
1086
1086
|
if (validateError !== null) {
|
|
1087
1087
|
throw validateError;
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
const key = path.fullPath;
|
|
1091
1091
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 15000;
|
|
1092
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "enablement", VERSION, RepresentationType, equals);
|
|
1092
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "enablement", VERSION$1, RepresentationType$1, equals$1);
|
|
1093
1093
|
return createLink(key);
|
|
1094
1094
|
};
|
|
1095
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1095
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1096
1096
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1097
1097
|
const rootKey = fullPathFactory();
|
|
1098
1098
|
rootKeySet.set(rootKey, {
|
|
1099
1099
|
namespace: keyPrefix,
|
|
1100
|
-
representationName: RepresentationType,
|
|
1100
|
+
representationName: RepresentationType$1,
|
|
1101
1101
|
mergeable: false
|
|
1102
1102
|
});
|
|
1103
1103
|
const input_programSummaryList_length = input.programSummaryList.length;
|
|
1104
1104
|
for (let i = 0; i < input_programSummaryList_length; i++) {
|
|
1105
|
-
getTypeCacheKeys$
|
|
1105
|
+
getTypeCacheKeys$2(rootKeySet, luvio, input.programSummaryList[i]);
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
|
|
1109
|
-
function select$
|
|
1110
|
-
return select$
|
|
1109
|
+
function select$7(luvio, params) {
|
|
1110
|
+
return select$8();
|
|
1111
1111
|
}
|
|
1112
|
-
function keyBuilder$
|
|
1112
|
+
function keyBuilder$a(luvio, params) {
|
|
1113
1113
|
return keyPrefix + '::EnablementProgramSummaryListRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
1114
1114
|
}
|
|
1115
|
-
function getResponseCacheKeys$
|
|
1116
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1115
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
1116
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$a(luvio, resourceParams));
|
|
1117
1117
|
}
|
|
1118
|
-
function ingestSuccess$
|
|
1118
|
+
function ingestSuccess$6(luvio, resourceParams, response, snapshotRefresh) {
|
|
1119
1119
|
const { body } = response;
|
|
1120
|
-
const key = keyBuilder$
|
|
1121
|
-
luvio.storeIngest(key, ingest, body);
|
|
1120
|
+
const key = keyBuilder$a(luvio, resourceParams);
|
|
1121
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1122
1122
|
const snapshot = luvio.storeLookup({
|
|
1123
1123
|
recordId: key,
|
|
1124
|
-
node: select$
|
|
1124
|
+
node: select$7(),
|
|
1125
1125
|
variables: {},
|
|
1126
1126
|
}, snapshotRefresh);
|
|
1127
1127
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1132,13 +1132,13 @@ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1132
1132
|
deepFreeze(snapshot.data);
|
|
1133
1133
|
return snapshot;
|
|
1134
1134
|
}
|
|
1135
|
-
function ingestError$
|
|
1136
|
-
const key = keyBuilder$
|
|
1135
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
1136
|
+
const key = keyBuilder$a(luvio, params);
|
|
1137
1137
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1138
1138
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1139
1139
|
return errorSnapshot;
|
|
1140
1140
|
}
|
|
1141
|
-
function createResourceRequest$
|
|
1141
|
+
function createResourceRequest$6(config) {
|
|
1142
1142
|
const headers = {};
|
|
1143
1143
|
return {
|
|
1144
1144
|
baseUri: '/services/data/v60.0',
|
|
@@ -1152,63 +1152,332 @@ function createResourceRequest$2(config) {
|
|
|
1152
1152
|
};
|
|
1153
1153
|
}
|
|
1154
1154
|
|
|
1155
|
-
const adapterName$
|
|
1155
|
+
const adapterName$6 = 'getAssignedEnablementProgramSummaryForCommunity';
|
|
1156
1156
|
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata = [
|
|
1157
1157
|
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1158
1158
|
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1159
1159
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1160
1160
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1161
1161
|
];
|
|
1162
|
-
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1163
|
-
const createResourceParams$
|
|
1164
|
-
function keyBuilder$
|
|
1165
|
-
const resourceParams = createResourceParams$
|
|
1166
|
-
return keyBuilder$
|
|
1162
|
+
const getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata);
|
|
1163
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$7(getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata);
|
|
1164
|
+
function keyBuilder$9(luvio, config) {
|
|
1165
|
+
const resourceParams = createResourceParams$6(config);
|
|
1166
|
+
return keyBuilder$a(luvio, resourceParams);
|
|
1167
1167
|
}
|
|
1168
|
-
function typeCheckConfig$
|
|
1168
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
1169
1169
|
const config = {};
|
|
1170
|
-
typeCheckConfig$
|
|
1170
|
+
typeCheckConfig$7(untrustedConfig, config, getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyMetadata);
|
|
1171
1171
|
return config;
|
|
1172
1172
|
}
|
|
1173
|
-
function validateAdapterConfig$
|
|
1173
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
1174
1174
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1175
1175
|
return null;
|
|
1176
1176
|
}
|
|
1177
1177
|
if (process.env.NODE_ENV !== 'production') {
|
|
1178
1178
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1179
1179
|
}
|
|
1180
|
-
const config = typeCheckConfig$
|
|
1180
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
1181
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1182
|
+
return null;
|
|
1183
|
+
}
|
|
1184
|
+
return config;
|
|
1185
|
+
}
|
|
1186
|
+
function adapterFragment$4(luvio, config) {
|
|
1187
|
+
createResourceParams$6(config);
|
|
1188
|
+
return select$7();
|
|
1189
|
+
}
|
|
1190
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
1191
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response, {
|
|
1192
|
+
config,
|
|
1193
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1194
|
+
});
|
|
1195
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1196
|
+
}
|
|
1197
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
1198
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
1199
|
+
config,
|
|
1200
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1201
|
+
});
|
|
1202
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1203
|
+
}
|
|
1204
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
1205
|
+
const resourceParams = createResourceParams$6(config);
|
|
1206
|
+
const request = createResourceRequest$6(resourceParams);
|
|
1207
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1208
|
+
.then((response) => {
|
|
1209
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
1210
|
+
const cache = new StoreKeyMap();
|
|
1211
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
1212
|
+
return cache;
|
|
1213
|
+
});
|
|
1214
|
+
}, (response) => {
|
|
1215
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
1219
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$6, undefined, false);
|
|
1220
|
+
}
|
|
1221
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
1222
|
+
const { luvio, config } = context;
|
|
1223
|
+
const selector = {
|
|
1224
|
+
recordId: keyBuilder$9(luvio, config),
|
|
1225
|
+
node: adapterFragment$4(luvio, config),
|
|
1226
|
+
variables: {},
|
|
1227
|
+
};
|
|
1228
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1229
|
+
config,
|
|
1230
|
+
resolve: () => buildNetworkSnapshot$6(luvio, config, snapshotRefreshOptions)
|
|
1231
|
+
});
|
|
1232
|
+
return cacheSnapshot;
|
|
1233
|
+
}
|
|
1234
|
+
const getAssignedEnablementProgramSummaryForCommunityAdapterFactory = (luvio) => function enablement__getAssignedEnablementProgramSummaryForCommunity(untrustedConfig, requestContext) {
|
|
1235
|
+
const config = validateAdapterConfig$6(untrustedConfig, getAssignedEnablementProgramSummaryForCommunity_ConfigPropertyNames);
|
|
1236
|
+
// Invalid or incomplete config
|
|
1237
|
+
if (config === null) {
|
|
1238
|
+
return null;
|
|
1239
|
+
}
|
|
1240
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1241
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
1242
|
+
};
|
|
1243
|
+
|
|
1244
|
+
function select$6(luvio, params) {
|
|
1245
|
+
return select$8();
|
|
1246
|
+
}
|
|
1247
|
+
function keyBuilder$8(luvio, params) {
|
|
1248
|
+
return keyPrefix + '::EnablementProgramSummaryListRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'communityId:' + params.urlParams.communityId + ')';
|
|
1249
|
+
}
|
|
1250
|
+
function getResponseCacheKeys$5(storeKeyMap, luvio, resourceParams, response) {
|
|
1251
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$8(luvio, resourceParams));
|
|
1252
|
+
}
|
|
1253
|
+
function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
1254
|
+
const { body } = response;
|
|
1255
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
1256
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1257
|
+
const snapshot = luvio.storeLookup({
|
|
1258
|
+
recordId: key,
|
|
1259
|
+
node: select$6(),
|
|
1260
|
+
variables: {},
|
|
1261
|
+
}, snapshotRefresh);
|
|
1262
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1263
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1264
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
deepFreeze(snapshot.data);
|
|
1268
|
+
return snapshot;
|
|
1269
|
+
}
|
|
1270
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
1271
|
+
const key = keyBuilder$8(luvio, params);
|
|
1272
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1273
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1274
|
+
return errorSnapshot;
|
|
1275
|
+
}
|
|
1276
|
+
function createResourceRequest$5(config) {
|
|
1277
|
+
const headers = {};
|
|
1278
|
+
return {
|
|
1279
|
+
baseUri: '/services/data/v60.0',
|
|
1280
|
+
basePath: '/connect/communities/' + config.urlParams.communityId + '/enablement/program/summary/collection',
|
|
1281
|
+
method: 'get',
|
|
1282
|
+
body: null,
|
|
1283
|
+
urlParams: config.urlParams,
|
|
1284
|
+
queryParams: config.queryParams,
|
|
1285
|
+
headers,
|
|
1286
|
+
priority: 'normal',
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
const adapterName$5 = 'getProgramSummaryCollectionForCommunity';
|
|
1291
|
+
const getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata = [
|
|
1292
|
+
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1293
|
+
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1294
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1295
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1296
|
+
];
|
|
1297
|
+
const getProgramSummaryCollectionForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata);
|
|
1298
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$7(getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata);
|
|
1299
|
+
function keyBuilder$7(luvio, config) {
|
|
1300
|
+
const resourceParams = createResourceParams$5(config);
|
|
1301
|
+
return keyBuilder$8(luvio, resourceParams);
|
|
1302
|
+
}
|
|
1303
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
1304
|
+
const config = {};
|
|
1305
|
+
typeCheckConfig$7(untrustedConfig, config, getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata);
|
|
1306
|
+
return config;
|
|
1307
|
+
}
|
|
1308
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
1309
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1310
|
+
return null;
|
|
1311
|
+
}
|
|
1312
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1313
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1314
|
+
}
|
|
1315
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
1316
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1317
|
+
return null;
|
|
1318
|
+
}
|
|
1319
|
+
return config;
|
|
1320
|
+
}
|
|
1321
|
+
function adapterFragment$3(luvio, config) {
|
|
1322
|
+
createResourceParams$5(config);
|
|
1323
|
+
return select$6();
|
|
1324
|
+
}
|
|
1325
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
1326
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response, {
|
|
1327
|
+
config,
|
|
1328
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
1329
|
+
});
|
|
1330
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1331
|
+
}
|
|
1332
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
1333
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
1334
|
+
config,
|
|
1335
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
1336
|
+
});
|
|
1337
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1338
|
+
}
|
|
1339
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
1340
|
+
const resourceParams = createResourceParams$5(config);
|
|
1341
|
+
const request = createResourceRequest$5(resourceParams);
|
|
1342
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1343
|
+
.then((response) => {
|
|
1344
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
1345
|
+
const cache = new StoreKeyMap();
|
|
1346
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams, response.body);
|
|
1347
|
+
return cache;
|
|
1348
|
+
});
|
|
1349
|
+
}, (response) => {
|
|
1350
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1353
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
1354
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$5, undefined, false);
|
|
1355
|
+
}
|
|
1356
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
1357
|
+
const { luvio, config } = context;
|
|
1358
|
+
const selector = {
|
|
1359
|
+
recordId: keyBuilder$7(luvio, config),
|
|
1360
|
+
node: adapterFragment$3(luvio, config),
|
|
1361
|
+
variables: {},
|
|
1362
|
+
};
|
|
1363
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1364
|
+
config,
|
|
1365
|
+
resolve: () => buildNetworkSnapshot$5(luvio, config, snapshotRefreshOptions)
|
|
1366
|
+
});
|
|
1367
|
+
return cacheSnapshot;
|
|
1368
|
+
}
|
|
1369
|
+
const getProgramSummaryCollectionForCommunityAdapterFactory = (luvio) => function enablement__getProgramSummaryCollectionForCommunity(untrustedConfig, requestContext) {
|
|
1370
|
+
const config = validateAdapterConfig$5(untrustedConfig, getProgramSummaryCollectionForCommunity_ConfigPropertyNames);
|
|
1371
|
+
// Invalid or incomplete config
|
|
1372
|
+
if (config === null) {
|
|
1373
|
+
return null;
|
|
1374
|
+
}
|
|
1375
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1376
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
function select$5(luvio, params) {
|
|
1380
|
+
return select$8();
|
|
1381
|
+
}
|
|
1382
|
+
function keyBuilder$6(luvio, params) {
|
|
1383
|
+
return keyPrefix + '::EnablementProgramSummaryListRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
1384
|
+
}
|
|
1385
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
1386
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
|
|
1387
|
+
}
|
|
1388
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
1389
|
+
const { body } = response;
|
|
1390
|
+
const key = keyBuilder$6(luvio, resourceParams);
|
|
1391
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1392
|
+
const snapshot = luvio.storeLookup({
|
|
1393
|
+
recordId: key,
|
|
1394
|
+
node: select$5(),
|
|
1395
|
+
variables: {},
|
|
1396
|
+
}, snapshotRefresh);
|
|
1397
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1398
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1399
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
deepFreeze(snapshot.data);
|
|
1403
|
+
return snapshot;
|
|
1404
|
+
}
|
|
1405
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
1406
|
+
const key = keyBuilder$6(luvio, params);
|
|
1407
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1408
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
1409
|
+
return errorSnapshot;
|
|
1410
|
+
}
|
|
1411
|
+
function createResourceRequest$4(config) {
|
|
1412
|
+
const headers = {};
|
|
1413
|
+
return {
|
|
1414
|
+
baseUri: '/services/data/v60.0',
|
|
1415
|
+
basePath: '/connect/enablement/program/summary/assigned',
|
|
1416
|
+
method: 'get',
|
|
1417
|
+
body: null,
|
|
1418
|
+
urlParams: {},
|
|
1419
|
+
queryParams: config.queryParams,
|
|
1420
|
+
headers,
|
|
1421
|
+
priority: 'normal',
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
const adapterName$4 = 'getAssignedEnablementProgramSummary';
|
|
1426
|
+
const getAssignedEnablementProgramSummary_ConfigPropertyMetadata = [
|
|
1427
|
+
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1428
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1429
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1430
|
+
];
|
|
1431
|
+
const getAssignedEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getAssignedEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1432
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$7(getAssignedEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1433
|
+
function keyBuilder$5(luvio, config) {
|
|
1434
|
+
const resourceParams = createResourceParams$4(config);
|
|
1435
|
+
return keyBuilder$6(luvio, resourceParams);
|
|
1436
|
+
}
|
|
1437
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
1438
|
+
const config = {};
|
|
1439
|
+
typeCheckConfig$7(untrustedConfig, config, getAssignedEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1440
|
+
return config;
|
|
1441
|
+
}
|
|
1442
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
1443
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1444
|
+
return null;
|
|
1445
|
+
}
|
|
1446
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1447
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1448
|
+
}
|
|
1449
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
1181
1450
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1182
1451
|
return null;
|
|
1183
1452
|
}
|
|
1184
1453
|
return config;
|
|
1185
1454
|
}
|
|
1186
1455
|
function adapterFragment$2(luvio, config) {
|
|
1187
|
-
createResourceParams$
|
|
1188
|
-
return select$
|
|
1456
|
+
createResourceParams$4(config);
|
|
1457
|
+
return select$5();
|
|
1189
1458
|
}
|
|
1190
1459
|
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
1191
|
-
const snapshot = ingestSuccess$
|
|
1460
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
1192
1461
|
config,
|
|
1193
|
-
resolve: () => buildNetworkSnapshot$
|
|
1462
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1194
1463
|
});
|
|
1195
1464
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1196
1465
|
}
|
|
1197
1466
|
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
1198
1467
|
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
1199
1468
|
config,
|
|
1200
|
-
resolve: () => buildNetworkSnapshot$
|
|
1469
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1201
1470
|
});
|
|
1202
1471
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1203
1472
|
}
|
|
1204
|
-
function buildNetworkSnapshot$
|
|
1205
|
-
const resourceParams = createResourceParams$
|
|
1206
|
-
const request = createResourceRequest$
|
|
1473
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
1474
|
+
const resourceParams = createResourceParams$4(config);
|
|
1475
|
+
const request = createResourceRequest$4(resourceParams);
|
|
1207
1476
|
return luvio.dispatchResourceRequest(request, options)
|
|
1208
1477
|
.then((response) => {
|
|
1209
1478
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
1210
1479
|
const cache = new StoreKeyMap();
|
|
1211
|
-
getResponseCacheKeys$
|
|
1480
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
1212
1481
|
return cache;
|
|
1213
1482
|
});
|
|
1214
1483
|
}, (response) => {
|
|
@@ -1216,23 +1485,23 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
1216
1485
|
});
|
|
1217
1486
|
}
|
|
1218
1487
|
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
1219
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1488
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
1220
1489
|
}
|
|
1221
1490
|
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
1222
1491
|
const { luvio, config } = context;
|
|
1223
1492
|
const selector = {
|
|
1224
|
-
recordId: keyBuilder$
|
|
1493
|
+
recordId: keyBuilder$5(luvio, config),
|
|
1225
1494
|
node: adapterFragment$2(luvio, config),
|
|
1226
1495
|
variables: {},
|
|
1227
1496
|
};
|
|
1228
1497
|
const cacheSnapshot = storeLookup(selector, {
|
|
1229
1498
|
config,
|
|
1230
|
-
resolve: () => buildNetworkSnapshot$
|
|
1499
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
1231
1500
|
});
|
|
1232
1501
|
return cacheSnapshot;
|
|
1233
1502
|
}
|
|
1234
|
-
const
|
|
1235
|
-
const config = validateAdapterConfig$
|
|
1503
|
+
const getAssignedEnablementProgramSummaryAdapterFactory = (luvio) => function enablement__getAssignedEnablementProgramSummary(untrustedConfig, requestContext) {
|
|
1504
|
+
const config = validateAdapterConfig$4(untrustedConfig, getAssignedEnablementProgramSummary_ConfigPropertyNames);
|
|
1236
1505
|
// Invalid or incomplete config
|
|
1237
1506
|
if (config === null) {
|
|
1238
1507
|
return null;
|
|
@@ -1241,22 +1510,22 @@ const getAssignedEnablementProgramSummaryForCommunityAdapterFactory = (luvio) =>
|
|
|
1241
1510
|
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
1242
1511
|
};
|
|
1243
1512
|
|
|
1244
|
-
function select$
|
|
1245
|
-
return select$
|
|
1513
|
+
function select$4(luvio, params) {
|
|
1514
|
+
return select$8();
|
|
1246
1515
|
}
|
|
1247
|
-
function keyBuilder$
|
|
1516
|
+
function keyBuilder$4(luvio, params) {
|
|
1248
1517
|
return keyPrefix + '::EnablementProgramSummaryListRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
1249
1518
|
}
|
|
1250
|
-
function getResponseCacheKeys$
|
|
1251
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1519
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
1520
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1252
1521
|
}
|
|
1253
|
-
function ingestSuccess$
|
|
1522
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
1254
1523
|
const { body } = response;
|
|
1255
|
-
const key = keyBuilder$
|
|
1256
|
-
luvio.storeIngest(key, ingest, body);
|
|
1524
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1525
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1257
1526
|
const snapshot = luvio.storeLookup({
|
|
1258
1527
|
recordId: key,
|
|
1259
|
-
node: select$
|
|
1528
|
+
node: select$4(),
|
|
1260
1529
|
variables: {},
|
|
1261
1530
|
}, snapshotRefresh);
|
|
1262
1531
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1268,16 +1537,16 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1268
1537
|
return snapshot;
|
|
1269
1538
|
}
|
|
1270
1539
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1271
|
-
const key = keyBuilder$
|
|
1540
|
+
const key = keyBuilder$4(luvio, params);
|
|
1272
1541
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1273
1542
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1274
1543
|
return errorSnapshot;
|
|
1275
1544
|
}
|
|
1276
|
-
function createResourceRequest$
|
|
1545
|
+
function createResourceRequest$3(config) {
|
|
1277
1546
|
const headers = {};
|
|
1278
1547
|
return {
|
|
1279
1548
|
baseUri: '/services/data/v60.0',
|
|
1280
|
-
basePath: '/connect/enablement/program/summary/
|
|
1549
|
+
basePath: '/connect/enablement/program/summary/collection',
|
|
1281
1550
|
method: 'get',
|
|
1282
1551
|
body: null,
|
|
1283
1552
|
urlParams: {},
|
|
@@ -1287,62 +1556,62 @@ function createResourceRequest$1(config) {
|
|
|
1287
1556
|
};
|
|
1288
1557
|
}
|
|
1289
1558
|
|
|
1290
|
-
const adapterName$
|
|
1291
|
-
const
|
|
1559
|
+
const adapterName$3 = 'getProgramSummaryCollection';
|
|
1560
|
+
const getProgramSummaryCollection_ConfigPropertyMetadata = [
|
|
1292
1561
|
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1293
1562
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1294
1563
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1295
1564
|
];
|
|
1296
|
-
const
|
|
1297
|
-
const createResourceParams$
|
|
1298
|
-
function keyBuilder$
|
|
1299
|
-
const resourceParams = createResourceParams$
|
|
1300
|
-
return keyBuilder$
|
|
1565
|
+
const getProgramSummaryCollection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getProgramSummaryCollection_ConfigPropertyMetadata);
|
|
1566
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$7(getProgramSummaryCollection_ConfigPropertyMetadata);
|
|
1567
|
+
function keyBuilder$3(luvio, config) {
|
|
1568
|
+
const resourceParams = createResourceParams$3(config);
|
|
1569
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1301
1570
|
}
|
|
1302
|
-
function typeCheckConfig$
|
|
1571
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1303
1572
|
const config = {};
|
|
1304
|
-
typeCheckConfig$
|
|
1573
|
+
typeCheckConfig$7(untrustedConfig, config, getProgramSummaryCollection_ConfigPropertyMetadata);
|
|
1305
1574
|
return config;
|
|
1306
1575
|
}
|
|
1307
|
-
function validateAdapterConfig$
|
|
1576
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1308
1577
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1309
1578
|
return null;
|
|
1310
1579
|
}
|
|
1311
1580
|
if (process.env.NODE_ENV !== 'production') {
|
|
1312
1581
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1313
1582
|
}
|
|
1314
|
-
const config = typeCheckConfig$
|
|
1583
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1315
1584
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1316
1585
|
return null;
|
|
1317
1586
|
}
|
|
1318
1587
|
return config;
|
|
1319
1588
|
}
|
|
1320
1589
|
function adapterFragment$1(luvio, config) {
|
|
1321
|
-
createResourceParams$
|
|
1322
|
-
return select$
|
|
1590
|
+
createResourceParams$3(config);
|
|
1591
|
+
return select$4();
|
|
1323
1592
|
}
|
|
1324
1593
|
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1325
|
-
const snapshot = ingestSuccess$
|
|
1594
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
1326
1595
|
config,
|
|
1327
|
-
resolve: () => buildNetworkSnapshot$
|
|
1596
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1328
1597
|
});
|
|
1329
1598
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1330
1599
|
}
|
|
1331
1600
|
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1332
1601
|
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1333
1602
|
config,
|
|
1334
|
-
resolve: () => buildNetworkSnapshot$
|
|
1603
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1335
1604
|
});
|
|
1336
1605
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1337
1606
|
}
|
|
1338
|
-
function buildNetworkSnapshot$
|
|
1339
|
-
const resourceParams = createResourceParams$
|
|
1340
|
-
const request = createResourceRequest$
|
|
1607
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1608
|
+
const resourceParams = createResourceParams$3(config);
|
|
1609
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1341
1610
|
return luvio.dispatchResourceRequest(request, options)
|
|
1342
1611
|
.then((response) => {
|
|
1343
1612
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1344
1613
|
const cache = new StoreKeyMap();
|
|
1345
|
-
getResponseCacheKeys$
|
|
1614
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
1346
1615
|
return cache;
|
|
1347
1616
|
});
|
|
1348
1617
|
}, (response) => {
|
|
@@ -1350,23 +1619,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
1350
1619
|
});
|
|
1351
1620
|
}
|
|
1352
1621
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1353
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1622
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
1354
1623
|
}
|
|
1355
1624
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1356
1625
|
const { luvio, config } = context;
|
|
1357
1626
|
const selector = {
|
|
1358
|
-
recordId: keyBuilder$
|
|
1627
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1359
1628
|
node: adapterFragment$1(luvio, config),
|
|
1360
1629
|
variables: {},
|
|
1361
1630
|
};
|
|
1362
1631
|
const cacheSnapshot = storeLookup(selector, {
|
|
1363
1632
|
config,
|
|
1364
|
-
resolve: () => buildNetworkSnapshot$
|
|
1633
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
1365
1634
|
});
|
|
1366
1635
|
return cacheSnapshot;
|
|
1367
1636
|
}
|
|
1368
|
-
const
|
|
1369
|
-
const config = validateAdapterConfig$
|
|
1637
|
+
const getProgramSummaryCollectionAdapterFactory = (luvio) => function enablement__getProgramSummaryCollection(untrustedConfig, requestContext) {
|
|
1638
|
+
const config = validateAdapterConfig$3(untrustedConfig, getProgramSummaryCollection_ConfigPropertyNames);
|
|
1370
1639
|
// Invalid or incomplete config
|
|
1371
1640
|
if (config === null) {
|
|
1372
1641
|
return null;
|
|
@@ -1375,24 +1644,24 @@ const getAssignedEnablementProgramSummaryAdapterFactory = (luvio) => function en
|
|
|
1375
1644
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1376
1645
|
};
|
|
1377
1646
|
|
|
1378
|
-
function select(luvio, params) {
|
|
1379
|
-
return select$
|
|
1647
|
+
function select$3(luvio, params) {
|
|
1648
|
+
return select$9();
|
|
1380
1649
|
}
|
|
1381
|
-
function keyBuilder$
|
|
1382
|
-
return keyBuilder$
|
|
1650
|
+
function keyBuilder$2(luvio, params) {
|
|
1651
|
+
return keyBuilder$b(luvio, {
|
|
1383
1652
|
enablement_program_id: params.urlParams.enablementProgramId
|
|
1384
1653
|
});
|
|
1385
1654
|
}
|
|
1386
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1387
|
-
getTypeCacheKeys$
|
|
1655
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1656
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1388
1657
|
}
|
|
1389
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1658
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1390
1659
|
const { body } = response;
|
|
1391
|
-
const key = keyBuilder$
|
|
1392
|
-
luvio.storeIngest(key, ingest$
|
|
1660
|
+
const key = keyBuilder$2(luvio, resourceParams);
|
|
1661
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1393
1662
|
const snapshot = luvio.storeLookup({
|
|
1394
1663
|
recordId: key,
|
|
1395
|
-
node: select(),
|
|
1664
|
+
node: select$3(),
|
|
1396
1665
|
variables: {},
|
|
1397
1666
|
}, snapshotRefresh);
|
|
1398
1667
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1404,18 +1673,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1404
1673
|
return snapshot;
|
|
1405
1674
|
}
|
|
1406
1675
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1407
|
-
const key = keyBuilder$
|
|
1676
|
+
const key = keyBuilder$2(luvio, params);
|
|
1408
1677
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1409
1678
|
const storeMetadataParams = {
|
|
1410
|
-
ttl: TTL,
|
|
1679
|
+
ttl: TTL$1,
|
|
1411
1680
|
namespace: keyPrefix,
|
|
1412
|
-
version: VERSION$
|
|
1413
|
-
representationName: RepresentationType$
|
|
1681
|
+
version: VERSION$2,
|
|
1682
|
+
representationName: RepresentationType$2
|
|
1414
1683
|
};
|
|
1415
1684
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1416
1685
|
return errorSnapshot;
|
|
1417
1686
|
}
|
|
1418
|
-
function createResourceRequest(config) {
|
|
1687
|
+
function createResourceRequest$2(config) {
|
|
1419
1688
|
const headers = {};
|
|
1420
1689
|
return {
|
|
1421
1690
|
baseUri: '/services/data/v60.0',
|
|
@@ -1429,61 +1698,61 @@ function createResourceRequest(config) {
|
|
|
1429
1698
|
};
|
|
1430
1699
|
}
|
|
1431
1700
|
|
|
1432
|
-
const adapterName = 'getEnablementProgramSummary';
|
|
1701
|
+
const adapterName$2 = 'getEnablementProgramSummary';
|
|
1433
1702
|
const getEnablementProgramSummary_ConfigPropertyMetadata = [
|
|
1434
1703
|
generateParamConfigMetadata('enablementProgramId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1435
1704
|
generateParamConfigMetadata('includeProgress', false, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
1436
1705
|
];
|
|
1437
|
-
const getEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1438
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1439
|
-
function keyBuilder(luvio, config) {
|
|
1440
|
-
const resourceParams = createResourceParams(config);
|
|
1441
|
-
return keyBuilder$
|
|
1706
|
+
const getEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1707
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$7(getEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1708
|
+
function keyBuilder$1(luvio, config) {
|
|
1709
|
+
const resourceParams = createResourceParams$2(config);
|
|
1710
|
+
return keyBuilder$2(luvio, resourceParams);
|
|
1442
1711
|
}
|
|
1443
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1712
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1444
1713
|
const config = {};
|
|
1445
|
-
typeCheckConfig$
|
|
1714
|
+
typeCheckConfig$7(untrustedConfig, config, getEnablementProgramSummary_ConfigPropertyMetadata);
|
|
1446
1715
|
return config;
|
|
1447
1716
|
}
|
|
1448
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1717
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1449
1718
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1450
1719
|
return null;
|
|
1451
1720
|
}
|
|
1452
1721
|
if (process.env.NODE_ENV !== 'production') {
|
|
1453
1722
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1454
1723
|
}
|
|
1455
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1724
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1456
1725
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1457
1726
|
return null;
|
|
1458
1727
|
}
|
|
1459
1728
|
return config;
|
|
1460
1729
|
}
|
|
1461
1730
|
function adapterFragment(luvio, config) {
|
|
1462
|
-
createResourceParams(config);
|
|
1463
|
-
return select();
|
|
1731
|
+
createResourceParams$2(config);
|
|
1732
|
+
return select$3();
|
|
1464
1733
|
}
|
|
1465
1734
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1466
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1735
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1467
1736
|
config,
|
|
1468
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1737
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1469
1738
|
});
|
|
1470
1739
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1471
1740
|
}
|
|
1472
1741
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1473
1742
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1474
1743
|
config,
|
|
1475
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1744
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1476
1745
|
});
|
|
1477
1746
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1478
1747
|
}
|
|
1479
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
1480
|
-
const resourceParams = createResourceParams(config);
|
|
1481
|
-
const request = createResourceRequest(resourceParams);
|
|
1748
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1749
|
+
const resourceParams = createResourceParams$2(config);
|
|
1750
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1482
1751
|
return luvio.dispatchResourceRequest(request, options)
|
|
1483
1752
|
.then((response) => {
|
|
1484
1753
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1485
1754
|
const cache = new StoreKeyMap();
|
|
1486
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1755
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1487
1756
|
return cache;
|
|
1488
1757
|
});
|
|
1489
1758
|
}, (response) => {
|
|
@@ -1491,23 +1760,23 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1491
1760
|
});
|
|
1492
1761
|
}
|
|
1493
1762
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1494
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1763
|
+
return buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
1495
1764
|
}
|
|
1496
1765
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1497
1766
|
const { luvio, config } = context;
|
|
1498
1767
|
const selector = {
|
|
1499
|
-
recordId: keyBuilder(luvio, config),
|
|
1768
|
+
recordId: keyBuilder$1(luvio, config),
|
|
1500
1769
|
node: adapterFragment(luvio, config),
|
|
1501
1770
|
variables: {},
|
|
1502
1771
|
};
|
|
1503
1772
|
const cacheSnapshot = storeLookup(selector, {
|
|
1504
1773
|
config,
|
|
1505
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1774
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1506
1775
|
});
|
|
1507
1776
|
return cacheSnapshot;
|
|
1508
1777
|
}
|
|
1509
1778
|
const getEnablementProgramSummaryAdapterFactory = (luvio) => function enablement__getEnablementProgramSummary(untrustedConfig, requestContext) {
|
|
1510
|
-
const config = validateAdapterConfig(untrustedConfig, getEnablementProgramSummary_ConfigPropertyNames);
|
|
1779
|
+
const config = validateAdapterConfig$2(untrustedConfig, getEnablementProgramSummary_ConfigPropertyNames);
|
|
1511
1780
|
// Invalid or incomplete config
|
|
1512
1781
|
if (config === null) {
|
|
1513
1782
|
return null;
|
|
@@ -1516,4 +1785,255 @@ const getEnablementProgramSummaryAdapterFactory = (luvio) => function enablement
|
|
|
1516
1785
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1517
1786
|
};
|
|
1518
1787
|
|
|
1519
|
-
|
|
1788
|
+
const TTL = 15000;
|
|
1789
|
+
const VERSION = "f87a4ca2a25d6b000ce11b00273a58f4";
|
|
1790
|
+
function validate(obj, path = 'EnablementProgramSelfEnrollmentRepresentation') {
|
|
1791
|
+
const v_error = (() => {
|
|
1792
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1793
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1794
|
+
}
|
|
1795
|
+
const obj_learningItemAssignmentId = obj.learningItemAssignmentId;
|
|
1796
|
+
const path_learningItemAssignmentId = path + '.learningItemAssignmentId';
|
|
1797
|
+
if (typeof obj_learningItemAssignmentId !== 'string') {
|
|
1798
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningItemAssignmentId + '" (at "' + path_learningItemAssignmentId + '")');
|
|
1799
|
+
}
|
|
1800
|
+
})();
|
|
1801
|
+
return v_error === undefined ? null : v_error;
|
|
1802
|
+
}
|
|
1803
|
+
const RepresentationType = 'EnablementProgramSelfEnrollmentRepresentation';
|
|
1804
|
+
function keyBuilder(luvio, config) {
|
|
1805
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.learning_item_assignment_id;
|
|
1806
|
+
}
|
|
1807
|
+
function keyBuilderFromType(luvio, object) {
|
|
1808
|
+
const keyParams = {
|
|
1809
|
+
learning_item_assignment_id: object.learningItemAssignmentId
|
|
1810
|
+
};
|
|
1811
|
+
return keyBuilder(luvio, keyParams);
|
|
1812
|
+
}
|
|
1813
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1814
|
+
return input;
|
|
1815
|
+
}
|
|
1816
|
+
const select$2 = function EnablementProgramSelfEnrollmentRepresentationSelect() {
|
|
1817
|
+
return {
|
|
1818
|
+
kind: 'Fragment',
|
|
1819
|
+
version: VERSION,
|
|
1820
|
+
private: [],
|
|
1821
|
+
selections: [
|
|
1822
|
+
{
|
|
1823
|
+
name: 'learningItemAssignmentId',
|
|
1824
|
+
kind: 'Scalar'
|
|
1825
|
+
}
|
|
1826
|
+
]
|
|
1827
|
+
};
|
|
1828
|
+
};
|
|
1829
|
+
function equals(existing, incoming) {
|
|
1830
|
+
const existing_learningItemAssignmentId = existing.learningItemAssignmentId;
|
|
1831
|
+
const incoming_learningItemAssignmentId = incoming.learningItemAssignmentId;
|
|
1832
|
+
if (!(existing_learningItemAssignmentId === incoming_learningItemAssignmentId)) {
|
|
1833
|
+
return false;
|
|
1834
|
+
}
|
|
1835
|
+
return true;
|
|
1836
|
+
}
|
|
1837
|
+
const ingest = function EnablementProgramSelfEnrollmentRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1838
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1839
|
+
const validateError = validate(input);
|
|
1840
|
+
if (validateError !== null) {
|
|
1841
|
+
throw validateError;
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1845
|
+
const ttlToUse = TTL;
|
|
1846
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "enablement", VERSION, RepresentationType, equals);
|
|
1847
|
+
return createLink(key);
|
|
1848
|
+
};
|
|
1849
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1850
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1851
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1852
|
+
rootKeySet.set(rootKey, {
|
|
1853
|
+
namespace: keyPrefix,
|
|
1854
|
+
representationName: RepresentationType,
|
|
1855
|
+
mergeable: false
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
function select$1(luvio, params) {
|
|
1860
|
+
return select$2();
|
|
1861
|
+
}
|
|
1862
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1863
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1864
|
+
}
|
|
1865
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1866
|
+
const { body } = response;
|
|
1867
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1868
|
+
luvio.storeIngest(key, ingest, body);
|
|
1869
|
+
const snapshot = luvio.storeLookup({
|
|
1870
|
+
recordId: key,
|
|
1871
|
+
node: select$1(),
|
|
1872
|
+
variables: {},
|
|
1873
|
+
});
|
|
1874
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1875
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1876
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
deepFreeze(snapshot.data);
|
|
1880
|
+
return snapshot;
|
|
1881
|
+
}
|
|
1882
|
+
function createResourceRequest$1(config) {
|
|
1883
|
+
const headers = {};
|
|
1884
|
+
return {
|
|
1885
|
+
baseUri: '/services/data/v60.0',
|
|
1886
|
+
basePath: '/connect/enablement/program/' + config.urlParams.enablementProgramId + '/actions/enroll',
|
|
1887
|
+
method: 'post',
|
|
1888
|
+
body: null,
|
|
1889
|
+
urlParams: config.urlParams,
|
|
1890
|
+
queryParams: {},
|
|
1891
|
+
headers,
|
|
1892
|
+
priority: 'normal',
|
|
1893
|
+
};
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
const adapterName$1 = 'selfEnrollInEnablementProgram';
|
|
1897
|
+
const selfEnrollInEnablementProgram_ConfigPropertyMetadata = [
|
|
1898
|
+
generateParamConfigMetadata('enablementProgramId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1899
|
+
];
|
|
1900
|
+
const selfEnrollInEnablementProgram_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, selfEnrollInEnablementProgram_ConfigPropertyMetadata);
|
|
1901
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$7(selfEnrollInEnablementProgram_ConfigPropertyMetadata);
|
|
1902
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1903
|
+
const config = {};
|
|
1904
|
+
typeCheckConfig$7(untrustedConfig, config, selfEnrollInEnablementProgram_ConfigPropertyMetadata);
|
|
1905
|
+
return config;
|
|
1906
|
+
}
|
|
1907
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1908
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1909
|
+
return null;
|
|
1910
|
+
}
|
|
1911
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1912
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1913
|
+
}
|
|
1914
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1915
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1916
|
+
return null;
|
|
1917
|
+
}
|
|
1918
|
+
return config;
|
|
1919
|
+
}
|
|
1920
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1921
|
+
const resourceParams = createResourceParams$1(config);
|
|
1922
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1923
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1924
|
+
.then((response) => {
|
|
1925
|
+
return luvio.handleSuccessResponse(() => {
|
|
1926
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1927
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1928
|
+
}, () => {
|
|
1929
|
+
const cache = new StoreKeyMap();
|
|
1930
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1931
|
+
return cache;
|
|
1932
|
+
});
|
|
1933
|
+
}, (response) => {
|
|
1934
|
+
deepFreeze(response);
|
|
1935
|
+
throw response;
|
|
1936
|
+
});
|
|
1937
|
+
}
|
|
1938
|
+
const selfEnrollInEnablementProgramAdapterFactory = (luvio) => {
|
|
1939
|
+
return function selfEnrollInEnablementProgram(untrustedConfig) {
|
|
1940
|
+
const config = validateAdapterConfig$1(untrustedConfig, selfEnrollInEnablementProgram_ConfigPropertyNames);
|
|
1941
|
+
// Invalid or incomplete config
|
|
1942
|
+
if (config === null) {
|
|
1943
|
+
throw new Error('Invalid config for "selfEnrollInEnablementProgram"');
|
|
1944
|
+
}
|
|
1945
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
|
|
1949
|
+
function select(luvio, params) {
|
|
1950
|
+
return select$2();
|
|
1951
|
+
}
|
|
1952
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1953
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1954
|
+
}
|
|
1955
|
+
function ingestSuccess(luvio, resourceParams, response) {
|
|
1956
|
+
const { body } = response;
|
|
1957
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1958
|
+
luvio.storeIngest(key, ingest, body);
|
|
1959
|
+
const snapshot = luvio.storeLookup({
|
|
1960
|
+
recordId: key,
|
|
1961
|
+
node: select(),
|
|
1962
|
+
variables: {},
|
|
1963
|
+
});
|
|
1964
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1965
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1966
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
deepFreeze(snapshot.data);
|
|
1970
|
+
return snapshot;
|
|
1971
|
+
}
|
|
1972
|
+
function createResourceRequest(config) {
|
|
1973
|
+
const headers = {};
|
|
1974
|
+
return {
|
|
1975
|
+
baseUri: '/services/data/v60.0',
|
|
1976
|
+
basePath: '/connect/enablement/program/' + config.urlParams.enablementProgramId + '/actions/unenroll',
|
|
1977
|
+
method: 'post',
|
|
1978
|
+
body: null,
|
|
1979
|
+
urlParams: config.urlParams,
|
|
1980
|
+
queryParams: {},
|
|
1981
|
+
headers,
|
|
1982
|
+
priority: 'normal',
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
const adapterName = 'unenrollFromEnablementProgram';
|
|
1987
|
+
const unenrollFromEnablementProgram_ConfigPropertyMetadata = [
|
|
1988
|
+
generateParamConfigMetadata('enablementProgramId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1989
|
+
];
|
|
1990
|
+
const unenrollFromEnablementProgram_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, unenrollFromEnablementProgram_ConfigPropertyMetadata);
|
|
1991
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$7(unenrollFromEnablementProgram_ConfigPropertyMetadata);
|
|
1992
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1993
|
+
const config = {};
|
|
1994
|
+
typeCheckConfig$7(untrustedConfig, config, unenrollFromEnablementProgram_ConfigPropertyMetadata);
|
|
1995
|
+
return config;
|
|
1996
|
+
}
|
|
1997
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1998
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1999
|
+
return null;
|
|
2000
|
+
}
|
|
2001
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2002
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2003
|
+
}
|
|
2004
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
2005
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2006
|
+
return null;
|
|
2007
|
+
}
|
|
2008
|
+
return config;
|
|
2009
|
+
}
|
|
2010
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
2011
|
+
const resourceParams = createResourceParams(config);
|
|
2012
|
+
const request = createResourceRequest(resourceParams);
|
|
2013
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2014
|
+
.then((response) => {
|
|
2015
|
+
return luvio.handleSuccessResponse(() => {
|
|
2016
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
2017
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2018
|
+
}, () => {
|
|
2019
|
+
const cache = new StoreKeyMap();
|
|
2020
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
2021
|
+
return cache;
|
|
2022
|
+
});
|
|
2023
|
+
}, (response) => {
|
|
2024
|
+
deepFreeze(response);
|
|
2025
|
+
throw response;
|
|
2026
|
+
});
|
|
2027
|
+
}
|
|
2028
|
+
const unenrollFromEnablementProgramAdapterFactory = (luvio) => {
|
|
2029
|
+
return function unenrollFromEnablementProgram(untrustedConfig) {
|
|
2030
|
+
const config = validateAdapterConfig(untrustedConfig, unenrollFromEnablementProgram_ConfigPropertyNames);
|
|
2031
|
+
// Invalid or incomplete config
|
|
2032
|
+
if (config === null) {
|
|
2033
|
+
throw new Error('Invalid config for "unenrollFromEnablementProgram"');
|
|
2034
|
+
}
|
|
2035
|
+
return buildNetworkSnapshot(luvio, config);
|
|
2036
|
+
};
|
|
2037
|
+
};
|
|
2038
|
+
|
|
2039
|
+
export { getAssignedEnablementProgramSummaryAdapterFactory, getAssignedEnablementProgramSummaryForCommunityAdapterFactory, getEnablementProgramSummaryAdapterFactory, getProgramSummaryCollectionAdapterFactory, getProgramSummaryCollectionForCommunityAdapterFactory, selfEnrollInEnablementProgramAdapterFactory, unenrollFromEnablementProgramAdapterFactory };
|