@azure/search-documents 13.0.0 → 13.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.d.ts +5 -5
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +3 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/indexModels.d.ts +35 -1
- package/dist/browser/indexModels.d.ts.map +1 -1
- package/dist/browser/indexModels.js.map +1 -1
- package/dist/browser/knowledgeBaseModels.d.ts +27 -1
- package/dist/browser/knowledgeBaseModels.d.ts.map +1 -1
- package/dist/browser/knowledgeBaseModels.js.map +1 -1
- package/dist/browser/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +1 -1
- package/dist/browser/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -1
- package/dist/browser/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
- package/dist/browser/knowledgeBaseRetrieval/api/operations.js +4 -1
- package/dist/browser/knowledgeBaseRetrieval/api/operations.js.map +1 -1
- package/dist/browser/knowledgeBaseRetrieval/api/options.d.ts +2 -0
- package/dist/browser/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
- package/dist/browser/knowledgeBaseRetrieval/api/options.js.map +1 -1
- package/dist/browser/models/azure/search/documents/index.d.ts +2 -2
- package/dist/browser/models/azure/search/documents/index.d.ts.map +1 -1
- package/dist/browser/models/azure/search/documents/index.js +1 -1
- package/dist/browser/models/azure/search/documents/index.js.map +1 -1
- package/dist/browser/models/azure/search/documents/indexes/index.d.ts +2 -2
- package/dist/browser/models/azure/search/documents/indexes/index.d.ts.map +1 -1
- package/dist/browser/models/azure/search/documents/indexes/index.js +1 -1
- package/dist/browser/models/azure/search/documents/indexes/index.js.map +1 -1
- package/dist/browser/models/azure/search/documents/indexes/models.d.ts +994 -155
- package/dist/browser/models/azure/search/documents/indexes/models.d.ts.map +1 -1
- package/dist/browser/models/azure/search/documents/indexes/models.js +1267 -159
- package/dist/browser/models/azure/search/documents/indexes/models.js.map +1 -1
- package/dist/browser/models/azure/search/documents/knowledgeBases/index.d.ts +2 -2
- package/dist/browser/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
- package/dist/browser/models/azure/search/documents/knowledgeBases/index.js +1 -1
- package/dist/browser/models/azure/search/documents/knowledgeBases/index.js.map +1 -1
- package/dist/browser/models/azure/search/documents/knowledgeBases/models.d.ts +716 -96
- package/dist/browser/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
- package/dist/browser/models/azure/search/documents/knowledgeBases/models.js +899 -77
- package/dist/browser/models/azure/search/documents/knowledgeBases/models.js.map +1 -1
- package/dist/browser/models/azure/search/documents/models.d.ts +467 -3
- package/dist/browser/models/azure/search/documents/models.d.ts.map +1 -1
- package/dist/browser/models/azure/search/documents/models.js +435 -7
- package/dist/browser/models/azure/search/documents/models.js.map +1 -1
- package/dist/browser/models/index.d.ts +2 -1
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js +1 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +37 -2
- package/dist/browser/models/models.d.ts.map +1 -1
- package/dist/browser/models/models.js +29 -1
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/search/api/operations.d.ts.map +1 -1
- package/dist/browser/search/api/operations.js +48 -11
- package/dist/browser/search/api/operations.js.map +1 -1
- package/dist/browser/search/api/options.d.ts +31 -1
- package/dist/browser/search/api/options.d.ts.map +1 -1
- package/dist/browser/search/api/options.js.map +1 -1
- package/dist/browser/search/api/searchContext.js +1 -1
- package/dist/browser/search/api/searchContext.js.map +1 -1
- package/dist/browser/searchClient.d.ts +1 -0
- package/dist/browser/searchClient.d.ts.map +1 -1
- package/dist/browser/searchClient.js +12 -1
- package/dist/browser/searchClient.js.map +1 -1
- package/dist/browser/searchIndex/api/index.d.ts +2 -2
- package/dist/browser/searchIndex/api/index.d.ts.map +1 -1
- package/dist/browser/searchIndex/api/index.js +1 -1
- package/dist/browser/searchIndex/api/index.js.map +1 -1
- package/dist/browser/searchIndex/api/operations.d.ts +18 -2
- package/dist/browser/searchIndex/api/operations.d.ts.map +1 -1
- package/dist/browser/searchIndex/api/operations.js +200 -38
- package/dist/browser/searchIndex/api/operations.js.map +1 -1
- package/dist/browser/searchIndex/api/options.d.ts +46 -0
- package/dist/browser/searchIndex/api/options.d.ts.map +1 -1
- package/dist/browser/searchIndex/api/options.js.map +1 -1
- package/dist/browser/searchIndex/api/searchIndexContext.js +1 -1
- package/dist/browser/searchIndex/api/searchIndexContext.js.map +1 -1
- package/dist/browser/searchIndex/index.d.ts +1 -1
- package/dist/browser/searchIndex/index.d.ts.map +1 -1
- package/dist/browser/searchIndex/index.js.map +1 -1
- package/dist/browser/searchIndex/searchIndexClient.d.ts +10 -2
- package/dist/browser/searchIndex/searchIndexClient.d.ts.map +1 -1
- package/dist/browser/searchIndex/searchIndexClient.js +17 -1
- package/dist/browser/searchIndex/searchIndexClient.js.map +1 -1
- package/dist/browser/searchIndexClient.d.ts +29 -2
- package/dist/browser/searchIndexClient.d.ts.map +1 -1
- package/dist/browser/searchIndexClient.js +38 -0
- package/dist/browser/searchIndexClient.js.map +1 -1
- package/dist/browser/searchIndexer/api/index.d.ts +2 -2
- package/dist/browser/searchIndexer/api/index.d.ts.map +1 -1
- package/dist/browser/searchIndexer/api/index.js +1 -1
- package/dist/browser/searchIndexer/api/index.js.map +1 -1
- package/dist/browser/searchIndexer/api/operations.d.ts +14 -2
- package/dist/browser/searchIndexer/api/operations.d.ts.map +1 -1
- package/dist/browser/searchIndexer/api/operations.js +144 -22
- package/dist/browser/searchIndexer/api/operations.js.map +1 -1
- package/dist/browser/searchIndexer/api/options.d.ts +36 -0
- package/dist/browser/searchIndexer/api/options.d.ts.map +1 -1
- package/dist/browser/searchIndexer/api/options.js.map +1 -1
- package/dist/browser/searchIndexer/api/searchIndexerContext.js +1 -1
- package/dist/browser/searchIndexer/api/searchIndexerContext.js.map +1 -1
- package/dist/browser/searchIndexer/index.d.ts +1 -1
- package/dist/browser/searchIndexer/index.d.ts.map +1 -1
- package/dist/browser/searchIndexer/index.js.map +1 -1
- package/dist/browser/searchIndexer/searchIndexerClient.d.ts +8 -2
- package/dist/browser/searchIndexer/searchIndexerClient.d.ts.map +1 -1
- package/dist/browser/searchIndexer/searchIndexerClient.js +13 -1
- package/dist/browser/searchIndexer/searchIndexerClient.js.map +1 -1
- package/dist/browser/searchIndexerClient.d.ts +21 -1
- package/dist/browser/searchIndexerClient.d.ts.map +1 -1
- package/dist/browser/searchIndexerClient.js +40 -0
- package/dist/browser/searchIndexerClient.js.map +1 -1
- package/dist/browser/searchIndexingBufferedSender.js +1 -1
- package/dist/browser/searchIndexingBufferedSender.js.map +1 -1
- package/dist/browser/serviceModels.d.ts +251 -4
- package/dist/browser/serviceModels.d.ts.map +1 -1
- package/dist/browser/serviceModels.js.map +1 -1
- package/dist/browser/serviceUtils.d.ts +1 -1
- package/dist/browser/serviceUtils.d.ts.map +1 -1
- package/dist/browser/serviceUtils.js +32 -1
- package/dist/browser/serviceUtils.js.map +1 -1
- package/dist/commonjs/index.d.ts +5 -5
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +29 -0
- package/dist/commonjs/index.js.map +2 -2
- package/dist/commonjs/indexModels.d.ts +35 -1
- package/dist/commonjs/indexModels.d.ts.map +1 -1
- package/dist/commonjs/indexModels.js.map +1 -1
- package/dist/commonjs/knowledgeBaseModels.d.ts +27 -1
- package/dist/commonjs/knowledgeBaseModels.d.ts.map +1 -1
- package/dist/commonjs/knowledgeBaseModels.js.map +1 -1
- package/dist/commonjs/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +1 -1
- package/dist/commonjs/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -1
- package/dist/commonjs/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
- package/dist/commonjs/knowledgeBaseRetrieval/api/operations.js +2 -1
- package/dist/commonjs/knowledgeBaseRetrieval/api/operations.js.map +2 -2
- package/dist/commonjs/knowledgeBaseRetrieval/api/options.d.ts +2 -0
- package/dist/commonjs/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
- package/dist/commonjs/knowledgeBaseRetrieval/api/options.js.map +1 -1
- package/dist/commonjs/models/azure/search/documents/index.d.ts +2 -2
- package/dist/commonjs/models/azure/search/documents/index.d.ts.map +1 -1
- package/dist/commonjs/models/azure/search/documents/index.js +16 -2
- package/dist/commonjs/models/azure/search/documents/index.js.map +2 -2
- package/dist/commonjs/models/azure/search/documents/indexes/index.d.ts +2 -2
- package/dist/commonjs/models/azure/search/documents/indexes/index.d.ts.map +1 -1
- package/dist/commonjs/models/azure/search/documents/indexes/index.js +24 -0
- package/dist/commonjs/models/azure/search/documents/indexes/index.js.map +2 -2
- package/dist/commonjs/models/azure/search/documents/indexes/models.d.ts +994 -155
- package/dist/commonjs/models/azure/search/documents/indexes/models.d.ts.map +1 -1
- package/dist/commonjs/models/azure/search/documents/indexes/models.js +1334 -166
- package/dist/commonjs/models/azure/search/documents/indexes/models.js.map +3 -3
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.d.ts +2 -2
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.js +2 -0
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.js.map +2 -2
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.d.ts +716 -96
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.js +995 -90
- package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.js.map +3 -3
- package/dist/commonjs/models/azure/search/documents/models.d.ts +467 -3
- package/dist/commonjs/models/azure/search/documents/models.d.ts.map +1 -1
- package/dist/commonjs/models/azure/search/documents/models.js +360 -13
- package/dist/commonjs/models/azure/search/documents/models.js.map +3 -3
- package/dist/commonjs/models/index.d.ts +2 -1
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -0
- package/dist/commonjs/models/index.js.map +2 -2
- package/dist/commonjs/models/models.d.ts +37 -2
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +32 -3
- package/dist/commonjs/models/models.js.map +3 -3
- package/dist/commonjs/search/api/operations.d.ts.map +1 -1
- package/dist/commonjs/search/api/operations.js +33 -12
- package/dist/commonjs/search/api/operations.js.map +2 -2
- package/dist/commonjs/search/api/options.d.ts +31 -1
- package/dist/commonjs/search/api/options.d.ts.map +1 -1
- package/dist/commonjs/search/api/options.js.map +1 -1
- package/dist/commonjs/search/api/searchContext.js +1 -1
- package/dist/commonjs/search/api/searchContext.js.map +1 -1
- package/dist/commonjs/searchClient.d.ts +1 -0
- package/dist/commonjs/searchClient.d.ts.map +1 -1
- package/dist/commonjs/searchClient.js +12 -0
- package/dist/commonjs/searchClient.js.map +2 -2
- package/dist/commonjs/searchIndex/api/index.d.ts +2 -2
- package/dist/commonjs/searchIndex/api/index.d.ts.map +1 -1
- package/dist/commonjs/searchIndex/api/index.js +10 -2
- package/dist/commonjs/searchIndex/api/index.js.map +2 -2
- package/dist/commonjs/searchIndex/api/operations.d.ts +18 -2
- package/dist/commonjs/searchIndex/api/operations.d.ts.map +1 -1
- package/dist/commonjs/searchIndex/api/operations.js +242 -40
- package/dist/commonjs/searchIndex/api/operations.js.map +2 -2
- package/dist/commonjs/searchIndex/api/options.d.ts +46 -0
- package/dist/commonjs/searchIndex/api/options.d.ts.map +1 -1
- package/dist/commonjs/searchIndex/api/options.js.map +1 -1
- package/dist/commonjs/searchIndex/api/searchIndexContext.js +1 -1
- package/dist/commonjs/searchIndex/api/searchIndexContext.js.map +1 -1
- package/dist/commonjs/searchIndex/index.d.ts +1 -1
- package/dist/commonjs/searchIndex/index.d.ts.map +1 -1
- package/dist/commonjs/searchIndex/index.js.map +1 -1
- package/dist/commonjs/searchIndex/searchIndexClient.d.ts +10 -2
- package/dist/commonjs/searchIndex/searchIndexClient.d.ts.map +1 -1
- package/dist/commonjs/searchIndex/searchIndexClient.js +16 -0
- package/dist/commonjs/searchIndex/searchIndexClient.js.map +2 -2
- package/dist/commonjs/searchIndexClient.d.ts +29 -2
- package/dist/commonjs/searchIndexClient.d.ts.map +1 -1
- package/dist/commonjs/searchIndexClient.js +51 -0
- package/dist/commonjs/searchIndexClient.js.map +2 -2
- package/dist/commonjs/searchIndexer/api/index.d.ts +2 -2
- package/dist/commonjs/searchIndexer/api/index.d.ts.map +1 -1
- package/dist/commonjs/searchIndexer/api/index.js +6 -0
- package/dist/commonjs/searchIndexer/api/index.js.map +2 -2
- package/dist/commonjs/searchIndexer/api/operations.d.ts +14 -2
- package/dist/commonjs/searchIndexer/api/operations.d.ts.map +1 -1
- package/dist/commonjs/searchIndexer/api/operations.js +156 -21
- package/dist/commonjs/searchIndexer/api/operations.js.map +2 -2
- package/dist/commonjs/searchIndexer/api/options.d.ts +36 -0
- package/dist/commonjs/searchIndexer/api/options.d.ts.map +1 -1
- package/dist/commonjs/searchIndexer/api/options.js.map +1 -1
- package/dist/commonjs/searchIndexer/api/searchIndexerContext.js +1 -1
- package/dist/commonjs/searchIndexer/api/searchIndexerContext.js.map +1 -1
- package/dist/commonjs/searchIndexer/index.d.ts +1 -1
- package/dist/commonjs/searchIndexer/index.d.ts.map +1 -1
- package/dist/commonjs/searchIndexer/index.js.map +1 -1
- package/dist/commonjs/searchIndexer/searchIndexerClient.d.ts +8 -2
- package/dist/commonjs/searchIndexer/searchIndexerClient.d.ts.map +1 -1
- package/dist/commonjs/searchIndexer/searchIndexerClient.js +12 -0
- package/dist/commonjs/searchIndexer/searchIndexerClient.js.map +2 -2
- package/dist/commonjs/searchIndexerClient.d.ts +21 -1
- package/dist/commonjs/searchIndexerClient.d.ts.map +1 -1
- package/dist/commonjs/searchIndexerClient.js +50 -0
- package/dist/commonjs/searchIndexerClient.js.map +2 -2
- package/dist/commonjs/searchIndexingBufferedSender.js +2 -12
- package/dist/commonjs/searchIndexingBufferedSender.js.map +3 -3
- package/dist/commonjs/serviceModels.d.ts +251 -4
- package/dist/commonjs/serviceModels.d.ts.map +1 -1
- package/dist/commonjs/serviceModels.js.map +2 -2
- package/dist/commonjs/serviceUtils.d.ts +1 -1
- package/dist/commonjs/serviceUtils.d.ts.map +1 -1
- package/dist/commonjs/serviceUtils.js +34 -3
- package/dist/commonjs/serviceUtils.js.map +2 -2
- package/dist/esm/index.d.ts +5 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/indexModels.d.ts +35 -1
- package/dist/esm/indexModels.d.ts.map +1 -1
- package/dist/esm/indexModels.js.map +1 -1
- package/dist/esm/knowledgeBaseModels.d.ts +27 -1
- package/dist/esm/knowledgeBaseModels.d.ts.map +1 -1
- package/dist/esm/knowledgeBaseModels.js.map +1 -1
- package/dist/esm/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +1 -1
- package/dist/esm/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -1
- package/dist/esm/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
- package/dist/esm/knowledgeBaseRetrieval/api/operations.js +4 -1
- package/dist/esm/knowledgeBaseRetrieval/api/operations.js.map +1 -1
- package/dist/esm/knowledgeBaseRetrieval/api/options.d.ts +2 -0
- package/dist/esm/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
- package/dist/esm/knowledgeBaseRetrieval/api/options.js.map +1 -1
- package/dist/esm/models/azure/search/documents/index.d.ts +2 -2
- package/dist/esm/models/azure/search/documents/index.d.ts.map +1 -1
- package/dist/esm/models/azure/search/documents/index.js +1 -1
- package/dist/esm/models/azure/search/documents/index.js.map +1 -1
- package/dist/esm/models/azure/search/documents/indexes/index.d.ts +2 -2
- package/dist/esm/models/azure/search/documents/indexes/index.d.ts.map +1 -1
- package/dist/esm/models/azure/search/documents/indexes/index.js +1 -1
- package/dist/esm/models/azure/search/documents/indexes/index.js.map +1 -1
- package/dist/esm/models/azure/search/documents/indexes/models.d.ts +994 -155
- package/dist/esm/models/azure/search/documents/indexes/models.d.ts.map +1 -1
- package/dist/esm/models/azure/search/documents/indexes/models.js +1267 -159
- package/dist/esm/models/azure/search/documents/indexes/models.js.map +1 -1
- package/dist/esm/models/azure/search/documents/knowledgeBases/index.d.ts +2 -2
- package/dist/esm/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
- package/dist/esm/models/azure/search/documents/knowledgeBases/index.js +1 -1
- package/dist/esm/models/azure/search/documents/knowledgeBases/index.js.map +1 -1
- package/dist/esm/models/azure/search/documents/knowledgeBases/models.d.ts +716 -96
- package/dist/esm/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
- package/dist/esm/models/azure/search/documents/knowledgeBases/models.js +899 -77
- package/dist/esm/models/azure/search/documents/knowledgeBases/models.js.map +1 -1
- package/dist/esm/models/azure/search/documents/models.d.ts +467 -3
- package/dist/esm/models/azure/search/documents/models.d.ts.map +1 -1
- package/dist/esm/models/azure/search/documents/models.js +435 -7
- package/dist/esm/models/azure/search/documents/models.js.map +1 -1
- package/dist/esm/models/index.d.ts +2 -1
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +37 -2
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js +29 -1
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/search/api/operations.d.ts.map +1 -1
- package/dist/esm/search/api/operations.js +48 -11
- package/dist/esm/search/api/operations.js.map +1 -1
- package/dist/esm/search/api/options.d.ts +31 -1
- package/dist/esm/search/api/options.d.ts.map +1 -1
- package/dist/esm/search/api/options.js.map +1 -1
- package/dist/esm/search/api/searchContext.js +1 -1
- package/dist/esm/search/api/searchContext.js.map +1 -1
- package/dist/esm/searchClient.d.ts +1 -0
- package/dist/esm/searchClient.d.ts.map +1 -1
- package/dist/esm/searchClient.js +12 -1
- package/dist/esm/searchClient.js.map +1 -1
- package/dist/esm/searchIndex/api/index.d.ts +2 -2
- package/dist/esm/searchIndex/api/index.d.ts.map +1 -1
- package/dist/esm/searchIndex/api/index.js +1 -1
- package/dist/esm/searchIndex/api/index.js.map +1 -1
- package/dist/esm/searchIndex/api/operations.d.ts +18 -2
- package/dist/esm/searchIndex/api/operations.d.ts.map +1 -1
- package/dist/esm/searchIndex/api/operations.js +200 -38
- package/dist/esm/searchIndex/api/operations.js.map +1 -1
- package/dist/esm/searchIndex/api/options.d.ts +46 -0
- package/dist/esm/searchIndex/api/options.d.ts.map +1 -1
- package/dist/esm/searchIndex/api/options.js.map +1 -1
- package/dist/esm/searchIndex/api/searchIndexContext.js +1 -1
- package/dist/esm/searchIndex/api/searchIndexContext.js.map +1 -1
- package/dist/esm/searchIndex/index.d.ts +1 -1
- package/dist/esm/searchIndex/index.d.ts.map +1 -1
- package/dist/esm/searchIndex/index.js.map +1 -1
- package/dist/esm/searchIndex/searchIndexClient.d.ts +10 -2
- package/dist/esm/searchIndex/searchIndexClient.d.ts.map +1 -1
- package/dist/esm/searchIndex/searchIndexClient.js +17 -1
- package/dist/esm/searchIndex/searchIndexClient.js.map +1 -1
- package/dist/esm/searchIndexClient.d.ts +29 -2
- package/dist/esm/searchIndexClient.d.ts.map +1 -1
- package/dist/esm/searchIndexClient.js +38 -0
- package/dist/esm/searchIndexClient.js.map +1 -1
- package/dist/esm/searchIndexer/api/index.d.ts +2 -2
- package/dist/esm/searchIndexer/api/index.d.ts.map +1 -1
- package/dist/esm/searchIndexer/api/index.js +1 -1
- package/dist/esm/searchIndexer/api/index.js.map +1 -1
- package/dist/esm/searchIndexer/api/operations.d.ts +14 -2
- package/dist/esm/searchIndexer/api/operations.d.ts.map +1 -1
- package/dist/esm/searchIndexer/api/operations.js +144 -22
- package/dist/esm/searchIndexer/api/operations.js.map +1 -1
- package/dist/esm/searchIndexer/api/options.d.ts +36 -0
- package/dist/esm/searchIndexer/api/options.d.ts.map +1 -1
- package/dist/esm/searchIndexer/api/options.js.map +1 -1
- package/dist/esm/searchIndexer/api/searchIndexerContext.js +1 -1
- package/dist/esm/searchIndexer/api/searchIndexerContext.js.map +1 -1
- package/dist/esm/searchIndexer/index.d.ts +1 -1
- package/dist/esm/searchIndexer/index.d.ts.map +1 -1
- package/dist/esm/searchIndexer/index.js.map +1 -1
- package/dist/esm/searchIndexer/searchIndexerClient.d.ts +8 -2
- package/dist/esm/searchIndexer/searchIndexerClient.d.ts.map +1 -1
- package/dist/esm/searchIndexer/searchIndexerClient.js +13 -1
- package/dist/esm/searchIndexer/searchIndexerClient.js.map +1 -1
- package/dist/esm/searchIndexerClient.d.ts +21 -1
- package/dist/esm/searchIndexerClient.d.ts.map +1 -1
- package/dist/esm/searchIndexerClient.js +40 -0
- package/dist/esm/searchIndexerClient.js.map +1 -1
- package/dist/esm/searchIndexingBufferedSender.js +1 -1
- package/dist/esm/searchIndexingBufferedSender.js.map +1 -1
- package/dist/esm/serviceModels.d.ts +251 -4
- package/dist/esm/serviceModels.d.ts.map +1 -1
- package/dist/esm/serviceModels.js.map +1 -1
- package/dist/esm/serviceUtils.d.ts +1 -1
- package/dist/esm/serviceUtils.d.ts.map +1 -1
- package/dist/esm/serviceUtils.js +32 -1
- package/dist/esm/serviceUtils.js.map +1 -1
- package/dist/react-native/index.d.ts +5 -5
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +3 -2
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/indexModels.d.ts +35 -1
- package/dist/react-native/indexModels.d.ts.map +1 -1
- package/dist/react-native/indexModels.js.map +1 -1
- package/dist/react-native/knowledgeBaseModels.d.ts +27 -1
- package/dist/react-native/knowledgeBaseModels.d.ts.map +1 -1
- package/dist/react-native/knowledgeBaseModels.js.map +1 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +1 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/operations.js +4 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/operations.js.map +1 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/options.d.ts +2 -0
- package/dist/react-native/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
- package/dist/react-native/knowledgeBaseRetrieval/api/options.js.map +1 -1
- package/dist/react-native/models/azure/search/documents/index.d.ts +2 -2
- package/dist/react-native/models/azure/search/documents/index.d.ts.map +1 -1
- package/dist/react-native/models/azure/search/documents/index.js +1 -1
- package/dist/react-native/models/azure/search/documents/index.js.map +1 -1
- package/dist/react-native/models/azure/search/documents/indexes/index.d.ts +2 -2
- package/dist/react-native/models/azure/search/documents/indexes/index.d.ts.map +1 -1
- package/dist/react-native/models/azure/search/documents/indexes/index.js +1 -1
- package/dist/react-native/models/azure/search/documents/indexes/index.js.map +1 -1
- package/dist/react-native/models/azure/search/documents/indexes/models.d.ts +994 -155
- package/dist/react-native/models/azure/search/documents/indexes/models.d.ts.map +1 -1
- package/dist/react-native/models/azure/search/documents/indexes/models.js +1267 -159
- package/dist/react-native/models/azure/search/documents/indexes/models.js.map +1 -1
- package/dist/react-native/models/azure/search/documents/knowledgeBases/index.d.ts +2 -2
- package/dist/react-native/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
- package/dist/react-native/models/azure/search/documents/knowledgeBases/index.js +1 -1
- package/dist/react-native/models/azure/search/documents/knowledgeBases/index.js.map +1 -1
- package/dist/react-native/models/azure/search/documents/knowledgeBases/models.d.ts +716 -96
- package/dist/react-native/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
- package/dist/react-native/models/azure/search/documents/knowledgeBases/models.js +899 -77
- package/dist/react-native/models/azure/search/documents/knowledgeBases/models.js.map +1 -1
- package/dist/react-native/models/azure/search/documents/models.d.ts +467 -3
- package/dist/react-native/models/azure/search/documents/models.d.ts.map +1 -1
- package/dist/react-native/models/azure/search/documents/models.js +435 -7
- package/dist/react-native/models/azure/search/documents/models.js.map +1 -1
- package/dist/react-native/models/index.d.ts +2 -1
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js +1 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +37 -2
- package/dist/react-native/models/models.d.ts.map +1 -1
- package/dist/react-native/models/models.js +29 -1
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/search/api/operations.d.ts.map +1 -1
- package/dist/react-native/search/api/operations.js +48 -11
- package/dist/react-native/search/api/operations.js.map +1 -1
- package/dist/react-native/search/api/options.d.ts +31 -1
- package/dist/react-native/search/api/options.d.ts.map +1 -1
- package/dist/react-native/search/api/options.js.map +1 -1
- package/dist/react-native/search/api/searchContext.js +1 -1
- package/dist/react-native/search/api/searchContext.js.map +1 -1
- package/dist/react-native/searchClient.d.ts +1 -0
- package/dist/react-native/searchClient.d.ts.map +1 -1
- package/dist/react-native/searchClient.js +12 -1
- package/dist/react-native/searchClient.js.map +1 -1
- package/dist/react-native/searchIndex/api/index.d.ts +2 -2
- package/dist/react-native/searchIndex/api/index.d.ts.map +1 -1
- package/dist/react-native/searchIndex/api/index.js +1 -1
- package/dist/react-native/searchIndex/api/index.js.map +1 -1
- package/dist/react-native/searchIndex/api/operations.d.ts +18 -2
- package/dist/react-native/searchIndex/api/operations.d.ts.map +1 -1
- package/dist/react-native/searchIndex/api/operations.js +200 -38
- package/dist/react-native/searchIndex/api/operations.js.map +1 -1
- package/dist/react-native/searchIndex/api/options.d.ts +46 -0
- package/dist/react-native/searchIndex/api/options.d.ts.map +1 -1
- package/dist/react-native/searchIndex/api/options.js.map +1 -1
- package/dist/react-native/searchIndex/api/searchIndexContext.js +1 -1
- package/dist/react-native/searchIndex/api/searchIndexContext.js.map +1 -1
- package/dist/react-native/searchIndex/index.d.ts +1 -1
- package/dist/react-native/searchIndex/index.d.ts.map +1 -1
- package/dist/react-native/searchIndex/index.js.map +1 -1
- package/dist/react-native/searchIndex/searchIndexClient.d.ts +10 -2
- package/dist/react-native/searchIndex/searchIndexClient.d.ts.map +1 -1
- package/dist/react-native/searchIndex/searchIndexClient.js +17 -1
- package/dist/react-native/searchIndex/searchIndexClient.js.map +1 -1
- package/dist/react-native/searchIndexClient.d.ts +29 -2
- package/dist/react-native/searchIndexClient.d.ts.map +1 -1
- package/dist/react-native/searchIndexClient.js +38 -0
- package/dist/react-native/searchIndexClient.js.map +1 -1
- package/dist/react-native/searchIndexer/api/index.d.ts +2 -2
- package/dist/react-native/searchIndexer/api/index.d.ts.map +1 -1
- package/dist/react-native/searchIndexer/api/index.js +1 -1
- package/dist/react-native/searchIndexer/api/index.js.map +1 -1
- package/dist/react-native/searchIndexer/api/operations.d.ts +14 -2
- package/dist/react-native/searchIndexer/api/operations.d.ts.map +1 -1
- package/dist/react-native/searchIndexer/api/operations.js +144 -22
- package/dist/react-native/searchIndexer/api/operations.js.map +1 -1
- package/dist/react-native/searchIndexer/api/options.d.ts +36 -0
- package/dist/react-native/searchIndexer/api/options.d.ts.map +1 -1
- package/dist/react-native/searchIndexer/api/options.js.map +1 -1
- package/dist/react-native/searchIndexer/api/searchIndexerContext.js +1 -1
- package/dist/react-native/searchIndexer/api/searchIndexerContext.js.map +1 -1
- package/dist/react-native/searchIndexer/index.d.ts +1 -1
- package/dist/react-native/searchIndexer/index.d.ts.map +1 -1
- package/dist/react-native/searchIndexer/index.js.map +1 -1
- package/dist/react-native/searchIndexer/searchIndexerClient.d.ts +8 -2
- package/dist/react-native/searchIndexer/searchIndexerClient.d.ts.map +1 -1
- package/dist/react-native/searchIndexer/searchIndexerClient.js +13 -1
- package/dist/react-native/searchIndexer/searchIndexerClient.js.map +1 -1
- package/dist/react-native/searchIndexerClient.d.ts +21 -1
- package/dist/react-native/searchIndexerClient.d.ts.map +1 -1
- package/dist/react-native/searchIndexerClient.js +40 -0
- package/dist/react-native/searchIndexerClient.js.map +1 -1
- package/dist/react-native/searchIndexingBufferedSender.js +1 -1
- package/dist/react-native/searchIndexingBufferedSender.js.map +1 -1
- package/dist/react-native/serviceModels.d.ts +251 -4
- package/dist/react-native/serviceModels.d.ts.map +1 -1
- package/dist/react-native/serviceModels.js.map +1 -1
- package/dist/react-native/serviceUtils.d.ts +1 -1
- package/dist/react-native/serviceUtils.d.ts.map +1 -1
- package/dist/react-native/serviceUtils.js +32 -1
- package/dist/react-native/serviceUtils.js.map +1 -1
- package/package.json +11 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/search/api/options.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n QueryType,\n ScoringStatistics,\n QueryDebugMode,\n SearchMode,\n SemanticErrorMode,\n QueryAnswerType,\n QueryCaptionType,\n VectorQueryUnion,\n VectorFilterMode,\n AutocompleteMode,\n} from \"../../models/azure/search/documents/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface AutocompletePostOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. */\n autocompleteMode?: AutocompleteMode;\n /** An OData expression that filters the documents used to produce completed terms for the Autocomplete result. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will autocomplete terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The comma-separated list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. */\n searchFields?: string[];\n /** The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface AutocompleteGetOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. */\n autocompleteMode?: AutocompleteMode;\n /** An OData expression that filters the documents used to produce completed terms for the Autocomplete result. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. */\n searchFields?: string[];\n /** The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface IndexOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SuggestPostOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An OData expression that filters the documents considered for suggestions. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the suggestion query. Default is false. When set to true, the query will find suggestions even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestion searches are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestion query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** The comma-separated list of field names to search for the specified search text. Target fields must be included in the specified suggester. */\n searchFields?: string;\n /** The comma-separated list of fields to retrieve. If unspecified, only the key field will be included in the results. */\n select?: string;\n /** The number of suggestions to retrieve. This must be a value between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SuggestGetOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An OData expression that filters the documents considered for suggestions. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** The list of field names to search for the specified search text. Target fields must be included in the specified suggester. */\n searchFields?: string;\n /** The list of fields to retrieve. If unspecified, only the key field will be included in the results. */\n select?: string;\n /** The number of suggestions to retrieve. The value must be a number between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface GetDocumentOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. */\n selectedFields?: string;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SearchPostOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. */\n includeTotalCount?: boolean;\n /** The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs. */\n facets?: string[];\n /** The OData $filter expression to apply to the search query. */\n filter?: string;\n /** The comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. */\n highlightFields?: string[];\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. */\n minimumCoverage?: number;\n /** The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. */\n queryType?: QueryType;\n /** A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries. */\n scoringStatistics?: ScoringStatistics;\n /** A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. */\n sessionId?: string;\n /** The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be \"mylocation--122.2,44.8\" (without the quotes). */\n scoringParameters?: string[];\n /** The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. */\n scoringProfile?: string;\n /** Enables a debugging tool that can be used to further explore your reranked results. */\n debug?: QueryDebugMode;\n /** A full-text search query expression; Use \"*\" or omit this parameter to match all documents. */\n searchText?: string;\n /** The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. */\n searchFields?: string;\n /** A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. */\n searchMode?: SearchMode;\n /** The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. */\n select?: string;\n /** The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead. */\n skip?: number;\n /** The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. */\n top?: number;\n /** The name of a semantic configuration that will be used when processing documents for queries of type semantic. */\n semanticConfigurationName?: string;\n /** Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. */\n semanticErrorHandling?: SemanticErrorMode;\n /** Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. */\n semanticMaxWaitInMilliseconds?: number;\n /** Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. */\n semanticQuery?: string;\n /** A value that specifies whether answers should be returned as part of the search response. */\n answers?: QueryAnswerType;\n /** A value that specifies whether captions should be returned as part of the search response. */\n captions?: QueryCaptionType;\n /** The query parameters for vector and hybrid search queries. */\n vectorQueries?: VectorQueryUnion[];\n /** Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. */\n vectorFilterMode?: VectorFilterMode;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SearchGetOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** A full-text search query expression; Use \"*\" or omit this parameter to match all documents. */\n searchText?: string;\n /** A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. */\n includeTotalResultCount?: boolean;\n /** The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs. */\n facets?: string[];\n /** The OData $filter expression to apply to the search query. */\n filter?: string;\n /** The list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. */\n highlightFields?: string[];\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. */\n minimumCoverage?: number;\n /** The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. */\n queryType?: QueryType;\n /** The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be \"mylocation--122.2,44.8\" (without the quotes). */\n scoringParameters?: string[];\n /** The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. */\n scoringProfile?: string;\n /** The list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. */\n searchFields?: string;\n /** A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. */\n searchMode?: SearchMode;\n /** A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. */\n scoringStatistics?: ScoringStatistics;\n /** A value to be used to create a sticky session, which can help to get more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. */\n sessionId?: string;\n /** The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. */\n select?: string;\n /** The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use $skip due to this limitation, consider using $orderby on a totally-ordered key and $filter with a range query instead. */\n skip?: number;\n /** The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. */\n top?: number;\n /** The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers */\n semanticConfiguration?: string;\n /** Allows the user to choose whether a semantic call should fail completely, or to return partial results (default). */\n semanticErrorHandling?: SemanticErrorMode;\n /** Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. */\n semanticMaxWaitInMilliseconds?: number;\n /** This parameter is only valid if the query type is `semantic`. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character `|` followed by the `count-<number of answers>` option after the answers parameter value, such as `extractive|count-3`. Default count is 1. The confidence threshold can be configured by appending the pipe character `|` followed by the `threshold-<confidence threshold>` option after the answers parameter value, such as `extractive|threshold-0.9`. Default threshold is 0.7. The maximum character length of answers can be configured by appending the pipe character '|' followed by the 'count-<number of maximum character length>', such as 'extractive|maxcharlength-600'. */\n answers?: QueryAnswerType;\n /** This parameter is only valid if the query type is `semantic`. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to `extractive`, highlighting is enabled by default, and can be configured by appending the pipe character `|` followed by the `highlight-<true/false>` option, such as `extractive|highlight-true`. Defaults to `None`. The maximum character length of captions can be configured by appending the pipe character '|' followed by the 'count-<number of maximum character length>', such as 'extractive|maxcharlength-600'. */\n captions?: QueryCaptionType;\n /** Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. */\n semanticQuery?: string;\n /** Enables a debugging tool that can be used to further explore your search results. */\n debug?: QueryDebugMode;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface GetDocumentCountOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n QueryType,\n ScoringStatistics,\n QueryDebugMode,\n SearchMode,\n QueryLanguage,\n QuerySpellerType,\n SemanticErrorMode,\n QueryAnswerType,\n QueryCaptionType,\n QueryRewritesType,\n VectorQueryUnion,\n VectorFilterMode,\n HybridSearch,\n AutocompleteMode,\n} from \"../../models/azure/search/documents/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface AutocompletePostOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. */\n autocompleteMode?: AutocompleteMode;\n /** An OData expression that filters the documents used to produce completed terms for the Autocomplete result. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will autocomplete terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The comma-separated list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. */\n searchFields?: string[];\n /** The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface AutocompleteGetOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. */\n autocompleteMode?: AutocompleteMode;\n /** An OData expression that filters the documents used to produce completed terms for the Autocomplete result. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester. */\n searchFields?: string[];\n /** The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface IndexOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SuggestPostOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An OData expression that filters the documents considered for suggestions. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the suggestion query. Default is false. When set to true, the query will find suggestions even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestion searches are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestion query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** The comma-separated list of field names to search for the specified search text. Target fields must be included in the specified suggester. */\n searchFields?: string;\n /** The comma-separated list of fields to retrieve. If unspecified, only the key field will be included in the results. */\n select?: string;\n /** The number of suggestions to retrieve. This must be a value between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SuggestGetOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An OData expression that filters the documents considered for suggestions. */\n filter?: string;\n /** A value indicating whether to use fuzzy matching for the suggestions query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy suggestions queries are slower and consume more resources. */\n useFuzzyMatching?: boolean;\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting of suggestions is disabled. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestions query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80. */\n minimumCoverage?: number;\n /** The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** The list of field names to search for the specified search text. Target fields must be included in the specified suggester. */\n searchFields?: string;\n /** The list of fields to retrieve. If unspecified, only the key field will be included in the results. */\n select?: string;\n /** The number of suggestions to retrieve. The value must be a number between 1 and 100. The default is 5. */\n top?: number;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface GetDocumentOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. */\n querySourceAuthorization?: string;\n /** A value that enables elevated read that bypass document level permission checks for the query operation. */\n enableElevatedRead?: boolean;\n /** List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. */\n selectedFields?: string;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SearchPostOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. */\n querySourceAuthorization?: string;\n /** A value that enables elevated read that bypass document level permission checks for the query operation. */\n enableElevatedRead?: boolean;\n /** A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. */\n includeTotalCount?: boolean;\n /** The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs. */\n facets?: string[];\n /** The OData $filter expression to apply to the search query. */\n filter?: string;\n /** The comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. */\n highlightFields?: string[];\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. */\n minimumCoverage?: number;\n /** The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. */\n queryType?: QueryType;\n /** A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries. */\n scoringStatistics?: ScoringStatistics;\n /** A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. */\n sessionId?: string;\n /** The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be \"mylocation--122.2,44.8\" (without the quotes). */\n scoringParameters?: string[];\n /** The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. */\n scoringProfile?: string;\n /** Enables a debugging tool that can be used to further explore your reranked results. */\n debug?: QueryDebugMode;\n /** A full-text search query expression; Use \"*\" or omit this parameter to match all documents. */\n searchText?: string;\n /** The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. */\n searchFields?: string;\n /** A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. */\n searchMode?: SearchMode;\n /** A value that specifies the language of the search query. */\n queryLanguage?: QueryLanguage;\n /** A value that specifies the type of the speller to use to spell-correct individual search query terms. */\n querySpeller?: QuerySpellerType;\n /** The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. */\n select?: string;\n /** The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead. */\n skip?: number;\n /** The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. */\n top?: number;\n /** The name of a semantic configuration that will be used when processing documents for queries of type semantic. */\n semanticConfigurationName?: string;\n /** Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. */\n semanticErrorHandling?: SemanticErrorMode;\n /** Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. */\n semanticMaxWaitInMilliseconds?: number;\n /** Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. */\n semanticQuery?: string;\n /** A value that specifies whether answers should be returned as part of the search response. */\n answers?: QueryAnswerType;\n /** A value that specifies whether captions should be returned as part of the search response. */\n captions?: QueryCaptionType;\n /** A value that specifies whether query rewrites should be generated to augment the search query. */\n queryRewrites?: QueryRewritesType;\n /** The comma-separated list of field names used for semantic ranking. */\n semanticFields?: string[];\n /** The query parameters for vector and hybrid search queries. */\n vectorQueries?: VectorQueryUnion[];\n /** Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. */\n vectorFilterMode?: VectorFilterMode;\n /** The query parameters to configure hybrid search behaviors. */\n hybridSearch?: HybridSearch;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface SearchGetOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. */\n querySourceAuthorization?: string;\n /** A value that enables elevated read that bypass document level permission checks for the query operation. */\n enableElevatedRead?: boolean;\n /** A full-text search query expression; Use \"*\" or omit this parameter to match all documents. */\n searchText?: string;\n /** A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation. */\n includeTotalResultCount?: boolean;\n /** The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs. */\n facets?: string[];\n /** The OData $filter expression to apply to the search query. */\n filter?: string;\n /** The list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. */\n highlightFields?: string[];\n /** A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. */\n highlightPostTag?: string;\n /** A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. */\n highlightPreTag?: string;\n /** A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100. */\n minimumCoverage?: number;\n /** The list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, and desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no OrderBy is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses. */\n orderBy?: string;\n /** A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax. */\n queryType?: QueryType;\n /** The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be \"mylocation--122.2,44.8\" (without the quotes). */\n scoringParameters?: string[];\n /** The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. */\n scoringProfile?: string;\n /** The list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. */\n searchFields?: string;\n /** A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. */\n searchMode?: SearchMode;\n /** A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. */\n scoringStatistics?: ScoringStatistics;\n /** A value to be used to create a sticky session, which can help to get more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. */\n sessionId?: string;\n /** The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. */\n select?: string;\n /** The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use $skip due to this limitation, consider using $orderby on a totally-ordered key and $filter with a range query instead. */\n skip?: number;\n /** The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. */\n top?: number;\n /** The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers */\n semanticConfiguration?: string;\n /** Allows the user to choose whether a semantic call should fail completely, or to return partial results (default). */\n semanticErrorHandling?: SemanticErrorMode;\n /** Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. */\n semanticMaxWaitInMilliseconds?: number;\n /** This parameter is only valid if the query type is `semantic`. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character `|` followed by the `count-<number of answers>` option after the answers parameter value, such as `extractive|count-3`. Default count is 1. The confidence threshold can be configured by appending the pipe character `|` followed by the `threshold-<confidence threshold>` option after the answers parameter value, such as `extractive|threshold-0.9`. Default threshold is 0.7. The maximum character length of answers can be configured by appending the pipe character '|' followed by the 'count-<number of maximum character length>', such as 'extractive|maxcharlength-600'. */\n answers?: QueryAnswerType;\n /** This parameter is only valid if the query type is `semantic`. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to `extractive`, highlighting is enabled by default, and can be configured by appending the pipe character `|` followed by the `highlight-<true/false>` option, such as `extractive|highlight-true`. Defaults to `None`. The maximum character length of captions can be configured by appending the pipe character '|' followed by the 'count-<number of maximum character length>', such as 'extractive|maxcharlength-600'. */\n captions?: QueryCaptionType;\n /** Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. */\n semanticQuery?: string;\n /** When QueryRewrites is set to `generative`, the query terms are sent to a generate model which will produce 10 (default) rewrites to help increase the recall of the request. The requested count can be configured by appending the pipe character `|` followed by the `count-<number of rewrites>` option, such as `generative|count-3`. Defaults to `None`. This parameter is only valid if the query type is `semantic`. */\n queryRewrites?: QueryRewritesType;\n /** Enables a debugging tool that can be used to further explore your search results. */\n debug?: QueryDebugMode;\n /** The language of the query. */\n queryLanguage?: QueryLanguage;\n /** Improve search recall by spell-correcting individual search query terms. */\n speller?: QuerySpellerType;\n /** The list of field names used for semantic ranking. */\n semanticFields?: string[];\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n\n/** Optional parameters. */\nexport interface GetDocumentCountOptionalParams extends OperationOptions {\n /** The Accept header. */\n accept?: \"application/json;odata.metadata=none\";\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n clientRequestId?: string;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -25,7 +25,7 @@ var import_core_client = require("@azure-rest/core-client");
|
|
|
25
25
|
function createSearch(endpointParam, credential, indexName, options = {}) {
|
|
26
26
|
const endpointUrl = options.endpoint ?? String(endpointParam);
|
|
27
27
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
28
|
-
const userAgentInfo = `azsdk-js-search-documents/13.0.
|
|
28
|
+
const userAgentInfo = `azsdk-js-search-documents/13.1.0-beta.1`;
|
|
29
29
|
const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}` : `azsdk-js-api ${userAgentInfo}`;
|
|
30
30
|
const { apiVersion: _, ...updatedOptions } = {
|
|
31
31
|
...options,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/search/api/searchContext.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../../logger.js\";\nimport { KnownVersions } from \"../../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\n\nexport interface SearchContext extends Client {\n /** The name of the index. */\n indexName: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface SearchClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createSearch(\n endpointParam: string,\n credential: KeyCredential | TokenCredential,\n indexName: string,\n options: SearchClientOptionalParams = {},\n): SearchContext {\n const endpointUrl = options.endpoint ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-search-documents/13.0.
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../../logger.js\";\nimport { KnownVersions } from \"../../models/models.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\n\nexport interface SearchContext extends Client {\n /** The name of the index. */\n indexName: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface SearchClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\nexport function createSearch(\n endpointParam: string,\n credential: KeyCredential | TokenCredential,\n indexName: string,\n options: SearchClientOptionalParams = {},\n): SearchContext {\n const endpointUrl = options.endpoint ?? String(endpointParam);\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-search-documents/13.1.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://search.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"api-key\",\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, indexName } as SearchContext;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAGvB,yBAA0B;AAkBnB,SAAS,aACd,eACA,YACA,WACA,UAAsC,CAAC,GACxB;AACf,QAAM,cAAc,QAAQ,YAAY,OAAO,aAAa;AAC5D,QAAM,oBAAoB,SAAS,kBAAkB;AACrD,QAAM,gBAAgB;AACtB,QAAM,kBAAkB,oBACpB,GAAG,iBAAiB,iBAAiB,aAAa,KAClD,gBAAgB,aAAa;AACjC,QAAM,EAAE,YAAY,GAAG,GAAG,eAAe,IAAI;AAAA,IAC3C,GAAG;AAAA,IACH,kBAAkB,EAAE,gBAAgB;AAAA,IACpC,gBAAgB,EAAE,QAAQ,QAAQ,gBAAgB,UAAU,qBAAO,KAAK;AAAA,IACxE,aAAa;AAAA,MACX,QAAQ,QAAQ,aAAa,UAAU,CAAC,mCAAmC;AAAA,MAC3E,kBAAkB,QAAQ,aAAa,oBAAoB;AAAA,IAC7D;AAAA,EACF;AACA,QAAM,oBAAgB,8BAAU,aAAa,YAAY,cAAc;AACvE,QAAM,aAAa,QAAQ;AAC3B,SAAO,EAAE,GAAG,eAAe,YAAY,UAAU;AACnD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -270,6 +270,7 @@ export declare class SearchClient<TModel extends object> implements IndexDocumen
|
|
|
270
270
|
private convertOrderBy;
|
|
271
271
|
private convertQueryAnswers;
|
|
272
272
|
private convertQueryCaptions;
|
|
273
|
+
private convertQueryRewrites;
|
|
273
274
|
private convertVectorQuery;
|
|
274
275
|
}
|
|
275
276
|
//# sourceMappingURL=searchClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../src/searchClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EAMrB,MAAM,0CAA0C,CAAC;AAGlD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAElB,qBAAqB,EAErB,qBAAqB,EACrB,6BAA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SearchClient {
|
|
|
235
235
|
answers,
|
|
236
236
|
captions,
|
|
237
237
|
debugMode,
|
|
238
|
+
queryRewrites,
|
|
238
239
|
...restSemanticOptions
|
|
239
240
|
} = semanticSearchOptions ?? {};
|
|
240
241
|
const { queries, filterMode, ...restVectorOptions } = vectorSearchOptions ?? {};
|
|
@@ -251,6 +252,7 @@ class SearchClient {
|
|
|
251
252
|
vectorQueries: queries?.map(this.convertVectorQuery.bind(this)),
|
|
252
253
|
answers: this.convertQueryAnswers(answers),
|
|
253
254
|
captions: this.convertQueryCaptions(captions),
|
|
255
|
+
queryRewrites: this.convertQueryRewrites(queryRewrites),
|
|
254
256
|
semanticErrorHandling: errorMode,
|
|
255
257
|
semanticConfigurationName: configurationName,
|
|
256
258
|
debug: debugMode ?? debug,
|
|
@@ -640,6 +642,16 @@ class SearchClient {
|
|
|
640
642
|
}
|
|
641
643
|
return output;
|
|
642
644
|
}
|
|
645
|
+
convertQueryRewrites(queryRewrites) {
|
|
646
|
+
if (!queryRewrites) {
|
|
647
|
+
return void 0;
|
|
648
|
+
}
|
|
649
|
+
const { rewritesType, count } = queryRewrites;
|
|
650
|
+
if (count !== void 0) {
|
|
651
|
+
return `${rewritesType}|count-${count}`;
|
|
652
|
+
}
|
|
653
|
+
return rewritesType;
|
|
654
|
+
}
|
|
643
655
|
convertVectorQuery(vectorQuery) {
|
|
644
656
|
switch (vectorQuery.kind) {
|
|
645
657
|
case "text": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/searchClient.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport {\n bearerTokenAuthenticationPolicy,\n bearerTokenAuthenticationPolicyName,\n type Pipeline,\n} from \"@azure/core-rest-pipeline\";\nimport { decode, encode } from \"./base64.js\";\nimport type {\n AutocompleteResult,\n IndexDocumentsResult,\n QueryAnswerType as BaseAnswers,\n QueryCaptionType as BaseCaptions,\n SearchRequest as GeneratedSearchRequest,\n VectorQueryUnion as GeneratedVectorQuery,\n SemanticSearchResultsType,\n} from \"./models/azure/search/documents/index.js\";\nimport type { SearchClientOptionalParams } from \"./search/searchClient.js\";\nimport { SearchClient as GeneratedClient } from \"./search/searchClient.js\";\nimport { IndexDocumentsBatch } from \"./indexDocumentsBatch.js\";\nimport type {\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsAction,\n IndexDocumentsOptions,\n ListSearchResultsPageSettings,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n NarrowedModel,\n QueryAnswer,\n QueryCaption,\n SearchDocumentsPageResult,\n SearchDocumentsResult,\n SearchFieldArray,\n SearchIterator,\n SearchOptions,\n SearchResult,\n SelectFields,\n SemanticErrorReason,\n SuggestDocumentsResult,\n SuggestOptions,\n UploadDocumentsOptions,\n VectorQuery,\n VectorizableImageBinaryQuery,\n} from \"./indexModels.js\";\nimport { logger } from \"./logger.js\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy.js\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy.js\";\nimport { KnownSearchAudience } from \"./searchAudience.js\";\nimport type { IndexDocumentsClient } from \"./searchIndexingBufferedSender.js\";\nimport { deserialize, serialize } from \"./serialization.js\";\nimport * as utils from \"./serviceUtils.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport type { ClientOptions, OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n GetDocumentOptionalParams,\n SuggestPostOptionalParams,\n SearchPostOptionalParams,\n} from \"./search/index.js\";\n\n/**\n * Client options used to configure AI Search API requests.\n */\nexport interface SearchClientOptions extends ClientOptions {\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@link serviceVersion} instead\n */\n apiVersion?: string;\n\n /**\n * The service version to use when communicating with the service.\n */\n serviceVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD). The\n * audience is not considered when using a shared key.\n * {@link KnownSearchAudience} can be used interchangeably with audience\n */\n audience?: string;\n}\n\n/**\n * Class used to perform operations against a search index,\n * including querying documents in the index as well as\n * adding, updating, and removing them.\n */\nexport class SearchClient<TModel extends object> implements IndexDocumentsClient<TModel> {\n /// Maintenance note: when updating supported API versions,\n /// the ContinuationToken logic will need to be updated below.\n\n /**\n * The service version to use when communicating with the service.\n */\n public readonly serviceVersion: string = utils.defaultServiceVersion;\n\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n public readonly apiVersion: string = utils.defaultServiceVersion;\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * The name of the index\n */\n public readonly indexName: string;\n\n /**\n * @hidden\n * A reference to the auto-generated SearchClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * A reference to the internal HTTP pipeline for use with raw requests\n */\n public readonly pipeline: Pipeline;\n\n /**\n * Creates an instance of SearchClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleSearchClient\n * import { SearchClient, AzureKeyCredential } from \"@azure/search-documents\";\n *\n * const searchClient = new SearchClient(\n * \"<endpoint>\",\n * \"<indexName>\",\n * new AzureKeyCredential(\"<apiKey>\"),\n * );\n * ```\n *\n * Optionally, the type of the model can be used to enable strong typing and type hints:\n * ```ts snippet:ReadmeSampleSearchClientWithModel\n * import { SearchClient, AzureKeyCredential } from \"@azure/search-documents\";\n *\n * type TModel = {\n * keyName: string;\n * field1?: string | null;\n * field2?: {\n * anotherField?: string | null;\n * } | null;\n * };\n *\n * const searchClient = new SearchClient<TModel>(\n * \"<endpoint>\",\n * \"<indexName>\",\n * new AzureKeyCredential(\"<apiKey>\"),\n * );\n * ```\n *\n * @param endpoint - The endpoint of the search service\n * @param indexName - The name of the index\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n *\n * @typeParam TModel - An optional type that represents the documents stored in\n * the search index. For the best typing experience, all non-key fields should\n * be marked optional and nullable, and the key property should have the\n * non-nullable type `string`.\n */\n constructor(\n endpoint: string,\n indexName: string,\n credential: KeyCredential | TokenCredential,\n options: SearchClientOptions = {},\n ) {\n this.endpoint = endpoint;\n this.indexName = indexName;\n\n const internalClientPipelineOptions: SearchClientOptionalParams = {\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 this.serviceVersion =\n options.serviceVersion ?? options.apiVersion ?? utils.defaultServiceVersion;\n this.apiVersion = this.serviceVersion;\n\n this.client = new GeneratedClient(\n this.endpoint,\n credential,\n this.indexName,\n internalClientPipelineOptions,\n );\n\n this.pipeline = this.client.pipeline;\n\n // Replaced with a custom policy below\n this.pipeline.removePolicy({ name: bearerTokenAuthenticationPolicyName });\n\n if (isTokenCredential(credential)) {\n const scope: string = options.audience\n ? `${options.audience}/.default`\n : `${KnownSearchAudience.AzurePublicCloud}/.default`;\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: scope }),\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"none\"));\n }\n\n /**\n * Retrieves the number of documents in the index.\n * @param options - Options to the count operation.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n public async getDocumentsCount(options: CountDocumentsOptions = {}): Promise<number> {\n return tracingClient.withSpan(\n \"SearchClient-getDocumentsCount\",\n options,\n async (updatedOptions) => {\n const count = await this.client.getDocumentCount(updatedOptions);\n return Number(count);\n },\n );\n }\n\n /**\n * Based on a partial searchText from the user, return a list of potential completion strings\n * based on a specified suggester.\n * @param searchText - The search text on which to base autocomplete results.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection\n * that's part of the index definition.\n * @param options - Options to the autocomplete operation.\n * @example\n * ```ts snippet:ReadmeSampleAutocomplete\n * import { SearchClient, AzureKeyCredential, SearchFieldArray } from \"@azure/search-documents\";\n *\n * type TModel = {\n * key: string;\n * azure?: {\n * sdk: string | null;\n * } | null;\n * };\n *\n * const client = new SearchClient<TModel>(\n * \"endpoint.azure\",\n * \"indexName\",\n * new AzureKeyCredential(\"key\"),\n * );\n *\n * const searchFields: SearchFieldArray<TModel> = [\"azure/sdk\"];\n *\n * const autocompleteResult = await client.autocomplete(\"searchText\", \"suggesterName\", {\n * searchFields,\n * });\n * ```\n */\n public async autocomplete(\n searchText: string,\n suggesterName: string,\n options: AutocompleteOptions<TModel> = {},\n ): Promise<AutocompleteResult> {\n if (!searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n const { searchFields, ...restOptions } = options;\n\n return tracingClient.withSpan(\"SearchClient-autocomplete\", options, async (updatedOptions) => {\n return this.client.autocompletePost(searchText, suggesterName, {\n ...updatedOptions,\n ...restOptions,\n // Cast readonly array to mutable - the generated code doesn't mutate it\n searchFields: searchFields as string[] | undefined,\n });\n });\n }\n\n private async searchDocuments<TFields extends SelectFields<TModel>>(\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n nextPageParameters: GeneratedSearchRequest = {},\n ): Promise<SearchDocumentsPageResult<TModel, TFields>> {\n const {\n includeTotalCount,\n orderBy,\n searchFields,\n select,\n highlightFields,\n vectorSearchOptions,\n semanticSearchOptions,\n debug,\n ...restOptions\n } = options as typeof options & { queryType: \"semantic\" };\n\n const {\n semanticFields,\n configurationName,\n errorMode,\n answers,\n captions,\n debugMode,\n ...restSemanticOptions\n } = semanticSearchOptions ?? {};\n const { queries, filterMode, ...restVectorOptions } = vectorSearchOptions ?? {};\n\n const fullOptions: SearchPostOptionalParams = {\n ...restSemanticOptions,\n ...restVectorOptions,\n ...restOptions,\n ...nextPageParameters,\n searchFields: this.convertSearchFields(searchFields),\n select: this.convertSelect(select) || \"*\",\n highlightFields: highlightFields?.split(\",\"),\n orderBy: this.convertOrderBy(orderBy),\n includeTotalCount,\n vectorQueries: queries?.map(this.convertVectorQuery.bind(this)),\n answers: this.convertQueryAnswers(answers),\n captions: this.convertQueryCaptions(captions),\n semanticErrorHandling: errorMode,\n semanticConfigurationName: configurationName,\n debug: debugMode ?? debug, // Use semanticSearchOptions.debugMode if set, otherwise use top-level debug\n vectorFilterMode: filterMode,\n };\n\n return tracingClient.withSpan(\n \"SearchClient-searchDocuments\",\n fullOptions,\n async (updatedOptions) => {\n const result = await this.client.searchPost({\n ...updatedOptions,\n searchText: searchText,\n });\n\n const {\n results,\n nextLink,\n nextPageParameters: resultNextPageParameters,\n semanticPartialResponseReason: semanticErrorReason,\n semanticPartialResponseType: semanticSearchResultsType,\n facets,\n answers: resultAnswers,\n ...restResult\n } = result as typeof result & {\n semanticPartialResponseReason: SemanticErrorReason | undefined;\n semanticPartialResponseType: SemanticSearchResultsType | undefined;\n };\n\n const modifiedResults = utils.generatedSearchResultToPublicSearchResult<TModel, TFields>(\n results,\n );\n\n const converted: SearchDocumentsPageResult<TModel, TFields> = {\n ...restResult,\n facets: utils.convertGeneratedFacetsToPublic(facets),\n answers: utils.convertGeneratedAnswersToPublic(resultAnswers),\n results: modifiedResults,\n semanticErrorReason,\n semanticSearchResultsType,\n continuationToken: this.encodeContinuationToken(nextLink, resultNextPageParameters),\n };\n\n return deserialize<SearchDocumentsPageResult<TModel, TFields>>(converted);\n },\n );\n }\n\n private async *listSearchResultsPage<TFields extends SelectFields<TModel>>(\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n settings: ListSearchResultsPageSettings = {},\n ): AsyncIterableIterator<SearchDocumentsPageResult<TModel, TFields>> {\n let decodedContinuation = this.decodeContinuationToken(settings.continuationToken);\n let result = await this.searchDocuments(\n searchText,\n options,\n decodedContinuation?.nextPageParameters,\n );\n\n yield result;\n\n // Technically, we should also leverage nextLink, but the generated code\n // doesn't support this yet.\n while (result.continuationToken) {\n decodedContinuation = this.decodeContinuationToken(result.continuationToken);\n result = await this.searchDocuments(\n searchText,\n options,\n decodedContinuation?.nextPageParameters,\n );\n yield result;\n }\n }\n\n private async *listSearchResultsAll<TFields extends SelectFields<TModel>>(\n firstPage: SearchDocumentsPageResult<TModel, TFields>,\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n ): AsyncIterableIterator<SearchResult<TModel, TFields>> {\n yield* firstPage.results;\n if (firstPage.continuationToken) {\n for await (const page of this.listSearchResultsPage(searchText, options, {\n continuationToken: firstPage.continuationToken,\n })) {\n yield* page.results;\n }\n }\n }\n\n private listSearchResults<TFields extends SelectFields<TModel>>(\n firstPage: SearchDocumentsPageResult<TModel, TFields>,\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n ): SearchIterator<TModel, TFields> {\n const iter = this.listSearchResultsAll(firstPage, searchText, options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: ListSearchResultsPageSettings = {}) => {\n return this.listSearchResultsPage(searchText, options, settings);\n },\n };\n }\n\n /**\n * Performs a search on the current index given\n * the specified arguments.\n * @param searchText - Text to search\n * @param options - Options for the search operation.\n * @example\n * ```ts snippet:ReadmeSampleSearchTModel\n * import { SearchClient, AzureKeyCredential, SearchFieldArray } from \"@azure/search-documents\";\n *\n * type TModel = {\n * key: string;\n * azure?: {\n * sdk: string | null;\n * } | null;\n * };\n *\n * const client = new SearchClient<TModel>(\n * \"endpoint.azure\",\n * \"indexName\",\n * new AzureKeyCredential(\"key\"),\n * );\n *\n * const select = [\"azure/sdk\"] as const;\n * const searchFields: SearchFieldArray<TModel> = [\"azure/sdk\"];\n *\n * const searchResult = await client.search(\"searchText\", {\n * select,\n * searchFields,\n * });\n * ```\n */\n public async search<TFields extends SelectFields<TModel>>(\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n ): Promise<SearchDocumentsResult<TModel, TFields>> {\n return tracingClient.withSpan(\"SearchClient-search\", options, async (updatedOptions) => {\n const pageResult = await this.searchDocuments<TFields>(searchText, updatedOptions);\n return {\n ...pageResult,\n results: this.listSearchResults(pageResult, searchText, updatedOptions),\n };\n });\n }\n\n /**\n * Returns a short list of suggestions based on the searchText and specified suggester.\n * @param searchText - The search text to use to suggest documents. Must be at least 1 character,\n * and no more than 100 characters.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection\n * that's part of the index definition.\n * @param options - Options for the suggest operation\n * @example\n * ```ts snippet:ReadmeSampleSuggest\n * import { SearchClient, AzureKeyCredential, SearchFieldArray } from \"@azure/search-documents\";\n *\n * type TModel = {\n * key: string;\n * azure?: {\n * sdk: string | null;\n * } | null;\n * };\n *\n * const client = new SearchClient<TModel>(\n * \"endpoint.azure\",\n * \"indexName\",\n * new AzureKeyCredential(\"key\"),\n * );\n *\n * const select = [\"azure/sdk\"] as const;\n * const searchFields: SearchFieldArray<TModel> = [\"azure/sdk\"];\n *\n * const suggestResult = await client.suggest(\"searchText\", \"suggesterName\", {\n * select,\n * searchFields,\n * });\n * ```\n */\n public async suggest<TFields extends SelectFields<TModel> = never>(\n searchText: string,\n suggesterName: string,\n options: SuggestOptions<TModel, TFields> = {},\n ): Promise<SuggestDocumentsResult<TModel, TFields>> {\n const { select, searchFields, orderBy, ...nonFieldOptions } = options;\n const fullOptions: SuggestPostOptionalParams = {\n // Cast readonly arrays to mutable - the generated code doesn't mutate them\n searchFields: this.convertSearchFields(searchFields),\n select: this.convertSelect(select),\n orderBy: this.convertOrderBy(orderBy),\n ...nonFieldOptions,\n };\n\n if (!searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n return tracingClient.withSpan(\"SearchClient-suggest\", fullOptions, async (updatedOptions) => {\n const result = await this.client.suggestPost(searchText, suggesterName, updatedOptions);\n\n const modifiedResult = utils.generatedSuggestDocumentsResultToPublicSuggestDocumentsResult<\n TModel,\n TFields\n >(result);\n\n return deserialize<SuggestDocumentsResult<TModel, TFields>>(modifiedResult);\n });\n }\n\n /**\n * Retrieve a particular document from the index by key.\n * @param key - The primary key value of the document\n * @param options - Additional options\n */\n public async getDocument<TFields extends SelectFields<TModel>>(\n key: string,\n options: GetDocumentOptions<TModel, TFields> = {},\n ): Promise<NarrowedModel<TModel, TFields>> {\n return tracingClient.withSpan(\n \"SearchClient-getDocument\",\n options as OperationOptions,\n async (updatedOptions: GetDocumentOptionalParams) => {\n const result = await this.client.getDocument(key, {\n ...updatedOptions,\n selectedFields: updatedOptions.selectedFields,\n });\n // The generated code puts document fields in additionalProperties\n return deserialize<NarrowedModel<TModel, TFields>>(result.additionalProperties ?? {});\n },\n );\n }\n\n /**\n * Perform a set of index modifications (upload, merge, mergeOrUpload, delete)\n * for the given set of documents.\n * This operation may partially succeed and not all document operations will\n * be reflected in the index. If you would like to treat this as an exception,\n * set the `throwOnAnyFailure` option to true.\n * For more details about how merging works, see: https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param batch - An array of actions to perform on the index.\n * @param options - Additional options.\n */\n public async indexDocuments(\n // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\n batch: IndexDocumentsBatch<TModel>,\n options: IndexDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-indexDocuments\",\n options,\n async (updatedOptions) => {\n let status = 0;\n const serializedActions = serialize<IndexDocumentsAction<TModel>[]>(batch.actions);\n const result = await this.client.index(\n { actions: utils.convertPublicActionsToGeneratedActions(serializedActions) },\n {\n ...updatedOptions,\n onResponse: (rawResponse, flatResponse) => {\n status = rawResponse.status;\n if (updatedOptions.onResponse) {\n updatedOptions.onResponse(rawResponse, flatResponse);\n }\n },\n },\n );\n if (options.throwOnAnyFailure && status === 207) {\n throw result;\n }\n return result;\n },\n );\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n * @param options - Additional options.\n */\n public async uploadDocuments(\n documents: TModel[],\n options: UploadDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-uploadDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n batch.upload(documents);\n\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n /**\n * Update a set of documents in the index.\n *\n * For more details about how merging works, see\n * https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n * @param options - Additional options.\n */\n public async mergeDocuments(\n documents: TModel[],\n options: MergeDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-mergeDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n batch.merge(documents);\n\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n /**\n * Update a set of documents in the index or upload them if they don't exist.\n *\n * For more details about how merging works, see\n * https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n * @param options - Additional options.\n */\n public async mergeOrUploadDocuments(\n documents: TModel[],\n options: MergeOrUploadDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-mergeOrUploadDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n batch.mergeOrUpload(documents);\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n documents: TModel[],\n options?: DeleteDocumentsOptions,\n ): Promise<IndexDocumentsResult>;\n\n /**\n * Delete a set of documents.\n * @param keyName - The name of their primary key in the index.\n * @param keyValues - The primary key values of documents to delete.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n keyName: keyof TModel,\n keyValues: string[],\n options?: DeleteDocumentsOptions,\n ): Promise<IndexDocumentsResult>;\n\n public async deleteDocuments(\n keyNameOrDocuments: keyof TModel | TModel[],\n keyValuesOrOptions?: string[] | DeleteDocumentsOptions,\n options: DeleteDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-deleteDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n if (typeof keyNameOrDocuments === \"string\") {\n batch.delete(keyNameOrDocuments, keyValuesOrOptions as string[]);\n } else {\n batch.delete(keyNameOrDocuments as TModel[]);\n }\n\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n private encodeContinuationToken(\n nextLink: string | undefined,\n nextPageParameters: GeneratedSearchRequest | undefined,\n ): string | undefined {\n if (!nextLink || !nextPageParameters) {\n return undefined;\n }\n const payload = JSON.stringify({\n apiVersion: this.apiVersion,\n nextLink,\n nextPageParameters,\n });\n return encode(payload);\n }\n\n private decodeContinuationToken(\n token?: string,\n ): { nextPageParameters: GeneratedSearchRequest; nextLink: string } | undefined {\n if (!token) {\n return undefined;\n }\n\n const decodedToken = decode(token);\n\n try {\n const result: {\n apiVersion: string;\n nextLink: string;\n nextPageParameters: GeneratedSearchRequest;\n } = JSON.parse(decodedToken);\n\n if (result.apiVersion !== this.apiVersion) {\n throw new RangeError(`Continuation token uses unsupported apiVersion \"${this.apiVersion}\"`);\n }\n\n return {\n nextLink: result.nextLink,\n nextPageParameters: result.nextPageParameters,\n };\n } catch (e: any) {\n throw new Error(`Corrupted or invalid continuation token: ${decodedToken}`);\n }\n }\n\n private convertSelect<TFields extends SelectFields<TModel>>(\n select?: readonly TFields[],\n ): string | undefined {\n if (select) {\n return select.join(\",\");\n }\n return undefined;\n }\n\n private convertVectorQueryFields(fields?: SearchFieldArray<TModel>): string | undefined {\n if (fields) {\n return fields.join(\",\");\n }\n return undefined;\n }\n\n private convertSearchFields(searchFields?: SearchFieldArray<TModel>): string | undefined {\n if (searchFields) {\n return searchFields.join(\",\");\n }\n return undefined;\n }\n\n private convertOrderBy(orderBy?: string[]): string | undefined {\n if (orderBy) {\n return orderBy.join(\",\");\n }\n return undefined;\n }\n\n private convertQueryAnswers(answers?: QueryAnswer): BaseAnswers | undefined {\n if (!answers) {\n return undefined;\n }\n\n const config = [];\n const { answerType: output, count, threshold, maxAnswerLength } = answers;\n\n if (count) {\n config.push(`count-${count}`);\n }\n\n if (threshold) {\n config.push(`threshold-${threshold}`);\n }\n\n if (maxAnswerLength) {\n config.push(`maxcharlength-${maxAnswerLength}`);\n }\n\n if (config.length) {\n return output + `|${config.join(\",\")}`;\n }\n\n return output;\n }\n\n private convertQueryCaptions(captions?: QueryCaption): BaseCaptions | undefined {\n if (!captions) {\n return undefined;\n }\n\n const config = [];\n const { captionType: output, highlight, maxCaptionLength } = captions;\n\n if (highlight !== undefined) {\n config.push(`highlight-${highlight}`);\n }\n\n if (maxCaptionLength) {\n config.push(`maxcharlength-${maxCaptionLength}`);\n }\n\n if (config.length) {\n return output + `|${config.join(\",\")}`;\n }\n\n return output;\n }\n\n private convertVectorQuery<T extends VectorQuery<TModel>>(vectorQuery: T): GeneratedVectorQuery {\n switch (vectorQuery.kind) {\n case \"text\": {\n const { fields, ...restFields } = vectorQuery;\n return {\n ...restFields,\n fields: this.convertVectorQueryFields(fields),\n };\n }\n case \"vector\":\n case \"imageUrl\": {\n return { ...vectorQuery, fields: this.convertVectorQueryFields(vectorQuery?.fields) };\n }\n case \"imageBinary\": {\n // Map convenience layer's binaryImage to generated layer's base64Image\n const { binaryImage, fields, ...rest } =\n vectorQuery as VectorizableImageBinaryQuery<TModel>;\n return {\n ...rest,\n base64Image: binaryImage,\n fields: this.convertVectorQueryFields(fields),\n };\n }\n default: {\n logger.warning(\"Unknown vector query kind; sending without serialization\");\n return vectorQuery as any;\n }\n }\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,uBAAkC;AAClC,gCAIO;AACP,oBAA+B;AAW/B,0BAAgD;AAChD,iCAAoC;
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport {\n bearerTokenAuthenticationPolicy,\n bearerTokenAuthenticationPolicyName,\n type Pipeline,\n} from \"@azure/core-rest-pipeline\";\nimport { decode, encode } from \"./base64.js\";\nimport type {\n AutocompleteResult,\n IndexDocumentsResult,\n QueryAnswerType as BaseAnswers,\n QueryCaptionType as BaseCaptions,\n SearchRequest as GeneratedSearchRequest,\n VectorQueryUnion as GeneratedVectorQuery,\n SemanticSearchResultsType,\n} from \"./models/azure/search/documents/index.js\";\nimport type { SearchClientOptionalParams } from \"./search/searchClient.js\";\nimport { SearchClient as GeneratedClient } from \"./search/searchClient.js\";\nimport { IndexDocumentsBatch } from \"./indexDocumentsBatch.js\";\nimport type {\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsAction,\n IndexDocumentsOptions,\n ListSearchResultsPageSettings,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n NarrowedModel,\n QueryAnswer,\n QueryCaption,\n QueryRewrites,\n SearchDocumentsPageResult,\n SearchDocumentsResult,\n SearchFieldArray,\n SearchIterator,\n SearchOptions,\n SearchResult,\n SelectFields,\n SemanticErrorReason,\n SuggestDocumentsResult,\n SuggestOptions,\n UploadDocumentsOptions,\n VectorQuery,\n VectorizableImageBinaryQuery,\n} from \"./indexModels.js\";\nimport { logger } from \"./logger.js\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy.js\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy.js\";\nimport { KnownSearchAudience } from \"./searchAudience.js\";\nimport type { IndexDocumentsClient } from \"./searchIndexingBufferedSender.js\";\nimport { deserialize, serialize } from \"./serialization.js\";\nimport * as utils from \"./serviceUtils.js\";\nimport { tracingClient } from \"./tracing.js\";\nimport type { ClientOptions, OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n GetDocumentOptionalParams,\n SuggestPostOptionalParams,\n SearchPostOptionalParams,\n} from \"./search/index.js\";\n\n/**\n * Client options used to configure AI Search API requests.\n */\nexport interface SearchClientOptions extends ClientOptions {\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@link serviceVersion} instead\n */\n apiVersion?: string;\n\n /**\n * The service version to use when communicating with the service.\n */\n serviceVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD). The\n * audience is not considered when using a shared key.\n * {@link KnownSearchAudience} can be used interchangeably with audience\n */\n audience?: string;\n}\n\n/**\n * Class used to perform operations against a search index,\n * including querying documents in the index as well as\n * adding, updating, and removing them.\n */\nexport class SearchClient<TModel extends object> implements IndexDocumentsClient<TModel> {\n /// Maintenance note: when updating supported API versions,\n /// the ContinuationToken logic will need to be updated below.\n\n /**\n * The service version to use when communicating with the service.\n */\n public readonly serviceVersion: string = utils.defaultServiceVersion;\n\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n public readonly apiVersion: string = utils.defaultServiceVersion;\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * The name of the index\n */\n public readonly indexName: string;\n\n /**\n * @hidden\n * A reference to the auto-generated SearchClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * A reference to the internal HTTP pipeline for use with raw requests\n */\n public readonly pipeline: Pipeline;\n\n /**\n * Creates an instance of SearchClient.\n *\n * Example usage:\n * ```ts snippet:ReadmeSampleSearchClient\n * import { SearchClient, AzureKeyCredential } from \"@azure/search-documents\";\n *\n * const searchClient = new SearchClient(\n * \"<endpoint>\",\n * \"<indexName>\",\n * new AzureKeyCredential(\"<apiKey>\"),\n * );\n * ```\n *\n * Optionally, the type of the model can be used to enable strong typing and type hints:\n * ```ts snippet:ReadmeSampleSearchClientWithModel\n * import { SearchClient, AzureKeyCredential } from \"@azure/search-documents\";\n *\n * type TModel = {\n * keyName: string;\n * field1?: string | null;\n * field2?: {\n * anotherField?: string | null;\n * } | null;\n * };\n *\n * const searchClient = new SearchClient<TModel>(\n * \"<endpoint>\",\n * \"<indexName>\",\n * new AzureKeyCredential(\"<apiKey>\"),\n * );\n * ```\n *\n * @param endpoint - The endpoint of the search service\n * @param indexName - The name of the index\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n *\n * @typeParam TModel - An optional type that represents the documents stored in\n * the search index. For the best typing experience, all non-key fields should\n * be marked optional and nullable, and the key property should have the\n * non-nullable type `string`.\n */\n constructor(\n endpoint: string,\n indexName: string,\n credential: KeyCredential | TokenCredential,\n options: SearchClientOptions = {},\n ) {\n this.endpoint = endpoint;\n this.indexName = indexName;\n\n const internalClientPipelineOptions: SearchClientOptionalParams = {\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 this.serviceVersion =\n options.serviceVersion ?? options.apiVersion ?? utils.defaultServiceVersion;\n this.apiVersion = this.serviceVersion;\n\n this.client = new GeneratedClient(\n this.endpoint,\n credential,\n this.indexName,\n internalClientPipelineOptions,\n );\n\n this.pipeline = this.client.pipeline;\n\n // Replaced with a custom policy below\n this.pipeline.removePolicy({ name: bearerTokenAuthenticationPolicyName });\n\n if (isTokenCredential(credential)) {\n const scope: string = options.audience\n ? `${options.audience}/.default`\n : `${KnownSearchAudience.AzurePublicCloud}/.default`;\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: scope }),\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"none\"));\n }\n\n /**\n * Retrieves the number of documents in the index.\n * @param options - Options to the count operation.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n public async getDocumentsCount(options: CountDocumentsOptions = {}): Promise<number> {\n return tracingClient.withSpan(\n \"SearchClient-getDocumentsCount\",\n options,\n async (updatedOptions) => {\n const count = await this.client.getDocumentCount(updatedOptions);\n return Number(count);\n },\n );\n }\n\n /**\n * Based on a partial searchText from the user, return a list of potential completion strings\n * based on a specified suggester.\n * @param searchText - The search text on which to base autocomplete results.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection\n * that's part of the index definition.\n * @param options - Options to the autocomplete operation.\n * @example\n * ```ts snippet:ReadmeSampleAutocomplete\n * import { SearchClient, AzureKeyCredential, SearchFieldArray } from \"@azure/search-documents\";\n *\n * type TModel = {\n * key: string;\n * azure?: {\n * sdk: string | null;\n * } | null;\n * };\n *\n * const client = new SearchClient<TModel>(\n * \"endpoint.azure\",\n * \"indexName\",\n * new AzureKeyCredential(\"key\"),\n * );\n *\n * const searchFields: SearchFieldArray<TModel> = [\"azure/sdk\"];\n *\n * const autocompleteResult = await client.autocomplete(\"searchText\", \"suggesterName\", {\n * searchFields,\n * });\n * ```\n */\n public async autocomplete(\n searchText: string,\n suggesterName: string,\n options: AutocompleteOptions<TModel> = {},\n ): Promise<AutocompleteResult> {\n if (!searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n const { searchFields, ...restOptions } = options;\n\n return tracingClient.withSpan(\"SearchClient-autocomplete\", options, async (updatedOptions) => {\n return this.client.autocompletePost(searchText, suggesterName, {\n ...updatedOptions,\n ...restOptions,\n // Cast readonly array to mutable - the generated code doesn't mutate it\n searchFields: searchFields as string[] | undefined,\n });\n });\n }\n\n private async searchDocuments<TFields extends SelectFields<TModel>>(\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n nextPageParameters: GeneratedSearchRequest = {},\n ): Promise<SearchDocumentsPageResult<TModel, TFields>> {\n const {\n includeTotalCount,\n orderBy,\n searchFields,\n select,\n highlightFields,\n vectorSearchOptions,\n semanticSearchOptions,\n debug,\n ...restOptions\n } = options as typeof options & { queryType: \"semantic\" };\n\n const {\n semanticFields,\n configurationName,\n errorMode,\n answers,\n captions,\n debugMode,\n queryRewrites,\n ...restSemanticOptions\n } = semanticSearchOptions ?? {};\n const { queries, filterMode, ...restVectorOptions } = vectorSearchOptions ?? {};\n\n const fullOptions: SearchPostOptionalParams = {\n ...restSemanticOptions,\n ...restVectorOptions,\n ...restOptions,\n ...nextPageParameters,\n searchFields: this.convertSearchFields(searchFields),\n select: this.convertSelect(select) || \"*\",\n highlightFields: highlightFields?.split(\",\"),\n orderBy: this.convertOrderBy(orderBy),\n includeTotalCount,\n vectorQueries: queries?.map(this.convertVectorQuery.bind(this)),\n answers: this.convertQueryAnswers(answers),\n captions: this.convertQueryCaptions(captions),\n queryRewrites: this.convertQueryRewrites(queryRewrites),\n semanticErrorHandling: errorMode,\n semanticConfigurationName: configurationName,\n debug: debugMode ?? debug, // Use semanticSearchOptions.debugMode if set, otherwise use top-level debug\n vectorFilterMode: filterMode,\n };\n\n return tracingClient.withSpan(\n \"SearchClient-searchDocuments\",\n fullOptions,\n async (updatedOptions) => {\n const result = await this.client.searchPost({\n ...updatedOptions,\n searchText: searchText,\n });\n\n const {\n results,\n nextLink,\n nextPageParameters: resultNextPageParameters,\n semanticPartialResponseReason: semanticErrorReason,\n semanticPartialResponseType: semanticSearchResultsType,\n facets,\n answers: resultAnswers,\n ...restResult\n } = result as typeof result & {\n semanticPartialResponseReason: SemanticErrorReason | undefined;\n semanticPartialResponseType: SemanticSearchResultsType | undefined;\n };\n\n const modifiedResults = utils.generatedSearchResultToPublicSearchResult<TModel, TFields>(\n results,\n );\n\n const converted: SearchDocumentsPageResult<TModel, TFields> = {\n ...restResult,\n facets: utils.convertGeneratedFacetsToPublic(facets),\n answers: utils.convertGeneratedAnswersToPublic(resultAnswers),\n results: modifiedResults,\n semanticErrorReason,\n semanticSearchResultsType,\n continuationToken: this.encodeContinuationToken(nextLink, resultNextPageParameters),\n };\n\n return deserialize<SearchDocumentsPageResult<TModel, TFields>>(converted);\n },\n );\n }\n\n private async *listSearchResultsPage<TFields extends SelectFields<TModel>>(\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n settings: ListSearchResultsPageSettings = {},\n ): AsyncIterableIterator<SearchDocumentsPageResult<TModel, TFields>> {\n let decodedContinuation = this.decodeContinuationToken(settings.continuationToken);\n let result = await this.searchDocuments(\n searchText,\n options,\n decodedContinuation?.nextPageParameters,\n );\n\n yield result;\n\n // Technically, we should also leverage nextLink, but the generated code\n // doesn't support this yet.\n while (result.continuationToken) {\n decodedContinuation = this.decodeContinuationToken(result.continuationToken);\n result = await this.searchDocuments(\n searchText,\n options,\n decodedContinuation?.nextPageParameters,\n );\n yield result;\n }\n }\n\n private async *listSearchResultsAll<TFields extends SelectFields<TModel>>(\n firstPage: SearchDocumentsPageResult<TModel, TFields>,\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n ): AsyncIterableIterator<SearchResult<TModel, TFields>> {\n yield* firstPage.results;\n if (firstPage.continuationToken) {\n for await (const page of this.listSearchResultsPage(searchText, options, {\n continuationToken: firstPage.continuationToken,\n })) {\n yield* page.results;\n }\n }\n }\n\n private listSearchResults<TFields extends SelectFields<TModel>>(\n firstPage: SearchDocumentsPageResult<TModel, TFields>,\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n ): SearchIterator<TModel, TFields> {\n const iter = this.listSearchResultsAll(firstPage, searchText, options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: ListSearchResultsPageSettings = {}) => {\n return this.listSearchResultsPage(searchText, options, settings);\n },\n };\n }\n\n /**\n * Performs a search on the current index given\n * the specified arguments.\n * @param searchText - Text to search\n * @param options - Options for the search operation.\n * @example\n * ```ts snippet:ReadmeSampleSearchTModel\n * import { SearchClient, AzureKeyCredential, SearchFieldArray } from \"@azure/search-documents\";\n *\n * type TModel = {\n * key: string;\n * azure?: {\n * sdk: string | null;\n * } | null;\n * };\n *\n * const client = new SearchClient<TModel>(\n * \"endpoint.azure\",\n * \"indexName\",\n * new AzureKeyCredential(\"key\"),\n * );\n *\n * const select = [\"azure/sdk\"] as const;\n * const searchFields: SearchFieldArray<TModel> = [\"azure/sdk\"];\n *\n * const searchResult = await client.search(\"searchText\", {\n * select,\n * searchFields,\n * });\n * ```\n */\n public async search<TFields extends SelectFields<TModel>>(\n searchText?: string,\n options: SearchOptions<TModel, TFields> = {},\n ): Promise<SearchDocumentsResult<TModel, TFields>> {\n return tracingClient.withSpan(\"SearchClient-search\", options, async (updatedOptions) => {\n const pageResult = await this.searchDocuments<TFields>(searchText, updatedOptions);\n return {\n ...pageResult,\n results: this.listSearchResults(pageResult, searchText, updatedOptions),\n };\n });\n }\n\n /**\n * Returns a short list of suggestions based on the searchText and specified suggester.\n * @param searchText - The search text to use to suggest documents. Must be at least 1 character,\n * and no more than 100 characters.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection\n * that's part of the index definition.\n * @param options - Options for the suggest operation\n * @example\n * ```ts snippet:ReadmeSampleSuggest\n * import { SearchClient, AzureKeyCredential, SearchFieldArray } from \"@azure/search-documents\";\n *\n * type TModel = {\n * key: string;\n * azure?: {\n * sdk: string | null;\n * } | null;\n * };\n *\n * const client = new SearchClient<TModel>(\n * \"endpoint.azure\",\n * \"indexName\",\n * new AzureKeyCredential(\"key\"),\n * );\n *\n * const select = [\"azure/sdk\"] as const;\n * const searchFields: SearchFieldArray<TModel> = [\"azure/sdk\"];\n *\n * const suggestResult = await client.suggest(\"searchText\", \"suggesterName\", {\n * select,\n * searchFields,\n * });\n * ```\n */\n public async suggest<TFields extends SelectFields<TModel> = never>(\n searchText: string,\n suggesterName: string,\n options: SuggestOptions<TModel, TFields> = {},\n ): Promise<SuggestDocumentsResult<TModel, TFields>> {\n const { select, searchFields, orderBy, ...nonFieldOptions } = options;\n const fullOptions: SuggestPostOptionalParams = {\n // Cast readonly arrays to mutable - the generated code doesn't mutate them\n searchFields: this.convertSearchFields(searchFields),\n select: this.convertSelect(select),\n orderBy: this.convertOrderBy(orderBy),\n ...nonFieldOptions,\n };\n\n if (!searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n return tracingClient.withSpan(\"SearchClient-suggest\", fullOptions, async (updatedOptions) => {\n const result = await this.client.suggestPost(searchText, suggesterName, updatedOptions);\n\n const modifiedResult = utils.generatedSuggestDocumentsResultToPublicSuggestDocumentsResult<\n TModel,\n TFields\n >(result);\n\n return deserialize<SuggestDocumentsResult<TModel, TFields>>(modifiedResult);\n });\n }\n\n /**\n * Retrieve a particular document from the index by key.\n * @param key - The primary key value of the document\n * @param options - Additional options\n */\n public async getDocument<TFields extends SelectFields<TModel>>(\n key: string,\n options: GetDocumentOptions<TModel, TFields> = {},\n ): Promise<NarrowedModel<TModel, TFields>> {\n return tracingClient.withSpan(\n \"SearchClient-getDocument\",\n options as OperationOptions,\n async (updatedOptions: GetDocumentOptionalParams) => {\n const result = await this.client.getDocument(key, {\n ...updatedOptions,\n selectedFields: updatedOptions.selectedFields,\n });\n // The generated code puts document fields in additionalProperties\n return deserialize<NarrowedModel<TModel, TFields>>(result.additionalProperties ?? {});\n },\n );\n }\n\n /**\n * Perform a set of index modifications (upload, merge, mergeOrUpload, delete)\n * for the given set of documents.\n * This operation may partially succeed and not all document operations will\n * be reflected in the index. If you would like to treat this as an exception,\n * set the `throwOnAnyFailure` option to true.\n * For more details about how merging works, see: https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param batch - An array of actions to perform on the index.\n * @param options - Additional options.\n */\n public async indexDocuments(\n // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\n batch: IndexDocumentsBatch<TModel>,\n options: IndexDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-indexDocuments\",\n options,\n async (updatedOptions) => {\n let status = 0;\n const serializedActions = serialize<IndexDocumentsAction<TModel>[]>(batch.actions);\n const result = await this.client.index(\n { actions: utils.convertPublicActionsToGeneratedActions(serializedActions) },\n {\n ...updatedOptions,\n onResponse: (rawResponse, flatResponse) => {\n status = rawResponse.status;\n if (updatedOptions.onResponse) {\n updatedOptions.onResponse(rawResponse, flatResponse);\n }\n },\n },\n );\n if (options.throwOnAnyFailure && status === 207) {\n throw result;\n }\n return result;\n },\n );\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n * @param options - Additional options.\n */\n public async uploadDocuments(\n documents: TModel[],\n options: UploadDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-uploadDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n batch.upload(documents);\n\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n /**\n * Update a set of documents in the index.\n *\n * For more details about how merging works, see\n * https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n * @param options - Additional options.\n */\n public async mergeDocuments(\n documents: TModel[],\n options: MergeDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-mergeDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n batch.merge(documents);\n\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n /**\n * Update a set of documents in the index or upload them if they don't exist.\n *\n * For more details about how merging works, see\n * https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n * @param options - Additional options.\n */\n public async mergeOrUploadDocuments(\n documents: TModel[],\n options: MergeOrUploadDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-mergeOrUploadDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n batch.mergeOrUpload(documents);\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n documents: TModel[],\n options?: DeleteDocumentsOptions,\n ): Promise<IndexDocumentsResult>;\n\n /**\n * Delete a set of documents.\n * @param keyName - The name of their primary key in the index.\n * @param keyValues - The primary key values of documents to delete.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n keyName: keyof TModel,\n keyValues: string[],\n options?: DeleteDocumentsOptions,\n ): Promise<IndexDocumentsResult>;\n\n public async deleteDocuments(\n keyNameOrDocuments: keyof TModel | TModel[],\n keyValuesOrOptions?: string[] | DeleteDocumentsOptions,\n options: DeleteDocumentsOptions = {},\n ): Promise<IndexDocumentsResult> {\n return tracingClient.withSpan(\n \"SearchClient-deleteDocuments\",\n options,\n async (updatedOptions) => {\n const batch = new IndexDocumentsBatch<TModel>();\n if (typeof keyNameOrDocuments === \"string\") {\n batch.delete(keyNameOrDocuments, keyValuesOrOptions as string[]);\n } else {\n batch.delete(keyNameOrDocuments as TModel[]);\n }\n\n return this.indexDocuments(batch, updatedOptions);\n },\n );\n }\n\n private encodeContinuationToken(\n nextLink: string | undefined,\n nextPageParameters: GeneratedSearchRequest | undefined,\n ): string | undefined {\n if (!nextLink || !nextPageParameters) {\n return undefined;\n }\n const payload = JSON.stringify({\n apiVersion: this.apiVersion,\n nextLink,\n nextPageParameters,\n });\n return encode(payload);\n }\n\n private decodeContinuationToken(\n token?: string,\n ): { nextPageParameters: GeneratedSearchRequest; nextLink: string } | undefined {\n if (!token) {\n return undefined;\n }\n\n const decodedToken = decode(token);\n\n try {\n const result: {\n apiVersion: string;\n nextLink: string;\n nextPageParameters: GeneratedSearchRequest;\n } = JSON.parse(decodedToken);\n\n if (result.apiVersion !== this.apiVersion) {\n throw new RangeError(`Continuation token uses unsupported apiVersion \"${this.apiVersion}\"`);\n }\n\n return {\n nextLink: result.nextLink,\n nextPageParameters: result.nextPageParameters,\n };\n } catch (e: any) {\n throw new Error(`Corrupted or invalid continuation token: ${decodedToken}`);\n }\n }\n\n private convertSelect<TFields extends SelectFields<TModel>>(\n select?: readonly TFields[],\n ): string | undefined {\n if (select) {\n return select.join(\",\");\n }\n return undefined;\n }\n\n private convertVectorQueryFields(fields?: SearchFieldArray<TModel>): string | undefined {\n if (fields) {\n return fields.join(\",\");\n }\n return undefined;\n }\n\n private convertSearchFields(searchFields?: SearchFieldArray<TModel>): string | undefined {\n if (searchFields) {\n return searchFields.join(\",\");\n }\n return undefined;\n }\n\n private convertOrderBy(orderBy?: string[]): string | undefined {\n if (orderBy) {\n return orderBy.join(\",\");\n }\n return undefined;\n }\n\n private convertQueryAnswers(answers?: QueryAnswer): BaseAnswers | undefined {\n if (!answers) {\n return undefined;\n }\n\n const config = [];\n const { answerType: output, count, threshold, maxAnswerLength } = answers;\n\n if (count) {\n config.push(`count-${count}`);\n }\n\n if (threshold) {\n config.push(`threshold-${threshold}`);\n }\n\n if (maxAnswerLength) {\n config.push(`maxcharlength-${maxAnswerLength}`);\n }\n\n if (config.length) {\n return output + `|${config.join(\",\")}`;\n }\n\n return output;\n }\n\n private convertQueryCaptions(captions?: QueryCaption): BaseCaptions | undefined {\n if (!captions) {\n return undefined;\n }\n\n const config = [];\n const { captionType: output, highlight, maxCaptionLength } = captions;\n\n if (highlight !== undefined) {\n config.push(`highlight-${highlight}`);\n }\n\n if (maxCaptionLength) {\n config.push(`maxcharlength-${maxCaptionLength}`);\n }\n\n if (config.length) {\n return output + `|${config.join(\",\")}`;\n }\n\n return output;\n }\n\n private convertQueryRewrites(queryRewrites?: QueryRewrites): string | undefined {\n if (!queryRewrites) {\n return undefined;\n }\n\n const { rewritesType, count } = queryRewrites;\n\n if (count !== undefined) {\n return `${rewritesType}|count-${count}`;\n }\n\n return rewritesType;\n }\n\n private convertVectorQuery<T extends VectorQuery<TModel>>(vectorQuery: T): GeneratedVectorQuery {\n switch (vectorQuery.kind) {\n case \"text\": {\n const { fields, ...restFields } = vectorQuery;\n return {\n ...restFields,\n fields: this.convertVectorQueryFields(fields),\n };\n }\n case \"vector\":\n case \"imageUrl\": {\n return { ...vectorQuery, fields: this.convertVectorQueryFields(vectorQuery?.fields) };\n }\n case \"imageBinary\": {\n // Map convenience layer's binaryImage to generated layer's base64Image\n const { binaryImage, fields, ...rest } =\n vectorQuery as VectorizableImageBinaryQuery<TModel>;\n return {\n ...rest,\n base64Image: binaryImage,\n fields: this.convertVectorQueryFields(fields),\n };\n }\n default: {\n logger.warning(\"Unknown vector query kind; sending without serialization\");\n return vectorQuery as any;\n }\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,uBAAkC;AAClC,gCAIO;AACP,oBAA+B;AAW/B,0BAAgD;AAChD,iCAAoC;AA6BpC,oBAAuB;AACvB,iCAA0C;AAC1C,0CAAmD;AACnD,4BAAoC;AAEpC,2BAAuC;AACvC,YAAuB;AACvB,qBAA8B;AAoCvB,MAAM,aAA4E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOvE,iBAAyB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAM/B,aAAqB,MAAM;AAAA;AAAA;AAAA;AAAA,EAK3B;AAAA;AAAA;AAAA;AAAA,EAKA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMC;AAAA;AAAA;AAAA;AAAA,EAKD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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,GAAG,CAAC;AAAA,IACtC;AAEA,WAAO;AAAA,EACT;AAAA,EAEQ,qBAAqB,eAAmD;AAC9E,QAAI,CAAC,eAAe;AAClB,aAAO;AAAA,IACT;AAEA,UAAM,EAAE,cAAc,MAAM,IAAI;AAEhC,QAAI,UAAU,QAAW;AACvB,aAAO,GAAG,YAAY,UAAU,KAAK;AAAA,IACvC;AAEA,WAAO;AAAA,EACT;AAAA,EAEQ,mBAAkD,aAAsC;AAC9F,YAAQ,YAAY,MAAM;AAAA,MACxB,KAAK,QAAQ;AACX,cAAM,EAAE,QAAQ,GAAG,WAAW,IAAI;AAClC,eAAO;AAAA,UACL,GAAG;AAAA,UACH,QAAQ,KAAK,yBAAyB,MAAM;AAAA,QAC9C;AAAA,MACF;AAAA,MACA,KAAK;AAAA,MACL,KAAK,YAAY;AACf,eAAO,EAAE,GAAG,aAAa,QAAQ,KAAK,yBAAyB,aAAa,MAAM,EAAE;AAAA,MACtF;AAAA,MACA,KAAK,eAAe;AAElB,cAAM,EAAE,aAAa,QAAQ,GAAG,KAAK,IACnC;AACF,eAAO;AAAA,UACL,GAAG;AAAA,UACH,aAAa;AAAA,UACb,QAAQ,KAAK,yBAAyB,MAAM;AAAA,QAC9C;AAAA,MACF;AAAA,MACA,SAAS;AACP,6BAAO,QAAQ,0DAA0D;AACzE,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["GeneratedClient"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { getServiceStatistics, getKnowledgeSourceStatus, createKnowledgeSource, listKnowledgeSources, getKnowledgeSource, deleteKnowledgeSource, createOrUpdateKnowledgeSource, createKnowledgeBase, listKnowledgeBases, getKnowledgeBase, deleteKnowledgeBase, createOrUpdateKnowledgeBase, createAlias, listAliases, getAlias, deleteAlias, createOrUpdateAlias, analyzeText, getIndexStatistics, createIndex, listIndexesWithSelectedProperties, listIndexes, getIndex, deleteIndex, createOrUpdateIndex, createSynonymMap, getSynonymMaps, getSynonymMap, deleteSynonymMap, createOrUpdateSynonymMap, } from "./operations.js";
|
|
2
|
-
export type { GetServiceStatisticsOptionalParams, GetKnowledgeSourceStatusOptionalParams, CreateKnowledgeSourceOptionalParams, ListKnowledgeSourcesOptionalParams, GetKnowledgeSourceOptionalParams, DeleteKnowledgeSourceOptionalParams, CreateOrUpdateKnowledgeSourceOptionalParams, CreateKnowledgeBaseOptionalParams, ListKnowledgeBasesOptionalParams, GetKnowledgeBaseOptionalParams, DeleteKnowledgeBaseOptionalParams, CreateOrUpdateKnowledgeBaseOptionalParams, CreateAliasOptionalParams, ListAliasesOptionalParams, GetAliasOptionalParams, DeleteAliasOptionalParams, CreateOrUpdateAliasOptionalParams, AnalyzeTextOptionalParams, GetIndexStatisticsOptionalParams, CreateIndexOptionalParams, ListIndexesWithSelectedPropertiesOptionalParams, ListIndexesOptionalParams, GetIndexOptionalParams, DeleteIndexOptionalParams, CreateOrUpdateIndexOptionalParams, CreateSynonymMapOptionalParams, GetSynonymMapsOptionalParams, GetSynonymMapOptionalParams, DeleteSynonymMapOptionalParams, CreateOrUpdateSynonymMapOptionalParams, } from "./options.js";
|
|
1
|
+
export { listIndexStatsSummary, getServiceStatistics, getKnowledgeSourceStatus, uploadKnowledgeSourceFile, listKnowledgeSourceFiles, deleteKnowledgeSourceFile, createKnowledgeSource, listKnowledgeSources, getKnowledgeSource, deleteKnowledgeSource, createOrUpdateKnowledgeSource, createKnowledgeBase, listKnowledgeBases, getKnowledgeBase, deleteKnowledgeBase, createOrUpdateKnowledgeBase, createAlias, listAliases, getAlias, deleteAlias, createOrUpdateAlias, analyzeText, getIndexStatistics, createIndex, listIndexesWithSelectedProperties, listIndexes, getIndex, deleteIndex, createOrUpdateIndex, createSynonymMap, getSynonymMaps, getSynonymMap, deleteSynonymMap, createOrUpdateSynonymMap, } from "./operations.js";
|
|
2
|
+
export type { ListIndexStatsSummaryOptionalParams, GetServiceStatisticsOptionalParams, GetKnowledgeSourceStatusOptionalParams, UploadKnowledgeSourceFileOptionalParams, ListKnowledgeSourceFilesOptionalParams, DeleteKnowledgeSourceFileOptionalParams, CreateKnowledgeSourceOptionalParams, ListKnowledgeSourcesOptionalParams, GetKnowledgeSourceOptionalParams, DeleteKnowledgeSourceOptionalParams, CreateOrUpdateKnowledgeSourceOptionalParams, CreateKnowledgeBaseOptionalParams, ListKnowledgeBasesOptionalParams, GetKnowledgeBaseOptionalParams, DeleteKnowledgeBaseOptionalParams, CreateOrUpdateKnowledgeBaseOptionalParams, CreateAliasOptionalParams, ListAliasesOptionalParams, GetAliasOptionalParams, DeleteAliasOptionalParams, CreateOrUpdateAliasOptionalParams, AnalyzeTextOptionalParams, GetIndexStatisticsOptionalParams, CreateIndexOptionalParams, ListIndexesWithSelectedPropertiesOptionalParams, ListIndexesOptionalParams, GetIndexOptionalParams, DeleteIndexOptionalParams, CreateOrUpdateIndexOptionalParams, CreateSynonymMapOptionalParams, GetSynonymMapsOptionalParams, GetSynonymMapOptionalParams, DeleteSynonymMapOptionalParams, CreateOrUpdateSynonymMapOptionalParams, } from "./options.js";
|
|
3
3
|
export type { SearchIndexContext, SearchIndexClientOptionalParams } from "./searchIndexContext.js";
|
|
4
4
|
export { createSearchIndex } from "./searchIndexContext.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/searchIndex/api/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,iCAAiC,EACjC,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,kCAAkC,EAClC,sCAAsC,EACtC,mCAAmC,EACnC,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,2CAA2C,EAC3C,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EACjC,yCAAyC,EACzC,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,iCAAiC,EACjC,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,+CAA+C,EAC/C,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,EAC9B,sCAAsC,GACvC,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/searchIndex/api/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,WAAW,EACX,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,iCAAiC,EACjC,WAAW,EACX,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,mCAAmC,EACnC,kCAAkC,EAClC,sCAAsC,EACtC,uCAAuC,EACvC,sCAAsC,EACtC,uCAAuC,EACvC,mCAAmC,EACnC,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,2CAA2C,EAC3C,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EACjC,yCAAyC,EACzC,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,iCAAiC,EACjC,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,+CAA+C,EAC/C,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,iCAAiC,EACjC,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,EAC9B,sCAAsC,GACvC,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -33,6 +33,7 @@ __export(api_exports, {
|
|
|
33
33
|
deleteIndex: () => import_operations.deleteIndex,
|
|
34
34
|
deleteKnowledgeBase: () => import_operations.deleteKnowledgeBase,
|
|
35
35
|
deleteKnowledgeSource: () => import_operations.deleteKnowledgeSource,
|
|
36
|
+
deleteKnowledgeSourceFile: () => import_operations.deleteKnowledgeSourceFile,
|
|
36
37
|
deleteSynonymMap: () => import_operations.deleteSynonymMap,
|
|
37
38
|
getAlias: () => import_operations.getAlias,
|
|
38
39
|
getIndex: () => import_operations.getIndex,
|
|
@@ -44,10 +45,13 @@ __export(api_exports, {
|
|
|
44
45
|
getSynonymMap: () => import_operations.getSynonymMap,
|
|
45
46
|
getSynonymMaps: () => import_operations.getSynonymMaps,
|
|
46
47
|
listAliases: () => import_operations.listAliases,
|
|
48
|
+
listIndexStatsSummary: () => import_operations.listIndexStatsSummary,
|
|
47
49
|
listIndexes: () => import_operations.listIndexes,
|
|
48
50
|
listIndexesWithSelectedProperties: () => import_operations.listIndexesWithSelectedProperties,
|
|
49
51
|
listKnowledgeBases: () => import_operations.listKnowledgeBases,
|
|
50
|
-
|
|
52
|
+
listKnowledgeSourceFiles: () => import_operations.listKnowledgeSourceFiles,
|
|
53
|
+
listKnowledgeSources: () => import_operations.listKnowledgeSources,
|
|
54
|
+
uploadKnowledgeSourceFile: () => import_operations.uploadKnowledgeSourceFile
|
|
51
55
|
});
|
|
52
56
|
module.exports = __toCommonJS(api_exports);
|
|
53
57
|
var import_operations = require("./operations.js");
|
|
@@ -70,6 +74,7 @@ var import_searchIndexContext = require("./searchIndexContext.js");
|
|
|
70
74
|
deleteIndex,
|
|
71
75
|
deleteKnowledgeBase,
|
|
72
76
|
deleteKnowledgeSource,
|
|
77
|
+
deleteKnowledgeSourceFile,
|
|
73
78
|
deleteSynonymMap,
|
|
74
79
|
getAlias,
|
|
75
80
|
getIndex,
|
|
@@ -81,9 +86,12 @@ var import_searchIndexContext = require("./searchIndexContext.js");
|
|
|
81
86
|
getSynonymMap,
|
|
82
87
|
getSynonymMaps,
|
|
83
88
|
listAliases,
|
|
89
|
+
listIndexStatsSummary,
|
|
84
90
|
listIndexes,
|
|
85
91
|
listIndexesWithSelectedProperties,
|
|
86
92
|
listKnowledgeBases,
|
|
87
|
-
|
|
93
|
+
listKnowledgeSourceFiles,
|
|
94
|
+
listKnowledgeSources,
|
|
95
|
+
uploadKnowledgeSourceFile
|
|
88
96
|
});
|
|
89
97
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/searchIndex/api/index.ts"],
|
|
4
|
-
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n getServiceStatistics,\n getKnowledgeSourceStatus,\n createKnowledgeSource,\n listKnowledgeSources,\n getKnowledgeSource,\n deleteKnowledgeSource,\n createOrUpdateKnowledgeSource,\n createKnowledgeBase,\n listKnowledgeBases,\n getKnowledgeBase,\n deleteKnowledgeBase,\n createOrUpdateKnowledgeBase,\n createAlias,\n listAliases,\n getAlias,\n deleteAlias,\n createOrUpdateAlias,\n analyzeText,\n getIndexStatistics,\n createIndex,\n listIndexesWithSelectedProperties,\n listIndexes,\n getIndex,\n deleteIndex,\n createOrUpdateIndex,\n createSynonymMap,\n getSynonymMaps,\n getSynonymMap,\n deleteSynonymMap,\n createOrUpdateSynonymMap,\n} from \"./operations.js\";\nexport type {\n GetServiceStatisticsOptionalParams,\n GetKnowledgeSourceStatusOptionalParams,\n CreateKnowledgeSourceOptionalParams,\n ListKnowledgeSourcesOptionalParams,\n GetKnowledgeSourceOptionalParams,\n DeleteKnowledgeSourceOptionalParams,\n CreateOrUpdateKnowledgeSourceOptionalParams,\n CreateKnowledgeBaseOptionalParams,\n ListKnowledgeBasesOptionalParams,\n GetKnowledgeBaseOptionalParams,\n DeleteKnowledgeBaseOptionalParams,\n CreateOrUpdateKnowledgeBaseOptionalParams,\n CreateAliasOptionalParams,\n ListAliasesOptionalParams,\n GetAliasOptionalParams,\n DeleteAliasOptionalParams,\n CreateOrUpdateAliasOptionalParams,\n AnalyzeTextOptionalParams,\n GetIndexStatisticsOptionalParams,\n CreateIndexOptionalParams,\n ListIndexesWithSelectedPropertiesOptionalParams,\n ListIndexesOptionalParams,\n GetIndexOptionalParams,\n DeleteIndexOptionalParams,\n CreateOrUpdateIndexOptionalParams,\n CreateSynonymMapOptionalParams,\n GetSynonymMapsOptionalParams,\n GetSynonymMapOptionalParams,\n DeleteSynonymMapOptionalParams,\n CreateOrUpdateSynonymMapOptionalParams,\n} from \"./options.js\";\nexport type { SearchIndexContext, SearchIndexClientOptionalParams } from \"./searchIndexContext.js\";\nexport { createSearchIndex } from \"./searchIndexContext.js\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n listIndexStatsSummary,\n getServiceStatistics,\n getKnowledgeSourceStatus,\n uploadKnowledgeSourceFile,\n listKnowledgeSourceFiles,\n deleteKnowledgeSourceFile,\n createKnowledgeSource,\n listKnowledgeSources,\n getKnowledgeSource,\n deleteKnowledgeSource,\n createOrUpdateKnowledgeSource,\n createKnowledgeBase,\n listKnowledgeBases,\n getKnowledgeBase,\n deleteKnowledgeBase,\n createOrUpdateKnowledgeBase,\n createAlias,\n listAliases,\n getAlias,\n deleteAlias,\n createOrUpdateAlias,\n analyzeText,\n getIndexStatistics,\n createIndex,\n listIndexesWithSelectedProperties,\n listIndexes,\n getIndex,\n deleteIndex,\n createOrUpdateIndex,\n createSynonymMap,\n getSynonymMaps,\n getSynonymMap,\n deleteSynonymMap,\n createOrUpdateSynonymMap,\n} from \"./operations.js\";\nexport type {\n ListIndexStatsSummaryOptionalParams,\n GetServiceStatisticsOptionalParams,\n GetKnowledgeSourceStatusOptionalParams,\n UploadKnowledgeSourceFileOptionalParams,\n ListKnowledgeSourceFilesOptionalParams,\n DeleteKnowledgeSourceFileOptionalParams,\n CreateKnowledgeSourceOptionalParams,\n ListKnowledgeSourcesOptionalParams,\n GetKnowledgeSourceOptionalParams,\n DeleteKnowledgeSourceOptionalParams,\n CreateOrUpdateKnowledgeSourceOptionalParams,\n CreateKnowledgeBaseOptionalParams,\n ListKnowledgeBasesOptionalParams,\n GetKnowledgeBaseOptionalParams,\n DeleteKnowledgeBaseOptionalParams,\n CreateOrUpdateKnowledgeBaseOptionalParams,\n CreateAliasOptionalParams,\n ListAliasesOptionalParams,\n GetAliasOptionalParams,\n DeleteAliasOptionalParams,\n CreateOrUpdateAliasOptionalParams,\n AnalyzeTextOptionalParams,\n GetIndexStatisticsOptionalParams,\n CreateIndexOptionalParams,\n ListIndexesWithSelectedPropertiesOptionalParams,\n ListIndexesOptionalParams,\n GetIndexOptionalParams,\n DeleteIndexOptionalParams,\n CreateOrUpdateIndexOptionalParams,\n CreateSynonymMapOptionalParams,\n GetSynonymMapsOptionalParams,\n GetSynonymMapOptionalParams,\n DeleteSynonymMapOptionalParams,\n CreateOrUpdateSynonymMapOptionalParams,\n} from \"./options.js\";\nexport type { SearchIndexContext, SearchIndexClientOptionalParams } from \"./searchIndexContext.js\";\nexport { createSearchIndex } from \"./searchIndexContext.js\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAmCO;AAsCP,gCAAkC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { SearchIndexContext as Client } from "./index.js";
|
|
2
|
-
import type { SynonymMap, ListSynonymMapsResult, SearchIndex, _ListIndexesResult, SearchIndexResponse, GetIndexStatisticsResult, AnalyzeTextOptions, AnalyzeResult, SearchAlias, _ListAliasesResult, KnowledgeBase, _ListKnowledgeBasesResult, KnowledgeSourceUnion, _ListKnowledgeSourcesResult, SearchServiceStatistics } from "../../models/azure/search/documents/indexes/models.js";
|
|
2
|
+
import type { SynonymMap, ListSynonymMapsResult, SearchIndex, _ListIndexesResult, SearchIndexResponse, GetIndexStatisticsResult, AnalyzeTextOptions, AnalyzeResult, SearchAlias, _ListAliasesResult, KnowledgeBase, _ListKnowledgeBasesResult, KnowledgeSourceUnion, KnowledgeSourceFile, _ListKnowledgeSourceFilesResult, _ListKnowledgeSourcesResult, SearchServiceStatistics, _ListIndexStatsSummary, IndexStatisticsSummary } from "../../models/azure/search/documents/indexes/models.js";
|
|
3
3
|
import type { KnowledgeSourceStatus } from "../../models/azure/search/documents/knowledgeBases/models.js";
|
|
4
4
|
import type { _ListIndexesSelectedResult } from "../../models/models.js";
|
|
5
5
|
import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
6
|
-
import type { GetServiceStatisticsOptionalParams, GetKnowledgeSourceStatusOptionalParams, CreateKnowledgeSourceOptionalParams, ListKnowledgeSourcesOptionalParams, GetKnowledgeSourceOptionalParams, DeleteKnowledgeSourceOptionalParams, CreateOrUpdateKnowledgeSourceOptionalParams, CreateKnowledgeBaseOptionalParams, ListKnowledgeBasesOptionalParams, GetKnowledgeBaseOptionalParams, DeleteKnowledgeBaseOptionalParams, CreateOrUpdateKnowledgeBaseOptionalParams, CreateAliasOptionalParams, ListAliasesOptionalParams, GetAliasOptionalParams, DeleteAliasOptionalParams, CreateOrUpdateAliasOptionalParams, AnalyzeTextOptionalParams, GetIndexStatisticsOptionalParams, CreateIndexOptionalParams, ListIndexesWithSelectedPropertiesOptionalParams, ListIndexesOptionalParams, GetIndexOptionalParams, DeleteIndexOptionalParams, CreateOrUpdateIndexOptionalParams, CreateSynonymMapOptionalParams, GetSynonymMapsOptionalParams, GetSynonymMapOptionalParams, DeleteSynonymMapOptionalParams, CreateOrUpdateSynonymMapOptionalParams } from "./options.js";
|
|
6
|
+
import type { ListIndexStatsSummaryOptionalParams, GetServiceStatisticsOptionalParams, GetKnowledgeSourceStatusOptionalParams, UploadKnowledgeSourceFileOptionalParams, ListKnowledgeSourceFilesOptionalParams, DeleteKnowledgeSourceFileOptionalParams, CreateKnowledgeSourceOptionalParams, ListKnowledgeSourcesOptionalParams, GetKnowledgeSourceOptionalParams, DeleteKnowledgeSourceOptionalParams, CreateOrUpdateKnowledgeSourceOptionalParams, CreateKnowledgeBaseOptionalParams, ListKnowledgeBasesOptionalParams, GetKnowledgeBaseOptionalParams, DeleteKnowledgeBaseOptionalParams, CreateOrUpdateKnowledgeBaseOptionalParams, CreateAliasOptionalParams, ListAliasesOptionalParams, GetAliasOptionalParams, DeleteAliasOptionalParams, CreateOrUpdateAliasOptionalParams, AnalyzeTextOptionalParams, GetIndexStatisticsOptionalParams, CreateIndexOptionalParams, ListIndexesWithSelectedPropertiesOptionalParams, ListIndexesOptionalParams, GetIndexOptionalParams, DeleteIndexOptionalParams, CreateOrUpdateIndexOptionalParams, CreateSynonymMapOptionalParams, GetSynonymMapsOptionalParams, GetSynonymMapOptionalParams, DeleteSynonymMapOptionalParams, CreateOrUpdateSynonymMapOptionalParams } from "./options.js";
|
|
7
7
|
import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
8
|
+
export declare function _listIndexStatsSummarySend(context: Client, options?: ListIndexStatsSummaryOptionalParams): StreamableMethod;
|
|
9
|
+
export declare function _listIndexStatsSummaryDeserialize(result: PathUncheckedResponse): Promise<_ListIndexStatsSummary>;
|
|
10
|
+
/** Retrieves a summary of statistics for all indexes in the search service. */
|
|
11
|
+
export declare function listIndexStatsSummary(context: Client, options?: ListIndexStatsSummaryOptionalParams): PagedAsyncIterableIterator<IndexStatisticsSummary>;
|
|
8
12
|
export declare function _getServiceStatisticsSend(context: Client, options?: GetServiceStatisticsOptionalParams): StreamableMethod;
|
|
9
13
|
export declare function _getServiceStatisticsDeserialize(result: PathUncheckedResponse): Promise<SearchServiceStatistics>;
|
|
10
14
|
/** Gets service level statistics for a search service. */
|
|
@@ -13,6 +17,18 @@ export declare function _getKnowledgeSourceStatusSend(context: Client, name: str
|
|
|
13
17
|
export declare function _getKnowledgeSourceStatusDeserialize(result: PathUncheckedResponse): Promise<KnowledgeSourceStatus>;
|
|
14
18
|
/** Retrieves the status of a knowledge source. */
|
|
15
19
|
export declare function getKnowledgeSourceStatus(context: Client, name: string, options?: GetKnowledgeSourceStatusOptionalParams): Promise<KnowledgeSourceStatus>;
|
|
20
|
+
export declare function _deleteKnowledgeSourceFileSend(context: Client, fileId: string, name: string, options?: DeleteKnowledgeSourceFileOptionalParams): StreamableMethod;
|
|
21
|
+
export declare function _deleteKnowledgeSourceFileDeserialize(result: PathUncheckedResponse): Promise<void>;
|
|
22
|
+
/** Deletes a file from a File knowledge source and removes all indexed content derived from it. */
|
|
23
|
+
export declare function deleteKnowledgeSourceFile(context: Client, fileId: string, name: string, options?: DeleteKnowledgeSourceFileOptionalParams): Promise<void>;
|
|
24
|
+
export declare function _listKnowledgeSourceFilesSend(context: Client, name: string, options?: ListKnowledgeSourceFilesOptionalParams): StreamableMethod;
|
|
25
|
+
export declare function _listKnowledgeSourceFilesDeserialize(result: PathUncheckedResponse): Promise<_ListKnowledgeSourceFilesResult>;
|
|
26
|
+
/** Lists all files in a File knowledge source. */
|
|
27
|
+
export declare function listKnowledgeSourceFiles(context: Client, name: string, options?: ListKnowledgeSourceFilesOptionalParams): PagedAsyncIterableIterator<KnowledgeSourceFile>;
|
|
28
|
+
export declare function _uploadKnowledgeSourceFileSend(context: Client, contentDisposition: string, file: Uint8Array, name: string, options?: UploadKnowledgeSourceFileOptionalParams): StreamableMethod;
|
|
29
|
+
export declare function _uploadKnowledgeSourceFileDeserialize(result: PathUncheckedResponse): Promise<KnowledgeSourceFile>;
|
|
30
|
+
/** Uploads a file to a File knowledge source for processing and indexing. */
|
|
31
|
+
export declare function uploadKnowledgeSourceFile(context: Client, contentDisposition: string, file: Uint8Array, name: string, options?: UploadKnowledgeSourceFileOptionalParams): Promise<KnowledgeSourceFile>;
|
|
16
32
|
export declare function _createKnowledgeSourceSend(context: Client, knowledgeSource: KnowledgeSourceUnion, options?: CreateKnowledgeSourceOptionalParams): StreamableMethod;
|
|
17
33
|
export declare function _createKnowledgeSourceDeserialize(result: PathUncheckedResponse): Promise<KnowledgeSourceUnion>;
|
|
18
34
|
/** Creates a new knowledge source. */
|