@vannizhang/living-atlas-content-validator 1.5.19-beta.3 → 1.5.19-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ValidationMessage, ValidationInfo, ValidationResult, ValidationResultStatus, FeatureLayerField, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON } from './types';
1
+ import { ValidationMessage, ValidationInfo, ValidationResult, ValidationResultStatus, FeatureLayerFieldRaw, FeatureLayerFieldFormatted, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON } from './types';
2
2
  import { isValidTitle } from './lib/title/isValidTitle';
3
3
  import { isValidAccessInformation } from './lib/accessInformation/isValidAccessInformation';
4
4
  import { isValidDescription } from './lib/description/isValidDescription';
@@ -41,4 +41,4 @@ import { fetchFeatureServiceLayersAndTables } from './services/feature-service/f
41
41
  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, };
42
42
  export { fetchAdditonalPatterns4TitleAndSnippetSearchability, fetchProfanitiesData, getSubmittedCustomTerms, getMyCustomTerms, addCustomTerms2FeatureTable, updateStatusOfCustomTermsInFeatureTable, getPackagedReviewResults, getReviewedReviewResults, getUnarchivedReviewResults, getDeployedReviewResults, getReviewResultsByTermAndCategory, addReviewResults2FeatureTable, updateReviewResultsInFeatureTable, getCustomTermsFeatureTableItemInfo, getCustomTermsReviewResultsFeatureTableItemInfo, containsProfanity, };
43
43
  export { isValidRegexPattern, escapeSpecialCharacters };
44
- export type { ValidationMessage, ValidationInfo, ValidationResult, ValidationRulesStringJSON, ValidationResultStatus, MatchResult, CustomTermFeature, CustomTermCategory, CustomTermStatus, CustomTermsReviewResultLifecycle, CustomTermReviewResultFeature, AdditionalPatterns4TitleAndSnippetSearchability, AddFeaturesResponse, LivingAtlasSupportedItemType, FeatureLayerField, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON, };
44
+ export type { ValidationMessage, ValidationInfo, ValidationResult, ValidationRulesStringJSON, ValidationResultStatus, MatchResult, CustomTermFeature, CustomTermCategory, CustomTermStatus, CustomTermsReviewResultLifecycle, CustomTermReviewResultFeature, AdditionalPatterns4TitleAndSnippetSearchability, AddFeaturesResponse, LivingAtlasSupportedItemType, FeatureLayerFieldRaw, FeatureLayerFieldFormatted, FeatureLayerJSON, FeatureLayerFieldValueType, FeatureServiceJSON, };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAgBA,2DAAwD;AA6GpD,6FA7GK,2BAAY,OA6GL;AA5GhB,+FAA4F;AA6GxF,yGA7GK,mDAAwB,OA6GL;AA5G5B,6EAA0E;AA6GtE,mGA7GK,uCAAkB,OA6GL;AA5GtB,yEAAyE;AACzE,6EAA0E;AA6GtE,mGA7GK,uCAAkB,OA6GL;AA5GtB,+DAA4D;AA6GxD,8FA7GK,6BAAa,OA6GL;AA5GjB,qDAAkD;AA6G9C,2FA7GK,uBAAU,OA6GL;AA5Gd,iEAA8D;AA6G1D,+FA7GK,+BAAc,OA6GL;AA5GlB,wD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DAOiC;AA4F7B,wGAjGA,sCAAuB,OAiGA;AACvB,iGAjGA,+BAAgB,OAiGA;AAChB,4GAjGA,0CAA2B,OAiGA;AAC3B,wHAjGA,sDAAuC,OAiGA;AAQvC,mHAxGA,iDAAkC,OAwGA;AAnGtC,iKAGiG;AAmF7F,oIArFA,yGAAmD,OAqFA;AA5EvD,wFAWgD;AA4E5C,8GAtFA,2DAA6B,OAsFA;AAC7B,kHAtFA,+DAAiC,OAsFA;AANjC,yGA/EA,sDAAwB,OA+EA;AACxB,yGA/EA,sDAAwB,OA+EA;AACxB,2GA/EA,wDAA0B,OA+EA;AAC1B,yGA/EA,sDAAwB,OA+EA;AACxB,kHA/EA,+DAAiC,OA+EA;AAIjC,gIAhFA,6EAA+C,OAgFA;AA7EnD,gFAA6E;AAiF/C,wGAjFrB,iDAAuB,OAiFqB;AAhFrD,mGAAgG;AA+D5F,qGA/DK,2CAAoB,OA+DL;AA9DxB,8EAA4E;AA4ExE,kGA5EK,oCAAiB,OA4EL;AA3ErB,kGAGqD;AA6CjD,iHA/CA,mEAAgC,OA+CA;AAChC,oHA/CA,sEAAmC,OA+CA;AA1CvC,qIAAkI;AA+C9H,qHA/CK,2EAAoC,OA+CL;AA7CxC,sHAAmH;AA4C/G,gHA5CK,iEAA+B,OA4CL;AA1CnC,+HAA4H;AA4CxH,mHA5CK,uEAAkC,OA4CL;AA1CtC,sHAAmH;AA2C/G,mHA3CK,uEAAkC,OA2CL"}
@@ -52,9 +52,10 @@ const checkFeatureServiceFieldAliases = (item, featureLayers) => {
52
52
  return validationResult;
53
53
  }
