@vannizhang/living-atlas-content-validator 1.5.19 → 1.5.20-beta.1

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.
Files changed (102) hide show
  1. package/README.md +230 -20
  2. package/dist/configureSettings.d.ts +1 -15
  3. package/dist/configureSettings.js +13 -9
  4. package/dist/configureSettings.js.map +1 -1
  5. package/dist/index.d.ts +18 -6
  6. package/dist/index.js +28 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/lib/accessInformation/isValidAccessInformation.js +1 -0
  9. package/dist/lib/accessInformation/isValidAccessInformation.js.map +1 -1
  10. package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js +1 -0
  11. package/dist/lib/checkTitleAndSnippetSearchability/checkTitleAndSnippetSearchability.js.map +1 -1
  12. package/dist/lib/config.d.ts +5 -0
  13. package/dist/lib/config.js +37 -1
  14. package/dist/lib/config.js.map +1 -1
  15. package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js +1 -0
  16. package/dist/lib/deleteProtection/isDeleteProtectionEnabled.js.map +1 -1
  17. package/dist/lib/deprecated/isDeprecated.js +1 -0
  18. package/dist/lib/deprecated/isDeprecated.js.map +1 -1
  19. package/dist/lib/description/isValidDescription.js +1 -0
  20. package/dist/lib/description/isValidDescription.js.map +1 -1
  21. package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.d.ts +10 -0
  22. package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js +52 -0
  23. package/dist/lib/featureServiceCDNSetting/checkFeatureServiceCDNSetting.js.map +1 -0
  24. package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.d.ts +8 -0
  25. package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js +54 -0
  26. package/dist/lib/featureServiceExportDataSetting/checkFeatureServiceExportSetting.js.map +1 -0
  27. package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.d.ts +16 -0
  28. package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js +83 -0
  29. package/dist/lib/featureServiceExtents/checkFeatureServiceExtents.js.map +1 -0
  30. package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.d.ts +17 -0
  31. package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js +33 -0
  32. package/dist/lib/featureServiceExtents/checkFeatureServiceExtentsHelpers.js.map +1 -0
  33. package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js +1 -0
  34. package/dist/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.js.map +1 -1
  35. package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js +1 -0
  36. package/dist/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.js.map +1 -1
  37. package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.d.ts +10 -0
  38. package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js +53 -0
  39. package/dist/lib/featureServiceFieldIndexes/checkFeatureServiceFieldIndexes.js.map +1 -0
  40. package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.d.ts +7 -0
  41. package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js +27 -0
  42. package/dist/lib/featureServiceFieldIndexes/featureServiceFieldIndexesHelpers.js.map +1 -0
  43. package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js +1 -0
  44. package/dist/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.js.map +1 -1
  45. package/dist/lib/itemExtent/checkItemExtent.d.ts +27 -0
  46. package/dist/lib/itemExtent/checkItemExtent.js +102 -0
  47. package/dist/lib/itemExtent/checkItemExtent.js.map +1 -0
  48. package/dist/lib/itemExtent/checkItemExtentHelpers.d.ts +38 -0
  49. package/dist/lib/itemExtent/checkItemExtentHelpers.js +132 -0
  50. package/dist/lib/itemExtent/checkItemExtentHelpers.js.map +1 -0
  51. package/dist/lib/itemExtent/scoringConfig.d.ts +9 -0
  52. package/dist/lib/itemExtent/scoringConfig.js +13 -0
  53. package/dist/lib/itemExtent/scoringConfig.js.map +1 -0
  54. package/dist/lib/licenseInfo/isValidLicenseInfo.js +1 -0
  55. package/dist/lib/licenseInfo/isValidLicenseInfo.js.map +1 -1
  56. package/dist/lib/sharing/isValidAccess.js +1 -0
  57. package/dist/lib/sharing/isValidAccess.js.map +1 -1
  58. package/dist/lib/ssl/isValidSSL.js +3 -0
  59. package/dist/lib/ssl/isValidSSL.js.map +1 -1
  60. package/dist/lib/summary/isValidSummary.js +1 -0
  61. package/dist/lib/summary/isValidSummary.js.map +1 -1
  62. package/dist/lib/tags/isValidTags.js +1 -0
  63. package/dist/lib/tags/isValidTags.js.map +1 -1
  64. package/dist/lib/thumbnail/isValidThumbnail.js +1 -0
  65. package/dist/lib/thumbnail/isValidThumbnail.js.map +1 -1
  66. package/dist/lib/title/isValidTitle.js +1 -0
  67. package/dist/lib/title/isValidTitle.js.map +1 -1
  68. package/dist/lib/userProfileDescription/isValidUserProfileDescription.js +1 -0
  69. package/dist/lib/userProfileDescription/isValidUserProfileDescription.js.map +1 -1
  70. package/dist/lib/userProfileName/isValidUserProfileName.js +1 -0
  71. package/dist/lib/userProfileName/isValidUserProfileName.js.map +1 -1
  72. package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js +1 -0
  73. package/dist/lib/userProfileThumbnail/isValidUserProfileThumbnail.js.map +1 -1
  74. package/dist/lib/util/isFeatureService.d.ts +6 -0
  75. package/dist/lib/util/isFeatureService.js +21 -1
  76. package/dist/lib/util/isFeatureService.js.map +1 -1
  77. package/dist/lib/util/shouldValidateByBetaRules.d.ts +0 -1
  78. package/dist/lib/util/shouldValidateByBetaRules.js +27 -26
  79. package/dist/lib/util/shouldValidateByBetaRules.js.map +1 -1
  80. package/dist/lib/util/stringsConfig.d.ts +5 -1
  81. package/dist/lib/util/stringsConfig.js +60 -22
  82. package/dist/lib/util/stringsConfig.js.map +1 -1
  83. package/dist/lib/validate/validate.d.ts +14 -2
  84. package/dist/lib/validate/validate.js +28 -1
  85. package/dist/lib/validate/validate.js.map +1 -1
  86. package/dist/locale/en.json +49 -6
  87. package/dist/package-info.json +1 -1
  88. package/dist/services/feature-service/fetchFeatureServiceAdminJSON.d.ts +14 -0
  89. package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js +57 -0
  90. package/dist/services/feature-service/fetchFeatureServiceAdminJSON.js.map +1 -0
  91. package/dist/services/feature-service/fetchFeatureServiceRootJSON.d.ts +16 -0
  92. package/dist/services/feature-service/fetchFeatureServiceRootJSON.js +84 -0
  93. package/dist/services/feature-service/fetchFeatureServiceRootJSON.js.map +1 -0
  94. package/dist/types/index.d.ts +179 -2
  95. package/dist/types/index.js +5 -0
  96. package/dist/types/index.js.map +1 -1
  97. package/package.json +2 -2
  98. package/dist/locale/de.json +0 -201
  99. package/dist/locale/es.json +0 -201
  100. package/dist/locale/fr.json +0 -201
  101. package/dist/locale/ja.json +0 -201
  102. package/dist/locale/pt-br.json +0 -201
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFeatureService = void 0;
3
+ exports.isFeatureTable = exports.isFeatureService = void 0;
4
4
  /**
5
5
  * Determines if the given item is a Feature Layer.
6
6
  *
@@ -18,4 +18,24 @@ const isFeatureService = (item) => {
18
18
  return false;
19
19
  };
20
20
  exports.isFeatureService = isFeatureService;
21
+ /**
22
+ * Determines if the given item is a Feature Table.
23
+ * @param item - The ArcGIS item to check.
24
+ * @returns `true` if the item is a Feature Table, otherwise `false`.
25
+ */
26
+ const isFeatureTable = (item) => {
27
+ if (!item || !(item === null || item === void 0 ? void 0 : item.type)) {
28
+ return false;
29
+ }
30
+ if ((0, exports.isFeatureService)(item) === false) {
31
+ return false;
32
+ }
33
+ const typeKeywords = (item === null || item === void 0 ? void 0 : item.typeKeywords) || [];
34
+ // Check if the item is a feature table
35
+ if (typeKeywords.includes('Table')) {
36
+ return true;
37
+ }
38
+ return false;
39
+ };
40
+ exports.isFeatureTable = isFeatureTable;
21
41
  //# sourceMappingURL=isFeatureService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isFeatureService.js","sourceRoot":"","sources":["../../../src/lib/util/isFeatureService.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAW,EAAW,EAAE;IACrD,IAAI,CAAC,IAAI,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAA,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,uCAAuC;IACvC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,iBAAiB,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B"}
