@vannizhang/living-atlas-content-validator 1.5.19-beta.2 → 1.5.19-beta.4
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 +338 -55
- package/dist/configureSettings.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +10 -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.js.map +1 -1
- 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 +22 -0
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +87 -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 +21 -0
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +89 -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 +18 -0
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +86 -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/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 +27 -0
- package/dist/locale/en.json +27 -0
- package/dist/locale/es.json +27 -0
- package/dist/locale/fr.json +27 -0
- package/dist/locale/ja.json +27 -0
- package/dist/locale/pt-br.json +27 -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 +49 -0
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.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 +189 -29
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +5 -4
- 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/dist/types/index.d.ts
CHANGED
|
@@ -99,7 +99,17 @@ export type ValidationMessage = {
|
|
|
99
99
|
* - `unknown`: The validation status is unknown, which is the default status when a ValidationInfo object is created but the validation process has not yet been executed.
|
|
100
100
|
*/
|
|
101
101
|
export type ValidationResultStatus = 'pass' | 'warning' | 'error' | 'not-applicable' | 'unknown';
|
|
102
|
+
export declare const ValidationRuleIds: readonly ["item-sharing-level", "item-credits-attribution-info", "item-description", "item-license-info", "item-snippet", "item-ssl", "item-tags", "item-thumbnail", "item-title", "item-deprecated", "item-delete-protection", "item-title-and-summary-searchability", "user-profile-description", "user-profile-full-name", "user-profile-thumbnail", "feature-service-field-value-types", "feature-service-field-aliases", "feature-service-field-descriptions"];
|
|
103
|
+
/**
|
|
104
|
+
* Validation rule identifier
|
|
105
|
+
*/
|
|
106
|
+
export type ValidationRuleId = (typeof ValidationRuleIds)[number];
|
|
102
107
|
export type ValidationInfo = {
|
|
108
|
+
/**
|
|
109
|
+
* The identifier of the validation rule, e.g., "item-sharing-level" or "item-description".
|
|
110
|
+
* It serves as a unique, human-readable identifier for each rule.
|
|
111
|
+
*/
|
|
112
|
+
validationRuleId: ValidationRuleId;
|
|
103
113
|
/**
|
|
104
114
|
* The title string tells the user what this validation rule checks, e.g., "Check Thumbnail" or "Check Number of Layers".
|
|
105
115
|
*/
|
|
@@ -125,9 +135,10 @@ export type ValidationInfo = {
|
|
|
125
135
|
*/
|
|
126
136
|
weight: number;
|
|
127
137
|
/**
|
|
128
|
-
* A factor ranging between 0 and 1 used to calculate the final score by multiplying it with the weight number.
|
|
138
|
+
* A scoring factor ranging between 0 and 1 used to calculate the final score by multiplying it with the weight number.
|
|
139
|
+
* 0 means the validation rule received no points, while 1 means it received the maximum score.
|
|
129
140
|
*/
|
|
130
|
-
|
|
141
|
+
scoringFactor: number;
|
|
131
142
|
/**
|
|
132
143
|
* Status of the validation result
|
|
133
144
|
*/
|
|
@@ -138,90 +149,239 @@ export type ValidationInfo = {
|
|
|
138
149
|
isBinaryCheck: boolean;
|
|
139
150
|
};
|
|
140
151
|
/**
|
|
141
|
-
*
|
|
152
|
+
* Represents the result of validating an ArcGIS Online item and its owner's profile.
|
|
153
|
+
*
|
|
154
|
+
* This type is returned by the `validate` function and contains detailed validation results
|
|
155
|
+
* for both the item and its owner's profile, as well as overall scoring and nomination eligibility.
|
|
142
156
|
*/
|
|
143
157
|
export type ValidationResult = {
|
|
158
|
+
/**
|
|
159
|
+
* Validation results for the ArcGIS Online item.
|
|
160
|
+
* Each property corresponds to a specific validation rule applied to the item.
|
|
161
|
+
*/
|
|
144
162
|
validatedItem: {
|
|
145
163
|
/**
|
|
146
|
-
*
|
|
164
|
+
* Validation result for the item's sharing level (access).
|
|
147
165
|
*/
|
|
148
166
|
access: ValidationInfo;
|
|
149
167
|
/**
|
|
150
|
-
*
|
|
168
|
+
* Validation result for the item's credits/attribution information.
|
|
151
169
|
*/
|
|
152
170
|
accessInformation: ValidationInfo;
|
|
153
171
|
/**
|
|
154
|
-
*
|
|
172
|
+
* Validation result for the item's description text.
|
|
155
173
|
*/
|
|
156
174
|
description: ValidationInfo;
|
|
157
175
|
/**
|
|
158
|
-
*
|
|
176
|
+
* Validation result for the item's license information.
|
|
159
177
|
*/
|
|
160
178
|
licenseInfo: ValidationInfo;
|
|
161
179
|
/**
|
|
162
|
-
*
|
|
180
|
+
* Validation result for the item's snippet (summary text).
|
|
163
181
|
*/
|
|
164
182
|
snippet: ValidationInfo;
|
|
183
|
+
/**
|
|
184
|
+
* Validation result for the item's HTTPS URL.
|
|
185
|
+
*/
|
|
165
186
|
ssl: ValidationInfo;
|
|
166
187
|
/**
|
|
167
|
-
*
|
|
188
|
+
* Validation result for the item's tags.
|
|
168
189
|
*/
|
|
169
190
|
tags: ValidationInfo;
|
|
170
191
|
/**
|
|
171
|
-
*
|
|
192
|
+
* Validation result for the item's thumbnail image.
|
|
172
193
|
*/
|
|
173
194
|
thumbnail: ValidationInfo;
|
|
174
195
|
/**
|
|
175
|
-
*
|
|
196
|
+
* Validation result for the item's title.
|
|
176
197
|
*/
|
|
177
198
|
title: ValidationInfo;
|
|
178
199
|
/**
|
|
179
|
-
*
|
|
200
|
+
* Validation result for the item's deprecated/content status.
|
|
180
201
|
*/
|
|
181
202
|
deprecated: ValidationInfo;
|
|
182
203
|
/**
|
|
183
|
-
*
|
|
204
|
+
* Validation result for the item's delete protection property.
|
|
184
205
|
*/
|
|
185
206
|
deleteProtection: ValidationInfo;
|
|
186
207
|
/**
|
|
187
|
-
*
|
|
208
|
+
* Validation result for searchability the item's title and summary.
|
|
209
|
+
* Applicable only to English layer items.
|
|
188
210
|
*/
|
|
189
211
|
recommendedTextInTitleAndSummary: ValidationInfo;
|
|
212
|
+
/**
|
|
213
|
+
* Validation result for field aliases in feature layers of a feature service item.
|
|
214
|
+
* Applicable only to feature service items.
|
|
215
|
+
*/
|
|
216
|
+
featureServiceFieldAliases: ValidationInfo;
|
|
217
|
+
/**
|
|
218
|
+
* Validation result for field descriptions in feature layers of a feature service item.
|
|
219
|
+
* Applicable only to feature service items.
|
|
220
|
+
*/
|
|
221
|
+
featureServiceFieldDescriptions: ValidationInfo;
|
|
222
|
+
/**
|
|
223
|
+
* Validation result for field value types in feature layers of a feature service item.
|
|
224
|
+
* Applicable only to feature service items.
|
|
225
|
+
*/
|
|
226
|
+
featureServiceFieldValueTypes: ValidationInfo;
|
|
190
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Validation results for the item owner's profile.
|
|
230
|
+
* Each property corresponds to a specific validation rule applied to the user profile.
|
|
231
|
+
*/
|
|
191
232
|
validatedProfile: {
|
|
192
233
|
/**
|
|
193
|
-
*
|
|
234
|
+
* Validation result for the owner's profile description.
|
|
194
235
|
*/
|
|
195
236
|
userProfileDescription: ValidationInfo;
|
|
196
237
|
/**
|
|
197
|
-
*
|
|
238
|
+
* Validation result for the owner's full name.
|
|
198
239
|
*/
|
|
199
240
|
userProfileFullName: ValidationInfo;
|
|
200
241
|
/**
|
|
201
|
-
*
|
|
242
|
+
* Validation result for the owner's thumbnail image.
|
|
202
243
|
*/
|
|
203
244
|
userProfileThumbnail: ValidationInfo;
|
|
204
245
|
};
|
|
205
246
|
/**
|
|
206
|
-
*
|
|
247
|
+
* The ArcGIS Online Item ID.
|
|
207
248
|
*/
|
|
208
249
|
id: string;
|
|
209
250
|
/**
|
|
210
|
-
* total score
|
|
251
|
+
* The total score calculated from all validation rules.
|
|
211
252
|
*/
|
|
212
253
|
totalScore: number;
|
|
213
254
|
/**
|
|
214
|
-
* if
|
|
215
|
-
* and it can be nominated to Living Atlas.
|
|
216
|
-
*
|
|
217
|
-
* An item can be nominated to Living Atlas only if its total score meets the minimum required threshold of 80 and it also passes
|
|
218
|
-
* the following checks:
|
|
255
|
+
* Indicates if the item meets all minimum requirements and can be nominated to Living Atlas.
|
|
219
256
|
*
|
|
220
|
-
*
|
|
221
|
-
* -
|
|
222
|
-
* - It
|
|
223
|
-
* -
|
|
224
|
-
* -
|
|
257
|
+
* An item is eligible for nomination if:
|
|
258
|
+
* - The total score meets the minimum threshold (e.g., 80).
|
|
259
|
+
* - It is shared with the public.
|
|
260
|
+
* - The thumbnail image meets required dimensions.
|
|
261
|
+
* - It has a snippet (summary) text.
|
|
262
|
+
* - It has a description text.
|
|
263
|
+
* - The item owner has a user profile description.
|
|
225
264
|
*/
|
|
226
265
|
canBeNominated: boolean;
|
|
227
266
|
};
|
|
267
|
+
/**
|
|
268
|
+
* Represents a Feature Service in JSON format.
|
|
269
|
+
*
|
|
270
|
+
* @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-service/
|
|
271
|
+
*/
|
|
272
|
+
export type FeatureServiceJSON = {
|
|
273
|
+
/**
|
|
274
|
+
* the feature layers published by this service
|
|
275
|
+
*/
|
|
276
|
+
layers: {
|
|
277
|
+
id: number;
|
|
278
|
+
name: string;
|
|
279
|
+
type: string;
|
|
280
|
+
geometryType: string;
|
|
281
|
+
}[];
|
|
282
|
+
/**
|
|
283
|
+
* the tables published by this service
|
|
284
|
+
*/
|
|
285
|
+
tables: {
|
|
286
|
+
id: number;
|
|
287
|
+
name: string;
|
|
288
|
+
}[];
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* Represents a Feature Layer field in JSON format.
|
|
292
|
+
*
|
|
293
|
+
* @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-layer.htm
|
|
294
|
+
*/
|
|
295
|
+
type FeatureLayerField = {
|
|
296
|
+
name: string;
|
|
297
|
+
type: string;
|
|
298
|
+
alias: string;
|
|
299
|
+
length?: number;
|
|
300
|
+
domain?: any;
|
|
301
|
+
defaultValue?: any;
|
|
302
|
+
sqlType?: string;
|
|
303
|
+
nullable?: boolean;
|
|
304
|
+
editable?: boolean;
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Represents a raw Feature Layer field as returned by the Feature Layer JSON.
|
|
308
|
+
*
|
|
309
|
+
* The `description` property is typically returned by the server as a stringified JSON object,
|
|
310
|
+
* for example: `"{\"value\":\"\",\"fieldValueType\":\"dateAndTime\"}"`.
|
|
311
|
+
*/
|
|
312
|
+
export type FeatureLayerFieldRaw = FeatureLayerField & {
|
|
313
|
+
/**
|
|
314
|
+
* The field description as a stringified JSON object, if present.
|
|
315
|
+
*/
|
|
316
|
+
description?: string;
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* Represents a Feature Layer field with a parsed and formatted description.
|
|
320
|
+
*
|
|
321
|
+
* The `description` property is an object containing the description text and the field value type,
|
|
322
|
+
* or `null` if not present or not properly formatted.
|
|
323
|
+
*/
|
|
324
|
+
export type FeatureLayerFieldFormatted = FeatureLayerField & {
|
|
325
|
+
description?: {
|
|
326
|
+
/**
|
|
327
|
+
* A brief description of the field, up to 500 characters.
|
|
328
|
+
*/
|
|
329
|
+
value: string;
|
|
330
|
+
/**
|
|
331
|
+
* A keyword categorizing the type of values in the field, used for smarter suggestions in ArcGIS Online.
|
|
332
|
+
*/
|
|
333
|
+
fieldValueType: FeatureLayerFieldValueType;
|
|
334
|
+
} | null;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Represents the field value type of a feature layer.
|
|
338
|
+
*
|
|
339
|
+
* @see https://doc.arcgis.com/en/arcgis-online/manage-data/describe-fields.htm
|
|
340
|
+
* @see https://www.esri.com/arcgis-blog/products/arcgis-online/data-management/describing-layer-attributes-with-field-descriptions-march-2019
|
|
341
|
+
*/
|
|
342
|
+
export type FeatureLayerFieldValueType = 'nameOrTitle' | 'description' | 'typeOrCategory' | 'countOrAmount' | 'percentageOrRatio' | 'measurement' | 'uniqueIdentifier' | 'orderedOrRanked' | 'binary' | 'locationOrPlaceName' | 'coordinate' | 'dateAndTime';
|
|
343
|
+
/**
|
|
344
|
+
* Represents a Feature Layer in JSON format.
|
|
345
|
+
*
|
|
346
|
+
* An individual Feature Layer resource represents a single feature layer or a non-spatial table in a feature service.
|
|
347
|
+
* - For tables, it provides basic information about the table such as its ID, name, fields, types and templates.
|
|
348
|
+
* - 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.
|
|
349
|
+
*
|
|
350
|
+
* @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-layer/
|
|
351
|
+
*/
|
|
352
|
+
export type FeatureLayerJSON = {
|
|
353
|
+
id: number;
|
|
354
|
+
name: string;
|
|
355
|
+
type: string;
|
|
356
|
+
description: string;
|
|
357
|
+
copyrightText: string;
|
|
358
|
+
supportsRollbackOnFailures: boolean;
|
|
359
|
+
geometryType?: string;
|
|
360
|
+
minScale?: number;
|
|
361
|
+
maxScale?: number;
|
|
362
|
+
'extent?': {
|
|
363
|
+
xmin: number;
|
|
364
|
+
ymin: number;
|
|
365
|
+
xmax: number;
|
|
366
|
+
ymax: number;
|
|
367
|
+
spatialReference: {
|
|
368
|
+
wkid: number;
|
|
369
|
+
latestWkid: number;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* the feature layer's fields
|
|
374
|
+
*/
|
|
375
|
+
fields: FeatureLayerFieldRaw[];
|
|
376
|
+
};
|
|
377
|
+
/**
|
|
378
|
+
* Represents the response from the Feature Service layers endpoint.
|
|
379
|
+
*
|
|
380
|
+
* @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-service.htm
|
|
381
|
+
*/
|
|
382
|
+
export type FeatureServiceLayersResponse = {
|
|
383
|
+
layers: FeatureLayerJSON[];
|
|
384
|
+
tables: FeatureLayerJSON[];
|
|
385
|
+
error?: Error;
|
|
386
|
+
};
|
|
387
|
+
export {};
|
package/dist/types/index.js
CHANGED
|
@@ -13,4 +13,25 @@
|
|
|
13
13
|
* @see https://stackoverflow.com/questions/56018167/typescript-does-not-copy-d-ts-files-to-build
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ValidationRuleIds = void 0;
|
|
17
|
+
exports.ValidationRuleIds = [
|
|
18
|
+
'item-sharing-level',
|
|
19
|
+
'item-credits-attribution-info',
|
|
20
|
+
'item-description',
|
|
21
|
+
'item-license-info',
|
|
22
|
+
'item-snippet',
|
|
23
|
+
'item-ssl',
|
|
24
|
+
'item-tags',
|
|
25
|
+
'item-thumbnail',
|
|
26
|
+
'item-title',
|
|
27
|
+
'item-deprecated',
|
|
28
|
+
'item-delete-protection',
|
|
29
|
+
'item-title-and-summary-searchability',
|
|
30
|
+
'user-profile-description',
|
|
31
|
+
'user-profile-full-name',
|
|
32
|
+
'user-profile-thumbnail',
|
|
33
|
+
'feature-service-field-value-types',
|
|
34
|
+
'feature-service-field-aliases',
|
|
35
|
+
'feature-service-field-descriptions',
|
|
36
|
+
];
|
|
16
37
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAoIU,QAAA,iBAAiB,GAAG;IAC7B,oBAAoB;IACpB,+BAA+B;IAC/B,kBAAkB;IAClB,mBAAmB;IACnB,cAAc;IACd,UAAU;IACV,WAAW;IACX,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;IACjB,wBAAwB;IACxB,sCAAsC;IACtC,0BAA0B;IAC1B,wBAAwB;IACxB,wBAAwB;IACxB,mCAAmC;IACnC,+BAA+B;IAC/B,oCAAoC;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vannizhang/living-atlas-content-validator",
|
|
3
|
-
"version": "1.5.19-beta.
|
|
3
|
+
"version": "1.5.19-beta.4",
|
|
4
4
|
"description": "Validation and Scoring rules for curating content in the ArcGIS Living Atlas",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/jest": "^29.5.0",
|
|
42
|
+
"@types/node": "^22.15.18",
|
|
42
43
|
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
43
44
|
"@typescript-eslint/parser": "^5.58.0",
|
|
44
45
|
"eslint": "^8.38.0",
|
|
@@ -49,9 +50,9 @@
|
|
|
49
50
|
"jest-environment-jsdom": "^29.7.0",
|
|
50
51
|
"lint-staged": "^13.2.1",
|
|
51
52
|
"prettier": "^2.8.7",
|
|
52
|
-
"rimraf": "^5.0.
|
|
53
|
-
"ts-jest": "^29.
|
|
54
|
-
"typescript": "^5.
|
|
53
|
+
"rimraf": "^5.0.10",
|
|
54
|
+
"ts-jest": "^29.3.3",
|
|
55
|
+
"typescript": "^5.8.3"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"sanitize-html": "^2.10.0"
|
|
File without changes
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// import { ScoringRulesConfig } from '../../types';
|
|
2
|
-
// const config: ScoringRulesConfig = {
|
|
3
|
-
// // Scoring
|
|
4
|
-
// SCORING: {
|
|
5
|
-
// DEFAULT: {
|
|
6
|
-
// WEB_MAP: {
|
|
7
|
-
// EMPTY_STRING_SCORE: 0,
|
|
8
|
-
// EXIST_SCORE: 8,
|
|
9
|
-
// },
|
|
10
|
-
// WEB_SCENE: {
|
|
11
|
-
// EMPTY_STRING_SCORE: 0,
|
|
12
|
-
// EXIST_SCORE: 9,
|
|
13
|
-
// },
|
|
14
|
-
// APPLICATION: {
|
|
15
|
-
// EMPTY_STRING_SCORE: 0,
|
|
16
|
-
// EXIST_SCORE: 9,
|
|
17
|
-
// },
|
|
18
|
-
// },
|
|
19
|
-
// INTERNATIONAL: {
|
|
20
|
-
// WEB_MAP: {
|
|
21
|
-
// EMPTY_STRING_SCORE: 0,
|
|
22
|
-
// EXIST_SCORE: 8,
|
|
23
|
-
// },
|
|
24
|
-
// WEB_SCENE: {
|
|
25
|
-
// EMPTY_STRING_SCORE: 0,
|
|
26
|
-
// EXIST_SCORE: 9,
|
|
27
|
-
// },
|
|
28
|
-
// APPLICATION: {
|
|
29
|
-
// EMPTY_STRING_SCORE: 0,
|
|
30
|
-
// EXIST_SCORE: 9,
|
|
31
|
-
// },
|
|
32
|
-
// },
|
|
33
|
-
// },
|
|
34
|
-
// };
|
|
35
|
-
// export default config;
|
|
36
|
-
//# sourceMappingURL=scoringRulesConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scoringRulesConfig.js","sourceRoot":"","sources":["../../../src/lib/accessInformation/scoringRulesConfig.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,uCAAuC;AACvC,iBAAiB;AACjB,iBAAiB;AACjB,qBAAqB;AACrB,yBAAyB;AACzB,yCAAyC;AACzC,kCAAkC;AAClC,iBAAiB;AACjB,2BAA2B;AAC3B,yCAAyC;AACzC,kCAAkC;AAClC,iBAAiB;AACjB,6BAA6B;AAC7B,yCAAyC;AACzC,kCAAkC;AAClC,iBAAiB;AACjB,aAAa;AAEb,2BAA2B;AAC3B,yBAAyB;AACzB,yCAAyC;AACzC,kCAAkC;AAClC,iBAAiB;AACjB,2BAA2B;AAC3B,yCAAyC;AACzC,kCAAkC;AAClC,iBAAiB;AACjB,6BAA6B;AAC7B,yCAAyC;AACzC,kCAAkC;AAClC,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AAEL,yBAAyB"}
|
|
File without changes
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// import { ScoringRulesConfig } from '../../types';
|
|
2
|
-
// const config: ScoringRulesConfig = {
|
|
3
|
-
// // Scoring
|
|
4
|
-
// SCORING: {
|
|
5
|
-
// DEFAULT: {
|
|
6
|
-
// WEB_MAP: {
|
|
7
|
-
// EMPTY_STRING_SCORE: 0,
|
|
8
|
-
// LAYER_COUNT_BEST_SCORE: 8,
|
|
9
|
-
// LAYER_COUNT_BETTER_SCORE: 4,
|
|
10
|
-
// LAYER_COUNT_GOOD_SCORE: 1,
|
|
11
|
-
// },
|
|
12
|
-
// WEB_SCENE: {
|
|
13
|
-
// EMPTY_STRING_SCORE: 0,
|
|
14
|
-
// LAYER_COUNT_BEST_SCORE: 0,
|
|
15
|
-
// LAYER_COUNT_BETTER_SCORE: 0,
|
|
16
|
-
// LAYER_COUNT_GOOD_SCORE: 0,
|
|
17
|
-
// },
|
|
18
|
-
// APPLICATION: {
|
|
19
|
-
// EMPTY_STRING_SCORE: 0,
|
|
20
|
-
// LAYER_COUNT_BEST_SCORE: 0,
|
|
21
|
-
// LAYER_COUNT_BETTER_SCORE: 0,
|
|
22
|
-
// LAYER_COUNT_GOOD_SCORE: 0,
|
|
23
|
-
// },
|
|
24
|
-
// },
|
|
25
|
-
// INTERNATIONAL: {
|
|
26
|
-
// WEB_MAP: {
|
|
27
|
-
// EMPTY_STRING_SCORE: 0,
|
|
28
|
-
// LAYER_COUNT_BEST_SCORE: 8,
|
|
29
|
-
// LAYER_COUNT_BETTER_SCORE: 4,
|
|
30
|
-
// LAYER_COUNT_GOOD_SCORE: 1,
|
|
31
|
-
// },
|
|
32
|
-
// WEB_SCENE: {
|
|
33
|
-
// EMPTY_STRING_SCORE: 0,
|
|
34
|
-
// LAYER_COUNT_BEST_SCORE: 0,
|
|
35
|
-
// LAYER_COUNT_BETTER_SCORE: 0,
|
|
36
|
-
// LAYER_COUNT_GOOD_SCORE: 0,
|
|
37
|
-
// },
|
|
38
|
-
// APPLICATION: {
|
|
39
|
-
// EMPTY_STRING_SCORE: 0,
|
|
40
|
-
// LAYER_COUNT_BEST_SCORE: 0,
|
|
41
|
-
// LAYER_COUNT_BETTER_SCORE: 0,
|
|
42
|
-
// LAYER_COUNT_GOOD_SCORE: 0,
|
|
43
|
-
// },
|
|
44
|
-
// },
|
|
45
|
-
// },
|
|
46
|
-
// };
|
|
47
|
-
// export default config;
|
|
48
|
-
//# sourceMappingURL=scoringRulesConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scoringRulesConfig.js","sourceRoot":"","sources":["../../../src/lib/layers/scoringRulesConfig.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,uCAAuC;AACvC,iBAAiB;AACjB,iBAAiB;AACjB,qBAAqB;AACrB,yBAAyB;AACzB,yCAAyC;AACzC,6CAA6C;AAC7C,+CAA+C;AAC/C,6CAA6C;AAC7C,iBAAiB;AACjB,2BAA2B;AAC3B,yCAAyC;AACzC,6CAA6C;AAC7C,+CAA+C;AAC/C,6CAA6C;AAC7C,iBAAiB;AACjB,6BAA6B;AAC7B,yCAAyC;AACzC,6CAA6C;AAC7C,+CAA+C;AAC/C,6CAA6C;AAC7C,iBAAiB;AACjB,aAAa;AAEb,2BAA2B;AAC3B,yBAAyB;AACzB,yCAAyC;AACzC,6CAA6C;AAC7C,+CAA+C;AAC/C,6CAA6C;AAC7C,iBAAiB;AACjB,2BAA2B;AAC3B,yCAAyC;AACzC,6CAA6C;AAC7C,+CAA+C;AAC/C,6CAA6C;AAC7C,iBAAiB;AACjB,6BAA6B;AAC7B,yCAAyC;AACzC,6CAA6C;AAC7C,+CAA+C;AAC/C,6CAA6C;AAC7C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AAEL,yBAAyB"}
|