54
54
  const relevantFields = (0, getRelevantFeatureLayerFields_1.getRelevantFeatureLayerFields)(featureLayers || []);
55
- // should receive full score since there is no relevant field that needs to be checked
56
55
  if (relevantFields.length === 0) {
57
- validationResult.scoringFactor = scoringFactors.CONTAINS_FIELD_ALIASES;
56
+ validationResult.messages.push({
57
+ message: strings.featureLayerFieldDescriptions.NO_RELEVANT_FIELD,
58
+ });
58
59
  return validationResult;
59
60
  }
60
61
  // get the count of fields with aliases
@@ -1 +1 @@
1
- {"version":3,"file":"checkFeatureServiceFieldAliases.js","sourceRoot":"","sources":["../../../src/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.ts"],"names":[],"mappings":";;;AACA,yFAAsF;AACtF,+DAA4D;AAC5D,yDAAyD;AACzD,mDAAgD;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACI,MAAM,+BAA+B,GAAG,CAC3C,IAAW,EACX,aAAiC,EACnB,EAAE;IAChB,MAAM,OAAO,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,6BAAa,CAAC,cAAc,CAAC,OAAO,CAAC;IAE5D,MAAM,gBAAgB,GAAmB;QACrC,gBAAgB,EAAE,+BAA+B;QACjD,KAAK,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK;QAC7C,KAAK,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK;QAC7C,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,6BAAa,CAAC,MAAM;QAC5B,aAAa,EAAE,CAAC;QAChB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,KAAK;KACvB,CAAC;IAEF,uGAAuG;IACvG,sCAAsC;IACtC,IAAI,CAAC,IAAA,mCAAgB,EAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,uCACO,gBAAgB,KACnB,MAAM,EAAE,CAAC,IACX;IACN,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,MAAK,CAAC,EAAE,CAAC;QAC/D,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,gBAAgB;SAC7D,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,MAAM,cAAc,GAAG,IAAA,6DAA6B,EAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IAE1E,sFAAsF;IACtF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,gBAAgB,CAAC,aAAa,GAAG,cAAc,CAAC,sBAAsB,CAAC;QACvE,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,uCAAuC;IACvC,MAAM,sBAAsB,GAAG,cAAc,CAAC,MAAM,CAChD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CACzB,CAAC,MAAM,CAAC;IAET,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,cAAc,CAAC,MAAM,CAAC;IAExE,kEAAkE;IAClE,oEAAoE;IACpE,IAAI,gBAAgB,KAAK,CAAC,EAAE,CAAC;QACzB,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,eAAe;SAC5D,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,gFAAgF;IAChF,yEAAyE;IACzE,IAAI,gBAAgB,GAAG,GAAG,EAAE,CAAC;QACzB,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,mBAAmB;SAChE,CAAC,CAAC;QACH,gBAAgB,CAAC,aAAa;YAC1B,cAAc,CAAC,sBAAsB,GAAG,CAAC,CAAC;QAC9C,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,mFAAmF;IACnF,+BAA+B;IAC/B,gBAAgB,CAAC,aAAa,GAAG,CAAC,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AA7EW,QAAA,+BAA+B,mCA6E1C"}
1
+ {"version":3,"file":"checkFeatureServiceFieldAliases.js","sourceRoot":"","sources":["../../../src/lib/featureServiceFieldAliases/checkFeatureServiceFieldAliases.ts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CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,6BAA6B,CAAC,iBAAiB;SACnE,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,uCAAuC;IACvC,MAAM,sBAAsB,GAAG,cAAc,CAAC,MAAM,CAChD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CACzB,CAAC,MAAM,CAAC;IAET,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,cAAc,CAAC,MAAM,CAAC;IAExE,kEAAkE;IAClE,oEAAoE;IACpE,IAAI,gBAAgB,KAAK,CAAC,EAAE,CAAC;QACzB,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,eAAe;SAC5D,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,gFAAgF;IAChF,yEAAyE;IACzE,IAAI,gBAAgB,GAAG,GAAG,EAAE,CAAC;QACzB,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC,mBAAmB;SAChE,CAAC,CAAC;QACH,gBAAgB,CAAC,aAAa;YAC1B,cAAc,CAAC,sBAAsB,GAAG,CAAC,CAAC;QAC9C,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,mFAAmF;IACnF,+BAA+B;IAC/B,gBAAgB,CAAC,aAAa,GAAG,CAAC,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AA9EW,QAAA,+BAA+B,mCA8E1C"}
@@ -51,10 +51,13 @@ const checkFeatureServiceFieldDescriptions = (item, featureLayers) => {
51
51
  return validationResult;
52
52
  }
53
53
  const relevantFields = (0, getRelevantFeatureLayerFields_1.getRelevantFeatureLayerFields)(featureLayers || []);
54
- // should receive full score since there is no relevant field that needs to be checked
54
+ // should receive 0 score since there is no relevant field found.
55
+ // Checked with Jim Herris and he said that he'd rather see this as a 0 score
56
+ // so that the user can see that there are no relevant fields
55
57
  if (relevantFields.length === 0) {
56
- validationResult.scoringFactor =
57
- scoringFactors.CONTAINS_FIELD_DESCRIPTIONS;
58
+ validationResult.messages.push({
59
+ message: strings.featureLayerFieldDescriptions.NO_RELEVANT_FIELD,
60
+ });
58
61
  return validationResult;
59
62
  }
60
63
  // get the count of fields with descriptions provided
@@ -1 +1 @@
1
- {"version":3,"file":"checkFeatureServiceFieldDescriptions.js","sourceRoot":"","sources":["../../../src/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.ts"],"names":[],"mappings":";;;AACA,yFAAsF;AACtF,+DAA4D;AAC5D,yDAAyD;AACzD,mDAAgD;AAEhD;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,oCAAoC,GAAG,CAChD,IAAW,EACX,aAAiC,EACnB,EAAE;IAChB,MAAM,OAAO,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,6BAAa,CAAC,cAAc,CAAC,OAAO,CAAC;IAE5D,MAAM,gBAAgB,GAAmB;QACrC,gBAAgB,EAAE,oCAAoC;QACtD,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,KAAK;QAClD,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,KAAK;QAClD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,6BAAa,CAAC,MAAM;QAC5B,aAAa,EAAE,CAAC;QAChB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,KAAK;KACvB,CAAC;IAEF,uGAAuG;IACvG,sCAAsC;IACtC,IAAI,CAAC,IAAA,mCAAgB,EAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,uCACO,gBAAgB,KACnB,MAAM,EAAE,CAAC,IACX;IACN,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC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AAG,CAAC,CAAC;QACnD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,yFAAyF;IACzF,+BAA+B;IAC/B,gBAAgB,CAAC,aAAa,GAAG,CAAC,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AAjFW,QAAA,oCAAoC,wCAiF/C"}
1
+ {"version":3,"file":"checkFeatureServiceFieldDescriptions.js","sourceRoot":"","sources":["../../../src/lib/featureServiceFieldDescriptions/checkFeatureServiceFieldDescriptions.ts"],"names":[],"mappings":";;;AACA,yFAAsF;AACtF,+DAA4D;AAC5D,yDAAyD;AACzD,mDAAgD;AAEhD;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,oCAAoC,GAAG,CAChD,IAAW,EACX,aAAiC,EACnB,EAAE;IAChB,MAAM,OAAO,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,6BAAa,CAAC,cAAc,CAAC,OAAO,CAAC;IAE5D,MAAM,gBAAgB,GAAmB;QACrC,gBAAgB,EAAE,oCAAoC;QACtD,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,KAAK;QAClD,KAAK,EAAE,OAAO,CAAC,6BAA6B,CAAC,KAAK;QAClD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,6BAAa,CAAC,MAAM;QAC5B,aAAa,EAAE,CAAC;QAChB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,KAAK;KACvB,CAAC;IAEF,uGAAuG;IACvG,sCAAsC;IACtC,IAAI,CAAC,IAAA,mCAAgB,EAAC,IAAI,CAAC,EAAE,CAAC;QAC1B,uCACO,gBAAgB,KACnB,MAAM,EAAE,CAAC,IACX;IACN,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;QACzD,gBAAgB,CAAC,QAAQ,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CAAC,2BAA2B,GAAG,CAAC,CAAC;QACnD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,yFAAyF;IACzF,+BAA+B;IAC/B,gBAAgB,CAAC,aAAa,GAAG,CAAC,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AApFW,QAAA,oCAAoC,wCAoF/C"}
@@ -48,10 +48,10 @@ const checkFeatureServiceFieldValueTypes = (item, featureLayers) => {
48
48
  return validationResult;
49
49
  }
50
50
  const relevantFields = (0, getRelevantFeatureLayerFields_1.getRelevantFeatureLayerFields)(featureLayers || []);
51
- // should receive full score since there is no relevant field that needs to be checked
52
51
  if (relevantFields.length === 0) {
53
- validationResult.scoringFactor =
54
- scoringFactors.CONTAINS_FIELD_VALUE_TYPES;
52
+ validationResult.messages.push({
53
+ message: strings.featureLayerFieldDescriptions.NO_RELEVANT_FIELD,
54
+ });
55
55
  return validationResult;
56
56
  }
57
57
  // get the count of fields with descriptions provided
@@ -1 +1 @@
1
- {"version":3,"file":"checkFeatureServiceFieldValueTypes.js","sourceRoot":"","sources":["../../../src/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.ts"],"names":[],"mappings":";;;AACA,yFAAsF;AACtF,+DAA4D;AAC5D,yDAAyD;AACzD,mDAAgD;AAEhD;;;;;;;;;;;;;;;GAeG;AACI,MAAM,kCAAkC,GAAG,CAC9C,IAAW,EACX,aAAiC,EACnB,EAAE;IAChB,MAAM,OAAO,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,6BAAa,CAAC,cAAc,CAAC,OAAO,CAAC;IAE5D,MAAM,gBAAgB,GAAmB;QACrC,gBAAgB,EAAE,mCAAmC;QACrD,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK;QAC3C,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK;QAC3C,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,QAAQ,EAA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AE,OAAO,CAAC,sBAAsB,CAAC,cAAc;SACzD,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,oFAAoF;IACpF,yEAAyE;IACzE,IAAI,oBAAoB,GAAG,GAAG,EAAE,CAAC;QAC7B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,kBAAkB;SAC7D,CAAC,CAAC;QACH,gBAAgB,CAAC,aAAa;YAC1B,cAAc,CAAC,0BAA0B,GAAG,CAAC,CAAC;QAClD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,uFAAuF;IACvF,+BAA+B;IAC/B,gBAAgB,CAAC,aAAa,GAAG,CAAC,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AA/EW,QAAA,kCAAkC,sCA+E7C"}
1
+ {"version":3,"file":"checkFeatureServiceFieldValueTypes.js","sourceRoot":"","sources":["../../../src/lib/featureServiceFieldValueTypes/checkFeatureServiceFieldValueTypes.ts"],"names":[],"mappings":";;;AACA,yFAAsF;AACtF,+DAA4D;AAC5D,yDAAyD;AACzD,mDAAgD;AAEhD;;;;;;;;;;;;;;;GAeG;AACI,MAAM,kCAAkC,GAAG,CAC9C,IAAW,EACX,aAAiC,EACnB,EAAE;IAChB,MAAM,OAAO,GAAG,IAAA,gCAAgB,GAAE,CAAC;IAEnC,MAAM,cAAc,GAAG,6BAAa,CAAC,cAAc,CAAC,OAAO,CAAC;IAE5D,MAAM,gBAAgB,GAAmB;QACrC,gBAAgB,EAAE,mCAAmC;QACrD,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK;QAC3C,KAAK,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK;QAC3C,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,6BAAa,CAAC,MAAM;QAC5B,aAAa,EAAE,CAA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C,cAAc;SACzD,CAAC,CAAC;QACH,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,oFAAoF;IACpF,yEAAyE;IACzE,IAAI,oBAAoB,GAAG,GAAG,EAAE,CAAC;QAC7B,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,kBAAkB;SAC7D,CAAC,CAAC;QACH,gBAAgB,CAAC,aAAa;YAC1B,cAAc,CAAC,0BAA0B,GAAG,CAAC,CAAC;QAClD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED,uFAAuF;IACvF,+BAA+B;IAC/B,gBAAgB,CAAC,aAAa,GAAG,CAAC,CAAC;IAEnC,OAAO,gBAAgB,CAAC;AAC5B,CAAC,CAAC;AA/EW,QAAA,kCAAkC,sCA+E7C"}
@@ -1,4 +1,4 @@
1
- import { FeatureLayerField, FeatureLayerJSON } from '../../types';
1
+ import { FeatureLayerFieldFormatted, FeatureLayerJSON } from '../../types';
2
2
  /**
3
3
  * Extracts and returns relevant fields from an array of feature layer JSON objects.
4
4
  *
@@ -10,4 +10,4 @@ import { FeatureLayerField, FeatureLayerJSON } from '../../types';
10
10
  * @param featureLayers - An array of `FeatureLayerJSON` objects to extract fields from.
11
11
  * @returns An array of `FeatureLayerField` objects that are considered relevant.
12
12
  */
13
- export declare const getRelevantFeatureLayerFields: (featureLayers: FeatureLayerJSON[]) => FeatureLayerField[];
13
+ export declare const getRelevantFeatureLayerFields: (featureLayers: FeatureLayerJSON[]) => FeatureLayerFieldFormatted[];
@@ -36,7 +36,17 @@ const getRelevantFeatureLayerFields = (featureLayers) => {
36
36
  if (fieldName === 'SHAPE__AREA' || fieldName === 'SHAPE__LENGTH') {
37
37
  continue;
38
38
  }
39
- featureLayerFields.push(field);
39
+ let parsedDescription = null;
40
+ if (typeof field.description === 'string') {
41
+ try {
42
+ parsedDescription = JSON.parse(field.description);
43
+ }
44
+ catch (_a) {
45
+ parsedDescription = null;
46
+ }
47
+ }
48
+ const formattedField = Object.assign(Object.assign({}, field), { description: parsedDescription });
49
+ featureLayerFields.push(formattedField);
40
50
  }
41
51
  }
