@vannizhang/living-atlas-content-validator 1.5.18 → 1.5.19-beta.10
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/README.md +401 -61
- package/dist/configureSettings.js.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/accessInformation/isValidAccessInformation.js +6 -9
- package/dist/lib/accessInformation/isValidAccessInformation.js.map +1 -1
- package/dist/lib/accessInformation/scoringConfig.d.ts +1 -1
- package/dist/lib/accessInformation/scoringConfig.js +1 -1
- package/dist/lib/accessInformation/scoringConfig.js.map +1 -1
- package/dist/lib/checkProfanities/checkProfanities.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js +7 -7
- package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.d.ts +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.js +3 -2
- package/dist/lib/checkTitleAndSnippetSearchability/helpers.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js +6 -9
- package/dist/lib/checkTitleAndSnippetSearchability/matchDateTimeInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchLocationInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchSourceInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/matchTopicInfo.js.map +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.d.ts +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js +1 -1
- package/dist/lib/checkTitleAndSnippetSearchability/scoringConfig.js.map +1 -1
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js +8 -8
- package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js.map +1 -1
- package/dist/lib/deleteProtection/scoringConfig.d.ts +1 -1
- package/dist/lib/deleteProtection/scoringConfig.js +1 -1
- package/dist/lib/deleteProtection/scoringConfig.js.map +1 -1
- package/dist/lib/deprecated/isDeprecated.js +8 -9
- package/dist/lib/deprecated/isDeprecated.js.map +1 -1
- package/dist/lib/deprecated/scoringConfig.d.ts +1 -1
- package/dist/lib/deprecated/scoringConfig.js +1 -1
- package/dist/lib/deprecated/scoringConfig.js.map +1 -1
- package/dist/lib/description/findDataSource.js.map +1 -1
- package/dist/lib/description/isValidDescription.js +23 -41
- package/dist/lib/description/isValidDescription.js.map +1 -1
- package/dist/lib/description/scoringConfig.d.ts +1 -1
- package/dist/lib/description/scoringConfig.js +1 -1
- package/dist/lib/description/scoringConfig.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.d.ts +26 -0
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +92 -0
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js.map +1 -0
- package/dist/lib/featureServiceFieldAliases/scoringConfig.d.ts +8 -0
- package/dist/lib/featureServiceFieldAliases/scoringConfig.js +13 -0
- package/dist/lib/featureServiceFieldAliases/scoringConfig.js.map +1 -0
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.d.ts +25 -0
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +96 -0
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js.map +1 -0
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.d.ts +8 -0
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js +13 -0
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js.map +1 -0
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.d.ts +22 -0
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +90 -0
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js.map +1 -0
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.d.ts +8 -0
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js +13 -0
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js.map +1 -0
- package/dist/lib/licenseInfo/isValidLicenseInfo.js +16 -23
- package/dist/lib/licenseInfo/isValidLicenseInfo.js.map +1 -1
- package/dist/lib/licenseInfo/scoringConfig.d.ts +1 -1
- package/dist/lib/licenseInfo/scoringConfig.js +1 -1
- package/dist/lib/licenseInfo/scoringConfig.js.map +1 -1
- package/dist/lib/sharing/isValidAccess.js +13 -14
- package/dist/lib/sharing/isValidAccess.js.map +1 -1
- package/dist/lib/sharing/scoringConfig.d.ts +1 -1
- package/dist/lib/sharing/scoringConfig.js +1 -1
- package/dist/lib/sharing/scoringConfig.js.map +1 -1
- package/dist/lib/ssl/isValidSSL.js +12 -12
- package/dist/lib/ssl/isValidSSL.js.map +1 -1
- package/dist/lib/ssl/scoringConfig.d.ts +1 -1
- package/dist/lib/ssl/scoringConfig.js +1 -1
- package/dist/lib/ssl/scoringConfig.js.map +1 -1
- package/dist/lib/summary/isValidSummary.js +32 -31
- package/dist/lib/summary/isValidSummary.js.map +1 -1
- package/dist/lib/summary/scoringConfig.d.ts +1 -1
- package/dist/lib/summary/scoringConfig.js +1 -1
- package/dist/lib/summary/scoringConfig.js.map +1 -1
- package/dist/lib/tags/isValidTags.js +15 -21
- package/dist/lib/tags/isValidTags.js.map +1 -1
- package/dist/lib/tags/scoringConfig.d.ts +1 -1
- package/dist/lib/tags/scoringConfig.js +1 -1
- package/dist/lib/tags/scoringConfig.js.map +1 -1
- package/dist/lib/thumbnail/isValidThumbnail.js +16 -34
- package/dist/lib/thumbnail/isValidThumbnail.js.map +1 -1
- package/dist/lib/thumbnail/scoringConfig.d.ts +1 -1
- package/dist/lib/thumbnail/scoringConfig.js +1 -1
- package/dist/lib/thumbnail/scoringConfig.js.map +1 -1
- package/dist/lib/title/isValidTitle.js +34 -34
- package/dist/lib/title/isValidTitle.js.map +1 -1
- package/dist/lib/title/scoringConfig.d.ts +1 -1
- package/dist/lib/title/scoringConfig.js +1 -1
- package/dist/lib/title/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.js +31 -32
- package/dist/lib/userProfileDescription/isValidUserProfileDescription.js.map +1 -1
- package/dist/lib/userProfileDescription/scoringConfig.d.ts +1 -1
- package/dist/lib/userProfileDescription/scoringConfig.js +1 -1
- package/dist/lib/userProfileDescription/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileName/isValidUserProfileName.js +14 -14
- package/dist/lib/userProfileName/isValidUserProfileName.js.map +1 -1
- package/dist/lib/userProfileName/scoringConfig.d.ts +1 -1
- package/dist/lib/userProfileName/scoringConfig.js +1 -1
- package/dist/lib/userProfileName/scoringConfig.js.map +1 -1
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js +10 -10
- package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js.map +1 -1
- package/dist/lib/userProfileThumbnail/scoringConfig.d.ts +1 -1
- package/dist/lib/userProfileThumbnail/scoringConfig.js +1 -1
- package/dist/lib/userProfileThumbnail/scoringConfig.js.map +1 -1
- package/dist/lib/util/containsNonEnglishCharacters.js.map +1 -1
- package/dist/lib/util/countSentences.js.map +1 -1
- package/dist/lib/util/createWordBoundaryRegex.js.map +1 -1
- package/dist/lib/util/escapeSpecialCharacters.js.map +1 -1
- package/dist/lib/util/getAllValidationRuleIds.d.ts +6 -0
- package/dist/lib/util/getAllValidationRuleIds.js +13 -0
- package/dist/lib/util/getAllValidationRuleIds.js.map +1 -0
- package/dist/lib/util/getFeatureLayerFieldValueTypes.d.ts +10 -0
- package/dist/lib/util/getFeatureLayerFieldValueTypes.js +17 -0
- package/dist/lib/util/getFeatureLayerFieldValueTypes.js.map +1 -0
- package/dist/lib/util/getLivingAtlasSupportedItemTypes.js.map +1 -1
- package/dist/lib/util/getNumberOfWords.js.map +1 -1
- package/dist/lib/util/getRelevantFeatureLayerFields.d.ts +13 -0
- package/dist/lib/util/getRelevantFeatureLayerFields.js +55 -0
- package/dist/lib/util/getRelevantFeatureLayerFields.js.map +1 -0
- package/dist/lib/util/getScoringRules.js.map +1 -1
- package/dist/lib/util/getThumbnailFileName.js.map +1 -1
- package/dist/lib/util/isArcGISDomain.js.map +1 -1
- package/dist/lib/util/isEmpty.js.map +1 -1
- package/dist/lib/util/isFeatureCollection.js +1 -1
- package/dist/lib/util/isFeatureCollection.js.map +1 -1
- package/dist/lib/util/isFeatureService.d.ts +8 -0
- package/dist/lib/util/isFeatureService.js +21 -0
- package/dist/lib/util/isFeatureService.js.map +1 -0
- package/dist/lib/util/isHosted.js.map +1 -1
- package/dist/lib/util/isSecureProtocol.js.map +1 -1
- package/dist/lib/util/isUppercase.js.map +1 -1
- package/dist/lib/util/isUrl.js.map +1 -1
- package/dist/lib/util/isValidRegexPattern.js.map +1 -1
- package/dist/lib/util/matches.js.map +1 -1
- package/dist/lib/util/round.js +1 -2
- package/dist/lib/util/round.js.map +1 -1
- package/dist/lib/util/sanitizeTags.js.map +1 -1
- package/dist/lib/util/shouldValidateByBetaRules.js.map +1 -1
- package/dist/lib/util/toString.js.map +1 -1
- package/dist/lib/validate/validate.d.ts +7 -2
- package/dist/lib/validate/validate.js +10 -1
- package/dist/lib/validate/validate.js.map +1 -1
- package/dist/lib/validate/validateHelpers.js +2 -2
- package/dist/lib/validate/validateHelpers.js.map +1 -1
- package/dist/locale/de.json +30 -0
- package/dist/locale/en.json +30 -0
- package/dist/locale/es.json +30 -0
- package/dist/locale/fr.json +30 -0
- package/dist/locale/ja.json +30 -0
- package/dist/locale/pt-br.json +30 -0
- package/dist/package-info.json +1 -1
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js +1 -1
- package/dist/services/content-validator-assets/fetchAdditonalPatterns4TitleAndSnippetSearchability.js.map +1 -1
- package/dist/services/content-validator-assets/fetchProfanitiesData.js +1 -1
- package/dist/services/content-validator-assets/fetchProfanitiesData.js.map +1 -1
- package/dist/services/content-validator-assets/helpers.js.map +1 -1
- package/dist/services/custom-terms/config.js +1 -1
- package/dist/services/custom-terms/config.js.map +1 -1
- package/dist/services/custom-terms/customTerms.js +10 -10
- package/dist/services/custom-terms/customTerms.js.map +1 -1
- package/dist/services/custom-terms/helpers.js.map +1 -1
- package/dist/services/custom-terms-review-results/config.js +1 -1
- package/dist/services/custom-terms-review-results/config.js.map +1 -1
- package/dist/services/custom-terms-review-results/customTermsReviewResults.js +4 -4
- package/dist/services/custom-terms-review-results/customTermsReviewResults.js.map +1 -1
- package/dist/services/custom-terms-review-results/helpers.js.map +1 -1
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.d.ts +9 -0
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js +52 -0
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js.map +1 -0
- package/dist/services/feature-service/getFeatureServerURL.d.ts +12 -0
- package/dist/services/feature-service/getFeatureServerURL.js +29 -0
- package/dist/services/feature-service/getFeatureServerURL.js.map +1 -0
- package/dist/services/shared/addFeatures.js +4 -4
- package/dist/services/shared/addFeatures.js.map +1 -1
- package/dist/services/shared/applyEdits.js +4 -4
- package/dist/services/shared/applyEdits.js.map +1 -1
- package/dist/services/shared/getItemInfo.js +1 -1
- package/dist/services/shared/getItemInfo.js.map +1 -1
- package/dist/types/index.d.ts +196 -29
- package/dist/types/index.js +44 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +8 -7
- package/dist/lib/accessInformation/scoringRulesConfig.d.ts +0 -0
- package/dist/lib/accessInformation/scoringRulesConfig.js +0 -36
- package/dist/lib/accessInformation/scoringRulesConfig.js.map +0 -1
- package/dist/lib/layers/scoringRulesConfig.d.ts +0 -0
- package/dist/lib/layers/scoringRulesConfig.js +0 -48
- package/dist/lib/layers/scoringRulesConfig.js.map +0 -1
package/README.md
CHANGED
|
@@ -43,13 +43,20 @@ The validation process evaluates whether an item meets all necessary criteria, s
|
|
|
43
43
|
- [matchDateTimeInfo](#matchdatetimeinfo)
|
|
44
44
|
- [isRecognizedDateTimeInfo](#isrecognizeddatetimeinfo)
|
|
45
45
|
- [isRejectedDateTimeInfo](#isrejecteddatetimeinfo)
|
|
46
|
+
- [checkFeatureServiceFieldAliases](#checkfeatureservicefieldaliases)
|
|
47
|
+
- [checkFeatureServiceFieldDescriptions](#checkFeatureServiceFieldDescriptions)
|
|
48
|
+
- [checkFeatureServiceFieldValueTypes](#checkFeatureServiceFieldValueTypes)
|
|
46
49
|
- [getLivingAtlasSupportedItemTypes](#getlivingatlassupporteditemtypes)
|
|
47
50
|
- [checkIsLivingAtlasSupportedItemType](#checkislivingatlassupporteditemtype)
|
|
51
|
+
|
|
48
52
|
- [Types](#types)
|
|
49
53
|
- [ValidationResult](#validationresult)
|
|
50
54
|
- [ValidationResultStatus](#validationresultstatus)
|
|
51
55
|
- [ValidationInfo](#validationinfo)
|
|
52
56
|
- [MatchResult](#matchresult)
|
|
57
|
+
- [FeatureLayerFieldValueType](#featurelayerfieldvaluetype)
|
|
58
|
+
- [FeatureLayerJSON](#featurelayerjson)
|
|
59
|
+
- [Weight based scoring](#weight-based-scoring-system)
|
|
53
60
|
- [Issues](#issues)
|
|
54
61
|
- [License](#license)
|
|
55
62
|
|
|
@@ -173,19 +180,21 @@ validate(
|
|
|
173
180
|
- `item` (`IItem`, required): The ArcGIS Online item to validate.
|
|
174
181
|
- `userProfile` (`IUser`, required): The user profile of the item's owner.
|
|
175
182
|
- `options` (`ValidateOptions`, optional): Additional configuration for validation.
|
|
176
|
-
- `customPatternsForLocationInfo` (`string[]`, optional): Custom patterns for location information.
|
|
177
|
-
- `customPatternsForDataVintageInfo` (`string[]`, optional): Custom patterns for data vintage information.
|
|
178
|
-
- `customPatternsForSourceInfo` (`string[]`, optional): Custom patterns for source information.
|
|
179
|
-
- `customPatternsForTopicInfo` (`string[]`, optional): Custom patterns for topic information.
|
|
180
|
-
- `thumbnailDimension` (`{ width: number; height: number; }`, optional):
|
|
183
|
+
- `customPatternsForLocationInfo` (`string[]`, optional): Custom patterns for identifying location information in the item's title and snippet.
|
|
184
|
+
- `customPatternsForDataVintageInfo` (`string[]`, optional): Custom patterns for identifying data vintage (date/time) information in the item's title and snippet.
|
|
185
|
+
- `customPatternsForSourceInfo` (`string[]`, optional): Custom patterns for identifying source information in the item's title and snippet.
|
|
186
|
+
- `customPatternsForTopicInfo` (`string[]`, optional): Custom patterns for identifying topic information in the item's title and snippet.
|
|
187
|
+
- `thumbnailDimension` (`{ width: number; height: number; }`, optional): The dimensions (in pixels) of the item's largest thumbnail image, used for validating thumbnail requirements.
|
|
188
|
+
- `featureLayers` (`FeatureLayerJSON[]`, optional): An array of `FeatureLayerJSON` objects representing the feature layers associated with the Feature Service item. Used for validating field value types, aliases, and descriptions within those layers.
|
|
181
189
|
|
|
182
190
|
**Returns:**
|
|
183
191
|
- `ValidationResult`: An object containing detailed validation results, a total score, and a flag indicating whether the item can be nominated to Living Atlas.
|
|
184
192
|
|
|
185
|
-
**Example
|
|
193
|
+
**Example: Validating an Item Using Custom Matching Patterns**
|
|
186
194
|
```ts
|
|
187
195
|
import { validate } from '@vannizhang/living-atlas-content-validator';
|
|
188
196
|
|
|
197
|
+
// An ArcGIS Online item to validate
|
|
189
198
|
const item = {
|
|
190
199
|
id: 'mock-item-id',
|
|
191
200
|
owner: 'mock-owner',
|
|
@@ -197,6 +206,7 @@ const item = {
|
|
|
197
206
|
// Other properties...
|
|
198
207
|
};
|
|
199
208
|
|
|
209
|
+
// User profile of the owner of the item being validated
|
|
200
210
|
const userProfile = {
|
|
201
211
|
fullName: 'mock-owner',
|
|
202
212
|
description: 'mocked user profile',
|
|
@@ -205,6 +215,7 @@ const userProfile = {
|
|
|
205
215
|
// Other properties...
|
|
206
216
|
};
|
|
207
217
|
|
|
218
|
+
// Custom options for validate function that include custom patterns for location, data vintage, source, and topic information
|
|
208
219
|
const options = {
|
|
209
220
|
customPatternsForLocationInfo: ['New York','Los Angeles'],
|
|
210
221
|
customPatternsForDataVintageInfo: ['bi-weekly'],
|
|
@@ -213,6 +224,59 @@ const options = {
|
|
|
213
224
|
thumbnailDimension: { width: 600, height: 400 },
|
|
214
225
|
};
|
|
215
226
|
|
|
227
|
+
// Validate the item and user profile with options
|
|
228
|
+
const validationResults = validate(item, userProfile, options);
|
|
229
|
+
console.log(validationResults);
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Example: Validating a Feature Service Item with Feature Layers**
|
|
233
|
+
|
|
234
|
+
```ts
|
|
235
|
+
import { validate } from '@vannizhang/living-atlas-content-validator';
|
|
236
|
+
|
|
237
|
+
// An ArcGIS Online Feature Service item to validate
|
|
238
|
+
const item = {
|
|
239
|
+
id: 'mock-feature-service-id',
|
|
240
|
+
owner: 'mock-owner',
|
|
241
|
+
title: 'US County Boundaries',
|
|
242
|
+
snippet: 'County boundaries for the United States.',
|
|
243
|
+
description: 'This feature service provides detailed county boundaries for the United States, including FIPS codes and population estimates.',
|
|
244
|
+
type: 'Feature Service',
|
|
245
|
+
tags: ['boundaries', 'counties', 'USA'],
|
|
246
|
+
access: 'public',
|
|
247
|
+
// Other properties...
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
// User profile of the owner of the item being validated
|
|
251
|
+
const userProfile = {
|
|
252
|
+
fullName: 'mock-owner',
|
|
253
|
+
description: 'GIS data publisher for US boundaries.',
|
|
254
|
+
thumbnail: 'thumbnail/avatar.png',
|
|
255
|
+
culture: 'en',
|
|
256
|
+
// Other properties...
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// Custom options for validate function that include feature layers associated with the Feature Service item
|
|
260
|
+
const options = {
|
|
261
|
+
featureLayers: [
|
|
262
|
+
{
|
|
263
|
+
id: 0,
|
|
264
|
+
name: 'Counties',
|
|
265
|
+
type: 'Feature Layer',
|
|
266
|
+
description: 'US county boundaries.',
|
|
267
|
+
copyrightText: 'U.S. Census Bureau',
|
|
268
|
+
supportsRollbackOnFailures: true,
|
|
269
|
+
geometryType: 'esriGeometryPolygon',
|
|
270
|
+
fields: [
|
|
271
|
+
{ name: 'NAME', alias: 'County Name', description: { value: 'The name of the county', fieldValueType: 'nameOrTitle' } },
|
|
272
|
+
{ name: 'FIPS', alias: 'FIPS Code', description: { value: 'Federal Information Processing Standard code', fieldValueType: 'uniqueIdentifier' } },
|
|
273
|
+
{ name: 'POP_EST', alias: 'Population Estimate', description: { value: 'Estimated population', fieldValueType: 'countOrAmount' } }
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
thumbnailDimension: { width: 600, height: 400 },
|
|
278
|
+
};
|
|
279
|
+
|
|
216
280
|
const validationResults = validate(item, userProfile, options);
|
|
217
281
|
console.log(validationResults);
|
|
218
282
|
```
|
|
@@ -1192,108 +1256,287 @@ console.log(isSupported); // true or false
|
|
|
1192
1256
|
|
|
1193
1257
|
---
|
|
1194
1258
|
|
|
1259
|
+
### `checkFeatureServiceFieldAliases`
|
|
1260
|
+
Validates that relevant fields in feature layers have appropriate aliases.
|
|
1261
|
+
|
|
1262
|
+
```ts
|
|
1263
|
+
import { checkFeatureServiceFieldAliases } from '@vannizhang/living-atlas-content-validator';
|
|
1264
|
+
|
|
1265
|
+
checkFeatureServiceFieldAliases(
|
|
1266
|
+
item: IItem,
|
|
1267
|
+
featureLayers: FeatureLayerJSON[]
|
|
1268
|
+
): ValidationInfo
|
|
1269
|
+
```
|
|
1270
|
+
|
|
1271
|
+
**Parameters:**
|
|
1272
|
+
- `item` (`IItem`, required): The ArcGIS Online item to validate
|
|
1273
|
+
- `featureLayers` (`FeatureLayerJSON[]`, required): An array of JSON objects representing the feature layers published to this feature service to check for field aliases.
|
|
1274
|
+
|
|
1275
|
+
**Returns:**
|
|
1276
|
+
- `ValidationInfo`: An object containing the validation result, messages, and scoring for field aliases.
|
|
1277
|
+
|
|
1278
|
+
**Description:**
|
|
1279
|
+
This function checks the provided feature layers for relevant fields and evaluates whether those fields have aliases defined. The scoring logic is as follows:
|
|
1280
|
+
- If the item is not a feature layer, the rule does not contribute to the final score (weight is 0).
|
|
1281
|
+
- If there are no feature layers, a message is added and the result is returned.
|
|
1282
|
+
- If none of the relevant fields have aliases, a message is added to prompt adding aliases.
|
|
1283
|
+
- If less than 80% of relevant fields have aliases, a message is added to prompt improvement and half score is given.
|
|
1284
|
+
- If at least 80% of relevant fields have aliases, the rule receives full score.
|
|
1285
|
+
|
|
1286
|
+
**Example:**
|
|
1287
|
+
```ts
|
|
1288
|
+
import { checkFeatureServiceFieldAliases } from '@vannizhang/living-atlas-content-validator';
|
|
1289
|
+
|
|
1290
|
+
const item = {
|
|
1291
|
+
id: 'mock-feature-layer-id',
|
|
1292
|
+
type: 'Feature Service',
|
|
1293
|
+
// Other properties...
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
const featureLayers = [
|
|
1297
|
+
{
|
|
1298
|
+
fields: [
|
|
1299
|
+
{ name: 'field1', alias: 'Field 1' },
|
|
1300
|
+
{ name: 'field2', alias: '' },
|
|
1301
|
+
// Other fields...
|
|
1302
|
+
],
|
|
1303
|
+
// Other properties...
|
|
1304
|
+
}
|
|
1305
|
+
// Additional feature layers if needed...
|
|
1306
|
+
];
|
|
1307
|
+
|
|
1308
|
+
const validationInfo = checkFeatureServiceFieldAliases(item, featureLayers);
|
|
1309
|
+
console.log(validationInfo);
|
|
1310
|
+
```
|
|
1311
|
+
|
|
1312
|
+
---
|
|
1313
|
+
|
|
1314
|
+
### `checkFeatureServiceFieldDescriptions`
|
|
1315
|
+
Validates that relevant fields in feature layers have appropriate descriptions.
|
|
1195
1316
|
|
|
1317
|
+
```ts
|
|
1318
|
+
import { checkFeatureServiceFieldDescriptions } from '@vannizhang/living-atlas-content-validator';
|
|
1319
|
+
|
|
1320
|
+
checkFeatureServiceFieldDescriptions(
|
|
1321
|
+
item: IItem,
|
|
1322
|
+
featureLayers: FeatureLayerJSON[]
|
|
1323
|
+
): ValidationInfo
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
**Parameters:**
|
|
1327
|
+
- `item` (`IItem`, required): The ArcGIS Online item to validate, expected to be a feature layer.
|
|
1328
|
+
- `featureLayers` (`FeatureLayerJSON[]`, required): An array of JSON objects representing the feature layers published to this feature service to check for field descriptions.
|
|
1329
|
+
|
|
1330
|
+
**Returns:**
|
|
1331
|
+
- `ValidationInfo`: An object containing the validation result, messages, score, and scoring factors for field descriptions.
|
|
1332
|
+
|
|
1333
|
+
**Description:**
|
|
1334
|
+
This function checks if the given item is a feature layer and evaluates the presence of field descriptions for relevant fields within the provided feature layers. The scoring logic is as follows:
|
|
1335
|
+
- If the item is not a feature layer, the rule does not contribute to the final score (weight is 0).
|
|
1336
|
+
- If there are no feature layers, a message is added and the result is returned.
|
|
1337
|
+
- If none of the relevant fields have descriptions, a message is added and the score is zero.
|
|
1338
|
+
- If less than 80% of relevant fields have descriptions, a message is added and half score is given.
|
|
1339
|
+
- If at least 80% of relevant fields have descriptions, the rule receives full score.
|
|
1340
|
+
|
|
1341
|
+
**Example:**
|
|
1342
|
+
```ts
|
|
1343
|
+
import { checkFeatureServiceFieldDescriptions } from '@vannizhang/living-atlas-content-validator';
|
|
1344
|
+
|
|
1345
|
+
const item = {
|
|
1346
|
+
id: 'mock-feature-layer-id',
|
|
1347
|
+
type: 'Feature Service',
|
|
1348
|
+
// Other properties...
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
const featureLayers = [
|
|
1352
|
+
{
|
|
1353
|
+
fields: [
|
|
1354
|
+
{ name: 'field1', description: { value: 'Description for field 1' } },
|
|
1355
|
+
{ name: 'field2', description: { value: '' } },
|
|
1356
|
+
// Other fields...
|
|
1357
|
+
],
|
|
1358
|
+
// Other properties...
|
|
1359
|
+
}
|
|
1360
|
+
// Additional feature layers if needed...
|
|
1361
|
+
];
|
|
1362
|
+
|
|
1363
|
+
const validationInfo = checkFeatureServiceFieldDescriptions(item, featureLayers);
|
|
1364
|
+
console.log(validationInfo);
|
|
1365
|
+
```
|
|
1366
|
+
|
|
1367
|
+
---
|
|
1368
|
+
|
|
1369
|
+
### `checkFeatureServiceFieldValueTypes`
|
|
1370
|
+
Validates that relevant fields in feature layers have a `fieldValueType` defined in their field descriptions.
|
|
1371
|
+
|
|
1372
|
+
```ts
|
|
1373
|
+
import { checkFeatureServiceFieldValueTypes } from '@vannizhang/living-atlas-content-validator';
|
|
1374
|
+
|
|
1375
|
+
checkFeatureServiceFieldValueTypes(
|
|
1376
|
+
item: IItem,
|
|
1377
|
+
featureLayers: FeatureLayerJSON[]
|
|
1378
|
+
): ValidationInfo
|
|
1379
|
+
```
|
|
1380
|
+
|
|
1381
|
+
**Parameters:**
|
|
1382
|
+
- `item` (`IItem`, required): The ArcGIS Online item to validate.
|
|
1383
|
+
- `featureLayers` (`FeatureLayerJSON[]`, required): An array of JSON objects representing the feature layers published to this feature service.
|
|
1384
|
+
|
|
1385
|
+
**Returns:**
|
|
1386
|
+
- `ValidationInfo`: An object containing the validation result, messages, and scoring for field value types.
|
|
1387
|
+
|
|
1388
|
+
**Description:**
|
|
1389
|
+
This function checks the provided feature layers for relevant fields and evaluates whether those fields have a `fieldValueType` defined in their descriptions. The scoring logic is as follows:
|
|
1390
|
+
- If the item is not a feature layer, the rule does not contribute to the final score (weight is 0).
|
|
1391
|
+
- If there are no feature layers, a message is added and the result is returned.
|
|
1392
|
+
- If there are no relevant fields to check, the rule is considered fully satisfied.
|
|
1393
|
+
- If none of the relevant fields have a `fieldValueType`, a message is added and the score is zero.
|
|
1394
|
+
- If less than 80% of relevant fields have a `fieldValueType`, a message is added and half score is given.
|
|
1395
|
+
- If at least 80% of relevant fields have a `fieldValueType`, the rule receives full score.
|
|
1396
|
+
|
|
1397
|
+
**Example:**
|
|
1398
|
+
```ts
|
|
1399
|
+
import { checkFeatureServiceFieldValueTypes } from '@vannizhang/living-atlas-content-validator';
|
|
1400
|
+
|
|
1401
|
+
const item = {
|
|
1402
|
+
id: 'mock-feature-layer-id',
|
|
1403
|
+
type: 'Feature Service',
|
|
1404
|
+
// Other properties...
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
const featureLayers = [
|
|
1408
|
+
{
|
|
1409
|
+
fields: [
|
|
1410
|
+
{ name: 'field1', description: { fieldValueType: 'type1' } },
|
|
1411
|
+
{ name: 'field2', description: { fieldValueType: '' } },
|
|
1412
|
+
// Other fields...
|
|
1413
|
+
],
|
|
1414
|
+
// Other properties...
|
|
1415
|
+
}
|
|
1416
|
+
// Additional feature layers if needed...
|
|
1417
|
+
];
|
|
1418
|
+
|
|
1419
|
+
const validationInfo = checkFeatureServiceFieldValueTypes(item, featureLayers);
|
|
1420
|
+
console.log(validationInfo);
|
|
1421
|
+
```
|
|
1196
1422
|
|
|
1197
1423
|
## Types
|
|
1198
1424
|
|
|
1199
1425
|
### `ValidationResult`
|
|
1200
|
-
The `ValidationResult` type represents the
|
|
1426
|
+
The `ValidationResult` type represents the output of the `validate` function, providing detailed assessments for both the ArcGIS Online item and its owner's profile. It helps determine whether an item meets the necessary criteria for nomination to the ArcGIS Living Atlas.
|
|
1201
1427
|
|
|
1202
1428
|
```ts
|
|
1429
|
+
/**
|
|
1430
|
+
* Represents the result of validating an ArcGIS Online item and its owner's profile.
|
|
1431
|
+
*
|
|
1432
|
+
* This type is returned by the `validate` function and contains detailed validation results
|
|
1433
|
+
* for both the item and its owner's profile, as well as overall scoring and nomination eligibility.
|
|
1434
|
+
*/
|
|
1203
1435
|
export type ValidationResult = {
|
|
1436
|
+
/**
|
|
1437
|
+
* Validation results for the ArcGIS Online item.
|
|
1438
|
+
* Each property corresponds to a specific validation rule applied to the item.
|
|
1439
|
+
*/
|
|
1204
1440
|
validatedItem: {
|
|
1205
|
-
/**
|
|
1206
|
-
* Validation result for the item's sharing level.
|
|
1441
|
+
/**
|
|
1442
|
+
* Validation result for the item's sharing level (access).
|
|
1207
1443
|
*/
|
|
1208
1444
|
access: ValidationInfo;
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
* Validation result for the item's credits/attribution information.
|
|
1445
|
+
/**
|
|
1446
|
+
* Validation result for the item's credits/attribution information.
|
|
1212
1447
|
*/
|
|
1213
1448
|
accessInformation: ValidationInfo;
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
* Validation result for the item's description text.
|
|
1449
|
+
/**
|
|
1450
|
+
* Validation result for the item's description text.
|
|
1217
1451
|
*/
|
|
1218
1452
|
description: ValidationInfo;
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
* Validation result for the item's license information.
|
|
1453
|
+
/**
|
|
1454
|
+
* Validation result for the item's license information.
|
|
1222
1455
|
*/
|
|
1223
1456
|
licenseInfo: ValidationInfo;
|
|
1224
|
-
|
|
1225
1457
|
/**
|
|
1226
|
-
*
|
|
1458
|
+
* Validation result for the item's snippet (summary text).
|
|
1227
1459
|
*/
|
|
1228
1460
|
snippet: ValidationInfo;
|
|
1229
|
-
|
|
1230
1461
|
/**
|
|
1231
|
-
*
|
|
1462
|
+
* Validation result for the item's HTTPS URL.
|
|
1232
1463
|
*/
|
|
1233
1464
|
ssl: ValidationInfo;
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
* Validation result for the item's tags.
|
|
1465
|
+
/**
|
|
1466
|
+
* Validation result for the item's tags.
|
|
1237
1467
|
*/
|
|
1238
1468
|
tags: ValidationInfo;
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
* Validation result for the item's thumbnail image.
|
|
1469
|
+
/**
|
|
1470
|
+
* Validation result for the item's thumbnail image.
|
|
1242
1471
|
*/
|
|
1243
1472
|
thumbnail: ValidationInfo;
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
* Validation result for the item's title.
|
|
1473
|
+
/**
|
|
1474
|
+
* Validation result for the item's title.
|
|
1247
1475
|
*/
|
|
1248
1476
|
title: ValidationInfo;
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
* Validation result for the item's content status, checking for deprecated content.
|
|
1477
|
+
/**
|
|
1478
|
+
* Validation result for the item's deprecated/content status.
|
|
1252
1479
|
*/
|
|
1253
1480
|
deprecated: ValidationInfo;
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
* Validation result for the item's "delete protection" property.
|
|
1481
|
+
/**
|
|
1482
|
+
* Validation result for the item's delete protection property.
|
|
1257
1483
|
*/
|
|
1258
1484
|
deleteProtection: ValidationInfo;
|
|
1259
|
-
|
|
1260
1485
|
/**
|
|
1261
|
-
* Validation result for
|
|
1486
|
+
* Validation result for searchability the item's title and summary.
|
|
1487
|
+
* Applicable only to English layer items.
|
|
1262
1488
|
*/
|
|
1263
1489
|
recommendedTextInTitleAndSummary: ValidationInfo;
|
|
1490
|
+
/**
|
|
1491
|
+
* Validation result for field aliases in feature layers of a feature service item.
|
|
1492
|
+
* Applicable only to feature service items.
|
|
1493
|
+
*/
|
|
1494
|
+
featureServiceFieldAliases: ValidationInfo;
|
|
1495
|
+
/**
|
|
1496
|
+
* Validation result for field descriptions in feature layers of a feature service item.
|
|
1497
|
+
* Applicable only to feature service items.
|
|
1498
|
+
*/
|
|
1499
|
+
featureServiceFieldDescriptions: ValidationInfo;
|
|
1500
|
+
/**
|
|
1501
|
+
* Validation result for field value types in feature layers of a feature service item.
|
|
1502
|
+
* Applicable only to feature service items.
|
|
1503
|
+
*/
|
|
1504
|
+
featureServiceFieldValueTypes: ValidationInfo;
|
|
1264
1505
|
};
|
|
1506
|
+
/**
|
|
1507
|
+
* Validation results for the item owner's profile.
|
|
1508
|
+
* Each property corresponds to a specific validation rule applied to the user profile.
|
|
1509
|
+
*/
|
|
1265
1510
|
validatedProfile: {
|
|
1266
|
-
/**
|
|
1267
|
-
* Validation result for the
|
|
1511
|
+
/**
|
|
1512
|
+
* Validation result for the owner's profile description.
|
|
1268
1513
|
*/
|
|
1269
1514
|
userProfileDescription: ValidationInfo;
|
|
1270
|
-
|
|
1271
1515
|
/**
|
|
1272
|
-
* Validation result for the
|
|
1516
|
+
* Validation result for the owner's full name.
|
|
1273
1517
|
*/
|
|
1274
1518
|
userProfileFullName: ValidationInfo;
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
* Validation result for the item owner's profile thumbnail image.
|
|
1519
|
+
/**
|
|
1520
|
+
* Validation result for the owner's thumbnail image.
|
|
1278
1521
|
*/
|
|
1279
1522
|
userProfileThumbnail: ValidationInfo;
|
|
1280
1523
|
};
|
|
1281
|
-
/**
|
|
1282
|
-
*
|
|
1524
|
+
/**
|
|
1525
|
+
* The ArcGIS Online Item ID.
|
|
1283
1526
|
*/
|
|
1284
1527
|
id: string;
|
|
1285
|
-
/**
|
|
1286
|
-
* total score
|
|
1528
|
+
/**
|
|
1529
|
+
* The total score calculated from all validation rules.
|
|
1287
1530
|
*/
|
|
1288
1531
|
totalScore: number;
|
|
1289
1532
|
/**
|
|
1290
|
-
*
|
|
1291
|
-
*
|
|
1292
|
-
*
|
|
1293
|
-
* -
|
|
1533
|
+
* Indicates if the item meets all minimum requirements and can be nominated to Living Atlas.
|
|
1534
|
+
*
|
|
1535
|
+
* An item is eligible for nomination if:
|
|
1536
|
+
* - The total score meets the minimum threshold (e.g., 80).
|
|
1294
1537
|
* - It is shared with the public.
|
|
1295
|
-
* -
|
|
1296
|
-
* - It has a snippet text.
|
|
1538
|
+
* - The thumbnail image meets required dimensions.
|
|
1539
|
+
* - It has a snippet (summary) text.
|
|
1297
1540
|
* - It has a description text.
|
|
1298
1541
|
* - The item owner has a user profile description.
|
|
1299
1542
|
*/
|
|
@@ -1328,6 +1571,11 @@ The `ValidationInfo` type provides detailed information about a specific validat
|
|
|
1328
1571
|
|
|
1329
1572
|
```ts
|
|
1330
1573
|
export type ValidationInfo = {
|
|
1574
|
+
/**
|
|
1575
|
+
* The identifier of the validation rule, e.g., "item-sharing-level" or "item-description".
|
|
1576
|
+
* It serves as a unique, human-readable identifier for each rule.
|
|
1577
|
+
*/
|
|
1578
|
+
validationRuleId: ValidationRuleId;
|
|
1331
1579
|
/**
|
|
1332
1580
|
* The title string tells the user what this validation rule checks, e.g., "Check Thumbnail" or "Check Number of Layers".
|
|
1333
1581
|
*/
|
|
@@ -1337,7 +1585,7 @@ export type ValidationInfo = {
|
|
|
1337
1585
|
*/
|
|
1338
1586
|
label: string;
|
|
1339
1587
|
/**
|
|
1340
|
-
*
|
|
1588
|
+
* array of validation messages
|
|
1341
1589
|
*/
|
|
1342
1590
|
messages: ValidationMessage[];
|
|
1343
1591
|
/**
|
|
@@ -1353,15 +1601,16 @@ export type ValidationInfo = {
|
|
|
1353
1601
|
*/
|
|
1354
1602
|
weight: number;
|
|
1355
1603
|
/**
|
|
1356
|
-
* A factor ranging between 0 and 1 used to calculate the final score by multiplying it with the weight number.
|
|
1604
|
+
* A scoring factor ranging between 0 and 1 used to calculate the final score by multiplying it with the weight number.
|
|
1605
|
+
* 0 means the validation rule received no points, while 1 means it received the maximum score.
|
|
1357
1606
|
*/
|
|
1358
|
-
|
|
1607
|
+
scoringFactor: number;
|
|
1359
1608
|
/**
|
|
1360
|
-
* Status of the validation result
|
|
1609
|
+
* Status of the validation result
|
|
1361
1610
|
*/
|
|
1362
1611
|
status: ValidationResultStatus;
|
|
1363
1612
|
/**
|
|
1364
|
-
*
|
|
1613
|
+
* if true, this validation rule is a binary check, i.e., it can only pass or fail.
|
|
1365
1614
|
*/
|
|
1366
1615
|
isBinaryCheck: boolean;
|
|
1367
1616
|
};
|
|
@@ -1388,6 +1637,97 @@ export type MatchResult = {
|
|
|
1388
1637
|
};
|
|
1389
1638
|
```
|
|
1390
1639
|
|
|
1640
|
+
### `FeatureLayerFieldValueType`
|
|
1641
|
+
Represents the value type of a field in a feature layer.
|
|
1642
|
+
|
|
1643
|
+
```ts
|
|
1644
|
+
/**
|
|
1645
|
+
* Represents the field value type of a feature layer.
|
|
1646
|
+
*
|
|
1647
|
+
* @see https://doc.arcgis.com/en/arcgis-online/manage-data/describe-fields.htm
|
|
1648
|
+
* @see https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/describing-layer-attributes-with-field-descriptions-march-2019
|
|
1649
|
+
*/
|
|
1650
|
+
export type FeatureLayerFieldValueType =
|
|
1651
|
+
| 'nameOrTitle'
|
|
1652
|
+
| 'description'
|
|
1653
|
+
| 'typeOrCategory'
|
|
1654
|
+
| 'countOrAmount'
|
|
1655
|
+
| 'percentageOrRatio'
|
|
1656
|
+
| 'measurement'
|
|
1657
|
+
| 'uniqueIdentifier'
|
|
1658
|
+
| 'orderedOrRanked'
|
|
1659
|
+
| 'binary'
|
|
1660
|
+
| 'locationOrPlaceName'
|
|
1661
|
+
| 'coordinate'
|
|
1662
|
+
| 'dateAndTime';
|
|
1663
|
+
|
|
1664
|
+
```
|
|
1665
|
+
|
|
1666
|
+
---
|
|
1667
|
+
|
|
1668
|
+
### `FeatureLayerJSON`
|
|
1669
|
+
Represents the JSON structure of a feature layer.
|
|
1670
|
+
|
|
1671
|
+
```ts
|
|
1672
|
+
/**
|
|
1673
|
+
* Represents a Feature Layer in JSON format.
|
|
1674
|
+
*
|
|
1675
|
+
* An individual Feature Layer resource represents a single feature layer or a non-spatial table in a feature service.
|
|
1676
|
+
* - For tables, it provides basic information about the table such as its ID, name, fields, types and templates.
|
|
1677
|
+
* - For feature layers, in addition to the table information above, it provides information such as its geometry type, min and max scales, and spatial reference. A feature layer is a table or view with at least one spatial column.
|
|
1678
|
+
*
|
|
1679
|
+
* @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-layer/
|
|
1680
|
+
*/
|
|
1681
|
+
export type FeatureLayerJSON = {
|
|
1682
|
+
id: number;
|
|
1683
|
+
name: string;
|
|
1684
|
+
type: string;
|
|
1685
|
+
description: string;
|
|
1686
|
+
copyrightText: string;
|
|
1687
|
+
supportsRollbackOnFailures: boolean;
|
|
1688
|
+
geometryType?: string;
|
|
1689
|
+
minScale?: number;
|
|
1690
|
+
maxScale?: number;
|
|
1691
|
+
'extent?': {
|
|
1692
|
+
xmin: number;
|
|
1693
|
+
ymin: number;
|
|
1694
|
+
xmax: number;
|
|
1695
|
+
ymax: number;
|
|
1696
|
+
spatialReference: {
|
|
1697
|
+
wkid: number;
|
|
1698
|
+
latestWkid: number;
|
|
1699
|
+
};
|
|
1700
|
+
};
|
|
1701
|
+
/**
|
|
1702
|
+
* the feature layer's fields
|
|
1703
|
+
*/
|
|
1704
|
+
fields: FeatureLayerField[];
|
|
1705
|
+
};
|
|
1706
|
+
```
|
|
1707
|
+
|
|
1708
|
+
## Weight-Based Scoring System
|
|
1709
|
+
The evaluation process uses a weight-based scoring system, where each validation rule is assigned a specific weight to indicate its relative importance in the overall score calculation. A higher weight means the rule has more impact on the final score. Setting a rule’s weight to zero effectively excludes it from the scoring process—this typically happens when a rule is not applicable to the item being evaluated.
|
|
1710
|
+
|
|
1711
|
+
Below is the list of weights assigned to each validation rule:
|
|
1712
|
+
|
|
1713
|
+
| Validation Rule | Weight |
|
|
1714
|
+
|------------------------------------------------|--------|
|
|
1715
|
+
| Check Thumbnail | 8 |
|
|
1716
|
+
| Check Title | 8 |
|
|
1717
|
+
| Check Summary | 8 |
|
|
1718
|
+
| Check Description | 8 |
|
|
1719
|
+
| Check Tags | 4 |
|
|
1720
|
+
| Check Discoverability of Title and Summary | 16 |
|
|
1721
|
+
| Check Terms of Use | 8 |
|
|
1722
|
+
| Check Credits (Attribution) | 8 |
|
|
1723
|
+
| Check Sharing Level | 1 |
|
|
1724
|
+
| Check Delete Protection Setting | 1 |
|
|
1725
|
+
| Check Deprecated Setting | 1 |
|
|
1726
|
+
| Check HTTPS in URL | 1 |
|
|
1727
|
+
| Check Profile Thumbnail | 2 |
|
|
1728
|
+
| Check Profile Full Name | 2 |
|
|
1729
|
+
| Check Profile Description | 8 |
|
|
1730
|
+
|
|
1391
1731
|
## Issues
|
|
1392
1732
|
Find a bug or want to request a new feature? Please let us know by submitting an issue.
|
|
1393
1733
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureSettings.js","sourceRoot":"","sources":["../src/configureSettings.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,2EAAsH;AACtH,4DAA8D;AAC9D,qDAAuE;AAgHvE;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAC9B,WAAW,EACX,QAAQ,EACR,iDAAiD,EACjD,WAAW,GACW,EAAE,EAAE;IAC1B,IAAI,WAAW,KAAK,KAAK,IAAI,WAAW,KAAK,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"configureSettings.js","sourceRoot":"","sources":["../src/configureSettings.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,2EAAsH;AACtH,4DAA8D;AAC9D,qDAAuE;AAgHvE;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAC9B,WAAW,EACX,QAAQ,EACR,iDAAiD,EACjD,WAAW,GACW,EAAE,EAAE;IAC1B,IAAI,WAAW,KAAK,KAAK,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CACX,0DAA0D,CAC7D,CAAC;IACN,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,YAAY,GAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACvE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAkB,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CACX,8CAA8C,YAAY,CAAC,IAAI,CAC3D,IAAI,CACP,GAAG,CACP,CAAC;IACN,CAAC;IAED,2CAA2C;IAC3C,IAAA,uBAAc,EAAC,WAAW,CAAC,CAAC;IAE5B,uCAAuC;IACvC,IAAA,0BAAU,EAAC,QAAQ,CAAC,CAAC;IAErB,MAAM,EACF,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,GAC/B,GAAG,iDAAiD,IAAI,EAAE,CAAC;IAE5D,8DAA8D;IAC9D,IAAA,6DAAoD,EAAC;QACjD,wBAAwB;QACxB,wBAAwB;QACxB,sBAAsB;QACtB,sBAAsB;QACtB,qBAAqB;QACrB,qBAAqB;QACrB,2BAA2B;QAC3B,2BAA2B;QAC3B,4BAA4B;KAC/B,CAAC,CAAC;IAEH,iCAAiC;IACjC,IAAA,iCAAc,EAAC,WAAW,IAAI,EAAE,CAAC,CAAC;AACtC,CAAC,CAAC;AA1DW,QAAA,iBAAiB,qBA0D5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationMessage, ValidationInfo, ValidationResult, ValidationResultStatus } from './types';
|
|
1
|
+
import { ValidationMessage, ValidationInfo, ValidationResult, ValidationResultStatus, FeatureLayerFieldRaw, FeatureLayerFieldFormatted, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON } from './types';
|
|
2
2
|
import { isValidTitle } from './lib/title/isValidTitle';
|
|
3
3
|
import { isValidAccessInformation } from './lib/accessInformation/isValidAccessInformation';
|
|
4
4
|
import { isValidDescription } from './lib/description/isValidDescription';
|
|
@@ -34,7 +34,13 @@ import { fetchProfanitiesData } from './services/content-validator-assets/fetchP
|
|
|
34
34
|
import { containsProfanity } from './lib/checkProfanities/checkProfanities';
|
|
35
35
|
import { getLivingAtlasSupportedItemTypes, checkIsLivingAtlasSupportedItemType } from './lib/util/getLivingAtlasSupportedItemTypes';
|
|
36
36
|
import { LivingAtlasSupportedItemType } from './lib/config';
|
|
37
|
-
|
|
37
|
+
import { checkFeatureServiceFieldDescriptions } from './lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions';
|
|
38
|
+
import { checkFeatureServiceFieldAliases } from './lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases';
|
|
39
|
+
import { checkFeatureServiceFieldValueTypes } from './lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes';
|
|
40
|
+
import { fetchFeatureServiceLayersAndTables } from './services/feature-service/fetchFeatureServiceLayersAndTables';
|
|
41
|
+
import { getRelevantFeatureLayerFields } from './lib/util/getRelevantFeatureLayerFields';
|
|
42
|
+
import { getFeatureLayerFieldValueTypes } from './lib/util/getFeatureLayerFieldValueTypes';
|
|
43
|
+
export { configureSettings, validate, isValidTitle, isValidAccessInformation, isValidDescription, isValidLicenseInfo, isValidAccess, isValidSSL, isValidSummary, isValidTags, isValidThumbnail, isValidUserProfileDescription, isValidUserProfileName, isValidUserProfileThumbnail, isDeprecated, isDeleteProtectionEnabled, checkTitleAndSnippetSearchability, matchLocationInfo, matchDateTimeInfo, matchSourceInfo, matchTopicInfo, isRecognizedLocation, isRecognizedDateTimeInfo, isRecognizedSource, isRecognizedTopic, isRejectedLocationInfo, isRejectedDateTimeInfo, isRejectedSourceInfo, isRejectedTopicInfo, isEligibleForCheckingTitleAndSnippetSearchability, getLivingAtlasSupportedItemTypes, checkIsLivingAtlasSupportedItemType, sanitizeTags, getStringsConfig, getDefaultStringsConfig, checkFeatureServiceFieldAliases, checkFeatureServiceFieldDescriptions, checkFeatureServiceFieldValueTypes, fetchFeatureServiceLayersAndTables, getRelevantFeatureLayerFields, getFeatureLayerFieldValueTypes, };
|
|
38
44
|
export { fetchAdditonalPatterns4TitleAndSnippetSearchability, fetchProfanitiesData, getSubmittedCustomTerms, getMyCustomTerms, addCustomTerms2FeatureTable, updateStatusOfCustomTermsInFeatureTable, getPackagedReviewResults, getReviewedReviewResults, getUnarchivedReviewResults, getDeployedReviewResults, getReviewResultsByTermAndCategory, addReviewResults2FeatureTable, updateReviewResultsInFeatureTable, getCustomTermsFeatureTableItemInfo, getCustomTermsReviewResultsFeatureTableItemInfo, containsProfanity, };
|
|
39
45
|
export { isValidRegexPattern, escapeSpecialCharacters };
|
|
40
|
-
export type { ValidationMessage, ValidationInfo, ValidationResult, ValidationRulesStringJSON, ValidationResultStatus, MatchResult, CustomTermFeature, CustomTermCategory, CustomTermStatus, CustomTermsReviewResultLifecycle, CustomTermReviewResultFeature, AdditionalPatterns4TitleAndSnippetSearchability, AddFeaturesResponse, LivingAtlasSupportedItemType, };
|
|
46
|
+
export type { ValidationMessage, ValidationInfo, ValidationResult, ValidationRulesStringJSON, ValidationResultStatus, MatchResult, CustomTermFeature, CustomTermCategory, CustomTermStatus, CustomTermsReviewResultLifecycle, CustomTermReviewResultFeature, AdditionalPatterns4TitleAndSnippetSearchability, AddFeaturesResponse, LivingAtlasSupportedItemType, FeatureLayerFieldRaw, FeatureLayerFieldFormatted, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON, };
|