@vannizhang/living-atlas-content-validator 1.5.19-beta.9 → 1.5.19
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 +196 -199
- package/dist/configureSettings.d.ts +27 -25
- package/dist/configureSettings.js +14 -13
- package/dist/configureSettings.js.map +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +1 -1
- package/dist/lib/config.js +6 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +17 -13
- package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js.map +1 -1
- package/dist/lib/featureServiceFieldAliases/helpers.d.ts +19 -0
- package/dist/lib/featureServiceFieldAliases/helpers.js +48 -0
- package/dist/lib/featureServiceFieldAliases/helpers.js.map +1 -0
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +30 -15
- package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js.map +1 -1
- package/dist/lib/featureServiceFieldDescriptions/helpers.d.ts +20 -0
- package/dist/lib/featureServiceFieldDescriptions/helpers.js +53 -0
- package/dist/lib/featureServiceFieldDescriptions/helpers.js.map +1 -0
- package/dist/lib/featureServiceFieldDescriptions/scoringConfig.js +1 -1
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +18 -15
- package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js.map +1 -1
- package/dist/lib/featureServiceFieldValueTypes/helpers.d.ts +16 -0
- package/dist/lib/featureServiceFieldValueTypes/helpers.js +35 -0
- package/dist/lib/featureServiceFieldValueTypes/helpers.js.map +1 -0
- package/dist/lib/featureServiceFieldValueTypes/scoringConfig.js +1 -1
- package/dist/lib/ssl/isValidSSL.js +3 -1
- package/dist/lib/ssl/isValidSSL.js.map +1 -1
- package/dist/locale/de.json +21 -24
- package/dist/locale/en.json +7 -10
- package/dist/locale/es.json +21 -24
- package/dist/locale/fr.json +21 -24
- package/dist/locale/ja.json +21 -24
- package/dist/locale/pt-br.json +21 -24
- package/dist/package-info.json +1 -1
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.d.ts +11 -6
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js +56 -16
- package/dist/services/feature-service/fetchFeatureServiceLayersAndTables.js.map +1 -1
- package/dist/services/feature-service/getFeatureServerURL.d.ts +12 -0
- package/dist/services/feature-service/getFeatureServerURL.js +37 -0
- package/dist/services/feature-service/getFeatureServerURL.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ The validation process evaluates whether an item meets all necessary criteria, s
|
|
|
14
14
|
- [Installation](#installation)
|
|
15
15
|
- [Usage](#usage)
|
|
16
16
|
- [Configuration](#configuration)
|
|
17
|
-
- [API Reference](#api-reference)
|
|
17
|
+
- [API Reference - Core Functions](#api-reference---core-functions)
|
|
18
18
|
- [validate](#validate)
|
|
19
19
|
- [isValidTitle](#isvalidtitle)
|
|
20
20
|
- [isValidAccessInformation](#isvalidaccessinformation)
|
|
@@ -29,7 +29,11 @@ The validation process evaluates whether an item meets all necessary criteria, s
|
|
|
29
29
|
- [isValidUserProfileName](#isvaliduserprofilename)
|
|
30
30
|
- [isValidUserProfileDescription](#isvaliduserprofiledescription)
|
|
31
31
|
- [isValidUserProfileThumbnail](#isvaliduserprofilethumbnail)
|
|
32
|
+
- [checkFeatureServiceFieldAliases](#checkfeatureservicefieldaliases)
|
|
33
|
+
- [checkFeatureServiceFieldDescriptions](#checkFeatureServiceFieldDescriptions)
|
|
34
|
+
- [checkFeatureServiceFieldValueTypes](#checkFeatureServiceFieldValueTypes)
|
|
32
35
|
- [checkTitleAndSnippetSearchability](#checktitleandsnippetsearchability)
|
|
36
|
+
- [API Reference - Helper Functions](#api-reference---helper-functions)
|
|
33
37
|
- [isEligibleForCheckingTitleAndSnippetSearchability](#iseligibleforcheckingtitleandsnippetsearchability)
|
|
34
38
|
- [matchLocationInfo](#matchlocationinfo)
|
|
35
39
|
- [isRecognizedLocation](#isrecognizedlocation)
|
|
@@ -43,12 +47,8 @@ The validation process evaluates whether an item meets all necessary criteria, s
|
|
|
43
47
|
- [matchDateTimeInfo](#matchdatetimeinfo)
|
|
44
48
|
- [isRecognizedDateTimeInfo](#isrecognizeddatetimeinfo)
|
|
45
49
|
- [isRejectedDateTimeInfo](#isrejecteddatetimeinfo)
|
|
46
|
-
- [checkFeatureServiceFieldAliases](#checkfeatureservicefieldaliases)
|
|
47
|
-
- [checkFeatureServiceFieldDescriptions](#checkFeatureServiceFieldDescriptions)
|
|
48
|
-
- [checkFeatureServiceFieldValueTypes](#checkFeatureServiceFieldValueTypes)
|
|
49
50
|
- [getLivingAtlasSupportedItemTypes](#getlivingatlassupporteditemtypes)
|
|
50
51
|
- [checkIsLivingAtlasSupportedItemType](#checkislivingatlassupporteditemtype)
|
|
51
|
-
|
|
52
52
|
- [Types](#types)
|
|
53
53
|
- [ValidationResult](#validationresult)
|
|
54
54
|
- [ValidationResultStatus](#validationresultstatus)
|
|
@@ -102,26 +102,13 @@ const validationResults = validate(item, userProfile);
|
|
|
102
102
|
|
|
103
103
|
## Configuration
|
|
104
104
|
|
|
105
|
-
The package provides a `configureSettings` function that allows customization of language,
|
|
105
|
+
The package provides a `configureSettings` function that allows customization of language, additional validation patterns and etc.
|
|
106
106
|
|
|
107
107
|
### `configureSettings(params)`
|
|
108
|
-
Configures the package settings including language preferences,
|
|
108
|
+
Configures the package settings including language preferences, additional matching patterns to be used for title and snippet searchability rule and etc. This function should be called before using any validation functionality to ensure the validator operates with the correct context and rule set.
|
|
109
109
|
|
|
110
110
|
**Parameters:**
|
|
111
|
-
- `
|
|
112
|
-
Supported languages:
|
|
113
|
-
- `'en'` (English)
|
|
114
|
-
- `'de'` (German)
|
|
115
|
-
- `'es'` (Spanish)
|
|
116
|
-
- `'fr'` (French)
|
|
117
|
-
- `'ja'` (Japanese)
|
|
118
|
-
- `'pt-br'` (Brazilian Portuguese)
|
|
119
|
-
|
|
120
|
-
- `serviceTier` (`string`, required) - The service tier of the application.
|
|
121
|
-
- `'dev'`: Development tier, points to `devext.arcgis.com`.
|
|
122
|
-
- `'prod'`: Production tier, points to `www.arcgis.com`.
|
|
123
|
-
|
|
124
|
-
- `additionalPatternsForTitleAndSnippetSearchability` (*object*, optional) - Additional validation patterns for title and snippet searchability.
|
|
111
|
+
- `additionalPatternsForTitleAndSnippetSearchability` (*object*, optional) - Additional validation patterns for title and snippet searchability. These additional patterns are global, will be used for all items validated by the package. If you want to use custom patterns for a specific item, you can pass them as options to the [`validate`](#validate) function.
|
|
125
112
|
- `matchingPatternsLocation` (`string[]`) - List of location matching patterns.
|
|
126
113
|
- `rejectedPatternsLocation` (`string[]`) - List of rejected location patterns.
|
|
127
114
|
- `matchingPatternsSource` (`string[]`) - List of source matching patterns.
|
|
@@ -132,9 +119,27 @@ Configures the package settings including language preferences, service tier sel
|
|
|
132
119
|
- `rejectedPatternsYearVintage` (`string[]`) - List of rejected year vintage patterns.
|
|
133
120
|
- `shouldAvoidUsingWordBoundary` (`boolean`) - Determines if word boundaries should be avoided (for non-Latin languages).
|
|
134
121
|
|
|
122
|
+
- `language` (`string`, optional) - This setting determines the language used for displaying messages of the validation results. Default is `'en'`. Supported languages:
|
|
123
|
+
- `'en'` (English)
|
|
124
|
+
- `'de'` (German)
|
|
125
|
+
- `'es'` (Spanish)
|
|
126
|
+
- `'fr'` (French)
|
|
127
|
+
- `'ja'` (Japanese)
|
|
128
|
+
- `'pt-br'` (Brazilian Portuguese)
|
|
129
|
+
|
|
135
130
|
- `profanities` (`string[]`, optional) - List of words considered profane for validation.
|
|
136
131
|
|
|
137
|
-
|
|
132
|
+
- `serviceTier` (`string`, option) - The service tier of the application. Some helper modules (not part of the core evaluation logic) depend on this setting. If you're only using the library to evaluate content, you can safely ignore this.
|
|
133
|
+
- `'dev'`: Development tier, points to `devext.arcgis.com`.
|
|
134
|
+
- `'prod'`: Production tier, points to `www.arcgis.com`.
|
|
135
|
+
|
|
136
|
+
### When should I use `configureSettings`?
|
|
137
|
+
|
|
138
|
+
You should use `configureSettings` if you want to define additional matching patterns for title and snippet searchability, especially in cases where the default patterns may not account for all special scenarios. This is particularly helpful for non-English languages or specialized domains with frequently used terms.
|
|
139
|
+
|
|
140
|
+
The Living Atlas team also uses the `configureSettings` function to incorporate matching patterns suggested by users of the Living Atlas Nomination App.
|
|
141
|
+
|
|
142
|
+
### Example Usage of `configureSettings`
|
|
138
143
|
|
|
139
144
|
```js
|
|
140
145
|
import {
|
|
@@ -142,8 +147,6 @@ import {
|
|
|
142
147
|
} from '@vannizhang/living-atlas-content-validator';
|
|
143
148
|
|
|
144
149
|
configureSettings({
|
|
145
|
-
language: 'en',
|
|
146
|
-
serviceTier: 'prod',
|
|
147
150
|
additionalPatternsForTitleAndSnippetSearchability: {
|
|
148
151
|
matchingPatternsLocation: ['New York', 'Los Angeles'],
|
|
149
152
|
rejectedPatternsLocation: ['Unknown', 'Unknown Location'],
|
|
@@ -155,13 +158,15 @@ configureSettings({
|
|
|
155
158
|
rejectedPatternsYearVintage: ['Unknown', 'Unknown Year Vintage'],
|
|
156
159
|
shouldAvoidUsingWordBoundary: false
|
|
157
160
|
},
|
|
158
|
-
|
|
161
|
+
language: 'en',
|
|
162
|
+
profanities: ['badword1', 'badword2'],
|
|
163
|
+
serviceTier: 'prod',
|
|
159
164
|
});
|
|
160
165
|
```
|
|
161
166
|
|
|
162
|
-
|
|
167
|
+
## API Reference - Core Functions
|
|
163
168
|
|
|
164
|
-
|
|
169
|
+
These are the core functions provided by the package for validating ArcGIS Online items against Living Atlas criteria. The `validate` function serves as the main entry point, performing comprehensive validation by internally invoking the other functions. Each of these functions can also be used independently for targeted validation tasks.
|
|
165
170
|
|
|
166
171
|
### `validate`
|
|
167
172
|
Validates an ArcGIS Online item and its owner's user profile against Living Atlas criteria.
|
|
@@ -185,7 +190,7 @@ validate(
|
|
|
185
190
|
- `customPatternsForSourceInfo` (`string[]`, optional): Custom patterns for identifying source information in the item's title and snippet.
|
|
186
191
|
- `customPatternsForTopicInfo` (`string[]`, optional): Custom patterns for identifying topic information in the item's title and snippet.
|
|
187
192
|
- `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 `
|
|
193
|
+
- `featureLayers` (`FeatureLayerJSON[]`, optional): An array of [`Feature Layer JSON`](https://developers.arcgis.com/rest/services-reference/online/feature-layer/#json-response-syntax) objects representing the feature layers associated with the Feature Service item. Used for validating field value types, aliases, and descriptions within those layers.
|
|
189
194
|
|
|
190
195
|
**Returns:**
|
|
191
196
|
- `ValidationResult`: An object containing detailed validation results, a total score, and a flag indicating whether the item can be nominated to Living Atlas.
|
|
@@ -721,6 +726,156 @@ console.log(validationInfo);
|
|
|
721
726
|
|
|
722
727
|
---
|
|
723
728
|
|
|
729
|
+
|
|
730
|
+
### `checkFeatureServiceFieldAliases`
|
|
731
|
+
Validates that relevant fields in feature layers have appropriate aliases.
|
|
732
|
+
|
|
733
|
+
```ts
|
|
734
|
+
import { checkFeatureServiceFieldAliases } from '@vannizhang/living-atlas-content-validator';
|
|
735
|
+
|
|
736
|
+
checkFeatureServiceFieldAliases(
|
|
737
|
+
item: IItem,
|
|
738
|
+
featureLayers: FeatureLayerJSON[]
|
|
739
|
+
): ValidationInfo
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
**Parameters:**
|
|
743
|
+
- `item` (`IItem`, required): The ArcGIS Online item to validate
|
|
744
|
+
- `featureLayers` (`FeatureLayerJSON[]`, required): An array of [`Feature Layer JSON`](https://developers.arcgis.com/rest/services-reference/online/feature-layer/#json-response-syntax) objects representing the feature layers published to this feature service to check for field aliases.
|
|
745
|
+
|
|
746
|
+
**Returns:**
|
|
747
|
+
- `ValidationInfo`: An object containing the validation result, messages, and scoring for field aliases.
|
|
748
|
+
|
|
749
|
+
**Description:**
|
|
750
|
+
This function checks the provided feature layers for relevant fields and evaluates whether those fields have aliases defined.
|
|
751
|
+
|
|
752
|
+
**Example:**
|
|
753
|
+
```ts
|
|
754
|
+
import { checkFeatureServiceFieldAliases } from '@vannizhang/living-atlas-content-validator';
|
|
755
|
+
|
|
756
|
+
const item = {
|
|
757
|
+
id: 'mock-feature-layer-id',
|
|
758
|
+
type: 'Feature Service',
|
|
759
|
+
// Other properties...
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
const featureLayers = [
|
|
763
|
+
{
|
|
764
|
+
fields: [
|
|
765
|
+
{ name: 'field1', alias: 'Field 1' },
|
|
766
|
+
{ name: 'field2', alias: '' },
|
|
767
|
+
// Other fields...
|
|
768
|
+
],
|
|
769
|
+
// Other properties...
|
|
770
|
+
}
|
|
771
|
+
// Additional feature layers if needed...
|
|
772
|
+
];
|
|
773
|
+
|
|
774
|
+
const validationInfo = checkFeatureServiceFieldAliases(item, featureLayers);
|
|
775
|
+
console.log(validationInfo);
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
---
|
|
779
|
+
|
|
780
|
+
### `checkFeatureServiceFieldDescriptions`
|
|
781
|
+
Validates that relevant fields in feature layers have appropriate descriptions.
|
|
782
|
+
|
|
783
|
+
```ts
|
|
784
|
+
import { checkFeatureServiceFieldDescriptions } from '@vannizhang/living-atlas-content-validator';
|
|
785
|
+
|
|
786
|
+
checkFeatureServiceFieldDescriptions(
|
|
787
|
+
item: IItem,
|
|
788
|
+
featureLayers: FeatureLayerJSON[]
|
|
789
|
+
): ValidationInfo
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
**Parameters:**
|
|
793
|
+
- `item` (`IItem`, required): The ArcGIS Online item to validate, expected to be a feature layer.
|
|
794
|
+
- `featureLayers` (`FeatureLayerJSON[]`, required): An array of [`Feature Layer JSON`](https://developers.arcgis.com/rest/services-reference/online/feature-layer/#json-response-syntax) objects representing the feature layers published to this feature service to check for field descriptions.
|
|
795
|
+
|
|
796
|
+
**Returns:**
|
|
797
|
+
- `ValidationInfo`: An object containing the validation result, messages, score, and scoring factors for field descriptions.
|
|
798
|
+
|
|
799
|
+
**Description:**
|
|
800
|
+
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.
|
|
801
|
+
**Example:**
|
|
802
|
+
```ts
|
|
803
|
+
import { checkFeatureServiceFieldDescriptions } from '@vannizhang/living-atlas-content-validator';
|
|
804
|
+
|
|
805
|
+
const item = {
|
|
806
|
+
id: 'mock-feature-layer-id',
|
|
807
|
+
type: 'Feature Service',
|
|
808
|
+
// Other properties...
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
const featureLayers = [
|
|
812
|
+
{
|
|
813
|
+
fields: [
|
|
814
|
+
{ name: 'field1', description: { value: 'Description for field 1' } },
|
|
815
|
+
{ name: 'field2', description: { value: '' } },
|
|
816
|
+
// Other fields...
|
|
817
|
+
],
|
|
818
|
+
// Other properties...
|
|
819
|
+
}
|
|
820
|
+
// Additional feature layers if needed...
|
|
821
|
+
];
|
|
822
|
+
|
|
823
|
+
const validationInfo = checkFeatureServiceFieldDescriptions(item, featureLayers);
|
|
824
|
+
console.log(validationInfo);
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
---
|
|
828
|
+
|
|
829
|
+
### `checkFeatureServiceFieldValueTypes`
|
|
830
|
+
Validates that relevant fields in feature layers have a `fieldValueType` defined in their field descriptions.
|
|
831
|
+
|
|
832
|
+
```ts
|
|
833
|
+
import { checkFeatureServiceFieldValueTypes } from '@vannizhang/living-atlas-content-validator';
|
|
834
|
+
|
|
835
|
+
checkFeatureServiceFieldValueTypes(
|
|
836
|
+
item: IItem,
|
|
837
|
+
featureLayers: FeatureLayerJSON[]
|
|
838
|
+
): ValidationInfo
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
**Parameters:**
|
|
842
|
+
- `item` (`IItem`, required): The ArcGIS Online item to validate.
|
|
843
|
+
- `featureLayers` (`FeatureLayerJSON[]`, required): An array of [`Feature Layer JSON`](https://developers.arcgis.com/rest/services-reference/online/feature-layer/#json-response-syntax) objects representing the feature layers published to this feature service.
|
|
844
|
+
|
|
845
|
+
**Returns:**
|
|
846
|
+
- `ValidationInfo`: An object containing the validation result, messages, and scoring for field value types.
|
|
847
|
+
|
|
848
|
+
**Description:**
|
|
849
|
+
This function checks the provided feature layers for relevant fields and evaluates whether those fields have a `fieldValueType` defined in their descriptions.
|
|
850
|
+
|
|
851
|
+
**Example:**
|
|
852
|
+
```ts
|
|
853
|
+
import { checkFeatureServiceFieldValueTypes } from '@vannizhang/living-atlas-content-validator';
|
|
854
|
+
|
|
855
|
+
const item = {
|
|
856
|
+
id: 'mock-feature-layer-id',
|
|
857
|
+
type: 'Feature Service',
|
|
858
|
+
// Other properties...
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
const featureLayers = [
|
|
862
|
+
{
|
|
863
|
+
fields: [
|
|
864
|
+
{ name: 'field1', description: { fieldValueType: 'type1' } },
|
|
865
|
+
{ name: 'field2', description: { fieldValueType: '' } },
|
|
866
|
+
// Other fields...
|
|
867
|
+
],
|
|
868
|
+
// Other properties...
|
|
869
|
+
}
|
|
870
|
+
// Additional feature layers if needed...
|
|
871
|
+
];
|
|
872
|
+
|
|
873
|
+
const validationInfo = checkFeatureServiceFieldValueTypes(item, featureLayers);
|
|
874
|
+
console.log(validationInfo);
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
---
|
|
878
|
+
|
|
724
879
|
### `checkTitleAndSnippetSearchability`
|
|
725
880
|
Checks for required and recommended text in an item's title and summary (snippet) to ensure they are search-friendly.
|
|
726
881
|
|
|
@@ -772,6 +927,10 @@ console.log(validationInfo);
|
|
|
772
927
|
|
|
773
928
|
---
|
|
774
929
|
|
|
930
|
+
## API Reference - Helper Functions
|
|
931
|
+
|
|
932
|
+
These are helper functions used internally by the core validation functions, but they can also be called independently for specific use cases. For example, a user may call `checkIsLivingAtlasSupportedItemType` to determine if an item is a supported Living Atlas type before invoking validate. Similarly, `isRecognizedLocation` can be used to verify whether a string qualifies as recognized location information before using it as a custom pattern in `matchLocationInfo`.
|
|
933
|
+
|
|
775
934
|
### `isEligibleForCheckingTitleAndSnippetSearchability`
|
|
776
935
|
Determines if an item is eligible for checking title and snippet searchability.
|
|
777
936
|
|
|
@@ -1254,171 +1413,6 @@ const isSupported = checkIsLivingAtlasSupportedItemType(item);
|
|
|
1254
1413
|
console.log(isSupported); // true or false
|
|
1255
1414
|
```
|
|
1256
1415
|
|
|
1257
|
-
---
|
|
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.
|
|
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
|
-
```
|
|
1422
1416
|
|
|
1423
1417
|
## Types
|
|
1424
1418
|
|
|
@@ -1712,21 +1706,24 @@ Below is the list of weights assigned to each validation rule:
|
|
|
1712
1706
|
|
|
1713
1707
|
| Validation Rule | Weight |
|
|
1714
1708
|
|------------------------------------------------|--------|
|
|
1715
|
-
| Check
|
|
1709
|
+
| Check Discoverability of Title and Summary | 16 |
|
|
1716
1710
|
| Check Title | 8 |
|
|
1717
1711
|
| Check Summary | 8 |
|
|
1712
|
+
| Check Thumbnail | 8 |
|
|
1718
1713
|
| Check Description | 8 |
|
|
1719
|
-
| Check Tags | 4 |
|
|
1720
|
-
| Check Discoverability of Title and Summary | 16 |
|
|
1721
1714
|
| Check Terms of Use | 8 |
|
|
1722
1715
|
| Check Credits (Attribution) | 8 |
|
|
1716
|
+
| Check Profile Description | 8 |
|
|
1717
|
+
| Check Feature Service Field Aliases | 8 |
|
|
1718
|
+
| Check Tags | 4 |
|
|
1719
|
+
| Check Profile Thumbnail | 2 |
|
|
1720
|
+
| Check Profile Full Name | 2 |
|
|
1721
|
+
| Check Feature Service Field Descriptions | 2 |
|
|
1722
|
+
| Check Feature Service Field Value Types | 2 |
|
|
1723
1723
|
| Check Sharing Level | 1 |
|
|
1724
1724
|
| Check Delete Protection Setting | 1 |
|
|
1725
1725
|
| Check Deprecated Setting | 1 |
|
|
1726
1726
|
| Check HTTPS in URL | 1 |
|
|
1727
|
-
| Check Profile Thumbnail | 2 |
|
|
1728
|
-
| Check Profile Full Name | 2 |
|
|
1729
|
-
| Check Profile Description | 8 |
|
|
1730
1727
|
|
|
1731
1728
|
## Issues
|
|
1732
1729
|
Find a bug or want to request a new feature? Please let us know by submitting an issue.
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { ServiceTier } from './services/shared/config';
|
|
2
2
|
type ConfigureSettingsParams = {
|
|
3
|
-
/**
|
|
4
|
-
* The language of the library. Default is 'en'.
|
|
5
|
-
* This setting determines the language used for displaying messages and of the validation results.
|
|
6
|
-
*
|
|
7
|
-
* Here is list of supported languages:
|
|
8
|
-
* - `en`: English
|
|
9
|
-
* - `de`: German
|
|
10
|
-
* - `es`: Spanish
|
|
11
|
-
* - `fr`: French
|
|
12
|
-
* - `ja`: Japanese
|
|
13
|
-
* - `pt-br`: Brazilian Portuguese
|
|
14
|
-
*/
|
|
15
|
-
language: string;
|
|
16
|
-
/**
|
|
17
|
-
* The service tier of the application. It can be either 'dev' or 'prod'.
|
|
18
|
-
* - `dev`: Development tier, pointing to development services on `devext.arcgis.com`.
|
|
19
|
-
* - `prod`: Production tier, pointing to production services on `www.arcgis.com`.
|
|
20
|
-
*/
|
|
21
|
-
serviceTier: ServiceTier;
|
|
22
3
|
/**
|
|
23
4
|
* additional patterns for title and snippet searchability
|
|
24
5
|
*/
|
|
@@ -102,19 +83,40 @@ type ConfigureSettingsParams = {
|
|
|
102
83
|
*/
|
|
103
84
|
shouldAvoidUsingWordBoundary: boolean;
|
|
104
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* The language of the library. Default is 'en'.
|
|
88
|
+
* This setting determines the language used for displaying messages and of the validation results.
|
|
89
|
+
*
|
|
90
|
+
* Here is list of supported languages:
|
|
91
|
+
* - `en`: English
|
|
92
|
+
* - `de`: German
|
|
93
|
+
* - `es`: Spanish
|
|
94
|
+
* - `fr`: French
|
|
95
|
+
* - `ja`: Japanese
|
|
96
|
+
* - `pt-br`: Brazilian Portuguese
|
|
97
|
+
*/
|
|
98
|
+
language?: string;
|
|
105
99
|
/**
|
|
106
100
|
* An array of profanities to be used for validation.
|
|
107
101
|
* This is used to determine if the title or snippet contains any profanities.
|
|
108
102
|
*/
|
|
109
103
|
profanities?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Specifies the service tier of the application, either `'dev'` or `'prod'`.
|
|
106
|
+
* Some helper modules (not part of the core evaluation logic) depend on this setting.
|
|
107
|
+
* If you're only using the library to evaluate content, you can safely ignore this.
|
|
108
|
+
*
|
|
109
|
+
* - `'dev'`: Development tier; uses services hosted on `devext.arcgis.com`.
|
|
110
|
+
* - `'prod'`: Production tier; uses services hosted on `www.arcgis.com`.
|
|
111
|
+
*/
|
|
112
|
+
serviceTier?: ServiceTier;
|
|
110
113
|
};
|
|
111
114
|
/**
|
|
112
115
|
* Configures the settings for the application.
|
|
113
116
|
*
|
|
114
117
|
* @param {Object} params - The settings parameters.
|
|
115
|
-
* @param {string} params.serviceTier - The service tier, must be either 'dev' or 'prod'.
|
|
116
118
|
* @param {string} params.language - The language to be set for the application.
|
|
117
|
-
* @param {Object} params.additionalPatternsForTitleAndSnippetSearchability -
|
|
119
|
+
* @param {Object} [params.additionalPatternsForTitleAndSnippetSearchability] - Optional additional patterns for title and snippet searchability.
|
|
118
120
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsLocation - Matching patterns for location.
|
|
119
121
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsLocation - Rejected patterns for location.
|
|
120
122
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsSource - Matching patterns for source.
|
|
@@ -124,10 +126,10 @@ type ConfigureSettingsParams = {
|
|
|
124
126
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsYearVintage - Matching patterns for year vintage.
|
|
125
127
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsYearVintage - Rejected patterns for year vintage.
|
|
126
128
|
* @param {boolean} params.additionalPatternsForTitleAndSnippetSearchability.shouldAvoidUsingWordBoundary - Flag to avoid using word boundary.
|
|
127
|
-
* @param {string[]} [params.profanities] -
|
|
129
|
+
* @param {string[]} [params.profanities] - Optional array of profanities to be used for validation.
|
|
130
|
+
* @param {string} [params.serviceTier] - Optional service tier, must be either 'dev' or 'prod'. Defaults to 'prod'.
|
|
128
131
|
*
|
|
129
|
-
* @throws {Error} If the
|
|
130
|
-
* @throws {Error} If the language is not provided.
|
|
132
|
+
* @throws {Error} If the language is not provided or is invalid.
|
|
131
133
|
*/
|
|
132
|
-
export declare const configureSettings: ({
|
|
134
|
+
export declare const configureSettings: ({ language, additionalPatternsForTitleAndSnippetSearchability, profanities, serviceTier, }: ConfigureSettingsParams) => void;
|
|
133
135
|
export {};
|
|
@@ -9,9 +9,8 @@ const config_2 = require("./services/shared/config");
|
|
|
9
9
|
* Configures the settings for the application.
|
|
10
10
|
*
|
|
11
11
|
* @param {Object} params - The settings parameters.
|
|
12
|
-
* @param {string} params.serviceTier - The service tier, must be either 'dev' or 'prod'.
|
|
13
12
|
* @param {string} params.language - The language to be set for the application.
|
|
14
|
-
* @param {Object} params.additionalPatternsForTitleAndSnippetSearchability -
|
|
13
|
+
* @param {Object} [params.additionalPatternsForTitleAndSnippetSearchability] - Optional additional patterns for title and snippet searchability.
|
|
15
14
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsLocation - Matching patterns for location.
|
|
16
15
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsLocation - Rejected patterns for location.
|
|
17
16
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsSource - Matching patterns for source.
|
|
@@ -21,24 +20,26 @@ const config_2 = require("./services/shared/config");
|
|
|
21
20
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.matchingPatternsYearVintage - Matching patterns for year vintage.
|
|
22
21
|
* @param {string[]} params.additionalPatternsForTitleAndSnippetSearchability.rejectedPatternsYearVintage - Rejected patterns for year vintage.
|
|
23
22
|
* @param {boolean} params.additionalPatternsForTitleAndSnippetSearchability.shouldAvoidUsingWordBoundary - Flag to avoid using word boundary.
|
|
24
|
-
* @param {string[]} [params.profanities] -
|
|
23
|
+
* @param {string[]} [params.profanities] - Optional array of profanities to be used for validation.
|
|
24
|
+
* @param {string} [params.serviceTier] - Optional service tier, must be either 'dev' or 'prod'. Defaults to 'prod'.
|
|
25
25
|
*
|
|
26
|
-
* @throws {Error} If the
|
|
27
|
-
* @throws {Error} If the language is not provided.
|
|
26
|
+
* @throws {Error} If the language is not provided or is invalid.
|
|
28
27
|
*/
|
|
29
|
-
const configureSettings = ({
|
|
30
|
-
if (serviceTier !== 'dev' && serviceTier !== 'prod') {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const configureSettings = ({ language = 'en', additionalPatternsForTitleAndSnippetSearchability, profanities, serviceTier = 'dev', }) => {
|
|
29
|
+
// if (serviceTier !== 'dev' && serviceTier !== 'prod') {
|
|
30
|
+
// throw new Error(
|
|
31
|
+
// 'Invalid service tier. It must be either "dev" or "prod".'
|
|
32
|
+
// );
|
|
33
|
+
// }
|
|
34
|
+
// if (!language) {
|
|
35
|
+
// throw new Error('Language is required.');
|
|
36
|
+
// }
|
|
36
37
|
const validLocales = ['en', 'de', 'es', 'fr', 'ja', 'pt-br'];
|
|
37
38
|
if (!validLocales.includes(language)) {
|
|
38
39
|
throw new Error(`Invalid language. Supported languages are: ${validLocales.join(', ')}.`);
|
|
39
40
|
}
|
|
40
41
|
// Set the service tier for the application
|
|
41
|
-
(0, config_2.setServiceTier)(serviceTier);
|
|
42
|
+
(0, config_2.setServiceTier)(serviceTier || 'dev');
|
|
42
43
|
// Set the language for the application
|
|
43
44
|
(0, stringsConfig_1.setStrings)(language);
|
|
44
45
|
const { matchingPatternsLocation, rejectedPatternsLocation, matchingPatternsSource, rejectedPatternsSource, matchingPatternsTopic, rejectedPatternsTopic, matchingPatternsYearVintage, rejectedPatternsYearVintage, shouldAvoidUsingWordBoundary, } = additionalPatternsForTitleAndSnippetSearchability || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureSettings.js","sourceRoot":"","sources":["../src/configureSettings.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,2EAAsH;AACtH,4DAA8D;AAC9D,qDAAuE;
|
|
1
|
+
{"version":3,"file":"configureSettings.js","sourceRoot":"","sources":["../src/configureSettings.ts"],"names":[],"mappings":";;;AAAA,8EAAyE;AACzE,2EAAsH;AACtH,4DAA8D;AAC9D,qDAAuE;AAmHvE;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAC9B,QAAQ,GAAG,IAAI,EACf,iDAAiD,EACjD,WAAW,EACX,WAAW,GAAG,KAAK,GACG,EAAE,EAAE;IAC1B,yDAAyD;IACzD,uBAAuB;IACvB,qEAAqE;IACrE,SAAS;IACT,IAAI;IAEJ,mBAAmB;IACnB,gDAAgD;IAChD,IAAI;IAEJ,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,IAAI,KAAK,CAAC,CAAC;IAErC,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
|
@@ -37,10 +37,15 @@ import { LivingAtlasSupportedItemType } from './lib/config';
|
|
|
37
37
|
import { checkFeatureServiceFieldDescriptions } from './lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions';
|
|
38
38
|
import { checkFeatureServiceFieldAliases } from './lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases';
|
|
39
39
|
import { checkFeatureServiceFieldValueTypes } from './lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes';
|
|
40
|
-
|
|
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, };
|
|
40
|
+
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, };
|
|
44
41
|
export { fetchAdditonalPatterns4TitleAndSnippetSearchability, fetchProfanitiesData, getSubmittedCustomTerms, getMyCustomTerms, addCustomTerms2FeatureTable, updateStatusOfCustomTermsInFeatureTable, getPackagedReviewResults, getReviewedReviewResults, getUnarchivedReviewResults, getDeployedReviewResults, getReviewResultsByTermAndCategory, addReviewResults2FeatureTable, updateReviewResultsInFeatureTable, getCustomTermsFeatureTableItemInfo, getCustomTermsReviewResultsFeatureTableItemInfo, containsProfanity, };
|
|
45
42
|
export { isValidRegexPattern, escapeSpecialCharacters };
|
|
46
43
|
export type { ValidationMessage, ValidationInfo, ValidationResult, ValidationRulesStringJSON, ValidationResultStatus, MatchResult, CustomTermFeature, CustomTermCategory, CustomTermStatus, CustomTermsReviewResultLifecycle, CustomTermReviewResultFeature, AdditionalPatterns4TitleAndSnippetSearchability, AddFeaturesResponse, LivingAtlasSupportedItemType, FeatureLayerFieldRaw, FeatureLayerFieldFormatted, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON, };
|
|
44
|
+
import { getFeatureServerRootURL } from './services/feature-service/getFeatureServerURL';
|
|
45
|
+
import { getPercentOfValidFieldDescriptions, isValidFieldDescription } from './lib/featureServiceFieldDescriptions/helpers';
|
|
46
|
+
import { getPercentOfValidFieldAliases, isValidFieldAlias } from './lib/featureServiceFieldAliases/helpers';
|
|
47
|
+
import { getPercentFieldsWithValueType, isValidFieldValueType } from './lib/featureServiceFieldValueTypes/helpers';
|
|
48
|
+
import { fetchFeatureServiceLayersAndTables } from './services/feature-service/fetchFeatureServiceLayersAndTables';
|
|
49
|
+
import { getRelevantFeatureLayerFields } from './lib/util/getRelevantFeatureLayerFields';
|
|
50
|
+
import { getFeatureLayerFieldValueTypes } from './lib/util/getFeatureLayerFieldValueTypes';
|
|
51
|
+
export { getFeatureServerRootURL, fetchFeatureServiceLayersAndTables, getRelevantFeatureLayerFields, getFeatureLayerFieldValueTypes, getPercentOfValidFieldDescriptions, isValidFieldDescription, getPercentOfValidFieldAliases, isValidFieldAlias, getPercentFieldsWithValueType, isValidFieldValueType, };
|