42
52
  return featureLayerFields;
@@ -1 +1 @@
1
- {"version":3,"file":"getRelevantFeatureLayerFields.js","sourceRoot":"","sources":["../../../src/lib/util/getRelevantFeatureLayerFields.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;GAUG;AACI,MAAM,6BAA6B,GAAG,CACzC,aAAiC,EACd,EAAE;IACrB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAA,EAAE,CAAC;QAC1D,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,kBAAkB,GAAwB,EAAE,CAAC;IAEnD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACvC,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC;YAChD,SAAS;QACb,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;YACtC,IACI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA;gBACZ,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA;gBACZ,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;gBAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAChC,CAAC;gBACC,SAAS;YACb,CAAC;YAED,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;YAE7B,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,kBAAkB,EAAE,CAAC;gBAC/D,SAAS;YACb,CAAC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CAAC,IAAI,CAAC;YAE7B,IAAI,SAAS,KAAK,UAAU,IAAI,SAAS,KAAK,kBAAkB,EAAE,CAAC;gBAC/D,SAAS;YACb,CAAC;YAED,IAAI,SAAS,KAAK,aAAa,IAAI,SAAS,KAAK,eAAe,EAAE,CAAC;gBAC/D,SAAS;YACb,CAAC;YAED,IAAI,iBAAiB,GAAG,IAAI,CAAC;YAC7B,IAAI,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ,EAAE,CAAC;gBACxC,IAAI,CAAC;oBACD,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;gBACtD,CAAC;gBAAC,WAAM,CAAC;oBACL,iBAAiB,GAAG,IAAI,CAAC;gBAC7B,CAAC;YACL,CAAC;YACD,MAAM,cAAc,mCACb,KAAK,KACR,WAAW,EAAE,iBAAiB,GACjC,CAAC;YAEF,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5C,CAAC;IACL,CAAC;IAED,OAAO,kBAAkB,CAAC;AAC9B,CAAC,CAAC;AArDW,QAAA,6BAA6B,iCAqDxC"}
@@ -178,7 +178,8 @@
178
178
  "TITLE": "Check Field Aliases",
179
179
  "ADD_FIELD_ALIAS": "Add field aliases to your feature layer",
180
180
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature layer",
181
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
181
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
182
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
182
183
  },