1
+ {"version":3,"file":"isFeatureService.js","sourceRoot":"","sources":["../../../src/lib/util/isFeatureService.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,IAAW,EAAW,EAAE;IACrD,IAAI,CAAC,IAAI,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAA,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,uCAAuC;IACvC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,iBAAiB,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B;AAEF;;;;GAIG;AACI,MAAM,cAAc,GAAG,CAAC,IAAW,EAAW,EAAE;IACnD,IAAI,CAAC,IAAI,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAA,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,IAAA,wBAAgB,EAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;QACnC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,YAAY,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,KAAI,EAAE,CAAC;IAE9C,uCAAuC;IACvC,IAAI,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAjBW,QAAA,cAAc,kBAiBzB"}
@@ -1,5 +1,4 @@
1
1
  import { IItem } from '../../types';
2
- export declare const esriOwners: string[];
3
2
  /**
4
3
  * Determine if the item qualifies for validation under beta rules.
5
4
  * Beta rules are applied to items owned by Esri and other specific accounts decided by Jim Herries.
@@ -1,30 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldValidateByBetaRules = exports.esriOwners = void 0;
4
- exports.esriOwners = [
5
- 'esri',
6
- 'Federal_User_Community',
7
- 'esri_Landscape',
8
- 'esri_dm',
9
- 'AtlasPublisher',
10
- 'StoryMaps',
11
- 'esri_basemaps',
12
- 'UOdocent',
13
- 'esri_vector',
14
- 'esri_livefeeds',
15
- 'esri_oceans',
16
- 'esri_demographics',
17
- 'esri_observations',
18
- 'esri_landscape2',
19
- 'Esri_GI',
20
- 'esri_livefeeds2',
21
- 'esri_analytics',
22
- 'esri_imagery',
23
- 'Esri_US_Federal_Data',
24
- 'esri_environment',
25
- 'esri_webstyles',
26
- 'esri_elevation',
27
- ];
3
+ exports.shouldValidateByBetaRules = void 0;
4
+ const config_1 = require("../config");
5
+ // export const esriOwners: string[] = [
6
+ // 'esri',
7
+ // 'Federal_User_Community',
8
+ // 'esri_Landscape',
9
+ // 'esri_dm',
10
+ // 'AtlasPublisher',
11
+ // 'StoryMaps',
12
+ // 'esri_basemaps',
13
+ // 'UOdocent',
14
+ // 'esri_vector',
15
+ // 'esri_livefeeds',
16
+ // 'esri_oceans',
17
+ // 'esri_demographics',
18
+ // 'esri_observations',
19
+ // 'esri_landscape2',
20
+ // 'Esri_GI',
21
+ // 'esri_livefeeds2',
22
+ // 'esri_analytics',
23
+ // 'esri_imagery',
24
+ // 'Esri_US_Federal_Data',
25
+ // 'esri_environment',
26
+ // 'esri_webstyles',
27
+ // 'esri_elevation',
28
+ // ];
28
29
  const additonalAccounts = [
29
30
  'lisa_berry',
30
31
  'stevenaviles_livingatlas',
@@ -51,7 +52,7 @@ const shouldValidateByBetaRules = (item) => {
51
52
  if (!owner) {
52
53
  return false;
53
54
  }
54
- return (exports.esriOwners.includes(owner) ||
55
+ return (config_1.ESRI_OFFICIAL_ACCOUNTS.includes(owner) ||
55
56
  additonalAccounts.includes(owner) ||
56
57
  additonalAccountsDevext.includes(owner));
57
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"shouldValidateByBetaRules.js","sourceRoot":"","sources":["../../../src/lib/util/shouldValidateByBetaRules.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAa;IAChC,MAAM;IACN,wBAAwB;IACxB,gBAAgB;IAChB,SAAS;IACT,gBAAgB;IAChB,WAAW;IACX,eAAe;IACf,UAAU;IACV,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,mBAAmB;IACnB,mBAAmB;IACnB,iBAAiB;IACjB,SAAS;IACT,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,gBAAgB;CACnB,CAAC;AAEF,MAAM,iBAAiB,GAAG;IACtB,YAAY;IACZ,0BAA0B;IAC1B,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,gBAAgB;CACnB,CAAC;AAEF,MAAM,uBAAuB,GAAG;IAC5B,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,gBAAgB;CACnB,CAAC;AAEF;;;;;;GAMG;AACI,MAAM,yBAAyB,GAAG,CAAC,IAAW,EAAW,EAAE;IAC9D,MAAM,KAAK,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CACH,kBAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC1B,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QACjC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC1C,CAAC;AACN,CAAC,CAAC;AAZW,QAAA,yBAAyB,6BAYpC"}
1
+ {"version":3,"file":"shouldValidateByBetaRules.js","sourceRoot":"","sources":["../../../src/lib/util/shouldValidateByBetaRules.ts"],"names":[],"mappings":";;;AACA,sCAAmD;AAEnD,wCAAwC;AACxC,cAAc;AACd,gCAAgC;AAChC,wBAAwB;AACxB,iBAAiB;AACjB,wBAAwB;AACxB,mBAAmB;AACnB,uBAAuB;AACvB,kBAAkB;AAClB,qBAAqB;AACrB,wBAAwB;AACxB,qBAAqB;AACrB,2BAA2B;AAC3B,2BAA2B;AAC3B,yBAAyB;AACzB,iBAAiB;AACjB,yBAAyB;AACzB,wBAAwB;AACxB,sBAAsB;AACtB,8BAA8B;AAC9B,0BAA0B;AAC1B,wBAAwB;AACxB,wBAAwB;AACxB,KAAK;AAEL,MAAM,iBAAiB,GAAG;IACtB,YAAY;IACZ,0BAA0B;IAC1B,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,gBAAgB;CACnB,CAAC;AAEF,MAAM,uBAAuB,GAAG;IAC5B,aAAa;IACb,gBAAgB;IAChB,aAAa;IACb,gBAAgB;CACnB,CAAC;AAEF;;;;;;GAMG;AACI,MAAM,yBAAyB,GAAG,CAAC,IAAW,EAAW,EAAE;IAC9D,MAAM,KAAK,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC;IAE1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CACH,+BAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC;QACtC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QACjC,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC1C,CAAC;AACN,CAAC,CAAC;AAZW,QAAA,yBAAyB,6BAYpC"}
@@ -11,7 +11,7 @@ export type ValidationRulesStringJSON = typeof enStringsConfig;
11
11
  * Set user preferred language for output Strings JSON file that contains messages for validation results
12
12
  * @param preferredLocale
13
13
  */
14
- export declare const setStrings: (preferredLocale: string) => void;
14
+ export declare const setStrings: (customStringFile: ValidationRulesStringJSON) => void;
15
15
  /**
16
16
  * Get Strings Config data for user preferred language
17
17
  * @returns
@@ -22,3 +22,7 @@ export declare const getStringsConfig: () => ValidationRulesStringJSON;
22
22
  * @returns Default strings config
23
23
  */
24
24
  export declare const getDefaultStringsConfig: () => ValidationRulesStringJSON;
25
+ /**
26
+ * Reset custom strings to null (mainly for testing purposes)
27
+ */
28
+ export declare const resetStrings: () => void;
@@ -3,35 +3,66 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getDefaultStringsConfig = exports.getStringsConfig = exports.setStrings = void 0;
6
+ exports.resetStrings = exports.getDefaultStringsConfig = exports.getStringsConfig = exports.setStrings = void 0;
7
7
  // import config from '../config';
8
- const de_json_1 = __importDefault(require("../../locale/de.json"));
8
+ // import deStringsConfig from '../../locale/de.json';
9
9
  const en_json_1 = __importDefault(require("../../locale/en.json"));
10
- const es_json_1 = __importDefault(require("../../locale/es.json"));
11
- const fr_json_1 = __importDefault(require("../../locale/fr.json"));
12
- const ja_json_1 = __importDefault(require("../../locale/ja.json"));
13
- const pt_br_json_1 = __importDefault(require("../../locale/pt-br.json"));
10
+ // /**
11
+ // * Strings JSON language
12
+ // */
13
+ // let locale: Locale = 'en';
14
+ // const stringsByLocale: Record<Locale, ValidationRulesStringJSON> = {
15
+ // de: deStringsConfig,
16
+ // en: enStringsConfig,
17
+ // es: esStringsConfig,
18
+ // fr: frStringsConfig,
19
+ // ja: jaStringsConfig,
20
+ // 'pt-br': prBrStringsConfig,
21
+ // };
14
22
  /**
15
- * Strings JSON language
23
+ * Custom Strings JSON provided by user for preferred language.
16
24
  */
17
- let locale = 'en';
18
- const stringsByLocale = {
19
- de: de_json_1.default,
20
- en: en_json_1.default,
21
- es: es_json_1.default,
22
- fr: fr_json_1.default,
23
- ja: ja_json_1.default,
24
- 'pt-br': pt_br_json_1.default,
25
- };
25
+ let customStrings = null;
26
26
  /**
27
27
  * Set user preferred language for output Strings JSON file that contains messages for validation results
28
28
  * @param preferredLocale
29
29
  */
30
- const setStrings = (preferredLocale) => {
31
- const validLocales = ['en', 'de', 'es', 'fr', 'ja', 'pt-br'];
32
- locale = validLocales.includes(preferredLocale)
33
- ? preferredLocale
34
- : 'en';
30
+ const setStrings = (customStringFile) => {
31
+ // const validLocales: Locale[] = ['en', 'de', 'es', 'fr', 'ja', 'pt-br'];
32
+ // locale = validLocales.includes(preferredLocale as Locale)
33
+ // ? (preferredLocale as Locale)
34
+ // : 'en';
35
+ if (!customStringFile || typeof customStringFile !== 'object') {
36
+ console.warn(`Invalid custom strings file provided.`);
37
+ customStrings = null;
38
+ return;
39
+ }
40
+ // Create a deep copy to avoid mutating the input
41
+ const safeCustomStrings = JSON.parse(JSON.stringify(customStringFile));
42
+ for (const key in en_json_1.default) {
43
+ if (!(key in safeCustomStrings)) {
44
+ console.warn(`Missing key "${key}" in custom strings file. Reverting to default.`);
45
+ safeCustomStrings[key] =
46
+ en_json_1.default[key];
47
+ continue;
48
+ }
49
+ const enSubConfig = en_json_1.default[key];
50
+ const customSubConfig = safeCustomStrings[key];
51
+ // Add validation: ensure customSubConfig is an object
52
+ if (!customSubConfig || typeof customSubConfig !== 'object') {
53
+ console.warn(`Invalid structure for key "${key}". Reverting to default.`);
54
+ safeCustomStrings[key] = enSubConfig;
55
+ continue;
56
+ }
57
+ for (const subKey in enSubConfig) {
58
+ if (!(subKey in customSubConfig)) {
59
+ console.warn(`Missing sub-key "${subKey}" in custom strings file for key "${key}". Reverting to default.`);
60
+ customSubConfig[subKey] =
61
+ enSubConfig[subKey];
62
+ }
63
+ }
64
+ }
65
+ customStrings = safeCustomStrings;
35
66
  };
36
67
  exports.setStrings = setStrings;
37
68
  /**
@@ -39,7 +70,7 @@ exports.setStrings = setStrings;
39
70
  * @returns
40
71
  */
41
72
  const getStringsConfig = () => {
42
- return stringsByLocale[locale] || en_json_1.default;
73
+ return customStrings || en_json_1.default;
43
74
  };
44
75
  exports.getStringsConfig = getStringsConfig;
45
76
  /**
@@ -50,4 +81,11 @@ const getDefaultStringsConfig = () => {
50
81
  return en_json_1.default;
51
82
  };
52
83
  exports.getDefaultStringsConfig = getDefaultStringsConfig;
84
+ /**
85
+ * Reset custom strings to null (mainly for testing purposes)
86
+ */
87
+ const resetStrings = () => {
88
+ customStrings = null;
89
+ };
90
+ exports.resetStrings = resetStrings;
53
91
  //# sourceMappingURL=stringsConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stringsConfig.js","sourceRoot":"","sources":["../../../src/lib/util/stringsConfig.ts"],"names":[],"mappings":";;;;;;AAAA,kCAAkC;AAClC,mEAAmD;AACnD,mEAAmD;AACnD,mEAAmD;AACnD,mEAAmD;AACnD,mEAAmD;AACnD,yEAAwD;AAYxD;;GAEG;AACH,IAAI,MAAM,GAAW,IAAI,CAAC;AAE1B,MAAM,eAAe,GAA8C;IAC/D,EAAE,EAAE,iBAAe;IACnB,EAAE,EAAE,iBAAe;IACnB,EAAE,EAAE,iBAAe;IACnB,EAAE,EAAE,iBAAe;IACn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,EAAE;IAC5D,OAAO,aAAa,IAAI,iBAAe,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AAEF;;;GAGG;AACI,MAAM,uBAAuB,GAAG,GAA8B,EAAE;IACnE,OAAO,iBAAe,CAAC;AAC3B,CAAC,CAAC;AAFW,QAAA,uBAAuB,2BAElC;AAEF;;GAEG;AACI,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,aAAa,GAAG,IAAI,CAAC;AACzB,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
@@ -1,4 +1,4 @@
1
- import { FeatureLayerJSON, IItem, IUser, ValidationResult } from '../../types';
1
+ import { FeatureLayerJSON, FeatureServiceAdminJSON, FeatureServiceJSON, IItem, IUser, ValidationResult } from '../../types';
2
2
  type ValidateOptions = {
3
3
  /**
4
4
  * Custom patterns for location information.
@@ -29,6 +29,16 @@ type ValidateOptions = {
29
29
  * Used for validating field value types, aliases, and descriptions within those layers.
30
30
  */
31
31
  featureLayers?: FeatureLayerJSON[];
32
+ /**
33
+ * The JSON represents the administrative feature service resource that maintains a set of operations that manage the state and contents of the service.
34
+ */
35
+ featureServiceAdminJSON?: FeatureServiceAdminJSON;
36
+ /**
37
+ * The JSON represents the root resource of the feature service, providing basic information about the service.
38
+ * If the feature service admin JSON is not provided, this can be used for certain validations like checking initial and full extent of the service.
39
+ * If the feature service admin JSON is provided, this can be omitted as the admin JSON contains all the necessary information.
40
+ */
41
+ featureServiceRootJSON?: FeatureServiceJSON;
32
42
  };
33
43
  /**
34
44
  * Validates an ArcGIS item and user profile against Living Atlas criteria.
@@ -41,6 +51,8 @@ type ValidateOptions = {
41
51
  * @param options.customPatternsForSourceInfo - Custom patterns to check for source information
42
52
  * @param options.customPatternsForTopicInfo - Custom patterns to check for topic information
43
53
  * @param options.thumbnailDimension - Expected thumbnail dimensions
54
+ * @param options.featureLayers - An array of FeatureLayerJSON objects for feature service field validations
55
+ * @param options.featureServiceAdminJSON - The admin JSON of the Feature Service
44
56
  * @returns A ValidationResult object containing detailed validation results and an overall score
45
57
  *
46
58
  * The validation checks multiple aspects of the item including:
@@ -64,5 +76,5 @@ type ValidateOptions = {
64
76
  *
65
77
  * The result includes a total score and whether the item meets criteria for nomination.
66
78
  */
67
- export declare const validate: (item: IItem, userProfile: IUser, { customPatternsForLocationInfo, customPatternsForDataVintageInfo, customPatternsForSourceInfo, customPatternsForTopicInfo, thumbnailDimension, featureLayers, }?: ValidateOptions) => ValidationResult;
79
+ export declare const validate: (item: IItem, userProfile: IUser, { customPatternsForLocationInfo, customPatternsForDataVintageInfo, customPatternsForSourceInfo, customPatternsForTopicInfo, thumbnailDimension, featureLayers, featureServiceAdminJSON, featureServiceRootJSON, }?: ValidateOptions) => ValidationResult;
68
80
  export {};
@@ -22,6 +22,11 @@ const validateHelpers_1 = require("./validateHelpers");
22
22
  const checkFeatureServiceFieldValueTypes_1 = require("../featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes");
23
23
  const checkFeatureServiceFieldAliases_1 = require("../featureServiceFieldAliases/checkFeatureServiceFieldAliases");
24
24
  const checkFeatureServiceFieldDescriptions_1 = require("../featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions");
25
+ const checkItemExtent_1 = require("../itemExtent/checkItemExtent");
26
+ const checkFeatureServiceCDNSetting_1 = require("../featureServiceCDNSetting/checkFeatureServiceCDNSetting");
27
+ const checkFeatureServiceExportSetting_1 = require("../featureServiceExportDataSetting/checkFeatureServiceExportSetting");
28
+ const checkFeatureServiceFieldIndexes_1 = require("../featureServiceFieldIndexes/checkFeatureServiceFieldIndexes");
29
+ const checkFeatureServiceExtents_1 = require("../featureServiceExtents/checkFeatureServiceExtents");
25
30
  /**
26
31
  * Validates an ArcGIS item and user profile against Living Atlas criteria.
27
32
  *
@@ -33,6 +38,8 @@ const checkFeatureServiceFieldDescriptions_1 = require("../featureServiceFieldDe
33
38
  * @param options.customPatternsForSourceInfo - Custom patterns to check for source information
34
39
  * @param options.customPatternsForTopicInfo - Custom patterns to check for topic information
35
40
  * @param options.thumbnailDimension - Expected thumbnail dimensions
41
+ * @param options.featureLayers - An array of FeatureLayerJSON objects for feature service field validations
42
+ * @param options.featureServiceAdminJSON - The admin JSON of the Feature Service
36
43
  * @returns A ValidationResult object containing detailed validation results and an overall score
37
44
  *
38
45
  * The validation checks multiple aspects of the item including:
@@ -56,7 +63,7 @@ const checkFeatureServiceFieldDescriptions_1 = require("../featureServiceFieldDe
56
63
  *
57
64
  * The result includes a total score and whether the item meets criteria for nomination.
58
65
  */
59
- const validate = (item, userProfile, { customPatternsForLocationInfo, customPatternsForDataVintageInfo, customPatternsForSourceInfo, customPatternsForTopicInfo, thumbnailDimension, featureLayers, } = {}) => {
66
+ const validate = (item, userProfile, { customPatternsForLocationInfo, customPatternsForDataVintageInfo, customPatternsForSourceInfo, customPatternsForTopicInfo, thumbnailDimension, featureLayers, featureServiceAdminJSON, featureServiceRootJSON, } = {}) => {
60
67
  // const { type } = item;
61
68
  const isSupportedItemType = (0, getLivingAtlasSupportedItemTypes_1.checkIsLivingAtlasSupportedItemType)(item);
62
69
  // create a copy of the item to avoid mutating the original item
@@ -85,11 +92,24 @@ const validate = (item, userProfile, { customPatternsForLocationInfo, customPatt
85
92
  const featureServiceFieldAliases = (0, checkFeatureServiceFieldAliases_1.checkFeatureServiceFieldAliases)(copyOfItem, featureLayers || []);
86
93
  const featureServiceFieldValueTypes = (0, checkFeatureServiceFieldValueTypes_1.checkFeatureServiceFieldValueTypes)(copyOfItem, featureLayers || []);
87
94
  const featureServiceFieldDescriptions = (0, checkFeatureServiceFieldDescriptions_1.checkFeatureServiceFieldDescriptions)(copyOfItem, featureLayers || []);
95
+ // Validate item extent
96
+ const itemExtent = (0, checkItemExtent_1.checkItemExtent)(copyOfItem);
88
97
  const userProfileDescription = (0, isValidUserProfileDescription_1.isValidUserProfileDescription)(copyOfUserProfile
89
98
  // item
90
99
  );
91
100
  const userProfileFullName = (0, isValidUserProfileName_1.isValidUserProfileName)(copyOfUserProfile);
92
101
  const userProfileThumbnail = (0, isValidUserProfileThumbnail_1.isValidUserProfileThumbnail)(copyOfUserProfile);
102
+ // check feature service CDN setting advisory
103
+ const featureServiceCdnSetting = (0, checkFeatureServiceCDNSetting_1.checkFeatureServiceCDNSetting)(copyOfItem, featureServiceAdminJSON);
104
+ // check feature service export data setting advisory
105
+ const featureServiceExportDataSetting = (0, checkFeatureServiceExportSetting_1.checkFeatureServiceExportSetting)(copyOfItem, featureServiceAdminJSON);
106
+ // check feature service field indexes advisory
107
+ const featureServiceFieldIndexes = (0, checkFeatureServiceFieldIndexes_1.checkFeatureServiceFieldIndexes)(copyOfItem, featureLayers || []);
108
+ const featureServiceExtents = (0, checkFeatureServiceExtents_1.checkFeatureServiceExtents)(copyOfItem, {
109
+ layers: featureLayers || [],
110
+ featureServiceAdminJSON,
111
+ featureServiceRootJSON,
112
+ });
93
113
  // Assigns final scores and statuses to each validation result within the given validation result object
94
114
  const validationResult = (0, validateHelpers_1.assignFinalScoresAndStatus)({
95
115
  validatedItem: {
@@ -109,12 +129,19 @@ const validate = (item, userProfile, { customPatternsForLocationInfo, customPatt
109
129
  featureServiceFieldAliases,
110
130
  featureServiceFieldValueTypes,
111
131
  featureServiceFieldDescriptions,
132
+ itemExtent,
112
133
  },
113
134
  validatedProfile: {
114
135
  userProfileDescription,
115
136
  userProfileFullName,
116
137
  userProfileThumbnail,
117
138
  },
139
+ advisories: {
140
+ featureServiceCdnSetting,
141
+ featureServiceFieldIndexes,
142
+ featureServiceExportDataSetting,
143
+ featureServiceExtents,
144
+ },
118
145
  id: item === null || item === void 0 ? void 0 : item.id,
119
146
  totalScore: 0,
120
147
  canBeNominated: false,
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/lib/validate/validate.ts"],"names":[],"mappings":";;;AA6BA,6FAA0F;AAC1F,8HAA2H;AAC3H,4DAAyD;AACzD,4FAAyF;AACzF,0EAAuE;AACvE,mEAAmE;AACn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AAK;KACxB,EACD,mBAAmB,CACtB,CAAC;IAEF,2CAA2C;IAC3C,gBAAgB,CAAC,UAAU,GAAG,IAAA,+BAAa,EACvC,gBAAgB,EAChB,mBAAmB,CACtB,CAAC;IAEF,6FAA6F;IAC7F,gBAAgB,CAAC,cAAc,GAAG,IAAA,wCAAsB,EACpD,gBAAgB,EAChB,mBAAmB,CACtB,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AAhHW,QAAA,QAAQ,YAgHnB"}
1
+ {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/lib/validate/validate.ts"],"names":[],"mappings":";;;AA+BA,6FAA0F;AAC1F,8HAA2H;AAC3H,4DAAyD;AACzD,4FAAyF;AACzF,0EAAuE;AACvE,mEAAmE;AACnE,0EAAuE;AACvE,8DAA2D;AAC3D,kDAA+C;AAC/C,qDAAkD;AAClD,oEAAiE;AACjE,wDAAqD;AACrD,6DAA0D;AAC1D,2GAAwG;AACxG,sFAAmF;AACnF,qGAAkG;AAClG,+FAA+F;AAC/F,uDAI2B;AAC3B,4HAAyH;AACzH,mHAAgH;AAChH,kIAA+H;AAC/H,mEAAgE;AAChE,6GAA0G;AAC1G,0HAAuH;AACvH,mHAAgH;AAChH,oGAAiG;AA4CjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACI,MAAM,QAAQ,GAAG,CACpB,IAAW,EACX,WAAkB,EAClB,EACI,6BAA6B,EAC7B,gCAAgC,EAChC,2BAA2B,EAC3B,0BAA0B,EAC1B,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,sBAAsB,MACL,EAAE,EACP,EAAE;IAClB,yBAAyB;IAEzB,MAAM,mBAAmB,GAAG,IAAA,sEAAmC,EAAC,IAAI,CAAC,CAAC;IAEtE,gEAAgE;IAChE,MAAM,UAAU,qBAAQ,IAAI,CAAE,CAAC;IAC/B,gFAAgF;IAChF,MAAM,iBAAiB,qBAAQ,WAAW,CAAE,CAAC;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,CAAC;IAEF,2CAA2C;IAC3C,gBAAgB,CAAC,UAAU,GAAG,IAAA,+BAAa,EACvC,gBAAgB,EAChB,mBAAmB,CACtB,CAAC;IAEF,6FAA6F;IAC7F,gBAAgB,CAAC,cAAc,GAAG,IAAA,wCAAsB,EACpD,gBAAgB,EAChB,mBAAmB,CACtB,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AApJW,QAAA,QAAQ,YAoJnB"}
@@ -172,8 +172,8 @@
172
172
  "ADD_TOPIC_INFO": "Add topic to communicate what this item is about."
173
173
  },
174
174
  "featureLayerFieldAliases": {
175
- "GUIDANCE_DEFAULT": "<p>By default, most layers start out using the field <strong>Names</strong> as the field <strong>Aliases</strong>, making them identical. This puts the burden on each user to translate each Field Name to a useful Field Alias (sometimes shown as Display Name). If, as the the owner of this item, you provide Field Aliases now, it cumulatively saves hundreds or thousands of hours of work for others who find your layer and want to use it. By putting this additional metadata &quot;on board&quot; the layer, users do not have to go find that information in metadata documents since the information is already present. As a result, each user can learn what this field represents simply by reading the Field Alias in all the places where it appears: map legend, pop-up, data table, all interfaces where the user is asked to choose a field.</p><br/><p>From the item page, go to the <strong>Data</strong> tab, click on <strong>Fields</strong> button, and click on the first field under the column <strong>Display Name</strong>. To edit the <strong>Field Alias</strong> (also referred to as <strong>Display Name</strong>), click the pencil button and enter an easy to understand Field Alias / Display Name. Tip: copy/paste content from a data dictionary, an official metadata document or PDF that describes each field.</p><br/><p><strong>Examples:</strong> in the Field Alias text, change &quot;LASTEDITOR&quot; to &quot;Last Editor&quot;; change &quot;FEATURECODE&quot; to &quot;Facility Site Code&quot;; change &quot;NUMSTORIES&quot; to &quot;Number of Stories.&quot; Note how the Field Name remains unchanged.</p>",
176
- "SCORING_MSG_DEFAULT": "Points are awarded if 90% of Field Aliases (Display Names) are edited such that they are no longer identical to the Field Names.",
175
+ "GUIDANCE_DEFAULT": "<p>By default, most layers start out using the field <strong>Names</strong> as the field <strong>Aliases</strong>, making them identical. This puts the burden on each user to translate each Field Name to a useful Field Alias (sometimes shown as Display Name). If, as the the owner of this item, you provide Field Aliases now, it cumulatively saves hundreds or thousands of hours of work for others who find your layer and want to use it. By putting this additional metadata &quot;on board&quot; the layer, users do not have to go find that information in metadata documents since the information is already present. As a result, each user can learn what this field represents simply by reading the Field Alias in all the places where it appears: map legend, pop-up, data table, all interfaces where the user is asked to choose a field.</p><br/><p>From the item page, go to the <strong>Data</strong> tab, click on <strong>Fields</strong> button, and click on the first field under the column <strong>Display Name</strong>. To edit the <strong>Field Alias</strong> (also referred to as <strong>Display Name</strong>), click the pencil button and enter an easy to understand Field Alias / Display Name. Tip: copy/paste content from a data dictionary, an official metadata document or PDF that describes each field.</p><br/><p><strong>Examples:</strong> in the Field Alias text, change &quot;LASTEDITOR&quot; to &quot;Last Editor&quot;; change &quot;FEATURECODE&quot; to &quot;Facility Site Code&quot;; change &quot;NUMSTORIES&quot; to &quot;Number of Stories.&quot; Note how the Field Name remains unchanged.</p><br/><p>If your item has more than one layer, you will need to set Field Aliases on each layer.</p>",
176
+ "SCORING_MSG_DEFAULT": "Points are awarded if 90% of Field Aliases (Display Names) are edited such that they are no longer identical to the Field Names. If your item has more than one layer, be sure to edit all layers.",
177
177
  "LABEL": "Improve Field Aliases",
178
178
  "TITLE": "Check Field Aliases",
179
179
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature service.",
@@ -181,8 +181,8 @@
181
181
  "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate."
182
182
  },
183
183
  "featureLayerFieldTypes": {
184
- "GUIDANCE_DEFAULT": "<p>To help users and client apps identify how field values should be used or represented, define the types of values that are stored in each attribute field in a hosted feature layer. For example, if you define a text field as a phone number, client apps can format the text in the appropriate manner, such as (123) 456-7890. ArcGIS Online uses field value types to show you the most relevant options when drawing a layer in a map or configuring pop-ups. See the <a href=\"https://doc.arcgis.com/en/arcgis-online/manage-data/describe-fields.htm\" target=\"_blank\">Field Value Types listed here</a>.</p><br/><p>By default, a layer usually does not contain a <strong>Field Value Type</strong> on its attribute fields. This is a missed opportunity to share additional context about what type of value is stored in the field. This puts the burden on each user to go find a metadata document, if available, so that they can learn what exactly is stored in that field. If, as the the owner of this item, you provide Field Value Types now, it cumulatively saves hundreds or thousands of hours of work for others who find your layer and want to use it. By putting this additional metadata \"on board\" the layer, users do not have to go find that information in metadata documents since the information is already present. As a result, each user can learn a key detail about what this field represents simply by reading the Field Value Type in all the places where it appears, e.g. when the user clicks on a field information button. It also helps software developers to detect whether a field value will contain a count, percent, measurement etc.</p><br/><p>From the item page, go to the <strong>Data</strong> tab, click on <strong>Fields</strong> button, and click on the first field under the column <strong>Display Name</strong>. To edit the <strong>Field Value Type</strong>, click the pencil button and edit the Field Value Type so that it represents what kinds of values the field contains.</p>",
185
- "SCORING_MSG_DEFAULT": "Points are awarded if 90% of Field Value Types are set to a value.",
184
+ "GUIDANCE_DEFAULT": "<p>To help users and client apps identify how field values should be used or represented, define the types of values that are stored in each attribute field in a hosted feature layer. For example, if you define a text field as a phone number, client apps can format the text in the appropriate manner, such as (123) 456-7890. ArcGIS Online uses field value types to show you the most relevant options when drawing a layer in a map or configuring pop-ups. See the <a href=\"https://doc.arcgis.com/en/arcgis-online/manage-data/describe-fields.htm\" target=\"_blank\">Field Value Types listed here</a>.</p><br/><p>By default, a layer usually does not contain a <strong>Field Value Type</strong> on its attribute fields. This is a missed opportunity to share additional context about what type of value is stored in the field. This puts the burden on each user to go find a metadata document, if available, so that they can learn what exactly is stored in that field. If, as the owner of this item, you provide Field Value Types now, it cumulatively saves hundreds or thousands of hours of work for others who find your layer and want to use it. By putting this additional metadata \"on board\" the layer, users do not have to go find that information in metadata documents since the information is already present. As a result, each user can learn a key detail about what this field represents simply by reading the Field Value Type in all the places where it appears, e.g. when the user clicks on a field information button. It also helps software developers to detect whether a field value will contain a count, percent, measurement etc.</p><br/><p>From the item page, go to the <strong>Data</strong> tab, click on <strong>Fields</strong> button, and click on the first field under the column <strong>Display Name</strong>. To edit the <strong>Field Value Type</strong>, click the pencil button and edit the Field Value Type so that it represents what kinds of values the field contains.</p><br/><p>If your item has more than one layer, you will need to set Field Value Types on each layer.</p",
185
+ "SCORING_MSG_DEFAULT": "Points are awarded if 90% of Field Value Types are set to a value. If your item has more than one layer, be sure to edit all layers.",
186
186
  "LABEL": "Improve Field Value Types",
187
187
  "TITLE": "Check Field Value Types",
188
188
  "IMRPOVE_FIELD_TYPE": "Improve field value types in your feature service.",
@@ -190,12 +190,55 @@
190
190
  "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate."
191
191
  },
192
192
  "featureLayerFieldDescriptions": {
193
- "GUIDANCE_DEFAULT": "<p>By default, a layer usually does not contain a <strong>Field Description</strong> on its attribute fields. This puts the burden on each user to go find a metadata document, if available, so that they can learn what exactly is stored in that field. If, as the the owner of this item, you provide Field Descriptions now, it cumulatively saves hundreds or thousands of hours of work for others who find your layer and want to use it. By putting this additional metadata &quot;on board&quot; the layer, users do not have to go find that information in metadata documents since the information is already present. As a result, each user can learn the details about what this field represents simply by reading the Field Description in all the places where it appears, e.g. when the user clicks on a field information button.</p><br/><p>From the item page, go to the <strong>Data</strong> tab, click on <strong>Fields</strong> button, and click on the first field under the column <strong>Display Name</strong>. To edit the <strong>Field Description</strong>, click the pencil button and edit the description so that it explains what the field contains. Tip: copy/paste content from a data dictionary, an official metadata document or PDF that describes each field.</p>",
194
- "SCORING_MSG_DEFAULT": "Points are awarded if 90% of Field Descriptions contain a sentence or more of information describing the attribute. The Field Description must be different than the field alias.",
193
+ "GUIDANCE_DEFAULT": "<p>By default, a layer usually does not contain a <strong>Field Description</strong> on its attribute fields. This puts the burden on each user to go find a metadata document, if available, so that they can learn what exactly is stored in that field. If, as the the owner of this item, you provide Field Descriptions now, it cumulatively saves hundreds or thousands of hours of work for others who find your layer and want to use it. By putting this additional metadata &quot;on board&quot; the layer, users do not have to go find that information in metadata documents since the information is already present. As a result, each user can learn the details about what this field represents simply by reading the Field Description in all the places where it appears, e.g. when the user clicks on a field information button.</p><br/><p>From the item page, go to the <strong>Data</strong> tab, click on <strong>Fields</strong> button, and click on the first field under the column <strong>Display Name</strong>. To edit the <strong>Field Description</strong>, click the pencil button and edit the description so that it explains what the field contains. Tip: copy/paste content from a data dictionary, an official metadata document or PDF that describes each field.</p><br/><p>If your item has more than one layer, you will need to set Field Descriptions on each layer.</p>",
194
+ "SCORING_MSG_DEFAULT": "Points are awarded if 90% of Field Descriptions contain a sentence or more of information describing the attribute. The Field Description must be different than the field alias. If your item has more than one layer, be sure to edit all layers.",
195
195
  "LABEL": "Improve Field Descriptions",
196
196
  "TITLE": "Check Field Descriptions",
197
197
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature service.",
198
198
  "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table.",
199
199
  "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate."
200
+ },
201
+ "itemExtent": {
202
+ "GUIDANCE_DEFAULT": "The item extent defines the bounding rectangle of the item. It is primarily used in search results whenever a user chooses to search based on current map extent. Extent values should always be in WGS84. The item extent is shown visually so that you can confirm it is set correctly for this item.",
203
+ "SCORING_MSG_DEFAULT": "Points are awarded if the item has a valid extent.",
204
+ "LABEL": "Set a valid item extent",
205
+ "TITLE": "Check Item Extent",
206
+ "NO_EXTENT_MESSAGE": "Extent is not set. Set a valid item extent.",
207
+ "INVALID_EXTENT_MESSAGE": "Extent is not valid. Set a valid item extent.",
208
+ "EXTENT_OUT_OF_RANGE_MESSAGE": "Extent is out of range. Update the item extent to a more appropriate value.",
209
+ "EXTENT_NOT_RECTANGLE_MESSAGE": "Extent is not a rectangle. Update the item extent to a valid rectangle.",
210
+ "EXTENT_IS_POINT_MESSAGE": "Extent is a point. Update the item extent to a more appropriate value.",
211
+ "EXTENT_SET_TO_WORLD_MESSAGE": "Extent is set to the world. Update the item extent to a more appropriate value."
212
+ },
213
+ "featureServiceCDNSetting": {
214
+ "GUIDANCE_DEFAULT": "When a layer is shared publicly, it is cached by a Content Delivery Network (CDN). Using a CDN enhances performance and scalability by delivering content from servers geographically closer to users, significantly reducing latency. If the data is not changing daily, it is recommended to set the cache duration to the maximum (one hour) for best performance.",
215
+ "SCORING_MSG_DEFAULT": "This is an advisory check that does not impact the overall score.",
216
+ "LABEL": "Enable Feature Service CDN Cache",
217
+ "TITLE": "Check CDN Setting",
218
+ "CDN_NOT_ENABLED_MESSAGE": "Enable CDN for the feature service to improve performance and scalability."
219
+ },
220
+ "featureServiceExportDataSetting": {
221
+ "GUIDANCE": "Enabling data export allows others to export the data from your feature service to other formats (e.g. CSV, File Geodatabase, GeoJSON, etc.). Verify that this setting is correct and that it complies with your organization's data sharing, licensing, and privacy policies.",
222
+ "SCORING": "This is an advisory check that does not impact the overall score.",
223
+ "LABEL": "Verify Feature Service Data Export Setting",
224
+ "TITLE": "Check Data Export Setting",
225
+ "EXPORT_DATA_ENABLED_MESSAGE": "Data export is enabled. Confirm this setting is intentional and that it complies with your organization's data sharing, licensing, and privacy policies."
226
+ },
227
+ "featureServiceFieldIndexes": {
228
+ "GUIDANCE": "Field indexes improve the performance of queries and operations on large datasets. By indexing frequently queried fields, you can significantly speed up data retrieval times and enhance overall application performance. It is recommended to review your feature service's fields and add indexes to those that are commonly used in queries, filters, or sorting operations.",
229
+ "SCORING": "This is an advisory check that does not impact the overall score.",
230
+ "LABEL": "Improve Feature Service Field Indexes",
231
+ "TITLE": "Check Field Indexes",
232
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table.",
233
+ "IMRPOVE_FIELD_INDEXES": "No non-system generated field indexes found in layer '{{layerName}}'. Consider adding field indexes to frequently queried fields to improve performance."
234
+ },
235
+ "featureServiceExtents": {
236
+ "GUIDANCE": "<p>This advisory check examines your REST endpoint. A feature layer item points to a REST endpoint, which has an Initial Extent and Full Extent on its service, and an Extent on each sublayer in that service. Review each extent in the “Select Extent” option below to ensure your extents are what you would expect.</p><br/><p>If a sublayer is missing an Extent, that layer will cause an error in any geoprocessing tool or function.</p><br/><p>If the service is missing an Initial Extent or Full Extent, that may have negative impacts in apps.</p>",
237
+ "SCORING": "This is an advisory check that does not impact the overall score. Make sure all extents are populated.",
238
+ "LABEL": "Verify Feature Service Extents",
239
+ "TITLE": "Check Feature Service Extents",
240
+ "FULL_EXTENT_ISSUE_MESSAGE": "The Full Extent of the Feature Service is not set or is invalid.",
241
+ "INITIAL_EXTENT_ISSUE_MESSAGE": "The Initial Extent of the Feature Service is not set or is invalid.",
242
+ "LAYER_EXTENT_ISSUE_MESSAGE": "The Extent of layer '{{layerName}}' is not set or is invalid."
200
243
  }
201
244
  }
@@ -1 +1 @@
1
- {"lastCompiledTime":1750786361701}
1
+ {"lastCompiledTime":1764869234420}
@@ -0,0 +1,14 @@
1
+ import { FeatureServiceAdminJSON, IItem } from '../../types';
2
+ /**
3
+ * Fetches the admin JSON of a feature service. This resource provides basic information about the feature service including the feature layers and tables that it contains, the service description, etc.
4
+ * The administrative feature service resource maintains a set of operations that manage the state and contents of the service.
5
+ *
6
+ * @param item - The item representing the feature service.
7
+ * @param token - The token for authentication.
8
+ * @param bypassCache - Whether to bypass the cache (default is false). If true, a query timestamp is added to the request to bypass any cached responses.
9
+ * @returns A promise that resolves to a FeatureServiceAdminJSON object.
10
+ * @throws An error if the item is not a feature service or if the URL is not found.
11
+ *
12
+ * @see https://developers.arcgis.com/rest/services-reference/enterprise/hosted-feature-service/#json-response-syntax
13
+ */
14
+ export declare const fetchFeatureServiceAdminJSON: (item: IItem, token: string, bypassCache?: boolean) => Promise<FeatureServiceAdminJSON>;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.fetchFeatureServiceAdminJSON = void 0;
13
+ const isFeatureService_1 = require("../../lib/util/isFeatureService");
14
+ const getFeatureServerURL_1 = require("./getFeatureServerURL");
15
+ /**
16
+ * Fetches the admin JSON of a feature service. This resource provides basic information about the feature service including the feature layers and tables that it contains, the service description, etc.
17
+ * The administrative feature service resource maintains a set of operations that manage the state and contents of the service.
18
+ *
19
+ * @param item - The item representing the feature service.
20
+ * @param token - The token for authentication.
21
+ * @param bypassCache - Whether to bypass the cache (default is false). If true, a query timestamp is added to the request to bypass any cached responses.
22
+ * @returns A promise that resolves to a FeatureServiceAdminJSON object.
23
+ * @throws An error if the item is not a feature service or if the URL is not found.
24
+ *
25
+ * @see https://developers.arcgis.com/rest/services-reference/enterprise/hosted-feature-service/#json-response-syntax
26
+ */
27
+ const fetchFeatureServiceAdminJSON = (item_1, token_1, ...args_1) => __awaiter(void 0, [item_1, token_1, ...args_1], void 0, function* (item, token, bypassCache = false) {
28
+ if (!item) {
29
+ throw new Error('Item is required');
30
+ }
31
+ if ((0, isFeatureService_1.isFeatureService)(item) === false) {
32
+ throw new Error('Item is not a feature service');
33
+ }
34
+ if (!item.url) {
35
+ throw new Error('URL of the feature service is not found');
36
+ }
37
+ if (!token) {
38
+ throw new Error('Token is required to access admin endpoint');
39
+ }
40
+ // get the feature server URL
41
+ const url = (0, getFeatureServerURL_1.getFeatureServerRootURL)(item.url, true);
42
+ const params = new URLSearchParams({
43
+ f: 'json',
44
+ token,
45
+ });
46
+ if (bypassCache) {
47
+ params.append('queryTimestamp', new Date().getTime().toString());
48
+ }
49
+ const res = yield fetch(`${url}?${params.toString()}`);
50
+ const data = yield res.json();
51
+ if (data.error) {
52
+ throw new Error(data.error.message || 'Error fetching feature service admin JSON');
53
+ }
54
+ return data;
55
+ });
56
+ exports.fetchFeatureServiceAdminJSON = fetchFeatureServiceAdminJSON;
57
+ //# sourceMappingURL=fetchFeatureServiceAdminJSON.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchFeatureServiceAdminJSON.js","sourceRoot":"","sources":["../../../src/services/feature-service/fetchFeatureServiceAdminJSON.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sEAAmE;AAEnE,+DAAgE;AAEhE;;;;;;;;;;;GAWG;AACI,MAAM,4BAA4B,GAAG,6BAIR,EAAE,oEAHlC,IAAW,EACX,KAAa,EACb,WAAW,GAAG,KAAK;IAEnB,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,IAAA,mCAAgB,EAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAClE,CAAC;IAED,6BAA6B;IAC7B,MAAM,GAAG,GAAG,IAAA,6CAAuB,EAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAEpD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC;QAC/B,CAAC,EAAE,MAAM;QACT,KAAK;KACR,CAAC,CAAC;IAEH,IAAI,WAAW,EAAE,CAAC;QACd,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAE9B,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACX,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,2CAA2C,CACpE,CAAC;IACN,CAAC;IAED,OAAO,IAA+B,CAAC;AAC3C,CAAC,CAAA,CAAC;AA3CW,QAAA,4BAA4B,gCA2CvC"}
@@ -0,0 +1,16 @@
1
+ import { FeatureServiceJSON, IItem } from '../../types';
2
+ /**
3
+ * Fetches the root JSON of a feature service. This resource provides basic information about the feature service,
4
+ * including the feature layers and tables that it contains, the service description, and so on.
5
+ *
6
+ * If an 'Invalid token' error is encountered, it retries the request without the token.
7
+ *
8
+ * @param item - The item representing the feature service.
9
+ * @param token - The token for authentication.
10
+ * @param bypassCache - Whether to bypass the cache (default is false). If true, a query timestamp is added to the request to bypass any cached responses.
11
+ * @returns {FeatureServiceJSON} A promise that resolves to a FeatureServiceJSON object.
12
+ * @throws An error if the item is not a feature service or if the URL is not found.
13
+ *
14
+ * @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-service/
15
+ */
16
+ export declare const fetchFeatureServiceRootJSON: (item: IItem, token: string, bypassCache?: boolean) => Promise<FeatureServiceJSON>;