@azure/search-documents 11.3.1 → 11.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +19 -41
  2. package/dist/index.js +786 -1021
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/generated/data/index.js +1 -0
  7. package/dist-esm/src/generated/data/index.js.map +1 -1
  8. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  9. package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
  10. package/dist-esm/src/generated/data/models/parameters.js +11 -21
  11. package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
  12. package/dist-esm/src/generated/data/operations/documents.js +21 -73
  13. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  14. package/dist-esm/src/generated/data/operationsInterfaces/documents.js +9 -0
  15. package/dist-esm/src/generated/data/operationsInterfaces/documents.js.map +1 -0
  16. package/dist-esm/src/generated/data/operationsInterfaces/index.js +9 -0
  17. package/dist-esm/src/generated/data/operationsInterfaces/index.js.map +1 -0
  18. package/dist-esm/src/generated/data/searchClient.js +2 -2
  19. package/dist-esm/src/generated/data/searchClient.js.map +1 -1
  20. package/dist-esm/src/generated/data/searchClientContext.js +7 -11
  21. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  22. package/dist-esm/src/generated/service/index.js +1 -0
  23. package/dist-esm/src/generated/service/index.js.map +1 -1
  24. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  25. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  26. package/dist-esm/src/generated/service/models/parameters.js +0 -9
  27. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  28. package/dist-esm/src/generated/service/operations/dataSources.js +11 -37
  29. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  30. package/dist-esm/src/generated/service/operations/indexers.js +17 -55
  31. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  32. package/dist-esm/src/generated/service/operations/indexes.js +15 -54
  33. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  34. package/dist-esm/src/generated/service/operations/skillsets.js +11 -37
  35. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  36. package/dist-esm/src/generated/service/operations/synonymMaps.js +11 -37
  37. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  38. package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js +9 -0
  39. package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js.map +1 -0
  40. package/dist-esm/src/generated/service/operationsInterfaces/index.js +13 -0
  41. package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -0
  42. package/dist-esm/src/generated/service/operationsInterfaces/indexers.js +9 -0
  43. package/dist-esm/src/generated/service/operationsInterfaces/indexers.js.map +1 -0
  44. package/dist-esm/src/generated/service/operationsInterfaces/indexes.js +9 -0
  45. package/dist-esm/src/generated/service/operationsInterfaces/indexes.js.map +1 -0
  46. package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js +9 -0
  47. package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js.map +1 -0
  48. package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js +9 -0
  49. package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js.map +1 -0
  50. package/dist-esm/src/generated/service/searchServiceClient.js +10 -13
  51. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  52. package/dist-esm/src/generated/service/searchServiceClientContext.js +7 -11
  53. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  54. package/dist-esm/src/geographyPoint.js +1 -1
  55. package/dist-esm/src/geographyPoint.js.map +1 -1
  56. package/dist-esm/src/index.js +2 -2
  57. package/dist-esm/src/index.js.map +1 -1
  58. package/dist-esm/src/indexDocumentsBatch.js +1 -1
  59. package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
  60. package/dist-esm/src/indexModels.js.map +1 -1
  61. package/dist-esm/src/odataMetadataPolicy.js +7 -15
  62. package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
  63. package/dist-esm/src/searchApiKeyCredentialPolicy.js +8 -21
  64. package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
  65. package/dist-esm/src/searchAudience.js.map +1 -1
  66. package/dist-esm/src/searchClient.js +108 -126
  67. package/dist-esm/src/searchClient.js.map +1 -1
  68. package/dist-esm/src/searchIndexClient.js +112 -101
  69. package/dist-esm/src/searchIndexClient.js.map +1 -1
  70. package/dist-esm/src/searchIndexerClient.js +94 -106
  71. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  72. package/dist-esm/src/searchIndexingBufferedSender.js +16 -17
  73. package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
  74. package/dist-esm/src/serialization.js +6 -6
  75. package/dist-esm/src/serialization.js.map +1 -1
  76. package/dist-esm/src/serviceModels.js.map +1 -1
  77. package/dist-esm/src/serviceUtils.js +43 -61
  78. package/dist-esm/src/serviceUtils.js.map +1 -1
  79. package/dist-esm/src/synonymMapHelper.js +6 -2
  80. package/dist-esm/src/synonymMapHelper.js.map +1 -1
  81. package/dist-esm/src/tracing.js +6 -5
  82. package/dist-esm/src/tracing.js.map +1 -1
  83. package/package.json +53 -53
  84. package/types/search-documents.d.ts +137 -117
  85. package/CHANGELOG.md +0 -233
  86. package/dist-esm/src/generated/data/models/documentsMappers.js +0 -9
  87. package/dist-esm/src/generated/data/models/documentsMappers.js.map +0 -1
  88. package/dist-esm/src/generated/service/models/dataSourcesMappers.js +0 -9
  89. package/dist-esm/src/generated/service/models/dataSourcesMappers.js.map +0 -1
  90. package/dist-esm/src/generated/service/models/indexersMappers.js +0 -9
  91. package/dist-esm/src/generated/service/models/indexersMappers.js.map +0 -1
  92. package/dist-esm/src/generated/service/models/indexesMappers.js +0 -9
  93. package/dist-esm/src/generated/service/models/indexesMappers.js.map +0 -1
  94. package/dist-esm/src/generated/service/models/skillsetsMappers.js +0 -9
  95. package/dist-esm/src/generated/service/models/skillsetsMappers.js.map +0 -1
  96. package/dist-esm/src/generated/service/models/synonymMapsMappers.js +0 -9
  97. package/dist-esm/src/generated/service/models/synonymMapsMappers.js.map +0 -1
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=indexers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/indexers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n IndexersResetOptionalParams,\n IndexersRunOptionalParams,\n SearchIndexer,\n IndexersCreateOrUpdateOptionalParams,\n IndexersCreateOrUpdateResponse,\n IndexersDeleteOptionalParams,\n IndexersGetOptionalParams,\n IndexersGetResponse,\n IndexersListOptionalParams,\n IndexersListResponse,\n IndexersCreateOptionalParams,\n IndexersCreateResponse,\n IndexersGetStatusOptionalParams,\n IndexersGetStatusResponse\n} from \"../models\";\n\n/** Interface representing a Indexers. */\nexport interface Indexers {\n /**\n * Resets the change tracking state associated with an indexer.\n * @param indexerName The name of the indexer to reset.\n * @param options The options parameters.\n */\n reset(\n indexerName: string,\n options?: IndexersResetOptionalParams\n ): Promise<void>;\n /**\n * Runs an indexer on-demand.\n * @param indexerName The name of the indexer to run.\n * @param options The options parameters.\n */\n run(indexerName: string, options?: IndexersRunOptionalParams): Promise<void>;\n /**\n * Creates a new indexer or updates an indexer if it already exists.\n * @param indexerName The name of the indexer to create or update.\n * @param indexer The definition of the indexer to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexerName: string,\n indexer: SearchIndexer,\n options?: IndexersCreateOrUpdateOptionalParams\n ): Promise<IndexersCreateOrUpdateResponse>;\n /**\n * Deletes an indexer.\n * @param indexerName The name of the indexer to delete.\n * @param options The options parameters.\n */\n delete(\n indexerName: string,\n options?: IndexersDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves an indexer definition.\n * @param indexerName The name of the indexer to retrieve.\n * @param options The options parameters.\n */\n get(\n indexerName: string,\n options?: IndexersGetOptionalParams\n ): Promise<IndexersGetResponse>;\n /**\n * Lists all indexers available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexersListOptionalParams): Promise<IndexersListResponse>;\n /**\n * Creates a new indexer.\n * @param indexer The definition of the indexer to create.\n * @param options The options parameters.\n */\n create(\n indexer: SearchIndexer,\n options?: IndexersCreateOptionalParams\n ): Promise<IndexersCreateResponse>;\n /**\n * Returns the current status and execution history of an indexer.\n * @param indexerName The name of the indexer for which to retrieve status.\n * @param options The options parameters.\n */\n getStatus(\n indexerName: string,\n options?: IndexersGetStatusOptionalParams\n ): Promise<IndexersGetStatusResponse>;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=indexes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SearchIndex,\n IndexesCreateOptionalParams,\n IndexesCreateResponse,\n IndexesListOptionalParams,\n IndexesListResponse,\n IndexesCreateOrUpdateOptionalParams,\n IndexesCreateOrUpdateResponse,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesGetResponse,\n IndexesGetStatisticsOptionalParams,\n IndexesGetStatisticsResponse,\n AnalyzeRequest,\n IndexesAnalyzeOptionalParams,\n IndexesAnalyzeResponse\n} from \"../models\";\n\n/** Interface representing a Indexes. */\nexport interface Indexes {\n /**\n * Creates a new search index.\n * @param index The definition of the index to create.\n * @param options The options parameters.\n */\n create(\n index: SearchIndex,\n options?: IndexesCreateOptionalParams\n ): Promise<IndexesCreateResponse>;\n /**\n * Lists all indexes available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexesListOptionalParams): Promise<IndexesListResponse>;\n /**\n * Creates a new search index or updates an index if it already exists.\n * @param indexName The definition of the index to create or update.\n * @param index The definition of the index to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexName: string,\n index: SearchIndex,\n options?: IndexesCreateOrUpdateOptionalParams\n ): Promise<IndexesCreateOrUpdateResponse>;\n /**\n * Deletes a search index and all the documents it contains. This operation is permanent, with no\n * recovery option. Make sure you have a master copy of your index definition, data ingestion code, and\n * a backup of the primary data source in case you need to re-build the index.\n * @param indexName The name of the index to delete.\n * @param options The options parameters.\n */\n delete(\n indexName: string,\n options?: IndexesDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves an index definition.\n * @param indexName The name of the index to retrieve.\n * @param options The options parameters.\n */\n get(\n indexName: string,\n options?: IndexesGetOptionalParams\n ): Promise<IndexesGetResponse>;\n /**\n * Returns statistics for the given index, including a document count and storage usage.\n * @param indexName The name of the index for which to retrieve statistics.\n * @param options The options parameters.\n */\n getStatistics(\n indexName: string,\n options?: IndexesGetStatisticsOptionalParams\n ): Promise<IndexesGetStatisticsResponse>;\n /**\n * Shows how an analyzer breaks text into tokens.\n * @param indexName The name of the index for which to test an analyzer.\n * @param request The text and analyzer or analysis components to test.\n * @param options The options parameters.\n */\n analyze(\n indexName: string,\n request: AnalyzeRequest,\n options?: IndexesAnalyzeOptionalParams\n ): Promise<IndexesAnalyzeResponse>;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=skillsets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse\n} from \"../models\";\n\n/** Interface representing a Skillsets. */\nexport interface Skillsets {\n /**\n * Creates a new skillset in a search service or updates the skillset if it already exists.\n * @param skillsetName The name of the skillset to create or update.\n * @param skillset The skillset containing one or more skills to create or update in a search service.\n * @param options The options parameters.\n */\n createOrUpdate(\n skillsetName: string,\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOrUpdateOptionalParams\n ): Promise<SkillsetsCreateOrUpdateResponse>;\n /**\n * Deletes a skillset in a search service.\n * @param skillsetName The name of the skillset to delete.\n * @param options The options parameters.\n */\n delete(\n skillsetName: string,\n options?: SkillsetsDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves a skillset in a search service.\n * @param skillsetName The name of the skillset to retrieve.\n * @param options The options parameters.\n */\n get(\n skillsetName: string,\n options?: SkillsetsGetOptionalParams\n ): Promise<SkillsetsGetResponse>;\n /**\n * List all skillsets in a search service.\n * @param options The options parameters.\n */\n list(options?: SkillsetsListOptionalParams): Promise<SkillsetsListResponse>;\n /**\n * Creates a new skillset in a search service.\n * @param skillset The skillset containing one or more skills to create in a search service.\n * @param options The options parameters.\n */\n create(\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOptionalParams\n ): Promise<SkillsetsCreateResponse>;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=synonymMaps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SynonymMap,\n SynonymMapsCreateOrUpdateOptionalParams,\n SynonymMapsCreateOrUpdateResponse,\n SynonymMapsDeleteOptionalParams,\n SynonymMapsGetOptionalParams,\n SynonymMapsGetResponse,\n SynonymMapsListOptionalParams,\n SynonymMapsListResponse,\n SynonymMapsCreateOptionalParams,\n SynonymMapsCreateResponse\n} from \"../models\";\n\n/** Interface representing a SynonymMaps. */\nexport interface SynonymMaps {\n /**\n * Creates a new synonym map or updates a synonym map if it already exists.\n * @param synonymMapName The name of the synonym map to create or update.\n * @param synonymMap The definition of the synonym map to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n synonymMapName: string,\n synonymMap: SynonymMap,\n options?: SynonymMapsCreateOrUpdateOptionalParams\n ): Promise<SynonymMapsCreateOrUpdateResponse>;\n /**\n * Deletes a synonym map.\n * @param synonymMapName The name of the synonym map to delete.\n * @param options The options parameters.\n */\n delete(\n synonymMapName: string,\n options?: SynonymMapsDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves a synonym map definition.\n * @param synonymMapName The name of the synonym map to retrieve.\n * @param options The options parameters.\n */\n get(\n synonymMapName: string,\n options?: SynonymMapsGetOptionalParams\n ): Promise<SynonymMapsGetResponse>;\n /**\n * Lists all synonym maps available for a search service.\n * @param options The options parameters.\n */\n list(\n options?: SynonymMapsListOptionalParams\n ): Promise<SynonymMapsListResponse>;\n /**\n * Creates a new synonym map.\n * @param synonymMap The definition of the synonym map to create.\n * @param options The options parameters.\n */\n create(\n synonymMap: SynonymMap,\n options?: SynonymMapsCreateOptionalParams\n ): Promise<SynonymMapsCreateResponse>;\n}\n"]}
@@ -5,8 +5,8 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreHttp from "@azure/core-http";
9
- import { DataSources, Indexers, Skillsets, SynonymMaps, Indexes } from "./operations";
8
+ import * as coreClient from "@azure/core-client";
9
+ import { DataSourcesImpl, IndexersImpl, SkillsetsImpl, SynonymMapsImpl, IndexesImpl } from "./operations";
10
10
  import * as Parameters from "./models/parameters";