183
184
  "featureLayerFieldTypes": {
184
185
  "GUIDANCE_DEFAULT": "Field types are the data types of the fields in your feature layer.",
@@ -187,7 +188,8 @@
187
188
  "TITLE": "Check Field Types",
188
189
  "ADD_FIELD_TYPE": "Add field types to your feature layer",
189
190
  "IMRPOVE_FIELD_TYPE": "Improve field types in your feature layer",
190
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
191
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
192
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
191
193
  },
192
194
  "featureLayerFieldDescriptions": {
193
195
  "GUIDANCE_DEFAULT": "Field descriptions are the descriptions of the fields in your feature layer. ",
@@ -196,6 +198,7 @@
196
198
  "TITLE": "Check Field Descriptions",
197
199
  "ADD_FIELD_DESCRIPTION": "Add field descriptions to your feature layer",
198
200
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature layer",
199
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
201
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
202
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
200
203
  }
201
204
  }
@@ -178,7 +178,8 @@
178
178
  "TITLE": "Check Field Aliases",
179
179
  "ADD_FIELD_ALIAS": "Add field aliases to your feature layer",
180
180
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature layer",
181
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
181
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
182
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
182
183
  },
183
184
  "featureLayerFieldTypes": {
184
185
  "GUIDANCE_DEFAULT": "Field types are the data types of the fields in your feature layer.",
@@ -187,7 +188,8 @@
187
188
  "TITLE": "Check Field Types",
188
189
  "ADD_FIELD_TYPE": "Add field types to your feature layer",
189
190
  "IMRPOVE_FIELD_TYPE": "Improve field types in your feature layer",
190
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
191
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
192
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
191
193
  },
