@salesforce/lds-adapters-industries-education 1.303.0 → 1.305.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/industries-education.js +1552 -1587
- package/dist/es/es2018/types/src/generated/adapters/createLearnings.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/updateLearnings.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/resources/patchConnectEducationAcademicOperationsLearnings.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectEducationAcademicOperationsLearnings.d.ts +12 -0
- package/dist/es/es2018/types/src/generated/types/CreateLearningOutputRepresentation.d.ts +14 -17
- package/dist/es/es2018/types/src/generated/types/CreateLearningsInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/CreateLearningsOutputRepresentation.d.ts +48 -0
- package/dist/es/es2018/types/src/generated/types/EducationApiErrorDetails.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/UpdateLearningsInputRepresentation.d.ts +28 -0
- package/package.json +4 -4
- package/sfdc/index.js +1486 -1521
- package/src/raml/api.raml +90 -43
- package/src/raml/luvio.raml +9 -9
- package/dist/es/es2018/types/src/generated/adapters/postCreateLearning.d.ts +0 -16
- package/dist/es/es2018/types/src/generated/adapters/updateLearning.d.ts +0 -16
- package/dist/es/es2018/types/src/generated/resources/patchConnectEducationCampusSetupLearning.d.ts +0 -13
- package/dist/es/es2018/types/src/generated/resources/postConnectEducationCampusSetupLearning.d.ts +0 -13
- package/dist/es/es2018/types/src/generated/types/CreateLearningInputRepresentationData.d.ts +0 -29
- package/dist/es/es2018/types/src/generated/types/UpdateLearningInputRepresentationData.d.ts +0 -29
|
@@ -799,304 +799,209 @@ const getLearningAdapterFactory = (luvio) => function education__getLearning(unt
|
|
|
799
799
|
buildCachedSnapshotCachePolicy$g, buildNetworkSnapshotCachePolicy$g);
|
|
800
800
|
};
|
|
801
801
|
|
|
802
|
-
|
|
803
|
-
function validate$19(obj, path = 'Applicant') {
|
|
802
|
+
function validate$19(obj, path = 'EducationApiErrorDetails') {
|
|
804
803
|
const v_error = (() => {
|
|
805
804
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
806
805
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
807
806
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
return new TypeError('Expected "string" but received "' + typeof obj_contactId + '" (at "' + path_contactId + '")');
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
if (obj.email !== undefined) {
|
|
816
|
-
const obj_email = obj.email;
|
|
817
|
-
const path_email = path + '.email';
|
|
818
|
-
if (typeof obj_email !== 'string') {
|
|
819
|
-
return new TypeError('Expected "string" but received "' + typeof obj_email + '" (at "' + path_email + '")');
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
if (obj.name !== undefined) {
|
|
823
|
-
const obj_name = obj.name;
|
|
824
|
-
const path_name = path + '.name';
|
|
825
|
-
if (typeof obj_name !== 'string') {
|
|
826
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
})();
|
|
830
|
-
return v_error === undefined ? null : v_error;
|
|
831
|
-
}
|
|
832
|
-
const select$Z = function ApplicantSelect() {
|
|
833
|
-
return {
|
|
834
|
-
kind: 'Fragment',
|
|
835
|
-
version: VERSION$B,
|
|
836
|
-
private: [],
|
|
837
|
-
selections: [
|
|
838
|
-
{
|
|
839
|
-
name: 'contactId',
|
|
840
|
-
kind: 'Scalar',
|
|
841
|
-
required: false
|
|
842
|
-
},
|
|
843
|
-
{
|
|
844
|
-
name: 'email',
|
|
845
|
-
kind: 'Scalar',
|
|
846
|
-
required: false
|
|
847
|
-
},
|
|
848
|
-
{
|
|
849
|
-
name: 'name',
|
|
850
|
-
kind: 'Scalar',
|
|
851
|
-
required: false
|
|
852
|
-
}
|
|
853
|
-
]
|
|
854
|
-
};
|
|
855
|
-
};
|
|
856
|
-
function equals$B(existing, incoming) {
|
|
857
|
-
const existing_contactId = existing.contactId;
|
|
858
|
-
const incoming_contactId = incoming.contactId;
|
|
859
|
-
// if at least one of these optionals is defined
|
|
860
|
-
if (existing_contactId !== undefined || incoming_contactId !== undefined) {
|
|
861
|
-
// if one of these is not defined we know the other is defined and therefore
|
|
862
|
-
// not equal
|
|
863
|
-
if (existing_contactId === undefined || incoming_contactId === undefined) {
|
|
864
|
-
return false;
|
|
865
|
-
}
|
|
866
|
-
if (!(existing_contactId === incoming_contactId)) {
|
|
867
|
-
return false;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
const existing_email = existing.email;
|
|
871
|
-
const incoming_email = incoming.email;
|
|
872
|
-
// if at least one of these optionals is defined
|
|
873
|
-
if (existing_email !== undefined || incoming_email !== undefined) {
|
|
874
|
-
// if one of these is not defined we know the other is defined and therefore
|
|
875
|
-
// not equal
|
|
876
|
-
if (existing_email === undefined || incoming_email === undefined) {
|
|
877
|
-
return false;
|
|
878
|
-
}
|
|
879
|
-
if (!(existing_email === incoming_email)) {
|
|
880
|
-
return false;
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
const existing_name = existing.name;
|
|
884
|
-
const incoming_name = incoming.name;
|
|
885
|
-
// if at least one of these optionals is defined
|
|
886
|
-
if (existing_name !== undefined || incoming_name !== undefined) {
|
|
887
|
-
// if one of these is not defined we know the other is defined and therefore
|
|
888
|
-
// not equal
|
|
889
|
-
if (existing_name === undefined || incoming_name === undefined) {
|
|
890
|
-
return false;
|
|
891
|
-
}
|
|
892
|
-
if (!(existing_name === incoming_name)) {
|
|
893
|
-
return false;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
return true;
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
function validate$18(obj, path = 'Submitter') {
|
|
900
|
-
const v_error = (() => {
|
|
901
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
902
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
903
|
-
}
|
|
904
|
-
if (obj.contactId !== undefined) {
|
|
905
|
-
const obj_contactId = obj.contactId;
|
|
906
|
-
const path_contactId = path + '.contactId';
|
|
907
|
-
if (typeof obj_contactId !== 'string') {
|
|
908
|
-
return new TypeError('Expected "string" but received "' + typeof obj_contactId + '" (at "' + path_contactId + '")');
|
|
909
|
-
}
|
|
807
|
+
const obj_field = obj.field;
|
|
808
|
+
const path_field = path + '.field';
|
|
809
|
+
if (typeof obj_field !== 'string') {
|
|
810
|
+
return new TypeError('Expected "string" but received "' + typeof obj_field + '" (at "' + path_field + '")');
|
|
910
811
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
916
|
-
}
|
|
812
|
+
const obj_message = obj.message;
|
|
813
|
+
const path_message = path + '.message';
|
|
814
|
+
if (typeof obj_message !== 'string') {
|
|
815
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
917
816
|
}
|
|
918
817
|
})();
|
|
919
818
|
return v_error === undefined ? null : v_error;
|
|
920
819
|
}
|
|
921
820
|
|
|
922
|
-
function validate$
|
|
821
|
+
function validate$18(obj, path = 'CreateLearningOutputRepresentation') {
|
|
923
822
|
const v_error = (() => {
|
|
924
823
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
925
824
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
926
825
|
}
|
|
927
|
-
if (obj.
|
|
928
|
-
const
|
|
929
|
-
const
|
|
930
|
-
if (
|
|
931
|
-
return new TypeError('Expected "
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
826
|
+
if (obj.errors !== undefined) {
|
|
827
|
+
const obj_errors = obj.errors;
|
|
828
|
+
const path_errors = path + '.errors';
|
|
829
|
+
if (!ArrayIsArray(obj_errors)) {
|
|
830
|
+
return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
|
|
831
|
+
}
|
|
832
|
+
for (let i = 0; i < obj_errors.length; i++) {
|
|
833
|
+
const obj_errors_item = obj_errors[i];
|
|
834
|
+
const path_errors_item = path_errors + '[' + i + ']';
|
|
835
|
+
const referencepath_errors_itemValidationError = validate$19(obj_errors_item, path_errors_item);
|
|
836
|
+
if (referencepath_errors_itemValidationError !== null) {
|
|
837
|
+
let message = 'Object doesn\'t match EducationApiErrorDetails (at "' + path_errors_item + '")\n';
|
|
838
|
+
message += referencepath_errors_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
839
|
+
return new TypeError(message);
|
|
840
|
+
}
|
|
942
841
|
}
|
|
943
842
|
}
|
|
944
|
-
if (obj.
|
|
945
|
-
const
|
|
946
|
-
const
|
|
947
|
-
if (
|
|
948
|
-
return new TypeError('Expected "
|
|
843
|
+
if (obj.learningAchievementIds !== undefined) {
|
|
844
|
+
const obj_learningAchievementIds = obj.learningAchievementIds;
|
|
845
|
+
const path_learningAchievementIds = path + '.learningAchievementIds';
|
|
846
|
+
if (!ArrayIsArray(obj_learningAchievementIds)) {
|
|
847
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learningAchievementIds + '" (at "' + path_learningAchievementIds + '")');
|
|
949
848
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
849
|
+
for (let i = 0; i < obj_learningAchievementIds.length; i++) {
|
|
850
|
+
const obj_learningAchievementIds_item = obj_learningAchievementIds[i];
|
|
851
|
+
const path_learningAchievementIds_item = path_learningAchievementIds + '[' + i + ']';
|
|
852
|
+
if (typeof obj_learningAchievementIds_item !== 'string') {
|
|
853
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningAchievementIds_item + '" (at "' + path_learningAchievementIds_item + '")');
|
|
854
|
+
}
|
|
956
855
|
}
|
|
957
856
|
}
|
|
958
|
-
if (obj.
|
|
959
|
-
const
|
|
960
|
-
const
|
|
961
|
-
if (typeof
|
|
962
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
857
|
+
if (obj.learningCourseId !== undefined) {
|
|
858
|
+
const obj_learningCourseId = obj.learningCourseId;
|
|
859
|
+
const path_learningCourseId = path + '.learningCourseId';
|
|
860
|
+
if (typeof obj_learningCourseId !== 'string') {
|
|
861
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningCourseId + '" (at "' + path_learningCourseId + '")');
|
|
963
862
|
}
|
|
964
863
|
}
|
|
965
|
-
if (obj.
|
|
966
|
-
const
|
|
967
|
-
const
|
|
968
|
-
if (
|
|
969
|
-
return new TypeError('Expected "
|
|
864
|
+
if (obj.learningFoundationItemIds !== undefined) {
|
|
865
|
+
const obj_learningFoundationItemIds = obj.learningFoundationItemIds;
|
|
866
|
+
const path_learningFoundationItemIds = path + '.learningFoundationItemIds';
|
|
867
|
+
if (!ArrayIsArray(obj_learningFoundationItemIds)) {
|
|
868
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learningFoundationItemIds + '" (at "' + path_learningFoundationItemIds + '")');
|
|
970
869
|
}
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
870
|
+
for (let i = 0; i < obj_learningFoundationItemIds.length; i++) {
|
|
871
|
+
const obj_learningFoundationItemIds_item = obj_learningFoundationItemIds[i];
|
|
872
|
+
const path_learningFoundationItemIds_item = path_learningFoundationItemIds + '[' + i + ']';
|
|
873
|
+
if (typeof obj_learningFoundationItemIds_item !== 'string') {
|
|
874
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningFoundationItemIds_item + '" (at "' + path_learningFoundationItemIds_item + '")');
|
|
875
|
+
}
|
|
977
876
|
}
|
|
978
877
|
}
|
|
979
|
-
if (obj.
|
|
980
|
-
const
|
|
981
|
-
const
|
|
982
|
-
if (typeof
|
|
983
|
-
return new TypeError('Expected "
|
|
878
|
+
if (obj.learningId !== undefined) {
|
|
879
|
+
const obj_learningId = obj.learningId;
|
|
880
|
+
const path_learningId = path + '.learningId';
|
|
881
|
+
if (typeof obj_learningId !== 'string') {
|
|
882
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningId + '" (at "' + path_learningId + '")');
|
|
984
883
|
}
|
|
985
884
|
}
|
|
986
|
-
if (obj.
|
|
987
|
-
const
|
|
988
|
-
const
|
|
989
|
-
if (
|
|
990
|
-
return new TypeError('Expected "
|
|
885
|
+
if (obj.learningOutcomeItemIds !== undefined) {
|
|
886
|
+
const obj_learningOutcomeItemIds = obj.learningOutcomeItemIds;
|
|
887
|
+
const path_learningOutcomeItemIds = path + '.learningOutcomeItemIds';
|
|
888
|
+
if (!ArrayIsArray(obj_learningOutcomeItemIds)) {
|
|
889
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learningOutcomeItemIds + '" (at "' + path_learningOutcomeItemIds + '")');
|
|
991
890
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
let message = 'Object doesn\'t match Submitter (at "' + path_submitter + '")\n';
|
|
999
|
-
message += referencepath_submitterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1000
|
-
return new TypeError(message);
|
|
891
|
+
for (let i = 0; i < obj_learningOutcomeItemIds.length; i++) {
|
|
892
|
+
const obj_learningOutcomeItemIds_item = obj_learningOutcomeItemIds[i];
|
|
893
|
+
const path_learningOutcomeItemIds_item = path_learningOutcomeItemIds + '[' + i + ']';
|
|
894
|
+
if (typeof obj_learningOutcomeItemIds_item !== 'string') {
|
|
895
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningOutcomeItemIds_item + '" (at "' + path_learningOutcomeItemIds_item + '")');
|
|
896
|
+
}
|
|
1001
897
|
}
|
|
1002
898
|
}
|
|
1003
|
-
if (obj.
|
|
1004
|
-
const
|
|
1005
|
-
const
|
|
1006
|
-
if (typeof
|
|
1007
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
899
|
+
if (obj.learningProgramId !== undefined) {
|
|
900
|
+
const obj_learningProgramId = obj.learningProgramId;
|
|
901
|
+
const path_learningProgramId = path + '.learningProgramId';
|
|
902
|
+
if (typeof obj_learningProgramId !== 'string') {
|
|
903
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramId + '" (at "' + path_learningProgramId + '")');
|
|
1008
904
|
}
|
|
1009
905
|
}
|
|
1010
|
-
if (obj.
|
|
1011
|
-
const
|
|
1012
|
-
const
|
|
1013
|
-
if (typeof
|
|
1014
|
-
return new TypeError('Expected "
|
|
906
|
+
if (obj.success !== undefined) {
|
|
907
|
+
const obj_success = obj.success;
|
|
908
|
+
const path_success = path + '.success';
|
|
909
|
+
if (typeof obj_success !== 'boolean') {
|
|
910
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
|
|
1015
911
|
}
|
|
1016
912
|
}
|
|
1017
913
|
})();
|
|
1018
914
|
return v_error === undefined ? null : v_error;
|
|
1019
915
|
}
|
|
1020
916
|
|
|
1021
|
-
|
|
917
|
+
const TTL$8 = 100;
|
|
918
|
+
const VERSION$B = "ff34ed5afbde8f8c0e3ba4441dd19c08";
|
|
919
|
+
function validate$17(obj, path = 'CreateLearningsOutputRepresentation') {
|
|
1022
920
|
const v_error = (() => {
|
|
1023
921
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1024
922
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1025
923
|
}
|
|
1026
|
-
if (obj.
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
if (!ArrayIsArray(
|
|
1030
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
1031
|
-
}
|
|
1032
|
-
for (let i = 0; i <
|
|
1033
|
-
const
|
|
1034
|
-
const
|
|
1035
|
-
const
|
|
1036
|
-
if (
|
|
1037
|
-
let message = 'Object doesn\'t match
|
|
1038
|
-
message +=
|
|
924
|
+
if (obj.details !== undefined) {
|
|
925
|
+
const obj_details = obj.details;
|
|
926
|
+
const path_details = path + '.details';
|
|
927
|
+
if (!ArrayIsArray(obj_details)) {
|
|
928
|
+
return new TypeError('Expected "array" but received "' + typeof obj_details + '" (at "' + path_details + '")');
|
|
929
|
+
}
|
|
930
|
+
for (let i = 0; i < obj_details.length; i++) {
|
|
931
|
+
const obj_details_item = obj_details[i];
|
|
932
|
+
const path_details_item = path_details + '[' + i + ']';
|
|
933
|
+
const referencepath_details_itemValidationError = validate$18(obj_details_item, path_details_item);
|
|
934
|
+
if (referencepath_details_itemValidationError !== null) {
|
|
935
|
+
let message = 'Object doesn\'t match CreateLearningOutputRepresentation (at "' + path_details_item + '")\n';
|
|
936
|
+
message += referencepath_details_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1039
937
|
return new TypeError(message);
|
|
1040
938
|
}
|
|
1041
939
|
}
|
|
1042
940
|
}
|
|
941
|
+
if (obj.failureCount !== undefined) {
|
|
942
|
+
const obj_failureCount = obj.failureCount;
|
|
943
|
+
const path_failureCount = path + '.failureCount';
|
|
944
|
+
if (typeof obj_failureCount !== 'number' || (typeof obj_failureCount === 'number' && Math.floor(obj_failureCount) !== obj_failureCount)) {
|
|
945
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_failureCount + '" (at "' + path_failureCount + '")');
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
const obj_status = obj.status;
|
|
949
|
+
const path_status = path + '.status';
|
|
950
|
+
if (typeof obj_status !== 'string') {
|
|
951
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
952
|
+
}
|
|
953
|
+
if (obj.successCount !== undefined) {
|
|
954
|
+
const obj_successCount = obj.successCount;
|
|
955
|
+
const path_successCount = path + '.successCount';
|
|
956
|
+
if (typeof obj_successCount !== 'number' || (typeof obj_successCount === 'number' && Math.floor(obj_successCount) !== obj_successCount)) {
|
|
957
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_successCount + '" (at "' + path_successCount + '")');
|
|
958
|
+
}
|
|
959
|
+
}
|
|
1043
960
|
})();
|
|
1044
961
|
return v_error === undefined ? null : v_error;
|
|
1045
962
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
const obj_result = obj.result;
|
|
1056
|
-
const path_result = path + '.result';
|
|
1057
|
-
const referencepath_resultValidationError = validate$16(obj_result, path_result);
|
|
1058
|
-
if (referencepath_resultValidationError !== null) {
|
|
1059
|
-
let message = 'Object doesn\'t match GetApplicationsResult (at "' + path_result + '")\n';
|
|
1060
|
-
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1061
|
-
return new TypeError(message);
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
})();
|
|
1065
|
-
return v_error === undefined ? null : v_error;
|
|
963
|
+
const RepresentationType$l = 'CreateLearningsOutputRepresentation';
|
|
964
|
+
function keyBuilder$B(luvio, config) {
|
|
965
|
+
return keyPrefix + '::' + RepresentationType$l + ':' + config.id;
|
|
966
|
+
}
|
|
967
|
+
function keyBuilderFromType$5(luvio, object) {
|
|
968
|
+
const keyParams = {
|
|
969
|
+
id: object.status
|
|
970
|
+
};
|
|
971
|
+
return keyBuilder$B(luvio, keyParams);
|
|
1066
972
|
}
|
|
1067
|
-
const RepresentationType$l = 'ApplicationsOutputRepresentation';
|
|
1068
973
|
function normalize$l(input, existing, path, luvio, store, timestamp) {
|
|
1069
974
|
return input;
|
|
1070
975
|
}
|
|
1071
|
-
const select$
|
|
976
|
+
const select$Z = function CreateLearningsOutputRepresentationSelect() {
|
|
1072
977
|
return {
|
|
1073
978
|
kind: 'Fragment',
|
|
1074
|
-
version: VERSION$
|
|
979
|
+
version: VERSION$B,
|
|
1075
980
|
private: [],
|
|
1076
981
|
opaque: true
|
|
1077
982
|
};
|
|
1078
983
|
};
|
|
1079
|
-
function equals$
|
|
984
|
+
function equals$B(existing, incoming) {
|
|
1080
985
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1081
986
|
return false;
|
|
1082
987
|
}
|
|
1083
988
|
return true;
|
|
1084
989
|
}
|
|
1085
|
-
const ingest$l = function
|
|
990
|
+
const ingest$l = function CreateLearningsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1086
991
|
if (process.env.NODE_ENV !== 'production') {
|
|
1087
|
-
const validateError = validate$
|
|
992
|
+
const validateError = validate$17(input);
|
|
1088
993
|
if (validateError !== null) {
|
|
1089
994
|
throw validateError;
|
|
1090
995
|
}
|
|
1091
996
|
}
|
|
1092
|
-
const key =
|
|
997
|
+
const key = keyBuilderFromType$5(luvio, input);
|
|
1093
998
|
const ttlToUse = TTL$8;
|
|
1094
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$l, "education", VERSION$
|
|
999
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$l, "education", VERSION$B, RepresentationType$l, equals$B);
|
|
1095
1000
|
return createLink(key);
|
|
1096
1001
|
};
|
|
1097
1002
|
function getTypeCacheKeys$l(rootKeySet, luvio, input, fullPathFactory) {
|
|
1098
1003
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1099
|
-
const rootKey =
|
|
1004
|
+
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
1100
1005
|
rootKeySet.set(rootKey, {
|
|
1101
1006
|
namespace: keyPrefix,
|
|
1102
1007
|
representationName: RepresentationType$l,
|
|
@@ -1104,24 +1009,21 @@ function getTypeCacheKeys$l(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1104
1009
|
});
|
|
1105
1010
|
}
|
|
1106
1011
|
|
|
1107
|
-
function select$
|
|
1108
|
-
return select$
|
|
1109
|
-
}
|
|
1110
|
-
function keyBuilder$B(luvio, params) {
|
|
1111
|
-
return keyPrefix + '::ApplicationsOutputRepresentation:(' + ')';
|
|
1012
|
+
function select$Y(luvio, params) {
|
|
1013
|
+
return select$Z();
|
|
1112
1014
|
}
|
|
1113
1015
|
function getResponseCacheKeys$n(storeKeyMap, luvio, resourceParams, response) {
|
|
1114
|
-
getTypeCacheKeys$l(storeKeyMap, luvio, response
|
|
1016
|
+
getTypeCacheKeys$l(storeKeyMap, luvio, response);
|
|
1115
1017
|
}
|
|
1116
|
-
function ingestSuccess$n(luvio, resourceParams, response
|
|
1018
|
+
function ingestSuccess$n(luvio, resourceParams, response) {
|
|
1117
1019
|
const { body } = response;
|
|
1118
|
-
const key =
|
|
1020
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
1119
1021
|
luvio.storeIngest(key, ingest$l, body);
|
|
1120
1022
|
const snapshot = luvio.storeLookup({
|
|
1121
1023
|
recordId: key,
|
|
1122
|
-
node: select$
|
|
1024
|
+
node: select$Y(),
|
|
1123
1025
|
variables: {},
|
|
1124
|
-
}
|
|
1026
|
+
});
|
|
1125
1027
|
if (process.env.NODE_ENV !== 'production') {
|
|
1126
1028
|
if (snapshot.state !== 'Fulfilled') {
|
|
1127
1029
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -1130,25 +1032,13 @@ function ingestSuccess$n(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1130
1032
|
deepFreeze(snapshot.data);
|
|
1131
1033
|
return snapshot;
|
|
1132
1034
|
}
|
|
1133
|
-
function ingestError$f(luvio, params, error, snapshotRefresh) {
|
|
1134
|
-
const key = keyBuilder$B();
|
|
1135
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1136
|
-
const storeMetadataParams = {
|
|
1137
|
-
ttl: TTL$8,
|
|
1138
|
-
namespace: keyPrefix,
|
|
1139
|
-
version: VERSION$A,
|
|
1140
|
-
representationName: RepresentationType$l
|
|
1141
|
-
};
|
|
1142
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1143
|
-
return errorSnapshot;
|
|
1144
|
-
}
|
|
1145
1035
|
function createResourceRequest$n(config) {
|
|
1146
1036
|
const headers = {};
|
|
1147
1037
|
return {
|
|
1148
1038
|
baseUri: '/services/data/v62.0',
|
|
1149
|
-
basePath: '/connect/education/
|
|
1150
|
-
method: '
|
|
1151
|
-
body:
|
|
1039
|
+
basePath: '/connect/education/academic-operations/learnings',
|
|
1040
|
+
method: 'post',
|
|
1041
|
+
body: config.body,
|
|
1152
1042
|
urlParams: {},
|
|
1153
1043
|
queryParams: {},
|
|
1154
1044
|
headers,
|
|
@@ -1156,16 +1046,23 @@ function createResourceRequest$n(config) {
|
|
|
1156
1046
|
};
|
|
1157
1047
|
}
|
|
1158
1048
|
|
|
1159
|
-
const adapterName$n = '
|
|
1160
|
-
const
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
return keyBuilder$B();
|
|
1166
|
-
}
|
|
1049
|
+
const adapterName$n = 'createLearnings';
|
|
1050
|
+
const createLearnings_ConfigPropertyMetadata = [
|
|
1051
|
+
generateParamConfigMetadata('learnings', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1052
|
+
];
|
|
1053
|
+
const createLearnings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$n, createLearnings_ConfigPropertyMetadata);
|
|
1054
|
+
const createResourceParams$n = /*#__PURE__*/ createResourceParams$p(createLearnings_ConfigPropertyMetadata);
|
|
1167
1055
|
function typeCheckConfig$n(untrustedConfig) {
|
|
1168
1056
|
const config = {};
|
|
1057
|
+
const untrustedConfig_learnings = untrustedConfig.learnings;
|
|
1058
|
+
if (ArrayIsArray$1(untrustedConfig_learnings)) {
|
|
1059
|
+
const untrustedConfig_learnings_array = [];
|
|
1060
|
+
for (let i = 0, arrayLength = untrustedConfig_learnings.length; i < arrayLength; i++) {
|
|
1061
|
+
const untrustedConfig_learnings_item = untrustedConfig_learnings[i];
|
|
1062
|
+
untrustedConfig_learnings_array.push(untrustedConfig_learnings_item);
|
|
1063
|
+
}
|
|
1064
|
+
config.learnings = untrustedConfig_learnings_array;
|
|
1065
|
+
}
|
|
1169
1066
|
return config;
|
|
1170
1067
|
}
|
|
1171
1068
|
function validateAdapterConfig$n(untrustedConfig, configPropertyNames) {
|
|
@@ -1175,148 +1072,157 @@ function validateAdapterConfig$n(untrustedConfig, configPropertyNames) {
|
|
|
1175
1072
|
if (process.env.NODE_ENV !== 'production') {
|
|
1176
1073
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1177
1074
|
}
|
|
1178
|
-
const config = typeCheckConfig$n();
|
|
1075
|
+
const config = typeCheckConfig$n(untrustedConfig);
|
|
1179
1076
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1180
1077
|
return null;
|
|
1181
1078
|
}
|
|
1182
1079
|
return config;
|
|
1183
1080
|
}
|
|
1184
|
-
function adapterFragment$f(luvio, config) {
|
|
1185
|
-
createResourceParams$n(config);
|
|
1186
|
-
return select$X();
|
|
1187
|
-
}
|
|
1188
|
-
function onFetchResponseSuccess$f(luvio, config, resourceParams, response) {
|
|
1189
|
-
const snapshot = ingestSuccess$n(luvio, resourceParams, response, {
|
|
1190
|
-
config,
|
|
1191
|
-
resolve: () => buildNetworkSnapshot$n(luvio, config, snapshotRefreshOptions)
|
|
1192
|
-
});
|
|
1193
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
1194
|
-
}
|
|
1195
|
-
function onFetchResponseError$f(luvio, config, resourceParams, response) {
|
|
1196
|
-
const snapshot = ingestError$f(luvio, resourceParams, response, {
|
|
1197
|
-
config,
|
|
1198
|
-
resolve: () => buildNetworkSnapshot$n(luvio, config, snapshotRefreshOptions)
|
|
1199
|
-
});
|
|
1200
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
1201
|
-
}
|
|
1202
1081
|
function buildNetworkSnapshot$n(luvio, config, options) {
|
|
1203
1082
|
const resourceParams = createResourceParams$n(config);
|
|
1204
|
-
const request = createResourceRequest$n();
|
|
1083
|
+
const request = createResourceRequest$n(resourceParams);
|
|
1205
1084
|
return luvio.dispatchResourceRequest(request, options)
|
|
1206
1085
|
.then((response) => {
|
|
1207
|
-
return luvio.handleSuccessResponse(() =>
|
|
1086
|
+
return luvio.handleSuccessResponse(() => {
|
|
1087
|
+
const snapshot = ingestSuccess$n(luvio, resourceParams, response);
|
|
1088
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1089
|
+
}, () => {
|
|
1208
1090
|
const cache = new StoreKeyMap();
|
|
1209
1091
|
getResponseCacheKeys$n(cache, luvio, resourceParams, response.body);
|
|
1210
1092
|
return cache;
|
|
1211
1093
|
});
|
|
1212
1094
|
}, (response) => {
|
|
1213
|
-
|
|
1095
|
+
deepFreeze(response);
|
|
1096
|
+
throw response;
|
|
1214
1097
|
});
|
|
1215
1098
|
}
|
|
1216
|
-
|
|
1217
|
-
return
|
|
1099
|
+
const createLearningsAdapterFactory = (luvio) => {
|
|
1100
|
+
return function createLearnings(untrustedConfig) {
|
|
1101
|
+
const config = validateAdapterConfig$n(untrustedConfig, createLearnings_ConfigPropertyNames);
|
|
1102
|
+
// Invalid or incomplete config
|
|
1103
|
+
if (config === null) {
|
|
1104
|
+
throw new Error('Invalid config for "createLearnings"');
|
|
1105
|
+
}
|
|
1106
|
+
return buildNetworkSnapshot$n(luvio, config);
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
|
|
1110
|
+
function select$X(luvio, params) {
|
|
1111
|
+
return select$Z();
|
|
1218
1112
|
}
|
|
1219
|
-
function
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1113
|
+
function getResponseCacheKeys$m(storeKeyMap, luvio, resourceParams, response) {
|
|
1114
|
+
getTypeCacheKeys$l(storeKeyMap, luvio, response);
|
|
1115
|
+
}
|
|
1116
|
+
function ingestSuccess$m(luvio, resourceParams, response) {
|
|
1117
|
+
const { body } = response;
|
|
1118
|
+
const key = keyBuilderFromType$5(luvio, body);
|
|
1119
|
+
luvio.storeIngest(key, ingest$l, body);
|
|
1120
|
+
const snapshot = luvio.storeLookup({
|
|
1121
|
+
recordId: key,
|
|
1122
|
+
node: select$X(),
|
|
1224
1123
|
variables: {},
|
|
1225
|
-
};
|
|
1226
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
1227
|
-
config,
|
|
1228
|
-
resolve: () => buildNetworkSnapshot$n(luvio, config, snapshotRefreshOptions)
|
|
1229
1124
|
});
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
// Invalid or incomplete config
|
|
1235
|
-
if (config === null) {
|
|
1236
|
-
return null;
|
|
1125
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1126
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1127
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1128
|
+
}
|
|
1237
1129
|
}
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
}
|
|
1130
|
+
deepFreeze(snapshot.data);
|
|
1131
|
+
return snapshot;
|
|
1132
|
+
}
|
|
1133
|
+
function createResourceRequest$m(config) {
|
|
1134
|
+
const headers = {};
|
|
1135
|
+
return {
|
|
1136
|
+
baseUri: '/services/data/v62.0',
|
|
1137
|
+
basePath: '/connect/education/academic-operations/learnings',
|
|
1138
|
+
method: 'patch',
|
|
1139
|
+
body: config.body,
|
|
1140
|
+
urlParams: {},
|
|
1141
|
+
queryParams: {},
|
|
1142
|
+
headers,
|
|
1143
|
+
priority: 'normal',
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1241
1146
|
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
const path_methodName = path + '.methodName';
|
|
1257
|
-
if (typeof obj_methodName !== 'string') {
|
|
1258
|
-
return new TypeError('Expected "string" but received "' + typeof obj_methodName + '" (at "' + path_methodName + '")');
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
if (obj.methodRecordId !== undefined) {
|
|
1262
|
-
const obj_methodRecordId = obj.methodRecordId;
|
|
1263
|
-
const path_methodRecordId = path + '.methodRecordId';
|
|
1264
|
-
if (typeof obj_methodRecordId !== 'string') {
|
|
1265
|
-
return new TypeError('Expected "string" but received "' + typeof obj_methodRecordId + '" (at "' + path_methodRecordId + '")');
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
if (obj.methodType !== undefined) {
|
|
1269
|
-
const obj_methodType = obj.methodType;
|
|
1270
|
-
const path_methodType = path + '.methodType';
|
|
1271
|
-
if (typeof obj_methodType !== 'string') {
|
|
1272
|
-
return new TypeError('Expected "string" but received "' + typeof obj_methodType + '" (at "' + path_methodType + '")');
|
|
1273
|
-
}
|
|
1147
|
+
const adapterName$m = 'updateLearnings';
|
|
1148
|
+
const updateLearnings_ConfigPropertyMetadata = [
|
|
1149
|
+
generateParamConfigMetadata('learnings', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1150
|
+
];
|
|
1151
|
+
const updateLearnings_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$m, updateLearnings_ConfigPropertyMetadata);
|
|
1152
|
+
const createResourceParams$m = /*#__PURE__*/ createResourceParams$p(updateLearnings_ConfigPropertyMetadata);
|
|
1153
|
+
function typeCheckConfig$m(untrustedConfig) {
|
|
1154
|
+
const config = {};
|
|
1155
|
+
const untrustedConfig_learnings = untrustedConfig.learnings;
|
|
1156
|
+
if (ArrayIsArray$1(untrustedConfig_learnings)) {
|
|
1157
|
+
const untrustedConfig_learnings_array = [];
|
|
1158
|
+
for (let i = 0, arrayLength = untrustedConfig_learnings.length; i < arrayLength; i++) {
|
|
1159
|
+
const untrustedConfig_learnings_item = untrustedConfig_learnings[i];
|
|
1160
|
+
untrustedConfig_learnings_array.push(untrustedConfig_learnings_item);
|
|
1274
1161
|
}
|
|
1275
|
-
|
|
1276
|
-
|
|
1162
|
+
config.learnings = untrustedConfig_learnings_array;
|
|
1163
|
+
}
|
|
1164
|
+
return config;
|
|
1165
|
+
}
|
|
1166
|
+
function validateAdapterConfig$m(untrustedConfig, configPropertyNames) {
|
|
1167
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1168
|
+
return null;
|
|
1169
|
+
}
|
|
1170
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1171
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1172
|
+
}
|
|
1173
|
+
const config = typeCheckConfig$m(untrustedConfig);
|
|
1174
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1175
|
+
return null;
|
|
1176
|
+
}
|
|
1177
|
+
return config;
|
|
1178
|
+
}
|
|
1179
|
+
function buildNetworkSnapshot$m(luvio, config, options) {
|
|
1180
|
+
const resourceParams = createResourceParams$m(config);
|
|
1181
|
+
const request = createResourceRequest$m(resourceParams);
|
|
1182
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1183
|
+
.then((response) => {
|
|
1184
|
+
return luvio.handleSuccessResponse(() => {
|
|
1185
|
+
const snapshot = ingestSuccess$m(luvio, resourceParams, response);
|
|
1186
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1187
|
+
}, () => {
|
|
1188
|
+
const cache = new StoreKeyMap();
|
|
1189
|
+
getResponseCacheKeys$m(cache, luvio, resourceParams, response.body);
|
|
1190
|
+
return cache;
|
|
1191
|
+
});
|
|
1192
|
+
}, (response) => {
|
|
1193
|
+
deepFreeze(response);
|
|
1194
|
+
throw response;
|
|
1195
|
+
});
|
|
1277
1196
|
}
|
|
1197
|
+
const updateLearningsAdapterFactory = (luvio) => {
|
|
1198
|
+
return function updateLearnings(untrustedConfig) {
|
|
1199
|
+
const config = validateAdapterConfig$m(untrustedConfig, updateLearnings_ConfigPropertyNames);
|
|
1200
|
+
// Invalid or incomplete config
|
|
1201
|
+
if (config === null) {
|
|
1202
|
+
throw new Error('Invalid config for "updateLearnings"');
|
|
1203
|
+
}
|
|
1204
|
+
return buildNetworkSnapshot$m(luvio, config);
|
|
1205
|
+
};
|
|
1206
|
+
};
|
|
1278
1207
|
|
|
1279
|
-
|
|
1208
|
+
const VERSION$A = "25644bb9c14397ee2eee2a59a6de4b8c";
|
|
1209
|
+
function validate$16(obj, path = 'Applicant') {
|
|
1280
1210
|
const v_error = (() => {
|
|
1281
1211
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1282
1212
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1283
1213
|
}
|
|
1284
|
-
if (obj.
|
|
1285
|
-
const
|
|
1286
|
-
const
|
|
1287
|
-
if (
|
|
1288
|
-
return new TypeError('Expected "
|
|
1289
|
-
}
|
|
1290
|
-
for (let i = 0; i < obj_applicationRenderMethods.length; i++) {
|
|
1291
|
-
const obj_applicationRenderMethods_item = obj_applicationRenderMethods[i];
|
|
1292
|
-
const path_applicationRenderMethods_item = path_applicationRenderMethods + '[' + i + ']';
|
|
1293
|
-
const referencepath_applicationRenderMethods_itemValidationError = validate$14(obj_applicationRenderMethods_item, path_applicationRenderMethods_item);
|
|
1294
|
-
if (referencepath_applicationRenderMethods_itemValidationError !== null) {
|
|
1295
|
-
let message = 'Object doesn\'t match ApplicationRenderMethod (at "' + path_applicationRenderMethods_item + '")\n';
|
|
1296
|
-
message += referencepath_applicationRenderMethods_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1297
|
-
return new TypeError(message);
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
if (obj.dueDate !== undefined) {
|
|
1302
|
-
const obj_dueDate = obj.dueDate;
|
|
1303
|
-
const path_dueDate = path + '.dueDate';
|
|
1304
|
-
if (typeof obj_dueDate !== 'string') {
|
|
1305
|
-
return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
if (obj.id !== undefined) {
|
|
1309
|
-
const obj_id = obj.id;
|
|
1310
|
-
const path_id = path + '.id';
|
|
1311
|
-
if (typeof obj_id !== 'string') {
|
|
1312
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1214
|
+
if (obj.contactId !== undefined) {
|
|
1215
|
+
const obj_contactId = obj.contactId;
|
|
1216
|
+
const path_contactId = path + '.contactId';
|
|
1217
|
+
if (typeof obj_contactId !== 'string') {
|
|
1218
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contactId + '" (at "' + path_contactId + '")');
|
|
1313
1219
|
}
|
|
1314
1220
|
}
|
|
1315
|
-
if (obj.
|
|
1316
|
-
const
|
|
1317
|
-
const
|
|
1318
|
-
if (typeof
|
|
1319
|
-
return new TypeError('Expected "
|
|
1221
|
+
if (obj.email !== undefined) {
|
|
1222
|
+
const obj_email = obj.email;
|
|
1223
|
+
const path_email = path + '.email';
|
|
1224
|
+
if (typeof obj_email !== 'string') {
|
|
1225
|
+
return new TypeError('Expected "string" but received "' + typeof obj_email + '" (at "' + path_email + '")');
|
|
1320
1226
|
}
|
|
1321
1227
|
}
|
|
1322
1228
|
if (obj.name !== undefined) {
|
|
@@ -1326,53 +1232,100 @@ function validate$13(obj, path = 'IndividualApplicationTask') {
|
|
|
1326
1232
|
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1327
1233
|
}
|
|
1328
1234
|
}
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1235
|
+
})();
|
|
1236
|
+
return v_error === undefined ? null : v_error;
|
|
1237
|
+
}
|
|
1238
|
+
const select$W = function ApplicantSelect() {
|
|
1239
|
+
return {
|
|
1240
|
+
kind: 'Fragment',
|
|
1241
|
+
version: VERSION$A,
|
|
1242
|
+
private: [],
|
|
1243
|
+
selections: [
|
|
1244
|
+
{
|
|
1245
|
+
name: 'contactId',
|
|
1246
|
+
kind: 'Scalar',
|
|
1247
|
+
required: false
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
name: 'email',
|
|
1251
|
+
kind: 'Scalar',
|
|
1252
|
+
required: false
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
name: 'name',
|
|
1256
|
+
kind: 'Scalar',
|
|
1257
|
+
required: false
|
|
1348
1258
|
}
|
|
1259
|
+
]
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
function equals$A(existing, incoming) {
|
|
1263
|
+
const existing_contactId = existing.contactId;
|
|
1264
|
+
const incoming_contactId = incoming.contactId;
|
|
1265
|
+
// if at least one of these optionals is defined
|
|
1266
|
+
if (existing_contactId !== undefined || incoming_contactId !== undefined) {
|
|
1267
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1268
|
+
// not equal
|
|
1269
|
+
if (existing_contactId === undefined || incoming_contactId === undefined) {
|
|
1270
|
+
return false;
|
|
1349
1271
|
}
|
|
1350
|
-
if (
|
|
1351
|
-
|
|
1352
|
-
const path_stageDescription = path + '.stageDescription';
|
|
1353
|
-
if (typeof obj_stageDescription !== 'string') {
|
|
1354
|
-
return new TypeError('Expected "string" but received "' + typeof obj_stageDescription + '" (at "' + path_stageDescription + '")');
|
|
1355
|
-
}
|
|
1272
|
+
if (!(existing_contactId === incoming_contactId)) {
|
|
1273
|
+
return false;
|
|
1356
1274
|
}
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1275
|
+
}
|
|
1276
|
+
const existing_email = existing.email;
|
|
1277
|
+
const incoming_email = incoming.email;
|
|
1278
|
+
// if at least one of these optionals is defined
|
|
1279
|
+
if (existing_email !== undefined || incoming_email !== undefined) {
|
|
1280
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1281
|
+
// not equal
|
|
1282
|
+
if (existing_email === undefined || incoming_email === undefined) {
|
|
1283
|
+
return false;
|
|
1284
|
+
}
|
|
1285
|
+
if (!(existing_email === incoming_email)) {
|
|
1286
|
+
return false;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
const existing_name = existing.name;
|
|
1290
|
+
const incoming_name = incoming.name;
|
|
1291
|
+
// if at least one of these optionals is defined
|
|
1292
|
+
if (existing_name !== undefined || incoming_name !== undefined) {
|
|
1293
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
1294
|
+
// not equal
|
|
1295
|
+
if (existing_name === undefined || incoming_name === undefined) {
|
|
1296
|
+
return false;
|
|
1297
|
+
}
|
|
1298
|
+
if (!(existing_name === incoming_name)) {
|
|
1299
|
+
return false;
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
return true;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
function validate$15(obj, path = 'Submitter') {
|
|
1306
|
+
const v_error = (() => {
|
|
1307
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1308
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1309
|
+
}
|
|
1310
|
+
if (obj.contactId !== undefined) {
|
|
1311
|
+
const obj_contactId = obj.contactId;
|
|
1312
|
+
const path_contactId = path + '.contactId';
|
|
1313
|
+
if (typeof obj_contactId !== 'string') {
|
|
1314
|
+
return new TypeError('Expected "string" but received "' + typeof obj_contactId + '" (at "' + path_contactId + '")');
|
|
1362
1315
|
}
|
|
1363
1316
|
}
|
|
1364
|
-
if (obj.
|
|
1365
|
-
const
|
|
1366
|
-
const
|
|
1367
|
-
if (typeof
|
|
1368
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1317
|
+
if (obj.name !== undefined) {
|
|
1318
|
+
const obj_name = obj.name;
|
|
1319
|
+
const path_name = path + '.name';
|
|
1320
|
+
if (typeof obj_name !== 'string') {
|
|
1321
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1369
1322
|
}
|
|
1370
1323
|
}
|
|
1371
1324
|
})();
|
|
1372
1325
|
return v_error === undefined ? null : v_error;
|
|
1373
1326
|
}
|
|
1374
1327
|
|
|
1375
|
-
function validate$
|
|
1328
|
+
function validate$14(obj, path = 'Application') {
|
|
1376
1329
|
const v_error = (() => {
|
|
1377
1330
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1378
1331
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1387,7 +1340,7 @@ function validate$12(obj, path = 'GetApplicationDetailsResult') {
|
|
|
1387
1340
|
if (obj.applicant !== undefined) {
|
|
1388
1341
|
const obj_applicant = obj.applicant;
|
|
1389
1342
|
const path_applicant = path + '.applicant';
|
|
1390
|
-
const referencepath_applicantValidationError = validate$
|
|
1343
|
+
const referencepath_applicantValidationError = validate$16(obj_applicant, path_applicant);
|
|
1391
1344
|
if (referencepath_applicantValidationError !== null) {
|
|
1392
1345
|
let message = 'Object doesn\'t match Applicant (at "' + path_applicant + '")\n';
|
|
1393
1346
|
message += referencepath_applicantValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1422,23 +1375,6 @@ function validate$12(obj, path = 'GetApplicationDetailsResult') {
|
|
|
1422
1375
|
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1423
1376
|
}
|
|
1424
1377
|
}
|
|
1425
|
-
if (obj.individualApplicationTasks !== undefined) {
|
|
1426
|
-
const obj_individualApplicationTasks = obj.individualApplicationTasks;
|
|
1427
|
-
const path_individualApplicationTasks = path + '.individualApplicationTasks';
|
|
1428
|
-
if (!ArrayIsArray(obj_individualApplicationTasks)) {
|
|
1429
|
-
return new TypeError('Expected "array" but received "' + typeof obj_individualApplicationTasks + '" (at "' + path_individualApplicationTasks + '")');
|
|
1430
|
-
}
|
|
1431
|
-
for (let i = 0; i < obj_individualApplicationTasks.length; i++) {
|
|
1432
|
-
const obj_individualApplicationTasks_item = obj_individualApplicationTasks[i];
|
|
1433
|
-
const path_individualApplicationTasks_item = path_individualApplicationTasks + '[' + i + ']';
|
|
1434
|
-
const referencepath_individualApplicationTasks_itemValidationError = validate$13(obj_individualApplicationTasks_item, path_individualApplicationTasks_item);
|
|
1435
|
-
if (referencepath_individualApplicationTasks_itemValidationError !== null) {
|
|
1436
|
-
let message = 'Object doesn\'t match IndividualApplicationTask (at "' + path_individualApplicationTasks_item + '")\n';
|
|
1437
|
-
message += referencepath_individualApplicationTasks_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1438
|
-
return new TypeError(message);
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
}
|
|
1442
1378
|
if (obj.programName !== undefined) {
|
|
1443
1379
|
const obj_programName = obj.programName;
|
|
1444
1380
|
const path_programName = path + '.programName';
|
|
@@ -1463,7 +1399,7 @@ function validate$12(obj, path = 'GetApplicationDetailsResult') {
|
|
|
1463
1399
|
if (obj.submitter !== undefined) {
|
|
1464
1400
|
const obj_submitter = obj.submitter;
|
|
1465
1401
|
const path_submitter = path + '.submitter';
|
|
1466
|
-
const referencepath_submitterValidationError = validate$
|
|
1402
|
+
const referencepath_submitterValidationError = validate$15(obj_submitter, path_submitter);
|
|
1467
1403
|
if (referencepath_submitterValidationError !== null) {
|
|
1468
1404
|
let message = 'Object doesn\'t match Submitter (at "' + path_submitter + '")\n';
|
|
1469
1405
|
message += referencepath_submitterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1488,9 +1424,35 @@ function validate$12(obj, path = 'GetApplicationDetailsResult') {
|
|
|
1488
1424
|
return v_error === undefined ? null : v_error;
|
|
1489
1425
|
}
|
|
1490
1426
|
|
|
1427
|
+
function validate$13(obj, path = 'GetApplicationsResult') {
|
|
1428
|
+
const v_error = (() => {
|
|
1429
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1430
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1431
|
+
}
|
|
1432
|
+
if (obj.applications !== undefined) {
|
|
1433
|
+
const obj_applications = obj.applications;
|
|
1434
|
+
const path_applications = path + '.applications';
|
|
1435
|
+
if (!ArrayIsArray(obj_applications)) {
|
|
1436
|
+
return new TypeError('Expected "array" but received "' + typeof obj_applications + '" (at "' + path_applications + '")');
|
|
1437
|
+
}
|
|
1438
|
+
for (let i = 0; i < obj_applications.length; i++) {
|
|
1439
|
+
const obj_applications_item = obj_applications[i];
|
|
1440
|
+
const path_applications_item = path_applications + '[' + i + ']';
|
|
1441
|
+
const referencepath_applications_itemValidationError = validate$14(obj_applications_item, path_applications_item);
|
|
1442
|
+
if (referencepath_applications_itemValidationError !== null) {
|
|
1443
|
+
let message = 'Object doesn\'t match Application (at "' + path_applications_item + '")\n';
|
|
1444
|
+
message += referencepath_applications_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1445
|
+
return new TypeError(message);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
})();
|
|
1450
|
+
return v_error === undefined ? null : v_error;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1491
1453
|
const TTL$7 = 100;
|
|
1492
|
-
const VERSION$z = "
|
|
1493
|
-
function validate$
|
|
1454
|
+
const VERSION$z = "1947ca622740f63d1812cfa7d4dd5989";
|
|
1455
|
+
function validate$12(obj, path = 'ApplicationsOutputRepresentation') {
|
|
1494
1456
|
const v_error = (() => {
|
|
1495
1457
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1496
1458
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1498,9 +1460,9 @@ function validate$11(obj, path = 'ApplicationDetailsOutputRepresentation') {
|
|
|
1498
1460
|
if (obj.result !== undefined) {
|
|
1499
1461
|
const obj_result = obj.result;
|
|
1500
1462
|
const path_result = path + '.result';
|
|
1501
|
-
const referencepath_resultValidationError = validate$
|
|
1463
|
+
const referencepath_resultValidationError = validate$13(obj_result, path_result);
|
|
1502
1464
|
if (referencepath_resultValidationError !== null) {
|
|
1503
|
-
let message = 'Object doesn\'t match
|
|
1465
|
+
let message = 'Object doesn\'t match GetApplicationsResult (at "' + path_result + '")\n';
|
|
1504
1466
|
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1505
1467
|
return new TypeError(message);
|
|
1506
1468
|
}
|
|
@@ -1508,11 +1470,11 @@ function validate$11(obj, path = 'ApplicationDetailsOutputRepresentation') {
|
|
|
1508
1470
|
})();
|
|
1509
1471
|
return v_error === undefined ? null : v_error;
|
|
1510
1472
|
}
|
|
1511
|
-
const RepresentationType$k = '
|
|
1473
|
+
const RepresentationType$k = 'ApplicationsOutputRepresentation';
|
|
1512
1474
|
function normalize$k(input, existing, path, luvio, store, timestamp) {
|
|
1513
1475
|
return input;
|
|
1514
1476
|
}
|
|
1515
|
-
const select$
|
|
1477
|
+
const select$V = function ApplicationsOutputRepresentationSelect() {
|
|
1516
1478
|
return {
|
|
1517
1479
|
kind: 'Fragment',
|
|
1518
1480
|
version: VERSION$z,
|
|
@@ -1526,9 +1488,9 @@ function equals$z(existing, incoming) {
|
|
|
1526
1488
|
}
|
|
1527
1489
|
return true;
|
|
1528
1490
|
}
|
|
1529
|
-
const ingest$k = function
|
|
1491
|
+
const ingest$k = function ApplicationsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1530
1492
|
if (process.env.NODE_ENV !== 'production') {
|
|
1531
|
-
const validateError = validate$
|
|
1493
|
+
const validateError = validate$12(input);
|
|
1532
1494
|
if (validateError !== null) {
|
|
1533
1495
|
throw validateError;
|
|
1534
1496
|
}
|
|
@@ -1548,22 +1510,22 @@ function getTypeCacheKeys$k(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1548
1510
|
});
|
|
1549
1511
|
}
|
|
1550
1512
|
|
|
1551
|
-
function select$
|
|
1552
|
-
return select$
|
|
1513
|
+
function select$U(luvio, params) {
|
|
1514
|
+
return select$V();
|
|
1553
1515
|
}
|
|
1554
|
-
function keyBuilder$
|
|
1555
|
-
return keyPrefix + '::
|
|
1516
|
+
function keyBuilder$A(luvio, params) {
|
|
1517
|
+
return keyPrefix + '::ApplicationsOutputRepresentation:(' + ')';
|
|
1556
1518
|
}
|
|
1557
|
-
function getResponseCacheKeys$
|
|
1558
|
-
getTypeCacheKeys$k(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1519
|
+
function getResponseCacheKeys$l(storeKeyMap, luvio, resourceParams, response) {
|
|
1520
|
+
getTypeCacheKeys$k(storeKeyMap, luvio, response, () => keyBuilder$A());
|
|
1559
1521
|
}
|
|
1560
|
-
function ingestSuccess$
|
|
1522
|
+
function ingestSuccess$l(luvio, resourceParams, response, snapshotRefresh) {
|
|
1561
1523
|
const { body } = response;
|
|
1562
|
-
const key = keyBuilder$
|
|
1524
|
+
const key = keyBuilder$A();
|
|
1563
1525
|
luvio.storeIngest(key, ingest$k, body);
|
|
1564
1526
|
const snapshot = luvio.storeLookup({
|
|
1565
1527
|
recordId: key,
|
|
1566
|
-
node: select$
|
|
1528
|
+
node: select$U(),
|
|
1567
1529
|
variables: {},
|
|
1568
1530
|
}, snapshotRefresh);
|
|
1569
1531
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1574,8 +1536,8 @@ function ingestSuccess$m(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1574
1536
|
deepFreeze(snapshot.data);
|
|
1575
1537
|
return snapshot;
|
|
1576
1538
|
}
|
|
1577
|
-
function ingestError$
|
|
1578
|
-
const key = keyBuilder$
|
|
1539
|
+
function ingestError$f(luvio, params, error, snapshotRefresh) {
|
|
1540
|
+
const key = keyBuilder$A();
|
|
1579
1541
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1580
1542
|
const storeMetadataParams = {
|
|
1581
1543
|
ttl: TTL$7,
|
|
@@ -1586,359 +1548,400 @@ function ingestError$e(luvio, params, error, snapshotRefresh) {
|
|
|
1586
1548
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1587
1549
|
return errorSnapshot;
|
|
1588
1550
|
}
|
|
1589
|
-
function createResourceRequest$
|
|
1551
|
+
function createResourceRequest$l(config) {
|
|
1590
1552
|
const headers = {};
|
|
1591
1553
|
return {
|
|
1592
1554
|
baseUri: '/services/data/v62.0',
|
|
1593
|
-
basePath: '/connect/education/applications
|
|
1555
|
+
basePath: '/connect/education/applications',
|
|
1594
1556
|
method: 'get',
|
|
1595
1557
|
body: null,
|
|
1596
|
-
urlParams:
|
|
1558
|
+
urlParams: {},
|
|
1597
1559
|
queryParams: {},
|
|
1598
1560
|
headers,
|
|
1599
1561
|
priority: 'normal',
|
|
1600
1562
|
};
|
|
1601
1563
|
}
|
|
1602
1564
|
|
|
1603
|
-
const adapterName$
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
const resourceParams = createResourceParams$m(config);
|
|
1611
|
-
return keyBuilder$z(luvio, resourceParams);
|
|
1565
|
+
const adapterName$l = 'getApplications';
|
|
1566
|
+
const getApplications_ConfigPropertyMetadata = [];
|
|
1567
|
+
const getApplications_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$l, getApplications_ConfigPropertyMetadata);
|
|
1568
|
+
const createResourceParams$l = /*#__PURE__*/ createResourceParams$p(getApplications_ConfigPropertyMetadata);
|
|
1569
|
+
function keyBuilder$z(luvio, config) {
|
|
1570
|
+
createResourceParams$l(config);
|
|
1571
|
+
return keyBuilder$A();
|
|
1612
1572
|
}
|
|
1613
|
-
function typeCheckConfig$
|
|
1573
|
+
function typeCheckConfig$l(untrustedConfig) {
|
|
1614
1574
|
const config = {};
|
|
1615
|
-
typeCheckConfig$p(untrustedConfig, config, getApplicationDetails_ConfigPropertyMetadata);
|
|
1616
1575
|
return config;
|
|
1617
1576
|
}
|
|
1618
|
-
function validateAdapterConfig$
|
|
1577
|
+
function validateAdapterConfig$l(untrustedConfig, configPropertyNames) {
|
|
1619
1578
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1620
1579
|
return null;
|
|
1621
1580
|
}
|
|
1622
1581
|
if (process.env.NODE_ENV !== 'production') {
|
|
1623
1582
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1624
1583
|
}
|
|
1625
|
-
const config = typeCheckConfig$
|
|
1584
|
+
const config = typeCheckConfig$l();
|
|
1626
1585
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1627
1586
|
return null;
|
|
1628
1587
|
}
|
|
1629
1588
|
return config;
|
|
1630
1589
|
}
|
|
1631
|
-
function adapterFragment$
|
|
1632
|
-
createResourceParams$
|
|
1633
|
-
return select$
|
|
1590
|
+
function adapterFragment$f(luvio, config) {
|
|
1591
|
+
createResourceParams$l(config);
|
|
1592
|
+
return select$U();
|
|
1634
1593
|
}
|
|
1635
|
-
function onFetchResponseSuccess$
|
|
1636
|
-
const snapshot = ingestSuccess$
|
|
1594
|
+
function onFetchResponseSuccess$f(luvio, config, resourceParams, response) {
|
|
1595
|
+
const snapshot = ingestSuccess$l(luvio, resourceParams, response, {
|
|
1637
1596
|
config,
|
|
1638
|
-
resolve: () => buildNetworkSnapshot$
|
|
1597
|
+
resolve: () => buildNetworkSnapshot$l(luvio, config, snapshotRefreshOptions)
|
|
1639
1598
|
});
|
|
1640
1599
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1641
1600
|
}
|
|
1642
|
-
function onFetchResponseError$
|
|
1643
|
-
const snapshot = ingestError$
|
|
1601
|
+
function onFetchResponseError$f(luvio, config, resourceParams, response) {
|
|
1602
|
+
const snapshot = ingestError$f(luvio, resourceParams, response, {
|
|
1644
1603
|
config,
|
|
1645
|
-
resolve: () => buildNetworkSnapshot$
|
|
1604
|
+
resolve: () => buildNetworkSnapshot$l(luvio, config, snapshotRefreshOptions)
|
|
1646
1605
|
});
|
|
1647
1606
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1648
1607
|
}
|
|
1649
|
-
function buildNetworkSnapshot$
|
|
1650
|
-
const resourceParams = createResourceParams$
|
|
1651
|
-
const request = createResourceRequest$
|
|
1608
|
+
function buildNetworkSnapshot$l(luvio, config, options) {
|
|
1609
|
+
const resourceParams = createResourceParams$l(config);
|
|
1610
|
+
const request = createResourceRequest$l();
|
|
1652
1611
|
return luvio.dispatchResourceRequest(request, options)
|
|
1653
1612
|
.then((response) => {
|
|
1654
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1613
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$f(luvio, config, resourceParams, response), () => {
|
|
1655
1614
|
const cache = new StoreKeyMap();
|
|
1656
|
-
getResponseCacheKeys$
|
|
1615
|
+
getResponseCacheKeys$l(cache, luvio, resourceParams, response.body);
|
|
1657
1616
|
return cache;
|
|
1658
1617
|
});
|
|
1659
1618
|
}, (response) => {
|
|
1660
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1619
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$f(luvio, config, resourceParams, response));
|
|
1661
1620
|
});
|
|
1662
1621
|
}
|
|
1663
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1664
|
-
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
1622
|
+
function buildNetworkSnapshotCachePolicy$f(context, coercedAdapterRequestContext) {
|
|
1623
|
+
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$l, undefined, false);
|
|
1665
1624
|
}
|
|
1666
|
-
function buildCachedSnapshotCachePolicy$
|
|
1625
|
+
function buildCachedSnapshotCachePolicy$f(context, storeLookup) {
|
|
1667
1626
|
const { luvio, config } = context;
|
|
1668
1627
|
const selector = {
|
|
1669
|
-
recordId: keyBuilder$
|
|
1670
|
-
node: adapterFragment$
|
|
1628
|
+
recordId: keyBuilder$z(luvio, config),
|
|
1629
|
+
node: adapterFragment$f(luvio, config),
|
|
1671
1630
|
variables: {},
|
|
1672
1631
|
};
|
|
1673
1632
|
const cacheSnapshot = storeLookup(selector, {
|
|
1674
1633
|
config,
|
|
1675
|
-
resolve: () => buildNetworkSnapshot$
|
|
1634
|
+
resolve: () => buildNetworkSnapshot$l(luvio, config, snapshotRefreshOptions)
|
|
1676
1635
|
});
|
|
1677
1636
|
return cacheSnapshot;
|
|
1678
1637
|
}
|
|
1679
|
-
const
|
|
1680
|
-
const config = validateAdapterConfig$
|
|
1638
|
+
const getApplicationsAdapterFactory = (luvio) => function education__getApplications(untrustedConfig, requestContext) {
|
|
1639
|
+
const config = validateAdapterConfig$l(untrustedConfig, getApplications_ConfigPropertyNames);
|
|
1681
1640
|
// Invalid or incomplete config
|
|
1682
1641
|
if (config === null) {
|
|
1683
1642
|
return null;
|
|
1684
1643
|
}
|
|
1685
1644
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1686
|
-
buildCachedSnapshotCachePolicy$
|
|
1645
|
+
buildCachedSnapshotCachePolicy$f, buildNetworkSnapshotCachePolicy$f);
|
|
1687
1646
|
};
|
|
1688
1647
|
|
|
1689
|
-
function validate$
|
|
1648
|
+
function validate$11(obj, path = 'ApplicationRenderMethod') {
|
|
1690
1649
|
const v_error = (() => {
|
|
1691
1650
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1692
1651
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1693
1652
|
}
|
|
1694
|
-
if (obj.
|
|
1695
|
-
const
|
|
1696
|
-
const
|
|
1697
|
-
if (typeof
|
|
1698
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1653
|
+
if (obj.id !== undefined) {
|
|
1654
|
+
const obj_id = obj.id;
|
|
1655
|
+
const path_id = path + '.id';
|
|
1656
|
+
if (typeof obj_id !== 'string') {
|
|
1657
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1699
1658
|
}
|
|
1700
1659
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
for (let i = 0; i < obj_engagementChannelTypeIds.length; i++) {
|
|
1707
|
-
const obj_engagementChannelTypeIds_item = obj_engagementChannelTypeIds[i];
|
|
1708
|
-
const path_engagementChannelTypeIds_item = path_engagementChannelTypeIds + '[' + i + ']';
|
|
1709
|
-
if (typeof obj_engagementChannelTypeIds_item !== 'string') {
|
|
1710
|
-
return new TypeError('Expected "string" but received "' + typeof obj_engagementChannelTypeIds_item + '" (at "' + path_engagementChannelTypeIds_item + '")');
|
|
1660
|
+
if (obj.methodName !== undefined) {
|
|
1661
|
+
const obj_methodName = obj.methodName;
|
|
1662
|
+
const path_methodName = path + '.methodName';
|
|
1663
|
+
if (typeof obj_methodName !== 'string') {
|
|
1664
|
+
return new TypeError('Expected "string" but received "' + typeof obj_methodName + '" (at "' + path_methodName + '")');
|
|
1711
1665
|
}
|
|
1712
1666
|
}
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
for (let i = 0; i < obj_serviceResourceIds.length; i++) {
|
|
1719
|
-
const obj_serviceResourceIds_item = obj_serviceResourceIds[i];
|
|
1720
|
-
const path_serviceResourceIds_item = path_serviceResourceIds + '[' + i + ']';
|
|
1721
|
-
if (typeof obj_serviceResourceIds_item !== 'string') {
|
|
1722
|
-
return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceIds_item + '" (at "' + path_serviceResourceIds_item + '")');
|
|
1667
|
+
if (obj.methodRecordId !== undefined) {
|
|
1668
|
+
const obj_methodRecordId = obj.methodRecordId;
|
|
1669
|
+
const path_methodRecordId = path + '.methodRecordId';
|
|
1670
|
+
if (typeof obj_methodRecordId !== 'string') {
|
|
1671
|
+
return new TypeError('Expected "string" but received "' + typeof obj_methodRecordId + '" (at "' + path_methodRecordId + '")');
|
|
1723
1672
|
}
|
|
1724
1673
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
const obj_serviceTerritoryIds_item = obj_serviceTerritoryIds[i];
|
|
1732
|
-
const path_serviceTerritoryIds_item = path_serviceTerritoryIds + '[' + i + ']';
|
|
1733
|
-
if (typeof obj_serviceTerritoryIds_item !== 'string') {
|
|
1734
|
-
return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryIds_item + '" (at "' + path_serviceTerritoryIds_item + '")');
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
if (obj.startTime !== undefined) {
|
|
1738
|
-
const obj_startTime = obj.startTime;
|
|
1739
|
-
const path_startTime = path + '.startTime';
|
|
1740
|
-
if (typeof obj_startTime !== 'string') {
|
|
1741
|
-
return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
const obj_workTypeGroupId = obj.workTypeGroupId;
|
|
1745
|
-
const path_workTypeGroupId = path + '.workTypeGroupId';
|
|
1746
|
-
if (typeof obj_workTypeGroupId !== 'string') {
|
|
1747
|
-
return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
|
|
1674
|
+
if (obj.methodType !== undefined) {
|
|
1675
|
+
const obj_methodType = obj.methodType;
|
|
1676
|
+
const path_methodType = path + '.methodType';
|
|
1677
|
+
if (typeof obj_methodType !== 'string') {
|
|
1678
|
+
return new TypeError('Expected "string" but received "' + typeof obj_methodType + '" (at "' + path_methodType + '")');
|
|
1679
|
+
}
|
|
1748
1680
|
}
|
|
1749
1681
|
})();
|
|
1750
1682
|
return v_error === undefined ? null : v_error;
|
|
1751
1683
|
}
|
|
1752
1684
|
|
|
1753
|
-
|
|
1754
|
-
function validate$$(obj, path = 'TimeSlot') {
|
|
1685
|
+
function validate$10(obj, path = 'IndividualApplicationTask') {
|
|
1755
1686
|
const v_error = (() => {
|
|
1756
1687
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1757
1688
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1758
1689
|
}
|
|
1759
|
-
if (obj.
|
|
1760
|
-
const
|
|
1761
|
-
const
|
|
1762
|
-
if (
|
|
1763
|
-
return new TypeError('Expected "
|
|
1690
|
+
if (obj.applicationRenderMethods !== undefined) {
|
|
1691
|
+
const obj_applicationRenderMethods = obj.applicationRenderMethods;
|
|
1692
|
+
const path_applicationRenderMethods = path + '.applicationRenderMethods';
|
|
1693
|
+
if (!ArrayIsArray(obj_applicationRenderMethods)) {
|
|
1694
|
+
return new TypeError('Expected "array" but received "' + typeof obj_applicationRenderMethods + '" (at "' + path_applicationRenderMethods + '")');
|
|
1764
1695
|
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1696
|
+
for (let i = 0; i < obj_applicationRenderMethods.length; i++) {
|
|
1697
|
+
const obj_applicationRenderMethods_item = obj_applicationRenderMethods[i];
|
|
1698
|
+
const path_applicationRenderMethods_item = path_applicationRenderMethods + '[' + i + ']';
|
|
1699
|
+
const referencepath_applicationRenderMethods_itemValidationError = validate$11(obj_applicationRenderMethods_item, path_applicationRenderMethods_item);
|
|
1700
|
+
if (referencepath_applicationRenderMethods_itemValidationError !== null) {
|
|
1701
|
+
let message = 'Object doesn\'t match ApplicationRenderMethod (at "' + path_applicationRenderMethods_item + '")\n';
|
|
1702
|
+
message += referencepath_applicationRenderMethods_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1703
|
+
return new TypeError(message);
|
|
1704
|
+
}
|
|
1771
1705
|
}
|
|
1772
1706
|
}
|
|
1773
|
-
if (obj.
|
|
1774
|
-
const
|
|
1775
|
-
const
|
|
1776
|
-
if (typeof
|
|
1777
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1707
|
+
if (obj.dueDate !== undefined) {
|
|
1708
|
+
const obj_dueDate = obj.dueDate;
|
|
1709
|
+
const path_dueDate = path + '.dueDate';
|
|
1710
|
+
if (typeof obj_dueDate !== 'string') {
|
|
1711
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
|
|
1778
1712
|
}
|
|
1779
1713
|
}
|
|
1780
|
-
if (obj.
|
|
1781
|
-
const
|
|
1782
|
-
const
|
|
1783
|
-
if (typeof
|
|
1784
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1714
|
+
if (obj.id !== undefined) {
|
|
1715
|
+
const obj_id = obj.id;
|
|
1716
|
+
const path_id = path + '.id';
|
|
1717
|
+
if (typeof obj_id !== 'string') {
|
|
1718
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1785
1719
|
}
|
|
1786
1720
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
kind: 'Fragment',
|
|
1793
|
-
version: VERSION$y,
|
|
1794
|
-
private: [],
|
|
1795
|
-
selections: [
|
|
1796
|
-
{
|
|
1797
|
-
name: 'endTime',
|
|
1798
|
-
kind: 'Scalar',
|
|
1799
|
-
required: false
|
|
1800
|
-
},
|
|
1801
|
-
{
|
|
1802
|
-
name: 'serviceResourceId',
|
|
1803
|
-
kind: 'Scalar',
|
|
1804
|
-
required: false
|
|
1805
|
-
},
|
|
1806
|
-
{
|
|
1807
|
-
name: 'serviceTerritoryId',
|
|
1808
|
-
kind: 'Scalar',
|
|
1809
|
-
required: false
|
|
1810
|
-
},
|
|
1811
|
-
{
|
|
1812
|
-
name: 'startTime',
|
|
1813
|
-
kind: 'Scalar',
|
|
1814
|
-
required: false
|
|
1721
|
+
if (obj.isRequired !== undefined) {
|
|
1722
|
+
const obj_isRequired = obj.isRequired;
|
|
1723
|
+
const path_isRequired = path + '.isRequired';
|
|
1724
|
+
if (typeof obj_isRequired !== 'boolean') {
|
|
1725
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
|
|
1815
1726
|
}
|
|
1816
|
-
]
|
|
1817
|
-
};
|
|
1818
|
-
};
|
|
1819
|
-
function equals$y(existing, incoming) {
|
|
1820
|
-
const existing_endTime = existing.endTime;
|
|
1821
|
-
const incoming_endTime = incoming.endTime;
|
|
1822
|
-
// if at least one of these optionals is defined
|
|
1823
|
-
if (existing_endTime !== undefined || incoming_endTime !== undefined) {
|
|
1824
|
-
// if one of these is not defined we know the other is defined and therefore
|
|
1825
|
-
// not equal
|
|
1826
|
-
if (existing_endTime === undefined || incoming_endTime === undefined) {
|
|
1827
|
-
return false;
|
|
1828
1727
|
}
|
|
1829
|
-
if (
|
|
1830
|
-
|
|
1728
|
+
if (obj.name !== undefined) {
|
|
1729
|
+
const obj_name = obj.name;
|
|
1730
|
+
const path_name = path + '.name';
|
|
1731
|
+
if (typeof obj_name !== 'string') {
|
|
1732
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1733
|
+
}
|
|
1831
1734
|
}
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
// not equal
|
|
1839
|
-
if (existing_serviceResourceId === undefined || incoming_serviceResourceId === undefined) {
|
|
1840
|
-
return false;
|
|
1735
|
+
if (obj.renderMethodName !== undefined) {
|
|
1736
|
+
const obj_renderMethodName = obj.renderMethodName;
|
|
1737
|
+
const path_renderMethodName = path + '.renderMethodName';
|
|
1738
|
+
if (typeof obj_renderMethodName !== 'string') {
|
|
1739
|
+
return new TypeError('Expected "string" but received "' + typeof obj_renderMethodName + '" (at "' + path_renderMethodName + '")');
|
|
1740
|
+
}
|
|
1841
1741
|
}
|
|
1842
|
-
if (
|
|
1843
|
-
|
|
1742
|
+
if (obj.renderMethodRecordId !== undefined) {
|
|
1743
|
+
const obj_renderMethodRecordId = obj.renderMethodRecordId;
|
|
1744
|
+
const path_renderMethodRecordId = path + '.renderMethodRecordId';
|
|
1745
|
+
if (typeof obj_renderMethodRecordId !== 'string') {
|
|
1746
|
+
return new TypeError('Expected "string" but received "' + typeof obj_renderMethodRecordId + '" (at "' + path_renderMethodRecordId + '")');
|
|
1747
|
+
}
|
|
1844
1748
|
}
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
// not equal
|
|
1852
|
-
if (existing_serviceTerritoryId === undefined || incoming_serviceTerritoryId === undefined) {
|
|
1853
|
-
return false;
|
|
1749
|
+
if (obj.renderMethodType !== undefined) {
|
|
1750
|
+
const obj_renderMethodType = obj.renderMethodType;
|
|
1751
|
+
const path_renderMethodType = path + '.renderMethodType';
|
|
1752
|
+
if (typeof obj_renderMethodType !== 'string') {
|
|
1753
|
+
return new TypeError('Expected "string" but received "' + typeof obj_renderMethodType + '" (at "' + path_renderMethodType + '")');
|
|
1754
|
+
}
|
|
1854
1755
|
}
|
|
1855
|
-
if (
|
|
1856
|
-
|
|
1756
|
+
if (obj.stageDescription !== undefined) {
|
|
1757
|
+
const obj_stageDescription = obj.stageDescription;
|
|
1758
|
+
const path_stageDescription = path + '.stageDescription';
|
|
1759
|
+
if (typeof obj_stageDescription !== 'string') {
|
|
1760
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stageDescription + '" (at "' + path_stageDescription + '")');
|
|
1761
|
+
}
|
|
1857
1762
|
}
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
// not equal
|
|
1865
|
-
if (existing_startTime === undefined || incoming_startTime === undefined) {
|
|
1866
|
-
return false;
|
|
1763
|
+
if (obj.stageName !== undefined) {
|
|
1764
|
+
const obj_stageName = obj.stageName;
|
|
1765
|
+
const path_stageName = path + '.stageName';
|
|
1766
|
+
if (typeof obj_stageName !== 'string') {
|
|
1767
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stageName + '" (at "' + path_stageName + '")');
|
|
1768
|
+
}
|
|
1867
1769
|
}
|
|
1868
|
-
if (
|
|
1869
|
-
|
|
1770
|
+
if (obj.status !== undefined) {
|
|
1771
|
+
const obj_status = obj.status;
|
|
1772
|
+
const path_status = path + '.status';
|
|
1773
|
+
if (typeof obj_status !== 'string') {
|
|
1774
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1775
|
+
}
|
|
1870
1776
|
}
|
|
1871
|
-
}
|
|
1872
|
-
return
|
|
1777
|
+
})();
|
|
1778
|
+
return v_error === undefined ? null : v_error;
|
|
1873
1779
|
}
|
|
1874
1780
|
|
|
1875
|
-
|
|
1876
|
-
function validate$_(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
|
|
1781
|
+
function validate$$(obj, path = 'GetApplicationDetailsResult') {
|
|
1877
1782
|
const v_error = (() => {
|
|
1878
1783
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1879
1784
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1880
1785
|
}
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1786
|
+
if (obj.academicLevel !== undefined) {
|
|
1787
|
+
const obj_academicLevel = obj.academicLevel;
|
|
1788
|
+
const path_academicLevel = path + '.academicLevel';
|
|
1789
|
+
if (typeof obj_academicLevel !== 'string') {
|
|
1790
|
+
return new TypeError('Expected "string" but received "' + typeof obj_academicLevel + '" (at "' + path_academicLevel + '")');
|
|
1791
|
+
}
|
|
1885
1792
|
}
|
|
1886
|
-
|
|
1887
|
-
const
|
|
1888
|
-
const
|
|
1889
|
-
const
|
|
1890
|
-
if (
|
|
1891
|
-
let message = 'Object doesn\'t match
|
|
1892
|
-
message +=
|
|
1793
|
+
if (obj.applicant !== undefined) {
|
|
1794
|
+
const obj_applicant = obj.applicant;
|
|
1795
|
+
const path_applicant = path + '.applicant';
|
|
1796
|
+
const referencepath_applicantValidationError = validate$16(obj_applicant, path_applicant);
|
|
1797
|
+
if (referencepath_applicantValidationError !== null) {
|
|
1798
|
+
let message = 'Object doesn\'t match Applicant (at "' + path_applicant + '")\n';
|
|
1799
|
+
message += referencepath_applicantValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1893
1800
|
return new TypeError(message);
|
|
1894
1801
|
}
|
|
1895
1802
|
}
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
return input;
|
|
1902
|
-
}
|
|
1903
|
-
const select$T = function AvailableTimeSlotsOuputRepresentationSelect() {
|
|
1904
|
-
const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$U();
|
|
1905
|
-
return {
|
|
1906
|
-
kind: 'Fragment',
|
|
1907
|
-
version: VERSION$x,
|
|
1908
|
-
private: [],
|
|
1909
|
-
selections: [
|
|
1910
|
-
{
|
|
1911
|
-
name: 'timeSlots',
|
|
1912
|
-
kind: 'Object',
|
|
1913
|
-
plural: true,
|
|
1914
|
-
selections: TimeSlot__selections
|
|
1803
|
+
if (obj.applicationCategory !== undefined) {
|
|
1804
|
+
const obj_applicationCategory = obj.applicationCategory;
|
|
1805
|
+
const path_applicationCategory = path + '.applicationCategory';
|
|
1806
|
+
if (typeof obj_applicationCategory !== 'string') {
|
|
1807
|
+
return new TypeError('Expected "string" but received "' + typeof obj_applicationCategory + '" (at "' + path_applicationCategory + '")');
|
|
1915
1808
|
}
|
|
1916
|
-
]
|
|
1917
|
-
};
|
|
1918
|
-
};
|
|
1919
|
-
function equals$x(existing, incoming) {
|
|
1920
|
-
const existing_timeSlots = existing.timeSlots;
|
|
1921
|
-
const incoming_timeSlots = incoming.timeSlots;
|
|
1922
|
-
const equals_timeSlots_items = equalsArray(existing_timeSlots, incoming_timeSlots, (existing_timeSlots_item, incoming_timeSlots_item) => {
|
|
1923
|
-
if (!(equals$y(existing_timeSlots_item, incoming_timeSlots_item))) {
|
|
1924
|
-
return false;
|
|
1925
1809
|
}
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
}
|
|
1932
|
-
const ingest$j = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1933
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1934
|
-
const validateError = validate$_(input);
|
|
1935
|
-
if (validateError !== null) {
|
|
1936
|
-
throw validateError;
|
|
1810
|
+
if (obj.applicationCloseDate !== undefined) {
|
|
1811
|
+
const obj_applicationCloseDate = obj.applicationCloseDate;
|
|
1812
|
+
const path_applicationCloseDate = path + '.applicationCloseDate';
|
|
1813
|
+
if (typeof obj_applicationCloseDate !== 'string') {
|
|
1814
|
+
return new TypeError('Expected "string" but received "' + typeof obj_applicationCloseDate + '" (at "' + path_applicationCloseDate + '")');
|
|
1815
|
+
}
|
|
1937
1816
|
}
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1817
|
+
if (obj.appliedDate !== undefined) {
|
|
1818
|
+
const obj_appliedDate = obj.appliedDate;
|
|
1819
|
+
const path_appliedDate = path + '.appliedDate';
|
|
1820
|
+
if (typeof obj_appliedDate !== 'string') {
|
|
1821
|
+
return new TypeError('Expected "string" but received "' + typeof obj_appliedDate + '" (at "' + path_appliedDate + '")');
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
if (obj.id !== undefined) {
|
|
1825
|
+
const obj_id = obj.id;
|
|
1826
|
+
const path_id = path + '.id';
|
|
1827
|
+
if (typeof obj_id !== 'string') {
|
|
1828
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
if (obj.individualApplicationTasks !== undefined) {
|
|
1832
|
+
const obj_individualApplicationTasks = obj.individualApplicationTasks;
|
|
1833
|
+
const path_individualApplicationTasks = path + '.individualApplicationTasks';
|
|
1834
|
+
if (!ArrayIsArray(obj_individualApplicationTasks)) {
|
|
1835
|
+
return new TypeError('Expected "array" but received "' + typeof obj_individualApplicationTasks + '" (at "' + path_individualApplicationTasks + '")');
|
|
1836
|
+
}
|
|
1837
|
+
for (let i = 0; i < obj_individualApplicationTasks.length; i++) {
|
|
1838
|
+
const obj_individualApplicationTasks_item = obj_individualApplicationTasks[i];
|
|
1839
|
+
const path_individualApplicationTasks_item = path_individualApplicationTasks + '[' + i + ']';
|
|
1840
|
+
const referencepath_individualApplicationTasks_itemValidationError = validate$10(obj_individualApplicationTasks_item, path_individualApplicationTasks_item);
|
|
1841
|
+
if (referencepath_individualApplicationTasks_itemValidationError !== null) {
|
|
1842
|
+
let message = 'Object doesn\'t match IndividualApplicationTask (at "' + path_individualApplicationTasks_item + '")\n';
|
|
1843
|
+
message += referencepath_individualApplicationTasks_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1844
|
+
return new TypeError(message);
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
if (obj.programName !== undefined) {
|
|
1849
|
+
const obj_programName = obj.programName;
|
|
1850
|
+
const path_programName = path + '.programName';
|
|
1851
|
+
if (typeof obj_programName !== 'string') {
|
|
1852
|
+
return new TypeError('Expected "string" but received "' + typeof obj_programName + '" (at "' + path_programName + '")');
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
if (obj.requiredItemsCompleted !== undefined) {
|
|
1856
|
+
const obj_requiredItemsCompleted = obj.requiredItemsCompleted;
|
|
1857
|
+
const path_requiredItemsCompleted = path + '.requiredItemsCompleted';
|
|
1858
|
+
if (typeof obj_requiredItemsCompleted !== 'number' || (typeof obj_requiredItemsCompleted === 'number' && Math.floor(obj_requiredItemsCompleted) !== obj_requiredItemsCompleted)) {
|
|
1859
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_requiredItemsCompleted + '" (at "' + path_requiredItemsCompleted + '")');
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
if (obj.status !== undefined) {
|
|
1863
|
+
const obj_status = obj.status;
|
|
1864
|
+
const path_status = path + '.status';
|
|
1865
|
+
if (typeof obj_status !== 'string') {
|
|
1866
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
if (obj.submitter !== undefined) {
|
|
1870
|
+
const obj_submitter = obj.submitter;
|
|
1871
|
+
const path_submitter = path + '.submitter';
|
|
1872
|
+
const referencepath_submitterValidationError = validate$15(obj_submitter, path_submitter);
|
|
1873
|
+
if (referencepath_submitterValidationError !== null) {
|
|
1874
|
+
let message = 'Object doesn\'t match Submitter (at "' + path_submitter + '")\n';
|
|
1875
|
+
message += referencepath_submitterValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1876
|
+
return new TypeError(message);
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
if (obj.termName !== undefined) {
|
|
1880
|
+
const obj_termName = obj.termName;
|
|
1881
|
+
const path_termName = path + '.termName';
|
|
1882
|
+
if (typeof obj_termName !== 'string') {
|
|
1883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_termName + '" (at "' + path_termName + '")');
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
if (obj.totalRequiredItems !== undefined) {
|
|
1887
|
+
const obj_totalRequiredItems = obj.totalRequiredItems;
|
|
1888
|
+
const path_totalRequiredItems = path + '.totalRequiredItems';
|
|
1889
|
+
if (typeof obj_totalRequiredItems !== 'number' || (typeof obj_totalRequiredItems === 'number' && Math.floor(obj_totalRequiredItems) !== obj_totalRequiredItems)) {
|
|
1890
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalRequiredItems + '" (at "' + path_totalRequiredItems + '")');
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
})();
|
|
1894
|
+
return v_error === undefined ? null : v_error;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
const TTL$6 = 100;
|
|
1898
|
+
const VERSION$y = "20a50ee9f09ba0dc956412cc14d5b6d5";
|
|
1899
|
+
function validate$_(obj, path = 'ApplicationDetailsOutputRepresentation') {
|
|
1900
|
+
const v_error = (() => {
|
|
1901
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1902
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1903
|
+
}
|
|
1904
|
+
if (obj.result !== undefined) {
|
|
1905
|
+
const obj_result = obj.result;
|
|
1906
|
+
const path_result = path + '.result';
|
|
1907
|
+
const referencepath_resultValidationError = validate$$(obj_result, path_result);
|
|
1908
|
+
if (referencepath_resultValidationError !== null) {
|
|
1909
|
+
let message = 'Object doesn\'t match GetApplicationDetailsResult (at "' + path_result + '")\n';
|
|
1910
|
+
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1911
|
+
return new TypeError(message);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
})();
|
|
1915
|
+
return v_error === undefined ? null : v_error;
|
|
1916
|
+
}
|
|
1917
|
+
const RepresentationType$j = 'ApplicationDetailsOutputRepresentation';
|
|
1918
|
+
function normalize$j(input, existing, path, luvio, store, timestamp) {
|
|
1919
|
+
return input;
|
|
1920
|
+
}
|
|
1921
|
+
const select$T = function ApplicationDetailsOutputRepresentationSelect() {
|
|
1922
|
+
return {
|
|
1923
|
+
kind: 'Fragment',
|
|
1924
|
+
version: VERSION$y,
|
|
1925
|
+
private: [],
|
|
1926
|
+
opaque: true
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1929
|
+
function equals$y(existing, incoming) {
|
|
1930
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1931
|
+
return false;
|
|
1932
|
+
}
|
|
1933
|
+
return true;
|
|
1934
|
+
}
|
|
1935
|
+
const ingest$j = function ApplicationDetailsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1936
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1937
|
+
const validateError = validate$_(input);
|
|
1938
|
+
if (validateError !== null) {
|
|
1939
|
+
throw validateError;
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
const key = path.fullPath;
|
|
1943
|
+
const ttlToUse = TTL$6;
|
|
1944
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$j, "education", VERSION$y, RepresentationType$j, equals$y);
|
|
1942
1945
|
return createLink(key);
|
|
1943
1946
|
};
|
|
1944
1947
|
function getTypeCacheKeys$j(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -1954,15 +1957,15 @@ function getTypeCacheKeys$j(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
1954
1957
|
function select$S(luvio, params) {
|
|
1955
1958
|
return select$T();
|
|
1956
1959
|
}
|
|
1957
|
-
function keyBuilder$
|
|
1958
|
-
return keyPrefix + '::
|
|
1960
|
+
function keyBuilder$y(luvio, params) {
|
|
1961
|
+
return keyPrefix + '::ApplicationDetailsOutputRepresentation:(' + 'preliminaryApplicationRefId:' + params.urlParams.preliminaryApplicationRefId + ')';
|
|
1959
1962
|
}
|
|
1960
|
-
function getResponseCacheKeys$
|
|
1961
|
-
getTypeCacheKeys$j(storeKeyMap, luvio, response, () => keyBuilder$
|
|
1963
|
+
function getResponseCacheKeys$k(storeKeyMap, luvio, resourceParams, response) {
|
|
1964
|
+
getTypeCacheKeys$j(storeKeyMap, luvio, response, () => keyBuilder$y(luvio, resourceParams));
|
|
1962
1965
|
}
|
|
1963
|
-
function ingestSuccess$
|
|
1966
|
+
function ingestSuccess$k(luvio, resourceParams, response, snapshotRefresh) {
|
|
1964
1967
|
const { body } = response;
|
|
1965
|
-
const key = keyBuilder$
|
|
1968
|
+
const key = keyBuilder$y(luvio, resourceParams);
|
|
1966
1969
|
luvio.storeIngest(key, ingest$j, body);
|
|
1967
1970
|
const snapshot = luvio.storeLookup({
|
|
1968
1971
|
recordId: key,
|
|
@@ -1977,319 +1980,371 @@ function ingestSuccess$l(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1977
1980
|
deepFreeze(snapshot.data);
|
|
1978
1981
|
return snapshot;
|
|
1979
1982
|
}
|
|
1980
|
-
function ingestError$
|
|
1981
|
-
const key = keyBuilder$
|
|
1983
|
+
function ingestError$e(luvio, params, error, snapshotRefresh) {
|
|
1984
|
+
const key = keyBuilder$y(luvio, params);
|
|
1982
1985
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1983
|
-
|
|
1986
|
+
const storeMetadataParams = {
|
|
1987
|
+
ttl: TTL$6,
|
|
1988
|
+
namespace: keyPrefix,
|
|
1989
|
+
version: VERSION$y,
|
|
1990
|
+
representationName: RepresentationType$j
|
|
1991
|
+
};
|
|
1992
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1984
1993
|
return errorSnapshot;
|
|
1985
1994
|
}
|
|
1986
|
-
function createResourceRequest$
|
|
1995
|
+
function createResourceRequest$k(config) {
|
|
1987
1996
|
const headers = {};
|
|
1988
1997
|
return {
|
|
1989
1998
|
baseUri: '/services/data/v62.0',
|
|
1990
|
-
basePath: '/connect/education/
|
|
1991
|
-
method: '
|
|
1992
|
-
body:
|
|
1993
|
-
urlParams:
|
|
1999
|
+
basePath: '/connect/education/applications/' + config.urlParams.preliminaryApplicationRefId + '',
|
|
2000
|
+
method: 'get',
|
|
2001
|
+
body: null,
|
|
2002
|
+
urlParams: config.urlParams,
|
|
1994
2003
|
queryParams: {},
|
|
1995
2004
|
headers,
|
|
1996
2005
|
priority: 'normal',
|
|
1997
2006
|
};
|
|
1998
2007
|
}
|
|
1999
2008
|
|
|
2000
|
-
const adapterName$
|
|
2001
|
-
const
|
|
2002
|
-
generateParamConfigMetadata('
|
|
2009
|
+
const adapterName$k = 'getApplicationDetails';
|
|
2010
|
+
const getApplicationDetails_ConfigPropertyMetadata = [
|
|
2011
|
+
generateParamConfigMetadata('preliminaryApplicationRefId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2003
2012
|
];
|
|
2004
|
-
const
|
|
2005
|
-
const createResourceParams$
|
|
2006
|
-
function keyBuilder$
|
|
2007
|
-
const resourceParams = createResourceParams$
|
|
2008
|
-
return keyBuilder$
|
|
2013
|
+
const getApplicationDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$k, getApplicationDetails_ConfigPropertyMetadata);
|
|
2014
|
+
const createResourceParams$k = /*#__PURE__*/ createResourceParams$p(getApplicationDetails_ConfigPropertyMetadata);
|
|
2015
|
+
function keyBuilder$x(luvio, config) {
|
|
2016
|
+
const resourceParams = createResourceParams$k(config);
|
|
2017
|
+
return keyBuilder$y(luvio, resourceParams);
|
|
2009
2018
|
}
|
|
2010
|
-
function typeCheckConfig$
|
|
2019
|
+
function typeCheckConfig$k(untrustedConfig) {
|
|
2011
2020
|
const config = {};
|
|
2012
|
-
|
|
2013
|
-
const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$10(untrustedConfig_availableTimeSlotsInput);
|
|
2014
|
-
if (referenceAvailableTimeSlotsInputRepresentationValidationError === null) {
|
|
2015
|
-
config.availableTimeSlotsInput = untrustedConfig_availableTimeSlotsInput;
|
|
2016
|
-
}
|
|
2021
|
+
typeCheckConfig$p(untrustedConfig, config, getApplicationDetails_ConfigPropertyMetadata);
|
|
2017
2022
|
return config;
|
|
2018
2023
|
}
|
|
2019
|
-
function validateAdapterConfig$
|
|
2024
|
+
function validateAdapterConfig$k(untrustedConfig, configPropertyNames) {
|
|
2020
2025
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2021
2026
|
return null;
|
|
2022
2027
|
}
|
|
2023
2028
|
if (process.env.NODE_ENV !== 'production') {
|
|
2024
2029
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2025
2030
|
}
|
|
2026
|
-
const config = typeCheckConfig$
|
|
2031
|
+
const config = typeCheckConfig$k(untrustedConfig);
|
|
2027
2032
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2028
2033
|
return null;
|
|
2029
2034
|
}
|
|
2030
2035
|
return config;
|
|
2031
2036
|
}
|
|
2032
|
-
function adapterFragment$
|
|
2033
|
-
createResourceParams$
|
|
2037
|
+
function adapterFragment$e(luvio, config) {
|
|
2038
|
+
createResourceParams$k(config);
|
|
2034
2039
|
return select$S();
|
|
2035
2040
|
}
|
|
2036
|
-
function onFetchResponseSuccess$
|
|
2037
|
-
const snapshot = ingestSuccess$
|
|
2041
|
+
function onFetchResponseSuccess$e(luvio, config, resourceParams, response) {
|
|
2042
|
+
const snapshot = ingestSuccess$k(luvio, resourceParams, response, {
|
|
2038
2043
|
config,
|
|
2039
|
-
resolve: () => buildNetworkSnapshot$
|
|
2044
|
+
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
2040
2045
|
});
|
|
2041
2046
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2042
2047
|
}
|
|
2043
|
-
function onFetchResponseError$
|
|
2044
|
-
const snapshot = ingestError$
|
|
2048
|
+
function onFetchResponseError$e(luvio, config, resourceParams, response) {
|
|
2049
|
+
const snapshot = ingestError$e(luvio, resourceParams, response, {
|
|
2045
2050
|
config,
|
|
2046
|
-
resolve: () => buildNetworkSnapshot$
|
|
2051
|
+
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
2047
2052
|
});
|
|
2048
2053
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2049
2054
|
}
|
|
2050
|
-
function buildNetworkSnapshot$
|
|
2051
|
-
const resourceParams = createResourceParams$
|
|
2052
|
-
const request = createResourceRequest$
|
|
2055
|
+
function buildNetworkSnapshot$k(luvio, config, options) {
|
|
2056
|
+
const resourceParams = createResourceParams$k(config);
|
|
2057
|
+
const request = createResourceRequest$k(resourceParams);
|
|
2053
2058
|
return luvio.dispatchResourceRequest(request, options)
|
|
2054
2059
|
.then((response) => {
|
|
2055
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2060
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$e(luvio, config, resourceParams, response), () => {
|
|
2056
2061
|
const cache = new StoreKeyMap();
|
|
2057
|
-
getResponseCacheKeys$
|
|
2062
|
+
getResponseCacheKeys$k(cache, luvio, resourceParams, response.body);
|
|
2058
2063
|
return cache;
|
|
2059
2064
|
});
|
|
2060
2065
|
}, (response) => {
|
|
2061
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2066
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$e(luvio, config, resourceParams, response));
|
|
2062
2067
|
});
|
|
2063
2068
|
}
|
|
2064
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2065
|
-
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2069
|
+
function buildNetworkSnapshotCachePolicy$e(context, coercedAdapterRequestContext) {
|
|
2070
|
+
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$k, undefined, false);
|
|
2066
2071
|
}
|
|
2067
|
-
function buildCachedSnapshotCachePolicy$
|
|
2072
|
+
function buildCachedSnapshotCachePolicy$e(context, storeLookup) {
|
|
2068
2073
|
const { luvio, config } = context;
|
|
2069
2074
|
const selector = {
|
|
2070
|
-
recordId: keyBuilder$
|
|
2071
|
-
node: adapterFragment$
|
|
2075
|
+
recordId: keyBuilder$x(luvio, config),
|
|
2076
|
+
node: adapterFragment$e(luvio, config),
|
|
2072
2077
|
variables: {},
|
|
2073
2078
|
};
|
|
2074
2079
|
const cacheSnapshot = storeLookup(selector, {
|
|
2075
2080
|
config,
|
|
2076
|
-
resolve: () => buildNetworkSnapshot$
|
|
2081
|
+
resolve: () => buildNetworkSnapshot$k(luvio, config, snapshotRefreshOptions)
|
|
2077
2082
|
});
|
|
2078
2083
|
return cacheSnapshot;
|
|
2079
2084
|
}
|
|
2080
|
-
const
|
|
2081
|
-
const config = validateAdapterConfig$
|
|
2085
|
+
const getApplicationDetailsAdapterFactory = (luvio) => function education__getApplicationDetails(untrustedConfig, requestContext) {
|
|
2086
|
+
const config = validateAdapterConfig$k(untrustedConfig, getApplicationDetails_ConfigPropertyNames);
|
|
2082
2087
|
// Invalid or incomplete config
|
|
2083
2088
|
if (config === null) {
|
|
2084
2089
|
return null;
|
|
2085
2090
|
}
|
|
2086
2091
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2087
|
-
buildCachedSnapshotCachePolicy$
|
|
2092
|
+
buildCachedSnapshotCachePolicy$e, buildNetworkSnapshotCachePolicy$e);
|
|
2088
2093
|
};
|
|
2089
2094
|
|
|
2090
|
-
|
|
2091
|
-
function validate$Z(obj, path = 'AvailableTopic') {
|
|
2095
|
+
function validate$Z(obj, path = 'AvailableTimeSlotsInputRepresentation') {
|
|
2092
2096
|
const v_error = (() => {
|
|
2093
2097
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2094
2098
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2095
2099
|
}
|
|
2096
|
-
if (obj.
|
|
2097
|
-
const
|
|
2098
|
-
const
|
|
2099
|
-
if (typeof
|
|
2100
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2100
|
+
if (obj.endTime !== undefined) {
|
|
2101
|
+
const obj_endTime = obj.endTime;
|
|
2102
|
+
const path_endTime = path + '.endTime';
|
|
2103
|
+
if (typeof obj_endTime !== 'string') {
|
|
2104
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
|
|
2101
2105
|
}
|
|
2102
2106
|
}
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
return new TypeError('Expected "object" but received "' + typeof obj_serviceTerritoryWorkTypes + '" (at "' + path_serviceTerritoryWorkTypes + '")');
|
|
2108
|
-
}
|
|
2109
|
-
const obj_serviceTerritoryWorkTypes_keys = ObjectKeys(obj_serviceTerritoryWorkTypes);
|
|
2110
|
-
for (let i = 0; i < obj_serviceTerritoryWorkTypes_keys.length; i++) {
|
|
2111
|
-
const key = obj_serviceTerritoryWorkTypes_keys[i];
|
|
2112
|
-
const obj_serviceTerritoryWorkTypes_prop = obj_serviceTerritoryWorkTypes[key];
|
|
2113
|
-
const path_serviceTerritoryWorkTypes_prop = path_serviceTerritoryWorkTypes + '["' + key + '"]';
|
|
2114
|
-
if (obj_serviceTerritoryWorkTypes_prop === undefined) {
|
|
2115
|
-
return new TypeError('Expected "defined" but received "' + typeof obj_serviceTerritoryWorkTypes_prop + '" (at "' + path_serviceTerritoryWorkTypes_prop + '")');
|
|
2116
|
-
}
|
|
2117
|
-
}
|
|
2107
|
+
const obj_engagementChannelTypeIds = obj.engagementChannelTypeIds;
|
|
2108
|
+
const path_engagementChannelTypeIds = path + '.engagementChannelTypeIds';
|
|
2109
|
+
if (!ArrayIsArray(obj_engagementChannelTypeIds)) {
|
|
2110
|
+
return new TypeError('Expected "array" but received "' + typeof obj_engagementChannelTypeIds + '" (at "' + path_engagementChannelTypeIds + '")');
|
|
2118
2111
|
}
|
|
2119
|
-
|
|
2120
|
-
const
|
|
2121
|
-
const
|
|
2122
|
-
if (typeof
|
|
2123
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2112
|
+
for (let i = 0; i < obj_engagementChannelTypeIds.length; i++) {
|
|
2113
|
+
const obj_engagementChannelTypeIds_item = obj_engagementChannelTypeIds[i];
|
|
2114
|
+
const path_engagementChannelTypeIds_item = path_engagementChannelTypeIds + '[' + i + ']';
|
|
2115
|
+
if (typeof obj_engagementChannelTypeIds_item !== 'string') {
|
|
2116
|
+
return new TypeError('Expected "string" but received "' + typeof obj_engagementChannelTypeIds_item + '" (at "' + path_engagementChannelTypeIds_item + '")');
|
|
2124
2117
|
}
|
|
2125
2118
|
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2119
|
+
const obj_serviceResourceIds = obj.serviceResourceIds;
|
|
2120
|
+
const path_serviceResourceIds = path + '.serviceResourceIds';
|
|
2121
|
+
if (!ArrayIsArray(obj_serviceResourceIds)) {
|
|
2122
|
+
return new TypeError('Expected "array" but received "' + typeof obj_serviceResourceIds + '" (at "' + path_serviceResourceIds + '")');
|
|
2123
|
+
}
|
|
2124
|
+
for (let i = 0; i < obj_serviceResourceIds.length; i++) {
|
|
2125
|
+
const obj_serviceResourceIds_item = obj_serviceResourceIds[i];
|
|
2126
|
+
const path_serviceResourceIds_item = path_serviceResourceIds + '[' + i + ']';
|
|
2127
|
+
if (typeof obj_serviceResourceIds_item !== 'string') {
|
|
2128
|
+
return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceIds_item + '" (at "' + path_serviceResourceIds_item + '")');
|
|
2131
2129
|
}
|
|
2132
2130
|
}
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2131
|
+
const obj_serviceTerritoryIds = obj.serviceTerritoryIds;
|
|
2132
|
+
const path_serviceTerritoryIds = path + '.serviceTerritoryIds';
|
|
2133
|
+
if (!ArrayIsArray(obj_serviceTerritoryIds)) {
|
|
2134
|
+
return new TypeError('Expected "array" but received "' + typeof obj_serviceTerritoryIds + '" (at "' + path_serviceTerritoryIds + '")');
|
|
2135
|
+
}
|
|
2136
|
+
for (let i = 0; i < obj_serviceTerritoryIds.length; i++) {
|
|
2137
|
+
const obj_serviceTerritoryIds_item = obj_serviceTerritoryIds[i];
|
|
2138
|
+
const path_serviceTerritoryIds_item = path_serviceTerritoryIds + '[' + i + ']';
|
|
2139
|
+
if (typeof obj_serviceTerritoryIds_item !== 'string') {
|
|
2140
|
+
return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryIds_item + '" (at "' + path_serviceTerritoryIds_item + '")');
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
if (obj.startTime !== undefined) {
|
|
2144
|
+
const obj_startTime = obj.startTime;
|
|
2145
|
+
const path_startTime = path + '.startTime';
|
|
2146
|
+
if (typeof obj_startTime !== 'string') {
|
|
2147
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
const obj_workTypeGroupId = obj.workTypeGroupId;
|
|
2151
|
+
const path_workTypeGroupId = path + '.workTypeGroupId';
|
|
2152
|
+
if (typeof obj_workTypeGroupId !== 'string') {
|
|
2153
|
+
return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
|
|
2154
|
+
}
|
|
2155
|
+
})();
|
|
2156
|
+
return v_error === undefined ? null : v_error;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
const VERSION$x = "cfd94fbef61f52ffe43428e23e7a68c8";
|
|
2160
|
+
function validate$Y(obj, path = 'TimeSlot') {
|
|
2161
|
+
const v_error = (() => {
|
|
2162
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2163
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2164
|
+
}
|
|
2165
|
+
if (obj.endTime !== undefined) {
|
|
2166
|
+
const obj_endTime = obj.endTime;
|
|
2167
|
+
const path_endTime = path + '.endTime';
|
|
2168
|
+
if (typeof obj_endTime !== 'string') {
|
|
2169
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
if (obj.serviceResourceId !== undefined) {
|
|
2173
|
+
const obj_serviceResourceId = obj.serviceResourceId;
|
|
2174
|
+
const path_serviceResourceId = path + '.serviceResourceId';
|
|
2175
|
+
if (typeof obj_serviceResourceId !== 'string') {
|
|
2176
|
+
return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceId + '" (at "' + path_serviceResourceId + '")');
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
if (obj.serviceTerritoryId !== undefined) {
|
|
2180
|
+
const obj_serviceTerritoryId = obj.serviceTerritoryId;
|
|
2181
|
+
const path_serviceTerritoryId = path + '.serviceTerritoryId';
|
|
2182
|
+
if (typeof obj_serviceTerritoryId !== 'string') {
|
|
2183
|
+
return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryId + '" (at "' + path_serviceTerritoryId + '")');
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
if (obj.startTime !== undefined) {
|
|
2187
|
+
const obj_startTime = obj.startTime;
|
|
2188
|
+
const path_startTime = path + '.startTime';
|
|
2189
|
+
if (typeof obj_startTime !== 'string') {
|
|
2190
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
})();
|
|
2194
|
+
return v_error === undefined ? null : v_error;
|
|
2195
|
+
}
|
|
2196
|
+
const select$R = function TimeSlotSelect() {
|
|
2197
|
+
return {
|
|
2138
2198
|
kind: 'Fragment',
|
|
2139
|
-
version: VERSION$
|
|
2199
|
+
version: VERSION$x,
|
|
2140
2200
|
private: [],
|
|
2141
2201
|
selections: [
|
|
2142
2202
|
{
|
|
2143
|
-
name: '
|
|
2203
|
+
name: 'endTime',
|
|
2144
2204
|
kind: 'Scalar',
|
|
2145
2205
|
required: false
|
|
2146
2206
|
},
|
|
2147
2207
|
{
|
|
2148
|
-
name: '
|
|
2149
|
-
kind: '
|
|
2150
|
-
|
|
2208
|
+
name: 'serviceResourceId',
|
|
2209
|
+
kind: 'Scalar',
|
|
2210
|
+
required: false
|
|
2151
2211
|
},
|
|
2152
2212
|
{
|
|
2153
|
-
name: '
|
|
2213
|
+
name: 'serviceTerritoryId',
|
|
2154
2214
|
kind: 'Scalar',
|
|
2155
2215
|
required: false
|
|
2156
2216
|
},
|
|
2157
2217
|
{
|
|
2158
|
-
name: '
|
|
2218
|
+
name: 'startTime',
|
|
2159
2219
|
kind: 'Scalar',
|
|
2160
2220
|
required: false
|
|
2161
2221
|
}
|
|
2162
2222
|
]
|
|
2163
2223
|
};
|
|
2164
2224
|
};
|
|
2165
|
-
function equals$
|
|
2166
|
-
const
|
|
2167
|
-
const
|
|
2225
|
+
function equals$x(existing, incoming) {
|
|
2226
|
+
const existing_endTime = existing.endTime;
|
|
2227
|
+
const incoming_endTime = incoming.endTime;
|
|
2168
2228
|
// if at least one of these optionals is defined
|
|
2169
|
-
if (
|
|
2229
|
+
if (existing_endTime !== undefined || incoming_endTime !== undefined) {
|
|
2170
2230
|
// if one of these is not defined we know the other is defined and therefore
|
|
2171
2231
|
// not equal
|
|
2172
|
-
if (
|
|
2232
|
+
if (existing_endTime === undefined || incoming_endTime === undefined) {
|
|
2173
2233
|
return false;
|
|
2174
2234
|
}
|
|
2175
|
-
if (!(
|
|
2235
|
+
if (!(existing_endTime === incoming_endTime)) {
|
|
2176
2236
|
return false;
|
|
2177
2237
|
}
|
|
2178
2238
|
}
|
|
2179
|
-
const
|
|
2180
|
-
const
|
|
2239
|
+
const existing_serviceResourceId = existing.serviceResourceId;
|
|
2240
|
+
const incoming_serviceResourceId = incoming.serviceResourceId;
|
|
2181
2241
|
// if at least one of these optionals is defined
|
|
2182
|
-
if (
|
|
2242
|
+
if (existing_serviceResourceId !== undefined || incoming_serviceResourceId !== undefined) {
|
|
2183
2243
|
// if one of these is not defined we know the other is defined and therefore
|
|
2184
2244
|
// not equal
|
|
2185
|
-
if (
|
|
2245
|
+
if (existing_serviceResourceId === undefined || incoming_serviceResourceId === undefined) {
|
|
2186
2246
|
return false;
|
|
2187
2247
|
}
|
|
2188
|
-
if (!(
|
|
2248
|
+
if (!(existing_serviceResourceId === incoming_serviceResourceId)) {
|
|
2189
2249
|
return false;
|
|
2190
2250
|
}
|
|
2191
2251
|
}
|
|
2192
|
-
const
|
|
2193
|
-
const
|
|
2252
|
+
const existing_serviceTerritoryId = existing.serviceTerritoryId;
|
|
2253
|
+
const incoming_serviceTerritoryId = incoming.serviceTerritoryId;
|
|
2194
2254
|
// if at least one of these optionals is defined
|
|
2195
|
-
if (
|
|
2255
|
+
if (existing_serviceTerritoryId !== undefined || incoming_serviceTerritoryId !== undefined) {
|
|
2196
2256
|
// if one of these is not defined we know the other is defined and therefore
|
|
2197
2257
|
// not equal
|
|
2198
|
-
if (
|
|
2258
|
+
if (existing_serviceTerritoryId === undefined || incoming_serviceTerritoryId === undefined) {
|
|
2199
2259
|
return false;
|
|
2200
2260
|
}
|
|
2201
|
-
if (!(
|
|
2261
|
+
if (!(existing_serviceTerritoryId === incoming_serviceTerritoryId)) {
|
|
2202
2262
|
return false;
|
|
2203
2263
|
}
|
|
2204
2264
|
}
|
|
2205
|
-
const
|
|
2206
|
-
const
|
|
2265
|
+
const existing_startTime = existing.startTime;
|
|
2266
|
+
const incoming_startTime = incoming.startTime;
|
|
2207
2267
|
// if at least one of these optionals is defined
|
|
2208
|
-
if (
|
|
2268
|
+
if (existing_startTime !== undefined || incoming_startTime !== undefined) {
|
|
2209
2269
|
// if one of these is not defined we know the other is defined and therefore
|
|
2210
2270
|
// not equal
|
|
2211
|
-
if (
|
|
2271
|
+
if (existing_startTime === undefined || incoming_startTime === undefined) {
|
|
2212
2272
|
return false;
|
|
2213
2273
|
}
|
|
2214
|
-
|
|
2215
|
-
if (JSONStringify(incoming_serviceTerritoryWorkTypes_prop) !== JSONStringify(existing_serviceTerritoryWorkTypes_prop)) {
|
|
2216
|
-
return false;
|
|
2217
|
-
}
|
|
2218
|
-
});
|
|
2219
|
-
if (equals_serviceTerritoryWorkTypes_props === false) {
|
|
2274
|
+
if (!(existing_startTime === incoming_startTime)) {
|
|
2220
2275
|
return false;
|
|
2221
2276
|
}
|
|
2222
2277
|
}
|
|
2223
2278
|
return true;
|
|
2224
2279
|
}
|
|
2225
2280
|
|
|
2226
|
-
const VERSION$
|
|
2227
|
-
function validate$
|
|
2281
|
+
const VERSION$w = "9c2ef94b89ee532c50c8423528617441";
|
|
2282
|
+
function validate$X(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
|
|
2228
2283
|
const v_error = (() => {
|
|
2229
2284
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2230
2285
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2231
2286
|
}
|
|
2232
|
-
const
|
|
2233
|
-
const
|
|
2234
|
-
if (!ArrayIsArray(
|
|
2235
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
2287
|
+
const obj_timeSlots = obj.timeSlots;
|
|
2288
|
+
const path_timeSlots = path + '.timeSlots';
|
|
2289
|
+
if (!ArrayIsArray(obj_timeSlots)) {
|
|
2290
|
+
return new TypeError('Expected "array" but received "' + typeof obj_timeSlots + '" (at "' + path_timeSlots + '")');
|
|
2236
2291
|
}
|
|
2237
|
-
for (let i = 0; i <
|
|
2238
|
-
const
|
|
2239
|
-
const
|
|
2240
|
-
const
|
|
2241
|
-
if (
|
|
2242
|
-
let message = 'Object doesn\'t match
|
|
2243
|
-
message +=
|
|
2292
|
+
for (let i = 0; i < obj_timeSlots.length; i++) {
|
|
2293
|
+
const obj_timeSlots_item = obj_timeSlots[i];
|
|
2294
|
+
const path_timeSlots_item = path_timeSlots + '[' + i + ']';
|
|
2295
|
+
const referencepath_timeSlots_itemValidationError = validate$Y(obj_timeSlots_item, path_timeSlots_item);
|
|
2296
|
+
if (referencepath_timeSlots_itemValidationError !== null) {
|
|
2297
|
+
let message = 'Object doesn\'t match TimeSlot (at "' + path_timeSlots_item + '")\n';
|
|
2298
|
+
message += referencepath_timeSlots_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2244
2299
|
return new TypeError(message);
|
|
2245
2300
|
}
|
|
2246
2301
|
}
|
|
2247
2302
|
})();
|
|
2248
2303
|
return v_error === undefined ? null : v_error;
|
|
2249
2304
|
}
|
|
2250
|
-
const RepresentationType$i = '
|
|
2305
|
+
const RepresentationType$i = 'AvailableTimeSlotsOuputRepresentation';
|
|
2251
2306
|
function normalize$i(input, existing, path, luvio, store, timestamp) {
|
|
2252
2307
|
return input;
|
|
2253
2308
|
}
|
|
2254
|
-
const select$Q = function
|
|
2255
|
-
const { selections:
|
|
2309
|
+
const select$Q = function AvailableTimeSlotsOuputRepresentationSelect() {
|
|
2310
|
+
const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$R();
|
|
2256
2311
|
return {
|
|
2257
2312
|
kind: 'Fragment',
|
|
2258
|
-
version: VERSION$
|
|
2313
|
+
version: VERSION$w,
|
|
2259
2314
|
private: [],
|
|
2260
2315
|
selections: [
|
|
2261
2316
|
{
|
|
2262
|
-
name: '
|
|
2317
|
+
name: 'timeSlots',
|
|
2263
2318
|
kind: 'Object',
|
|
2264
2319
|
plural: true,
|
|
2265
|
-
selections:
|
|
2320
|
+
selections: TimeSlot__selections
|
|
2266
2321
|
}
|
|
2267
2322
|
]
|
|
2268
2323
|
};
|
|
2269
2324
|
};
|
|
2270
|
-
function equals$
|
|
2271
|
-
const
|
|
2272
|
-
const
|
|
2273
|
-
const
|
|
2274
|
-
if (!(equals$
|
|
2325
|
+
function equals$w(existing, incoming) {
|
|
2326
|
+
const existing_timeSlots = existing.timeSlots;
|
|
2327
|
+
const incoming_timeSlots = incoming.timeSlots;
|
|
2328
|
+
const equals_timeSlots_items = equalsArray(existing_timeSlots, incoming_timeSlots, (existing_timeSlots_item, incoming_timeSlots_item) => {
|
|
2329
|
+
if (!(equals$x(existing_timeSlots_item, incoming_timeSlots_item))) {
|
|
2275
2330
|
return false;
|
|
2276
2331
|
}
|
|
2277
2332
|
});
|
|
2278
|
-
if (
|
|
2333
|
+
if (equals_timeSlots_items === false) {
|
|
2279
2334
|
return false;
|
|
2280
2335
|
}
|
|
2281
2336
|
return true;
|
|
2282
2337
|
}
|
|
2283
|
-
const ingest$i = function
|
|
2338
|
+
const ingest$i = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2284
2339
|
if (process.env.NODE_ENV !== 'production') {
|
|
2285
|
-
const validateError = validate$
|
|
2340
|
+
const validateError = validate$X(input);
|
|
2286
2341
|
if (validateError !== null) {
|
|
2287
2342
|
throw validateError;
|
|
2288
2343
|
}
|
|
2289
2344
|
}
|
|
2290
2345
|
const key = path.fullPath;
|
|
2291
2346
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
2292
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$i, "education", VERSION$
|
|
2347
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$i, "education", VERSION$w, RepresentationType$i, equals$w);
|
|
2293
2348
|
return createLink(key);
|
|
2294
2349
|
};
|
|
2295
2350
|
function getTypeCacheKeys$i(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -2305,15 +2360,15 @@ function getTypeCacheKeys$i(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2305
2360
|
function select$P(luvio, params) {
|
|
2306
2361
|
return select$Q();
|
|
2307
2362
|
}
|
|
2308
|
-
function keyBuilder$
|
|
2309
|
-
return keyPrefix + '::
|
|
2363
|
+
function keyBuilder$w(luvio, params) {
|
|
2364
|
+
return keyPrefix + '::AvailableTimeSlotsOuputRepresentation:(' + (params.body.availableTimeSlotsInput.endTime === undefined ? 'availableTimeSlotsInput.endTime' : 'availableTimeSlotsInput.endTime:' + params.body.availableTimeSlotsInput.endTime) + '::' + 'availableTimeSlotsInput.engagementChannelTypeIds:' + params.body.availableTimeSlotsInput.engagementChannelTypeIds + '::' + 'availableTimeSlotsInput.serviceResourceIds:' + params.body.availableTimeSlotsInput.serviceResourceIds + '::' + 'availableTimeSlotsInput.serviceTerritoryIds:' + params.body.availableTimeSlotsInput.serviceTerritoryIds + '::' + (params.body.availableTimeSlotsInput.startTime === undefined ? 'availableTimeSlotsInput.startTime' : 'availableTimeSlotsInput.startTime:' + params.body.availableTimeSlotsInput.startTime) + '::' + 'availableTimeSlotsInput.workTypeGroupId:' + params.body.availableTimeSlotsInput.workTypeGroupId + ')';
|
|
2310
2365
|
}
|
|
2311
|
-
function getResponseCacheKeys$
|
|
2312
|
-
getTypeCacheKeys$i(storeKeyMap, luvio, response, () => keyBuilder$
|
|
2366
|
+
function getResponseCacheKeys$j(storeKeyMap, luvio, resourceParams, response) {
|
|
2367
|
+
getTypeCacheKeys$i(storeKeyMap, luvio, response, () => keyBuilder$w(luvio, resourceParams));
|
|
2313
2368
|
}
|
|
2314
|
-
function ingestSuccess$
|
|
2369
|
+
function ingestSuccess$j(luvio, resourceParams, response, snapshotRefresh) {
|
|
2315
2370
|
const { body } = response;
|
|
2316
|
-
const key = keyBuilder$
|
|
2371
|
+
const key = keyBuilder$w(luvio, resourceParams);
|
|
2317
2372
|
luvio.storeIngest(key, ingest$i, body);
|
|
2318
2373
|
const snapshot = luvio.storeLookup({
|
|
2319
2374
|
recordId: key,
|
|
@@ -2328,19 +2383,19 @@ function ingestSuccess$k(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2328
2383
|
deepFreeze(snapshot.data);
|
|
2329
2384
|
return snapshot;
|
|
2330
2385
|
}
|
|
2331
|
-
function ingestError$
|
|
2332
|
-
const key = keyBuilder$
|
|
2386
|
+
function ingestError$d(luvio, params, error, snapshotRefresh) {
|
|
2387
|
+
const key = keyBuilder$w(luvio, params);
|
|
2333
2388
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2334
2389
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2335
2390
|
return errorSnapshot;
|
|
2336
2391
|
}
|
|
2337
|
-
function createResourceRequest$
|
|
2392
|
+
function createResourceRequest$j(config) {
|
|
2338
2393
|
const headers = {};
|
|
2339
2394
|
return {
|
|
2340
2395
|
baseUri: '/services/data/v62.0',
|
|
2341
|
-
basePath: '/connect/education/appointment-booking/available-
|
|
2342
|
-
method: '
|
|
2343
|
-
body:
|
|
2396
|
+
basePath: '/connect/education/appointment-booking/available-time-slots',
|
|
2397
|
+
method: 'post',
|
|
2398
|
+
body: config.body,
|
|
2344
2399
|
urlParams: {},
|
|
2345
2400
|
queryParams: {},
|
|
2346
2401
|
headers,
|
|
@@ -2348,473 +2403,292 @@ function createResourceRequest$k(config) {
|
|
|
2348
2403
|
};
|
|
2349
2404
|
}
|
|
2350
2405
|
|
|
2351
|
-
const adapterName$
|
|
2352
|
-
const
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2406
|
+
const adapterName$j = 'getAvailableTimeSlots';
|
|
2407
|
+
const getAvailableTimeSlots_ConfigPropertyMetadata = [
|
|
2408
|
+
generateParamConfigMetadata('availableTimeSlotsInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2409
|
+
];
|
|
2410
|
+
const getAvailableTimeSlots_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$j, getAvailableTimeSlots_ConfigPropertyMetadata);
|
|
2411
|
+
const createResourceParams$j = /*#__PURE__*/ createResourceParams$p(getAvailableTimeSlots_ConfigPropertyMetadata);
|
|
2412
|
+
function keyBuilder$v(luvio, config) {
|
|
2413
|
+
const resourceParams = createResourceParams$j(config);
|
|
2414
|
+
return keyBuilder$w(luvio, resourceParams);
|
|
2358
2415
|
}
|
|
2359
|
-
function typeCheckConfig$
|
|
2416
|
+
function typeCheckConfig$j(untrustedConfig) {
|
|
2360
2417
|
const config = {};
|
|
2418
|
+
const untrustedConfig_availableTimeSlotsInput = untrustedConfig.availableTimeSlotsInput;
|
|
2419
|
+
const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$Z(untrustedConfig_availableTimeSlotsInput);
|
|
2420
|
+
if (referenceAvailableTimeSlotsInputRepresentationValidationError === null) {
|
|
2421
|
+
config.availableTimeSlotsInput = untrustedConfig_availableTimeSlotsInput;
|
|
2422
|
+
}
|
|
2361
2423
|
return config;
|
|
2362
2424
|
}
|
|
2363
|
-
function validateAdapterConfig$
|
|
2425
|
+
function validateAdapterConfig$j(untrustedConfig, configPropertyNames) {
|
|
2364
2426
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2365
2427
|
return null;
|
|
2366
2428
|
}
|
|
2367
2429
|
if (process.env.NODE_ENV !== 'production') {
|
|
2368
2430
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2369
2431
|
}
|
|
2370
|
-
const config = typeCheckConfig$
|
|
2432
|
+
const config = typeCheckConfig$j(untrustedConfig);
|
|
2371
2433
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2372
2434
|
return null;
|
|
2373
2435
|
}
|
|
2374
2436
|
return config;
|
|
2375
2437
|
}
|
|
2376
|
-
function adapterFragment$
|
|
2377
|
-
createResourceParams$
|
|
2438
|
+
function adapterFragment$d(luvio, config) {
|
|
2439
|
+
createResourceParams$j(config);
|
|
2378
2440
|
return select$P();
|
|
2379
2441
|
}
|
|
2380
|
-
function onFetchResponseSuccess$
|
|
2381
|
-
const snapshot = ingestSuccess$
|
|
2442
|
+
function onFetchResponseSuccess$d(luvio, config, resourceParams, response) {
|
|
2443
|
+
const snapshot = ingestSuccess$j(luvio, resourceParams, response, {
|
|
2382
2444
|
config,
|
|
2383
|
-
resolve: () => buildNetworkSnapshot$
|
|
2445
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
2384
2446
|
});
|
|
2385
2447
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2386
2448
|
}
|
|
2387
|
-
function onFetchResponseError$
|
|
2388
|
-
const snapshot = ingestError$
|
|
2449
|
+
function onFetchResponseError$d(luvio, config, resourceParams, response) {
|
|
2450
|
+
const snapshot = ingestError$d(luvio, resourceParams, response, {
|
|
2389
2451
|
config,
|
|
2390
|
-
resolve: () => buildNetworkSnapshot$
|
|
2452
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
2391
2453
|
});
|
|
2392
2454
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2393
2455
|
}
|
|
2394
|
-
function buildNetworkSnapshot$
|
|
2395
|
-
const resourceParams = createResourceParams$
|
|
2396
|
-
const request = createResourceRequest$
|
|
2456
|
+
function buildNetworkSnapshot$j(luvio, config, options) {
|
|
2457
|
+
const resourceParams = createResourceParams$j(config);
|
|
2458
|
+
const request = createResourceRequest$j(resourceParams);
|
|
2397
2459
|
return luvio.dispatchResourceRequest(request, options)
|
|
2398
2460
|
.then((response) => {
|
|
2399
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2461
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$d(luvio, config, resourceParams, response), () => {
|
|
2400
2462
|
const cache = new StoreKeyMap();
|
|
2401
|
-
getResponseCacheKeys$
|
|
2463
|
+
getResponseCacheKeys$j(cache, luvio, resourceParams, response.body);
|
|
2402
2464
|
return cache;
|
|
2403
2465
|
});
|
|
2404
2466
|
}, (response) => {
|
|
2405
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2467
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$d(luvio, config, resourceParams, response));
|
|
2406
2468
|
});
|
|
2407
2469
|
}
|
|
2408
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2409
|
-
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2470
|
+
function buildNetworkSnapshotCachePolicy$d(context, coercedAdapterRequestContext) {
|
|
2471
|
+
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$j, 'get', false);
|
|
2410
2472
|
}
|
|
2411
|
-
function buildCachedSnapshotCachePolicy$
|
|
2473
|
+
function buildCachedSnapshotCachePolicy$d(context, storeLookup) {
|
|
2412
2474
|
const { luvio, config } = context;
|
|
2413
2475
|
const selector = {
|
|
2414
|
-
recordId: keyBuilder$
|
|
2415
|
-
node: adapterFragment$
|
|
2476
|
+
recordId: keyBuilder$v(luvio, config),
|
|
2477
|
+
node: adapterFragment$d(luvio, config),
|
|
2416
2478
|
variables: {},
|
|
2417
2479
|
};
|
|
2418
2480
|
const cacheSnapshot = storeLookup(selector, {
|
|
2419
2481
|
config,
|
|
2420
|
-
resolve: () => buildNetworkSnapshot$
|
|
2482
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
2421
2483
|
});
|
|
2422
2484
|
return cacheSnapshot;
|
|
2423
2485
|
}
|
|
2424
|
-
const
|
|
2425
|
-
const config = validateAdapterConfig$
|
|
2486
|
+
const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAvailableTimeSlots(untrustedConfig, requestContext) {
|
|
2487
|
+
const config = validateAdapterConfig$j(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
|
|
2426
2488
|
// Invalid or incomplete config
|
|
2427
2489
|
if (config === null) {
|
|
2428
2490
|
return null;
|
|
2429
2491
|
}
|
|
2430
2492
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2431
|
-
buildCachedSnapshotCachePolicy$
|
|
2493
|
+
buildCachedSnapshotCachePolicy$d, buildNetworkSnapshotCachePolicy$d);
|
|
2432
2494
|
};
|
|
2433
2495
|
|
|
2434
|
-
|
|
2496
|
+
const VERSION$v = "c470aba735607497dd11c1fcd34489d1";
|
|
2497
|
+
function validate$W(obj, path = 'AvailableTopic') {
|
|
2435
2498
|
const v_error = (() => {
|
|
2436
2499
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2437
2500
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2438
2501
|
}
|
|
2439
|
-
if (obj.
|
|
2440
|
-
const
|
|
2441
|
-
const
|
|
2442
|
-
if (typeof
|
|
2443
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2502
|
+
if (obj.parentWorkTypeGroupName !== undefined) {
|
|
2503
|
+
const obj_parentWorkTypeGroupName = obj.parentWorkTypeGroupName;
|
|
2504
|
+
const path_parentWorkTypeGroupName = path + '.parentWorkTypeGroupName';
|
|
2505
|
+
if (typeof obj_parentWorkTypeGroupName !== 'string') {
|
|
2506
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentWorkTypeGroupName + '" (at "' + path_parentWorkTypeGroupName + '")');
|
|
2444
2507
|
}
|
|
2445
2508
|
}
|
|
2446
|
-
if (obj.
|
|
2447
|
-
const
|
|
2448
|
-
const
|
|
2449
|
-
if (typeof
|
|
2450
|
-
return new TypeError('Expected "
|
|
2509
|
+
if (obj.serviceTerritoryWorkTypes !== undefined) {
|
|
2510
|
+
const obj_serviceTerritoryWorkTypes = obj.serviceTerritoryWorkTypes;
|
|
2511
|
+
const path_serviceTerritoryWorkTypes = path + '.serviceTerritoryWorkTypes';
|
|
2512
|
+
if (typeof obj_serviceTerritoryWorkTypes !== 'object' || ArrayIsArray(obj_serviceTerritoryWorkTypes) || obj_serviceTerritoryWorkTypes === null) {
|
|
2513
|
+
return new TypeError('Expected "object" but received "' + typeof obj_serviceTerritoryWorkTypes + '" (at "' + path_serviceTerritoryWorkTypes + '")');
|
|
2451
2514
|
}
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
if (typeof obj_durationUnit !== 'string') {
|
|
2460
|
-
return new TypeError('Expected "string" but received "' + typeof obj_durationUnit + '" (at "' + path_durationUnit + '")');
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
if (obj.fulfilledBy !== undefined) {
|
|
2464
|
-
const obj_fulfilledBy = obj.fulfilledBy;
|
|
2465
|
-
const path_fulfilledBy = path + '.fulfilledBy';
|
|
2466
|
-
if (!ArrayIsArray(obj_fulfilledBy)) {
|
|
2467
|
-
return new TypeError('Expected "array" but received "' + typeof obj_fulfilledBy + '" (at "' + path_fulfilledBy + '")');
|
|
2468
|
-
}
|
|
2469
|
-
for (let i = 0; i < obj_fulfilledBy.length; i++) {
|
|
2470
|
-
const obj_fulfilledBy_item = obj_fulfilledBy[i];
|
|
2471
|
-
const path_fulfilledBy_item = path_fulfilledBy + '[' + i + ']';
|
|
2472
|
-
const referencepath_fulfilledBy_itemValidationError = validate$1c(obj_fulfilledBy_item, path_fulfilledBy_item);
|
|
2473
|
-
if (referencepath_fulfilledBy_itemValidationError !== null) {
|
|
2474
|
-
let message = 'Object doesn\'t match LearningFulfiller (at "' + path_fulfilledBy_item + '")\n';
|
|
2475
|
-
message += referencepath_fulfilledBy_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2476
|
-
return new TypeError(message);
|
|
2515
|
+
const obj_serviceTerritoryWorkTypes_keys = ObjectKeys(obj_serviceTerritoryWorkTypes);
|
|
2516
|
+
for (let i = 0; i < obj_serviceTerritoryWorkTypes_keys.length; i++) {
|
|
2517
|
+
const key = obj_serviceTerritoryWorkTypes_keys[i];
|
|
2518
|
+
const obj_serviceTerritoryWorkTypes_prop = obj_serviceTerritoryWorkTypes[key];
|
|
2519
|
+
const path_serviceTerritoryWorkTypes_prop = path_serviceTerritoryWorkTypes + '["' + key + '"]';
|
|
2520
|
+
if (obj_serviceTerritoryWorkTypes_prop === undefined) {
|
|
2521
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_serviceTerritoryWorkTypes_prop + '" (at "' + path_serviceTerritoryWorkTypes_prop + '")');
|
|
2477
2522
|
}
|
|
2478
2523
|
}
|
|
2479
2524
|
}
|
|
2480
|
-
if (obj.
|
|
2481
|
-
const
|
|
2482
|
-
const
|
|
2483
|
-
if (typeof
|
|
2484
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
if (obj.learningAchievementId !== undefined) {
|
|
2488
|
-
const obj_learningAchievementId = obj.learningAchievementId;
|
|
2489
|
-
const path_learningAchievementId = path + '.learningAchievementId';
|
|
2490
|
-
if (typeof obj_learningAchievementId !== 'string') {
|
|
2491
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningAchievementId + '" (at "' + path_learningAchievementId + '")');
|
|
2492
|
-
}
|
|
2493
|
-
}
|
|
2494
|
-
if (obj.learningAchievementType !== undefined) {
|
|
2495
|
-
const obj_learningAchievementType = obj.learningAchievementType;
|
|
2496
|
-
const path_learningAchievementType = path + '.learningAchievementType';
|
|
2497
|
-
if (typeof obj_learningAchievementType !== 'string') {
|
|
2498
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningAchievementType + '" (at "' + path_learningAchievementType + '")');
|
|
2499
|
-
}
|
|
2500
|
-
}
|
|
2501
|
-
if (obj.learningProgramPlanRequirementId !== undefined) {
|
|
2502
|
-
const obj_learningProgramPlanRequirementId = obj.learningProgramPlanRequirementId;
|
|
2503
|
-
const path_learningProgramPlanRequirementId = path + '.learningProgramPlanRequirementId';
|
|
2504
|
-
if (typeof obj_learningProgramPlanRequirementId !== 'string') {
|
|
2505
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanRequirementId + '" (at "' + path_learningProgramPlanRequirementId + '")');
|
|
2506
|
-
}
|
|
2507
|
-
}
|
|
2508
|
-
if (obj.name !== undefined) {
|
|
2509
|
-
const obj_name = obj.name;
|
|
2510
|
-
const path_name = path + '.name';
|
|
2511
|
-
if (typeof obj_name !== 'string') {
|
|
2512
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
})();
|
|
2516
|
-
return v_error === undefined ? null : v_error;
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
function validate$W(obj, path = 'LearnerProgramRequirement') {
|
|
2520
|
-
const v_error = (() => {
|
|
2521
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2522
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2523
|
-
}
|
|
2524
|
-
if (obj.description !== undefined) {
|
|
2525
|
-
const obj_description = obj.description;
|
|
2526
|
-
const path_description = path + '.description';
|
|
2527
|
-
if (typeof obj_description !== 'string') {
|
|
2528
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2529
|
-
}
|
|
2530
|
-
}
|
|
2531
|
-
const obj_learnerProgramId = obj.learnerProgramId;
|
|
2532
|
-
const path_learnerProgramId = path + '.learnerProgramId';
|
|
2533
|
-
if (typeof obj_learnerProgramId !== 'string') {
|
|
2534
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learnerProgramId + '" (at "' + path_learnerProgramId + '")');
|
|
2535
|
-
}
|
|
2536
|
-
if (obj.learnerProgramRequirementId !== undefined) {
|
|
2537
|
-
const obj_learnerProgramRequirementId = obj.learnerProgramRequirementId;
|
|
2538
|
-
const path_learnerProgramRequirementId = path + '.learnerProgramRequirementId';
|
|
2539
|
-
if (typeof obj_learnerProgramRequirementId !== 'string') {
|
|
2540
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learnerProgramRequirementId + '" (at "' + path_learnerProgramRequirementId + '")');
|
|
2541
|
-
}
|
|
2542
|
-
}
|
|
2543
|
-
if (obj.learningProgramPlanRequirement !== undefined) {
|
|
2544
|
-
const obj_learningProgramPlanRequirement = obj.learningProgramPlanRequirement;
|
|
2545
|
-
const path_learningProgramPlanRequirement = path + '.learningProgramPlanRequirement';
|
|
2546
|
-
const referencepath_learningProgramPlanRequirementValidationError = validate$X(obj_learningProgramPlanRequirement, path_learningProgramPlanRequirement);
|
|
2547
|
-
if (referencepath_learningProgramPlanRequirementValidationError !== null) {
|
|
2548
|
-
let message = 'Object doesn\'t match LearningProgramPlanRequirementOutput (at "' + path_learningProgramPlanRequirement + '")\n';
|
|
2549
|
-
message += referencepath_learningProgramPlanRequirementValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2550
|
-
return new TypeError(message);
|
|
2551
|
-
}
|
|
2552
|
-
}
|
|
2553
|
-
if (obj.learningProgramPlanRequirementId !== undefined) {
|
|
2554
|
-
const obj_learningProgramPlanRequirementId = obj.learningProgramPlanRequirementId;
|
|
2555
|
-
const path_learningProgramPlanRequirementId = path + '.learningProgramPlanRequirementId';
|
|
2556
|
-
if (typeof obj_learningProgramPlanRequirementId !== 'string') {
|
|
2557
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanRequirementId + '" (at "' + path_learningProgramPlanRequirementId + '")');
|
|
2558
|
-
}
|
|
2559
|
-
}
|
|
2560
|
-
const obj_name = obj.name;
|
|
2561
|
-
const path_name = path + '.name';
|
|
2562
|
-
if (typeof obj_name !== 'string') {
|
|
2563
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2564
|
-
}
|
|
2565
|
-
if (obj.requirementDurationsByUnit !== undefined) {
|
|
2566
|
-
const obj_requirementDurationsByUnit = obj.requirementDurationsByUnit;
|
|
2567
|
-
const path_requirementDurationsByUnit = path + '.requirementDurationsByUnit';
|
|
2568
|
-
if (typeof obj_requirementDurationsByUnit !== 'object' || ArrayIsArray(obj_requirementDurationsByUnit) || obj_requirementDurationsByUnit === null) {
|
|
2569
|
-
return new TypeError('Expected "object" but received "' + typeof obj_requirementDurationsByUnit + '" (at "' + path_requirementDurationsByUnit + '")');
|
|
2570
|
-
}
|
|
2571
|
-
const obj_requirementDurationsByUnit_keys = ObjectKeys(obj_requirementDurationsByUnit);
|
|
2572
|
-
for (let i = 0; i < obj_requirementDurationsByUnit_keys.length; i++) {
|
|
2573
|
-
const key = obj_requirementDurationsByUnit_keys[i];
|
|
2574
|
-
const obj_requirementDurationsByUnit_prop = obj_requirementDurationsByUnit[key];
|
|
2575
|
-
const path_requirementDurationsByUnit_prop = path_requirementDurationsByUnit + '["' + key + '"]';
|
|
2576
|
-
if (obj_requirementDurationsByUnit_prop === undefined) {
|
|
2577
|
-
return new TypeError('Expected "defined" but received "' + typeof obj_requirementDurationsByUnit_prop + '" (at "' + path_requirementDurationsByUnit_prop + '")');
|
|
2578
|
-
}
|
|
2525
|
+
if (obj.workTypeGroupId !== undefined) {
|
|
2526
|
+
const obj_workTypeGroupId = obj.workTypeGroupId;
|
|
2527
|
+
const path_workTypeGroupId = path + '.workTypeGroupId';
|
|
2528
|
+
if (typeof obj_workTypeGroupId !== 'string') {
|
|
2529
|
+
return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
|
|
2579
2530
|
}
|
|
2580
2531
|
}
|
|
2581
|
-
if (obj.
|
|
2582
|
-
const
|
|
2583
|
-
const
|
|
2584
|
-
if (typeof
|
|
2585
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
2532
|
+
if (obj.workTypeGroupName !== undefined) {
|
|
2533
|
+
const obj_workTypeGroupName = obj.workTypeGroupName;
|
|
2534
|
+
const path_workTypeGroupName = path + '.workTypeGroupName';
|
|
2535
|
+
if (typeof obj_workTypeGroupName !== 'string') {
|
|
2536
|
+
return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupName + '" (at "' + path_workTypeGroupName + '")');
|
|
2586
2537
|
}
|
|
2587
2538
|
}
|
|
2588
2539
|
})();
|
|
2589
2540
|
return v_error === undefined ? null : v_error;
|
|
2590
2541
|
}
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
if (obj.learnerContactId !== undefined) {
|
|
2619
|
-
const obj_learnerContactId = obj.learnerContactId;
|
|
2620
|
-
const path_learnerContactId = path + '.learnerContactId';
|
|
2621
|
-
if (typeof obj_learnerContactId !== 'string') {
|
|
2622
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learnerContactId + '" (at "' + path_learnerContactId + '")');
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2625
|
-
if (obj.learnerProgramId !== undefined) {
|
|
2626
|
-
const obj_learnerProgramId = obj.learnerProgramId;
|
|
2627
|
-
const path_learnerProgramId = path + '.learnerProgramId';
|
|
2628
|
-
if (typeof obj_learnerProgramId !== 'string') {
|
|
2629
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learnerProgramId + '" (at "' + path_learnerProgramId + '")');
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
if (obj.learningId !== undefined) {
|
|
2633
|
-
const obj_learningId = obj.learningId;
|
|
2634
|
-
const path_learningId = path + '.learningId';
|
|
2635
|
-
if (typeof obj_learningId !== 'string') {
|
|
2636
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningId + '" (at "' + path_learningId + '")');
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
if (obj.learningOutcomeItem !== undefined) {
|
|
2640
|
-
const obj_learningOutcomeItem = obj.learningOutcomeItem;
|
|
2641
|
-
const path_learningOutcomeItem = path + '.learningOutcomeItem';
|
|
2642
|
-
const referencepath_learningOutcomeItemValidationError = validate$1e(obj_learningOutcomeItem, path_learningOutcomeItem);
|
|
2643
|
-
if (referencepath_learningOutcomeItemValidationError !== null) {
|
|
2644
|
-
let message = 'Object doesn\'t match LearningOutcomeItemOutput (at "' + path_learningOutcomeItem + '")\n';
|
|
2645
|
-
message += referencepath_learningOutcomeItemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2646
|
-
return new TypeError(message);
|
|
2647
|
-
}
|
|
2648
|
-
}
|
|
2649
|
-
if (obj.learningProgramAcademicLevel !== undefined) {
|
|
2650
|
-
const obj_learningProgramAcademicLevel = obj.learningProgramAcademicLevel;
|
|
2651
|
-
const path_learningProgramAcademicLevel = path + '.learningProgramAcademicLevel';
|
|
2652
|
-
if (typeof obj_learningProgramAcademicLevel !== 'string') {
|
|
2653
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramAcademicLevel + '" (at "' + path_learningProgramAcademicLevel + '")');
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
if (obj.learningProgramCipCode !== undefined) {
|
|
2657
|
-
const obj_learningProgramCipCode = obj.learningProgramCipCode;
|
|
2658
|
-
const path_learningProgramCipCode = path + '.learningProgramCipCode';
|
|
2659
|
-
if (typeof obj_learningProgramCipCode !== 'string') {
|
|
2660
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramCipCode + '" (at "' + path_learningProgramCipCode + '")');
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
|
-
if (obj.learningProgramId !== undefined) {
|
|
2664
|
-
const obj_learningProgramId = obj.learningProgramId;
|
|
2665
|
-
const path_learningProgramId = path + '.learningProgramId';
|
|
2666
|
-
if (typeof obj_learningProgramId !== 'string') {
|
|
2667
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramId + '" (at "' + path_learningProgramId + '")');
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
if (obj.learningProgramName !== undefined) {
|
|
2671
|
-
const obj_learningProgramName = obj.learningProgramName;
|
|
2672
|
-
const path_learningProgramName = path + '.learningProgramName';
|
|
2673
|
-
if (typeof obj_learningProgramName !== 'string') {
|
|
2674
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramName + '" (at "' + path_learningProgramName + '")');
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
if (obj.learningProgramPlanId !== undefined) {
|
|
2678
|
-
const obj_learningProgramPlanId = obj.learningProgramPlanId;
|
|
2679
|
-
const path_learningProgramPlanId = path + '.learningProgramPlanId';
|
|
2680
|
-
if (typeof obj_learningProgramPlanId !== 'string') {
|
|
2681
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanId + '" (at "' + path_learningProgramPlanId + '")');
|
|
2682
|
-
}
|
|
2683
|
-
}
|
|
2684
|
-
if (obj.learningProgramPlanName !== undefined) {
|
|
2685
|
-
const obj_learningProgramPlanName = obj.learningProgramPlanName;
|
|
2686
|
-
const path_learningProgramPlanName = path + '.learningProgramPlanName';
|
|
2687
|
-
if (typeof obj_learningProgramPlanName !== 'string') {
|
|
2688
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanName + '" (at "' + path_learningProgramPlanName + '")');
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
if (obj.learningProgramProviderId !== undefined) {
|
|
2692
|
-
const obj_learningProgramProviderId = obj.learningProgramProviderId;
|
|
2693
|
-
const path_learningProgramProviderId = path + '.learningProgramProviderId';
|
|
2694
|
-
if (typeof obj_learningProgramProviderId !== 'string') {
|
|
2695
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramProviderId + '" (at "' + path_learningProgramProviderId + '")');
|
|
2696
|
-
}
|
|
2697
|
-
}
|
|
2698
|
-
if (obj.learningProgramProviderName !== undefined) {
|
|
2699
|
-
const obj_learningProgramProviderName = obj.learningProgramProviderName;
|
|
2700
|
-
const path_learningProgramProviderName = path + '.learningProgramProviderName';
|
|
2701
|
-
if (typeof obj_learningProgramProviderName !== 'string') {
|
|
2702
|
-
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramProviderName + '" (at "' + path_learningProgramProviderName + '")');
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
if (obj.name !== undefined) {
|
|
2706
|
-
const obj_name = obj.name;
|
|
2707
|
-
const path_name = path + '.name';
|
|
2708
|
-
if (typeof obj_name !== 'string') {
|
|
2709
|
-
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2542
|
+
const select$O = function AvailableTopicSelect() {
|
|
2543
|
+
return {
|
|
2544
|
+
kind: 'Fragment',
|
|
2545
|
+
version: VERSION$v,
|
|
2546
|
+
private: [],
|
|
2547
|
+
selections: [
|
|
2548
|
+
{
|
|
2549
|
+
name: 'parentWorkTypeGroupName',
|
|
2550
|
+
kind: 'Scalar',
|
|
2551
|
+
required: false
|
|
2552
|
+
},
|
|
2553
|
+
{
|
|
2554
|
+
name: 'serviceTerritoryWorkTypes',
|
|
2555
|
+
kind: 'Object',
|
|
2556
|
+
// any
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
name: 'workTypeGroupId',
|
|
2560
|
+
kind: 'Scalar',
|
|
2561
|
+
required: false
|
|
2562
|
+
},
|
|
2563
|
+
{
|
|
2564
|
+
name: 'workTypeGroupName',
|
|
2565
|
+
kind: 'Scalar',
|
|
2566
|
+
required: false
|
|
2710
2567
|
}
|
|
2568
|
+
]
|
|
2569
|
+
};
|
|
2570
|
+
};
|
|
2571
|
+
function equals$v(existing, incoming) {
|
|
2572
|
+
const existing_parentWorkTypeGroupName = existing.parentWorkTypeGroupName;
|
|
2573
|
+
const incoming_parentWorkTypeGroupName = incoming.parentWorkTypeGroupName;
|
|
2574
|
+
// if at least one of these optionals is defined
|
|
2575
|
+
if (existing_parentWorkTypeGroupName !== undefined || incoming_parentWorkTypeGroupName !== undefined) {
|
|
2576
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2577
|
+
// not equal
|
|
2578
|
+
if (existing_parentWorkTypeGroupName === undefined || incoming_parentWorkTypeGroupName === undefined) {
|
|
2579
|
+
return false;
|
|
2711
2580
|
}
|
|
2712
|
-
if (
|
|
2713
|
-
|
|
2714
|
-
const path_parentLearnerProgramId = path + '.parentLearnerProgramId';
|
|
2715
|
-
if (typeof obj_parentLearnerProgramId !== 'string') {
|
|
2716
|
-
return new TypeError('Expected "string" but received "' + typeof obj_parentLearnerProgramId + '" (at "' + path_parentLearnerProgramId + '")');
|
|
2717
|
-
}
|
|
2581
|
+
if (!(existing_parentWorkTypeGroupName === incoming_parentWorkTypeGroupName)) {
|
|
2582
|
+
return false;
|
|
2718
2583
|
}
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
const referencepath_requirements_itemValidationError = validate$W(obj_requirements_item, path_requirements_item);
|
|
2729
|
-
if (referencepath_requirements_itemValidationError !== null) {
|
|
2730
|
-
let message = 'Object doesn\'t match LearnerProgramRequirement (at "' + path_requirements_item + '")\n';
|
|
2731
|
-
message += referencepath_requirements_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2732
|
-
return new TypeError(message);
|
|
2733
|
-
}
|
|
2734
|
-
}
|
|
2584
|
+
}
|
|
2585
|
+
const existing_workTypeGroupId = existing.workTypeGroupId;
|
|
2586
|
+
const incoming_workTypeGroupId = incoming.workTypeGroupId;
|
|
2587
|
+
// if at least one of these optionals is defined
|
|
2588
|
+
if (existing_workTypeGroupId !== undefined || incoming_workTypeGroupId !== undefined) {
|
|
2589
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2590
|
+
// not equal
|
|
2591
|
+
if (existing_workTypeGroupId === undefined || incoming_workTypeGroupId === undefined) {
|
|
2592
|
+
return false;
|
|
2735
2593
|
}
|
|
2736
|
-
if (
|
|
2737
|
-
|
|
2738
|
-
const path_startDate = path + '.startDate';
|
|
2739
|
-
if (typeof obj_startDate !== 'string') {
|
|
2740
|
-
return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
|
|
2741
|
-
}
|
|
2594
|
+
if (!(existing_workTypeGroupId === incoming_workTypeGroupId)) {
|
|
2595
|
+
return false;
|
|
2742
2596
|
}
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2597
|
+
}
|
|
2598
|
+
const existing_workTypeGroupName = existing.workTypeGroupName;
|
|
2599
|
+
const incoming_workTypeGroupName = incoming.workTypeGroupName;
|
|
2600
|
+
// if at least one of these optionals is defined
|
|
2601
|
+
if (existing_workTypeGroupName !== undefined || incoming_workTypeGroupName !== undefined) {
|
|
2602
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2603
|
+
// not equal
|
|
2604
|
+
if (existing_workTypeGroupName === undefined || incoming_workTypeGroupName === undefined) {
|
|
2605
|
+
return false;
|
|
2606
|
+
}
|
|
2607
|
+
if (!(existing_workTypeGroupName === incoming_workTypeGroupName)) {
|
|
2608
|
+
return false;
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
const existing_serviceTerritoryWorkTypes = existing.serviceTerritoryWorkTypes;
|
|
2612
|
+
const incoming_serviceTerritoryWorkTypes = incoming.serviceTerritoryWorkTypes;
|
|
2613
|
+
// if at least one of these optionals is defined
|
|
2614
|
+
if (existing_serviceTerritoryWorkTypes !== undefined || incoming_serviceTerritoryWorkTypes !== undefined) {
|
|
2615
|
+
// if one of these is not defined we know the other is defined and therefore
|
|
2616
|
+
// not equal
|
|
2617
|
+
if (existing_serviceTerritoryWorkTypes === undefined || incoming_serviceTerritoryWorkTypes === undefined) {
|
|
2618
|
+
return false;
|
|
2619
|
+
}
|
|
2620
|
+
const equals_serviceTerritoryWorkTypes_props = equalsObject(existing_serviceTerritoryWorkTypes, incoming_serviceTerritoryWorkTypes, (existing_serviceTerritoryWorkTypes_prop, incoming_serviceTerritoryWorkTypes_prop) => {
|
|
2621
|
+
if (JSONStringify(incoming_serviceTerritoryWorkTypes_prop) !== JSONStringify(existing_serviceTerritoryWorkTypes_prop)) {
|
|
2622
|
+
return false;
|
|
2748
2623
|
}
|
|
2624
|
+
});
|
|
2625
|
+
if (equals_serviceTerritoryWorkTypes_props === false) {
|
|
2626
|
+
return false;
|
|
2749
2627
|
}
|
|
2750
|
-
}
|
|
2751
|
-
return
|
|
2628
|
+
}
|
|
2629
|
+
return true;
|
|
2752
2630
|
}
|
|
2753
2631
|
|
|
2754
|
-
const VERSION$u = "
|
|
2755
|
-
function validate$
|
|
2632
|
+
const VERSION$u = "3cb0110faf688dc57056aa83be527181";
|
|
2633
|
+
function validate$V(obj, path = 'AvailableTopicsOutputRepresentation') {
|
|
2756
2634
|
const v_error = (() => {
|
|
2757
2635
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2758
2636
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2759
2637
|
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
return new TypeError('Expected "array" but received "' + typeof obj_learnerPrograms + '" (at "' + path_learnerPrograms + '")');
|
|
2765
|
-
}
|
|
2766
|
-
for (let i = 0; i < obj_learnerPrograms.length; i++) {
|
|
2767
|
-
const obj_learnerPrograms_item = obj_learnerPrograms[i];
|
|
2768
|
-
const path_learnerPrograms_item = path_learnerPrograms + '[' + i + ']';
|
|
2769
|
-
const referencepath_learnerPrograms_itemValidationError = validate$V(obj_learnerPrograms_item, path_learnerPrograms_item);
|
|
2770
|
-
if (referencepath_learnerPrograms_itemValidationError !== null) {
|
|
2771
|
-
let message = 'Object doesn\'t match LearnerProgram (at "' + path_learnerPrograms_item + '")\n';
|
|
2772
|
-
message += referencepath_learnerPrograms_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2773
|
-
return new TypeError(message);
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2638
|
+
const obj_topics = obj.topics;
|
|
2639
|
+
const path_topics = path + '.topics';
|
|
2640
|
+
if (!ArrayIsArray(obj_topics)) {
|
|
2641
|
+
return new TypeError('Expected "array" but received "' + typeof obj_topics + '" (at "' + path_topics + '")');
|
|
2776
2642
|
}
|
|
2777
|
-
|
|
2778
|
-
const
|
|
2779
|
-
const
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
const path_nonRequiredLearnings_item = path_nonRequiredLearnings + '[' + i + ']';
|
|
2786
|
-
const referencepath_nonRequiredLearnings_itemValidationError = validate$1c(obj_nonRequiredLearnings_item, path_nonRequiredLearnings_item);
|
|
2787
|
-
if (referencepath_nonRequiredLearnings_itemValidationError !== null) {
|
|
2788
|
-
let message = 'Object doesn\'t match LearningFulfiller (at "' + path_nonRequiredLearnings_item + '")\n';
|
|
2789
|
-
message += referencepath_nonRequiredLearnings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2790
|
-
return new TypeError(message);
|
|
2791
|
-
}
|
|
2643
|
+
for (let i = 0; i < obj_topics.length; i++) {
|
|
2644
|
+
const obj_topics_item = obj_topics[i];
|
|
2645
|
+
const path_topics_item = path_topics + '[' + i + ']';
|
|
2646
|
+
const referencepath_topics_itemValidationError = validate$W(obj_topics_item, path_topics_item);
|
|
2647
|
+
if (referencepath_topics_itemValidationError !== null) {
|
|
2648
|
+
let message = 'Object doesn\'t match AvailableTopic (at "' + path_topics_item + '")\n';
|
|
2649
|
+
message += referencepath_topics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2650
|
+
return new TypeError(message);
|
|
2792
2651
|
}
|
|
2793
2652
|
}
|
|
2794
2653
|
})();
|
|
2795
2654
|
return v_error === undefined ? null : v_error;
|
|
2796
2655
|
}
|
|
2797
|
-
const RepresentationType$h = '
|
|
2656
|
+
const RepresentationType$h = 'AvailableTopicsOutputRepresentation';
|
|
2798
2657
|
function normalize$h(input, existing, path, luvio, store, timestamp) {
|
|
2799
2658
|
return input;
|
|
2800
2659
|
}
|
|
2801
|
-
const select$
|
|
2660
|
+
const select$N = function AvailableTopicsOutputRepresentationSelect() {
|
|
2661
|
+
const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$O();
|
|
2802
2662
|
return {
|
|
2803
2663
|
kind: 'Fragment',
|
|
2804
2664
|
version: VERSION$u,
|
|
2805
2665
|
private: [],
|
|
2806
|
-
|
|
2666
|
+
selections: [
|
|
2667
|
+
{
|
|
2668
|
+
name: 'topics',
|
|
2669
|
+
kind: 'Object',
|
|
2670
|
+
plural: true,
|
|
2671
|
+
selections: AvailableTopic__selections
|
|
2672
|
+
}
|
|
2673
|
+
]
|
|
2807
2674
|
};
|
|
2808
2675
|
};
|
|
2809
2676
|
function equals$u(existing, incoming) {
|
|
2810
|
-
|
|
2677
|
+
const existing_topics = existing.topics;
|
|
2678
|
+
const incoming_topics = incoming.topics;
|
|
2679
|
+
const equals_topics_items = equalsArray(existing_topics, incoming_topics, (existing_topics_item, incoming_topics_item) => {
|
|
2680
|
+
if (!(equals$v(existing_topics_item, incoming_topics_item))) {
|
|
2681
|
+
return false;
|
|
2682
|
+
}
|
|
2683
|
+
});
|
|
2684
|
+
if (equals_topics_items === false) {
|
|
2811
2685
|
return false;
|
|
2812
2686
|
}
|
|
2813
2687
|
return true;
|
|
2814
2688
|
}
|
|
2815
|
-
const ingest$h = function
|
|
2689
|
+
const ingest$h = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2816
2690
|
if (process.env.NODE_ENV !== 'production') {
|
|
2817
|
-
const validateError = validate$
|
|
2691
|
+
const validateError = validate$V(input);
|
|
2818
2692
|
if (validateError !== null) {
|
|
2819
2693
|
throw validateError;
|
|
2820
2694
|
}
|
|
@@ -2834,22 +2708,22 @@ function getTypeCacheKeys$h(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
2834
2708
|
});
|
|
2835
2709
|
}
|
|
2836
2710
|
|
|
2837
|
-
function select$
|
|
2838
|
-
return select$
|
|
2711
|
+
function select$M(luvio, params) {
|
|
2712
|
+
return select$N();
|
|
2839
2713
|
}
|
|
2840
|
-
function keyBuilder$
|
|
2841
|
-
return keyPrefix + '::
|
|
2714
|
+
function keyBuilder$u(luvio, params) {
|
|
2715
|
+
return keyPrefix + '::AvailableTopicsOutputRepresentation:(' + ')';
|
|
2842
2716
|
}
|
|
2843
|
-
function getResponseCacheKeys$
|
|
2844
|
-
getTypeCacheKeys$h(storeKeyMap, luvio, response, () => keyBuilder$
|
|
2717
|
+
function getResponseCacheKeys$i(storeKeyMap, luvio, resourceParams, response) {
|
|
2718
|
+
getTypeCacheKeys$h(storeKeyMap, luvio, response, () => keyBuilder$u());
|
|
2845
2719
|
}
|
|
2846
|
-
function ingestSuccess$
|
|
2720
|
+
function ingestSuccess$i(luvio, resourceParams, response, snapshotRefresh) {
|
|
2847
2721
|
const { body } = response;
|
|
2848
|
-
const key = keyBuilder$
|
|
2722
|
+
const key = keyBuilder$u();
|
|
2849
2723
|
luvio.storeIngest(key, ingest$h, body);
|
|
2850
2724
|
const snapshot = luvio.storeLookup({
|
|
2851
2725
|
recordId: key,
|
|
2852
|
-
node: select$
|
|
2726
|
+
node: select$M(),
|
|
2853
2727
|
variables: {},
|
|
2854
2728
|
}, snapshotRefresh);
|
|
2855
2729
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2860,282 +2734,477 @@ function ingestSuccess$j(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2860
2734
|
deepFreeze(snapshot.data);
|
|
2861
2735
|
return snapshot;
|
|
2862
2736
|
}
|
|
2863
|
-
function ingestError$
|
|
2864
|
-
const key = keyBuilder$
|
|
2737
|
+
function ingestError$c(luvio, params, error, snapshotRefresh) {
|
|
2738
|
+
const key = keyBuilder$u();
|
|
2865
2739
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2866
2740
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2867
2741
|
return errorSnapshot;
|
|
2868
2742
|
}
|
|
2869
|
-
function createResourceRequest$
|
|
2743
|
+
function createResourceRequest$i(config) {
|
|
2870
2744
|
const headers = {};
|
|
2871
2745
|
return {
|
|
2872
2746
|
baseUri: '/services/data/v62.0',
|
|
2873
|
-
basePath: '/connect/education/
|
|
2747
|
+
basePath: '/connect/education/appointment-booking/available-topics',
|
|
2874
2748
|
method: 'get',
|
|
2875
2749
|
body: null,
|
|
2876
|
-
urlParams:
|
|
2877
|
-
queryParams:
|
|
2750
|
+
urlParams: {},
|
|
2751
|
+
queryParams: {},
|
|
2878
2752
|
headers,
|
|
2879
2753
|
priority: 'normal',
|
|
2880
2754
|
};
|
|
2881
2755
|
}
|
|
2882
2756
|
|
|
2883
|
-
const adapterName$
|
|
2884
|
-
const
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
function keyBuilder$s(luvio, config) {
|
|
2891
|
-
const resourceParams = createResourceParams$j(config);
|
|
2892
|
-
return keyBuilder$t(luvio, resourceParams);
|
|
2757
|
+
const adapterName$i = 'getAvailableTopics';
|
|
2758
|
+
const getAvailableTopics_ConfigPropertyMetadata = [];
|
|
2759
|
+
const getAvailableTopics_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$i, getAvailableTopics_ConfigPropertyMetadata);
|
|
2760
|
+
const createResourceParams$i = /*#__PURE__*/ createResourceParams$p(getAvailableTopics_ConfigPropertyMetadata);
|
|
2761
|
+
function keyBuilder$t(luvio, config) {
|
|
2762
|
+
createResourceParams$i(config);
|
|
2763
|
+
return keyBuilder$u();
|
|
2893
2764
|
}
|
|
2894
|
-
function typeCheckConfig$
|
|
2765
|
+
function typeCheckConfig$i(untrustedConfig) {
|
|
2895
2766
|
const config = {};
|
|
2896
|
-
typeCheckConfig$p(untrustedConfig, config, getLearnerProgress_ConfigPropertyMetadata);
|
|
2897
2767
|
return config;
|
|
2898
2768
|
}
|
|
2899
|
-
function validateAdapterConfig$
|
|
2769
|
+
function validateAdapterConfig$i(untrustedConfig, configPropertyNames) {
|
|
2900
2770
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2901
2771
|
return null;
|
|
2902
2772
|
}
|
|
2903
2773
|
if (process.env.NODE_ENV !== 'production') {
|
|
2904
2774
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2905
2775
|
}
|
|
2906
|
-
const config = typeCheckConfig$
|
|
2776
|
+
const config = typeCheckConfig$i();
|
|
2907
2777
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2908
2778
|
return null;
|
|
2909
2779
|
}
|
|
2910
2780
|
return config;
|
|
2911
2781
|
}
|
|
2912
|
-
function adapterFragment$
|
|
2913
|
-
createResourceParams$
|
|
2914
|
-
return select$
|
|
2782
|
+
function adapterFragment$c(luvio, config) {
|
|
2783
|
+
createResourceParams$i(config);
|
|
2784
|
+
return select$M();
|
|
2915
2785
|
}
|
|
2916
|
-
function onFetchResponseSuccess$
|
|
2917
|
-
const snapshot = ingestSuccess$
|
|
2786
|
+
function onFetchResponseSuccess$c(luvio, config, resourceParams, response) {
|
|
2787
|
+
const snapshot = ingestSuccess$i(luvio, resourceParams, response, {
|
|
2918
2788
|
config,
|
|
2919
|
-
resolve: () => buildNetworkSnapshot$
|
|
2789
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
2920
2790
|
});
|
|
2921
2791
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2922
2792
|
}
|
|
2923
|
-
function onFetchResponseError$
|
|
2924
|
-
const snapshot = ingestError$
|
|
2793
|
+
function onFetchResponseError$c(luvio, config, resourceParams, response) {
|
|
2794
|
+
const snapshot = ingestError$c(luvio, resourceParams, response, {
|
|
2925
2795
|
config,
|
|
2926
|
-
resolve: () => buildNetworkSnapshot$
|
|
2796
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
2927
2797
|
});
|
|
2928
2798
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2929
2799
|
}
|
|
2930
|
-
function buildNetworkSnapshot$
|
|
2931
|
-
const resourceParams = createResourceParams$
|
|
2932
|
-
const request = createResourceRequest$
|
|
2800
|
+
function buildNetworkSnapshot$i(luvio, config, options) {
|
|
2801
|
+
const resourceParams = createResourceParams$i(config);
|
|
2802
|
+
const request = createResourceRequest$i();
|
|
2933
2803
|
return luvio.dispatchResourceRequest(request, options)
|
|
2934
2804
|
.then((response) => {
|
|
2935
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2805
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$c(luvio, config, resourceParams, response), () => {
|
|
2936
2806
|
const cache = new StoreKeyMap();
|
|
2937
|
-
getResponseCacheKeys$
|
|
2807
|
+
getResponseCacheKeys$i(cache, luvio, resourceParams, response.body);
|
|
2938
2808
|
return cache;
|
|
2939
2809
|
});
|
|
2940
2810
|
}, (response) => {
|
|
2941
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2811
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$c(luvio, config, resourceParams, response));
|
|
2942
2812
|
});
|
|
2943
2813
|
}
|
|
2944
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2945
|
-
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
2814
|
+
function buildNetworkSnapshotCachePolicy$c(context, coercedAdapterRequestContext) {
|
|
2815
|
+
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$i, undefined, false);
|
|
2946
2816
|
}
|
|
2947
|
-
function buildCachedSnapshotCachePolicy$
|
|
2817
|
+
function buildCachedSnapshotCachePolicy$c(context, storeLookup) {
|
|
2948
2818
|
const { luvio, config } = context;
|
|
2949
2819
|
const selector = {
|
|
2950
|
-
recordId: keyBuilder$
|
|
2951
|
-
node: adapterFragment$
|
|
2820
|
+
recordId: keyBuilder$t(luvio, config),
|
|
2821
|
+
node: adapterFragment$c(luvio, config),
|
|
2952
2822
|
variables: {},
|
|
2953
2823
|
};
|
|
2954
2824
|
const cacheSnapshot = storeLookup(selector, {
|
|
2955
2825
|
config,
|
|
2956
|
-
resolve: () => buildNetworkSnapshot$
|
|
2826
|
+
resolve: () => buildNetworkSnapshot$i(luvio, config, snapshotRefreshOptions)
|
|
2957
2827
|
});
|
|
2958
2828
|
return cacheSnapshot;
|
|
2959
2829
|
}
|
|
2960
|
-
const
|
|
2961
|
-
const config = validateAdapterConfig$
|
|
2962
|
-
// Invalid or incomplete config
|
|
2963
|
-
if (config === null) {
|
|
2964
|
-
return null;
|
|
2965
|
-
}
|
|
2966
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2967
|
-
buildCachedSnapshotCachePolicy$
|
|
2968
|
-
};
|
|
2830
|
+
const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvailableTopics(untrustedConfig, requestContext) {
|
|
2831
|
+
const config = validateAdapterConfig$i(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
|
|
2832
|
+
// Invalid or incomplete config
|
|
2833
|
+
if (config === null) {
|
|
2834
|
+
return null;
|
|
2835
|
+
}
|
|
2836
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2837
|
+
buildCachedSnapshotCachePolicy$c, buildNetworkSnapshotCachePolicy$c);
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
function validate$U(obj, path = 'LearningProgramPlanRequirementOutput') {
|
|
2841
|
+
const v_error = (() => {
|
|
2842
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2843
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2844
|
+
}
|
|
2845
|
+
if (obj.category !== undefined) {
|
|
2846
|
+
const obj_category = obj.category;
|
|
2847
|
+
const path_category = path + '.category';
|
|
2848
|
+
if (typeof obj_category !== 'string') {
|
|
2849
|
+
return new TypeError('Expected "string" but received "' + typeof obj_category + '" (at "' + path_category + '")');
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
if (obj.displayName !== undefined) {
|
|
2853
|
+
const obj_displayName = obj.displayName;
|
|
2854
|
+
const path_displayName = path + '.displayName';
|
|
2855
|
+
if (typeof obj_displayName !== 'string') {
|
|
2856
|
+
return new TypeError('Expected "string" but received "' + typeof obj_displayName + '" (at "' + path_displayName + '")');
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
if (obj.duration !== undefined) {
|
|
2860
|
+
obj.duration;
|
|
2861
|
+
}
|
|
2862
|
+
if (obj.durationUnit !== undefined) {
|
|
2863
|
+
const obj_durationUnit = obj.durationUnit;
|
|
2864
|
+
const path_durationUnit = path + '.durationUnit';
|
|
2865
|
+
if (typeof obj_durationUnit !== 'string') {
|
|
2866
|
+
return new TypeError('Expected "string" but received "' + typeof obj_durationUnit + '" (at "' + path_durationUnit + '")');
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
if (obj.fulfilledBy !== undefined) {
|
|
2870
|
+
const obj_fulfilledBy = obj.fulfilledBy;
|
|
2871
|
+
const path_fulfilledBy = path + '.fulfilledBy';
|
|
2872
|
+
if (!ArrayIsArray(obj_fulfilledBy)) {
|
|
2873
|
+
return new TypeError('Expected "array" but received "' + typeof obj_fulfilledBy + '" (at "' + path_fulfilledBy + '")');
|
|
2874
|
+
}
|
|
2875
|
+
for (let i = 0; i < obj_fulfilledBy.length; i++) {
|
|
2876
|
+
const obj_fulfilledBy_item = obj_fulfilledBy[i];
|
|
2877
|
+
const path_fulfilledBy_item = path_fulfilledBy + '[' + i + ']';
|
|
2878
|
+
const referencepath_fulfilledBy_itemValidationError = validate$1c(obj_fulfilledBy_item, path_fulfilledBy_item);
|
|
2879
|
+
if (referencepath_fulfilledBy_itemValidationError !== null) {
|
|
2880
|
+
let message = 'Object doesn\'t match LearningFulfiller (at "' + path_fulfilledBy_item + '")\n';
|
|
2881
|
+
message += referencepath_fulfilledBy_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2882
|
+
return new TypeError(message);
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
if (obj.groupName !== undefined) {
|
|
2887
|
+
const obj_groupName = obj.groupName;
|
|
2888
|
+
const path_groupName = path + '.groupName';
|
|
2889
|
+
if (typeof obj_groupName !== 'string') {
|
|
2890
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
if (obj.learningAchievementId !== undefined) {
|
|
2894
|
+
const obj_learningAchievementId = obj.learningAchievementId;
|
|
2895
|
+
const path_learningAchievementId = path + '.learningAchievementId';
|
|
2896
|
+
if (typeof obj_learningAchievementId !== 'string') {
|
|
2897
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningAchievementId + '" (at "' + path_learningAchievementId + '")');
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
if (obj.learningAchievementType !== undefined) {
|
|
2901
|
+
const obj_learningAchievementType = obj.learningAchievementType;
|
|
2902
|
+
const path_learningAchievementType = path + '.learningAchievementType';
|
|
2903
|
+
if (typeof obj_learningAchievementType !== 'string') {
|
|
2904
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningAchievementType + '" (at "' + path_learningAchievementType + '")');
|
|
2905
|
+
}
|
|
2906
|
+
}
|
|
2907
|
+
if (obj.learningProgramPlanRequirementId !== undefined) {
|
|
2908
|
+
const obj_learningProgramPlanRequirementId = obj.learningProgramPlanRequirementId;
|
|
2909
|
+
const path_learningProgramPlanRequirementId = path + '.learningProgramPlanRequirementId';
|
|
2910
|
+
if (typeof obj_learningProgramPlanRequirementId !== 'string') {
|
|
2911
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanRequirementId + '" (at "' + path_learningProgramPlanRequirementId + '")');
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
if (obj.name !== undefined) {
|
|
2915
|
+
const obj_name = obj.name;
|
|
2916
|
+
const path_name = path + '.name';
|
|
2917
|
+
if (typeof obj_name !== 'string') {
|
|
2918
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
})();
|
|
2922
|
+
return v_error === undefined ? null : v_error;
|
|
2923
|
+
}
|
|
2969
2924
|
|
|
2970
|
-
function validate$T(obj, path = '
|
|
2925
|
+
function validate$T(obj, path = 'LearnerProgramRequirement') {
|
|
2971
2926
|
const v_error = (() => {
|
|
2972
2927
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2973
2928
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2974
2929
|
}
|
|
2975
|
-
if (obj.
|
|
2976
|
-
const
|
|
2977
|
-
const
|
|
2978
|
-
if (
|
|
2979
|
-
return new TypeError('Expected "
|
|
2980
|
-
}
|
|
2981
|
-
for (let i = 0; i < obj_corequisites.length; i++) {
|
|
2982
|
-
const obj_corequisites_item = obj_corequisites[i];
|
|
2983
|
-
const path_corequisites_item = path_corequisites + '[' + i + ']';
|
|
2984
|
-
if (typeof obj_corequisites_item !== 'object' || ArrayIsArray(obj_corequisites_item) || obj_corequisites_item === null) {
|
|
2985
|
-
return new TypeError('Expected "object" but received "' + typeof obj_corequisites_item + '" (at "' + path_corequisites_item + '")');
|
|
2986
|
-
}
|
|
2930
|
+
if (obj.description !== undefined) {
|
|
2931
|
+
const obj_description = obj.description;
|
|
2932
|
+
const path_description = path + '.description';
|
|
2933
|
+
if (typeof obj_description !== 'string') {
|
|
2934
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
2987
2935
|
}
|
|
2988
2936
|
}
|
|
2989
|
-
const
|
|
2990
|
-
const
|
|
2991
|
-
if (typeof
|
|
2992
|
-
return new TypeError('Expected "
|
|
2937
|
+
const obj_learnerProgramId = obj.learnerProgramId;
|
|
2938
|
+
const path_learnerProgramId = path + '.learnerProgramId';
|
|
2939
|
+
if (typeof obj_learnerProgramId !== 'string') {
|
|
2940
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learnerProgramId + '" (at "' + path_learnerProgramId + '")');
|
|
2993
2941
|
}
|
|
2994
|
-
if (obj.
|
|
2995
|
-
const
|
|
2996
|
-
const
|
|
2997
|
-
if (
|
|
2998
|
-
return new TypeError('Expected "
|
|
2999
|
-
}
|
|
3000
|
-
for (let i = 0; i < obj_outcomes.length; i++) {
|
|
3001
|
-
const obj_outcomes_item = obj_outcomes[i];
|
|
3002
|
-
const path_outcomes_item = path_outcomes + '[' + i + ']';
|
|
3003
|
-
if (typeof obj_outcomes_item !== 'object' || ArrayIsArray(obj_outcomes_item) || obj_outcomes_item === null) {
|
|
3004
|
-
return new TypeError('Expected "object" but received "' + typeof obj_outcomes_item + '" (at "' + path_outcomes_item + '")');
|
|
3005
|
-
}
|
|
2942
|
+
if (obj.learnerProgramRequirementId !== undefined) {
|
|
2943
|
+
const obj_learnerProgramRequirementId = obj.learnerProgramRequirementId;
|
|
2944
|
+
const path_learnerProgramRequirementId = path + '.learnerProgramRequirementId';
|
|
2945
|
+
if (typeof obj_learnerProgramRequirementId !== 'string') {
|
|
2946
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learnerProgramRequirementId + '" (at "' + path_learnerProgramRequirementId + '")');
|
|
3006
2947
|
}
|
|
3007
2948
|
}
|
|
3008
|
-
if (obj.
|
|
3009
|
-
const
|
|
3010
|
-
const
|
|
3011
|
-
|
|
3012
|
-
|
|
2949
|
+
if (obj.learningProgramPlanRequirement !== undefined) {
|
|
2950
|
+
const obj_learningProgramPlanRequirement = obj.learningProgramPlanRequirement;
|
|
2951
|
+
const path_learningProgramPlanRequirement = path + '.learningProgramPlanRequirement';
|
|
2952
|
+
const referencepath_learningProgramPlanRequirementValidationError = validate$U(obj_learningProgramPlanRequirement, path_learningProgramPlanRequirement);
|
|
2953
|
+
if (referencepath_learningProgramPlanRequirementValidationError !== null) {
|
|
2954
|
+
let message = 'Object doesn\'t match LearningProgramPlanRequirementOutput (at "' + path_learningProgramPlanRequirement + '")\n';
|
|
2955
|
+
message += referencepath_learningProgramPlanRequirementValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2956
|
+
return new TypeError(message);
|
|
3013
2957
|
}
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
2958
|
+
}
|
|
2959
|
+
if (obj.learningProgramPlanRequirementId !== undefined) {
|
|
2960
|
+
const obj_learningProgramPlanRequirementId = obj.learningProgramPlanRequirementId;
|
|
2961
|
+
const path_learningProgramPlanRequirementId = path + '.learningProgramPlanRequirementId';
|
|
2962
|
+
if (typeof obj_learningProgramPlanRequirementId !== 'string') {
|
|
2963
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanRequirementId + '" (at "' + path_learningProgramPlanRequirementId + '")');
|
|
3020
2964
|
}
|
|
3021
2965
|
}
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
2966
|
+
const obj_name = obj.name;
|
|
2967
|
+
const path_name = path + '.name';
|
|
2968
|
+
if (typeof obj_name !== 'string') {
|
|
2969
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
2970
|
+
}
|
|
2971
|
+
if (obj.requirementDurationsByUnit !== undefined) {
|
|
2972
|
+
const obj_requirementDurationsByUnit = obj.requirementDurationsByUnit;
|
|
2973
|
+
const path_requirementDurationsByUnit = path + '.requirementDurationsByUnit';
|
|
2974
|
+
if (typeof obj_requirementDurationsByUnit !== 'object' || ArrayIsArray(obj_requirementDurationsByUnit) || obj_requirementDurationsByUnit === null) {
|
|
2975
|
+
return new TypeError('Expected "object" but received "' + typeof obj_requirementDurationsByUnit + '" (at "' + path_requirementDurationsByUnit + '")');
|
|
3027
2976
|
}
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
const
|
|
3031
|
-
|
|
3032
|
-
|
|
2977
|
+
const obj_requirementDurationsByUnit_keys = ObjectKeys(obj_requirementDurationsByUnit);
|
|
2978
|
+
for (let i = 0; i < obj_requirementDurationsByUnit_keys.length; i++) {
|
|
2979
|
+
const key = obj_requirementDurationsByUnit_keys[i];
|
|
2980
|
+
const obj_requirementDurationsByUnit_prop = obj_requirementDurationsByUnit[key];
|
|
2981
|
+
const path_requirementDurationsByUnit_prop = path_requirementDurationsByUnit + '["' + key + '"]';
|
|
2982
|
+
if (obj_requirementDurationsByUnit_prop === undefined) {
|
|
2983
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_requirementDurationsByUnit_prop + '" (at "' + path_requirementDurationsByUnit_prop + '")');
|
|
3033
2984
|
}
|
|
3034
2985
|
}
|
|
3035
2986
|
}
|
|
3036
|
-
if (obj.
|
|
3037
|
-
const
|
|
3038
|
-
const
|
|
3039
|
-
if (
|
|
3040
|
-
return new TypeError('Expected "
|
|
3041
|
-
}
|
|
3042
|
-
for (let i = 0; i < obj_skills.length; i++) {
|
|
3043
|
-
const obj_skills_item = obj_skills[i];
|
|
3044
|
-
const path_skills_item = path_skills + '[' + i + ']';
|
|
3045
|
-
if (typeof obj_skills_item !== 'object' || ArrayIsArray(obj_skills_item) || obj_skills_item === null) {
|
|
3046
|
-
return new TypeError('Expected "object" but received "' + typeof obj_skills_item + '" (at "' + path_skills_item + '")');
|
|
3047
|
-
}
|
|
2987
|
+
if (obj.status !== undefined) {
|
|
2988
|
+
const obj_status = obj.status;
|
|
2989
|
+
const path_status = path + '.status';
|
|
2990
|
+
if (typeof obj_status !== 'string') {
|
|
2991
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
3048
2992
|
}
|
|
3049
2993
|
}
|
|
3050
2994
|
})();
|
|
3051
2995
|
return v_error === undefined ? null : v_error;
|
|
3052
2996
|
}
|
|
3053
2997
|
|
|
3054
|
-
|
|
3055
|
-
const VERSION$t = "007261ab77a4c0e4b59ae9c1245e9305";
|
|
3056
|
-
function validate$S(obj, path = 'CreateLearningOutputRepresentation') {
|
|
2998
|
+
function validate$S(obj, path = 'LearnerProgram') {
|
|
3057
2999
|
const v_error = (() => {
|
|
3058
3000
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3059
3001
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3060
3002
|
}
|
|
3061
|
-
if (obj.
|
|
3062
|
-
const
|
|
3063
|
-
const
|
|
3064
|
-
if (
|
|
3065
|
-
return new TypeError('Expected "
|
|
3003
|
+
if (obj.description !== undefined) {
|
|
3004
|
+
const obj_description = obj.description;
|
|
3005
|
+
const path_description = path + '.description';
|
|
3006
|
+
if (typeof obj_description !== 'string') {
|
|
3007
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3066
3008
|
}
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3009
|
+
}
|
|
3010
|
+
if (obj.endDate !== undefined) {
|
|
3011
|
+
const obj_endDate = obj.endDate;
|
|
3012
|
+
const path_endDate = path + '.endDate';
|
|
3013
|
+
if (typeof obj_endDate !== 'string') {
|
|
3014
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
|
|
3073
3015
|
}
|
|
3074
3016
|
}
|
|
3075
|
-
if (obj.
|
|
3076
|
-
const
|
|
3077
|
-
const
|
|
3078
|
-
if (typeof
|
|
3079
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
3017
|
+
if (obj.learnerAccountId !== undefined) {
|
|
3018
|
+
const obj_learnerAccountId = obj.learnerAccountId;
|
|
3019
|
+
const path_learnerAccountId = path + '.learnerAccountId';
|
|
3020
|
+
if (typeof obj_learnerAccountId !== 'string') {
|
|
3021
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learnerAccountId + '" (at "' + path_learnerAccountId + '")');
|
|
3080
3022
|
}
|
|
3081
3023
|
}
|
|
3082
|
-
if (obj.
|
|
3083
|
-
const
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3086
|
-
return new TypeError('Expected "
|
|
3024
|
+
if (obj.learnerContactId !== undefined) {
|
|
3025
|
+
const obj_learnerContactId = obj.learnerContactId;
|
|
3026
|
+
const path_learnerContactId = path + '.learnerContactId';
|
|
3027
|
+
if (typeof obj_learnerContactId !== 'string') {
|
|
3028
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learnerContactId + '" (at "' + path_learnerContactId + '")');
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
if (obj.learnerProgramId !== undefined) {
|
|
3032
|
+
const obj_learnerProgramId = obj.learnerProgramId;
|
|
3033
|
+
const path_learnerProgramId = path + '.learnerProgramId';
|
|
3034
|
+
if (typeof obj_learnerProgramId !== 'string') {
|
|
3035
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learnerProgramId + '" (at "' + path_learnerProgramId + '")');
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
if (obj.learningId !== undefined) {
|
|
3039
|
+
const obj_learningId = obj.learningId;
|
|
3040
|
+
const path_learningId = path + '.learningId';
|
|
3041
|
+
if (typeof obj_learningId !== 'string') {
|
|
3042
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningId + '" (at "' + path_learningId + '")');
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
if (obj.learningOutcomeItem !== undefined) {
|
|
3046
|
+
const obj_learningOutcomeItem = obj.learningOutcomeItem;
|
|
3047
|
+
const path_learningOutcomeItem = path + '.learningOutcomeItem';
|
|
3048
|
+
const referencepath_learningOutcomeItemValidationError = validate$1e(obj_learningOutcomeItem, path_learningOutcomeItem);
|
|
3049
|
+
if (referencepath_learningOutcomeItemValidationError !== null) {
|
|
3050
|
+
let message = 'Object doesn\'t match LearningOutcomeItemOutput (at "' + path_learningOutcomeItem + '")\n';
|
|
3051
|
+
message += referencepath_learningOutcomeItemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3052
|
+
return new TypeError(message);
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
if (obj.learningProgramAcademicLevel !== undefined) {
|
|
3056
|
+
const obj_learningProgramAcademicLevel = obj.learningProgramAcademicLevel;
|
|
3057
|
+
const path_learningProgramAcademicLevel = path + '.learningProgramAcademicLevel';
|
|
3058
|
+
if (typeof obj_learningProgramAcademicLevel !== 'string') {
|
|
3059
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramAcademicLevel + '" (at "' + path_learningProgramAcademicLevel + '")');
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
if (obj.learningProgramCipCode !== undefined) {
|
|
3063
|
+
const obj_learningProgramCipCode = obj.learningProgramCipCode;
|
|
3064
|
+
const path_learningProgramCipCode = path + '.learningProgramCipCode';
|
|
3065
|
+
if (typeof obj_learningProgramCipCode !== 'string') {
|
|
3066
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramCipCode + '" (at "' + path_learningProgramCipCode + '")');
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
if (obj.learningProgramId !== undefined) {
|
|
3070
|
+
const obj_learningProgramId = obj.learningProgramId;
|
|
3071
|
+
const path_learningProgramId = path + '.learningProgramId';
|
|
3072
|
+
if (typeof obj_learningProgramId !== 'string') {
|
|
3073
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramId + '" (at "' + path_learningProgramId + '")');
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
if (obj.learningProgramName !== undefined) {
|
|
3077
|
+
const obj_learningProgramName = obj.learningProgramName;
|
|
3078
|
+
const path_learningProgramName = path + '.learningProgramName';
|
|
3079
|
+
if (typeof obj_learningProgramName !== 'string') {
|
|
3080
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramName + '" (at "' + path_learningProgramName + '")');
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
if (obj.learningProgramPlanId !== undefined) {
|
|
3084
|
+
const obj_learningProgramPlanId = obj.learningProgramPlanId;
|
|
3085
|
+
const path_learningProgramPlanId = path + '.learningProgramPlanId';
|
|
3086
|
+
if (typeof obj_learningProgramPlanId !== 'string') {
|
|
3087
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanId + '" (at "' + path_learningProgramPlanId + '")');
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
if (obj.learningProgramPlanName !== undefined) {
|
|
3091
|
+
const obj_learningProgramPlanName = obj.learningProgramPlanName;
|
|
3092
|
+
const path_learningProgramPlanName = path + '.learningProgramPlanName';
|
|
3093
|
+
if (typeof obj_learningProgramPlanName !== 'string') {
|
|
3094
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramPlanName + '" (at "' + path_learningProgramPlanName + '")');
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
if (obj.learningProgramProviderId !== undefined) {
|
|
3098
|
+
const obj_learningProgramProviderId = obj.learningProgramProviderId;
|
|
3099
|
+
const path_learningProgramProviderId = path + '.learningProgramProviderId';
|
|
3100
|
+
if (typeof obj_learningProgramProviderId !== 'string') {
|
|
3101
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramProviderId + '" (at "' + path_learningProgramProviderId + '")');
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
if (obj.learningProgramProviderName !== undefined) {
|
|
3105
|
+
const obj_learningProgramProviderName = obj.learningProgramProviderName;
|
|
3106
|
+
const path_learningProgramProviderName = path + '.learningProgramProviderName';
|
|
3107
|
+
if (typeof obj_learningProgramProviderName !== 'string') {
|
|
3108
|
+
return new TypeError('Expected "string" but received "' + typeof obj_learningProgramProviderName + '" (at "' + path_learningProgramProviderName + '")');
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
if (obj.name !== undefined) {
|
|
3112
|
+
const obj_name = obj.name;
|
|
3113
|
+
const path_name = path + '.name';
|
|
3114
|
+
if (typeof obj_name !== 'string') {
|
|
3115
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
if (obj.parentLearnerProgramId !== undefined) {
|
|
3119
|
+
const obj_parentLearnerProgramId = obj.parentLearnerProgramId;
|
|
3120
|
+
const path_parentLearnerProgramId = path + '.parentLearnerProgramId';
|
|
3121
|
+
if (typeof obj_parentLearnerProgramId !== 'string') {
|
|
3122
|
+
return new TypeError('Expected "string" but received "' + typeof obj_parentLearnerProgramId + '" (at "' + path_parentLearnerProgramId + '")');
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
if (obj.requirements !== undefined) {
|
|
3126
|
+
const obj_requirements = obj.requirements;
|
|
3127
|
+
const path_requirements = path + '.requirements';
|
|
3128
|
+
if (!ArrayIsArray(obj_requirements)) {
|
|
3129
|
+
return new TypeError('Expected "array" but received "' + typeof obj_requirements + '" (at "' + path_requirements + '")');
|
|
3130
|
+
}
|
|
3131
|
+
for (let i = 0; i < obj_requirements.length; i++) {
|
|
3132
|
+
const obj_requirements_item = obj_requirements[i];
|
|
3133
|
+
const path_requirements_item = path_requirements + '[' + i + ']';
|
|
3134
|
+
const referencepath_requirements_itemValidationError = validate$T(obj_requirements_item, path_requirements_item);
|
|
3135
|
+
if (referencepath_requirements_itemValidationError !== null) {
|
|
3136
|
+
let message = 'Object doesn\'t match LearnerProgramRequirement (at "' + path_requirements_item + '")\n';
|
|
3137
|
+
message += referencepath_requirements_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3138
|
+
return new TypeError(message);
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
if (obj.startDate !== undefined) {
|
|
3143
|
+
const obj_startDate = obj.startDate;
|
|
3144
|
+
const path_startDate = path + '.startDate';
|
|
3145
|
+
if (typeof obj_startDate !== 'string') {
|
|
3146
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
|
|
3087
3147
|
}
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3148
|
+
}
|
|
3149
|
+
if (obj.status !== undefined) {
|
|
3150
|
+
const obj_status = obj.status;
|
|
3151
|
+
const path_status = path + '.status';
|
|
3152
|
+
if (typeof obj_status !== 'string') {
|
|
3153
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
3094
3154
|
}
|
|
3095
3155
|
}
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3156
|
+
})();
|
|
3157
|
+
return v_error === undefined ? null : v_error;
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3160
|
+
const VERSION$t = "a465786ab4e5c95e1d888615e32dd640";
|
|
3161
|
+
function validate$R(obj, path = 'LearnerProgressOutputRepresentation') {
|
|
3162
|
+
const v_error = (() => {
|
|
3163
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3164
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3100
3165
|
}
|
|
3101
|
-
if (obj.
|
|
3102
|
-
const
|
|
3103
|
-
const
|
|
3104
|
-
if (!ArrayIsArray(
|
|
3105
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
3166
|
+
if (obj.learnerPrograms !== undefined) {
|
|
3167
|
+
const obj_learnerPrograms = obj.learnerPrograms;
|
|
3168
|
+
const path_learnerPrograms = path + '.learnerPrograms';
|
|
3169
|
+
if (!ArrayIsArray(obj_learnerPrograms)) {
|
|
3170
|
+
return new TypeError('Expected "array" but received "' + typeof obj_learnerPrograms + '" (at "' + path_learnerPrograms + '")');
|
|
3106
3171
|
}
|
|
3107
|
-
for (let i = 0; i <
|
|
3108
|
-
const
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3111
|
-
|
|
3172
|
+
for (let i = 0; i < obj_learnerPrograms.length; i++) {
|
|
3173
|
+
const obj_learnerPrograms_item = obj_learnerPrograms[i];
|
|
3174
|
+
const path_learnerPrograms_item = path_learnerPrograms + '[' + i + ']';
|
|
3175
|
+
const referencepath_learnerPrograms_itemValidationError = validate$S(obj_learnerPrograms_item, path_learnerPrograms_item);
|
|
3176
|
+
if (referencepath_learnerPrograms_itemValidationError !== null) {
|
|
3177
|
+
let message = 'Object doesn\'t match LearnerProgram (at "' + path_learnerPrograms_item + '")\n';
|
|
3178
|
+
message += referencepath_learnerPrograms_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3179
|
+
return new TypeError(message);
|
|
3112
3180
|
}
|
|
3113
3181
|
}
|
|
3114
3182
|
}
|
|
3115
|
-
if (obj.
|
|
3116
|
-
const
|
|
3117
|
-
const
|
|
3118
|
-
if (
|
|
3119
|
-
return new TypeError('Expected "
|
|
3183
|
+
if (obj.nonRequiredLearnings !== undefined) {
|
|
3184
|
+
const obj_nonRequiredLearnings = obj.nonRequiredLearnings;
|
|
3185
|
+
const path_nonRequiredLearnings = path + '.nonRequiredLearnings';
|
|
3186
|
+
if (!ArrayIsArray(obj_nonRequiredLearnings)) {
|
|
3187
|
+
return new TypeError('Expected "array" but received "' + typeof obj_nonRequiredLearnings + '" (at "' + path_nonRequiredLearnings + '")');
|
|
3188
|
+
}
|
|
3189
|
+
for (let i = 0; i < obj_nonRequiredLearnings.length; i++) {
|
|
3190
|
+
const obj_nonRequiredLearnings_item = obj_nonRequiredLearnings[i];
|
|
3191
|
+
const path_nonRequiredLearnings_item = path_nonRequiredLearnings + '[' + i + ']';
|
|
3192
|
+
const referencepath_nonRequiredLearnings_itemValidationError = validate$1c(obj_nonRequiredLearnings_item, path_nonRequiredLearnings_item);
|
|
3193
|
+
if (referencepath_nonRequiredLearnings_itemValidationError !== null) {
|
|
3194
|
+
let message = 'Object doesn\'t match LearningFulfiller (at "' + path_nonRequiredLearnings_item + '")\n';
|
|
3195
|
+
message += referencepath_nonRequiredLearnings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3196
|
+
return new TypeError(message);
|
|
3197
|
+
}
|
|
3120
3198
|
}
|
|
3121
3199
|
}
|
|
3122
3200
|
})();
|
|
3123
3201
|
return v_error === undefined ? null : v_error;
|
|
3124
3202
|
}
|
|
3125
|
-
const RepresentationType$g = '
|
|
3126
|
-
function keyBuilder$r(luvio, config) {
|
|
3127
|
-
return keyPrefix + '::' + RepresentationType$g + ':' + config.id;
|
|
3128
|
-
}
|
|
3129
|
-
function keyBuilderFromType$5(luvio, object) {
|
|
3130
|
-
const keyParams = {
|
|
3131
|
-
id: object.learningId
|
|
3132
|
-
};
|
|
3133
|
-
return keyBuilder$r(luvio, keyParams);
|
|
3134
|
-
}
|
|
3203
|
+
const RepresentationType$g = 'LearnerProgressOutputRepresentation';
|
|
3135
3204
|
function normalize$g(input, existing, path, luvio, store, timestamp) {
|
|
3136
3205
|
return input;
|
|
3137
3206
|
}
|
|
3138
|
-
const select$
|
|
3207
|
+
const select$L = function LearnerProgressOutputRepresentationSelect() {
|
|
3139
3208
|
return {
|
|
3140
3209
|
kind: 'Fragment',
|
|
3141
3210
|
version: VERSION$t,
|
|
@@ -3149,21 +3218,21 @@ function equals$t(existing, incoming) {
|
|
|
3149
3218
|
}
|
|
3150
3219
|
return true;
|
|
3151
3220
|
}
|
|
3152
|
-
const ingest$g = function
|
|
3221
|
+
const ingest$g = function LearnerProgressOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3153
3222
|
if (process.env.NODE_ENV !== 'production') {
|
|
3154
|
-
const validateError = validate$
|
|
3223
|
+
const validateError = validate$R(input);
|
|
3155
3224
|
if (validateError !== null) {
|
|
3156
3225
|
throw validateError;
|
|
3157
3226
|
}
|
|
3158
3227
|
}
|
|
3159
|
-
const key =
|
|
3160
|
-
const ttlToUse =
|
|
3228
|
+
const key = path.fullPath;
|
|
3229
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
|
|
3161
3230
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$g, "education", VERSION$t, RepresentationType$g, equals$t);
|
|
3162
3231
|
return createLink(key);
|
|
3163
3232
|
};
|
|
3164
3233
|
function getTypeCacheKeys$g(rootKeySet, luvio, input, fullPathFactory) {
|
|
3165
3234
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3166
|
-
const rootKey =
|
|
3235
|
+
const rootKey = fullPathFactory();
|
|
3167
3236
|
rootKeySet.set(rootKey, {
|
|
3168
3237
|
namespace: keyPrefix,
|
|
3169
3238
|
representationName: RepresentationType$g,
|
|
@@ -3171,164 +3240,24 @@ function getTypeCacheKeys$g(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
3171
3240
|
});
|
|
3172
3241
|
}
|
|
3173
3242
|
|
|
3174
|
-
function select$L(luvio, params) {
|
|
3175
|
-
return select$M();
|
|
3176
|
-
}
|
|
3177
|
-
function getResponseCacheKeys$i(storeKeyMap, luvio, resourceParams, response) {
|
|
3178
|
-
getTypeCacheKeys$g(storeKeyMap, luvio, response);
|
|
3179
|
-
}
|
|
3180
|
-
function ingestSuccess$i(luvio, resourceParams, response) {
|
|
3181
|
-
const { body } = response;
|
|
3182
|
-
const key = keyBuilderFromType$5(luvio, body);
|
|
3183
|
-
luvio.storeIngest(key, ingest$g, body);
|
|
3184
|
-
const snapshot = luvio.storeLookup({
|
|
3185
|
-
recordId: key,
|
|
3186
|
-
node: select$L(),
|
|
3187
|
-
variables: {},
|
|
3188
|
-
});
|
|
3189
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3190
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
3191
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
deepFreeze(snapshot.data);
|
|
3195
|
-
return snapshot;
|
|
3196
|
-
}
|
|
3197
|
-
function createResourceRequest$i(config) {
|
|
3198
|
-
const headers = {};
|
|
3199
|
-
return {
|
|
3200
|
-
baseUri: '/services/data/v62.0',
|
|
3201
|
-
basePath: '/connect/education/campus-setup/learning',
|
|
3202
|
-
method: 'post',
|
|
3203
|
-
body: config.body,
|
|
3204
|
-
urlParams: {},
|
|
3205
|
-
queryParams: {},
|
|
3206
|
-
headers,
|
|
3207
|
-
priority: 'normal',
|
|
3208
|
-
};
|
|
3209
|
-
}
|
|
3210
|
-
|
|
3211
|
-
const adapterName$i = 'postCreateLearning';
|
|
3212
|
-
const postCreateLearning_ConfigPropertyMetadata = [
|
|
3213
|
-
generateParamConfigMetadata('createLearningRecord', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3214
|
-
];
|
|
3215
|
-
const postCreateLearning_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$i, postCreateLearning_ConfigPropertyMetadata);
|
|
3216
|
-
const createResourceParams$i = /*#__PURE__*/ createResourceParams$p(postCreateLearning_ConfigPropertyMetadata);
|
|
3217
|
-
function typeCheckConfig$i(untrustedConfig) {
|
|
3218
|
-
const config = {};
|
|
3219
|
-
const untrustedConfig_createLearningRecord = untrustedConfig.createLearningRecord;
|
|
3220
|
-
const referenceCreateLearningInputRepresentationValidationError = validate$T(untrustedConfig_createLearningRecord);
|
|
3221
|
-
if (referenceCreateLearningInputRepresentationValidationError === null) {
|
|
3222
|
-
config.createLearningRecord = untrustedConfig_createLearningRecord;
|
|
3223
|
-
}
|
|
3224
|
-
return config;
|
|
3225
|
-
}
|
|
3226
|
-
function validateAdapterConfig$i(untrustedConfig, configPropertyNames) {
|
|
3227
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
3228
|
-
return null;
|
|
3229
|
-
}
|
|
3230
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3231
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
3232
|
-
}
|
|
3233
|
-
const config = typeCheckConfig$i(untrustedConfig);
|
|
3234
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3235
|
-
return null;
|
|
3236
|
-
}
|
|
3237
|
-
return config;
|
|
3238
|
-
}
|
|
3239
|
-
function buildNetworkSnapshot$i(luvio, config, options) {
|
|
3240
|
-
const resourceParams = createResourceParams$i(config);
|
|
3241
|
-
const request = createResourceRequest$i(resourceParams);
|
|
3242
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
3243
|
-
.then((response) => {
|
|
3244
|
-
return luvio.handleSuccessResponse(() => {
|
|
3245
|
-
const snapshot = ingestSuccess$i(luvio, resourceParams, response);
|
|
3246
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
3247
|
-
}, () => {
|
|
3248
|
-
const cache = new StoreKeyMap();
|
|
3249
|
-
getResponseCacheKeys$i(cache, luvio, resourceParams, response.body);
|
|
3250
|
-
return cache;
|
|
3251
|
-
});
|
|
3252
|
-
}, (response) => {
|
|
3253
|
-
deepFreeze(response);
|
|
3254
|
-
throw response;
|
|
3255
|
-
});
|
|
3256
|
-
}
|
|
3257
|
-
const postCreateLearningAdapterFactory = (luvio) => {
|
|
3258
|
-
return function postCreateLearning(untrustedConfig) {
|
|
3259
|
-
const config = validateAdapterConfig$i(untrustedConfig, postCreateLearning_ConfigPropertyNames);
|
|
3260
|
-
// Invalid or incomplete config
|
|
3261
|
-
if (config === null) {
|
|
3262
|
-
throw new Error('Invalid config for "postCreateLearning"');
|
|
3263
|
-
}
|
|
3264
|
-
return buildNetworkSnapshot$i(luvio, config);
|
|
3265
|
-
};
|
|
3266
|
-
};
|
|
3267
|
-
|
|
3268
|
-
function validate$R(obj, path = 'UpdateLearningInputRepresentation') {
|
|
3269
|
-
const v_error = (() => {
|
|
3270
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3271
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3272
|
-
}
|
|
3273
|
-
if (obj.corequisites !== undefined) {
|
|
3274
|
-
const obj_corequisites = obj.corequisites;
|
|
3275
|
-
const path_corequisites = path + '.corequisites';
|
|
3276
|
-
if (typeof obj_corequisites !== 'object' || ArrayIsArray(obj_corequisites) || obj_corequisites === null) {
|
|
3277
|
-
return new TypeError('Expected "object" but received "' + typeof obj_corequisites + '" (at "' + path_corequisites + '")');
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
const obj_learning = obj.learning;
|
|
3281
|
-
const path_learning = path + '.learning';
|
|
3282
|
-
if (typeof obj_learning !== 'object' || ArrayIsArray(obj_learning) || obj_learning === null) {
|
|
3283
|
-
return new TypeError('Expected "object" but received "' + typeof obj_learning + '" (at "' + path_learning + '")');
|
|
3284
|
-
}
|
|
3285
|
-
if (obj.outcomes !== undefined) {
|
|
3286
|
-
const obj_outcomes = obj.outcomes;
|
|
3287
|
-
const path_outcomes = path + '.outcomes';
|
|
3288
|
-
if (!ArrayIsArray(obj_outcomes)) {
|
|
3289
|
-
return new TypeError('Expected "array" but received "' + typeof obj_outcomes + '" (at "' + path_outcomes + '")');
|
|
3290
|
-
}
|
|
3291
|
-
for (let i = 0; i < obj_outcomes.length; i++) {
|
|
3292
|
-
const obj_outcomes_item = obj_outcomes[i];
|
|
3293
|
-
const path_outcomes_item = path_outcomes + '[' + i + ']';
|
|
3294
|
-
if (typeof obj_outcomes_item !== 'object' || ArrayIsArray(obj_outcomes_item) || obj_outcomes_item === null) {
|
|
3295
|
-
return new TypeError('Expected "object" but received "' + typeof obj_outcomes_item + '" (at "' + path_outcomes_item + '")');
|
|
3296
|
-
}
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
if (obj.prerequisites !== undefined) {
|
|
3300
|
-
const obj_prerequisites = obj.prerequisites;
|
|
3301
|
-
const path_prerequisites = path + '.prerequisites';
|
|
3302
|
-
if (typeof obj_prerequisites !== 'object' || ArrayIsArray(obj_prerequisites) || obj_prerequisites === null) {
|
|
3303
|
-
return new TypeError('Expected "object" but received "' + typeof obj_prerequisites + '" (at "' + path_prerequisites + '")');
|
|
3304
|
-
}
|
|
3305
|
-
}
|
|
3306
|
-
if (obj.recommended !== undefined) {
|
|
3307
|
-
const obj_recommended = obj.recommended;
|
|
3308
|
-
const path_recommended = path + '.recommended';
|
|
3309
|
-
if (typeof obj_recommended !== 'object' || ArrayIsArray(obj_recommended) || obj_recommended === null) {
|
|
3310
|
-
return new TypeError('Expected "object" but received "' + typeof obj_recommended + '" (at "' + path_recommended + '")');
|
|
3311
|
-
}
|
|
3312
|
-
}
|
|
3313
|
-
})();
|
|
3314
|
-
return v_error === undefined ? null : v_error;
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
3243
|
function select$K(luvio, params) {
|
|
3318
|
-
return select$
|
|
3244
|
+
return select$L();
|
|
3245
|
+
}
|
|
3246
|
+
function keyBuilder$s(luvio, params) {
|
|
3247
|
+
return keyPrefix + '::LearnerProgressOutputRepresentation:(' + 'learnerPathwayId:' + params.queryParams.learnerPathwayId + ',' + 'contactId:' + params.urlParams.contactId + ')';
|
|
3319
3248
|
}
|
|
3320
3249
|
function getResponseCacheKeys$h(storeKeyMap, luvio, resourceParams, response) {
|
|
3321
|
-
getTypeCacheKeys$g(storeKeyMap, luvio, response);
|
|
3250
|
+
getTypeCacheKeys$g(storeKeyMap, luvio, response, () => keyBuilder$s(luvio, resourceParams));
|
|
3322
3251
|
}
|
|
3323
|
-
function ingestSuccess$h(luvio, resourceParams, response) {
|
|
3252
|
+
function ingestSuccess$h(luvio, resourceParams, response, snapshotRefresh) {
|
|
3324
3253
|
const { body } = response;
|
|
3325
|
-
const key =
|
|
3254
|
+
const key = keyBuilder$s(luvio, resourceParams);
|
|
3326
3255
|
luvio.storeIngest(key, ingest$g, body);
|
|
3327
3256
|
const snapshot = luvio.storeLookup({
|
|
3328
3257
|
recordId: key,
|
|
3329
3258
|
node: select$K(),
|
|
3330
3259
|
variables: {},
|
|
3331
|
-
});
|
|
3260
|
+
}, snapshotRefresh);
|
|
3332
3261
|
if (process.env.NODE_ENV !== 'production') {
|
|
3333
3262
|
if (snapshot.state !== 'Fulfilled') {
|
|
3334
3263
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -3337,33 +3266,40 @@ function ingestSuccess$h(luvio, resourceParams, response) {
|
|
|
3337
3266
|
deepFreeze(snapshot.data);
|
|
3338
3267
|
return snapshot;
|
|
3339
3268
|
}
|
|
3269
|
+
function ingestError$b(luvio, params, error, snapshotRefresh) {
|
|
3270
|
+
const key = keyBuilder$s(luvio, params);
|
|
3271
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3272
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3273
|
+
return errorSnapshot;
|
|
3274
|
+
}
|
|
3340
3275
|
function createResourceRequest$h(config) {
|
|
3341
3276
|
const headers = {};
|
|
3342
3277
|
return {
|
|
3343
3278
|
baseUri: '/services/data/v62.0',
|
|
3344
|
-
basePath: '/connect/education/campus-setup/
|
|
3345
|
-
method: '
|
|
3346
|
-
body:
|
|
3347
|
-
urlParams:
|
|
3348
|
-
queryParams:
|
|
3279
|
+
basePath: '/connect/education/campus-setup/learner/' + config.urlParams.contactId + '/learner-progress',
|
|
3280
|
+
method: 'get',
|
|
3281
|
+
body: null,
|
|
3282
|
+
urlParams: config.urlParams,
|
|
3283
|
+
queryParams: config.queryParams,
|
|
3349
3284
|
headers,
|
|
3350
3285
|
priority: 'normal',
|
|
3351
3286
|
};
|
|
3352
3287
|
}
|
|
3353
3288
|
|
|
3354
|
-
const adapterName$h = '
|
|
3355
|
-
const
|
|
3356
|
-
generateParamConfigMetadata('
|
|
3289
|
+
const adapterName$h = 'getLearnerProgress';
|
|
3290
|
+
const getLearnerProgress_ConfigPropertyMetadata = [
|
|
3291
|
+
generateParamConfigMetadata('contactId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3292
|
+
generateParamConfigMetadata('learnerPathwayId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
3357
3293
|
];
|
|
3358
|
-
const
|
|
3359
|
-
const createResourceParams$h = /*#__PURE__*/ createResourceParams$p(
|
|
3294
|
+
const getLearnerProgress_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, getLearnerProgress_ConfigPropertyMetadata);
|
|
3295
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$p(getLearnerProgress_ConfigPropertyMetadata);
|
|
3296
|
+
function keyBuilder$r(luvio, config) {
|
|
3297
|
+
const resourceParams = createResourceParams$h(config);
|
|
3298
|
+
return keyBuilder$s(luvio, resourceParams);
|
|
3299
|
+
}
|
|
3360
3300
|
function typeCheckConfig$h(untrustedConfig) {
|
|
3361
3301
|
const config = {};
|
|
3362
|
-
|
|
3363
|
-
const referenceUpdateLearningInputRepresentationValidationError = validate$R(untrustedConfig_updateLearningRecord);
|
|
3364
|
-
if (referenceUpdateLearningInputRepresentationValidationError === null) {
|
|
3365
|
-
config.updateLearningRecord = untrustedConfig_updateLearningRecord;
|
|
3366
|
-
}
|
|
3302
|
+
typeCheckConfig$p(untrustedConfig, config, getLearnerProgress_ConfigPropertyMetadata);
|
|
3367
3303
|
return config;
|
|
3368
3304
|
}
|
|
3369
3305
|
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
@@ -3379,33 +3315,62 @@ function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
|
3379
3315
|
}
|
|
3380
3316
|
return config;
|
|
3381
3317
|
}
|
|
3318
|
+
function adapterFragment$b(luvio, config) {
|
|
3319
|
+
createResourceParams$h(config);
|
|
3320
|
+
return select$K();
|
|
3321
|
+
}
|
|
3322
|
+
function onFetchResponseSuccess$b(luvio, config, resourceParams, response) {
|
|
3323
|
+
const snapshot = ingestSuccess$h(luvio, resourceParams, response, {
|
|
3324
|
+
config,
|
|
3325
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
3326
|
+
});
|
|
3327
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3328
|
+
}
|
|
3329
|
+
function onFetchResponseError$b(luvio, config, resourceParams, response) {
|
|
3330
|
+
const snapshot = ingestError$b(luvio, resourceParams, response, {
|
|
3331
|
+
config,
|
|
3332
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
3333
|
+
});
|
|
3334
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3335
|
+
}
|
|
3382
3336
|
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
3383
3337
|
const resourceParams = createResourceParams$h(config);
|
|
3384
3338
|
const request = createResourceRequest$h(resourceParams);
|
|
3385
3339
|
return luvio.dispatchResourceRequest(request, options)
|
|
3386
3340
|
.then((response) => {
|
|
3387
|
-
return luvio.handleSuccessResponse(() => {
|
|
3388
|
-
const snapshot = ingestSuccess$h(luvio, resourceParams, response);
|
|
3389
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
3390
|
-
}, () => {
|
|
3341
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$b(luvio, config, resourceParams, response), () => {
|
|
3391
3342
|
const cache = new StoreKeyMap();
|
|
3392
3343
|
getResponseCacheKeys$h(cache, luvio, resourceParams, response.body);
|
|
3393
3344
|
return cache;
|
|
3394
3345
|
});
|
|
3395
3346
|
}, (response) => {
|
|
3396
|
-
|
|
3397
|
-
throw response;
|
|
3347
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$b(luvio, config, resourceParams, response));
|
|
3398
3348
|
});
|
|
3399
3349
|
}
|
|
3400
|
-
|
|
3401
|
-
return
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3350
|
+
function buildNetworkSnapshotCachePolicy$b(context, coercedAdapterRequestContext) {
|
|
3351
|
+
return buildNetworkSnapshotCachePolicy$h(context, coercedAdapterRequestContext, buildNetworkSnapshot$h, undefined, false);
|
|
3352
|
+
}
|
|
3353
|
+
function buildCachedSnapshotCachePolicy$b(context, storeLookup) {
|
|
3354
|
+
const { luvio, config } = context;
|
|
3355
|
+
const selector = {
|
|
3356
|
+
recordId: keyBuilder$r(luvio, config),
|
|
3357
|
+
node: adapterFragment$b(luvio, config),
|
|
3358
|
+
variables: {},
|
|
3408
3359
|
};
|
|
3360
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3361
|
+
config,
|
|
3362
|
+
resolve: () => buildNetworkSnapshot$h(luvio, config, snapshotRefreshOptions)
|
|
3363
|
+
});
|
|
3364
|
+
return cacheSnapshot;
|
|
3365
|
+
}
|
|
3366
|
+
const getLearnerProgressAdapterFactory = (luvio) => function education__getLearnerProgress(untrustedConfig, requestContext) {
|
|
3367
|
+
const config = validateAdapterConfig$h(untrustedConfig, getLearnerProgress_ConfigPropertyNames);
|
|
3368
|
+
// Invalid or incomplete config
|
|
3369
|
+
if (config === null) {
|
|
3370
|
+
return null;
|
|
3371
|
+
}
|
|
3372
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3373
|
+
buildCachedSnapshotCachePolicy$b, buildNetworkSnapshotCachePolicy$b);
|
|
3409
3374
|
};
|
|
3410
3375
|
|
|
3411
3376
|
function validate$Q(obj, path = 'LearningFoundationItemValidationInput') {
|
|
@@ -3949,7 +3914,7 @@ function validate$K(obj, path = 'PreviewLearningProgramPlanOutputRepresentation'
|
|
|
3949
3914
|
for (let i = 0; i < obj_programPlanRequirements.length; i++) {
|
|
3950
3915
|
const obj_programPlanRequirements_item = obj_programPlanRequirements[i];
|
|
3951
3916
|
const path_programPlanRequirements_item = path_programPlanRequirements + '[' + i + ']';
|
|
3952
|
-
const referencepath_programPlanRequirements_itemValidationError = validate$
|
|
3917
|
+
const referencepath_programPlanRequirements_itemValidationError = validate$U(obj_programPlanRequirements_item, path_programPlanRequirements_item);
|
|
3953
3918
|
if (referencepath_programPlanRequirements_itemValidationError !== null) {
|
|
3954
3919
|
let message = 'Object doesn\'t match LearningProgramPlanRequirementOutput (at "' + path_programPlanRequirements_item + '")\n';
|
|
3955
3920
|
message += referencepath_programPlanRequirements_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -5552,7 +5517,7 @@ function validate$r(obj, path = 'IndividualApplicationTaskOutputRepresentation')
|
|
|
5552
5517
|
if (obj.result !== undefined) {
|
|
5553
5518
|
const obj_result = obj.result;
|
|
5554
5519
|
const path_result = path + '.result';
|
|
5555
|
-
const referencepath_resultValidationError = validate$
|
|
5520
|
+
const referencepath_resultValidationError = validate$10(obj_result, path_result);
|
|
5556
5521
|
if (referencepath_resultValidationError !== null) {
|
|
5557
5522
|
let message = 'Object doesn\'t match IndividualApplicationTask (at "' + path_result + '")\n';
|
|
5558
5523
|
message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -6368,7 +6333,7 @@ function validate$l(obj, path = 'GetNewApplicationPreliminaryDataResult') {
|
|
|
6368
6333
|
for (let i = 0; i < obj_applicants.length; i++) {
|
|
6369
6334
|
const obj_applicants_item = obj_applicants[i];
|
|
6370
6335
|
const path_applicants_item = path_applicants + '[' + i + ']';
|
|
6371
|
-
const referencepath_applicants_itemValidationError = validate$
|
|
6336
|
+
const referencepath_applicants_itemValidationError = validate$16(obj_applicants_item, path_applicants_item);
|
|
6372
6337
|
if (referencepath_applicants_itemValidationError !== null) {
|
|
6373
6338
|
let message = 'Object doesn\'t match Applicant (at "' + path_applicants_item + '")\n';
|
|
6374
6339
|
message += referencepath_applicants_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -6381,7 +6346,7 @@ function validate$l(obj, path = 'GetNewApplicationPreliminaryDataResult') {
|
|
|
6381
6346
|
}
|
|
6382
6347
|
const select$o = function GetNewApplicationPreliminaryDataResultSelect() {
|
|
6383
6348
|
const { selections: ApplicationAcademicLevel__selections, opaque: ApplicationAcademicLevel__opaque, } = select$p();
|
|
6384
|
-
const { selections: Applicant__selections, opaque: Applicant__opaque, } = select$
|
|
6349
|
+
const { selections: Applicant__selections, opaque: Applicant__opaque, } = select$W();
|
|
6385
6350
|
return {
|
|
6386
6351
|
kind: 'Fragment',
|
|
6387
6352
|
version: VERSION$g,
|
|
@@ -6433,7 +6398,7 @@ function equals$g(existing, incoming) {
|
|
|
6433
6398
|
return false;
|
|
6434
6399
|
}
|
|
6435
6400
|
const equals_applicants_items = equalsArray(existing_applicants, incoming_applicants, (existing_applicants_item, incoming_applicants_item) => {
|
|
6436
|
-
if (!(equals$
|
|
6401
|
+
if (!(equals$A(existing_applicants_item, incoming_applicants_item))) {
|
|
6437
6402
|
return false;
|
|
6438
6403
|
}
|
|
6439
6404
|
});
|
|
@@ -9964,4 +9929,4 @@ const getAptsTasksPlansAdapterFactory = (luvio) => function education__getAptsTa
|
|
|
9964
9929
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
9965
9930
|
};
|
|
9966
9931
|
|
|
9967
|
-
export { createCarePlansAdapterFactory, createPreliminaryApplicationReferencesAdapterFactory, createTaskAdapterFactory, getAcademicTermsAdapterFactory, getApplicationDetailsAdapterFactory, getApplicationsAdapterFactory, getAptsTasksPlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getIndividualApplicationTaskAdapterFactory, getLearnerProgressAdapterFactory, getLearningAdapterFactory, getNewApplicationPreliminaryDataAdapterFactory, getPersonPublicProfileAdapterFactory, getPicklistValuesAdapterFactory, getPreviewLearningProgramPlanAdapterFactory, getProgramTermApplicationTimelinesAdapterFactory, getSuccessTeamAdapterFactory, postBenefitAssignmentAdapterFactory,
|
|
9932
|
+
export { createCarePlansAdapterFactory, createLearningsAdapterFactory, createPreliminaryApplicationReferencesAdapterFactory, createTaskAdapterFactory, getAcademicTermsAdapterFactory, getApplicationDetailsAdapterFactory, getApplicationsAdapterFactory, getAptsTasksPlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getIndividualApplicationTaskAdapterFactory, getLearnerProgressAdapterFactory, getLearningAdapterFactory, getNewApplicationPreliminaryDataAdapterFactory, getPersonPublicProfileAdapterFactory, getPicklistValuesAdapterFactory, getPreviewLearningProgramPlanAdapterFactory, getProgramTermApplicationTimelinesAdapterFactory, getSuccessTeamAdapterFactory, postBenefitAssignmentAdapterFactory, postMatchingSelectorAdapterFactory, postPublishLearningProgramPlanAdapterFactory, postValidateLearningFoundationListAdapterFactory, updateLearningsAdapterFactory, updateTaskStatusAdapterFactory };
|