11
11
  import * as Mappers from "./models/mappers";
12
12
  import { SearchServiceClientContext } from "./searchServiceClientContext";
@@ -20,25 +20,22 @@ export class SearchServiceClient extends SearchServiceClientContext {
20
20
  */
21
21
  constructor(endpoint, apiVersion, options) {
22
22
  super(endpoint, apiVersion, options);
23
- this.dataSources = new DataSources(this);
24
- this.indexers = new Indexers(this);
25
- this.skillsets = new Skillsets(this);
26
- this.synonymMaps = new SynonymMaps(this);
27
- this.indexes = new Indexes(this);
23
+ this.dataSources = new DataSourcesImpl(this);
24
+ this.indexers = new IndexersImpl(this);
25
+ this.skillsets = new SkillsetsImpl(this);
26
+ this.synonymMaps = new SynonymMapsImpl(this);
27
+ this.indexes = new IndexesImpl(this);
28
28
  }
29
29
  /**
30
30
  * Gets service level statistics for a search service.
31
31
  * @param options The options parameters.
32
32
  */
33
33
  getServiceStatistics(options) {
34
- const operationArguments = {
35
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
36
- };
37
- return this.sendOperationRequest(operationArguments, getServiceStatisticsOperationSpec);
34
+ return this.sendOperationRequest({ options }, getServiceStatisticsOperationSpec);
38
35
  }
39
36
  }
40
37
  // Operation Specifications
41
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
38
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
42
39
  const getServiceStatisticsOperationSpec = {
43
40
  path: "/servicestats",
44
41
  httpMethod: "GET",
@@ -52,7 +49,7 @@ const getServiceStatisticsOperationSpec = {
52
49
  },
53
50
  queryParameters: [Parameters.apiVersion],
54
51
  urlParameters: [Parameters.endpoint],
55
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
52
+ headerParameters: [Parameters.accept],
56
53
  serializer
57
54
  };
58
55
  //# sourceMappingURL=searchServiceClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,OAAO,EACR,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAQ1E,gBAAgB;AAChB,MAAM,OAAO,mBAAoB,SAAQ,0BAA0B;IACjE;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAA8B,EAC9B,OAA2C;QAE3C,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAClB,OAA+D;QAE/D,MAAM,kBAAkB,GAAgC;YACtD,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,oBAAoB,CAC9B,kBAAkB,EAClB,iCAAiC,CAC0B,CAAC;IAChE,CAAC;CAOF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAEvE,MAAM,iCAAiC,GAA2B;IAChE,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport {\n DataSources,\n Indexers,\n Skillsets,\n SynonymMaps,\n Indexes\n} from \"./operations\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport { SearchServiceClientContext } from \"./searchServiceClientContext\";\nimport {\n SearchServiceClientOptionalParams,\n ApiVersion20200630,\n SearchServiceClientGetServiceStatisticsOptionalParams,\n SearchServiceClientGetServiceStatisticsResponse\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClient extends SearchServiceClientContext {\n /**\n * Initializes a new instance of the SearchServiceClient class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20200630,\n options?: SearchServiceClientOptionalParams\n ) {\n super(endpoint, apiVersion, options);\n this.dataSources = new DataSources(this);\n this.indexers = new Indexers(this);\n this.skillsets = new Skillsets(this);\n this.synonymMaps = new SynonymMaps(this);\n this.indexes = new Indexes(this);\n }\n\n /**\n * Gets service level statistics for a search service.\n * @param options The options parameters.\n */\n getServiceStatistics(\n options?: SearchServiceClientGetServiceStatisticsOptionalParams\n ): Promise<SearchServiceClientGetServiceStatisticsResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.sendOperationRequest(\n operationArguments,\n getServiceStatisticsOperationSpec\n ) as Promise<SearchServiceClientGetServiceStatisticsResponse>;\n }\n\n dataSources: DataSources;\n indexers: Indexers;\n skillsets: Skillsets;\n synonymMaps: SynonymMaps;\n indexes: Indexes;\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst getServiceStatisticsOperationSpec: coreHttp.OperationSpec = {\n path: \"/servicestats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServiceStatistics\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\n"]}