192
194
  "featureLayerFieldDescriptions": {
193
195
  "GUIDANCE_DEFAULT": "Field descriptions are the descriptions of the fields in your feature layer. ",
@@ -196,6 +198,7 @@
196
198
  "TITLE": "Check Field Descriptions",
197
199
  "ADD_FIELD_DESCRIPTION": "Add field descriptions to your feature layer",
198
200
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature layer",
199
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
201
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
202
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
200
203
  }
201
204
  }
@@ -178,7 +178,8 @@
178
178
  "TITLE": "Check Field Aliases",
179
179
  "ADD_FIELD_ALIAS": "Add field aliases to your feature layer",
180
180
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature layer",
181
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
181
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
182
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
182
183
  },
183
184
  "featureLayerFieldTypes": {
184
185
  "GUIDANCE_DEFAULT": "Field types are the data types of the fields in your feature layer.",
@@ -187,7 +188,8 @@
187
188
  "TITLE": "Check Field Types",
188
189
  "ADD_FIELD_TYPE": "Add field types to your feature layer",
189
190
  "IMRPOVE_FIELD_TYPE": "Improve field types in your feature layer",
190
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
191
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
192
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
191
193
  },
192
194
  "featureLayerFieldDescriptions": {
193
195
  "GUIDANCE_DEFAULT": "Field descriptions are the descriptions of the fields in your feature layer. ",
@@ -196,6 +198,7 @@
196
198
  "TITLE": "Check Field Descriptions",
197
199
  "ADD_FIELD_DESCRIPTION": "Add field descriptions to your feature layer",
198
200
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature layer",
199
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
201
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
202
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
200
203
  }
