@azure/search-documents 11.3.0-beta.4 → 11.3.0-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.
Files changed (31) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/index.js +282 -18
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/generated/data/models/index.js +141 -1
  7. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  8. package/dist-esm/src/generated/data/models/mappers.js +6 -0
  9. package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
  10. package/dist-esm/src/generated/data/models/parameters.js +9 -0
  11. package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
  12. package/dist-esm/src/generated/data/operations/documents.js +1 -0
  13. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  14. package/dist-esm/src/generated/data/searchClientContext.js +1 -1
  15. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  16. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  17. package/dist-esm/src/generated/service/models/mappers.js +109 -7
  18. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  19. package/dist-esm/src/generated/service/searchServiceClientContext.js +1 -1
  20. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  21. package/dist-esm/src/index.js.map +1 -1
  22. package/dist-esm/src/indexModels.js.map +1 -1
  23. package/dist-esm/src/searchIndexerClient.js +3 -3
  24. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  25. package/dist-esm/src/serialization.js +1 -1
  26. package/dist-esm/src/serialization.js.map +1 -1
  27. package/dist-esm/src/serviceModels.js.map +1 -1
  28. package/dist-esm/src/serviceUtils.js +4 -2
  29. package/dist-esm/src/serviceUtils.js.map +1 -1
  30. package/package.json +1 -1
  31. package/types/search-documents.d.ts +298 -47