1
+ {"version":3,"file":"searchServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,EACZ,MAAM,cAAc,CAAC;AAQtB,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAQ1E,gBAAgB;AAChB,MAAM,OAAO,mBAAoB,SAAQ,0BAA0B;IACjE;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAA8B,EAC9B,OAA2C;QAE3C,KAAK,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAClB,OAA+D;QAE/D,OAAO,IAAI,CAAC,oBAAoB,CAC9B,EAAE,OAAO,EAAE,EACX,iCAAiC,CAClC,CAAC;IACJ,CAAC;CAOF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iCAAiC,GAA6B;IAClE,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n DataSourcesImpl,\n IndexersImpl,\n SkillsetsImpl,\n SynonymMapsImpl,\n IndexesImpl\n} from \"./operations\";\nimport {\n DataSources,\n Indexers,\n Skillsets,\n SynonymMaps,\n Indexes\n} from \"./operationsInterfaces\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport { SearchServiceClientContext } from \"./searchServiceClientContext\";\nimport {\n SearchServiceClientOptionalParams,\n ApiVersion20200630,\n SearchServiceClientGetServiceStatisticsOptionalParams,\n SearchServiceClientGetServiceStatisticsResponse\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClient extends SearchServiceClientContext {\n /**\n * Initializes a new instance of the SearchServiceClient class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20200630,\n options?: SearchServiceClientOptionalParams\n ) {\n super(endpoint, apiVersion, options);\n this.dataSources = new DataSourcesImpl(this);\n this.indexers = new IndexersImpl(this);\n this.skillsets = new SkillsetsImpl(this);\n this.synonymMaps = new SynonymMapsImpl(this);\n this.indexes = new IndexesImpl(this);\n }\n\n /**\n * Gets service level statistics for a search service.\n * @param options The options parameters.\n */\n getServiceStatistics(\n options?: SearchServiceClientGetServiceStatisticsOptionalParams\n ): Promise<SearchServiceClientGetServiceStatisticsResponse> {\n return this.sendOperationRequest(\n { options },\n getServiceStatisticsOperationSpec\n );\n }\n\n dataSources: DataSources;\n indexers: Indexers;\n skillsets: Skillsets;\n synonymMaps: SynonymMaps;\n indexes: Indexes;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getServiceStatisticsOperationSpec: coreClient.OperationSpec = {\n path: \"/servicestats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServiceStatistics\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,11 +5,9 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreHttp from "@azure/core-http";
9
- const packageName = "@azure/search-documents";
10
- const packageVersion = "11.3.1";
8
+ import * as coreClient from "@azure/core-client";
11
9
  /** @internal */
12
- export class SearchServiceClientContext extends coreHttp.ServiceClient {
10
+ export class SearchServiceClientContext extends coreClient.ServiceClient {
13
11
  /**
14
12
  * Initializes a new instance of the SearchServiceClientContext class.
15
13
  * @param endpoint The endpoint URL of the search service.
@@ -27,13 +25,11 @@ export class SearchServiceClientContext extends coreHttp.ServiceClient {
27
25
  if (!options) {
28
26
  options = {};
29
27
  }
30
- if (!options.userAgent) {
31
- const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
32
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
33
- }
34
- super(undefined, options);
35
- this.requestContentType = "application/json; charset=utf-8";
36
- this.baseUri = options.endpoint || "{endpoint}";
28
+ const defaults = {
29
+ requestContentType: "application/json; charset=utf-8"
30
+ };
31
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { baseUri: options.endpoint || "{endpoint}" });
32
+ super(optionsWithDefaults);
37
33
  // Parameter assignments
38
34
  this.endpoint = endpoint;
39
35
  this.apiVersion = apiVersion;
@@ -1 +1 @@
1
- {"version":3,"file":"searchServiceClientContext.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAM7C,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAC9C,MAAM,cAAc,GAAG,QAAQ,CAAC;AAEhC,gBAAgB;AAChB,MAAM,OAAO,0BAA2B,SAAQ,QAAQ,CAAC,aAAa;IAIpE;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAA8B,EAC9B,OAA2C;QAE3C,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QAED,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YACtB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,wBAAwB,EAAE,CAAC;YAC7D,OAAO,CAAC,SAAS,GAAG,GAAG,WAAW,IAAI,cAAc,IAAI,gBAAgB,EAAE,CAAC;SAC5E;QAED,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAE1B,IAAI,CAAC,kBAAkB,GAAG,iCAAiC,CAAC;QAE5D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,IAAI,YAAY,CAAC;QAEhD,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport {\n ApiVersion20200630,\n SearchServiceClientOptionalParams\n} from \"./models\";\n\nconst packageName = \"@azure/search-documents\";\nconst packageVersion = \"11.3.1\";\n\n/** @internal */\nexport class SearchServiceClientContext extends coreHttp.ServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20200630;\n\n /**\n * Initializes a new instance of the SearchServiceClientContext class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20200630,\n options?: SearchServiceClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n\n if (!options.userAgent) {\n const defaultUserAgent = coreHttp.getDefaultUserAgentValue();\n options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;\n }\n\n super(undefined, options);\n\n this.requestContentType = \"application/json; charset=utf-8\";\n\n this.baseUri = options.endpoint || \"{endpoint}\";\n\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\n }\n}\n"]}
1
+ {"version":3,"file":"searchServiceClientContext.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,gBAAgB;AAChB,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAItE;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAA8B,EAC9B,OAA2C;QAE3C,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAsC;YAClD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n ApiVersion20200630,\n SearchServiceClientOptionalParams\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20200630;\n\n /**\n * Initializes a new instance of the SearchServiceClientContext class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20200630,\n options?: SearchServiceClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n baseUri: options.endpoint || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\n }\n}\n"]}
@@ -21,7 +21,7 @@ export default class GeographyPoint {
21
21
  return {
22
22
  type: "Point",
23
23
  coordinates: [this.longitude, this.latitude],
24
- crs: { type: "name", properties: { name: WorldGeodeticSystem1984 } }
24
+ crs: { type: "name", properties: { name: WorldGeodeticSystem1984 } },
25
25
  };
26
26
  }
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"geographyPoint.js","sourceRoot":"","sources":["../../src/geographyPoint.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,uBAAuB,GAAG,WAAW,CAAC,CAAC,2BAA2B;AAExE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAUjC;;;;OAIG;IACH,YAAY,cAAuD;QACjE,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,MAAM;QACX,OAAO;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC5C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE;SACrE,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\n\n/**\n * Represents a geographic point in global coordinates.\n */\nexport default class GeographyPoint {\n /**\n * The latitude in decimal.\n */\n public latitude: number;\n /**\n * The longitude in decimal.\n */\n public longitude: number;\n\n /**\n * Constructs a new instance of GeographyPoint given\n * the specified coordinates.\n * @param geographyPoint - object with longitude and latitude values in decimal\n */\n constructor(geographyPoint: { longitude: number; latitude: number }) {\n this.longitude = geographyPoint.longitude;\n this.latitude = geographyPoint.latitude;\n }\n\n /**\n * Used to serialize to a GeoJSON Point.\n */\n public toJSON(): Record<string, unknown> {\n return {\n type: \"Point\",\n coordinates: [this.longitude, this.latitude],\n crs: { type: \"name\", properties: { name: WorldGeodeticSystem1984 } }\n };\n }\n}\n"]}
1
+ {"version":3,"file":"geographyPoint.js","sourceRoot":"","sources":["../../src/geographyPoint.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,uBAAuB,GAAG,WAAW,CAAC,CAAC,2BAA2B;AAExE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAUjC;;;;OAIG;IACH,YAAY,cAAuD;QACjE,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,MAAM;QACX,OAAO;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC5C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE;SACrE,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\n\n/**\n * Represents a geographic point in global coordinates.\n */\nexport default class GeographyPoint {\n /**\n * The latitude in decimal.\n */\n public latitude: number;\n /**\n * The longitude in decimal.\n */\n public longitude: number;\n\n /**\n * Constructs a new instance of GeographyPoint given\n * the specified coordinates.\n * @param geographyPoint - object with longitude and latitude values in decimal\n */\n constructor(geographyPoint: { longitude: number; latitude: number }) {\n this.longitude = geographyPoint.longitude;\n this.latitude = geographyPoint.latitude;\n }\n\n /**\n * Used to serialize to a GeoJSON Point.\n */\n public toJSON(): Record<string, unknown> {\n return {\n type: \"Point\",\n coordinates: [this.longitude, this.latitude],\n crs: { type: \"name\", properties: { name: WorldGeodeticSystem1984 } },\n };\n }\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  export { SearchClient } from "./searchClient";
4
- export { DEFAULT_BATCH_SIZE, DEFAULT_FLUSH_WINDOW, DEFAULT_RETRY_COUNT } from "./searchIndexingBufferedSender";
4
+ export { DEFAULT_BATCH_SIZE, DEFAULT_FLUSH_WINDOW, DEFAULT_RETRY_COUNT, } from "./searchIndexingBufferedSender";
5
5
  export { SearchIndexingBufferedSender } from "./searchIndexingBufferedSender";
6
6
  export { SearchIndexClient } from "./searchIndexClient";
7
7
  export { SearchIndexerClient } from "./searchIndexerClient";
8
- export { KnownAnalyzerNames, KnownCharFilterNames, KnownTokenFilterNames, KnownTokenizerNames } from "./serviceModels";
8
+ export { KnownAnalyzerNames, KnownCharFilterNames, KnownTokenFilterNames, KnownTokenizerNames, } from "./serviceModels";
9
9
  export { default as GeographyPoint } from "./geographyPoint";
10
10
  export { odata } from "./odata";
11
11
  export { IndexDocumentsBatch } from "./indexDocumentsBatch";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,gCAAgC,CAAC;AAgCxC,OAAO,EAAE,4BAA4B,EAAwB,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAA4B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAwBL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EA2CpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA6K5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { SearchClient, SearchClientOptions } from \"./searchClient\";\nexport {\n DEFAULT_BATCH_SIZE,\n DEFAULT_FLUSH_WINDOW,\n DEFAULT_RETRY_COUNT\n} from \"./searchIndexingBufferedSender\";\nexport {\n AutocompleteRequest,\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsAction,\n ListSearchResultsPageSettings,\n IndexDocumentsOptions,\n SearchDocumentsResultBase,\n SearchDocumentsResult,\n SearchDocumentsPageResult,\n SearchIterator,\n SearchOptions,\n SearchRequestOptions,\n SearchRequest,\n SearchResult,\n SuggestDocumentsResult,\n SuggestRequest,\n SuggestResult,\n SuggestOptions,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n UploadDocumentsOptions,\n SearchIndexingBufferedSenderOptions,\n SearchIndexingBufferedSenderDeleteDocumentsOptions,\n SearchIndexingBufferedSenderFlushDocumentsOptions,\n SearchIndexingBufferedSenderMergeDocumentsOptions,\n SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions,\n SearchIndexingBufferedSenderUploadDocumentsOptions\n} from \"./indexModels\";\nexport { SearchIndexingBufferedSender, IndexDocumentsClient } from \"./searchIndexingBufferedSender\";\nexport { SearchIndexClient, SearchIndexClientOptions } from \"./searchIndexClient\";\nexport { SearchIndexerClient, SearchIndexerClientOptions } from \"./searchIndexerClient\";\nexport {\n SearchIndex,\n LexicalAnalyzer,\n TokenFilter,\n LexicalTokenizer,\n CharFilter,\n ListIndexesOptions,\n CreateIndexOptions,\n CreateOrUpdateIndexOptions,\n CreateOrUpdateSkillsetOptions,\n CreateOrUpdateSynonymMapOptions,\n CreateSkillsetOptions,\n CreateSynonymMapOptions,\n DeleteSkillsetOptions,\n DeleteSynonymMapOptions,\n GetSkillSetOptions,\n GetSynonymMapsOptions,\n ListSkillsetsOptions,\n SearchIndexerSkillset,\n ListSynonymMapsOptions,\n DeleteIndexOptions,\n AnalyzeTextOptions,\n GetIndexOptions,\n GetIndexStatisticsOptions,\n KnownAnalyzerNames,\n KnownCharFilterNames,\n KnownTokenFilterNames,\n KnownTokenizerNames,\n ScoringFunction,\n ScoringProfile,\n CustomAnalyzer,\n PatternAnalyzer,\n PatternTokenizer,\n SearchField,\n SimpleField,\n ComplexField,\n SearchFieldDataType,\n ComplexDataType,\n CognitiveServicesAccount,\n SearchIndexerSkill,\n SynonymMap,\n ListIndexersOptions,\n CreateIndexerOptions,\n GetIndexerOptions,\n CreateorUpdateIndexerOptions,\n DeleteIndexerOptions,\n GetIndexerStatusOptions,\n ResetIndexerOptions,\n RunIndexerOptions,\n CreateDataSourceConnectionOptions,\n CreateorUpdateDataSourceConnectionOptions,\n DeleteDataSourceConnectionOptions,\n GetDataSourceConnectionOptions,\n ListDataSourceConnectionsOptions,\n SearchIndexerDataSourceConnection,\n DataChangeDetectionPolicy,\n DataDeletionDetectionPolicy,\n GetServiceStatisticsOptions,\n IndexIterator,\n IndexNameIterator,\n SimilarityAlgorithm,\n NGramTokenFilter,\n LuceneStandardTokenizer,\n EdgeNGramTokenFilter,\n KeywordTokenizer,\n AnalyzeRequest,\n SearchResourceEncryptionKey,\n SearchIndexStatistics,\n SearchServiceStatistics,\n SearchIndexer\n} from \"./serviceModels\";\nexport { default as GeographyPoint } from \"./geographyPoint\";\nexport { odata } from \"./odata\";\nexport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nexport {\n AutocompleteResult,\n AutocompleteMode,\n AutocompleteItem,\n FacetResult,\n IndexActionType,\n IndexDocumentsResult,\n IndexingResult,\n QueryType,\n SearchMode,\n ScoringStatistics\n} from \"./generated/data/models\";\nexport {\n RegexFlags,\n KnownRegexFlags,\n LuceneStandardAnalyzer,\n StopAnalyzer,\n MappingCharFilter,\n PatternReplaceCharFilter,\n CorsOptions,\n AzureActiveDirectoryApplicationCredentials,\n ScoringFunctionAggregation,\n ScoringFunctionInterpolation,\n DistanceScoringParameters,\n DistanceScoringFunction,\n FreshnessScoringParameters,\n FreshnessScoringFunction,\n MagnitudeScoringParameters,\n MagnitudeScoringFunction,\n TagScoringParameters,\n TagScoringFunction,\n TextWeights,\n AsciiFoldingTokenFilter,\n CjkBigramTokenFilterScripts,\n CjkBigramTokenFilter,\n CommonGramTokenFilter,\n DictionaryDecompounderTokenFilter,\n EdgeNGramTokenFilterSide,\n ElisionTokenFilter,\n KeepTokenFilter,\n KeywordMarkerTokenFilter,\n LengthTokenFilter,\n LimitTokenFilter,\n PatternCaptureTokenFilter,\n PatternReplaceTokenFilter,\n PhoneticEncoder,\n PhoneticTokenFilter,\n ShingleTokenFilter,\n SnowballTokenFilterLanguage,\n SnowballTokenFilter,\n StemmerTokenFilterLanguage,\n StemmerTokenFilter,\n StemmerOverrideTokenFilter,\n StopwordsList,\n StopwordsTokenFilter,\n SynonymTokenFilter,\n TruncateTokenFilter,\n UniqueTokenFilter,\n WordDelimiterTokenFilter,\n ClassicTokenizer,\n TokenCharacterKind,\n EdgeNGramTokenizer,\n MicrosoftTokenizerLanguage,\n MicrosoftLanguageTokenizer,\n MicrosoftStemmingTokenizerLanguage,\n MicrosoftLanguageStemmingTokenizer,\n NGramTokenizer,\n PathHierarchyTokenizerV2 as PathHierarchyTokenizer,\n UaxUrlEmailTokenizer,\n Suggester as SearchSuggester,\n AnalyzeResult,\n AnalyzedTokenInfo,\n ConditionalSkill,\n KeyPhraseExtractionSkill,\n OcrSkill,\n ImageAnalysisSkill,\n LanguageDetectionSkill,\n ShaperSkill,\n MergeSkill,\n EntityRecognitionSkill,\n SentimentSkill,\n CustomEntityLookupSkill,\n CustomEntityLookupSkillLanguage,\n KnownCustomEntityLookupSkillLanguage,\n DocumentExtractionSkill,\n CustomEntity,\n CustomEntityAlias,\n SplitSkill,\n TextTranslationSkill,\n WebApiSkill,\n SentimentSkillLanguage,\n KnownSentimentSkillLanguage,\n SplitSkillLanguage,\n KnownSplitSkillLanguage,\n TextSplitMode,\n KnownTextSplitMode,\n TextTranslationSkillLanguage,\n KnownTextTranslationSkillLanguage,\n DefaultCognitiveServicesAccount,\n CognitiveServicesAccountKey,\n InputFieldMappingEntry,\n OutputFieldMappingEntry,\n EntityCategory,\n KnownEntityCategory,\n EntityRecognitionSkillLanguage,\n KnownEntityRecognitionSkillLanguage,\n ImageAnalysisSkillLanguage,\n KnownImageAnalysisSkillLanguage,\n ImageDetail,\n KnownImageDetail,\n VisualFeature,\n KnownVisualFeature,\n KeyPhraseExtractionSkillLanguage,\n KnownKeyPhraseExtractionSkillLanguage,\n OcrSkillLanguage,\n KnownOcrSkillLanguage,\n FieldMapping,\n IndexingParameters,\n IndexingSchedule,\n FieldMappingFunction,\n SearchIndexerStatus,\n IndexerExecutionResult,\n SearchIndexerLimits,\n IndexerStatus,\n SearchIndexerError,\n IndexerExecutionStatus,\n SearchIndexerWarning,\n SearchIndexerDataContainer,\n SearchIndexerDataSourceType,\n KnownSearchIndexerDataSourceType,\n SoftDeleteColumnDeletionDetectionPolicy,\n SqlIntegratedChangeTrackingPolicy,\n HighWaterMarkChangeDetectionPolicy,\n ServiceCounters,\n ServiceLimits,\n ResourceCounter,\n LexicalAnalyzerName,\n KnownLexicalAnalyzerName,\n ClassicSimilarity,\n BM25Similarity,\n IndexingParametersConfiguration,\n BlobIndexerDataToExtract,\n KnownBlobIndexerDataToExtract,\n IndexerExecutionEnvironment,\n BlobIndexerImageAction,\n KnownBlobIndexerImageAction,\n BlobIndexerParsingMode,\n KnownBlobIndexerParsingMode,\n BlobIndexerPDFTextRotationAlgorithm,\n KnownBlobIndexerPDFTextRotationAlgorithm,\n TokenFilter as BaseTokenFilter,\n Similarity,\n LexicalTokenizer as BaseLexicalTokenizer,\n CognitiveServicesAccount as BaseCognitiveServicesAccount,\n SearchIndexerSkill as BaseSearchIndexerSkill,\n ScoringFunction as BaseScoringFunction,\n DataChangeDetectionPolicy as BaseDataChangeDetectionPolicy,\n LexicalAnalyzer as BaseLexicalAnalyzer,\n CharFilter as BaseCharFilter,\n DataDeletionDetectionPolicy as BaseDataDeletionDetectionPolicy,\n TokenFilterName,\n KnownTokenFilterName,\n CharFilterName,\n KnownCharFilterName,\n SearchIndexerKnowledgeStore,\n SearchIndexerKnowledgeStoreProjection,\n SearchIndexerKnowledgeStoreFileProjectionSelector,\n SearchIndexerKnowledgeStoreBlobProjectionSelector,\n SearchIndexerKnowledgeStoreProjectionSelector,\n SearchIndexerKnowledgeStoreObjectProjectionSelector,\n SearchIndexerKnowledgeStoreTableProjectionSelector\n} from \"./generated/service/models\";\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { createSynonymMapFromFile } from \"./synonymMapHelper\";\nexport { KnownSearchAudience } from \"./searchAudience\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAuB,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,gCAAgC,CAAC;AAgCxC,OAAO,EAAE,4BAA4B,EAAwB,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAA4B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAA8B,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAwBL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,GA2CpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA6K5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { SearchClient, SearchClientOptions } from \"./searchClient\";\nexport {\n DEFAULT_BATCH_SIZE,\n DEFAULT_FLUSH_WINDOW,\n DEFAULT_RETRY_COUNT,\n} from \"./searchIndexingBufferedSender\";\nexport {\n AutocompleteRequest,\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsAction,\n ListSearchResultsPageSettings,\n IndexDocumentsOptions,\n SearchDocumentsResultBase,\n SearchDocumentsResult,\n SearchDocumentsPageResult,\n SearchIterator,\n SearchOptions,\n SearchRequestOptions,\n SearchRequest,\n SearchResult,\n SuggestDocumentsResult,\n SuggestRequest,\n SuggestResult,\n SuggestOptions,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n UploadDocumentsOptions,\n SearchIndexingBufferedSenderOptions,\n SearchIndexingBufferedSenderDeleteDocumentsOptions,\n SearchIndexingBufferedSenderFlushDocumentsOptions,\n SearchIndexingBufferedSenderMergeDocumentsOptions,\n SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions,\n SearchIndexingBufferedSenderUploadDocumentsOptions,\n} from \"./indexModels\";\nexport { SearchIndexingBufferedSender, IndexDocumentsClient } from \"./searchIndexingBufferedSender\";\nexport { SearchIndexClient, SearchIndexClientOptions } from \"./searchIndexClient\";\nexport { SearchIndexerClient, SearchIndexerClientOptions } from \"./searchIndexerClient\";\nexport {\n SearchIndex,\n LexicalAnalyzer,\n TokenFilter,\n LexicalTokenizer,\n CharFilter,\n ListIndexesOptions,\n CreateIndexOptions,\n CreateOrUpdateIndexOptions,\n CreateOrUpdateSkillsetOptions,\n CreateOrUpdateSynonymMapOptions,\n CreateSkillsetOptions,\n CreateSynonymMapOptions,\n DeleteSkillsetOptions,\n DeleteSynonymMapOptions,\n GetSkillSetOptions,\n GetSynonymMapsOptions,\n ListSkillsetsOptions,\n SearchIndexerSkillset,\n ListSynonymMapsOptions,\n DeleteIndexOptions,\n AnalyzeTextOptions,\n GetIndexOptions,\n GetIndexStatisticsOptions,\n KnownAnalyzerNames,\n KnownCharFilterNames,\n KnownTokenFilterNames,\n KnownTokenizerNames,\n ScoringFunction,\n ScoringProfile,\n CustomAnalyzer,\n PatternAnalyzer,\n PatternTokenizer,\n SearchField,\n SimpleField,\n ComplexField,\n SearchFieldDataType,\n ComplexDataType,\n CognitiveServicesAccount,\n SearchIndexerSkill,\n SynonymMap,\n ListIndexersOptions,\n CreateIndexerOptions,\n GetIndexerOptions,\n CreateorUpdateIndexerOptions,\n DeleteIndexerOptions,\n GetIndexerStatusOptions,\n ResetIndexerOptions,\n RunIndexerOptions,\n CreateDataSourceConnectionOptions,\n CreateorUpdateDataSourceConnectionOptions,\n DeleteDataSourceConnectionOptions,\n GetDataSourceConnectionOptions,\n ListDataSourceConnectionsOptions,\n SearchIndexerDataSourceConnection,\n DataChangeDetectionPolicy,\n DataDeletionDetectionPolicy,\n GetServiceStatisticsOptions,\n IndexIterator,\n IndexNameIterator,\n SimilarityAlgorithm,\n NGramTokenFilter,\n LuceneStandardTokenizer,\n EdgeNGramTokenFilter,\n KeywordTokenizer,\n AnalyzeRequest,\n SearchResourceEncryptionKey,\n SearchIndexStatistics,\n SearchServiceStatistics,\n SearchIndexer,\n} from \"./serviceModels\";\nexport { default as GeographyPoint } from \"./geographyPoint\";\nexport { odata } from \"./odata\";\nexport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nexport {\n AutocompleteResult,\n AutocompleteMode,\n AutocompleteItem,\n FacetResult,\n IndexActionType,\n IndexDocumentsResult,\n IndexingResult,\n QueryType,\n SearchMode,\n ScoringStatistics,\n} from \"./generated/data/models\";\nexport {\n RegexFlags,\n KnownRegexFlags,\n LuceneStandardAnalyzer,\n StopAnalyzer,\n MappingCharFilter,\n PatternReplaceCharFilter,\n CorsOptions,\n AzureActiveDirectoryApplicationCredentials,\n ScoringFunctionAggregation,\n ScoringFunctionInterpolation,\n DistanceScoringParameters,\n DistanceScoringFunction,\n FreshnessScoringParameters,\n FreshnessScoringFunction,\n MagnitudeScoringParameters,\n MagnitudeScoringFunction,\n TagScoringParameters,\n TagScoringFunction,\n TextWeights,\n AsciiFoldingTokenFilter,\n CjkBigramTokenFilterScripts,\n CjkBigramTokenFilter,\n CommonGramTokenFilter,\n DictionaryDecompounderTokenFilter,\n EdgeNGramTokenFilterSide,\n ElisionTokenFilter,\n KeepTokenFilter,\n KeywordMarkerTokenFilter,\n LengthTokenFilter,\n LimitTokenFilter,\n PatternCaptureTokenFilter,\n PatternReplaceTokenFilter,\n PhoneticEncoder,\n PhoneticTokenFilter,\n ShingleTokenFilter,\n SnowballTokenFilterLanguage,\n SnowballTokenFilter,\n StemmerTokenFilterLanguage,\n StemmerTokenFilter,\n StemmerOverrideTokenFilter,\n StopwordsList,\n StopwordsTokenFilter,\n SynonymTokenFilter,\n TruncateTokenFilter,\n UniqueTokenFilter,\n WordDelimiterTokenFilter,\n ClassicTokenizer,\n TokenCharacterKind,\n EdgeNGramTokenizer,\n MicrosoftTokenizerLanguage,\n MicrosoftLanguageTokenizer,\n MicrosoftStemmingTokenizerLanguage,\n MicrosoftLanguageStemmingTokenizer,\n NGramTokenizer,\n PathHierarchyTokenizerV2 as PathHierarchyTokenizer,\n UaxUrlEmailTokenizer,\n Suggester as SearchSuggester,\n AnalyzeResult,\n AnalyzedTokenInfo,\n ConditionalSkill,\n KeyPhraseExtractionSkill,\n OcrSkill,\n ImageAnalysisSkill,\n LanguageDetectionSkill,\n ShaperSkill,\n MergeSkill,\n EntityRecognitionSkill,\n SentimentSkill,\n CustomEntityLookupSkill,\n CustomEntityLookupSkillLanguage,\n KnownCustomEntityLookupSkillLanguage,\n DocumentExtractionSkill,\n CustomEntity,\n CustomEntityAlias,\n SplitSkill,\n TextTranslationSkill,\n WebApiSkill,\n SentimentSkillLanguage,\n KnownSentimentSkillLanguage,\n SplitSkillLanguage,\n KnownSplitSkillLanguage,\n TextSplitMode,\n KnownTextSplitMode,\n TextTranslationSkillLanguage,\n KnownTextTranslationSkillLanguage,\n DefaultCognitiveServicesAccount,\n CognitiveServicesAccountKey,\n InputFieldMappingEntry,\n OutputFieldMappingEntry,\n EntityCategory,\n KnownEntityCategory,\n EntityRecognitionSkillLanguage,\n KnownEntityRecognitionSkillLanguage,\n ImageAnalysisSkillLanguage,\n KnownImageAnalysisSkillLanguage,\n ImageDetail,\n KnownImageDetail,\n VisualFeature,\n KnownVisualFeature,\n KeyPhraseExtractionSkillLanguage,\n KnownKeyPhraseExtractionSkillLanguage,\n OcrSkillLanguage,\n KnownOcrSkillLanguage,\n FieldMapping,\n IndexingParameters,\n IndexingSchedule,\n FieldMappingFunction,\n SearchIndexerStatus,\n IndexerExecutionResult,\n SearchIndexerLimits,\n IndexerStatus,\n SearchIndexerError,\n IndexerExecutionStatus,\n SearchIndexerWarning,\n SearchIndexerDataContainer,\n SearchIndexerDataSourceType,\n KnownSearchIndexerDataSourceType,\n SoftDeleteColumnDeletionDetectionPolicy,\n SqlIntegratedChangeTrackingPolicy,\n HighWaterMarkChangeDetectionPolicy,\n ServiceCounters,\n ServiceLimits,\n ResourceCounter,\n LexicalAnalyzerName,\n KnownLexicalAnalyzerName,\n ClassicSimilarity,\n BM25Similarity,\n IndexingParametersConfiguration,\n BlobIndexerDataToExtract,\n KnownBlobIndexerDataToExtract,\n IndexerExecutionEnvironment,\n BlobIndexerImageAction,\n KnownBlobIndexerImageAction,\n BlobIndexerParsingMode,\n KnownBlobIndexerParsingMode,\n BlobIndexerPDFTextRotationAlgorithm,\n KnownBlobIndexerPDFTextRotationAlgorithm,\n TokenFilter as BaseTokenFilter,\n Similarity,\n LexicalTokenizer as BaseLexicalTokenizer,\n CognitiveServicesAccount as BaseCognitiveServicesAccount,\n SearchIndexerSkill as BaseSearchIndexerSkill,\n ScoringFunction as BaseScoringFunction,\n DataChangeDetectionPolicy as BaseDataChangeDetectionPolicy,\n LexicalAnalyzer as BaseLexicalAnalyzer,\n CharFilter as BaseCharFilter,\n DataDeletionDetectionPolicy as BaseDataDeletionDetectionPolicy,\n TokenFilterName,\n KnownTokenFilterName,\n CharFilterName,\n KnownCharFilterName,\n SearchIndexerKnowledgeStore,\n SearchIndexerKnowledgeStoreProjection,\n SearchIndexerKnowledgeStoreFileProjectionSelector,\n SearchIndexerKnowledgeStoreBlobProjectionSelector,\n SearchIndexerKnowledgeStoreProjectionSelector,\n SearchIndexerKnowledgeStoreObjectProjectionSelector,\n SearchIndexerKnowledgeStoreTableProjectionSelector,\n} from \"./generated/service/models\";\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { createSynonymMapFromFile } from \"./synonymMapHelper\";\nexport { KnownSearchAudience } from \"./searchAudience\";\n"]}
@@ -46,7 +46,7 @@ export class IndexDocumentsBatch {
46
46
  const batch = keyValues.map((keyValue) => {
47
47
  return {
48
48
  __actionType: "delete",
49
- [keyName]: keyValue
49
+ [keyName]: keyValue,
50
50
  };
51
51
  });
52
52
  this.actions.push(...batch);
@@ -1 +1 @@
1
- {"version":3,"file":"indexDocumentsBatch.js","sourceRoot":"","sources":["../../src/indexDocumentsBatch.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM9B,YAAY,UAAqC,EAAE;QACjD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,SAAc;QAC1B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA0B,CAAC,GAAG,EAAE,EAAE;YAC3D,uCACK,GAAG,KACN,YAAY,EAAE,QAAQ,IACtB;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,SAAc;QACzB,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA0B,CAAC,GAAG,EAAE,EAAE;YAC3D,uCACK,GAAG,KACN,YAAY,EAAE,OAAO,IACrB;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,SAAc;QACjC,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA0B,CAAC,GAAG,EAAE,EAAE;YAC3D,uCACK,GAAG,KACN,YAAY,EAAE,eAAe,IAC7B;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAeM,MAAM,CAAC,kBAAiC,EAAE,SAAoB;QACnE,IAAI,SAAS,EAAE;YACb,MAAM,OAAO,GAAG,kBAA6B,CAAC;YAE9C,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA0B,CAAC,QAAQ,EAAE,EAAE;gBAChE,OAAO;oBACL,YAAY,EAAE,QAAQ;oBACtB,CAAC,OAAO,CAAC,EAAE,QAAQ;iBACO,CAAC;YAC/B,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;SAC7B;aAAM;YACL,MAAM,SAAS,GAAG,kBAAyB,CAAC;YAE5C,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA0B,CAAC,QAAQ,EAAE,EAAE;gBAChE,OAAO,gBACL,YAAY,EAAE,QAAQ,IACnB,QAAQ,CACe,CAAC;YAC/B,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;SAC7B;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IndexDocumentsAction } from \"./indexModels\";\n\n/**\n * Class used to perform batch operations\n * with multiple documents to the index.\n */\nexport class IndexDocumentsBatch<T> {\n /**\n * The set of actions taken in this batch.\n */\n public readonly actions: IndexDocumentsAction<T>[];\n\n constructor(actions: IndexDocumentsAction<T>[] = []) {\n this.actions = actions;\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n */\n public upload(documents: T[]): void {\n const batch = documents.map<IndexDocumentsAction<T>>((doc) => {\n return {\n ...doc,\n __actionType: \"upload\"\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Update a set of documents in the index.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n */\n public merge(documents: T[]): void {\n const batch = documents.map<IndexDocumentsAction<T>>((doc) => {\n return {\n ...doc,\n __actionType: \"merge\"\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Update a set of documents in the index or uploads them if they don't exist.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The new/updated documents.\n */\n public mergeOrUpload(documents: T[]): void {\n const batch = documents.map<IndexDocumentsAction<T>>((doc) => {\n return {\n ...doc,\n __actionType: \"mergeOrUpload\"\n };\n });\n\n this.actions.push(...batch);\n }\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 */\n public delete(keyName: keyof T, keyValues: string[]): void;\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n */\n public delete(documents: T[]): void;\n\n public delete(keyNameOrDocuments: keyof T | T[], keyValues?: string[]): void {\n if (keyValues) {\n const keyName = keyNameOrDocuments as keyof T;\n\n const batch = keyValues.map<IndexDocumentsAction<T>>((keyValue) => {\n return {\n __actionType: \"delete\",\n [keyName]: keyValue\n } as IndexDocumentsAction<T>;\n });\n\n this.actions.push(...batch);\n } else {\n const documents = keyNameOrDocuments as T[];\n\n const batch = documents.map<IndexDocumentsAction<T>>((document) => {\n return {\n __actionType: \"delete\",\n ...document\n } as IndexDocumentsAction<T>;\n });\n\n this.actions.push(...batch);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"indexDocumentsBatch.js","sourceRoot":"","sources":["../../src/indexDocumentsBatch.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM9B,YAAY,UAA0C,EAAE;QACtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,SAAmB;QAC/B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA+B,CAAC,GAAG,EAAE,EAAE;YAChE,uCACK,GAAG,KACN,YAAY,EAAE,QAAQ,IACtB;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,SAAmB;QAC9B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA+B,CAAC,GAAG,EAAE,EAAE;YAChE,uCACK,GAAG,KACN,YAAY,EAAE,OAAO,IACrB;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,SAAmB;QACtC,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA+B,CAAC,GAAG,EAAE,EAAE;YAChE,uCACK,GAAG,KACN,YAAY,EAAE,eAAe,IAC7B;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAeM,MAAM,CAAC,kBAA2C,EAAE,SAAoB;QAC7E,IAAI,SAAS,EAAE;YACb,MAAM,OAAO,GAAG,kBAAkC,CAAC;YAEnD,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA+B,CAAC,QAAQ,EAAE,EAAE;gBACrE,OAAO;oBACL,YAAY,EAAE,QAAQ;oBACtB,CAAC,OAAO,CAAC,EAAE,QAAQ;iBACY,CAAC;YACpC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;SAC7B;aAAM;YACL,MAAM,SAAS,GAAG,kBAA8B,CAAC;YAEjD,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA+B,CAAC,QAAQ,EAAE,EAAE;gBACrE,OAAO,gBACL,YAAY,EAAE,QAAQ,IACnB,QAAQ,CACoB,CAAC;YACpC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;SAC7B;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IndexDocumentsAction } from \"./indexModels\";\n\n/**\n * Class used to perform batch operations\n * with multiple documents to the index.\n */\nexport class IndexDocumentsBatch<TModel> {\n /**\n * The set of actions taken in this batch.\n */\n public readonly actions: IndexDocumentsAction<TModel>[];\n\n constructor(actions: IndexDocumentsAction<TModel>[] = []) {\n this.actions = actions;\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n */\n public upload(documents: TModel[]): void {\n const batch = documents.map<IndexDocumentsAction<TModel>>((doc) => {\n return {\n ...doc,\n __actionType: \"upload\",\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Update a set of documents in the index.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n */\n public merge(documents: TModel[]): void {\n const batch = documents.map<IndexDocumentsAction<TModel>>((doc) => {\n return {\n ...doc,\n __actionType: \"merge\",\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Update a set of documents in the index or uploads them if they don't exist.\n * For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The new/updated documents.\n */\n public mergeOrUpload(documents: TModel[]): void {\n const batch = documents.map<IndexDocumentsAction<TModel>>((doc) => {\n return {\n ...doc,\n __actionType: \"mergeOrUpload\",\n };\n });\n\n this.actions.push(...batch);\n }\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 */\n public delete(keyName: keyof TModel, keyValues: string[]): void;\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n */\n public delete(documents: TModel[]): void;\n\n public delete(keyNameOrDocuments: keyof TModel | TModel[], keyValues?: string[]): void {\n if (keyValues) {\n const keyName = keyNameOrDocuments as keyof TModel;\n\n const batch = keyValues.map<IndexDocumentsAction<TModel>>((keyValue) => {\n return {\n __actionType: \"delete\",\n [keyName]: keyValue,\n } as IndexDocumentsAction<TModel>;\n });\n\n this.actions.push(...batch);\n } else {\n const documents = keyNameOrDocuments as TModel[];\n\n const batch = documents.map<IndexDocumentsAction<TModel>>((document) => {\n return {\n __actionType: \"delete\",\n ...document,\n } as IndexDocumentsAction<TModel>;\n });\n\n this.actions.push(...batch);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"indexModels.js","sourceRoot":"","sources":["../../src/indexModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAgmBlC,6CAA6C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-http\";\nimport {\n QueryType,\n SearchMode,\n FacetResult,\n AutocompleteMode,\n IndexActionType,\n ScoringStatistics\n} from \"./generated/data/models\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Options for performing the count operation on the index.\n */\nexport type CountDocumentsOptions = OperationOptions;\n/**\n * Options for retrieving completion text for a partial searchText.\n */\nexport type AutocompleteOptions<Fields> = OperationOptions & AutocompleteRequest<Fields>;\n/**\n * Options for committing a full search request.\n */\nexport type SearchOptions<Fields> = OperationOptions & SearchRequestOptions<Fields>;\n/**\n * Options for retrieving suggestions based on the searchText.\n */\nexport type SuggestOptions<Fields> = OperationOptions & SuggestRequest<Fields>;\n\n/**\n * Options for SearchIndexingBufferedSender.\n */\nexport interface SearchIndexingBufferedSenderOptions {\n /**\n * Indicates if autoFlush is enabled.\n */\n autoFlush?: boolean;\n /**\n * Initial Batch Action Count.\n *\n * A batch request will be sent once the documents\n * reach the initialBatchActionCount.\n */\n initialBatchActionCount?: number;\n /**\n * Flush Window.\n *\n * A batch request will be sent after flushWindowInMs is\n * reached.\n */\n flushWindowInMs?: number;\n /**\n * Maximum number of Retries\n */\n maxRetriesPerAction?: number;\n /**\n * Delay between retries\n */\n throttlingDelayInMs?: number;\n /**\n * Max Delay between retries\n */\n maxThrottlingDelayInMs?: number;\n}\n\n/**\n * Options for SearchIndexingBufferedSenderUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeOrUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderDeleteDocuments.\n */\nexport type SearchIndexingBufferedSenderDeleteDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderFlushDocuments.\n */\nexport type SearchIndexingBufferedSenderFlushDocumentsOptions = OperationOptions;\n\n/**\n * Options for retrieving a single document.\n */\nexport interface GetDocumentOptions<Fields> extends OperationOptions {\n /**\n * List of field names to retrieve for the document; Any field not retrieved will be missing from\n * the returned document.\n */\n selectedFields?: Fields[];\n}\n\n/**\n * Options for the modify index batch operation.\n */\nexport interface IndexDocumentsOptions extends OperationOptions {\n /**\n * If true, will cause this operation to throw if any document operation\n * in the batch did not succeed.\n */\n throwOnAnyFailure?: boolean;\n}\n\n/**\n * Options for the upload documents operation.\n */\nexport type UploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge documents operation.\n */\nexport type MergeDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge or upload documents operation.\n */\nexport type MergeOrUploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the delete documents operation.\n */\nexport type DeleteDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListSearchResultsPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * An iterator for search results of a paticular query. Will make requests\n * as needed during iteration. Use .byPage() to make one request to the server\n * per iteration.\n */\nexport type SearchIterator<Fields> = PagedAsyncIterableIterator<\n SearchResult<Fields>,\n SearchDocumentsPageResult<Fields>,\n ListSearchResultsPageSettings\n>;\n\n// BEGIN manually modified generated interfaces\n//\n// This section is for places where we have to manually fix issues\n// with interfaces from the generated code.\n// Mostly this is to allow modeling additionalProperties:true as generics.\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequest {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string;\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full'\n */\n queryType?: QueryType;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. The default is\n * 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global\n * scoring statistics can increase latency of search queries. Possible values include: 'Local',\n * 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help getting more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * A full-text search query expression; Use \"*\" or omit this parameter to match all documents.\n */\n searchText?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: string;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'Any', 'All'\n */\n searchMode?: SearchMode;\n /**\n * The comma-separated list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: string;\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n}\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequestOptions<Fields> {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'simple', 'full'\n */\n queryType?: QueryType;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: Fields[];\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'any', 'all'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. Possible\n * values include: 'Local', 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help to get more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: Fields[];\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n}\n\n/**\n * Contains a document found by a search query, plus associated metadata.\n */\nexport type SearchResult<T> = {\n /**\n * The relevance score of the document compared to other documents returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly score: number;\n /**\n * Text fragments from the document that indicate the matching search terms, organized by each\n * applicable field; null if hit highlighting was not enabled for the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly highlights?: { [k in keyof T]?: string[] };\n\n document: T;\n};\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResultBase {\n /**\n * The total count of results found by the search operation, or null if the count was not\n * requested. If present, the count may be greater than the number of results in this response.\n * This can happen if you use the $top or $skip parameters, or if Azure Cognitive Search can't\n * return all the requested documents in a single Search response.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly count?: number;\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not specified in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n /**\n * The facet query results for the search operation, organized as a collection of buckets for\n * each faceted field; null if the query did not include any facet expressions.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly facets?: { [propertyName: string]: FacetResult[] };\n}\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchIterator<T>;\n}\n\n/**\n * Response containing search page results from an index.\n */\nexport interface SearchDocumentsPageResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchResult<T>[];\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.\n */\nexport interface SuggestRequest<Fields> {\n /**\n * An OData expression that filters the documents considered for suggestions.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the suggestion query. Default is false.\n * When set to true, the query will find suggestions even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy suggestion searches are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting of suggestions is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting of suggestions is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * suggestion query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * The comma-separated list of field names to search for the specified search text. Target fields\n * must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The list of fields to retrieve. If unspecified, only the key field will be\n * included in the results.\n */\n select?: Fields[];\n /**\n * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is\n * 5.\n */\n top?: number;\n}\n\n/**\n * A result containing a document found by a suggestion query, plus associated metadata.\n */\nexport type SuggestResult<T> = {\n /**\n * The text of the suggestion result.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly text: string;\n document: T;\n};\n\n/**\n * Response containing suggestion query results from an index.\n */\nexport interface SuggestDocumentsResult<T> {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SuggestResult<T>[];\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not set in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n}\n\n/**\n * Parameters for fuzzy matching, and other autocomplete query behaviors.\n */\nexport interface AutocompleteRequest<Fields> {\n /**\n * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles\n * and 'oneTermWithContext' to use the current context while producing auto-completed terms.\n * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'\n */\n autocompleteMode?: AutocompleteMode;\n /**\n * An OData expression that filters the documents used to produce completed terms for the\n * Autocomplete result.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false.\n * When set to true, the query will autocomplete terms even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy autocomplete queries are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by an\n * autocomplete query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of field names to consider when querying for auto-completed terms.\n * Target fields must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The\n * default is 5.\n */\n top?: number;\n}\n\n/**\n * Represents an index action that operates on a document.\n */\nexport type IndexDocumentsAction<T> = {\n /**\n * The operation to perform on a document in an indexing batch. Possible values include:\n * 'upload', 'merge', 'mergeOrUpload', 'delete'\n */\n __actionType: IndexActionType;\n} & Partial<T>;\n\n// END manually modified generated interfaces\n"]}
1
+ {"version":3,"file":"indexModels.js","sourceRoot":"","sources":["../../src/indexModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAgmBlC,6CAA6C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n AutocompleteMode,\n FacetResult,\n IndexActionType,\n QueryType,\n ScoringStatistics,\n SearchMode,\n} from \"./generated/data/models\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Options for performing the count operation on the index.\n */\nexport type CountDocumentsOptions = OperationOptions;\n/**\n * Options for retrieving completion text for a partial searchText.\n */\nexport type AutocompleteOptions<TFields> = OperationOptions & AutocompleteRequest<TFields>;\n/**\n * Options for committing a full search request.\n */\nexport type SearchOptions<TFields> = OperationOptions & SearchRequestOptions<TFields>;\n/**\n * Options for retrieving suggestions based on the searchText.\n */\nexport type SuggestOptions<TFields> = OperationOptions & SuggestRequest<TFields>;\n\n/**\n * Options for SearchIndexingBufferedSender.\n */\nexport interface SearchIndexingBufferedSenderOptions {\n /**\n * Indicates if autoFlush is enabled.\n */\n autoFlush?: boolean;\n /**\n * Initial Batch Action Count.\n *\n * A batch request will be sent once the documents\n * reach the initialBatchActionCount.\n */\n initialBatchActionCount?: number;\n /**\n * Flush Window.\n *\n * A batch request will be sent after flushWindowInMs is\n * reached.\n */\n flushWindowInMs?: number;\n /**\n * Maximum number of Retries\n */\n maxRetriesPerAction?: number;\n /**\n * Delay between retries\n */\n throttlingDelayInMs?: number;\n /**\n * Max Delay between retries\n */\n maxThrottlingDelayInMs?: number;\n}\n\n/**\n * Options for SearchIndexingBufferedSenderUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeOrUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderDeleteDocuments.\n */\nexport type SearchIndexingBufferedSenderDeleteDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderFlushDocuments.\n */\nexport type SearchIndexingBufferedSenderFlushDocumentsOptions = OperationOptions;\n\n/**\n * Options for retrieving a single document.\n */\nexport interface GetDocumentOptions<TFields> extends OperationOptions {\n /**\n * List of field names to retrieve for the document; Any field not retrieved will be missing from\n * the returned document.\n */\n selectedFields?: TFields[] | string[];\n}\n\n/**\n * Options for the modify index batch operation.\n */\nexport interface IndexDocumentsOptions extends OperationOptions {\n /**\n * If true, will cause this operation to throw if any document operation\n * in the batch did not succeed.\n */\n throwOnAnyFailure?: boolean;\n}\n\n/**\n * Options for the upload documents operation.\n */\nexport type UploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge documents operation.\n */\nexport type MergeDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge or upload documents operation.\n */\nexport type MergeOrUploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the delete documents operation.\n */\nexport type DeleteDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListSearchResultsPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * An iterator for search results of a paticular query. Will make requests\n * as needed during iteration. Use .byPage() to make one request to the server\n * per iteration.\n */\nexport type SearchIterator<TFields> = PagedAsyncIterableIterator<\n SearchResult<TFields>,\n SearchDocumentsPageResult<TFields>,\n ListSearchResultsPageSettings\n>;\n\n// BEGIN manually modified generated interfaces\n//\n// This section is for places where we have to manually fix issues\n// with interfaces from the generated code.\n// Mostly this is to allow modeling additionalProperties:true as generics.\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequest {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string;\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full'\n */\n queryType?: QueryType;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. The default is\n * 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global\n * scoring statistics can increase latency of search queries. Possible values include: 'Local',\n * 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help getting more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * A full-text search query expression; Use \"*\" or omit this parameter to match all documents.\n */\n searchText?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: string;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'Any', 'All'\n */\n searchMode?: SearchMode;\n /**\n * The comma-separated list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: string;\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n}\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequestOptions<TFields> {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'simple', 'full'\n */\n queryType?: QueryType;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: TFields[] | string[];\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'any', 'all'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. Possible\n * values include: 'Local', 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help to get more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: TFields[] | string[];\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n}\n\n/**\n * Contains a document found by a search query, plus associated metadata.\n */\nexport type SearchResult<TModel> = {\n /**\n * The relevance score of the document compared to other documents returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly score: number;\n /**\n * Text fragments from the document that indicate the matching search terms, organized by each\n * applicable field; null if hit highlighting was not enabled for the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly highlights?: { [k in keyof TModel]?: string[] };\n\n document: TModel;\n};\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResultBase {\n /**\n * The total count of results found by the search operation, or null if the count was not\n * requested. If present, the count may be greater than the number of results in this response.\n * This can happen if you use the $top or $skip parameters, or if Azure Cognitive Search can't\n * return all the requested documents in a single Search response.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly count?: number;\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not specified in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n /**\n * The facet query results for the search operation, organized as a collection of buckets for\n * each faceted field; null if the query did not include any facet expressions.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly facets?: { [propertyName: string]: FacetResult[] };\n}\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResult<TModel> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchIterator<TModel>;\n}\n\n/**\n * Response containing search page results from an index.\n */\nexport interface SearchDocumentsPageResult<TModel> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchResult<TModel>[];\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.\n */\nexport interface SuggestRequest<TFields> {\n /**\n * An OData expression that filters the documents considered for suggestions.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the suggestion query. Default is false.\n * When set to true, the query will find suggestions even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy suggestion searches are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting of suggestions is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting of suggestions is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * suggestion query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * The comma-separated list of field names to search for the specified search text. Target fields\n * must be included in the specified suggester.\n */\n searchFields?: TFields[] | string[];\n /**\n * The list of fields to retrieve. If unspecified, only the key field will be\n * included in the results.\n */\n select?: TFields[] | string[];\n /**\n * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is\n * 5.\n */\n top?: number;\n}\n\n/**\n * A result containing a document found by a suggestion query, plus associated metadata.\n */\nexport type SuggestResult<TModel> = {\n /**\n * The text of the suggestion result.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly text: string;\n document: TModel;\n};\n\n/**\n * Response containing suggestion query results from an index.\n */\nexport interface SuggestDocumentsResult<TModel> {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SuggestResult<TModel>[];\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not set in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n}\n\n/**\n * Parameters for fuzzy matching, and other autocomplete query behaviors.\n */\nexport interface AutocompleteRequest<TFields> {\n /**\n * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles\n * and 'oneTermWithContext' to use the current context while producing auto-completed terms.\n * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'\n */\n autocompleteMode?: AutocompleteMode;\n /**\n * An OData expression that filters the documents used to produce completed terms for the\n * Autocomplete result.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false.\n * When set to true, the query will autocomplete terms even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy autocomplete queries are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by an\n * autocomplete query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of field names to consider when querying for auto-completed terms.\n * Target fields must be included in the specified suggester.\n */\n searchFields?: TFields[] | string[];\n /**\n * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The\n * default is 5.\n */\n top?: number;\n}\n\n/**\n * Represents an index action that operates on a document.\n */\nexport type IndexDocumentsAction<TModel> = {\n /**\n * The operation to perform on a document in an indexing batch. Possible values include:\n * 'upload', 'merge', 'mergeOrUpload', 'delete'\n */\n __actionType: IndexActionType;\n} & Partial<TModel>;\n\n// END manually modified generated interfaces\n"]}
@@ -1,26 +1,18 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { BaseRequestPolicy } from "@azure/core-http";
4
3
  const AcceptHeaderName = "Accept";
4
+ const odataMetadataPolicy = "OdataMetadataPolicy";
5
5
  /**
6
6
  * A policy factory for setting the Accept header to ignore odata metadata
7
7
  * @internal
8
8
  */
9
- export function odataMetadataPolicy(metadataLevel) {
9
+ export function createOdataMetadataPolicy(metadataLevel) {
10
10
  return {
11
- create: (nextPolicy, options) => {
12
- return new OdataMetadataPolicy(nextPolicy, options, { metadataLevel });
13
- }
11
+ name: odataMetadataPolicy,
12
+ async sendRequest(request, next) {
13
+ request.headers.set(AcceptHeaderName, `application/json;odata.metadata=${metadataLevel}`);
14
+ return next(request);
15
+ },
14
16
  };
15
17
  }
16
- class OdataMetadataPolicy extends BaseRequestPolicy {
17
- constructor(nextPolicy, options, policyOptions) {
18
- super(nextPolicy, options);
19
- this.metadataLevel = policyOptions.metadataLevel;
20
- }
21
- async sendRequest(webResource) {
22
- webResource.headers.set(AcceptHeaderName, `application/json;odata.metadata=${this.metadataLevel}`);
23
- return this._nextPolicy.sendRequest(webResource);
24
- }
25
- }
26
18
  //# sourceMappingURL=odataMetadataPolicy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"odataMetadataPolicy.js","sourceRoot":"","sources":["../../src/odataMetadataPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAGL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAIlC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,aAA4B;IAC9D,OAAO;QACL,MAAM,EAAE,CAAC,UAAyB,EAAE,OAA6B,EAAE,EAAE;YACnE,OAAO,IAAI,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;QACzE,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,mBAAoB,SAAQ,iBAAiB;IAGjD,YACE,UAAyB,EACzB,OAAiC,EACjC,aAA+C;QAE/C,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC;IACnD,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,WAA4B;QACnD,WAAW,CAAC,OAAO,CAAC,GAAG,CACrB,gBAAgB,EAChB,mCAAmC,IAAI,CAAC,aAAa,EAAE,CACxD,CAAC;QACF,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n RequestPolicy,\n RequestPolicyOptions,\n BaseRequestPolicy,\n WebResourceLike,\n HttpOperationResponse,\n RequestPolicyFactory,\n RequestPolicyOptionsLike\n} from \"@azure/core-http\";\n\nconst AcceptHeaderName = \"Accept\";\n\nexport type MetadataLevel = \"none\" | \"minimal\";\n\n/**\n * A policy factory for setting the Accept header to ignore odata metadata\n * @internal\n */\nexport function odataMetadataPolicy(metadataLevel: MetadataLevel): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptions) => {\n return new OdataMetadataPolicy(nextPolicy, options, { metadataLevel });\n }\n };\n}\n\nclass OdataMetadataPolicy extends BaseRequestPolicy {\n private metadataLevel: MetadataLevel;\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptionsLike,\n policyOptions: { metadataLevel: MetadataLevel }\n ) {\n super(nextPolicy, options);\n this.metadataLevel = policyOptions.metadataLevel;\n }\n\n public async sendRequest(webResource: WebResourceLike): Promise<HttpOperationResponse> {\n webResource.headers.set(\n AcceptHeaderName,\n `application/json;odata.metadata=${this.metadataLevel}`\n );\n return this._nextPolicy.sendRequest(webResource);\n }\n}\n"]}
1
+ {"version":3,"file":"odataMetadataPolicy.js","sourceRoot":"","sources":["../../src/odataMetadataPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAGlC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAElD;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,aAA4B;IACpE,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,mCAAmC,aAAa,EAAE,CAAC,CAAC;YAC1F,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nconst AcceptHeaderName = \"Accept\";\n\nexport type MetadataLevel = \"none\" | \"minimal\";\nconst odataMetadataPolicy = \"OdataMetadataPolicy\";\n\n/**\n * A policy factory for setting the Accept header to ignore odata metadata\n * @internal\n */\nexport function createOdataMetadataPolicy(metadataLevel: MetadataLevel): PipelinePolicy {\n return {\n name: odataMetadataPolicy,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n request.headers.set(AcceptHeaderName, `application/json;odata.metadata=${metadataLevel}`);\n return next(request);\n },\n };\n}\n"]}
@@ -1,33 +1,20 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- import { BaseRequestPolicy } from "@azure/core-http";
4
3
  const API_KEY_HEADER_NAME = "api-key";
4
+ const searchApiKeyCredentialPolicy = "SearchApiKeyCredentialPolicy";
5
5
  /**
6
6
  * Create an HTTP pipeline policy to authenticate a request
7
7
  * using an `AzureKeyCredential` for Azure Cognitive Search
8
8
  */
9
9
  export function createSearchApiKeyCredentialPolicy(credential) {
10
10
  return {
11
- create: (nextPolicy, options) => {
12
- return new SearchApiKeyCredentialPolicy(nextPolicy, options, credential);
13
- }
11
+ name: searchApiKeyCredentialPolicy,
12
+ async sendRequest(request, next) {
13
+ if (!request.headers.has(API_KEY_HEADER_NAME)) {
14
+ request.headers.set(API_KEY_HEADER_NAME, credential.key);
15
+ }
16
+ return next(request);
17
+ },
14
18
  };
15
19
  }
16
- /**
17
- * A concrete implementation of an AzureKeyCredential policy
18
- * using the appropriate header for Azure Cognitive Search
19
- */
20
- class SearchApiKeyCredentialPolicy extends BaseRequestPolicy {
21
- constructor(nextPolicy, options, credential) {
22
- super(nextPolicy, options);
23
- this.credential = credential;
24
- }
25
- async sendRequest(webResource) {
26
- if (!webResource) {
27
- throw new Error("webResource cannot be null or undefined");
28
- }
29
- webResource.headers.set(API_KEY_HEADER_NAME, this.credential.key);
30
- return this._nextPolicy.sendRequest(webResource);
31
- }
32
- }
33
20
  //# sourceMappingURL=searchApiKeyCredentialPolicy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchApiKeyCredentialPolicy.js","sourceRoot":"","sources":["../../src/searchApiKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAGL,iBAAiB,EAIlB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAChD,UAAyB;IAEzB,OAAO;QACL,MAAM,EAAE,CAAC,UAAyB,EAAE,OAAiC,EAAE,EAAE;YACvE,OAAO,IAAI,4BAA4B,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QAC3E,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,4BAA6B,SAAQ,iBAAiB;IAG1D,YACE,UAAyB,EACzB,OAAiC,EACjC,UAAyB;QAEzB,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,WAA4B;QACnD,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC5D;QAED,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential } from \"@azure/core-auth\";\nimport {\n RequestPolicyFactory,\n RequestPolicy,\n BaseRequestPolicy,\n WebResourceLike,\n HttpOperationResponse,\n RequestPolicyOptionsLike\n} from \"@azure/core-http\";\n\nconst API_KEY_HEADER_NAME = \"api-key\";\n\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for Azure Cognitive Search\n */\nexport function createSearchApiKeyCredentialPolicy(\n credential: KeyCredential\n): RequestPolicyFactory {\n return {\n create: (nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike) => {\n return new SearchApiKeyCredentialPolicy(nextPolicy, options, credential);\n }\n };\n}\n\n/**\n * A concrete implementation of an AzureKeyCredential policy\n * using the appropriate header for Azure Cognitive Search\n */\nclass SearchApiKeyCredentialPolicy extends BaseRequestPolicy {\n private credential: KeyCredential;\n\n constructor(\n nextPolicy: RequestPolicy,\n options: RequestPolicyOptionsLike,\n credential: KeyCredential\n ) {\n super(nextPolicy, options);\n this.credential = credential;\n }\n\n public async sendRequest(webResource: WebResourceLike): Promise<HttpOperationResponse> {\n if (!webResource) {\n throw new Error(\"webResource cannot be null or undefined\");\n }\n\n webResource.headers.set(API_KEY_HEADER_NAME, this.credential.key);\n return this._nextPolicy.sendRequest(webResource);\n }\n}\n"]}
1
+ {"version":3,"file":"searchApiKeyCredentialPolicy.js","sourceRoot":"","sources":["../../src/searchApiKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,UAAyB;IAC1E,OAAO;QACL,IAAI,EAAE,4BAA4B;QAClC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,EAAE;gBAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;aAC1D;YACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential } from \"@azure/core-auth\";\nimport {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\n\nconst API_KEY_HEADER_NAME = \"api-key\";\nconst searchApiKeyCredentialPolicy = \"SearchApiKeyCredentialPolicy\";\n\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for Azure Cognitive Search\n */\nexport function createSearchApiKeyCredentialPolicy(credential: KeyCredential): PipelinePolicy {\n return {\n name: searchApiKeyCredentialPolicy,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (!request.headers.has(API_KEY_HEADER_NAME)) {\n request.headers.set(API_KEY_HEADER_NAME, credential.key);\n }\n return next(request);\n },\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"searchAudience.js","sourceRoot":"","sources":["../../src/searchAudience.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,6DAAsC,CAAA;IACtC;;OAEG;IACH,kEAA2C,CAAA;IAC3C;;OAEG;IACH,oEAA6C,CAAA;AAC/C,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Known values for Search Audience\n */\nexport enum KnownSearchAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://search.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://search.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://search.azure.com\"\n}\n"]}
1
+ {"version":3,"file":"searchAudience.js","sourceRoot":"","sources":["../../src/searchAudience.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;GAEG;AACH,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,6DAAsC,CAAA;IACtC;;OAEG;IACH,kEAA2C,CAAA;IAC3C;;OAEG;IACH,oEAA6C,CAAA;AAC/C,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Known values for Search Audience\n */\nexport enum KnownSearchAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://search.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://search.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://search.azure.com\",\n}\n"]}