201
204
  }
@@ -178,7 +178,8 @@
178
178
  "TITLE": "Check Field Aliases",
179
179
  "ADD_FIELD_ALIAS": "Add field aliases to your feature layer",
180
180
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature layer",
181
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
181
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
182
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
182
183
  },
183
184
  "featureLayerFieldTypes": {
184
185
  "GUIDANCE_DEFAULT": "Field types are the data types of the fields in your feature layer.",
@@ -187,7 +188,8 @@
187
188
  "TITLE": "Check Field Types",
188
189
  "ADD_FIELD_TYPE": "Add field types to your feature layer",
189
190
  "IMRPOVE_FIELD_TYPE": "Improve field types in your feature layer",
190
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
191
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
192
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
191
193
  },
192
194
  "featureLayerFieldDescriptions": {
193
195
  "GUIDANCE_DEFAULT": "Field descriptions are the descriptions of the fields in your feature layer. ",
@@ -196,6 +198,7 @@
196
198
  "TITLE": "Check Field Descriptions",
197
199
  "ADD_FIELD_DESCRIPTION": "Add field descriptions to your feature layer",
198
200
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature layer",
199
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
201
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
202
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
200
203
  }
201
204
  }
@@ -178,7 +178,8 @@
178
178
  "TITLE": "Check Field Aliases",