@@ -28,7 +28,7 @@ export class SearchServiceClientContext extends coreClient.ServiceClient {
28
28
  const defaults = {
29
29
  requestContentType: "application/json; charset=utf-8"
30
30
  };
31
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.4`;
31
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.5`;
32
32
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
33
33
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
34
34
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"searchServiceClientContext.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,gBAAgB;AAChB,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAItE;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAAqC,EACrC,OAA2C;QAE3C,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAsC;YAClD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n ApiVersion20210430Preview,\n SearchServiceClientOptionalParams\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20210430Preview;\n\n /**\n * Initializes a new instance of the SearchServiceClientContext class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20210430Preview,\n options?: SearchServiceClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-search-documents/11.3.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\n }\n}\n"]}
1
+ {"version":3,"file":"searchServiceClientContext.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,gBAAgB;AAChB,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAItE;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAAqC,EACrC,OAA2C;QAE3C,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAsC;YAClD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n ApiVersion20210430Preview,\n SearchServiceClientOptionalParams\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20210430Preview;\n\n /**\n * Initializes a new instance of the SearchServiceClientContext class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20210430Preview,\n options?: SearchServiceClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-search-documents/11.3.0-beta.5`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AAgCxC,OAAO,EAAE,4BAA4B,EAAwB,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAA4B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAwBL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EA+CpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAYL,YAAY,EAEZ,kBAAkB,EAElB,YAAY,EAOZ,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,eAAe,EAqEf,oCAAoC,EAYpC,2BAA2B,EAE3B,uBAAuB,EAEvB,kBAAkB,EAElB,iCAAiC,EAMjC,mBAAmB,EAEnB,mCAAmC,EAEnC,+BAA+B,EAE/B,gBAAgB,EAEhB,kBAAkB,EAElB,qCAAqC,EAErC,qBAAqB,EAcrB,gCAAgC,EAUhC,wBAAwB,EAKxB,6BAA6B,EAG7B,2BAA2B,EAE3B,2BAA2B,EAE3B,wCAAwC,EAYxC,0BAA0B,EAG1B,oBAAoB,EAEpB,mBAAmB,EAUnB,iCAAiC,EAEjC,eAAe,EAKf,iCAAiC,EAEjC,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { SearchClient, SearchClientOptions } from \"./searchClient\";\nexport {\n DEFAULT_BATCH_SIZE,\n DEFAULT_FLUSH_WINDOW,\n DEFAULT_RETRY_COUNT\n} from \"./searchIndexingBufferedSender\";\nexport {\n AutocompleteRequest,\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsAction,\n ListSearchResultsPageSettings,\n IndexDocumentsOptions,\n SearchDocumentsResultBase,\n SearchDocumentsResult,\n SearchDocumentsPageResult,\n SearchIterator,\n SearchOptions,\n SearchRequestOptions,\n SearchRequest,\n SearchResult,\n SuggestDocumentsResult,\n SuggestRequest,\n SuggestResult,\n SuggestOptions,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n UploadDocumentsOptions,\n SearchIndexingBufferedSenderOptions,\n SearchIndexingBufferedSenderDeleteDocumentsOptions,\n SearchIndexingBufferedSenderFlushDocumentsOptions,\n SearchIndexingBufferedSenderMergeDocumentsOptions,\n SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions,\n SearchIndexingBufferedSenderUploadDocumentsOptions\n} from \"./indexModels\";\nexport { SearchIndexingBufferedSender, IndexDocumentsClient } from \"./searchIndexingBufferedSender\";\nexport { SearchIndexClient, SearchIndexClientOptions } from \"./searchIndexClient\";\nexport { SearchIndexerClient, SearchIndexerClientOptions } from \"./searchIndexerClient\";\nexport {\n SearchIndex,\n LexicalAnalyzer,\n TokenFilter,\n LexicalTokenizer,\n CharFilter,\n ListIndexesOptions,\n CreateIndexOptions,\n CreateOrUpdateIndexOptions,\n CreateOrUpdateSkillsetOptions,\n CreateOrUpdateSynonymMapOptions,\n CreateSkillsetOptions,\n CreateSynonymMapOptions,\n DeleteSkillsetOptions,\n DeleteSynonymMapOptions,\n GetSkillSetOptions,\n GetSynonymMapsOptions,\n ListSkillsetsOptions,\n SearchIndexerSkillset,\n ListSynonymMapsOptions,\n DeleteIndexOptions,\n AnalyzeTextOptions,\n GetIndexOptions,\n GetIndexStatisticsOptions,\n KnownAnalyzerNames,\n KnownCharFilterNames,\n KnownTokenFilterNames,\n KnownTokenizerNames,\n ScoringFunction,\n ScoringProfile,\n CustomAnalyzer,\n PatternAnalyzer,\n PatternTokenizer,\n SearchField,\n SimpleField,\n ComplexField,\n SearchFieldDataType,\n ComplexDataType,\n CognitiveServicesAccount,\n SearchIndexerSkill,\n SynonymMap,\n ListIndexersOptions,\n CreateIndexerOptions,\n GetIndexerOptions,\n CreateorUpdateIndexerOptions,\n DeleteIndexerOptions,\n GetIndexerStatusOptions,\n ResetIndexerOptions,\n RunIndexerOptions,\n CreateDataSourceConnectionOptions,\n CreateorUpdateDataSourceConnectionOptions,\n DeleteDataSourceConnectionOptions,\n GetDataSourceConnectionOptions,\n ListDataSourceConnectionsOptions,\n SearchIndexerDataSourceConnection,\n DataChangeDetectionPolicy,\n DataDeletionDetectionPolicy,\n GetServiceStatisticsOptions,\n IndexIterator,\n IndexNameIterator,\n SimilarityAlgorithm,\n NGramTokenFilter,\n LuceneStandardTokenizer,\n EdgeNGramTokenFilter,\n KeywordTokenizer,\n AnalyzeRequest,\n SearchResourceEncryptionKey,\n SearchIndexStatistics,\n SearchServiceStatistics,\n SearchIndexer,\n LexicalNormalizer,\n SearchIndexerDataIdentity,\n ResetDocsOptions,\n ResetSkillsOptions\n} from \"./serviceModels\";\nexport { default as GeographyPoint } from \"./geographyPoint\";\nexport { odata } from \"./odata\";\nexport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nexport {\n AutocompleteResult,\n AutocompleteMode,\n AutocompleteItem,\n FacetResult,\n IndexActionType,\n IndexDocumentsResult,\n IndexingResult,\n QueryType,\n SearchMode,\n ScoringStatistics,\n Answers,\n KnownAnswers,\n QueryLanguage,\n KnownQueryLanguage,\n Speller,\n KnownSpeller,\n CaptionResult,\n AnswerResult,\n Captions,\n QueryAnswerType,\n QueryCaptionType,\n QuerySpellerType,\n KnownQuerySpellerType,\n KnownQueryAnswerType,\n KnownQueryCaptionType\n} from \"./generated/data/models\";\nexport {\n RegexFlags,\n KnownRegexFlags,\n LuceneStandardAnalyzer,\n StopAnalyzer,\n MappingCharFilter,\n PatternReplaceCharFilter,\n CorsOptions,\n AzureActiveDirectoryApplicationCredentials,\n ScoringFunctionAggregation,\n ScoringFunctionInterpolation,\n DistanceScoringParameters,\n DistanceScoringFunction,\n FreshnessScoringParameters,\n FreshnessScoringFunction,\n MagnitudeScoringParameters,\n MagnitudeScoringFunction,\n TagScoringParameters,\n TagScoringFunction,\n TextWeights,\n AsciiFoldingTokenFilter,\n CjkBigramTokenFilterScripts,\n CjkBigramTokenFilter,\n CommonGramTokenFilter,\n DictionaryDecompounderTokenFilter,\n EdgeNGramTokenFilterSide,\n ElisionTokenFilter,\n KeepTokenFilter,\n KeywordMarkerTokenFilter,\n LengthTokenFilter,\n LimitTokenFilter,\n PatternCaptureTokenFilter,\n PatternReplaceTokenFilter,\n PhoneticEncoder,\n PhoneticTokenFilter,\n ShingleTokenFilter,\n SnowballTokenFilterLanguage,\n SnowballTokenFilter,\n StemmerTokenFilterLanguage,\n StemmerTokenFilter,\n StemmerOverrideTokenFilter,\n StopwordsList,\n StopwordsTokenFilter,\n SynonymTokenFilter,\n TruncateTokenFilter,\n UniqueTokenFilter,\n WordDelimiterTokenFilter,\n ClassicTokenizer,\n TokenCharacterKind,\n EdgeNGramTokenizer,\n MicrosoftTokenizerLanguage,\n MicrosoftLanguageTokenizer,\n MicrosoftStemmingTokenizerLanguage,\n MicrosoftLanguageStemmingTokenizer,\n NGramTokenizer,\n PathHierarchyTokenizerV2 as PathHierarchyTokenizer,\n UaxUrlEmailTokenizer,\n Suggester as SearchSuggester,\n AnalyzeResult,\n AnalyzedTokenInfo,\n ConditionalSkill,\n KeyPhraseExtractionSkill,\n OcrSkill,\n ImageAnalysisSkill,\n LanguageDetectionSkill,\n ShaperSkill,\n MergeSkill,\n EntityRecognitionSkill,\n SentimentSkill,\n CustomEntityLookupSkill,\n CustomEntityLookupSkillLanguage,\n KnownCustomEntityLookupSkillLanguage,\n DocumentExtractionSkill,\n CustomEntity,\n CustomEntityAlias,\n SplitSkill,\n PIIDetectionSkill,\n EntityRecognitionSkillV3,\n EntityLinkingSkill,\n SentimentSkillV3,\n TextTranslationSkill,\n WebApiSkill,\n SentimentSkillLanguage,\n KnownSentimentSkillLanguage,\n SplitSkillLanguage,\n KnownSplitSkillLanguage,\n TextSplitMode,\n KnownTextSplitMode,\n TextTranslationSkillLanguage,\n KnownTextTranslationSkillLanguage,\n DefaultCognitiveServicesAccount,\n CognitiveServicesAccountKey,\n InputFieldMappingEntry,\n OutputFieldMappingEntry,\n EntityCategory,\n KnownEntityCategory,\n EntityRecognitionSkillLanguage,\n KnownEntityRecognitionSkillLanguage,\n ImageAnalysisSkillLanguage,\n KnownImageAnalysisSkillLanguage,\n ImageDetail,\n KnownImageDetail,\n VisualFeature,\n KnownVisualFeature,\n KeyPhraseExtractionSkillLanguage,\n KnownKeyPhraseExtractionSkillLanguage,\n OcrSkillLanguage,\n KnownOcrSkillLanguage,\n FieldMapping,\n IndexingParameters,\n IndexingSchedule,\n FieldMappingFunction,\n SearchIndexerStatus,\n IndexerExecutionResult,\n SearchIndexerLimits,\n IndexerStatus,\n SearchIndexerError,\n IndexerExecutionStatus,\n SearchIndexerWarning,\n SearchIndexerDataContainer,\n SearchIndexerDataSourceType,\n KnownSearchIndexerDataSourceType,\n SoftDeleteColumnDeletionDetectionPolicy,\n SqlIntegratedChangeTrackingPolicy,\n HighWaterMarkChangeDetectionPolicy,\n SearchIndexerDataUserAssignedIdentity,\n SearchIndexerDataNoneIdentity,\n ServiceCounters,\n ServiceLimits,\n ResourceCounter,\n LexicalAnalyzerName,\n KnownLexicalAnalyzerName,\n ClassicSimilarity,\n BM25Similarity,\n IndexingParametersConfiguration,\n BlobIndexerDataToExtract,\n KnownBlobIndexerDataToExtract,\n IndexerExecutionEnvironment,\n BlobIndexerImageAction,\n KnownBlobIndexerImageAction,\n BlobIndexerParsingMode,\n KnownBlobIndexerParsingMode,\n BlobIndexerPDFTextRotationAlgorithm,\n KnownBlobIndexerPDFTextRotationAlgorithm,\n TokenFilter as BaseTokenFilter,\n Similarity,\n LexicalTokenizer as BaseLexicalTokenizer,\n CognitiveServicesAccount as BaseCognitiveServicesAccount,\n SearchIndexerSkill as BaseSearchIndexerSkill,\n ScoringFunction as BaseScoringFunction,\n DataChangeDetectionPolicy as BaseDataChangeDetectionPolicy,\n LexicalAnalyzer as BaseLexicalAnalyzer,\n CharFilter as BaseCharFilter,\n DataDeletionDetectionPolicy as BaseDataDeletionDetectionPolicy,\n LexicalNormalizerName,\n KnownLexicalNormalizerName,\n CustomNormalizer,\n TokenFilterName,\n KnownTokenFilterName,\n CharFilterName,\n KnownCharFilterName,\n LexicalNormalizer as BaseLexicalNormalizer,\n SearchIndexerKnowledgeStore,\n SearchIndexerKnowledgeStoreProjection,\n SearchIndexerKnowledgeStoreFileProjectionSelector,\n SearchIndexerKnowledgeStoreBlobProjectionSelector,\n SearchIndexerKnowledgeStoreProjectionSelector,\n SearchIndexerKnowledgeStoreObjectProjectionSelector,\n SearchIndexerKnowledgeStoreTableProjectionSelector,\n PIIDetectionSkillMaskingMode,\n KnownPIIDetectionSkillMaskingMode,\n LineEnding,\n KnownLineEnding,\n SearchIndexerDataIdentity as BaseSearchIndexerDataIdentity,\n SearchIndexerCache,\n IndexerCurrentState,\n IndexerExecutionStatusDetail,\n KnownIndexerExecutionStatusDetail,\n IndexingMode,\n KnownIndexingMode\n} from \"./generated/service/models\";\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { createSynonymMapFromFile } from \"./synonymMapHelper\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AAgCxC,OAAO,EAAE,4BAA4B,EAAwB,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAA4B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAwBL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EA+CpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAYL,YAAY,EAEZ,kBAAkB,EAElB,YAAY,EAOZ,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,eAAe,EAqEf,oCAAoC,EAYpC,2BAA2B,EAE3B,uBAAuB,EAEvB,kBAAkB,EAElB,iCAAiC,EAMjC,mBAAmB,EAEnB,mCAAmC,EAEnC,+BAA+B,EAE/B,gBAAgB,EAEhB,kBAAkB,EAElB,qCAAqC,EAErC,qBAAqB,EAcrB,gCAAgC,EAUhC,wBAAwB,EAKxB,6BAA6B,EAG7B,2BAA2B,EAE3B,2BAA2B,EAE3B,wCAAwC,EAYxC,0BAA0B,EAG1B,oBAAoB,EAEpB,mBAAmB,EAUnB,iCAAiC,EAEjC,eAAe,EAKf,iCAAiC,EAEjC,iBAAiB,EAKlB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { SearchClient, SearchClientOptions } from \"./searchClient\";\nexport {\n DEFAULT_BATCH_SIZE,\n DEFAULT_FLUSH_WINDOW,\n DEFAULT_RETRY_COUNT\n} from \"./searchIndexingBufferedSender\";\nexport {\n AutocompleteRequest,\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsAction,\n ListSearchResultsPageSettings,\n IndexDocumentsOptions,\n SearchDocumentsResultBase,\n SearchDocumentsResult,\n SearchDocumentsPageResult,\n SearchIterator,\n SearchOptions,\n SearchRequestOptions,\n SearchRequest,\n SearchResult,\n SuggestDocumentsResult,\n SuggestRequest,\n SuggestResult,\n SuggestOptions,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n UploadDocumentsOptions,\n SearchIndexingBufferedSenderOptions,\n SearchIndexingBufferedSenderDeleteDocumentsOptions,\n SearchIndexingBufferedSenderFlushDocumentsOptions,\n SearchIndexingBufferedSenderMergeDocumentsOptions,\n SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions,\n SearchIndexingBufferedSenderUploadDocumentsOptions\n} from \"./indexModels\";\nexport { SearchIndexingBufferedSender, IndexDocumentsClient } from \"./searchIndexingBufferedSender\";\nexport { SearchIndexClient, SearchIndexClientOptions } from \"./searchIndexClient\";\nexport { SearchIndexerClient, SearchIndexerClientOptions } from \"./searchIndexerClient\";\nexport {\n SearchIndex,\n LexicalAnalyzer,\n TokenFilter,\n LexicalTokenizer,\n CharFilter,\n ListIndexesOptions,\n CreateIndexOptions,\n CreateOrUpdateIndexOptions,\n CreateOrUpdateSkillsetOptions,\n CreateOrUpdateSynonymMapOptions,\n CreateSkillsetOptions,\n CreateSynonymMapOptions,\n DeleteSkillsetOptions,\n DeleteSynonymMapOptions,\n GetSkillSetOptions,\n GetSynonymMapsOptions,\n ListSkillsetsOptions,\n SearchIndexerSkillset,\n ListSynonymMapsOptions,\n DeleteIndexOptions,\n AnalyzeTextOptions,\n GetIndexOptions,\n GetIndexStatisticsOptions,\n KnownAnalyzerNames,\n KnownCharFilterNames,\n KnownTokenFilterNames,\n KnownTokenizerNames,\n ScoringFunction,\n ScoringProfile,\n CustomAnalyzer,\n PatternAnalyzer,\n PatternTokenizer,\n SearchField,\n SimpleField,\n ComplexField,\n SearchFieldDataType,\n ComplexDataType,\n CognitiveServicesAccount,\n SearchIndexerSkill,\n SynonymMap,\n ListIndexersOptions,\n CreateIndexerOptions,\n GetIndexerOptions,\n CreateorUpdateIndexerOptions,\n DeleteIndexerOptions,\n GetIndexerStatusOptions,\n ResetIndexerOptions,\n RunIndexerOptions,\n CreateDataSourceConnectionOptions,\n CreateorUpdateDataSourceConnectionOptions,\n DeleteDataSourceConnectionOptions,\n GetDataSourceConnectionOptions,\n ListDataSourceConnectionsOptions,\n SearchIndexerDataSourceConnection,\n DataChangeDetectionPolicy,\n DataDeletionDetectionPolicy,\n GetServiceStatisticsOptions,\n IndexIterator,\n IndexNameIterator,\n SimilarityAlgorithm,\n NGramTokenFilter,\n LuceneStandardTokenizer,\n EdgeNGramTokenFilter,\n KeywordTokenizer,\n AnalyzeRequest,\n SearchResourceEncryptionKey,\n SearchIndexStatistics,\n SearchServiceStatistics,\n SearchIndexer,\n LexicalNormalizer,\n SearchIndexerDataIdentity,\n ResetDocumentsOptions,\n ResetSkillsOptions\n} from \"./serviceModels\";\nexport { default as GeographyPoint } from \"./geographyPoint\";\nexport { odata } from \"./odata\";\nexport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nexport {\n AutocompleteResult,\n AutocompleteMode,\n AutocompleteItem,\n FacetResult,\n IndexActionType,\n IndexDocumentsResult,\n IndexingResult,\n QueryType,\n SearchMode,\n ScoringStatistics,\n Answers,\n KnownAnswers,\n QueryLanguage,\n KnownQueryLanguage,\n Speller,\n KnownSpeller,\n CaptionResult,\n AnswerResult,\n Captions,\n QueryAnswerType,\n QueryCaptionType,\n QuerySpellerType,\n KnownQuerySpellerType,\n KnownQueryAnswerType,\n KnownQueryCaptionType\n} from \"./generated/data/models\";\nexport {\n RegexFlags,\n KnownRegexFlags,\n LuceneStandardAnalyzer,\n StopAnalyzer,\n MappingCharFilter,\n PatternReplaceCharFilter,\n CorsOptions,\n AzureActiveDirectoryApplicationCredentials,\n ScoringFunctionAggregation,\n ScoringFunctionInterpolation,\n DistanceScoringParameters,\n DistanceScoringFunction,\n FreshnessScoringParameters,\n FreshnessScoringFunction,\n MagnitudeScoringParameters,\n MagnitudeScoringFunction,\n TagScoringParameters,\n TagScoringFunction,\n TextWeights,\n AsciiFoldingTokenFilter,\n CjkBigramTokenFilterScripts,\n CjkBigramTokenFilter,\n CommonGramTokenFilter,\n DictionaryDecompounderTokenFilter,\n EdgeNGramTokenFilterSide,\n ElisionTokenFilter,\n KeepTokenFilter,\n KeywordMarkerTokenFilter,\n LengthTokenFilter,\n LimitTokenFilter,\n PatternCaptureTokenFilter,\n PatternReplaceTokenFilter,\n PhoneticEncoder,\n PhoneticTokenFilter,\n ShingleTokenFilter,\n SnowballTokenFilterLanguage,\n SnowballTokenFilter,\n StemmerTokenFilterLanguage,\n StemmerTokenFilter,\n StemmerOverrideTokenFilter,\n StopwordsList,\n StopwordsTokenFilter,\n SynonymTokenFilter,\n TruncateTokenFilter,\n UniqueTokenFilter,\n WordDelimiterTokenFilter,\n ClassicTokenizer,\n TokenCharacterKind,\n EdgeNGramTokenizer,\n MicrosoftTokenizerLanguage,\n MicrosoftLanguageTokenizer,\n MicrosoftStemmingTokenizerLanguage,\n MicrosoftLanguageStemmingTokenizer,\n NGramTokenizer,\n PathHierarchyTokenizerV2 as PathHierarchyTokenizer,\n UaxUrlEmailTokenizer,\n Suggester as SearchSuggester,\n AnalyzeResult,\n AnalyzedTokenInfo,\n ConditionalSkill,\n KeyPhraseExtractionSkill,\n OcrSkill,\n ImageAnalysisSkill,\n LanguageDetectionSkill,\n ShaperSkill,\n MergeSkill,\n EntityRecognitionSkill,\n SentimentSkill,\n CustomEntityLookupSkill,\n CustomEntityLookupSkillLanguage,\n KnownCustomEntityLookupSkillLanguage,\n DocumentExtractionSkill,\n CustomEntity,\n CustomEntityAlias,\n SplitSkill,\n PIIDetectionSkill,\n EntityRecognitionSkillV3,\n EntityLinkingSkill,\n SentimentSkillV3,\n TextTranslationSkill,\n WebApiSkill,\n SentimentSkillLanguage,\n KnownSentimentSkillLanguage,\n SplitSkillLanguage,\n KnownSplitSkillLanguage,\n TextSplitMode,\n KnownTextSplitMode,\n TextTranslationSkillLanguage,\n KnownTextTranslationSkillLanguage,\n DefaultCognitiveServicesAccount,\n CognitiveServicesAccountKey,\n InputFieldMappingEntry,\n OutputFieldMappingEntry,\n EntityCategory,\n KnownEntityCategory,\n EntityRecognitionSkillLanguage,\n KnownEntityRecognitionSkillLanguage,\n ImageAnalysisSkillLanguage,\n KnownImageAnalysisSkillLanguage,\n ImageDetail,\n KnownImageDetail,\n VisualFeature,\n KnownVisualFeature,\n KeyPhraseExtractionSkillLanguage,\n KnownKeyPhraseExtractionSkillLanguage,\n OcrSkillLanguage,\n KnownOcrSkillLanguage,\n FieldMapping,\n IndexingParameters,\n IndexingSchedule,\n FieldMappingFunction,\n SearchIndexerStatus,\n IndexerExecutionResult,\n SearchIndexerLimits,\n IndexerStatus,\n SearchIndexerError,\n IndexerExecutionStatus,\n SearchIndexerWarning,\n SearchIndexerDataContainer,\n SearchIndexerDataSourceType,\n KnownSearchIndexerDataSourceType,\n SoftDeleteColumnDeletionDetectionPolicy,\n SqlIntegratedChangeTrackingPolicy,\n HighWaterMarkChangeDetectionPolicy,\n SearchIndexerDataUserAssignedIdentity,\n SearchIndexerDataNoneIdentity,\n ServiceCounters,\n ServiceLimits,\n ResourceCounter,\n LexicalAnalyzerName,\n KnownLexicalAnalyzerName,\n ClassicSimilarity,\n BM25Similarity,\n IndexingParametersConfiguration,\n BlobIndexerDataToExtract,\n KnownBlobIndexerDataToExtract,\n IndexerExecutionEnvironment,\n BlobIndexerImageAction,\n KnownBlobIndexerImageAction,\n BlobIndexerParsingMode,\n KnownBlobIndexerParsingMode,\n BlobIndexerPDFTextRotationAlgorithm,\n KnownBlobIndexerPDFTextRotationAlgorithm,\n TokenFilter as BaseTokenFilter,\n Similarity,\n LexicalTokenizer as BaseLexicalTokenizer,\n CognitiveServicesAccount as BaseCognitiveServicesAccount,\n SearchIndexerSkill as BaseSearchIndexerSkill,\n ScoringFunction as BaseScoringFunction,\n DataChangeDetectionPolicy as BaseDataChangeDetectionPolicy,\n LexicalAnalyzer as BaseLexicalAnalyzer,\n CharFilter as BaseCharFilter,\n DataDeletionDetectionPolicy as BaseDataDeletionDetectionPolicy,\n LexicalNormalizerName,\n KnownLexicalNormalizerName,\n CustomNormalizer,\n TokenFilterName,\n KnownTokenFilterName,\n CharFilterName,\n KnownCharFilterName,\n LexicalNormalizer as BaseLexicalNormalizer,\n SearchIndexerKnowledgeStore,\n SearchIndexerKnowledgeStoreProjection,\n SearchIndexerKnowledgeStoreFileProjectionSelector,\n SearchIndexerKnowledgeStoreBlobProjectionSelector,\n SearchIndexerKnowledgeStoreProjectionSelector,\n SearchIndexerKnowledgeStoreObjectProjectionSelector,\n SearchIndexerKnowledgeStoreTableProjectionSelector,\n PIIDetectionSkillMaskingMode,\n KnownPIIDetectionSkillMaskingMode,\n LineEnding,\n KnownLineEnding,\n SearchIndexerDataIdentity as BaseSearchIndexerDataIdentity,\n SearchIndexerCache,\n IndexerState,\n IndexerExecutionStatusDetail,\n KnownIndexerExecutionStatusDetail,\n IndexingMode,\n KnownIndexingMode,\n SemanticSettings,\n SemanticConfiguration,\n PrioritizedFields,\n SemanticField\n} from \"./generated/service/models\";\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { createSynonymMapFromFile } from \"./synonymMapHelper\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"indexModels.js","sourceRoot":"","sources":["../../src/indexModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAwqBlC,6CAA6C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n QueryType,\n SearchMode,\n FacetResult,\n AutocompleteMode,\n IndexActionType,\n ScoringStatistics,\n QueryLanguage,\n Speller,\n Answers,\n CaptionResult,\n AnswerResult,\n Captions,\n QuerySpellerType,\n QueryAnswerType,\n QueryCaptionType\n} from \"./generated/data/models\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Options for performing the count operation on the index.\n */\nexport type CountDocumentsOptions = OperationOptions;\n/**\n * Options for retrieving completion text for a partial searchText.\n */\nexport type AutocompleteOptions<Fields> = OperationOptions & AutocompleteRequest<Fields>;\n/**\n * Options for committing a full search request.\n */\nexport type SearchOptions<Fields> = OperationOptions & SearchRequestOptions<Fields>;\n/**\n * Options for retrieving suggestions based on the searchText.\n */\nexport type SuggestOptions<Fields> = OperationOptions & SuggestRequest<Fields>;\n\n/**\n * Options for SearchIndexingBufferedSender.\n */\nexport interface SearchIndexingBufferedSenderOptions {\n /**\n * Indicates if autoFlush is enabled.\n */\n autoFlush?: boolean;\n /**\n * Initial Batch Action Count.\n *\n * A batch request will be sent once the documents\n * reach the initialBatchActionCount.\n */\n initialBatchActionCount?: number;\n /**\n * Flush Window.\n *\n * A batch request will be sent after flushWindowInMs is\n * reached.\n */\n flushWindowInMs?: number;\n /**\n * Maximum number of Retries\n */\n maxRetriesPerAction?: number;\n /**\n * Delay between retries\n */\n throttlingDelayInMs?: number;\n /**\n * Max Delay between retries\n */\n maxThrottlingDelayInMs?: number;\n}\n\n/**\n * Options for SearchIndexingBufferedSenderUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeOrUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderDeleteDocuments.\n */\nexport type SearchIndexingBufferedSenderDeleteDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderFlushDocuments.\n */\nexport type SearchIndexingBufferedSenderFlushDocumentsOptions = OperationOptions;\n\n/**\n * Options for retrieving a single document.\n */\nexport interface GetDocumentOptions<Fields> extends OperationOptions {\n /**\n * List of field names to retrieve for the document; Any field not retrieved will be missing from\n * the returned document.\n */\n selectedFields?: Fields[];\n}\n\n/**\n * Options for the modify index batch operation.\n */\nexport interface IndexDocumentsOptions extends OperationOptions {\n /**\n * If true, will cause this operation to throw if any document operation\n * in the batch did not succeed.\n */\n throwOnAnyFailure?: boolean;\n}\n\n/**\n * Options for the upload documents operation.\n */\nexport type UploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge documents operation.\n */\nexport type MergeDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge or upload documents operation.\n */\nexport type MergeOrUploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the delete documents operation.\n */\nexport type DeleteDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListSearchResultsPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * An iterator for search results of a paticular query. Will make requests\n * as needed during iteration. Use .byPage() to make one request to the server\n * per iteration.\n */\nexport type SearchIterator<Fields> = PagedAsyncIterableIterator<\n SearchResult<Fields>,\n SearchDocumentsPageResult<Fields>,\n ListSearchResultsPageSettings\n>;\n\n// BEGIN manually modified generated interfaces\n//\n// This section is for places where we have to manually fix issues\n// with interfaces from the generated code.\n// Mostly this is to allow modeling additionalProperties:true as generics.\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequest {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string;\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full'\n */\n queryType?: QueryType;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. The default is\n * 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global\n * scoring statistics can increase latency of search queries. Possible values include: 'Local',\n * 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help getting more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * A full-text search query expression; Use \"*\" or omit this parameter to match all documents.\n */\n searchText?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: string;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'Any', 'All'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies the language of the search query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * A value that specified the type of the speller to use to spell-correct individual search\n * query terms.\n */\n speller?: QuerySpellerType;\n /**\n * A value that specifies whether answers should be returned as part of the search response.\n */\n answers?: QueryAnswerType;\n /**\n * The comma-separated list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: string;\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * A value that specifies whether captions should be returned as part of the search response.\n */\n captions?: QueryCaptionType;\n /**\n * The comma-separated list of field names used for semantic search.\n */\n semanticFields?: string;\n}\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequestOptions<Fields> {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'simple', 'full'\n */\n queryType?: QueryType;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: Fields[];\n /**\n * The language of the query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * Improve search recall by spell-correcting individual search query terms.\n */\n speller?: Speller;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns answers\n * extracted from key passages in the highest ranked documents. The number of answers returned can\n * be configured by appending the pipe character '|' followed by the 'count-\\<number of answers\\>' option\n * after the answers parameter value, such as 'extractive|count-3'. Default count is 1.\n */\n answers?: Answers;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'any', 'all'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. Possible\n * values include: 'Local', 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help to get more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: Fields[];\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns captions\n * extracted from key passages in the highest ranked documents. When Captions is set to 'extractive',\n * highlighting is enabled by default, and can be configured by appending the pipe character '|'\n * followed by the 'highlight-true'/'highlight-false' option, such as 'extractive|highlight-true'. Defaults to 'None'.\n */\n captions?: Captions;\n /**\n * The list of field names used for semantic search.\n */\n semanticFields?: string[];\n}\n\n/**\n * Contains a document found by a search query, plus associated metadata.\n */\nexport type SearchResult<T> = {\n /**\n * The relevance score of the document compared to other documents returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly score: number;\n /**\n * The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly rerankerScore?: number;\n /**\n * Text fragments from the document that indicate the matching search terms, organized by each\n * applicable field; null if hit highlighting was not enabled for the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly highlights?: { [k in keyof T]?: string[] };\n /**\n * Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly captions?: CaptionResult[];\n\n document: T;\n};\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResultBase {\n /**\n * The total count of results found by the search operation, or null if the count was not\n * requested. If present, the count may be greater than the number of results in this response.\n * This can happen if you use the $top or $skip parameters, or if Azure Cognitive Search can't\n * return all the requested documents in a single Search response.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly count?: number;\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not specified in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n /**\n * The facet query results for the search operation, organized as a collection of buckets for\n * each faceted field; null if the query did not include any facet expressions.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly facets?: { [propertyName: string]: FacetResult[] };\n /**\n * The answers query results for the search operation; null if the answers query parameter was\n * not specified or set to 'none'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly answers?: AnswerResult[];\n}\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchIterator<T>;\n}\n\n/**\n * Response containing search page results from an index.\n */\nexport interface SearchDocumentsPageResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchResult<T>[];\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.\n */\nexport interface SuggestRequest<Fields> {\n /**\n * An OData expression that filters the documents considered for suggestions.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the suggestion query. Default is false.\n * When set to true, the query will find suggestions even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy suggestion searches are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting of suggestions is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting of suggestions is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * suggestion query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * The comma-separated list of field names to search for the specified search text. Target fields\n * must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The list of fields to retrieve. If unspecified, only the key field will be\n * included in the results.\n */\n select?: Fields[];\n /**\n * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is\n * 5.\n */\n top?: number;\n}\n\n/**\n * A result containing a document found by a suggestion query, plus associated metadata.\n */\nexport type SuggestResult<T> = {\n /**\n * The text of the suggestion result.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly text: string;\n document: T;\n};\n\n/**\n * Response containing suggestion query results from an index.\n */\nexport interface SuggestDocumentsResult<T> {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SuggestResult<T>[];\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not set in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n}\n\n/**\n * Parameters for fuzzy matching, and other autocomplete query behaviors.\n */\nexport interface AutocompleteRequest<Fields> {\n /**\n * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles\n * and 'oneTermWithContext' to use the current context while producing auto-completed terms.\n * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'\n */\n autocompleteMode?: AutocompleteMode;\n /**\n * An OData expression that filters the documents used to produce completed terms for the\n * Autocomplete result.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false.\n * When set to true, the query will autocomplete terms even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy autocomplete queries are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by an\n * autocomplete query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of field names to consider when querying for auto-completed terms.\n * Target fields must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The\n * default is 5.\n */\n top?: number;\n}\n\n/**\n * Represents an index action that operates on a document.\n */\nexport type IndexDocumentsAction<T> = {\n /**\n * The operation to perform on a document in an indexing batch. Possible values include:\n * 'upload', 'merge', 'mergeOrUpload', 'delete'\n */\n __actionType: IndexActionType;\n} & Partial<T>;\n\n// END manually modified generated interfaces\n"]}
1
+ {"version":3,"file":"indexModels.js","sourceRoot":"","sources":["../../src/indexModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AA6qBlC,6CAA6C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n QueryType,\n SearchMode,\n FacetResult,\n AutocompleteMode,\n IndexActionType,\n ScoringStatistics,\n QueryLanguage,\n Speller,\n Answers,\n CaptionResult,\n AnswerResult,\n Captions,\n QuerySpellerType,\n QueryAnswerType,\n QueryCaptionType\n} from \"./generated/data/models\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Options for performing the count operation on the index.\n */\nexport type CountDocumentsOptions = OperationOptions;\n/**\n * Options for retrieving completion text for a partial searchText.\n */\nexport type AutocompleteOptions<Fields> = OperationOptions & AutocompleteRequest<Fields>;\n/**\n * Options for committing a full search request.\n */\nexport type SearchOptions<Fields> = OperationOptions & SearchRequestOptions<Fields>;\n/**\n * Options for retrieving suggestions based on the searchText.\n */\nexport type SuggestOptions<Fields> = OperationOptions & SuggestRequest<Fields>;\n\n/**\n * Options for SearchIndexingBufferedSender.\n */\nexport interface SearchIndexingBufferedSenderOptions {\n /**\n * Indicates if autoFlush is enabled.\n */\n autoFlush?: boolean;\n /**\n * Initial Batch Action Count.\n *\n * A batch request will be sent once the documents\n * reach the initialBatchActionCount.\n */\n initialBatchActionCount?: number;\n /**\n * Flush Window.\n *\n * A batch request will be sent after flushWindowInMs is\n * reached.\n */\n flushWindowInMs?: number;\n /**\n * Maximum number of Retries\n */\n maxRetriesPerAction?: number;\n /**\n * Delay between retries\n */\n throttlingDelayInMs?: number;\n /**\n * Max Delay between retries\n */\n maxThrottlingDelayInMs?: number;\n}\n\n/**\n * Options for SearchIndexingBufferedSenderUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeOrUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderDeleteDocuments.\n */\nexport type SearchIndexingBufferedSenderDeleteDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderFlushDocuments.\n */\nexport type SearchIndexingBufferedSenderFlushDocumentsOptions = OperationOptions;\n\n/**\n * Options for retrieving a single document.\n */\nexport interface GetDocumentOptions<Fields> extends OperationOptions {\n /**\n * List of field names to retrieve for the document; Any field not retrieved will be missing from\n * the returned document.\n */\n selectedFields?: Fields[];\n}\n\n/**\n * Options for the modify index batch operation.\n */\nexport interface IndexDocumentsOptions extends OperationOptions {\n /**\n * If true, will cause this operation to throw if any document operation\n * in the batch did not succeed.\n */\n throwOnAnyFailure?: boolean;\n}\n\n/**\n * Options for the upload documents operation.\n */\nexport type UploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge documents operation.\n */\nexport type MergeDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge or upload documents operation.\n */\nexport type MergeOrUploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the delete documents operation.\n */\nexport type DeleteDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListSearchResultsPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * An iterator for search results of a paticular query. Will make requests\n * as needed during iteration. Use .byPage() to make one request to the server\n * per iteration.\n */\nexport type SearchIterator<Fields> = PagedAsyncIterableIterator<\n SearchResult<Fields>,\n SearchDocumentsPageResult<Fields>,\n ListSearchResultsPageSettings\n>;\n\n// BEGIN manually modified generated interfaces\n//\n// This section is for places where we have to manually fix issues\n// with interfaces from the generated code.\n// Mostly this is to allow modeling additionalProperties:true as generics.\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequest {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string;\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full'\n */\n queryType?: QueryType;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. The default is\n * 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global\n * scoring statistics can increase latency of search queries. Possible values include: 'Local',\n * 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help getting more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The name of a semantic configuration that will be used when processing documents for queries of\n * type semantic.\n */\n semanticConfiguration?: string;\n /**\n * A full-text search query expression; Use \"*\" or omit this parameter to match all documents.\n */\n searchText?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: string;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'Any', 'All'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies the language of the search query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * A value that specified the type of the speller to use to spell-correct individual search\n * query terms.\n */\n speller?: QuerySpellerType;\n /**\n * A value that specifies whether answers should be returned as part of the search response.\n */\n answers?: QueryAnswerType;\n /**\n * The comma-separated list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: string;\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * A value that specifies whether captions should be returned as part of the search response.\n */\n captions?: QueryCaptionType;\n /**\n * The comma-separated list of field names used for semantic search.\n */\n semanticFields?: string;\n}\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequestOptions<Fields> {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'simple', 'full'\n */\n queryType?: QueryType;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: Fields[];\n /**\n * The language of the query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * Improve search recall by spell-correcting individual search query terms.\n */\n speller?: Speller;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns answers\n * extracted from key passages in the highest ranked documents. The number of answers returned can\n * be configured by appending the pipe character '|' followed by the 'count-\\<number of answers\\>' option\n * after the answers parameter value, such as 'extractive|count-3'. Default count is 1.\n */\n answers?: Answers;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'any', 'all'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. Possible\n * values include: 'Local', 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help to get more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: Fields[];\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns captions\n * extracted from key passages in the highest ranked documents. When Captions is set to 'extractive',\n * highlighting is enabled by default, and can be configured by appending the pipe character '|'\n * followed by the 'highlight-true'/'highlight-false' option, such as 'extractive|highlight-true'. Defaults to 'None'.\n */\n captions?: Captions;\n /**\n * The list of field names used for semantic search.\n */\n semanticFields?: string[];\n}\n\n/**\n * Contains a document found by a search query, plus associated metadata.\n */\nexport type SearchResult<T> = {\n /**\n * The relevance score of the document compared to other documents returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly score: number;\n /**\n * The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly rerankerScore?: number;\n /**\n * Text fragments from the document that indicate the matching search terms, organized by each\n * applicable field; null if hit highlighting was not enabled for the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly highlights?: { [k in keyof T]?: string[] };\n /**\n * Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly captions?: CaptionResult[];\n\n document: T;\n};\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResultBase {\n /**\n * The total count of results found by the search operation, or null if the count was not\n * requested. If present, the count may be greater than the number of results in this response.\n * This can happen if you use the $top or $skip parameters, or if Azure Cognitive Search can't\n * return all the requested documents in a single Search response.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly count?: number;\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not specified in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n /**\n * The facet query results for the search operation, organized as a collection of buckets for\n * each faceted field; null if the query did not include any facet expressions.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly facets?: { [propertyName: string]: FacetResult[] };\n /**\n * The answers query results for the search operation; null if the answers query parameter was\n * not specified or set to 'none'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly answers?: AnswerResult[];\n}\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchIterator<T>;\n}\n\n/**\n * Response containing search page results from an index.\n */\nexport interface SearchDocumentsPageResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchResult<T>[];\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.\n */\nexport interface SuggestRequest<Fields> {\n /**\n * An OData expression that filters the documents considered for suggestions.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the suggestion query. Default is false.\n * When set to true, the query will find suggestions even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy suggestion searches are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting of suggestions is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting of suggestions is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * suggestion query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * The comma-separated list of field names to search for the specified search text. Target fields\n * must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The list of fields to retrieve. If unspecified, only the key field will be\n * included in the results.\n */\n select?: Fields[];\n /**\n * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is\n * 5.\n */\n top?: number;\n}\n\n/**\n * A result containing a document found by a suggestion query, plus associated metadata.\n */\nexport type SuggestResult<T> = {\n /**\n * The text of the suggestion result.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly text: string;\n document: T;\n};\n\n/**\n * Response containing suggestion query results from an index.\n */\nexport interface SuggestDocumentsResult<T> {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SuggestResult<T>[];\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not set in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n}\n\n/**\n * Parameters for fuzzy matching, and other autocomplete query behaviors.\n */\nexport interface AutocompleteRequest<Fields> {\n /**\n * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles\n * and 'oneTermWithContext' to use the current context while producing auto-completed terms.\n * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'\n */\n autocompleteMode?: AutocompleteMode;\n /**\n * An OData expression that filters the documents used to produce completed terms for the\n * Autocomplete result.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false.\n * When set to true, the query will autocomplete terms even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy autocomplete queries are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by an\n * autocomplete query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of field names to consider when querying for auto-completed terms.\n * Target fields must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The\n * default is 5.\n */\n top?: number;\n}\n\n/**\n * Represents an index action that operates on a document.\n */\nexport type IndexDocumentsAction<T> = {\n /**\n * The operation to perform on a document in an indexing batch. Possible values include:\n * 'upload', 'merge', 'mergeOrUpload', 'delete'\n */\n __actionType: IndexActionType;\n} & Partial<T>;\n\n// END manually modified generated interfaces\n"]}
@@ -554,7 +554,7 @@ export class SearchIndexerClient {
554
554
  * @param indexerName - The name of the indexer to reset documents for.
555
555
  * @param options - Additional optional arguments.
556
556
  */
557
- async resetDocs(indexerName, options = {}) {
557
+ async resetDocuments(indexerName, options = {}) {
558
558
  const { span, updatedOptions } = createSpan("SearchIndexerClient-resetDocs", options);
559
559
  try {
560
560
  await this.client.indexers.resetDocs(indexerName, Object.assign(Object.assign({}, updatedOptions), { keysOrIds: {
@@ -579,10 +579,10 @@ export class SearchIndexerClient {
579
579
  * @param skillNames - The names of skills to reset.
580
580
  * @param options - The options parameters.
581
581
  */
582
- async resetSkills(skillsetName, skillNames, options = {}) {
582
+ async resetSkills(skillsetName, options = {}) {
583
583
  const { span, updatedOptions } = createSpan("SearchIndexerClient-resetSkills", options);
584
584
  try {
585
- await this.client.skillsets.resetSkills(skillsetName, { skillNames }, updatedOptions);
585
+ await this.client.skillsets.resetSkills(skillsetName, { skillNames: options.skillNames }, updatedOptions);
586
586
  }
587
587
  catch (e) {
588
588
  span.setStatus({
@@ -1 +1 @@
1
- {"version":3,"file":"searchIndexerClient.js","sourceRoot":"","sources":["../../src/searchIndexerClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,C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F,IAAI;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,kCAC3C,cAAc,KACjB,SAAS,EAAE;oBACT,YAAY,EAAE,cAAc,CAAC,YAAY;oBACzC,qBAAqB,EAAE,cAAc,CAAC,qBAAqB;iBAC5D,IACD,CAAC;SACJ;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;aACnB,CAAC,CAAC;YACH,MAAM,CAAC,CAAC;SACT;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,WAAW,CACtB,YAAoB,EACpB,UAAoB,EACpB,UAA8B,EAAE;QAEhC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;QACxF,IAAI;YACF,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,EAAE,cAAc,CAAC,CAAC;SACvF;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;aACnB,CAAC,CAAC;YACH,MAAM,CAAC,CAAC;SACT;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants\";\nimport { SearchIndexerStatus } from \"./generated/service/models\";\nimport { SearchServiceClient as GeneratedClient } from \"./generated/service/searchServiceClient\";\nimport { logger } from \"./logger\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport {\n CreateOrUpdateSkillsetOptions,\n CreateSkillsetOptions,\n DeleteSkillsetOptions,\n GetSkillSetOptions,\n ListSkillsetsOptions,\n SearchIndexerSkillset,\n ListIndexersOptions,\n CreateIndexerOptions,\n GetIndexerOptions,\n CreateorUpdateIndexerOptions,\n DeleteIndexerOptions,\n GetIndexerStatusOptions,\n ResetIndexerOptions,\n RunIndexerOptions,\n ListDataSourceConnectionsOptions,\n SearchIndexer,\n SearchIndexerDataSourceConnection,\n CreateDataSourceConnectionOptions,\n DeleteDataSourceConnectionOptions,\n GetDataSourceConnectionOptions,\n CreateorUpdateDataSourceConnectionOptions,\n ResetDocsOptions,\n ResetSkillsOptions\n} from \"./serviceModels\";\nimport * as utils from \"./serviceUtils\";\nimport { createSpan } from \"./tracing\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\n\n/**\n * Client options used to configure Cognitive Search API requests.\n */\nexport interface SearchIndexerClientOptions extends CommonClientOptions {\n /**\n * The API version to use when communicating with the service.\n */\n apiVersion?: string;\n}\n\n/**\n * Class to perform operations to manage\n * (create, update, list/delete)\n * indexers, datasources & skillsets.\n */\nexport class SearchIndexerClient {\n /**\n * The API version to use when communicating with the service.\n */\n public readonly apiVersion: string = \"2020-06-30-Preview\";\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated SearchServiceClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * Creates an instance of SearchIndexerClient.\n *\n * Example usage:\n * ```ts\n * const { SearchIndexerClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchIndexerClient(\n * \"<endpoint>\",\n * new AzureKeyCredential(\"<Admin Key>\");\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n */\n constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: SearchIndexerClientOptions = {}\n ) {\n this.endpoint = endpoint;\n\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n if (!options.userAgentOptions) {\n options.userAgentOptions = {};\n }\n if (options.userAgentOptions.userAgentPrefix) {\n options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;\n } else {\n options.userAgentOptions.userAgentPrefix = libInfo;\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\"\n ]\n }\n }\n };\n\n let apiVersion = this.apiVersion;\n\n if (options.apiVersion) {\n if (![\"2020-06-30\", \"2021-04-30-Preview\"].includes(options.apiVersion)) {\n throw new Error(`Invalid Api Version: ${options.apiVersion}`);\n }\n apiVersion = options.apiVersion;\n }\n\n this.client = new GeneratedClient(this.endpoint, apiVersion, internalClientPipelineOptions);\n\n if (isTokenCredential(credential)) {\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: utils.DEFAULT_SEARCH_SCOPE })\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"minimal\"));\n }\n\n /**\n * Retrieves a list of existing indexers in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listIndexers(options: ListIndexersOptions = {}): Promise<Array<SearchIndexer>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listIndexers\", options);\n try {\n const result = await this.client.indexers.list(updatedOptions);\n return result.indexers.map(utils.generatedSearchIndexerToPublicSearchIndexer);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing indexers in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listIndexersNames(options: ListIndexersOptions = {}): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listIndexersNames\", options);\n try {\n const result = await this.client.indexers.list({\n ...updatedOptions,\n select: \"name\"\n });\n return result.indexers.map((idx) => idx.name);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of existing data sources in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listDataSourceConnections(\n options: ListDataSourceConnectionsOptions = {}\n ): Promise<Array<SearchIndexerDataSourceConnection>> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-listDataSourceConnections\",\n options\n );\n try {\n const result = await this.client.dataSources.list(updatedOptions);\n return result.dataSources.map(utils.generatedDataSourceToPublicDataSource);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing data sources in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listDataSourceConnectionsNames(\n options: ListDataSourceConnectionsOptions = {}\n ): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-listDataSourceConnectionsNames\",\n options\n );\n try {\n const result = await this.client.dataSources.list({\n ...updatedOptions,\n select: \"name\"\n });\n return result.dataSources.map((ds) => ds.name);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of existing Skillsets in the service.\n * @param options - Options to the list Skillsets operation.\n */\n public async listSkillsets(\n options: ListSkillsetsOptions = {}\n ): Promise<Array<SearchIndexerSkillset>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listSkillsets\", options);\n try {\n const result = await this.client.skillsets.list(updatedOptions);\n return result.skillsets.map(utils.generatedSkillsetToPublicSkillset);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing Skillsets in the service.\n * @param options - Options to the list Skillsets operation.\n */\n public async listSkillsetsNames(options: ListSkillsetsOptions = {}): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listSkillsetsNames\", options);\n try {\n const result = await this.client.skillsets.list({\n ...updatedOptions,\n select: \"name\"\n });\n return result.skillsets.map((sks) => sks.name);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about an Indexer.\n * @param indexerName - The name of the Indexer.\n * @param options - Additional optional arguments.\n */\n public async getIndexer(\n indexerName: string,\n options: GetIndexerOptions = {}\n ): Promise<SearchIndexer> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getIndexer\", options);\n try {\n const result = await this.client.indexers.get(indexerName, updatedOptions);\n return utils.generatedSearchIndexerToPublicSearchIndexer(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about a DataSource\n * @param dataSourceName - The name of the DataSource\n * @param options - Additional optional arguments\n */\n public async getDataSourceConnection(\n dataSourceConnectionName: string,\n options: GetDataSourceConnectionOptions = {}\n ): Promise<SearchIndexerDataSourceConnection> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-getDataSourceConnection\",\n options\n );\n try {\n const result = await this.client.dataSources.get(dataSourceConnectionName, updatedOptions);\n return utils.generatedDataSourceToPublicDataSource(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about an Skillset.\n * @param indexName - The name of the Skillset.\n * @param options - Additional optional arguments.\n */\n public async getSkillset(\n skillsetName: string,\n options: GetSkillSetOptions = {}\n ): Promise<SearchIndexerSkillset> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getSkillset\", options);\n try {\n const result = await this.client.skillsets.get(skillsetName, updatedOptions);\n return utils.generatedSkillsetToPublicSkillset(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new indexer in a search service.\n * @param indexer - The indexer definition to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createIndexer(\n indexer: SearchIndexer,\n options: CreateIndexerOptions = {}\n ): Promise<SearchIndexer> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createIndexer\", options);\n try {\n const result = await this.client.indexers.create(\n utils.publicSearchIndexerToGeneratedSearchIndexer(indexer),\n updatedOptions\n );\n return utils.generatedSearchIndexerToPublicSearchIndexer(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new dataSource in a search service.\n * @param dataSourceConnection - The dataSource definition to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createDataSourceConnection(\n dataSourceConnection: SearchIndexerDataSourceConnection,\n options: CreateDataSourceConnectionOptions = {}\n ): Promise<SearchIndexerDataSourceConnection> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createDataSourceConnection\",\n options\n );\n try {\n const result = await this.client.dataSources.create(\n utils.publicDataSourceToGeneratedDataSource(dataSourceConnection),\n updatedOptions\n );\n return utils.generatedDataSourceToPublicDataSource(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new skillset in a search service.\n * @param skillset - The skillset containing one or more skills to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createSkillset(\n skillset: SearchIndexerSkillset,\n options: CreateSkillsetOptions = {}\n ): Promise<SearchIndexerSkillset> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createSkillset\", options);\n try {\n const result = await this.client.skillsets.create(\n utils.publicSkillsetToGeneratedSkillset(skillset),\n updatedOptions\n );\n return utils.generatedSkillsetToPublicSkillset(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new indexer or modifies an existing one.\n * @param indexer - The information describing the indexer to be created/updated.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateIndexer(\n indexer: SearchIndexer,\n options: CreateorUpdateIndexerOptions = {}\n ): Promise<SearchIndexer> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createOrUpdateIndexer\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? indexer.etag : undefined;\n\n const result = await this.client.indexers.createOrUpdate(\n indexer.name,\n utils.publicSearchIndexerToGeneratedSearchIndexer(indexer),\n {\n ...updatedOptions,\n ifMatch: etag,\n skipIndexerResetRequirementForCache: options.skipIndexerResetRequirementForCache,\n disableCacheReprocessingChangeDetection: options.disableCacheReprocessingChangeDetection\n }\n );\n return utils.generatedSearchIndexerToPublicSearchIndexer(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new datasource or modifies an existing one.\n * @param dataSourceConnection - The information describing the datasource to be created/updated.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateDataSourceConnection(\n dataSourceConnection: SearchIndexerDataSourceConnection,\n options: CreateorUpdateDataSourceConnectionOptions = {}\n ): Promise<SearchIndexerDataSourceConnection> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createOrUpdateDataSourceConnection\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? dataSourceConnection.etag : undefined;\n\n const result = await this.client.dataSources.createOrUpdate(\n dataSourceConnection.name,\n utils.publicDataSourceToGeneratedDataSource(dataSourceConnection),\n {\n ...updatedOptions,\n ifMatch: etag,\n skipIndexerResetRequirementForCache: options.skipIndexerResetRequirementForCache\n }\n );\n return utils.generatedDataSourceToPublicDataSource(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new Skillset or modifies an existing one.\n * @param skillset - The information describing the index to be created.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateSkillset(\n skillset: SearchIndexerSkillset,\n options: CreateOrUpdateSkillsetOptions = {}\n ): Promise<SearchIndexerSkillset> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createOrUpdateSkillset\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? skillset.etag : undefined;\n\n const result = await this.client.skillsets.createOrUpdate(\n skillset.name,\n utils.publicSkillsetToGeneratedSkillset(skillset),\n {\n ...updatedOptions,\n ifMatch: etag,\n skipIndexerResetRequirementForCache: options.skipIndexerResetRequirementForCache,\n disableCacheReprocessingChangeDetection: options.disableCacheReprocessingChangeDetection\n }\n );\n\n return utils.generatedSkillsetToPublicSkillset(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing indexer.\n * @param indexer - Indexer/Name of the indexer to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteIndexer(\n indexer: string | SearchIndexer,\n options: DeleteIndexerOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-deleteIndexer\", options);\n try {\n const indexerName: string = typeof indexer === \"string\" ? indexer : indexer.name;\n const etag =\n typeof indexer === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? indexer.etag\n : undefined;\n\n await this.client.indexers.delete(indexerName, {\n ...updatedOptions,\n ifMatch: etag\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing datasource.\n * @param dataSource - Datasource/Name of the datasource to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteDataSourceConnection(\n dataSourceConnection: string | SearchIndexerDataSourceConnection,\n options: DeleteDataSourceConnectionOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-deleteDataSourceConnection\",\n options\n );\n try {\n const dataSourceConnectionName: string =\n typeof dataSourceConnection === \"string\" ? dataSourceConnection : dataSourceConnection.name;\n const etag =\n typeof dataSourceConnection === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? dataSourceConnection.etag\n : undefined;\n\n await this.client.dataSources.delete(dataSourceConnectionName, {\n ...updatedOptions,\n ifMatch: etag\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing Skillset.\n * @param skillset - Skillset/Name of the Skillset to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteSkillset(\n skillset: string | SearchIndexerSkillset,\n options: DeleteSkillsetOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-deleteSkillset\", options);\n try {\n const skillsetName: string = typeof skillset === \"string\" ? skillset : skillset.name;\n const etag =\n typeof skillset === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? skillset.etag\n : undefined;\n\n await this.client.skillsets.delete(skillsetName, {\n ...updatedOptions,\n ifMatch: etag\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the current status and execution history of an indexer.\n * @param indexerName - The name of the indexer.\n * @param options - Additional optional arguments.\n */\n public async getIndexerStatus(\n indexerName: string,\n options: GetIndexerStatusOptions = {}\n ): Promise<SearchIndexerStatus> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getIndexerStatus\", options);\n try {\n const result = await this.client.indexers.getStatus(indexerName, updatedOptions);\n return result;\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resets the change tracking state associated with an indexer.\n * @param indexerName - The name of the indexer to reset.\n * @param options - Additional optional arguments.\n */\n public async resetIndexer(indexerName: string, options: ResetIndexerOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-resetIndexer\", options);\n try {\n await this.client.indexers.reset(indexerName, updatedOptions);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Runs an indexer on-demand.\n * @param indexerName - The name of the indexer to run.\n * @param options - Additional optional arguments.\n */\n public async runIndexer(indexerName: string, options: RunIndexerOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-runIndexer\", options);\n try {\n await this.client.indexers.run(indexerName, updatedOptions);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resets specific documents in the datasource to be selectively re-ingested by the indexer.\n * @param indexerName - The name of the indexer to reset documents for.\n * @param options - Additional optional arguments.\n */\n public async resetDocs(indexerName: string, options: ResetDocsOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-resetDocs\", options);\n try {\n await this.client.indexers.resetDocs(indexerName, {\n ...updatedOptions,\n keysOrIds: {\n documentKeys: updatedOptions.documentKeys,\n datasourceDocumentIds: updatedOptions.datasourceDocumentIds\n }\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Reset an existing skillset in a search service.\n * @param skillsetName - The name of the skillset to reset.\n * @param skillNames - The names of skills to reset.\n * @param options - The options parameters.\n */\n public async resetSkills(\n skillsetName: string,\n skillNames: string[],\n options: ResetSkillsOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-resetSkills\", options);\n try {\n await this.client.skillsets.resetSkills(skillsetName, { skillNames }, updatedOptions);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"searchIndexerClient.js","sourceRoot":"","sources":["../../src/searchIndexerClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,mBAAmB,IAAI,eAAe,EAAE,MAAM,yCAAyC,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AA0BpF,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAYlE;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAkB9B;;;;;;;;;;;;;;;OAeG;IACH,YACE,QAAgB,EAChB,UAA2C,EAC3C,UAAsC,EAAE;QApC1C;;WAEG;QACa,eAAU,GAAW,oBAAoB,CAAC;QAmCxD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,MAAM,OAAO,GAAG,6BAA6B,W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W,CACrC,YAAY,EACZ,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,EAClC,cAAc,CACf,CAAC;SACH;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,cAAc,CAAC,KAAK;gBAC1B,OAAO,EAAE,CAAC,CAAC,OAAO;aACnB,CAAC,CAAC;YACH,MAAM,CAAC,CAAC;SACT;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants\";\nimport { SearchIndexerStatus } from \"./generated/service/models\";\nimport { SearchServiceClient as GeneratedClient } from \"./generated/service/searchServiceClient\";\nimport { logger } from \"./logger\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport {\n CreateOrUpdateSkillsetOptions,\n CreateSkillsetOptions,\n DeleteSkillsetOptions,\n GetSkillSetOptions,\n ListSkillsetsOptions,\n SearchIndexerSkillset,\n ListIndexersOptions,\n CreateIndexerOptions,\n GetIndexerOptions,\n CreateorUpdateIndexerOptions,\n DeleteIndexerOptions,\n GetIndexerStatusOptions,\n ResetIndexerOptions,\n RunIndexerOptions,\n ListDataSourceConnectionsOptions,\n SearchIndexer,\n SearchIndexerDataSourceConnection,\n CreateDataSourceConnectionOptions,\n DeleteDataSourceConnectionOptions,\n GetDataSourceConnectionOptions,\n CreateorUpdateDataSourceConnectionOptions,\n ResetDocumentsOptions,\n ResetSkillsOptions\n} from \"./serviceModels\";\nimport * as utils from \"./serviceUtils\";\nimport { createSpan } from \"./tracing\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\n\n/**\n * Client options used to configure Cognitive Search API requests.\n */\nexport interface SearchIndexerClientOptions extends CommonClientOptions {\n /**\n * The API version to use when communicating with the service.\n */\n apiVersion?: string;\n}\n\n/**\n * Class to perform operations to manage\n * (create, update, list/delete)\n * indexers, datasources & skillsets.\n */\nexport class SearchIndexerClient {\n /**\n * The API version to use when communicating with the service.\n */\n public readonly apiVersion: string = \"2020-06-30-Preview\";\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated SearchServiceClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * Creates an instance of SearchIndexerClient.\n *\n * Example usage:\n * ```ts\n * const { SearchIndexerClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchIndexerClient(\n * \"<endpoint>\",\n * new AzureKeyCredential(\"<Admin Key>\");\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n */\n constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: SearchIndexerClientOptions = {}\n ) {\n this.endpoint = endpoint;\n\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n if (!options.userAgentOptions) {\n options.userAgentOptions = {};\n }\n if (options.userAgentOptions.userAgentPrefix) {\n options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;\n } else {\n options.userAgentOptions.userAgentPrefix = libInfo;\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\"\n ]\n }\n }\n };\n\n let apiVersion = this.apiVersion;\n\n if (options.apiVersion) {\n if (![\"2020-06-30\", \"2021-04-30-Preview\"].includes(options.apiVersion)) {\n throw new Error(`Invalid Api Version: ${options.apiVersion}`);\n }\n apiVersion = options.apiVersion;\n }\n\n this.client = new GeneratedClient(this.endpoint, apiVersion, internalClientPipelineOptions);\n\n if (isTokenCredential(credential)) {\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: utils.DEFAULT_SEARCH_SCOPE })\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"minimal\"));\n }\n\n /**\n * Retrieves a list of existing indexers in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listIndexers(options: ListIndexersOptions = {}): Promise<Array<SearchIndexer>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listIndexers\", options);\n try {\n const result = await this.client.indexers.list(updatedOptions);\n return result.indexers.map(utils.generatedSearchIndexerToPublicSearchIndexer);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing indexers in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listIndexersNames(options: ListIndexersOptions = {}): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listIndexersNames\", options);\n try {\n const result = await this.client.indexers.list({\n ...updatedOptions,\n select: \"name\"\n });\n return result.indexers.map((idx) => idx.name);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of existing data sources in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listDataSourceConnections(\n options: ListDataSourceConnectionsOptions = {}\n ): Promise<Array<SearchIndexerDataSourceConnection>> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-listDataSourceConnections\",\n options\n );\n try {\n const result = await this.client.dataSources.list(updatedOptions);\n return result.dataSources.map(utils.generatedDataSourceToPublicDataSource);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing data sources in the service.\n * @param options - Options to the list indexers operation.\n */\n public async listDataSourceConnectionsNames(\n options: ListDataSourceConnectionsOptions = {}\n ): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-listDataSourceConnectionsNames\",\n options\n );\n try {\n const result = await this.client.dataSources.list({\n ...updatedOptions,\n select: \"name\"\n });\n return result.dataSources.map((ds) => ds.name);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of existing Skillsets in the service.\n * @param options - Options to the list Skillsets operation.\n */\n public async listSkillsets(\n options: ListSkillsetsOptions = {}\n ): Promise<Array<SearchIndexerSkillset>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listSkillsets\", options);\n try {\n const result = await this.client.skillsets.list(updatedOptions);\n return result.skillsets.map(utils.generatedSkillsetToPublicSkillset);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves a list of names of existing Skillsets in the service.\n * @param options - Options to the list Skillsets operation.\n */\n public async listSkillsetsNames(options: ListSkillsetsOptions = {}): Promise<Array<string>> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-listSkillsetsNames\", options);\n try {\n const result = await this.client.skillsets.list({\n ...updatedOptions,\n select: \"name\"\n });\n return result.skillsets.map((sks) => sks.name);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about an Indexer.\n * @param indexerName - The name of the Indexer.\n * @param options - Additional optional arguments.\n */\n public async getIndexer(\n indexerName: string,\n options: GetIndexerOptions = {}\n ): Promise<SearchIndexer> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getIndexer\", options);\n try {\n const result = await this.client.indexers.get(indexerName, updatedOptions);\n return utils.generatedSearchIndexerToPublicSearchIndexer(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about a DataSource\n * @param dataSourceName - The name of the DataSource\n * @param options - Additional optional arguments\n */\n public async getDataSourceConnection(\n dataSourceConnectionName: string,\n options: GetDataSourceConnectionOptions = {}\n ): Promise<SearchIndexerDataSourceConnection> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-getDataSourceConnection\",\n options\n );\n try {\n const result = await this.client.dataSources.get(dataSourceConnectionName, updatedOptions);\n return utils.generatedDataSourceToPublicDataSource(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieves information about an Skillset.\n * @param indexName - The name of the Skillset.\n * @param options - Additional optional arguments.\n */\n public async getSkillset(\n skillsetName: string,\n options: GetSkillSetOptions = {}\n ): Promise<SearchIndexerSkillset> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getSkillset\", options);\n try {\n const result = await this.client.skillsets.get(skillsetName, updatedOptions);\n return utils.generatedSkillsetToPublicSkillset(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new indexer in a search service.\n * @param indexer - The indexer definition to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createIndexer(\n indexer: SearchIndexer,\n options: CreateIndexerOptions = {}\n ): Promise<SearchIndexer> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createIndexer\", options);\n try {\n const result = await this.client.indexers.create(\n utils.publicSearchIndexerToGeneratedSearchIndexer(indexer),\n updatedOptions\n );\n return utils.generatedSearchIndexerToPublicSearchIndexer(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new dataSource in a search service.\n * @param dataSourceConnection - The dataSource definition to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createDataSourceConnection(\n dataSourceConnection: SearchIndexerDataSourceConnection,\n options: CreateDataSourceConnectionOptions = {}\n ): Promise<SearchIndexerDataSourceConnection> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createDataSourceConnection\",\n options\n );\n try {\n const result = await this.client.dataSources.create(\n utils.publicDataSourceToGeneratedDataSource(dataSourceConnection),\n updatedOptions\n );\n return utils.generatedDataSourceToPublicDataSource(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new skillset in a search service.\n * @param skillset - The skillset containing one or more skills to create in a search service.\n * @param options - Additional optional arguments.\n */\n public async createSkillset(\n skillset: SearchIndexerSkillset,\n options: CreateSkillsetOptions = {}\n ): Promise<SearchIndexerSkillset> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-createSkillset\", options);\n try {\n const result = await this.client.skillsets.create(\n utils.publicSkillsetToGeneratedSkillset(skillset),\n updatedOptions\n );\n return utils.generatedSkillsetToPublicSkillset(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new indexer or modifies an existing one.\n * @param indexer - The information describing the indexer to be created/updated.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateIndexer(\n indexer: SearchIndexer,\n options: CreateorUpdateIndexerOptions = {}\n ): Promise<SearchIndexer> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createOrUpdateIndexer\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? indexer.etag : undefined;\n\n const result = await this.client.indexers.createOrUpdate(\n indexer.name,\n utils.publicSearchIndexerToGeneratedSearchIndexer(indexer),\n {\n ...updatedOptions,\n ifMatch: etag,\n skipIndexerResetRequirementForCache: options.skipIndexerResetRequirementForCache,\n disableCacheReprocessingChangeDetection: options.disableCacheReprocessingChangeDetection\n }\n );\n return utils.generatedSearchIndexerToPublicSearchIndexer(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new datasource or modifies an existing one.\n * @param dataSourceConnection - The information describing the datasource to be created/updated.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateDataSourceConnection(\n dataSourceConnection: SearchIndexerDataSourceConnection,\n options: CreateorUpdateDataSourceConnectionOptions = {}\n ): Promise<SearchIndexerDataSourceConnection> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createOrUpdateDataSourceConnection\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? dataSourceConnection.etag : undefined;\n\n const result = await this.client.dataSources.createOrUpdate(\n dataSourceConnection.name,\n utils.publicDataSourceToGeneratedDataSource(dataSourceConnection),\n {\n ...updatedOptions,\n ifMatch: etag,\n skipIndexerResetRequirementForCache: options.skipIndexerResetRequirementForCache\n }\n );\n return utils.generatedDataSourceToPublicDataSource(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new Skillset or modifies an existing one.\n * @param skillset - The information describing the index to be created.\n * @param options - Additional optional arguments.\n */\n public async createOrUpdateSkillset(\n skillset: SearchIndexerSkillset,\n options: CreateOrUpdateSkillsetOptions = {}\n ): Promise<SearchIndexerSkillset> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-createOrUpdateSkillset\",\n options\n );\n try {\n const etag = options.onlyIfUnchanged ? skillset.etag : undefined;\n\n const result = await this.client.skillsets.createOrUpdate(\n skillset.name,\n utils.publicSkillsetToGeneratedSkillset(skillset),\n {\n ...updatedOptions,\n ifMatch: etag,\n skipIndexerResetRequirementForCache: options.skipIndexerResetRequirementForCache,\n disableCacheReprocessingChangeDetection: options.disableCacheReprocessingChangeDetection\n }\n );\n\n return utils.generatedSkillsetToPublicSkillset(result);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing indexer.\n * @param indexer - Indexer/Name of the indexer to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteIndexer(\n indexer: string | SearchIndexer,\n options: DeleteIndexerOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-deleteIndexer\", options);\n try {\n const indexerName: string = typeof indexer === \"string\" ? indexer : indexer.name;\n const etag =\n typeof indexer === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? indexer.etag\n : undefined;\n\n await this.client.indexers.delete(indexerName, {\n ...updatedOptions,\n ifMatch: etag\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing datasource.\n * @param dataSource - Datasource/Name of the datasource to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteDataSourceConnection(\n dataSourceConnection: string | SearchIndexerDataSourceConnection,\n options: DeleteDataSourceConnectionOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\n \"SearchIndexerClient-deleteDataSourceConnection\",\n options\n );\n try {\n const dataSourceConnectionName: string =\n typeof dataSourceConnection === \"string\" ? dataSourceConnection : dataSourceConnection.name;\n const etag =\n typeof dataSourceConnection === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? dataSourceConnection.etag\n : undefined;\n\n await this.client.dataSources.delete(dataSourceConnectionName, {\n ...updatedOptions,\n ifMatch: etag\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes an existing Skillset.\n * @param skillset - Skillset/Name of the Skillset to delete.\n * @param options - Additional optional arguments.\n */\n public async deleteSkillset(\n skillset: string | SearchIndexerSkillset,\n options: DeleteSkillsetOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-deleteSkillset\", options);\n try {\n const skillsetName: string = typeof skillset === \"string\" ? skillset : skillset.name;\n const etag =\n typeof skillset === \"string\"\n ? undefined\n : options.onlyIfUnchanged\n ? skillset.etag\n : undefined;\n\n await this.client.skillsets.delete(skillsetName, {\n ...updatedOptions,\n ifMatch: etag\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns the current status and execution history of an indexer.\n * @param indexerName - The name of the indexer.\n * @param options - Additional optional arguments.\n */\n public async getIndexerStatus(\n indexerName: string,\n options: GetIndexerStatusOptions = {}\n ): Promise<SearchIndexerStatus> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-getIndexerStatus\", options);\n try {\n const result = await this.client.indexers.getStatus(indexerName, updatedOptions);\n return result;\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resets the change tracking state associated with an indexer.\n * @param indexerName - The name of the indexer to reset.\n * @param options - Additional optional arguments.\n */\n public async resetIndexer(indexerName: string, options: ResetIndexerOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-resetIndexer\", options);\n try {\n await this.client.indexers.reset(indexerName, updatedOptions);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Runs an indexer on-demand.\n * @param indexerName - The name of the indexer to run.\n * @param options - Additional optional arguments.\n */\n public async runIndexer(indexerName: string, options: RunIndexerOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-runIndexer\", options);\n try {\n await this.client.indexers.run(indexerName, updatedOptions);\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Resets specific documents in the datasource to be selectively re-ingested by the indexer.\n * @param indexerName - The name of the indexer to reset documents for.\n * @param options - Additional optional arguments.\n */\n public async resetDocuments(\n indexerName: string,\n options: ResetDocumentsOptions = {}\n ): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-resetDocs\", options);\n try {\n await this.client.indexers.resetDocs(indexerName, {\n ...updatedOptions,\n keysOrIds: {\n documentKeys: updatedOptions.documentKeys,\n datasourceDocumentIds: updatedOptions.datasourceDocumentIds\n }\n });\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Reset an existing skillset in a search service.\n * @param skillsetName - The name of the skillset to reset.\n * @param skillNames - The names of skills to reset.\n * @param options - The options parameters.\n */\n public async resetSkills(skillsetName: string, options: ResetSkillsOptions = {}): Promise<void> {\n const { span, updatedOptions } = createSpan(\"SearchIndexerClient-resetSkills\", options);\n try {\n await this.client.skillsets.resetSkills(\n skillsetName,\n { skillNames: options.skillNames },\n updatedOptions\n );\n } catch (e) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message\n });\n throw e;\n } finally {\n span.end();\n }\n }\n}\n"]}
@@ -29,7 +29,7 @@ function walk(start, mapper) {
29
29
  const current = queue.shift();
30
30
  if (typeof current.value === "object" && current.value !== null) {
31
31
  if (seenMarker.has(current.value)) {
32
- throw new Error("Cannot map a recusive structure.");
32
+ continue;
33
33
  }
34
34
  else {
35
35
  seenMarker.set(current.value, true);
@@ -1 +1 @@
1
- {"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../src/serialization.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;A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AAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,OAAO,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,WAAW,IAAI,OAAO,CAAC,YAAY,EAAE;YAC9C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;gBAC/B,OAAO,KAAK,CAAC;aACd;SACF;KACF;IAED,IAAI,OAAO,CAAC,iBAAiB,EAAE;QAC7B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE;gBACnC,OAAO,KAAK,CAAC;aACd;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport GeographyPoint from \"./geographyPoint\";\n\nconst ISO8601DateRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$/i;\nconst GeoJSONPointTypeName = \"Point\";\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\n\nexport function serialize<OutputT>(obj: unknown): OutputT {\n return walk(obj, (value) => {\n const result = serializeSpecialNumbers(value);\n return result;\n });\n}\n\nexport function deserialize<OutputT>(obj: unknown): OutputT {\n return walk(obj, (value) => {\n let result = deserializeSpecialNumbers(value);\n result = deserializeDates(result);\n result = deserializeGeoPoint(result);\n return result;\n });\n}\n\nfunction walk(start: unknown, mapper: (val: any) => any): any {\n // eslint-disable-next-line @typescript-eslint/ban-types\n const seenMarker = new WeakMap<object, boolean>();\n const result = { value: undefined };\n const queue: { value: any; parent: any; key: string }[] = [\n { value: start, parent: result, key: \"value\" }\n ];\n\n while (queue.length) {\n const current = queue.shift()!;\n\n if (typeof current.value === \"object\" && current.value !== null) {\n if (seenMarker.has(current.value)) {\n throw new Error(\"Cannot map a recusive structure.\");\n } else {\n seenMarker.set(current.value, true);\n }\n }\n\n const mapped = mapper(current.value);\n if (current?.parent && current.key) {\n current.parent[current.key] = mapped;\n }\n if (typeof mapped === \"object\" && mapped !== null) {\n for (const key of Object.keys(mapped)) {\n queue.push({\n value: mapped[key],\n parent: mapped,\n key\n });\n }\n }\n }\n\n return result.value;\n}\n\nfunction serializeSpecialNumbers(input: unknown): unknown {\n if (typeof input === \"number\") {\n if (isNaN(input)) {\n return \"NaN\";\n } else if (input === Infinity) {\n return \"INF\";\n } else if (input === -Infinity) {\n return \"-INF\";\n }\n }\n return input;\n}\n\nfunction deserializeSpecialNumbers(input: unknown): unknown {\n if (typeof input === \"string\") {\n if (input === \"NaN\") {\n return NaN;\n } else if (input === \"INF\") {\n return Infinity;\n } else if (input === \"-INF\") {\n return -Infinity;\n }\n }\n return input;\n}\n\nfunction deserializeDates(input: unknown): Date | unknown {\n if (typeof input === \"string\") {\n if (ISO8601DateRegex.test(input)) {\n return new Date(input);\n }\n }\n return input;\n}\n\nfunction deserializeGeoPoint(input: unknown): GeographyPoint | unknown {\n if (isGeoJSONPoint(input)) {\n return new GeographyPoint({ longitude: input.coordinates[0], latitude: input.coordinates[1] });\n }\n\n return input;\n}\n\ninterface GeoJSONPoint {\n type: \"Point\";\n coordinates: [number, number];\n crs: {\n type: \"name\";\n properties: {\n name: \"EPSG:4326\";\n };\n };\n}\n\nfunction isGeoJSONPoint(obj: any): obj is GeoJSONPoint {\n const requiredKeys = [\"type\", \"coordinates\"];\n return isValidObject(obj, {\n requiredKeys,\n propertyValidator: (key) => {\n switch (key) {\n case \"type\":\n return obj.type === GeoJSONPointTypeName;\n break;\n case \"coordinates\":\n return isCoordinateArray(obj.coordinates);\n break;\n case \"crs\":\n return isCrs(obj.crs);\n break;\n default:\n return false;\n }\n }\n });\n}\n\nfunction isCoordinateArray(maybeCoordinates: any): boolean {\n if (!Array.isArray(maybeCoordinates)) {\n return false;\n }\n if (maybeCoordinates.length !== 2) {\n return false;\n }\n if (typeof maybeCoordinates[0] !== \"number\" || typeof maybeCoordinates[1] !== \"number\") {\n return false;\n }\n return true;\n}\n\nfunction isCrs(maybeCrs: any): boolean {\n return isValidObject(maybeCrs, {\n requiredKeys: [\"type\", \"properties\"],\n propertyValidator: (key) => {\n switch (key) {\n case \"type\":\n return maybeCrs.type === \"name\";\n break;\n case \"properties\":\n return isCrsProperties(maybeCrs.properties);\n break;\n default:\n return false;\n }\n }\n });\n}\n\nfunction isCrsProperties(maybeProperties: any): boolean {\n return isValidObject(maybeProperties, {\n requiredKeys: [\"name\"],\n propertyValidator: (key) => {\n if (key === \"name\") {\n return maybeProperties.name === WorldGeodeticSystem1984;\n } else {\n return false;\n }\n }\n });\n}\n\nfunction isValidObject(\n obj: any,\n options: {\n requiredKeys?: string[];\n propertyValidator?: (keyName: string) => boolean;\n } = {}\n): boolean {\n if (typeof obj !== \"object\" || obj === null) {\n return false;\n }\n\n const keys = Object.keys(obj);\n\n if (options.requiredKeys) {\n for (const requiredKey of options.requiredKeys) {\n if (!keys.includes(requiredKey)) {\n return false;\n }\n }\n }\n\n if (options.propertyValidator) {\n for (const key of keys) {\n if (!options.propertyValidator(key)) {\n return false;\n }\n }\n }\n\n return true;\n}\n"]}
1
+ {"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../src/serialization.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,gBAAgB,GAAG,mDAAmD,CAAC;AAC7E,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,uBAAuB,GAAG,WAAW,CAAC,CAAC,2BAA2B;AAExE,MAAM,UAAU,SAAS,CAAU,GAAY;IAC7C,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;QACzB,MAAM,MAAM,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,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AAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport GeographyPoint from \"./geographyPoint\";\n\nconst ISO8601DateRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$/i;\nconst GeoJSONPointTypeName = \"Point\";\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\n\nexport function serialize<OutputT>(obj: unknown): OutputT {\n return walk(obj, (value) => {\n const result = serializeSpecialNumbers(value);\n return result;\n });\n}\n\nexport function deserialize<OutputT>(obj: unknown): OutputT {\n return walk(obj, (value) => {\n let result = deserializeSpecialNumbers(value);\n result = deserializeDates(result);\n result = deserializeGeoPoint(result);\n return result;\n });\n}\n\nfunction walk(start: unknown, mapper: (val: any) => any): any {\n // eslint-disable-next-line @typescript-eslint/ban-types\n const seenMarker = new WeakMap<object, boolean>();\n const result = { value: undefined };\n const queue: { value: any; parent: any; key: string }[] = [\n { value: start, parent: result, key: \"value\" }\n ];\n\n while (queue.length) {\n const current = queue.shift()!;\n\n if (typeof current.value === \"object\" && current.value !== null) {\n if (seenMarker.has(current.value)) {\n continue;\n } else {\n seenMarker.set(current.value, true);\n }\n }\n\n const mapped = mapper(current.value);\n if (current?.parent && current.key) {\n current.parent[current.key] = mapped;\n }\n if (typeof mapped === \"object\" && mapped !== null) {\n for (const key of Object.keys(mapped)) {\n queue.push({\n value: mapped[key],\n parent: mapped,\n key\n });\n }\n }\n }\n\n return result.value;\n}\n\nfunction serializeSpecialNumbers(input: unknown): unknown {\n if (typeof input === \"number\") {\n if (isNaN(input)) {\n return \"NaN\";\n } else if (input === Infinity) {\n return \"INF\";\n } else if (input === -Infinity) {\n return \"-INF\";\n }\n }\n return input;\n}\n\nfunction deserializeSpecialNumbers(input: unknown): unknown {\n if (typeof input === \"string\") {\n if (input === \"NaN\") {\n return NaN;\n } else if (input === \"INF\") {\n return Infinity;\n } else if (input === \"-INF\") {\n return -Infinity;\n }\n }\n return input;\n}\n\nfunction deserializeDates(input: unknown): Date | unknown {\n if (typeof input === \"string\") {\n if (ISO8601DateRegex.test(input)) {\n return new Date(input);\n }\n }\n return input;\n}\n\nfunction deserializeGeoPoint(input: unknown): GeographyPoint | unknown {\n if (isGeoJSONPoint(input)) {\n return new GeographyPoint({ longitude: input.coordinates[0], latitude: input.coordinates[1] });\n }\n\n return input;\n}\n\ninterface GeoJSONPoint {\n type: \"Point\";\n coordinates: [number, number];\n crs: {\n type: \"name\";\n properties: {\n name: \"EPSG:4326\";\n };\n };\n}\n\nfunction isGeoJSONPoint(obj: any): obj is GeoJSONPoint {\n const requiredKeys = [\"type\", \"coordinates\"];\n return isValidObject(obj, {\n requiredKeys,\n propertyValidator: (key) => {\n switch (key) {\n case \"type\":\n return obj.type === GeoJSONPointTypeName;\n break;\n case \"coordinates\":\n return isCoordinateArray(obj.coordinates);\n break;\n case \"crs\":\n return isCrs(obj.crs);\n break;\n default:\n return false;\n }\n }\n });\n}\n\nfunction isCoordinateArray(maybeCoordinates: any): boolean {\n if (!Array.isArray(maybeCoordinates)) {\n return false;\n }\n if (maybeCoordinates.length !== 2) {\n return false;\n }\n if (typeof maybeCoordinates[0] !== \"number\" || typeof maybeCoordinates[1] !== \"number\") {\n return false;\n }\n return true;\n}\n\nfunction isCrs(maybeCrs: any): boolean {\n return isValidObject(maybeCrs, {\n requiredKeys: [\"type\", \"properties\"],\n propertyValidator: (key) => {\n switch (key) {\n case \"type\":\n return maybeCrs.type === \"name\";\n break;\n case \"properties\":\n return isCrsProperties(maybeCrs.properties);\n break;\n default:\n return false;\n }\n }\n });\n}\n\nfunction isCrsProperties(maybeProperties: any): boolean {\n return isValidObject(maybeProperties, {\n requiredKeys: [\"name\"],\n propertyValidator: (key) => {\n if (key === \"name\") {\n return maybeProperties.name === WorldGeodeticSystem1984;\n } else {\n return false;\n }\n }\n });\n}\n\nfunction isValidObject(\n obj: any,\n options: {\n requiredKeys?: string[];\n propertyValidator?: (keyName: string) => boolean;\n } = {}\n): boolean {\n if (typeof obj !== \"object\" || obj === null) {\n return false;\n }\n\n const keys = Object.keys(obj);\n\n if (options.requiredKeys) {\n for (const requiredKey of options.requiredKeys) {\n if (!keys.includes(requiredKey)) {\n return false;\n }\n }\n }\n\n if (options.propertyValidator) {\n for (const key of keys) {\n if (!options.propertyValidator(key)) {\n return false;\n }\n }\n }\n\n return true;\n}\n"]}