@vannizhang/living-atlas-content-validator 1.5.21 → 1.5.23
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/configureSettings.d.ts +0 -103
- package/dist/configureSettings.js +1 -43
- package/dist/configureSettings.js.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/accessInformation/isValidAccessInformation.d.ts +0 -8
- package/dist/lib/accessInformation/isValidAccessInformation.js +0 -12
- package/dist/lib/accessInformation/isValidAccessInformation.js.map +1 -1
- package/dist/lib/accessInformation/scoringConfig.js +0 -4
- package/dist/lib/accessInformation/scoringConfig.js.map +1 -1
- package/dist/lib/checkProfanities/checkProfanities.d.ts +0 -5
- package/dist/lib/checkProfanities/checkProfanities.js +0 -8
- package/dist/lib/checkProfanities/checkProfanities.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js +0 -35
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/config.d.ts +0 -84
- package/dist/lib/checkTitleAndSnippetSearchability/config.js +0 -17
- package/dist/lib/checkTitleAndSnippetSearchability/config.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/data.js +0 -692
- package/dist/lib/checkTitleAndSnippetSearchability/data.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.d.ts +0 -94
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.js +0 -105
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js +1 -111
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js +1 -113
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.d.ts +0 -28
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js +0 -113
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.d.ts +0 -30
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js +1 -115
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js +0 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js.map +1 -1
- package/dist/lib/config.d.ts +0 -16
- package/dist/lib/config.js +0 -140
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.d.ts +0 -8
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js +0 -11
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js.map +1 -1
- package/dist/lib/deleteProtection/scoringConfig.js +0 -1
- package/dist/lib/deleteProtection/scoringConfig.js.map +1 -1
- package/dist/lib/deprecated/isDeprecated.d.ts +0 -8
- package/dist/lib/deprecated/isDeprecated.js +0 -9
- package/dist/lib/deprecated/isDeprecated.js.map +1 -1
- package/dist/lib/deprecated/scoringConfig.js +0 -1
- package/dist/lib/deprecated/scoringConfig.js.map +1 -1
- package/dist/lib/description/findDataSource.d.ts +0 -10
- package/dist/lib/description/findDataSource.js +0 -22
- package/dist/lib/description/findDataSource.js.map +1 -1
- package/dist/lib/description/isValidDescription.d.ts +0 -17
- package/dist/lib/description/isValidDescription.js +0 -52
- package/dist/lib/description/isValidDescription.js.map +1 -1
- package/dist/lib/description/scoringConfig.js +0 -1
- package/dist/lib/description/scoringConfig.js.map +1 -1
- package/dist/lib/description/scoringRulesConfig.js +0 -47
- package/dist/lib/description/scoringRulesConfig.js.map +1 -1
- package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.d.ts +0 -8
- package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js +0 -12
- package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js.map +1 -1
- package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.d.ts +0 -6
- package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js +0 -12
- package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js.map +1 -1
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.d.ts +0 -8
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js +0 -16
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js.map +1 -1
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.d.ts +0 -5
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js +0 -9
- package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.d.ts +0 -23
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +0 -43
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/helpers.d.ts +0 -16
- package/dist/lib/featureServiceFieldAliases/helpers.js +5 -21
- package/dist/lib/featureServiceFieldAliases/helpers.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/scoringConfig.js +0 -1
- package/dist/lib/featureServiceFieldAliases/scoringConfig.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.d.ts +0 -22
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +0 -58
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/helpers.d.ts +0 -17
- package/dist/lib/featureServiceFieldDescriptions/helpers.js +5 -22
- package/dist/lib/featureServiceFieldDescriptions/helpers.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js +0 -1
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js.map +1 -1
- package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.d.ts +0 -8
- package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js +0 -8
- package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js.map +1 -1
- package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.d.ts +0 -5
- package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js +0 -6
- package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.d.ts +0 -19
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +0 -40
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/helpers.d.ts +0 -13
- package/dist/lib/featureServiceFieldValueTypes/helpers.js +2 -15
- package/dist/lib/featureServiceFieldValueTypes/helpers.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js +0 -1
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js.map +1 -1
- package/dist/lib/itemExtent/checkItemExtent.d.ts +0 -25
- package/dist/lib/itemExtent/checkItemExtent.js +0 -30
- package/dist/lib/itemExtent/checkItemExtent.js.map +1 -1
- package/dist/lib/itemExtent/checkItemExtentHelpers.d.ts +0 -31
- package/dist/lib/itemExtent/checkItemExtentHelpers.js +0 -36
- package/dist/lib/itemExtent/checkItemExtentHelpers.js.map +1 -1
- package/dist/lib/licenseInfo/isValidLicenseInfo.d.ts +0 -32
- package/dist/lib/licenseInfo/isValidLicenseInfo.js +2 -49
- package/dist/lib/licenseInfo/isValidLicenseInfo.js.map +1 -1
- package/dist/lib/licenseInfo/scoringConfig.js +0 -1
- package/dist/lib/licenseInfo/scoringConfig.js.map +1 -1
- package/dist/lib/licenseInfo/scoringRulesConfig.js +0 -47
- package/dist/lib/licenseInfo/scoringRulesConfig.js.map +1 -1
- package/dist/lib/sharing/isValidAccess.d.ts +0 -20
- package/dist/lib/sharing/isValidAccess.js +2 -28
- package/dist/lib/sharing/isValidAccess.js.map +1 -1
- package/dist/lib/sharing/scoringConfig.js +0 -1
- package/dist/lib/sharing/scoringConfig.js.map +1 -1
- package/dist/lib/sharing/scoringRulesConfig.js +0 -47
- package/dist/lib/sharing/scoringRulesConfig.js.map +1 -1
- package/dist/lib/ssl/isValidSSL.d.ts +0 -12
- package/dist/lib/ssl/isValidSSL.js +6 -31
- package/dist/lib/ssl/isValidSSL.js.map +1 -1
- package/dist/lib/ssl/scoringConfig.js +0 -4
- package/dist/lib/ssl/scoringConfig.js.map +1 -1
- package/dist/lib/ssl/scoringRulesConfig.js +0 -41
- package/dist/lib/ssl/scoringRulesConfig.js.map +1 -1
- package/dist/lib/summary/isValidSummary.d.ts +0 -15
- package/dist/lib/summary/isValidSummary.js +1 -47
- package/dist/lib/summary/isValidSummary.js.map +1 -1
- package/dist/lib/summary/scoringConfig.js +0 -1
- package/dist/lib/summary/scoringConfig.js.map +1 -1
- package/dist/lib/summary/scoringRulesConfig.js +0 -53
- package/dist/lib/summary/scoringRulesConfig.js.map +1 -1
- package/dist/lib/tags/isValidTags.d.ts +0 -12
- package/dist/lib/tags/isValidTags.js +1 -20
- package/dist/lib/tags/isValidTags.js.map +1 -1
- package/dist/lib/tags/scoringConfig.js +0 -5
- package/dist/lib/tags/scoringConfig.js.map +1 -1
- package/dist/lib/tags/scoringRulesConfig.js +0 -41
- package/dist/lib/tags/scoringRulesConfig.js.map +1 -1
- package/dist/lib/thumbnail/isValidThumbnail.d.ts +0 -8
- package/dist/lib/thumbnail/isValidThumbnail.js +1 -30
- package/dist/lib/thumbnail/isValidThumbnail.js.map +1 -1
- package/dist/lib/thumbnail/scoringConfig.js +0 -9
- package/dist/lib/thumbnail/scoringConfig.js.map +1 -1
- package/dist/lib/thumbnail/scoringRulesConfig.js +0 -41
- package/dist/lib/thumbnail/scoringRulesConfig.js.map +1 -1
- package/dist/lib/title/isValidTitle.d.ts +0 -21
- package/dist/lib/title/isValidTitle.js +1 -55
- package/dist/lib/title/isValidTitle.js.map +1 -1
- package/dist/lib/title/scoringConfig.js +0 -1
- package/dist/lib/title/scoringConfig.js.map +1 -1
- package/dist/lib/title/scoringRulesConfig.js +0 -52
- package/dist/lib/title/scoringRulesConfig.js.map +1 -1
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.d.ts +0 -21
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.js +2 -76
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.js.map +1 -1
- package/dist/lib/userProfileDescription/scoringConfig.js +0 -1
- package/dist/lib/userProfileDescription/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileDescription/scoringRulesConfig.js +0 -59
- package/dist/lib/userProfileDescription/scoringRulesConfig.js.map +1 -1
- package/dist/lib/userProfileName/isValidUserProfileName.d.ts +0 -8
- package/dist/lib/userProfileName/isValidUserProfileName.js +2 -26
- package/dist/lib/userProfileName/isValidUserProfileName.js.map +1 -1
- package/dist/lib/userProfileName/scoringConfig.js +0 -5
- package/dist/lib/userProfileName/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileName/scoringRulesConfig.js +0 -41
- package/dist/lib/userProfileName/scoringRulesConfig.js.map +1 -1
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.d.ts +0 -12
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js +3 -27
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js.map +1 -1
- package/dist/lib/userProfileThumbnail/scoringConfig.js +0 -4
- package/dist/lib/userProfileThumbnail/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileThumbnail/scoringRulesConfig.js +0 -35
- package/dist/lib/userProfileThumbnail/scoringRulesConfig.js.map +1 -1
- package/dist/lib/util/assertString.d.ts +0 -10
- package/dist/lib/util/assertString.js +0 -11
- package/dist/lib/util/assertString.js.map +1 -1
- package/dist/lib/util/checkIsLayer.d.ts +0 -5
- package/dist/lib/util/checkIsLayer.js +0 -5
- package/dist/lib/util/checkIsLayer.js.map +1 -1
- package/dist/lib/util/contains.d.ts +0 -6
- package/dist/lib/util/contains.js +0 -7
- package/dist/lib/util/contains.js.map +1 -1
- package/dist/lib/util/containsNonEnglishCharacters.d.ts +0 -12
- package/dist/lib/util/containsNonEnglishCharacters.js +2 -16
- package/dist/lib/util/containsNonEnglishCharacters.js.map +1 -1
- package/dist/lib/util/countSentences.d.ts +0 -22
- package/dist/lib/util/countSentences.js +4 -36
- package/dist/lib/util/countSentences.js.map +1 -1
- package/dist/lib/util/createWordBoundaryRegex.d.ts +0 -40
- package/dist/lib/util/createWordBoundaryRegex.js +0 -47
- package/dist/lib/util/createWordBoundaryRegex.js.map +1 -1
- package/dist/lib/util/escapeSpecialCharacters.d.ts +0 -6
- package/dist/lib/util/escapeSpecialCharacters.js +0 -8
- package/dist/lib/util/escapeSpecialCharacters.js.map +1 -1
- package/dist/lib/util/getAllValidationRuleIds.d.ts +0 -4
- package/dist/lib/util/getAllValidationRuleIds.js +0 -4
- package/dist/lib/util/getAllValidationRuleIds.js.map +1 -1
- package/dist/lib/util/getFeatureLayerFieldValueTypes.d.ts +0 -8
- package/dist/lib/util/getFeatureLayerFieldValueTypes.js +0 -8
- package/dist/lib/util/getFeatureLayerFieldValueTypes.js.map +1 -1
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.d.ts +0 -17
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.js +0 -17
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.js.map +1 -1
- package/dist/lib/util/getNumberOfWords.d.ts +0 -5
- package/dist/lib/util/getNumberOfWords.js +1 -15
- package/dist/lib/util/getNumberOfWords.js.map +1 -1
- package/dist/lib/util/getRelevantFeatureLayerFields.d.ts +0 -11
- package/dist/lib/util/getRelevantFeatureLayerFields.js +0 -11
- package/dist/lib/util/getRelevantFeatureLayerFields.js.map +1 -1
- package/dist/lib/util/getScoringRules.d.ts +0 -17
- package/dist/lib/util/getScoringRules.js +0 -105
- package/dist/lib/util/getScoringRules.js.map +1 -1
- package/dist/lib/util/getThumbnailFileName.d.ts +0 -14
- package/dist/lib/util/getThumbnailFileName.js +0 -14
- package/dist/lib/util/getThumbnailFileName.js.map +1 -1
- package/dist/lib/util/isArcGISDomain.d.ts +0 -5
- package/dist/lib/util/isArcGISDomain.js +0 -5
- package/dist/lib/util/isArcGISDomain.js.map +1 -1
- package/dist/lib/util/isArcGISOnlineReservedThumbnailName.d.ts +0 -5
- package/dist/lib/util/isArcGISOnlineReservedThumbnailName.js +0 -5
- package/dist/lib/util/isArcGISOnlineReservedThumbnailName.js.map +1 -1
- package/dist/lib/util/isDefined.d.ts +0 -7
- package/dist/lib/util/isDefined.js +0 -7
- package/dist/lib/util/isDefined.js.map +1 -1
- package/dist/lib/util/isEmail.d.ts +0 -5
- package/dist/lib/util/isEmail.js +0 -5
- package/dist/lib/util/isEmail.js.map +1 -1
- package/dist/lib/util/isEmpty.d.ts +0 -5
- package/dist/lib/util/isEmpty.js +0 -5
- package/dist/lib/util/isEmpty.js.map +1 -1
- package/dist/lib/util/isFeatureCollection.d.ts +0 -5
- package/dist/lib/util/isFeatureCollection.js +0 -5
- package/dist/lib/util/isFeatureCollection.js.map +1 -1
- package/dist/lib/util/isFeatureService.d.ts +0 -11
- package/dist/lib/util/isFeatureService.js +0 -13
- package/dist/lib/util/isFeatureService.js.map +1 -1
- package/dist/lib/util/isHosted.d.ts +0 -5
- package/dist/lib/util/isHosted.js +0 -5
- package/dist/lib/util/isHosted.js.map +1 -1
- package/dist/lib/util/isLatin.d.ts +0 -5
- package/dist/lib/util/isLatin.js +0 -5
- package/dist/lib/util/isLatin.js.map +1 -1
- package/dist/lib/util/isLayer.d.ts +0 -10
- package/dist/lib/util/isLayer.js +1 -13
- package/dist/lib/util/isLayer.js.map +1 -1
- package/dist/lib/util/isSecureProtocol.d.ts +0 -5
- package/dist/lib/util/isSecureProtocol.js +0 -5
- package/dist/lib/util/isSecureProtocol.js.map +1 -1
- package/dist/lib/util/isUppercase.d.ts +0 -3
- package/dist/lib/util/isUppercase.js +0 -3
- package/dist/lib/util/isUppercase.js.map +1 -1
- package/dist/lib/util/isUrl.d.ts +0 -8
- package/dist/lib/util/isUrl.js +1 -11
- package/dist/lib/util/isUrl.js.map +1 -1
- package/dist/lib/util/isValidRegexPattern.d.ts +0 -6
- package/dist/lib/util/isValidRegexPattern.js +0 -6
- package/dist/lib/util/isValidRegexPattern.js.map +1 -1
- package/dist/lib/util/matches.d.ts +0 -11
- package/dist/lib/util/matches.js +0 -11
- package/dist/lib/util/matches.js.map +1 -1
- package/dist/lib/util/round.js +0 -4
- package/dist/lib/util/round.js.map +1 -1
- package/dist/lib/util/sanitizeTags.d.ts +0 -5
- package/dist/lib/util/sanitizeTags.js +0 -5
- package/dist/lib/util/sanitizeTags.js.map +1 -1
- package/dist/lib/util/shouldValidateByBetaRules.d.ts +0 -7
- package/dist/lib/util/shouldValidateByBetaRules.js +0 -31
- package/dist/lib/util/shouldValidateByBetaRules.js.map +1 -1
- package/dist/lib/util/stringsConfig.d.ts +0 -21
- package/dist/lib/util/stringsConfig.js +0 -38
- package/dist/lib/util/stringsConfig.js.map +1 -1
- package/dist/lib/util/toString.d.ts +0 -10
- package/dist/lib/util/toString.js +0 -10
- package/dist/lib/util/toString.js.map +1 -1
- package/dist/lib/validate/validate.d.ts +0 -64
- package/dist/lib/validate/validate.js +1 -52
- package/dist/lib/validate/validate.js.map +1 -1
- package/dist/lib/validate/validateHelpers.d.ts +0 -57
- package/dist/lib/validate/validateHelpers.js +1 -72
- package/dist/lib/validate/validateHelpers.js.map +1 -1
- package/dist/package-info.json +1 -1
- package/dist/services/content-validator-assets/config.d.ts +0 -3
- package/dist/services/content-validator-assets/config.js +0 -3
- package/dist/services/content-validator-assets/config.js.map +1 -1
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.d.ts +0 -93
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js +0 -33
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js.map +1 -1
- package/dist/services/content-validator-assets/fetchProfanitiesData.d.ts +0 -24
- package/dist/services/content-validator-assets/fetchProfanitiesData.js +0 -19
- package/dist/services/content-validator-assets/fetchProfanitiesData.js.map +1 -1
- package/dist/services/content-validator-assets/helpers.d.ts +0 -14
- package/dist/services/content-validator-assets/helpers.js +1 -15
- package/dist/services/content-validator-assets/helpers.js.map +1 -1
- package/dist/services/custom-terms/config.d.ts +0 -11
- package/dist/services/custom-terms/config.js +0 -41
- package/dist/services/custom-terms/config.js.map +1 -1
- package/dist/services/custom-terms/customTerms.d.ts +0 -170
- package/dist/services/custom-terms/customTerms.js +4 -169
- package/dist/services/custom-terms/customTerms.js.map +1 -1
- package/dist/services/custom-terms/helpers.d.ts +0 -6
- package/dist/services/custom-terms/helpers.js +0 -6
- package/dist/services/custom-terms/helpers.js.map +1 -1
- package/dist/services/custom-terms-review-results/config.d.ts +0 -16
- package/dist/services/custom-terms-review-results/config.js +0 -42
- package/dist/services/custom-terms-review-results/config.js.map +1 -1
- package/dist/services/custom-terms-review-results/customTermsReviewResults.d.ts +0 -93
- package/dist/services/custom-terms-review-results/customTermsReviewResults.js +0 -87
- package/dist/services/custom-terms-review-results/customTermsReviewResults.js.map +1 -1
- package/dist/services/custom-terms-review-results/helpers.d.ts +0 -15
- package/dist/services/custom-terms-review-results/helpers.js +0 -16
- package/dist/services/custom-terms-review-results/helpers.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceAdminJSON.d.ts +0 -12
- package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js +3 -13
- package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.d.ts +0 -12
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js +5 -32
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceRootJSON.d.ts +0 -14
- package/dist/services/feature-service/fetchFeatureServiceRootJSON.js +5 -30
- package/dist/services/feature-service/fetchFeatureServiceRootJSON.js.map +1 -1
- package/dist/services/feature-service/getFeatureServerURL.d.ts +0 -11
- package/dist/services/feature-service/getFeatureServerURL.js +2 -14
- package/dist/services/feature-service/getFeatureServerURL.js.map +1 -1
- package/dist/services/shared/addFeatures.d.ts +0 -11
- package/dist/services/shared/addFeatures.js +0 -11
- package/dist/services/shared/addFeatures.js.map +1 -1
- package/dist/services/shared/applyEdits.d.ts +0 -11
- package/dist/services/shared/applyEdits.js +0 -11
- package/dist/services/shared/applyEdits.js.map +1 -1
- package/dist/services/shared/config.d.ts +0 -38
- package/dist/services/shared/config.js +0 -22
- package/dist/services/shared/config.js.map +1 -1
- package/dist/services/shared/getItemInfo.d.ts +0 -12
- package/dist/services/shared/getItemInfo.js +1 -16
- package/dist/services/shared/getItemInfo.js.map +1 -1
- package/dist/types/index.d.ts +1 -330
- package/dist/types/index.js +0 -19
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,193 +3,46 @@ import { ApplyEditsResult } from '../shared/applyEdits';
|
|
|
3
3
|
import { CustomTermCategory, CustomTermStatus } from '../shared/config';
|
|
4
4
|
import { ItemInfoResponse } from '../shared/getItemInfo';
|
|
5
5
|
import { CustomTermsFeatureTableField } from './config';
|
|
6
|
-
/**
|
|
7
|
-
* Custom term feature from the feature table
|
|
8
|
-
*/
|
|
9
6
|
export type CustomTermFeature = {
|
|
10
|
-
/**
|
|
11
|
-
* objectId of the feature
|
|
12
|
-
*/
|
|
13
7
|
objectId: number;
|
|
14
|
-
/**
|
|
15
|
-
* the term that is added by the user
|
|
16
|
-
*/
|
|
17
8
|
term: string;
|
|
18
|
-
/**
|
|
19
|
-
* the category of the term
|
|
20
|
-
*/
|
|
21
9
|
category: CustomTermCategory;
|
|
22
|
-
/**
|
|
23
|
-
* the status of the term
|
|
24
|
-
*/
|
|
25
10
|
status: CustomTermStatus;
|
|
26
|
-
/**
|
|
27
|
-
* title of the item that the term is added to,
|
|
28
|
-
* this is used to provide context to the term
|
|
29
|
-
* when it is reviewed by the Living Atlas team
|
|
30
|
-
*/
|
|
31
11
|
title: string;
|
|
32
|
-
/**
|
|
33
|
-
* snippet of the item that the term is added to,
|
|
34
|
-
* this is used to provide context to the term
|
|
35
|
-
* when it is reviewed by the Living Atlas team
|
|
36
|
-
*/
|
|
37
12
|
snippet: string;
|
|
38
|
-
/**
|
|
39
|
-
* itemId of the item that the term is added to,
|
|
40
|
-
*/
|
|
41
13
|
itemId: string;
|
|
42
|
-
/**
|
|
43
|
-
* note of this term
|
|
44
|
-
*/
|
|
45
14
|
note: string;
|
|
46
|
-
/**
|
|
47
|
-
* date when the term was created
|
|
48
|
-
*/
|
|
49
15
|
creationDate: number;
|
|
50
|
-
/**
|
|
51
|
-
* date when the term was last modified
|
|
52
|
-
*/
|
|
53
16
|
modifiedDate: number;
|
|
54
|
-
/**
|
|
55
|
-
* the user who created the term
|
|
56
|
-
*/
|
|
57
17
|
creator: string;
|
|
58
|
-
/**
|
|
59
|
-
* the user who edited the term
|
|
60
|
-
*/
|
|
61
18
|
editor: string;
|
|
62
19
|
};
|
|
63
20
|
type GetCustomTermsOptions = {
|
|
64
|
-
/**
|
|
65
|
-
* The user IDs to filter the custom terms by creator.
|
|
66
|
-
*/
|
|
67
21
|
userIds: string[];
|
|
68
|
-
/**
|
|
69
|
-
* The authentication token.
|
|
70
|
-
*/
|
|
71
22
|
token: string;
|
|
72
|
-
/**
|
|
73
|
-
* The status filter for the custom terms.
|
|
74
|
-
*/
|
|
75
23
|
status?: CustomTermStatus[];
|
|
76
|
-
/**
|
|
77
|
-
* The fields to include in the response.
|
|
78
|
-
*/
|
|
79
24
|
fields?: CustomTermsFeatureTableField[];
|
|
80
|
-
/**
|
|
81
|
-
* The maximum number of records to return.
|
|
82
|
-
* If set, the function will stop fetching more records once this limit is reached.
|
|
83
|
-
* If not set, the function will fetch all records.
|
|
84
|
-
*/
|
|
85
25
|
maxNumOfRecords?: number;
|
|
86
|
-
/**
|
|
87
|
-
* The offset for the result set.
|
|
88
|
-
*/
|
|
89
26
|
resultOffset?: number;
|
|
90
27
|
};
|
|
91
|
-
/**
|
|
92
|
-
* Fetches custom terms from the Custom Terms Feature Table based on the provided options.
|
|
93
|
-
*
|
|
94
|
-
* @param {Object} options - The options for fetching custom terms.
|
|
95
|
-
* @param {string} options.token - The authentication token.
|
|
96
|
-
* @param {string[]} [options.status] - The status filter for the custom terms.
|
|
97
|
-
* @param {string[]} options.userIds - The user IDs to filter the custom terms by creator.
|
|
98
|
-
* @param {string[]} [options.fields] - The fields to include in the response.
|
|
99
|
-
*
|
|
100
|
-
* @returns {Promise<CustomTermFeature[]>} A promise that resolves to an array of custom term features.
|
|
101
|
-
*
|
|
102
|
-
* @throws Will throw an error if the response contains an error.
|
|
103
|
-
*/
|
|
104
28
|
export declare const getCustomTerms: ({ token, status, userIds, fields, maxNumOfRecords, resultOffset, }: GetCustomTermsOptions) => Promise<CustomTermFeature[]>;
|
|
105
|
-
/**
|
|
106
|
-
* Retrieves the count of custom terms based on the provided criteria.
|
|
107
|
-
*
|
|
108
|
-
* @param {Object} params - The parameters for the request.
|
|
109
|
-
* @param {string} params.token - The authentication token.
|
|
110
|
-
* @param {CustomTermStatus[]} [params.status] - Optional array of custom term statuses to filter by.
|
|
111
|
-
* @param {string[]} params.userIds - Array of user IDs to filter by.
|
|
112
|
-
*
|
|
113
|
-
* @returns {Promise<number>} - A promise that resolves to the count of custom terms.
|
|
114
|
-
*/
|
|
115
29
|
export declare const getCountOfCustomTerms: ({ token, status, userIds, }: {
|
|
116
30
|
token: string;
|
|
117
31
|
status?: CustomTermStatus[];
|
|
118
32
|
userIds: string[];
|
|
119
33
|
}) => Promise<number>;
|
|
120
|
-
/**
|
|
121
|
-
* Retrieves the custom terms that have been submitted by users for review.
|
|
122
|
-
* The custom terms have a status of 'submitted' meaning they are **pending review** by the Living Atlas team.
|
|
123
|
-
*
|
|
124
|
-
* @param {Object} params - The parameters for retrieving submitted custom terms.
|
|
125
|
-
* @param {string[]} [params.userIds] - Optional array of user IDs to filter the custom terms.
|
|
126
|
-
* @param {boolean} [params.shouldIncludeAllFields=false] - Flag indicating whether to include all fields in the response.
|
|
127
|
-
* @param {string} params.token - The authentication token required to access the custom terms.
|
|
128
|
-
* @returns {Promise<CustomTermFeature[]>} A promise that resolves to an array of submitted custom term features.
|
|
129
|
-
*/
|
|
130
34
|
export declare const getSubmittedCustomTerms: ({ userIds, shouldIncludeAllFields, token, }: {
|
|
131
35
|
userIds?: string[];
|
|
132
36
|
shouldIncludeAllFields?: boolean;
|
|
133
37
|
token: string;
|
|
134
38
|
}) => Promise<CustomTermFeature[]>;
|
|
135
|
-
/**
|
|
136
|
-
* Get custom terms that are added by the signed-in user.
|
|
137
|
-
*
|
|
138
|
-
* @param userId id of the user
|
|
139
|
-
* @param token authentication token
|
|
140
|
-
* @returns Promise<CustomTermFeature[]> array of custom term features that are added by the signed-in user.
|
|
141
|
-
*/
|
|
142
39
|
export declare const getMyCustomTerms: ({ userId, token, maxNumOfRecords, resultOffset, }: {
|
|
143
40
|
userId: string;
|
|
144
41
|
token: string;
|
|
145
42
|
maxNumOfRecords?: number;
|
|
146
43
|
resultOffset?: number;
|
|
147
44
|
}) => Promise<CustomTermFeature[]>;
|
|
148
|
-
/**
|
|
149
|
-
* Get the count of custom terms that are added by the signed-in user.
|
|
150
|
-
*
|
|
151
|
-
* @param userId id of the user
|
|
152
|
-
* @param token authentication token
|
|
153
|
-
* @returns Promise<number> count of custom terms that are added by the signed-in user.
|
|
154
|
-
*/
|
|
155
45
|
export declare const getCountOfMyCustomTerms: (userId: string, token: string) => Promise<number>;
|
|
156
|
-
/**
|
|
157
|
-
* Add custom term to the feature table for the Living Atlas team to review
|
|
158
|
-
*
|
|
159
|
-
* @param customTermFeature - The custom term feature to be added.
|
|
160
|
-
* @param token - The authentication token.
|
|
161
|
-
* @returns A promise that resolves to an array of `AddCustomTermFeatureResponse` objects.
|
|
162
|
-
*
|
|
163
|
-
* @remark
|
|
164
|
-
* Here is an example of a failed request with `rollbackOnFailure`. This is caused by the second feature containing invalid data for the `item_id` field.
|
|
165
|
-
*
|
|
166
|
-
* ```
|
|
167
|
-
* {
|
|
168
|
-
* "addResults" : [
|
|
169
|
-
* {
|
|
170
|
-
* "objectId" : 1010,
|
|
171
|
-
* "uniqueId" : 1010,
|
|
172
|
-
* "globalId" : "1F68",
|
|
173
|
-
* "success" : false,
|
|
174
|
-
* "error" : {
|
|
175
|
-
* "code" : 1003,
|
|
176
|
-
* "description" : "Operation rolled back."
|
|
177
|
-
* }
|
|
178
|
-
* },
|
|
179
|
-
* {
|
|
180
|
-
* "objectId" : -1,
|
|
181
|
-
* "uniqueId" : -1,
|
|
182
|
-
* "globalId" : "AE186",
|
|
183
|
-
* "success" : false,
|
|
184
|
-
* "error" : {
|
|
185
|
-
* "code" : 1000,
|
|
186
|
-
* "description" : "String or binary data would be truncated.\r\nThe statement has been terminated."
|
|
187
|
-
* }
|
|
188
|
-
* }
|
|
189
|
-
* ]
|
|
190
|
-
* }
|
|
191
|
-
* ```
|
|
192
|
-
*/
|
|
193
46
|
export declare const addCustomTerms2FeatureTable: (data: {
|
|
194
47
|
term: string;
|
|
195
48
|
category: CustomTermCategory;
|
|
@@ -197,33 +50,10 @@ export declare const addCustomTerms2FeatureTable: (data: {
|
|
|
197
50
|
snippet: string;
|
|
198
51
|
itemId: string;
|
|
199
52
|
}[], token: string) => Promise<AddFeaturesResponse[]>;
|
|
200
|
-
/**
|
|
201
|
-
* Updates the status of custom terms in the feature table.
|
|
202
|
-
*
|
|
203
|
-
* @param token - The authentication token required for the operation
|
|
204
|
-
* @param data - An array of objects containing:
|
|
205
|
-
* - objectId: The unique identifier of the custom term
|
|
206
|
-
* - status: The decision made by the Living Atlas team about the term
|
|
207
|
-
* - note: A comment/note left by the Living Atlas team
|
|
208
|
-
*
|
|
209
|
-
* @throws {Error} If token is missing, required fields are not provided, or other operation errors occur
|
|
210
|
-
* @returns A promise that resolves to an array of ApplyEditsResult objects
|
|
211
|
-
*/
|
|
212
53
|
export declare const updateStatusOfCustomTermsInFeatureTable: (token: string, data: {
|
|
213
54
|
objectId: number;
|
|
214
|
-
/**
|
|
215
|
-
* the status of the term, which is the decision made by the Living Atlas team
|
|
216
|
-
*/
|
|
217
55
|
status: CustomTermStatus;
|
|
218
|
-
/**
|
|
219
|
-
* note/comment left by the Living Atlas team
|
|
220
|
-
*/
|
|
221
56
|
note: string;
|
|
222
57
|
}[]) => Promise<ApplyEditsResult[]>;
|
|
223
|
-
/**
|
|
224
|
-
* Get the item info for the Custom Terms feature table.
|
|
225
|
-
* @param token - The authentication token required to access the item info.
|
|
226
|
-
* @returns A promise that resolves to an `ItemInfoResponse` object containing metadata about the feature table.
|
|
227
|
-
*/
|
|
228
58
|
export declare const getCustomTermsFeatureTableItemInfo: (token: string) => Promise<ItemInfoResponse>;
|
|
229
59
|
export {};
|
|
@@ -15,19 +15,6 @@ const applyEdits_1 = require("../shared/applyEdits");
|
|
|
15
15
|
const getItemInfo_1 = require("../shared/getItemInfo");
|
|
16
16
|
const config_1 = require("./config");
|
|
17
17
|
const helpers_1 = require("./helpers");
|
|
18
|
-
/**
|
|
19
|
-
* Fetches custom terms from the Custom Terms Feature Table based on the provided options.
|
|
20
|
-
*
|
|
21
|
-
* @param {Object} options - The options for fetching custom terms.
|
|
22
|
-
* @param {string} options.token - The authentication token.
|
|
23
|
-
* @param {string[]} [options.status] - The status filter for the custom terms.
|
|
24
|
-
* @param {string[]} options.userIds - The user IDs to filter the custom terms by creator.
|
|
25
|
-
* @param {string[]} [options.fields] - The fields to include in the response.
|
|
26
|
-
*
|
|
27
|
-
* @returns {Promise<CustomTermFeature[]>} A promise that resolves to an array of custom term features.
|
|
28
|
-
*
|
|
29
|
-
* @throws Will throw an error if the response contains an error.
|
|
30
|
-
*/
|
|
31
18
|
const getCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ token, status, userIds, fields, maxNumOfRecords, resultOffset = 0, }) {
|
|
32
19
|
var _b;
|
|
33
20
|
if (!token) {
|
|
@@ -35,55 +22,29 @@ const getCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ toke
|
|
|
35
22
|
}
|
|
36
23
|
const CustomTermsFeatureTableUrl = (0, config_1.getCustomTermsFeatureTableUrl)();
|
|
37
24
|
const requestURL = `${CustomTermsFeatureTableUrl}/query`;
|
|
38
|
-
// const whereClause = [
|
|
39
|
-
// `(${CustomTermsFeatureTableField.TERM} IS NOT NULL)`,
|
|
40
|
-
// `(${CustomTermsFeatureTableField.TERM} <> '')`,
|
|
41
|
-
// ];
|
|
42
|
-
// if (userIds && userIds.length > 0) {
|
|
43
|
-
// whereClause.push(
|
|
44
|
-
// `(${CustomTermsFeatureTableField.CREATOR} IN ('${userIds.join(
|
|
45
|
-
// "','"
|
|
46
|
-
// )}'))`
|
|
47
|
-
// );
|
|
48
|
-
// }
|
|
49
|
-
// if (status && status.length > 0) {
|
|
50
|
-
// whereClause.push(
|
|
51
|
-
// `(${CustomTermsFeatureTableField.STATUS} IN ('${status.join(
|
|
52
|
-
// "','"
|
|
53
|
-
// )}'))`
|
|
54
|
-
// );
|
|
55
|
-
// }
|
|
56
25
|
const where = (0, helpers_1.getWhereClause)(userIds, status);
|
|
57
26
|
const outFields = fields && fields.length > 1 ? fields.join(',') : '*';
|
|
58
27
|
const orderByFields = `${config_1.CustomTermsFeatureTableField.EDIT_DATE} desc`;
|
|
59
|
-
const maxRecorsPerRequest = 1000;
|
|
60
|
-
// determine the number of records to return
|
|
61
|
-
// if maxNumOfRecords is set, use it, otherwise use maxRecorsPerRequest
|
|
62
|
-
// this is to avoid fetching more records than needed
|
|
28
|
+
const maxRecorsPerRequest = 1000;
|
|
63
29
|
const resultRecordCount = Math.min(maxRecorsPerRequest, maxNumOfRecords || maxRecorsPerRequest);
|
|
64
30
|
const allFeatures = [];
|
|
65
|
-
// let resultOffset = 0;
|
|
66
31
|
let exceededTransferLimit = true;
|
|
67
32
|
while (exceededTransferLimit && allFeatures.length < 10000) {
|
|
68
33
|
const queryParams = new URLSearchParams({
|
|
69
34
|
f: 'json',
|
|
70
35
|
token,
|
|
71
36
|
where,
|
|
72
|
-
orderByFields,
|
|
73
|
-
outFields,
|
|
37
|
+
orderByFields,
|
|
38
|
+
outFields,
|
|
74
39
|
resultRecordCount: resultRecordCount.toString(),
|
|
75
40
|
resultOffset: resultOffset.toString(),
|
|
76
41
|
});
|
|
77
42
|
const res = yield fetch(`${requestURL}?${queryParams.toString()}`);
|
|
78
43
|
const responseBody = yield res.json();
|
|
79
44
|
if (responseBody === null || responseBody === void 0 ? void 0 : responseBody.error) {
|
|
80
|
-
// console.log('Error response:', responseBody);
|
|
81
45
|
throw new Error(((_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.error) === null || _b === void 0 ? void 0 : _b.message) || 'Failed to fetch custom terms.');
|
|
82
46
|
}
|
|
83
47
|
const features = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.features) || [];
|
|
84
|
-
// if (!features || features.length === 0) {
|
|
85
|
-
// return [];
|
|
86
|
-
// }
|
|
87
48
|
for (const feature of features) {
|
|
88
49
|
if (!(feature === null || feature === void 0 ? void 0 : feature.attributes)) {
|
|
89
50
|
throw new Error('Feature attributes are missing');
|
|
@@ -105,27 +66,15 @@ const getCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ toke
|
|
|
105
66
|
};
|
|
106
67
|
allFeatures.push(customTermFeature);
|
|
107
68
|
}
|
|
108
|
-
// if the maxNumOfRecords is set and the number of features is greater than or equal to the maxNumOfRecords, break the loop
|
|
109
|
-
// this is to avoid fetching more records than needed
|
|
110
69
|
if (maxNumOfRecords && allFeatures.length >= maxNumOfRecords) {
|
|
111
70
|
break;
|
|
112
71
|
}
|
|
113
72
|
exceededTransferLimit = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.exceededTransferLimit) === true;
|
|
114
|
-
resultOffset += resultRecordCount;
|
|
73
|
+
resultOffset += resultRecordCount;
|
|
115
74
|
}
|
|
116
75
|
return allFeatures;
|
|
117
76
|
});
|
|
118
77
|
exports.getCustomTerms = getCustomTerms;
|
|
119
|
-
/**
|
|
120
|
-
* Retrieves the count of custom terms based on the provided criteria.
|
|
121
|
-
*
|
|
122
|
-
* @param {Object} params - The parameters for the request.
|
|
123
|
-
* @param {string} params.token - The authentication token.
|
|
124
|
-
* @param {CustomTermStatus[]} [params.status] - Optional array of custom term statuses to filter by.
|
|
125
|
-
* @param {string[]} params.userIds - Array of user IDs to filter by.
|
|
126
|
-
*
|
|
127
|
-
* @returns {Promise<number>} - A promise that resolves to the count of custom terms.
|
|
128
|
-
*/
|
|
129
78
|
const getCountOfCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ token, status, userIds, }) {
|
|
130
79
|
var _b;
|
|
131
80
|
const CustomTermsFeatureTableUrl = (0, config_1.getCustomTermsFeatureTableUrl)();
|
|
@@ -146,7 +95,6 @@ const getCountOfCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function*
|
|
|
146
95
|
const res = yield fetch(`${requestURL}?${queryParams.toString()}`);
|
|
147
96
|
const responseBody = yield res.json();
|
|
148
97
|
if (responseBody === null || responseBody === void 0 ? void 0 : responseBody.error) {
|
|
149
|
-
// console.log('Error response:', responseBody);
|
|
150
98
|
throw new Error(((_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.error) === null || _b === void 0 ? void 0 : _b.message) ||
|
|
151
99
|
'Failed to fetch count of custom terms.');
|
|
152
100
|
}
|
|
@@ -154,16 +102,6 @@ const getCountOfCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function*
|
|
|
154
102
|
return count;
|
|
155
103
|
});
|
|
156
104
|
exports.getCountOfCustomTerms = getCountOfCustomTerms;
|
|
157
|
-
/**
|
|
158
|
-
* Retrieves the custom terms that have been submitted by users for review.
|
|
159
|
-
* The custom terms have a status of 'submitted' meaning they are **pending review** by the Living Atlas team.
|
|
160
|
-
*
|
|
161
|
-
* @param {Object} params - The parameters for retrieving submitted custom terms.
|
|
162
|
-
* @param {string[]} [params.userIds] - Optional array of user IDs to filter the custom terms.
|
|
163
|
-
* @param {boolean} [params.shouldIncludeAllFields=false] - Flag indicating whether to include all fields in the response.
|
|
164
|
-
* @param {string} params.token - The authentication token required to access the custom terms.
|
|
165
|
-
* @returns {Promise<CustomTermFeature[]>} A promise that resolves to an array of submitted custom term features.
|
|
166
|
-
*/
|
|
167
105
|
const getSubmittedCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ userIds, shouldIncludeAllFields = false, token, }) {
|
|
168
106
|
const fields = shouldIncludeAllFields === false
|
|
169
107
|
? [
|
|
@@ -186,13 +124,6 @@ const getSubmittedCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function
|
|
|
186
124
|
return customTerms;
|
|
187
125
|
});
|
|
188
126
|
exports.getSubmittedCustomTerms = getSubmittedCustomTerms;
|
|
189
|
-
/**
|
|
190
|
-
* Get custom terms that are added by the signed-in user.
|
|
191
|
-
*
|
|
192
|
-
* @param userId id of the user
|
|
193
|
-
* @param token authentication token
|
|
194
|
-
* @returns Promise<CustomTermFeature[]> array of custom term features that are added by the signed-in user.
|
|
195
|
-
*/
|
|
196
127
|
const getMyCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ userId, token, maxNumOfRecords, resultOffset, }) {
|
|
197
128
|
const customTerms = yield (0, exports.getCustomTerms)({
|
|
198
129
|
userIds: [userId],
|
|
@@ -214,13 +145,6 @@ const getMyCustomTerms = (_a) => __awaiter(void 0, [_a], void 0, function* ({ us
|
|
|
214
145
|
return customTerms;
|
|
215
146
|
});
|
|
216
147
|
exports.getMyCustomTerms = getMyCustomTerms;
|
|
217
|
-
/**
|
|
218
|
-
* Get the count of custom terms that are added by the signed-in user.
|
|
219
|
-
*
|
|
220
|
-
* @param userId id of the user
|
|
221
|
-
* @param token authentication token
|
|
222
|
-
* @returns Promise<number> count of custom terms that are added by the signed-in user.
|
|
223
|
-
*/
|
|
224
148
|
const getCountOfMyCustomTerms = (userId, token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
225
149
|
const count = yield (0, exports.getCountOfCustomTerms)({
|
|
226
150
|
userIds: [userId],
|
|
@@ -229,45 +153,7 @@ const getCountOfMyCustomTerms = (userId, token) => __awaiter(void 0, void 0, voi
|
|
|
229
153
|
return count;
|
|
230
154
|
});
|
|
231
155
|
exports.getCountOfMyCustomTerms = getCountOfMyCustomTerms;
|
|
232
|
-
/**
|
|
233
|
-
* Add custom term to the feature table for the Living Atlas team to review
|
|
234
|
-
*
|
|
235
|
-
* @param customTermFeature - The custom term feature to be added.
|
|
236
|
-
* @param token - The authentication token.
|
|
237
|
-
* @returns A promise that resolves to an array of `AddCustomTermFeatureResponse` objects.
|
|
238
|
-
*
|
|
239
|
-
* @remark
|
|
240
|
-
* Here is an example of a failed request with `rollbackOnFailure`. This is caused by the second feature containing invalid data for the `item_id` field.
|
|
241
|
-
*
|
|
242
|
-
* ```
|
|
243
|
-
* {
|
|
244
|
-
* "addResults" : [
|
|
245
|
-
* {
|
|
246
|
-
* "objectId" : 1010,
|
|
247
|
-
* "uniqueId" : 1010,
|
|
248
|
-
* "globalId" : "1F68",
|
|
249
|
-
* "success" : false,
|
|
250
|
-
* "error" : {
|
|
251
|
-
* "code" : 1003,
|
|
252
|
-
* "description" : "Operation rolled back."
|
|
253
|
-
* }
|
|
254
|
-
* },
|
|
255
|
-
* {
|
|
256
|
-
* "objectId" : -1,
|
|
257
|
-
* "uniqueId" : -1,
|
|
258
|
-
* "globalId" : "AE186",
|
|
259
|
-
* "success" : false,
|
|
260
|
-
* "error" : {
|
|
261
|
-
* "code" : 1000,
|
|
262
|
-
* "description" : "String or binary data would be truncated.\r\nThe statement has been terminated."
|
|
263
|
-
* }
|
|
264
|
-
* }
|
|
265
|
-
* ]
|
|
266
|
-
* }
|
|
267
|
-
* ```
|
|
268
|
-
*/
|
|
269
156
|
const addCustomTerms2FeatureTable = (data, token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
270
|
-
// const requestURL = `${CustomTermsFeatureTableUrl}/addFeatures`;
|
|
271
157
|
var _a;
|
|
272
158
|
const CustomTermsFeatureTableUrl = (0, config_1.getCustomTermsFeatureTableUrl)();
|
|
273
159
|
if (!token) {
|
|
@@ -279,16 +165,8 @@ const addCustomTerms2FeatureTable = (data, token) => __awaiter(void 0, void 0, v
|
|
|
279
165
|
throw new Error(`Missing required fields: ${JSON.stringify(d)}`);
|
|
280
166
|
}
|
|
281
167
|
}
|
|
282
|
-
// status of the term that is added to the feature table
|
|
283
|
-
// all terms that have not been reviewed by the Living Atlas team will have a status of `submitted`
|
|
284
|
-
// once the term is approved or rejected, the status will be updated accordingly
|
|
285
168
|
const status = 'submitted';
|
|
286
169
|
const features = data.map((d) => {
|
|
287
|
-
// // Convert the term to lowercase to ensure consistency.
|
|
288
|
-
// // When the Living Atlas team reviews the term, all terms with different cases will be treated as the same term.
|
|
289
|
-
// // For example, "Climate Change" and "climate change" will be treated as the same term.
|
|
290
|
-
// // Converting to lowercase helps to synchronize the reviewed results back to the feature table.
|
|
291
|
-
// const termLowerCase = d.term.toLowerCase();
|
|
292
170
|
return {
|
|
293
171
|
attributes: {
|
|
294
172
|
[config_1.CustomTermsFeatureTableField.TERM]: d.term,
|
|
@@ -306,46 +184,8 @@ const addCustomTerms2FeatureTable = (data, token) => __awaiter(void 0, void 0, v
|
|
|
306
184
|
featureTableUrl: CustomTermsFeatureTableUrl,
|
|
307
185
|
});
|
|
308
186
|
return res;
|
|
309
|
-
// const res = await fetch(requestURL, {
|
|
310
|
-
// method: 'POST',
|
|
311
|
-
// body: new URLSearchParams({
|
|
312
|
-
// f: 'json',
|
|
313
|
-
// token,
|
|
314
|
-
// rollbackOnFailure: 'true',
|
|
315
|
-
// features: JSON.stringify(features),
|
|
316
|
-
// }),
|
|
317
|
-
// });
|
|
318
|
-
// const responseBody = await res.json();
|
|
319
|
-
// if (responseBody?.error) {
|
|
320
|
-
// throw responseBody?.error;
|
|
321
|
-
// }
|
|
322
|
-
// const addResults =
|
|
323
|
-
// responseBody?.addResults as AddCustomTermFeatureResponse[];
|
|
324
|
-
// if (!addResults) {
|
|
325
|
-
// return [];
|
|
326
|
-
// }
|
|
327
|
-
// for (const res of addResults) {
|
|
328
|
-
// if (res?.success !== true) {
|
|
329
|
-
// throw new Error(
|
|
330
|
-
// res?.error?.description || 'Failed to add custom terms.'
|
|
331
|
-
// );
|
|
332
|
-
// }
|
|
333
|
-
// }
|
|
334
|
-
// return addResults as AddCustomTermFeatureResponse[];
|
|
335
187
|
});
|
|
336
188
|
exports.addCustomTerms2FeatureTable = addCustomTerms2FeatureTable;
|
|
337
|
-
/**
|
|
338
|
-
* Updates the status of custom terms in the feature table.
|
|
339
|
-
*
|
|
340
|
-
* @param token - The authentication token required for the operation
|
|
341
|
-
* @param data - An array of objects containing:
|
|
342
|
-
* - objectId: The unique identifier of the custom term
|
|
343
|
-
* - status: The decision made by the Living Atlas team about the term
|
|
344
|
-
* - note: A comment/note left by the Living Atlas team
|
|
345
|
-
*
|
|
346
|
-
* @throws {Error} If token is missing, required fields are not provided, or other operation errors occur
|
|
347
|
-
* @returns A promise that resolves to an array of ApplyEditsResult objects
|
|
348
|
-
*/
|
|
349
189
|
const updateStatusOfCustomTermsInFeatureTable = (token, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
350
190
|
if (!token) {
|
|
351
191
|
throw new Error('Token is required');
|
|
@@ -377,11 +217,6 @@ const updateStatusOfCustomTermsInFeatureTable = (token, data) => __awaiter(void
|
|
|
377
217
|
return res;
|
|
378
218
|
});
|
|
379
219
|
exports.updateStatusOfCustomTermsInFeatureTable = updateStatusOfCustomTermsInFeatureTable;
|
|
380
|
-
/**
|
|
381
|
-
* Get the item info for the Custom Terms feature table.
|
|
382
|
-
* @param token - The authentication token required to access the item info.
|
|
383
|
-
* @returns A promise that resolves to an `ItemInfoResponse` object containing metadata about the feature table.
|
|
384
|
-
*/
|
|
385
220
|
const getCustomTermsFeatureTableItemInfo = (token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
386
221
|
const itemInfoUrl = (0, config_1.getCustomTermsFeatureTableItemInfoUrl)();
|
|
387
222
|
if (!token) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customTerms.js","sourceRoot":"","sources":["../../../src/services/custom-terms/customTerms.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAyE;AACzE,qDAAwE;AAExE,uDAG+B;AAC/B,qCAMkB;AAClB,uCAA2C;
|
|
1
|
+
{"version":3,"file":"customTerms.js","sourceRoot":"","sources":["../../../src/services/custom-terms/customTerms.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAyE;AACzE,qDAAwE;AAExE,uDAG+B;AAC/B,qCAMkB;AAClB,uCAA2C;AA0GpC,MAAM,cAAc,GAAG,KAO0B,EAAE,4CAPrB,EACjC,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,eAAe,EACf,YAAY,GAAG,CAAC,GACI;;IACpB,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,0BAA0B,GAAG,IAAA,sCAA6B,GAAE,CAAC;IAEnE,MAAM,UAAU,GAAG,GAAG,0BAA0B,Q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YACH,UAAU,EAAE;gBACR,CAAC,qCAA4B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,QAAQ;gBACpD,CAAC,qCAA4B,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM;gBAC/C,CAAC,qCAA4B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI;aAC9C;SACJ,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,MAAM,IAAA,2BAAc,EAAC;QAC7B,KAAK;QACL,OAAO,EAAE,QAAQ;QACjB,eAAe,EAAE,0BAA0B;KAC9C,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC;AACf,CAAC,CAAA,CAAC;AAhDW,QAAA,uCAAuC,2CAgDlD;AAOK,MAAM,kCAAkC,GAAG,CAC9C,KAAa,EACY,EAAE;IAC3B,MAAM,WAAW,GAAG,IAAA,8CAAqC,GAAE,CAAC;IAE5D,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,IAAA,qCAAuB,EAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAC9D,OAAO,GAAG,CAAC;AACf,CAAC,CAAA,CAAC;AAXW,QAAA,kCAAkC,sCAW7C"}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
import { CustomTermStatus } from '../shared/config';
|
|
2
|
-
/**
|
|
3
|
-
* Get the where clause to be used to query cumstom terms
|
|
4
|
-
* @param userIds array of user ids
|
|
5
|
-
* @param status array of status
|
|
6
|
-
* @returns the where clause to be used to query cumstom terms
|
|
7
|
-
*/
|
|
8
2
|
export declare const getWhereClause: (userIds: string[], status: CustomTermStatus[]) => string;
|
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getWhereClause = void 0;
|
|
4
4
|
const config_1 = require("./config");
|
|
5
|
-
/**
|
|
6
|
-
* Get the where clause to be used to query cumstom terms
|
|
7
|
-
* @param userIds array of user ids
|
|
8
|
-
* @param status array of status
|
|
9
|
-
* @returns the where clause to be used to query cumstom terms
|
|
10
|
-
*/
|
|
11
5
|
const getWhereClause = (userIds, status) => {
|
|
12
6
|
const whereClause = [
|
|
13
7
|
`(${config_1.CustomTermsFeatureTableField.TERM} IS NOT NULL)`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/services/custom-terms/helpers.ts"],"names":[],"mappings":";;;AAAA,qCAAwD;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/services/custom-terms/helpers.ts"],"names":[],"mappings":";;;AAAA,qCAAwD;AASjD,MAAM,cAAc,GAAG,CAC1B,OAAiB,EACjB,MAA0B,EACpB,EAAE;IACR,MAAM,WAAW,GAAG;QAChB,IAAI,qCAA4B,CAAC,IAAI,eAAe;QACpD,IAAI,qCAA4B,CAAC,IAAI,SAAS;KACjD,CAAC;IAEF,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,WAAW,CAAC,IAAI,CACZ,IAAI,qCAA4B,CAAC,OAAO,SAAS,OAAO,CAAC,IAAI,CACzD,KAAK,CACR,KAAK,CACT,CAAC;IACN,CAAC;IAED,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,WAAW,CAAC,IAAI,CACZ,IAAI,qCAA4B,CAAC,MAAM,SAAS,MAAM,CAAC,IAAI,CACvD,KAAK,CACR,KAAK,CACT,CAAC;IACN,CAAC;IAED,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC;AA1BW,QAAA,cAAc,kBA0BzB"}
|
|
@@ -10,22 +10,6 @@ export declare enum CustomTermsReviewResultsFeatureTableField {
|
|
|
10
10
|
EDIT_DATE = "EditDate",
|
|
11
11
|
EDITOR = "Editor"
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Lifecycle status of a custom term review result.
|
|
15
|
-
*
|
|
16
|
-
* - `reviewed`: The term has been reviewed but has not been packaged or deployed yet.
|
|
17
|
-
* - `packaged`: The term has been packaged but has not been deployed yet.
|
|
18
|
-
* - `deployed`: The term has been deployed but has not been archived yet.
|
|
19
|
-
* - `archived`: The review result has been synced back to the custom-terms table and this term has been archived.
|
|
20
|
-
*/
|
|
21
13
|
export type CustomTermsReviewResultLifecycle = 'reviewed' | 'packaged' | 'deployed' | 'archived';
|
|
22
|
-
/**
|
|
23
|
-
* Gets the URL for the Custom Terms Review Results feature table based on the current service tier.
|
|
24
|
-
* @returns the URL for the Custom Terms Review Results feature table based on the current service tier.
|
|
25
|
-
*/
|
|
26
14
|
export declare const getCustomTermsReviewResultsFeatureTableUrl: () => string;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the URL for the itemInfo endpoint for the Custom Terms Review Results feature table based on the current service tier.
|
|
29
|
-
* @returns The URL for the itemInfo endpoint for the Custom Terms Review Results feature table.
|
|
30
|
-
*/
|
|
31
15
|
export declare const getCustomTermsReviewResultsFeatureTableItemInfoUrl: () => string;
|
|
@@ -2,46 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCustomTermsReviewResultsFeatureTableItemInfoUrl = exports.getCustomTermsReviewResultsFeatureTableUrl = exports.CustomTermsReviewResultsFeatureTableField = void 0;
|
|
4
4
|
const config_1 = require("../shared/config");
|
|
5
|
-
/**
|
|
6
|
-
* The root URL for the Custom Terms Review Results feature table in the development environment.
|
|
7
|
-
* @see
|
|
8
|
-
* https://servicesdev.arcgis.com/VLx4vrvwONglS8iz/ArcGIS/rest/services/Custom_Terms_Review_Results/FeatureServer
|
|
9
|
-
*/
|
|
10
5
|
const CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ROOT_DEV = 'https://servicesdev.arcgis.com/VLx4vrvwONglS8iz/ArcGIS/rest/services/Custom_Terms_Review_Results/FeatureServer';
|
|
11
|
-
/**
|
|
12
|
-
* The URL for the Custom Terms Review Results feature table in the development environment.
|
|
13
|
-
* @see
|
|
14
|
-
* https://servicesdev.arcgis.com/VLx4vrvwONglS8iz/ArcGIS/rest/services/Custom_Terms_Review_Results/FeatureServer/0
|
|
15
|
-
*/
|
|
16
6
|
const CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_URL_DEV = CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ROOT_DEV + '/0';
|
|
17
|
-
/**
|
|
18
|
-
* The URL for the itemInfo endpoint for the Custom Terms Review Results feature table in the development environment.
|
|
19
|
-
* @see
|
|
20
|
-
* https://servicesdev.arcgis.com/VLx4vrvwONglS8iz/ArcGIS/rest/services/Custom_Terms_Review_Results/FeatureServer/info/itemInfo
|
|
21
|
-
*/
|
|
22
7
|
const CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ITEMINFO_DEV = CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ROOT_DEV + '/info/itemInfo';
|
|
23
|
-
/**
|
|
24
|
-
* The root URL for the Custom Terms Review Results feature table in the production environment.
|
|
25
|
-
* @see
|
|
26
|
-
* https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/Custom_Terms_Review_Results/FeatureServer
|
|
27
|
-
*/
|
|
28
8
|
const CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ROOT_PROD = 'https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/Custom_Terms_Review_Results/FeatureServer';
|
|
29
|
-
/**
|
|
30
|
-
* The URL for the Custom Terms Review Results feature table in the production environment.
|
|
31
|
-
* @see
|
|
32
|
-
* https://services.arcgis.com/jIL9msH9OI208GCb/ArcGIS/rest/services/Custom_Terms_Review_Results/FeatureServer/0
|
|
33
|
-
*/
|
|
34
9
|
const CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_URL_PROD = CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ROOT_PROD + '/0';
|
|
35
|
-
/**
|
|
36
|
-
* The URL for the itemInfo endpoint for the Custom Terms Review Results feature table in the production environment.
|
|
37
|
-
* @see
|
|
38
|
-
* https://services.arcgis.com/jIL9msH9OI208GCb/ArcGIS/rest/services/Custom_Terms_Review_Results/FeatureServer/info/itemInfo
|
|
39
|
-
*/
|
|
40
10
|
const CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ITEMINFO_PROD = CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ROOT_PROD + '/info/itemInfo';
|
|
41
|
-
// export const CustomTermsReviewResultsFeatureTableUrl =
|
|
42
|
-
// TIER === 'prod'
|
|
43
|
-
// ? CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_URL_PROD
|
|
44
|
-
// : CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_URL_DEV;
|
|
45
11
|
var CustomTermsReviewResultsFeatureTableField;
|
|
46
12
|
(function (CustomTermsReviewResultsFeatureTableField) {
|
|
47
13
|
CustomTermsReviewResultsFeatureTableField["OBJECT_ID"] = "OBJECTID";
|
|
@@ -55,20 +21,12 @@ var CustomTermsReviewResultsFeatureTableField;
|
|
|
55
21
|
CustomTermsReviewResultsFeatureTableField["EDIT_DATE"] = "EditDate";
|
|
56
22
|
CustomTermsReviewResultsFeatureTableField["EDITOR"] = "Editor";
|
|
57
23
|
})(CustomTermsReviewResultsFeatureTableField || (exports.CustomTermsReviewResultsFeatureTableField = CustomTermsReviewResultsFeatureTableField = {}));
|
|
58
|
-
/**
|
|
59
|
-
* Gets the URL for the Custom Terms Review Results feature table based on the current service tier.
|
|
60
|
-
* @returns the URL for the Custom Terms Review Results feature table based on the current service tier.
|
|
61
|
-
*/
|
|
62
24
|
const getCustomTermsReviewResultsFeatureTableUrl = () => {
|
|
63
25
|
return config_1.serviceTier === 'prod'
|
|
64
26
|
? CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_URL_PROD
|
|
65
27
|
: CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_URL_DEV;
|
|
66
28
|
};
|
|
67
29
|
exports.getCustomTermsReviewResultsFeatureTableUrl = getCustomTermsReviewResultsFeatureTableUrl;
|
|
68
|
-
/**
|
|
69
|
-
* Gets the URL for the itemInfo endpoint for the Custom Terms Review Results feature table based on the current service tier.
|
|
70
|
-
* @returns The URL for the itemInfo endpoint for the Custom Terms Review Results feature table.
|
|
71
|
-
*/
|
|
72
30
|
const getCustomTermsReviewResultsFeatureTableItemInfoUrl = () => {
|
|
73
31
|
return config_1.serviceTier === 'prod'
|
|
74
32
|
? CUSTOM_TERMS_REVIEW_RESULTS_FEATURE_TABLE_ITEMINFO_PROD
|