179
179
  "ADD_FIELD_ALIAS": "Add field aliases to your feature layer",
180
180
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature layer",
181
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
181
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
182
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
182
183
  },
183
184
  "featureLayerFieldTypes": {
184
185
  "GUIDANCE_DEFAULT": "Field types are the data types of the fields in your feature layer.",
@@ -187,7 +188,8 @@
187
188
  "TITLE": "Check Field Types",
188
189
  "ADD_FIELD_TYPE": "Add field types to your feature layer",
189
190
  "IMRPOVE_FIELD_TYPE": "Improve field types in your feature layer",
190
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
191
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
192
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
191
193
  },
192
194
  "featureLayerFieldDescriptions": {
193
195
  "GUIDANCE_DEFAULT": "Field descriptions are the descriptions of the fields in your feature layer. ",
@@ -196,6 +198,7 @@
196
198
  "TITLE": "Check Field Descriptions",
197
199
  "ADD_FIELD_DESCRIPTION": "Add field descriptions to your feature layer",
198
200
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature layer",
199
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
201
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
202
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
200
203
  }
201
204
  }
@@ -178,7 +178,8 @@
178
178
  "TITLE": "Check Field Aliases",
179
179
  "ADD_FIELD_ALIAS": "Add field aliases to your feature layer",
180
180
  "IMPROVE_FIELD_ALIAS": "Improve field aliases in your feature layer",
181
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
181
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
182
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
182
183
  },
183
184
  "featureLayerFieldTypes": {
184
185
  "GUIDANCE_DEFAULT": "Field types are the data types of the fields in your feature layer.",
@@ -187,7 +188,8 @@
187
188
  "TITLE": "Check Field Types",
188
189
  "ADD_FIELD_TYPE": "Add field types to your feature layer",
189
190
  "IMRPOVE_FIELD_TYPE": "Improve field types in your feature layer",
190
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
191
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
192
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
191
193
  },
192
194
  "featureLayerFieldDescriptions": {
193
195
  "GUIDANCE_DEFAULT": "Field descriptions are the descriptions of the fields in your feature layer. ",
@@ -196,6 +198,7 @@
196
198
  "TITLE": "Check Field Descriptions",
197
199
  "ADD_FIELD_DESCRIPTION": "Add field descriptions to your feature layer",
198
200
  "IMRPOVE_FIELD_DESCRIPTION": "Improve field descriptions in your feature layer",
199
- "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table"
201
+ "NO_FEATURE_LAYER": "This feature service does not have any feature layer or non-spatial table",
202
+ "NO_RELEVANT_FIELD": "This feature service does not have any relevant fields (non-system generated) to validate"
200
203
  }
201
204
  }
@@ -1 +1 @@
1
- {"lastCompiledTime":1747487766583}
1
+ {"lastCompiledTime":1747854904592}
@@ -292,7 +292,7 @@ export type FeatureServiceJSON = {
292
292
  *
293
293
  * @see https://developers.arcgis.com/rest/services-reference/enterprise/feature-layer.htm
294
294
  */
295
- export type FeatureLayerField = {
295
+ type FeatureLayerField = {
296
296
  name: string;
297
297
  type: string;
298
298
  alias: string;
@@ -302,16 +302,36 @@ export type FeatureLayerField = {
302
302
  sqlType?: string;
303
303
  nullable?: boolean;
304
304
  editable?: boolean;
305
+ };
306
+ /**
307
+ * Represents a raw Feature Layer field as returned by the Feature Layer JSON.
308
+ *
309
+ * The `description` property is typically returned by the server as a stringified JSON object,
310
+ * for example: `"{\"value\":\"\",\"fieldValueType\":\"dateAndTime\"}"`.
311
+ */
312
+ export type FeatureLayerFieldRaw = FeatureLayerField & {
313
+ /**
314
+ * The field description as a stringified JSON object, if present.
315
+ */
316
+ description?: string;
317
+ };
318
+ /**
319
+ * Represents a Feature Layer field with a parsed and formatted description.
320
+ *
321
+ * The `description` property is an object containing the description text and the field value type,
322
+ * or `null` if not present or not properly formatted.
323
+ */
324
+ export type FeatureLayerFieldFormatted = FeatureLayerField & {
305
325
  description?: {
306
326
  /**
307
- * Description of the field - a few words, a sentence, or a paragraph of text that describes the values in the field. The description can be up to 500 characters.
327
+ * A brief description of the field, up to 500 characters.
308
328
  */
309
329
  value: string;
310
330
  /**
311
- * Field value type – a keyword that categorizes the type of values contained in the field. The keyword helps people understand how to use the values and allows ArcGIS Online to make smarter suggestions for working with them.
331
+ * A keyword categorizing the type of values in the field, used for smarter suggestions in ArcGIS Online.
312
332
  */
313
333
  fieldValueType: FeatureLayerFieldValueType;
314
- };
334
+ } | null;
315
335
  };
316
336
  /**
317
337
  * Represents the field value type of a feature layer.
@@ -352,7 +372,7 @@ export type FeatureLayerJSON = {
352
372
  /**
353
373
  * the feature layer's fields
354
374
  */
355
- fields: FeatureLayerField[];
375
+ fields: FeatureLayerFieldRaw[];
356
376
  };
357
377
  /**
358
378
  * Represents the response from the Feature Service layers endpoint.
@@ -364,3 +384,4 @@ export type FeatureServiceLayersResponse = {
364
384
  tables: FeatureLayerJSON[];
365
385
  error?: Error;
366
386
  };
387
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vannizhang/living-atlas-content-validator",
3
- "version": "1.5.19-beta.3",
3
+ "version": "1.5.19-beta.5",
4
4
  "description": "Validation and Scoring rules for curating content in the ArcGIS Living Atlas",
5
5
  "repository": {
6
6
  "type": "git",