@azure/search-documents 11.3.0-alpha.20220922.2 → 11.3.0-alpha.20221031.2

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 (40) hide show
  1. package/dist/index.js +436 -138
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  4. package/dist-esm/src/generated/data/models/parameters.js +0 -9
  5. package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
  6. package/dist-esm/src/generated/data/operations/documents.js +9 -25
  7. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  8. package/dist-esm/src/generated/service/models/index.js +396 -16
  9. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  10. package/dist-esm/src/generated/service/models/mappers.js +4 -4
  11. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  12. package/dist-esm/src/generated/service/models/parameters.js +0 -9
  13. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  14. package/dist-esm/src/generated/service/operations/aliases.js +3 -9
  15. package/dist-esm/src/generated/service/operations/aliases.js.map +1 -1
  16. package/dist-esm/src/generated/service/operations/dataSources.js +3 -9
  17. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  18. package/dist-esm/src/generated/service/operations/indexers.js +7 -17
  19. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  20. package/dist-esm/src/generated/service/operations/indexes.js +5 -15
  21. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  22. package/dist-esm/src/generated/service/operations/skillsets.js +4 -14
  23. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  24. package/dist-esm/src/generated/service/operations/synonymMaps.js +3 -9
  25. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  26. package/dist-esm/src/generated/service/searchServiceClient.js +1 -1
  27. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  28. package/dist-esm/src/indexModels.js.map +1 -1
  29. package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
  30. package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
  31. package/dist-esm/src/searchClient.js +1 -1
  32. package/dist-esm/src/searchClient.js.map +1 -1
  33. package/dist-esm/src/searchIndexClient.js.map +1 -1
  34. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  35. package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
  36. package/dist-esm/src/serviceModels.js.map +1 -1
  37. package/dist-esm/src/serviceUtils.js +1 -1
  38. package/dist-esm/src/serviceUtils.js.map +1 -1
  39. package/package.json +3 -3
  40. package/types/search-documents.d.ts +601 -31
@@ -1 +1 @@
1
- {"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAiBnD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,YAAoB,EACpB,QAA+B,EAC/B,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,EACnC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,YAAoB,EACpB,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,OAAO,EAAE,EACzB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,YAAoB,EACpB,OAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,oBA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,kBAAkB;KAC9B;IACD,SAAS,EAAE,MAAM;IACjB,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 { Skillsets } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse,\n SkillNames,\n SkillsetsResetSkillsOptionalParams\n} from \"../models\";\n\n/** Class containing Skillsets operations. */\nexport class SkillsetsImpl implements Skillsets {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Skillsets class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\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 return this.client.sendOperationRequest(\n { skillsetName, skillset, options },\n createOrUpdateOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { skillsetName, options },\n deleteOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { skillsetName, options },\n getOperationSpec\n );\n }\n\n /**\n * List all skillsets in a search service.\n * @param options The options parameters.\n */\n list(options?: SkillsetsListOptionalParams): Promise<SkillsetsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new skillset in a search service.\n * @param skillset The skillset containing one or more skills to create in a search service.\n * @param options The options parameters.\n */\n create(\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOptionalParams\n ): Promise<SkillsetsCreateResponse> {\n return this.client.sendOperationRequest(\n { skillset, options },\n createOperationSpec\n );\n }\n\n /**\n * Reset an existing skillset in a search service.\n * @param skillsetName The name of the skillset to reset.\n * @param skillNames The names of skills to reset.\n * @param options The options parameters.\n */\n resetSkills(\n skillsetName: string,\n skillNames: SkillNames,\n options?: SkillsetsResetSkillsOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { skillsetName, skillNames, options },\n resetSkillsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.skillset,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection\n ],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSkillsetsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.skillset,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\nconst resetSkillsOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')/search.resetskills\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.skillNames,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAiBnD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,YAAoB,EACpB,QAA+B,EAC/B,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,EACnC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,YAAoB,EACpB,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,OAAO,EAAE,EACzB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,YAAoB,EACpB,OAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,OAAO,EAAE,EACzB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAAqC;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,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UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,QAAQ;IAChC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,iDAAiD;IACvD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,YAAY,CAAC;IAC7D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { Skillsets } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse,\n SkillNames,\n SkillsetsResetSkillsOptionalParams\n} from \"../models\";\n\n/** Class containing Skillsets operations. */\nexport class SkillsetsImpl implements Skillsets {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Skillsets class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\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 return this.client.sendOperationRequest(\n { skillsetName, skillset, options },\n createOrUpdateOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { skillsetName, options },\n deleteOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { skillsetName, options },\n getOperationSpec\n );\n }\n\n /**\n * List all skillsets in a search service.\n * @param options The options parameters.\n */\n list(options?: SkillsetsListOptionalParams): Promise<SkillsetsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new skillset in a search service.\n * @param skillset The skillset containing one or more skills to create in a search service.\n * @param options The options parameters.\n */\n create(\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOptionalParams\n ): Promise<SkillsetsCreateResponse> {\n return this.client.sendOperationRequest(\n { skillset, options },\n createOperationSpec\n );\n }\n\n /**\n * Reset an existing skillset in a search service.\n * @param skillsetName The name of the skillset to reset.\n * @param skillNames The names of skills to reset.\n * @param options The options parameters.\n */\n resetSkills(\n skillsetName: string,\n skillNames: SkillNames,\n options?: SkillsetsResetSkillsOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { skillsetName, skillNames, options },\n resetSkillsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.skillset,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection\n ],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSkillsetsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.skillset,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst resetSkillsOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')/search.resetskills\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.skillNames,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -80,7 +80,6 @@ const createOrUpdateOperationSpec = {
80
80
  headerParameters: [
81
81
  Parameters.contentType,
82
82
  Parameters.accept,
83
- Parameters.xMsClientRequestId,
84
83
  Parameters.ifMatch,
85
84
  Parameters.ifNoneMatch,
86
85
  Parameters.prefer
@@ -102,7 +101,6 @@ const deleteOperationSpec = {
102
101
  urlParameters: [Parameters.endpoint, Parameters.synonymMapName],
103
102
  headerParameters: [
104
103
  Parameters.accept,
105
- Parameters.xMsClientRequestId,
106
104
  Parameters.ifMatch,
107
105
  Parameters.ifNoneMatch
108
106
  ],
@@ -121,7 +119,7 @@ const getOperationSpec = {
121
119
  },
122
120
  queryParameters: [Parameters.apiVersion],
123
121
  urlParameters: [Parameters.endpoint, Parameters.synonymMapName],
124
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
122
+ headerParameters: [Parameters.accept],
125
123
  serializer
126
124
  };
127
125
  const listOperationSpec = {
@@ -137,7 +135,7 @@ const listOperationSpec = {
137
135
  },
138
136
  queryParameters: [Parameters.apiVersion, Parameters.select],
139
137
  urlParameters: [Parameters.endpoint],
140
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
138
+ headerParameters: [Parameters.accept],
141
139
  serializer
142
140
  };
143
141
  const createOperationSpec = {
@@ -154,11 +152,7 @@ const createOperationSpec = {
154
152
  requestBody: Parameters.synonymMap,
155
153
  queryParameters: [Parameters.apiVersion],
156
154
  urlParameters: [Parameters.endpoint],
157
- headerParameters: [
158
- Parameters.contentType,
159
- Parameters.accept,
160
- Parameters.xMsClientRequestId
161
- ],
155
+ headerParameters: [Parameters.contentType, Parameters.accept],
162
156
  mediaType: "json",
163
157
  serializer
164
158
  };
@@ -1 +1 @@
1
- {"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,cAAsB,EACtB,UAAsB,EACtB,OAAiD;QAEj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X,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,kBAAkB;KAC9B;IACD,SAAS,EAAE,MAAM;IACjB,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 { SynonymMaps } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\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/** Class containing SynonymMaps operations. */\nexport class SynonymMapsImpl implements SynonymMaps {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class SynonymMaps class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\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 return this.client.sendOperationRequest(\n { synonymMapName, synonymMap, options },\n createOrUpdateOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { synonymMapName, options },\n deleteOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { synonymMapName, options },\n getOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\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 return this.client.sendOperationRequest(\n { synonymMap, options },\n createOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SynonymMap\n },\n 201: {\n bodyMapper: Mappers.SynonymMap\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.synonymMap,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SynonymMap\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSynonymMapsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SynonymMap\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.synonymMap,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,cAAsB,EACtB,UAAsB,EACtB,OAAiD;QAEjD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,EACvC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,cAAsB,EACtB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,cAAc,EAAE,OAAO,EAAE,EAC3B,mBAAmB,CACpB,CAAC;IACJ,CAAC;I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MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,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 { SynonymMaps } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\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/** Class containing SynonymMaps operations. */\nexport class SynonymMapsImpl implements SynonymMaps {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class SynonymMaps class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\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 return this.client.sendOperationRequest(\n { synonymMapName, synonymMap, options },\n createOrUpdateOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { synonymMapName, options },\n deleteOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { synonymMapName, options },\n getOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\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 return this.client.sendOperationRequest(\n { synonymMap, options },\n createOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SynonymMap\n },\n 201: {\n bodyMapper: Mappers.SynonymMap\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.synonymMap,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SynonymMap\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSynonymMapsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SynonymMap\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.synonymMap,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -74,7 +74,7 @@ const getServiceStatisticsOperationSpec = {
74
74
  },
75
75
  queryParameters: [Parameters.apiVersion],
76
76
  urlParameters: [Parameters.endpoint],
77
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
77
+ headerParameters: [Parameters.accept],
78
78
  serializer
79
79
  };
80
80
  //# 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,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACZ,MAAM,cAAc,CAAC;AAStB,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAQ5C,gBAAgB;AAChB,MAAM,OAAO,mBAAoB,SAAQ,cAAc,CAAC,qBAAqB;IAI3E;;;;;OAKG;IACH,YACE,QAAgB,EAChB,UAAqC,EACrC,OAA2C;;QAE3C,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAsC;YAClD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EA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C,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 coreClient from \"@azure/core-client\";\nimport * as coreHttpCompat from \"@azure/core-http-compat\";\nimport {\n DataSourcesImpl,\n IndexersImpl,\n SkillsetsImpl,\n SynonymMapsImpl,\n IndexesImpl,\n AliasesImpl\n} from \"./operations\";\nimport {\n DataSources,\n Indexers,\n Skillsets,\n SynonymMaps,\n Indexes,\n Aliases\n} from \"./operationsInterfaces\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport {\n ApiVersion20210430Preview,\n SearchServiceClientOptionalParams,\n GetServiceStatisticsOptionalParams,\n GetServiceStatisticsResponse\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20210430Preview;\n\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: ApiVersion20210430Preview,\n options?: SearchServiceClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\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 this.aliases = new AliasesImpl(this);\n }\n\n /**\n * Gets service level statistics for a search service.\n * @param options The options parameters.\n */\n getServiceStatistics(\n options?: GetServiceStatisticsOptionalParams\n ): Promise<GetServiceStatisticsResponse> {\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 aliases: Aliases;\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, 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,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,YAAY,EACZ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C,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;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAClB,OAA4C;QAE5C,OAAO,IAAI,CAAC,oBAAoB,CAC9B,EAAE,OAAO,EAAE,EACX,iCAAiC,CAClC,CAAC;IACJ,CAAC;CAQF;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 * as coreHttpCompat from \"@azure/core-http-compat\";\nimport {\n DataSourcesImpl,\n IndexersImpl,\n SkillsetsImpl,\n SynonymMapsImpl,\n IndexesImpl,\n AliasesImpl\n} from \"./operations\";\nimport {\n DataSources,\n Indexers,\n Skillsets,\n SynonymMaps,\n Indexes,\n Aliases\n} from \"./operationsInterfaces\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport {\n ApiVersion20210430Preview,\n SearchServiceClientOptionalParams,\n GetServiceStatisticsOptionalParams,\n GetServiceStatisticsResponse\n} from \"./models\";\n\n/** @internal */\nexport class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20210430Preview;\n\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: ApiVersion20210430Preview,\n options?: SearchServiceClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\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 this.aliases = new AliasesImpl(this);\n }\n\n /**\n * Gets service level statistics for a search service.\n * @param options The options parameters.\n */\n getServiceStatistics(\n options?: GetServiceStatisticsOptionalParams\n ): Promise<GetServiceStatisticsResponse> {\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 aliases: Aliases;\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"indexModels.js","sourceRoot":"","sources":["../../src/indexModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AA6qBlC,6CAA6C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n QueryType,\n SearchMode,\n FacetResult,\n AutocompleteMode,\n IndexActionType,\n ScoringStatistics,\n QueryLanguage,\n Speller,\n Answers,\n CaptionResult,\n AnswerResult,\n Captions,\n QuerySpellerType,\n QueryAnswerType,\n QueryCaptionType,\n} from \"./generated/data/models\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Options for performing the count operation on the index.\n */\nexport type CountDocumentsOptions = OperationOptions;\n/**\n * Options for retrieving completion text for a partial searchText.\n */\nexport type AutocompleteOptions<Fields> = OperationOptions & AutocompleteRequest<Fields>;\n/**\n * Options for committing a full search request.\n */\nexport type SearchOptions<Fields> = OperationOptions & SearchRequestOptions<Fields>;\n/**\n * Options for retrieving suggestions based on the searchText.\n */\nexport type SuggestOptions<Fields> = OperationOptions & SuggestRequest<Fields>;\n\n/**\n * Options for SearchIndexingBufferedSender.\n */\nexport interface SearchIndexingBufferedSenderOptions {\n /**\n * Indicates if autoFlush is enabled.\n */\n autoFlush?: boolean;\n /**\n * Initial Batch Action Count.\n *\n * A batch request will be sent once the documents\n * reach the initialBatchActionCount.\n */\n initialBatchActionCount?: number;\n /**\n * Flush Window.\n *\n * A batch request will be sent after flushWindowInMs is\n * reached.\n */\n flushWindowInMs?: number;\n /**\n * Maximum number of Retries\n */\n maxRetriesPerAction?: number;\n /**\n * Delay between retries\n */\n throttlingDelayInMs?: number;\n /**\n * Max Delay between retries\n */\n maxThrottlingDelayInMs?: number;\n}\n\n/**\n * Options for SearchIndexingBufferedSenderUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeOrUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderDeleteDocuments.\n */\nexport type SearchIndexingBufferedSenderDeleteDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderFlushDocuments.\n */\nexport type SearchIndexingBufferedSenderFlushDocumentsOptions = OperationOptions;\n\n/**\n * Options for retrieving a single document.\n */\nexport interface GetDocumentOptions<Fields> extends OperationOptions {\n /**\n * List of field names to retrieve for the document; Any field not retrieved will be missing from\n * the returned document.\n */\n selectedFields?: Fields[];\n}\n\n/**\n * Options for the modify index batch operation.\n */\nexport interface IndexDocumentsOptions extends OperationOptions {\n /**\n * If true, will cause this operation to throw if any document operation\n * in the batch did not succeed.\n */\n throwOnAnyFailure?: boolean;\n}\n\n/**\n * Options for the upload documents operation.\n */\nexport type UploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge documents operation.\n */\nexport type MergeDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge or upload documents operation.\n */\nexport type MergeOrUploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the delete documents operation.\n */\nexport type DeleteDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListSearchResultsPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * An iterator for search results of a paticular query. Will make requests\n * as needed during iteration. Use .byPage() to make one request to the server\n * per iteration.\n */\nexport type SearchIterator<Fields> = PagedAsyncIterableIterator<\n SearchResult<Fields>,\n SearchDocumentsPageResult<Fields>,\n ListSearchResultsPageSettings\n>;\n\n// BEGIN manually modified generated interfaces\n//\n// This section is for places where we have to manually fix issues\n// with interfaces from the generated code.\n// Mostly this is to allow modeling additionalProperties:true as generics.\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequest {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string;\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full'\n */\n queryType?: QueryType;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. The default is\n * 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global\n * scoring statistics can increase latency of search queries. Possible values include: 'Local',\n * 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help getting more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The name of a semantic configuration that will be used when processing documents for queries of\n * type semantic.\n */\n semanticConfiguration?: string;\n /**\n * A full-text search query expression; Use \"*\" or omit this parameter to match all documents.\n */\n searchText?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: string;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'Any', 'All'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies the language of the search query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * A value that specified the type of the speller to use to spell-correct individual search\n * query terms.\n */\n speller?: QuerySpellerType;\n /**\n * A value that specifies whether answers should be returned as part of the search response.\n */\n answers?: QueryAnswerType;\n /**\n * The comma-separated list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: string;\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * A value that specifies whether captions should be returned as part of the search response.\n */\n captions?: QueryCaptionType;\n /**\n * The comma-separated list of field names used for semantic search.\n */\n semanticFields?: string;\n}\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequestOptions<Fields> {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'simple', 'full'\n */\n queryType?: QueryType;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: Fields[];\n /**\n * The language of the query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * Improve search recall by spell-correcting individual search query terms.\n */\n speller?: Speller;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns answers\n * extracted from key passages in the highest ranked documents. The number of answers returned can\n * be configured by appending the pipe character '|' followed by the 'count-\\<number of answers\\>' option\n * after the answers parameter value, such as 'extractive|count-3'. Default count is 1.\n */\n answers?: Answers;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'any', 'all'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. Possible\n * values include: 'Local', 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help to get more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: Fields[];\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns captions\n * extracted from key passages in the highest ranked documents. When Captions is set to 'extractive',\n * highlighting is enabled by default, and can be configured by appending the pipe character '|'\n * followed by the 'highlight-true'/'highlight-false' option, such as 'extractive|highlight-true'. Defaults to 'None'.\n */\n captions?: Captions;\n /**\n * The list of field names used for semantic search.\n */\n semanticFields?: string[];\n}\n\n/**\n * Contains a document found by a search query, plus associated metadata.\n */\nexport type SearchResult<T> = {\n /**\n * The relevance score of the document compared to other documents returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly score: number;\n /**\n * The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly rerankerScore?: number;\n /**\n * Text fragments from the document that indicate the matching search terms, organized by each\n * applicable field; null if hit highlighting was not enabled for the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly highlights?: { [k in keyof T]?: string[] };\n /**\n * Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly captions?: CaptionResult[];\n\n document: T;\n};\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResultBase {\n /**\n * The total count of results found by the search operation, or null if the count was not\n * requested. If present, the count may be greater than the number of results in this response.\n * This can happen if you use the $top or $skip parameters, or if Azure Cognitive Search can't\n * return all the requested documents in a single Search response.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly count?: number;\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not specified in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n /**\n * The facet query results for the search operation, organized as a collection of buckets for\n * each faceted field; null if the query did not include any facet expressions.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly facets?: { [propertyName: string]: FacetResult[] };\n /**\n * The answers query results for the search operation; null if the answers query parameter was\n * not specified or set to 'none'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly answers?: AnswerResult[];\n}\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchIterator<T>;\n}\n\n/**\n * Response containing search page results from an index.\n */\nexport interface SearchDocumentsPageResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchResult<T>[];\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.\n */\nexport interface SuggestRequest<Fields> {\n /**\n * An OData expression that filters the documents considered for suggestions.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the suggestion query. Default is false.\n * When set to true, the query will find suggestions even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy suggestion searches are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting of suggestions is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting of suggestions is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * suggestion query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * The comma-separated list of field names to search for the specified search text. Target fields\n * must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The list of fields to retrieve. If unspecified, only the key field will be\n * included in the results.\n */\n select?: Fields[];\n /**\n * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is\n * 5.\n */\n top?: number;\n}\n\n/**\n * A result containing a document found by a suggestion query, plus associated metadata.\n */\nexport type SuggestResult<T> = {\n /**\n * The text of the suggestion result.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly text: string;\n document: T;\n};\n\n/**\n * Response containing suggestion query results from an index.\n */\nexport interface SuggestDocumentsResult<T> {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SuggestResult<T>[];\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not set in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n}\n\n/**\n * Parameters for fuzzy matching, and other autocomplete query behaviors.\n */\nexport interface AutocompleteRequest<Fields> {\n /**\n * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles\n * and 'oneTermWithContext' to use the current context while producing auto-completed terms.\n * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'\n */\n autocompleteMode?: AutocompleteMode;\n /**\n * An OData expression that filters the documents used to produce completed terms for the\n * Autocomplete result.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false.\n * When set to true, the query will autocomplete terms even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy autocomplete queries are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by an\n * autocomplete query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of field names to consider when querying for auto-completed terms.\n * Target fields must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The\n * default is 5.\n */\n top?: number;\n}\n\n/**\n * Represents an index action that operates on a document.\n */\nexport type IndexDocumentsAction<T> = {\n /**\n * The operation to perform on a document in an indexing batch. Possible values include:\n * 'upload', 'merge', 'mergeOrUpload', 'delete'\n */\n __actionType: IndexActionType;\n} & Partial<T>;\n\n// END manually modified generated interfaces\n"]}
1
+ {"version":3,"file":"indexModels.js","sourceRoot":"","sources":["../../src/indexModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AA6qBlC,6CAA6C","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n AnswerResult,\n Answers,\n AutocompleteMode,\n CaptionResult,\n Captions,\n FacetResult,\n IndexActionType,\n QueryAnswerType,\n QueryCaptionType,\n QueryLanguage,\n QuerySpellerType,\n QueryType,\n ScoringStatistics,\n SearchMode,\n Speller,\n} from \"./generated/data/models\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Options for performing the count operation on the index.\n */\nexport type CountDocumentsOptions = OperationOptions;\n/**\n * Options for retrieving completion text for a partial searchText.\n */\nexport type AutocompleteOptions<Fields> = OperationOptions & AutocompleteRequest<Fields>;\n/**\n * Options for committing a full search request.\n */\nexport type SearchOptions<Fields> = OperationOptions & SearchRequestOptions<Fields>;\n/**\n * Options for retrieving suggestions based on the searchText.\n */\nexport type SuggestOptions<Fields> = OperationOptions & SuggestRequest<Fields>;\n\n/**\n * Options for SearchIndexingBufferedSender.\n */\nexport interface SearchIndexingBufferedSenderOptions {\n /**\n * Indicates if autoFlush is enabled.\n */\n autoFlush?: boolean;\n /**\n * Initial Batch Action Count.\n *\n * A batch request will be sent once the documents\n * reach the initialBatchActionCount.\n */\n initialBatchActionCount?: number;\n /**\n * Flush Window.\n *\n * A batch request will be sent after flushWindowInMs is\n * reached.\n */\n flushWindowInMs?: number;\n /**\n * Maximum number of Retries\n */\n maxRetriesPerAction?: number;\n /**\n * Delay between retries\n */\n throttlingDelayInMs?: number;\n /**\n * Max Delay between retries\n */\n maxThrottlingDelayInMs?: number;\n}\n\n/**\n * Options for SearchIndexingBufferedSenderUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderMergeOrUploadDocuments.\n */\nexport type SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderDeleteDocuments.\n */\nexport type SearchIndexingBufferedSenderDeleteDocumentsOptions = OperationOptions;\n/**\n * Options for SearchIndexingBufferedSenderFlushDocuments.\n */\nexport type SearchIndexingBufferedSenderFlushDocumentsOptions = OperationOptions;\n\n/**\n * Options for retrieving a single document.\n */\nexport interface GetDocumentOptions<Fields> extends OperationOptions {\n /**\n * List of field names to retrieve for the document; Any field not retrieved will be missing from\n * the returned document.\n */\n selectedFields?: Fields[];\n}\n\n/**\n * Options for the modify index batch operation.\n */\nexport interface IndexDocumentsOptions extends OperationOptions {\n /**\n * If true, will cause this operation to throw if any document operation\n * in the batch did not succeed.\n */\n throwOnAnyFailure?: boolean;\n}\n\n/**\n * Options for the upload documents operation.\n */\nexport type UploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge documents operation.\n */\nexport type MergeDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the merge or upload documents operation.\n */\nexport type MergeOrUploadDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Options for the delete documents operation.\n */\nexport type DeleteDocumentsOptions = IndexDocumentsOptions;\n\n/**\n * Arguments for retrieving the next page of search results.\n */\nexport interface ListSearchResultsPageSettings {\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * An iterator for search results of a paticular query. Will make requests\n * as needed during iteration. Use .byPage() to make one request to the server\n * per iteration.\n */\nexport type SearchIterator<Fields> = PagedAsyncIterableIterator<\n SearchResult<Fields>,\n SearchDocumentsPageResult<Fields>,\n ListSearchResultsPageSettings\n>;\n\n// BEGIN manually modified generated interfaces\n//\n// This section is for places where we have to manually fix issues\n// with interfaces from the generated code.\n// Mostly this is to allow modeling additionalProperties:true as generics.\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequest {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string;\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'Simple', 'Full'\n */\n queryType?: QueryType;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. The default is\n * 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global\n * scoring statistics can increase latency of search queries. Possible values include: 'Local',\n * 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help getting more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The name of a semantic configuration that will be used when processing documents for queries of\n * type semantic.\n */\n semanticConfiguration?: string;\n /**\n * A full-text search query expression; Use \"*\" or omit this parameter to match all documents.\n */\n searchText?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: string;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'Any', 'All'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies the language of the search query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * A value that specified the type of the speller to use to spell-correct individual search\n * query terms.\n */\n speller?: QuerySpellerType;\n /**\n * A value that specifies whether answers should be returned as part of the search response.\n */\n answers?: QueryAnswerType;\n /**\n * The comma-separated list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: string;\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * A value that specifies whether captions should be returned as part of the search response.\n */\n captions?: QueryCaptionType;\n /**\n * The comma-separated list of field names used for semantic search.\n */\n semanticFields?: string;\n}\n\n/**\n * Parameters for filtering, sorting, faceting, paging, and other search query behaviors.\n */\nexport interface SearchRequestOptions<Fields> {\n /**\n * A value that specifies whether to fetch the total count of results. Default is false. Setting\n * this value to true may have a performance impact. Note that the count returned is an\n * approximation.\n */\n includeTotalCount?: boolean;\n /**\n * The list of facet expressions to apply to the search query. Each facet expression contains a\n * field name, optionally followed by a comma-separated list of name:value pairs.\n */\n facets?: string[];\n /**\n * The OData $filter expression to apply to the search query.\n */\n filter?: string;\n /**\n * The comma-separated list of field names to use for hit highlights. Only searchable fields can\n * be used for hit highlighting.\n */\n highlightFields?: string;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is\n * &lt;/em&gt;.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default\n * is &lt;em&gt;.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * search query in order for the query to be reported as a success. This parameter can be useful\n * for ensuring search availability even for services with only one replica. The default is 100.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if\n * your query uses the Lucene query syntax. Possible values include: 'simple', 'full'\n */\n queryType?: QueryType;\n /**\n * The list of parameter values to be used in scoring functions (for example,\n * referencePointParameter) using the format name-values. For example, if the scoring profile\n * defines a function with a parameter called 'mylocation' the parameter string would be\n * \"mylocation--122.2,44.8\" (without the quotes).\n */\n scoringParameters?: string[];\n /**\n * The name of a scoring profile to evaluate match scores for matching documents in order to sort\n * the results.\n */\n scoringProfile?: string;\n /**\n * The comma-separated list of field names to which to scope the full-text search. When using\n * fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each\n * fielded search expression take precedence over any field names listed in this parameter.\n */\n searchFields?: Fields[];\n /**\n * The language of the query.\n */\n queryLanguage?: QueryLanguage;\n /**\n * Improve search recall by spell-correcting individual search query terms.\n */\n speller?: Speller;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns answers\n * extracted from key passages in the highest ranked documents. The number of answers returned can\n * be configured by appending the pipe character '|' followed by the 'count-\\<number of answers\\>' option\n * after the answers parameter value, such as 'extractive|count-3'. Default count is 1.\n */\n answers?: Answers;\n /**\n * A value that specifies whether any or all of the search terms must be matched in order to\n * count the document as a match. Possible values include: 'any', 'all'\n */\n searchMode?: SearchMode;\n /**\n * A value that specifies whether we want to calculate scoring statistics (such as document\n * frequency) globally for more consistent scoring, or locally, for lower latency. Possible\n * values include: 'Local', 'Global'\n */\n scoringStatistics?: ScoringStatistics;\n /**\n * A value to be used to create a sticky session, which can help to get more consistent results.\n * As long as the same sessionId is used, a best-effort attempt will be made to target the same\n * replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the\n * load balancing of the requests across replicas and adversely affect the performance of the\n * search service. The value used as sessionId cannot start with a '_' character.\n */\n sessionId?: string;\n /**\n * The list of fields to retrieve. If unspecified, all fields marked as\n * retrievable in the schema are included.\n */\n select?: Fields[];\n /**\n * The number of search results to skip. This value cannot be greater than 100,000. If you need\n * to scan documents in sequence, but cannot use skip due to this limitation, consider using\n * orderby on a totally-ordered key and filter with a range query instead.\n */\n skip?: number;\n /**\n * The number of search results to retrieve. This can be used in conjunction with $skip to\n * implement client-side paging of search results. If results are truncated due to server-side\n * paging, the response will include a continuation token that can be used to issue another\n * Search request for the next page of results.\n */\n top?: number;\n /**\n * This parameter is only valid if the query type is 'semantic'. If set, the query returns captions\n * extracted from key passages in the highest ranked documents. When Captions is set to 'extractive',\n * highlighting is enabled by default, and can be configured by appending the pipe character '|'\n * followed by the 'highlight-true'/'highlight-false' option, such as 'extractive|highlight-true'. Defaults to 'None'.\n */\n captions?: Captions;\n /**\n * The list of field names used for semantic search.\n */\n semanticFields?: string[];\n}\n\n/**\n * Contains a document found by a search query, plus associated metadata.\n */\nexport type SearchResult<T> = {\n /**\n * The relevance score of the document compared to other documents returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly score: number;\n /**\n * The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly rerankerScore?: number;\n /**\n * Text fragments from the document that indicate the matching search terms, organized by each\n * applicable field; null if hit highlighting was not enabled for the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly highlights?: { [k in keyof T]?: string[] };\n /**\n * Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly captions?: CaptionResult[];\n\n document: T;\n};\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResultBase {\n /**\n * The total count of results found by the search operation, or null if the count was not\n * requested. If present, the count may be greater than the number of results in this response.\n * This can happen if you use the $top or $skip parameters, or if Azure Cognitive Search can't\n * return all the requested documents in a single Search response.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly count?: number;\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not specified in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n /**\n * The facet query results for the search operation, organized as a collection of buckets for\n * each faceted field; null if the query did not include any facet expressions.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly facets?: { [propertyName: string]: FacetResult[] };\n /**\n * The answers query results for the search operation; null if the answers query parameter was\n * not specified or set to 'none'.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly answers?: AnswerResult[];\n}\n\n/**\n * Response containing search results from an index.\n */\nexport interface SearchDocumentsResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchIterator<T>;\n}\n\n/**\n * Response containing search page results from an index.\n */\nexport interface SearchDocumentsPageResult<T> extends SearchDocumentsResultBase {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SearchResult<T>[];\n /**\n * A token used for retrieving the next page of results when the server\n * enforces pagination.\n */\n continuationToken?: string;\n}\n\n/**\n * Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.\n */\nexport interface SuggestRequest<Fields> {\n /**\n * An OData expression that filters the documents considered for suggestions.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the suggestion query. Default is false.\n * When set to true, the query will find suggestions even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy suggestion searches are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting of suggestions is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting of suggestions is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by a\n * suggestion query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The list of OData $orderby expressions by which to sort the results. Each\n * expression can be either a field name or a call to either the geo.distance() or the\n * search.score() functions. Each expression can be followed by asc to indicate ascending, or\n * desc to indicate descending. The default is ascending order. Ties will be broken by the match\n * scores of documents. If no $orderby is specified, the default sort order is descending by\n * document match score. There can be at most 32 $orderby clauses.\n */\n orderBy?: string[];\n /**\n * The comma-separated list of field names to search for the specified search text. Target fields\n * must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The list of fields to retrieve. If unspecified, only the key field will be\n * included in the results.\n */\n select?: Fields[];\n /**\n * The number of suggestions to retrieve. This must be a value between 1 and 100. The default is\n * 5.\n */\n top?: number;\n}\n\n/**\n * A result containing a document found by a suggestion query, plus associated metadata.\n */\nexport type SuggestResult<T> = {\n /**\n * The text of the suggestion result.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly text: string;\n document: T;\n};\n\n/**\n * Response containing suggestion query results from an index.\n */\nexport interface SuggestDocumentsResult<T> {\n /**\n * The sequence of results returned by the query.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly results: SuggestResult<T>[];\n /**\n * A value indicating the percentage of the index that was included in the query, or null if\n * minimumCoverage was not set in the request.\n * **NOTE: This property will not be serialized. It can only be populated by the server.**\n */\n readonly coverage?: number;\n}\n\n/**\n * Parameters for fuzzy matching, and other autocomplete query behaviors.\n */\nexport interface AutocompleteRequest<Fields> {\n /**\n * Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles\n * and 'oneTermWithContext' to use the current context while producing auto-completed terms.\n * Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'\n */\n autocompleteMode?: AutocompleteMode;\n /**\n * An OData expression that filters the documents used to produce completed terms for the\n * Autocomplete result.\n */\n filter?: string;\n /**\n * A value indicating whether to use fuzzy matching for the autocomplete query. Default is false.\n * When set to true, the query will autocomplete terms even if there's a substituted or missing\n * character in the search text. While this provides a better experience in some scenarios, it\n * comes at a performance cost as fuzzy autocomplete queries are slower and consume more\n * resources.\n */\n useFuzzyMatching?: boolean;\n /**\n * A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted,\n * hit highlighting is disabled.\n */\n highlightPostTag?: string;\n /**\n * A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If\n * omitted, hit highlighting is disabled.\n */\n highlightPreTag?: string;\n /**\n * A number between 0 and 100 indicating the percentage of the index that must be covered by an\n * autocomplete query in order for the query to be reported as a success. This parameter can be\n * useful for ensuring search availability even for services with only one replica. The default\n * is 80.\n */\n minimumCoverage?: number;\n /**\n * The comma-separated list of field names to consider when querying for auto-completed terms.\n * Target fields must be included in the specified suggester.\n */\n searchFields?: Fields[];\n /**\n * The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The\n * default is 5.\n */\n top?: number;\n}\n\n/**\n * Represents an index action that operates on a document.\n */\nexport type IndexDocumentsAction<T> = {\n /**\n * The operation to perform on a document in an indexing batch. Possible values include:\n * 'upload', 'merge', 'mergeOrUpload', 'delete'\n */\n __actionType: IndexActionType;\n} & Partial<T>;\n\n// END manually modified generated interfaces\n"]}
@@ -1 +1 @@
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 SendRequest,\n PipelineResponse,\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
+ {"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 +1 @@
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 SendRequest,\n PipelineResponse,\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
+ {"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"]}
@@ -11,7 +11,7 @@ import { createSpan } from "./tracing";
11
11
  import { deserialize, serialize } from "./serialization";
12
12
  import { createOdataMetadataPolicy } from "./odataMetadataPolicy";
13
13
  import { IndexDocumentsBatch } from "./indexDocumentsBatch";
14
- import { encode, decode } from "./base64";
14
+ import { decode, encode } from "./base64";
15
15
  import * as utils from "./serviceUtils";
16
16
  import { KnownSearchAudience } from "./searchAudience";
17
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"searchClient.js","sourceRoot":"","sources":["../../src/searchClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAKlC,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,+BA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;IAEO,aAAa,CAAS,MAAiB;QAC7C,IAAI,MAAM,EAAE;YACV,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,mBAAmB,CAAS,YAAuB;QACzD,IAAI,YAAY,EAAE;YAChB,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/B;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,qBAAqB,CAAC,cAAyB;QACrD,IAAI,cAAc,EAAE;YAClB,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACjC;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;IAEO,cAAc,CAAC,OAAkB;QACvC,IAAI,OAAO,EAAE;YACX,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC1B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport { InternalClientPipelineOptions, OperationOptions } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SearchClient as GeneratedClient } from \"./generated/data/searchClient\";\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport { SDK_VERSION } from \"./constants\";\nimport { logger } from \"./logger\";\nimport {\n AutocompleteResult,\n AutocompleteRequest,\n SuggestRequest,\n IndexDocumentsResult,\n} from \"./generated/data/models\";\nimport { createSpan } from \"./tracing\";\nimport { deserialize, serialize } from \"./serialization\";\nimport {\n CountDocumentsOptions,\n AutocompleteOptions,\n SearchOptions,\n SearchDocumentsResult,\n SearchIterator,\n ListSearchResultsPageSettings,\n SearchResult,\n SuggestOptions,\n SuggestDocumentsResult,\n GetDocumentOptions,\n IndexDocumentsOptions,\n UploadDocumentsOptions,\n MergeDocumentsOptions,\n DeleteDocumentsOptions,\n SearchDocumentsPageResult,\n MergeOrUploadDocumentsOptions,\n SearchRequest,\n} from \"./indexModels\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\nimport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nimport { encode, decode } from \"./base64\";\nimport * as utils from \"./serviceUtils\";\nimport { IndexDocumentsClient } from \"./searchIndexingBufferedSender\";\nimport { ExtendedCommonClientOptions } from \"@azure/core-http-compat\";\nimport { KnownSearchAudience } from \"./searchAudience\";\n\n/**\n * Client options used to configure Cognitive Search API requests.\n */\nexport interface SearchClientOptions extends ExtendedCommonClientOptions {\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n apiVersion?: string;\n\n /**\n * The service version to use when communicating with the service.\n */\n serviceVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD). The\n * audience is not considered when using a shared key.\n * {@link KnownSearchAudience} can be used interchangeably with audience\n */\n audience?: string;\n}\n\n/**\n * Class used to perform operations against a search index,\n * including querying documents in the index as well as\n * adding, updating, and removing them.\n */\nexport class SearchClient<T> implements IndexDocumentsClient<T> {\n /// Maintenance note: when updating supported API versions,\n /// the ContinuationToken logic will need to be updated below.\n\n /**\n * The service version to use when communicating with the service.\n */\n public readonly serviceVersion: string = utils.defaultServiceVersion;\n\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n public readonly apiVersion: string = utils.defaultServiceVersion;\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * The name of the index\n */\n public readonly indexName: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated SearchClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * Creates an instance of SearchClient.\n *\n * Example usage:\n * ```ts\n * const { SearchClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchClient(\n * \"<endpoint>\",\n * \"<indexName>\",\n * new AzureKeyCredential(\"<Admin Key>\");\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param indexName - The name of the index\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n */\n constructor(\n endpoint: string,\n indexName: string,\n credential: KeyCredential | TokenCredential,\n options: SearchClientOptions = {}\n ) {\n this.endpoint = endpoint;\n this.indexName = indexName;\n\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n if (!options.userAgentOptions) {\n options.userAgentOptions = {};\n }\n if (options.userAgentOptions.userAgentPrefix) {\n options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;\n } else {\n options.userAgentOptions.userAgentPrefix = libInfo;\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\",\n ],\n },\n },\n };\n\n if (options.apiVersion) {\n if (!utils.serviceVersions.includes(options.apiVersion)) {\n throw new Error(`Invalid Api Version: ${options.apiVersion}`);\n }\n this.serviceVersion = options.apiVersion;\n this.apiVersion = options.apiVersion;\n }\n\n if (options.serviceVersion) {\n if (!utils.serviceVersions.includes(options.serviceVersion)) {\n throw new Error(`Invalid Service Version: ${options.serviceVersion}`);\n }\n this.serviceVersion = options.serviceVersion;\n this.apiVersion = options.serviceVersion;\n }\n\n this.client = new GeneratedClient(\n this.endpoint,\n this.indexName,\n this.serviceVersion,\n internalClientPipelineOptions\n );\n\n if (isTokenCredential(credential)) {\n const scope: string = options.audience\n ? `${options.audience}/.default`\n : `${KnownSearchAudience.AzurePublicCloud}/.default`;\n\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: scope })\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"none\"));\n }\n\n /**\n * Retrieves the number of documents in the index.\n * @param options - Options to the count operation.\n */\n public async getDocumentsCount(options: CountDocumentsOptions = {}): Promise<number> {\n const { span, updatedOptions } = createSpan(\"SearchClient-getDocumentsCount\", options);\n try {\n let documentsCount: number = 0;\n await this.client.documents.count({\n ...updatedOptions,\n onResponse: (response) => {\n documentsCount = Number(response.bodyAsText);\n },\n });\n\n return documentsCount;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Based on a partial searchText from the user, return a list\n * of potential completion strings based on a specified suggester.\n * @param searchText - The search text on which to base autocomplete results.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.\n * @param options - Options to the autocomplete operation.\n */\n public async autocomplete<Fields extends keyof T>(\n searchText: string,\n suggesterName: string,\n options: AutocompleteOptions<Fields> = {}\n ): Promise<AutocompleteResult> {\n const { operationOptions, restOptions } = this.extractOperationOptions({ ...options });\n const { searchFields, ...nonFieldOptions } = restOptions;\n const fullOptions: AutocompleteRequest = {\n searchText: searchText,\n suggesterName: suggesterName,\n searchFields: this.convertSearchFields<Fields>(searchFields),\n ...nonFieldOptions,\n };\n\n if (!fullOptions.searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!fullOptions.suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n const { span, updatedOptions } = createSpan(\"SearchClient-autocomplete\", operationOptions);\n\n try {\n const result = await this.client.documents.autocompletePost(fullOptions, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async searchDocuments<Fields extends keyof T>(\n searchText?: string,\n options: SearchOptions<Fields> = {},\n nextPageParameters: SearchRequest = {}\n ): Promise<SearchDocumentsPageResult<Pick<T, Fields>>> {\n const { operationOptions, restOptions } = this.extractOperationOptions({ ...options });\n const { select, searchFields, orderBy, semanticFields, ...nonFieldOptions } = restOptions;\n const fullOptions: SearchRequest = {\n searchFields: this.convertSearchFields<Fields>(searchFields),\n semanticFields: this.convertSemanticFields(semanticFields),\n select: this.convertSelect<Fields>(select),\n orderBy: this.convertOrderBy(orderBy),\n ...nonFieldOptions,\n ...nextPageParameters,\n };\n\n const { span, updatedOptions } = createSpan(\"SearchClient-searchDocuments\", operationOptions);\n\n try {\n const result = await this.client.documents.searchPost(\n {\n ...fullOptions,\n includeTotalResultCount: fullOptions.includeTotalCount,\n searchText: searchText,\n },\n updatedOptions\n );\n\n const { results, count, coverage, facets, answers, nextLink } = result;\n\n const modifiedResults = utils.generatedSearchResultToPublicSearchResult<T>(results);\n\n const converted: SearchDocumentsPageResult<T> = {\n results: modifiedResults,\n count,\n coverage,\n facets,\n answers,\n continuationToken: this.encodeContinuationToken(nextLink, result.nextPageParameters),\n };\n\n return deserialize<SearchDocumentsPageResult<Pick<T, Fields>>>(converted);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listSearchResultsPage<Fields extends keyof T>(\n searchText?: string,\n options: SearchOptions<Fields> = {},\n settings: ListSearchResultsPageSettings = {}\n ): AsyncIterableIterator<SearchDocumentsPageResult<Pick<T, Fields>>> {\n let decodedContinuation = this.decodeContinuationToken(settings.continuationToken);\n let result = await this.searchDocuments<Fields>(\n searchText,\n options,\n decodedContinuation?.nextPageParameters\n );\n\n yield result;\n\n // Technically, we should also leverage nextLink, but the generated code\n // doesn't support this yet.\n while (result.continuationToken) {\n decodedContinuation = this.decodeContinuationToken(result.continuationToken);\n result = await this.searchDocuments(\n searchText,\n options,\n decodedContinuation?.nextPageParameters\n );\n yield result;\n }\n }\n\n private async *listSearchResultsAll<Fields extends keyof T>(\n firstPage: SearchDocumentsPageResult<Pick<T, Fields>>,\n searchText?: string,\n options: SearchOptions<Fields> = {}\n ): AsyncIterableIterator<SearchResult<Pick<T, Fields>>> {\n yield* firstPage.results;\n if (firstPage.continuationToken) {\n for await (const page of this.listSearchResultsPage(searchText, options, {\n continuationToken: firstPage.continuationToken,\n })) {\n yield* page.results;\n }\n }\n }\n\n private listSearchResults<Fields extends keyof T>(\n firstPage: SearchDocumentsPageResult<Pick<T, Fields>>,\n searchText?: string,\n options: SearchOptions<Fields> = {}\n ): SearchIterator<Pick<T, Fields>> {\n const iter = this.listSearchResultsAll(firstPage, searchText, options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: ListSearchResultsPageSettings = {}) => {\n return this.listSearchResultsPage(searchText, options, settings);\n },\n };\n }\n\n /**\n * Performs a search on the current index given\n * the specified arguments.\n * @param searchText - Text to search\n * @param options - Options for the search operation.\n */\n public async search<Fields extends keyof T>(\n searchText?: string,\n options: SearchOptions<Fields> = {}\n ): Promise<SearchDocumentsResult<Pick<T, Fields>>> {\n const { span, updatedOptions } = createSpan(\"SearchClient-search\", options);\n\n try {\n const pageResult = await this.searchDocuments(searchText, updatedOptions);\n\n const { count, coverage, facets, answers } = pageResult;\n\n return {\n count,\n coverage,\n facets,\n answers,\n results: this.listSearchResults(pageResult, searchText, updatedOptions),\n };\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns a short list of suggestions based on the searchText\n * and specified suggester.\n * @param searchText - The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.\n * @param options - Options for the suggest operation\n */\n public async suggest<Fields extends keyof T = never>(\n searchText: string,\n suggesterName: string,\n options: SuggestOptions<Fields> = {}\n ): Promise<SuggestDocumentsResult<Pick<T, Fields>>> {\n const { operationOptions, restOptions } = this.extractOperationOptions({ ...options });\n const { select, searchFields, orderBy, ...nonFieldOptions } = restOptions;\n const fullOptions: SuggestRequest = {\n searchText: searchText,\n suggesterName: suggesterName,\n searchFields: this.convertSearchFields<Fields>(searchFields),\n select: this.convertSelect<Fields>(select),\n orderBy: this.convertOrderBy(orderBy),\n ...nonFieldOptions,\n };\n\n if (!fullOptions.searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!fullOptions.suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n const { span, updatedOptions } = createSpan(\"SearchClient-suggest\", operationOptions);\n\n try {\n const result = await this.client.documents.suggestPost(fullOptions, updatedOptions);\n\n const modifiedResult =\n utils.generatedSuggestDocumentsResultToPublicSuggestDocumentsResult<T>(result);\n\n return deserialize<SuggestDocumentsResult<Pick<T, Fields>>>(modifiedResult);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieve a particular document from the index by key.\n * @param key - The primary key value of the document\n * @param options - Additional options\n */\n public async getDocument<Fields extends Extract<keyof T, string>>(\n key: string,\n options: GetDocumentOptions<Fields> = {}\n ): Promise<T> {\n const { span, updatedOptions } = createSpan(\"SearchClient-getDocument\", options);\n try {\n const result = await this.client.documents.get(key, updatedOptions);\n return deserialize<T>(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Perform a set of index modifications (upload, merge, mergeOrUpload, delete)\n * for the given set of documents.\n * This operation may partially succeed and not all document operations will\n * be reflected in the index. If you would like to treat this as an exception,\n * set the `throwOnAnyFailure` option to true.\n * For more details about how merging works, see: https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param batch - An array of actions to perform on the index.\n * @param options - Additional options.\n */\n public async indexDocuments(\n // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\n batch: IndexDocumentsBatch<T>,\n options: IndexDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-indexDocuments\", options);\n try {\n let status: number = 0;\n const result = await this.client.documents.index(\n { actions: serialize(batch.actions) },\n {\n ...updatedOptions,\n onResponse: (response) => {\n status = response.status;\n },\n }\n );\n if (options.throwOnAnyFailure && status === 207) {\n throw result;\n }\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n * @param options - Additional options.\n */\n public async uploadDocuments(\n documents: T[],\n options: UploadDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-uploadDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n batch.upload(documents);\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\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 * @param options - Additional options.\n */\n public async mergeDocuments(\n documents: T[],\n options: MergeDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-mergeDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n batch.merge(documents);\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Update a set of documents in the index or upload 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 updated documents.\n * @param options - Additional options.\n */\n public async mergeOrUploadDocuments(\n documents: T[],\n options: MergeOrUploadDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-mergeDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n batch.mergeOrUpload(documents);\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n documents: T[],\n options?: DeleteDocumentsOptions\n ): Promise<IndexDocumentsResult>;\n\n /**\n * Delete a set of documents.\n * @param keyName - The name of their primary key in the index.\n * @param keyValues - The primary key values of documents to delete.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n keyName: keyof T,\n keyValues: string[],\n options?: DeleteDocumentsOptions\n ): Promise<IndexDocumentsResult>;\n\n public async deleteDocuments(\n keyNameOrDocuments: keyof T | T[],\n keyValuesOrOptions?: string[] | DeleteDocumentsOptions,\n options: DeleteDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-deleteDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n if (typeof keyNameOrDocuments === \"string\") {\n batch.delete(keyNameOrDocuments, keyValuesOrOptions as string[]);\n } else {\n batch.delete(keyNameOrDocuments as T[]);\n }\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private encodeContinuationToken(\n nextLink: string | undefined,\n nextPageParameters: SearchRequest | undefined\n ): string | undefined {\n if (!nextLink || !nextPageParameters) {\n return undefined;\n }\n const payload = JSON.stringify({\n apiVersion: this.apiVersion,\n nextLink,\n nextPageParameters,\n });\n return encode(payload);\n }\n\n private decodeContinuationToken(\n token?: string\n ): { nextPageParameters: SearchRequest; nextLink: string } | undefined {\n if (!token) {\n return undefined;\n }\n\n const decodedToken = decode(token);\n\n try {\n const result: {\n apiVersion: string;\n nextLink: string;\n nextPageParameters: SearchRequest;\n } = JSON.parse(decodedToken);\n\n if (result.apiVersion !== this.apiVersion) {\n throw new RangeError(`Continuation token uses unsupported apiVersion \"${this.apiVersion}\"`);\n }\n\n return {\n nextLink: result.nextLink,\n nextPageParameters: result.nextPageParameters,\n };\n } catch (e: any) {\n throw new Error(`Corrupted or invalid continuation token: ${decodedToken}`);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n private extractOperationOptions<T extends OperationOptions>(\n obj: T\n ): {\n operationOptions: OperationOptions;\n restOptions: any;\n } {\n const { abortSignal, requestOptions, tracingOptions, ...restOptions } = obj;\n\n return {\n operationOptions: {\n abortSignal,\n requestOptions,\n tracingOptions,\n },\n restOptions,\n };\n }\n\n private convertSelect<Fields>(select?: Fields[]): string | undefined {\n if (select) {\n return select.join(\",\");\n }\n return select;\n }\n\n private convertSearchFields<Fields>(searchFields?: Fields[]): string | undefined {\n if (searchFields) {\n return searchFields.join(\",\");\n }\n return searchFields;\n }\n\n private convertSemanticFields(semanticFields?: string[]): string | undefined {\n if (semanticFields) {\n return semanticFields.join(\",\");\n }\n return semanticFields;\n }\n\n private convertOrderBy(orderBy?: string[]): string | undefined {\n if (orderBy) {\n return orderBy.join(\",\");\n }\n return orderBy;\n }\n}\n"]}
1
+ {"version":3,"file":"searchClient.js","sourceRoot":"","sources":["../../src/searchClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAKlC,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAOlC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CA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D,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,qBAAqB,CAAC,cAAyB;QACrD,IAAI,cAAc,EAAE;YAClB,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACjC;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;IAEO,cAAc,CAAC,OAAkB;QACvC,IAAI,OAAO,EAAE;YACX,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC1B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport { InternalClientPipelineOptions, OperationOptions } from \"@azure/core-client\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SearchClient as GeneratedClient } from \"./generated/data/searchClient\";\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { createSearchApiKeyCredentialPolicy } from \"./searchApiKeyCredentialPolicy\";\nimport { SDK_VERSION } from \"./constants\";\nimport { logger } from \"./logger\";\nimport {\n AutocompleteRequest,\n AutocompleteResult,\n IndexDocumentsResult,\n SuggestRequest,\n} from \"./generated/data/models\";\nimport { createSpan } from \"./tracing\";\nimport { deserialize, serialize } from \"./serialization\";\nimport {\n AutocompleteOptions,\n CountDocumentsOptions,\n DeleteDocumentsOptions,\n GetDocumentOptions,\n IndexDocumentsOptions,\n ListSearchResultsPageSettings,\n MergeDocumentsOptions,\n MergeOrUploadDocumentsOptions,\n SearchDocumentsPageResult,\n SearchDocumentsResult,\n SearchIterator,\n SearchOptions,\n SearchRequest,\n SearchResult,\n SuggestDocumentsResult,\n SuggestOptions,\n UploadDocumentsOptions,\n} from \"./indexModels\";\nimport { createOdataMetadataPolicy } from \"./odataMetadataPolicy\";\nimport { IndexDocumentsBatch } from \"./indexDocumentsBatch\";\nimport { decode, encode } from \"./base64\";\nimport * as utils from \"./serviceUtils\";\nimport { IndexDocumentsClient } from \"./searchIndexingBufferedSender\";\nimport { ExtendedCommonClientOptions } from \"@azure/core-http-compat\";\nimport { KnownSearchAudience } from \"./searchAudience\";\n\n/**\n * Client options used to configure Cognitive Search API requests.\n */\nexport interface SearchClientOptions extends ExtendedCommonClientOptions {\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n apiVersion?: string;\n\n /**\n * The service version to use when communicating with the service.\n */\n serviceVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD). The\n * audience is not considered when using a shared key.\n * {@link KnownSearchAudience} can be used interchangeably with audience\n */\n audience?: string;\n}\n\n/**\n * Class used to perform operations against a search index,\n * including querying documents in the index as well as\n * adding, updating, and removing them.\n */\nexport class SearchClient<T> implements IndexDocumentsClient<T> {\n /// Maintenance note: when updating supported API versions,\n /// the ContinuationToken logic will need to be updated below.\n\n /**\n * The service version to use when communicating with the service.\n */\n public readonly serviceVersion: string = utils.defaultServiceVersion;\n\n /**\n * The API version to use when communicating with the service.\n * @deprecated use {@Link serviceVersion} instead\n */\n public readonly apiVersion: string = utils.defaultServiceVersion;\n\n /**\n * The endpoint of the search service\n */\n public readonly endpoint: string;\n\n /**\n * The name of the index\n */\n public readonly indexName: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated SearchClient\n */\n private readonly client: GeneratedClient;\n\n /**\n * Creates an instance of SearchClient.\n *\n * Example usage:\n * ```ts\n * const { SearchClient, AzureKeyCredential } = require(\"@azure/search-documents\");\n *\n * const client = new SearchClient(\n * \"<endpoint>\",\n * \"<indexName>\",\n * new AzureKeyCredential(\"<Admin Key>\");\n * );\n * ```\n * @param endpoint - The endpoint of the search service\n * @param indexName - The name of the index\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Search client.\n */\n constructor(\n endpoint: string,\n indexName: string,\n credential: KeyCredential | TokenCredential,\n options: SearchClientOptions = {}\n ) {\n this.endpoint = endpoint;\n this.indexName = indexName;\n\n const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;\n if (!options.userAgentOptions) {\n options.userAgentOptions = {};\n }\n if (options.userAgentOptions.userAgentPrefix) {\n options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;\n } else {\n options.userAgentOptions.userAgentPrefix = libInfo;\n }\n\n const internalClientPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"elapsed-time\",\n \"Location\",\n \"OData-MaxVersion\",\n \"OData-Version\",\n \"Prefer\",\n \"throttle-reason\",\n ],\n },\n },\n };\n\n if (options.apiVersion) {\n if (!utils.serviceVersions.includes(options.apiVersion)) {\n throw new Error(`Invalid Api Version: ${options.apiVersion}`);\n }\n this.serviceVersion = options.apiVersion;\n this.apiVersion = options.apiVersion;\n }\n\n if (options.serviceVersion) {\n if (!utils.serviceVersions.includes(options.serviceVersion)) {\n throw new Error(`Invalid Service Version: ${options.serviceVersion}`);\n }\n this.serviceVersion = options.serviceVersion;\n this.apiVersion = options.serviceVersion;\n }\n\n this.client = new GeneratedClient(\n this.endpoint,\n this.indexName,\n this.serviceVersion,\n internalClientPipelineOptions\n );\n\n if (isTokenCredential(credential)) {\n const scope: string = options.audience\n ? `${options.audience}/.default`\n : `${KnownSearchAudience.AzurePublicCloud}/.default`;\n\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({ credential, scopes: scope })\n );\n } else {\n this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));\n }\n\n this.client.pipeline.addPolicy(createOdataMetadataPolicy(\"none\"));\n }\n\n /**\n * Retrieves the number of documents in the index.\n * @param options - Options to the count operation.\n */\n public async getDocumentsCount(options: CountDocumentsOptions = {}): Promise<number> {\n const { span, updatedOptions } = createSpan(\"SearchClient-getDocumentsCount\", options);\n try {\n let documentsCount: number = 0;\n await this.client.documents.count({\n ...updatedOptions,\n onResponse: (response) => {\n documentsCount = Number(response.bodyAsText);\n },\n });\n\n return documentsCount;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Based on a partial searchText from the user, return a list\n * of potential completion strings based on a specified suggester.\n * @param searchText - The search text on which to base autocomplete results.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.\n * @param options - Options to the autocomplete operation.\n */\n public async autocomplete<Fields extends keyof T>(\n searchText: string,\n suggesterName: string,\n options: AutocompleteOptions<Fields> = {}\n ): Promise<AutocompleteResult> {\n const { operationOptions, restOptions } = this.extractOperationOptions({ ...options });\n const { searchFields, ...nonFieldOptions } = restOptions;\n const fullOptions: AutocompleteRequest = {\n searchText: searchText,\n suggesterName: suggesterName,\n searchFields: this.convertSearchFields<Fields>(searchFields),\n ...nonFieldOptions,\n };\n\n if (!fullOptions.searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!fullOptions.suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n const { span, updatedOptions } = createSpan(\"SearchClient-autocomplete\", operationOptions);\n\n try {\n const result = await this.client.documents.autocompletePost(fullOptions, updatedOptions);\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async searchDocuments<Fields extends keyof T>(\n searchText?: string,\n options: SearchOptions<Fields> = {},\n nextPageParameters: SearchRequest = {}\n ): Promise<SearchDocumentsPageResult<Pick<T, Fields>>> {\n const { operationOptions, restOptions } = this.extractOperationOptions({ ...options });\n const { select, searchFields, orderBy, semanticFields, ...nonFieldOptions } = restOptions;\n const fullOptions: SearchRequest = {\n searchFields: this.convertSearchFields<Fields>(searchFields),\n semanticFields: this.convertSemanticFields(semanticFields),\n select: this.convertSelect<Fields>(select),\n orderBy: this.convertOrderBy(orderBy),\n ...nonFieldOptions,\n ...nextPageParameters,\n };\n\n const { span, updatedOptions } = createSpan(\"SearchClient-searchDocuments\", operationOptions);\n\n try {\n const result = await this.client.documents.searchPost(\n {\n ...fullOptions,\n includeTotalResultCount: fullOptions.includeTotalCount,\n searchText: searchText,\n },\n updatedOptions\n );\n\n const { results, count, coverage, facets, answers, nextLink } = result;\n\n const modifiedResults = utils.generatedSearchResultToPublicSearchResult<T>(results);\n\n const converted: SearchDocumentsPageResult<T> = {\n results: modifiedResults,\n count,\n coverage,\n facets,\n answers,\n continuationToken: this.encodeContinuationToken(nextLink, result.nextPageParameters),\n };\n\n return deserialize<SearchDocumentsPageResult<Pick<T, Fields>>>(converted);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private async *listSearchResultsPage<Fields extends keyof T>(\n searchText?: string,\n options: SearchOptions<Fields> = {},\n settings: ListSearchResultsPageSettings = {}\n ): AsyncIterableIterator<SearchDocumentsPageResult<Pick<T, Fields>>> {\n let decodedContinuation = this.decodeContinuationToken(settings.continuationToken);\n let result = await this.searchDocuments<Fields>(\n searchText,\n options,\n decodedContinuation?.nextPageParameters\n );\n\n yield result;\n\n // Technically, we should also leverage nextLink, but the generated code\n // doesn't support this yet.\n while (result.continuationToken) {\n decodedContinuation = this.decodeContinuationToken(result.continuationToken);\n result = await this.searchDocuments(\n searchText,\n options,\n decodedContinuation?.nextPageParameters\n );\n yield result;\n }\n }\n\n private async *listSearchResultsAll<Fields extends keyof T>(\n firstPage: SearchDocumentsPageResult<Pick<T, Fields>>,\n searchText?: string,\n options: SearchOptions<Fields> = {}\n ): AsyncIterableIterator<SearchResult<Pick<T, Fields>>> {\n yield* firstPage.results;\n if (firstPage.continuationToken) {\n for await (const page of this.listSearchResultsPage(searchText, options, {\n continuationToken: firstPage.continuationToken,\n })) {\n yield* page.results;\n }\n }\n }\n\n private listSearchResults<Fields extends keyof T>(\n firstPage: SearchDocumentsPageResult<Pick<T, Fields>>,\n searchText?: string,\n options: SearchOptions<Fields> = {}\n ): SearchIterator<Pick<T, Fields>> {\n const iter = this.listSearchResultsAll(firstPage, searchText, options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: ListSearchResultsPageSettings = {}) => {\n return this.listSearchResultsPage(searchText, options, settings);\n },\n };\n }\n\n /**\n * Performs a search on the current index given\n * the specified arguments.\n * @param searchText - Text to search\n * @param options - Options for the search operation.\n */\n public async search<Fields extends keyof T>(\n searchText?: string,\n options: SearchOptions<Fields> = {}\n ): Promise<SearchDocumentsResult<Pick<T, Fields>>> {\n const { span, updatedOptions } = createSpan(\"SearchClient-search\", options);\n\n try {\n const pageResult = await this.searchDocuments(searchText, updatedOptions);\n\n const { count, coverage, facets, answers } = pageResult;\n\n return {\n count,\n coverage,\n facets,\n answers,\n results: this.listSearchResults(pageResult, searchText, updatedOptions),\n };\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns a short list of suggestions based on the searchText\n * and specified suggester.\n * @param searchText - The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters.\n * @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.\n * @param options - Options for the suggest operation\n */\n public async suggest<Fields extends keyof T = never>(\n searchText: string,\n suggesterName: string,\n options: SuggestOptions<Fields> = {}\n ): Promise<SuggestDocumentsResult<Pick<T, Fields>>> {\n const { operationOptions, restOptions } = this.extractOperationOptions({ ...options });\n const { select, searchFields, orderBy, ...nonFieldOptions } = restOptions;\n const fullOptions: SuggestRequest = {\n searchText: searchText,\n suggesterName: suggesterName,\n searchFields: this.convertSearchFields<Fields>(searchFields),\n select: this.convertSelect<Fields>(select),\n orderBy: this.convertOrderBy(orderBy),\n ...nonFieldOptions,\n };\n\n if (!fullOptions.searchText) {\n throw new RangeError(\"searchText must be provided.\");\n }\n\n if (!fullOptions.suggesterName) {\n throw new RangeError(\"suggesterName must be provided.\");\n }\n\n const { span, updatedOptions } = createSpan(\"SearchClient-suggest\", operationOptions);\n\n try {\n const result = await this.client.documents.suggestPost(fullOptions, updatedOptions);\n\n const modifiedResult =\n utils.generatedSuggestDocumentsResultToPublicSuggestDocumentsResult<T>(result);\n\n return deserialize<SuggestDocumentsResult<Pick<T, Fields>>>(modifiedResult);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Retrieve a particular document from the index by key.\n * @param key - The primary key value of the document\n * @param options - Additional options\n */\n public async getDocument<Fields extends Extract<keyof T, string>>(\n key: string,\n options: GetDocumentOptions<Fields> = {}\n ): Promise<T> {\n const { span, updatedOptions } = createSpan(\"SearchClient-getDocument\", options);\n try {\n const result = await this.client.documents.get(key, updatedOptions);\n return deserialize<T>(result);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Perform a set of index modifications (upload, merge, mergeOrUpload, delete)\n * for the given set of documents.\n * This operation may partially succeed and not all document operations will\n * be reflected in the index. If you would like to treat this as an exception,\n * set the `throwOnAnyFailure` option to true.\n * For more details about how merging works, see: https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param batch - An array of actions to perform on the index.\n * @param options - Additional options.\n */\n public async indexDocuments(\n // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\n batch: IndexDocumentsBatch<T>,\n options: IndexDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-indexDocuments\", options);\n try {\n let status: number = 0;\n const result = await this.client.documents.index(\n { actions: serialize(batch.actions) },\n {\n ...updatedOptions,\n onResponse: (response) => {\n status = response.status;\n },\n }\n );\n if (options.throwOnAnyFailure && status === 207) {\n throw result;\n }\n return result;\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n * @param options - Additional options.\n */\n public async uploadDocuments(\n documents: T[],\n options: UploadDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-uploadDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n batch.upload(documents);\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\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 * @param options - Additional options.\n */\n public async mergeDocuments(\n documents: T[],\n options: MergeDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-mergeDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n batch.merge(documents);\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Update a set of documents in the index or upload 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 updated documents.\n * @param options - Additional options.\n */\n public async mergeOrUploadDocuments(\n documents: T[],\n options: MergeOrUploadDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-mergeDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n batch.mergeOrUpload(documents);\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n documents: T[],\n options?: DeleteDocumentsOptions\n ): Promise<IndexDocumentsResult>;\n\n /**\n * Delete a set of documents.\n * @param keyName - The name of their primary key in the index.\n * @param keyValues - The primary key values of documents to delete.\n * @param options - Additional options.\n */\n public async deleteDocuments(\n keyName: keyof T,\n keyValues: string[],\n options?: DeleteDocumentsOptions\n ): Promise<IndexDocumentsResult>;\n\n public async deleteDocuments(\n keyNameOrDocuments: keyof T | T[],\n keyValuesOrOptions?: string[] | DeleteDocumentsOptions,\n options: DeleteDocumentsOptions = {}\n ): Promise<IndexDocumentsResult> {\n const { span, updatedOptions } = createSpan(\"SearchClient-deleteDocuments\", options);\n\n const batch = new IndexDocumentsBatch<T>();\n if (typeof keyNameOrDocuments === \"string\") {\n batch.delete(keyNameOrDocuments, keyValuesOrOptions as string[]);\n } else {\n batch.delete(keyNameOrDocuments as T[]);\n }\n\n try {\n return await this.indexDocuments(batch, updatedOptions);\n } catch (e: any) {\n span.setStatus({\n status: \"error\",\n error: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private encodeContinuationToken(\n nextLink: string | undefined,\n nextPageParameters: SearchRequest | undefined\n ): string | undefined {\n if (!nextLink || !nextPageParameters) {\n return undefined;\n }\n const payload = JSON.stringify({\n apiVersion: this.apiVersion,\n nextLink,\n nextPageParameters,\n });\n return encode(payload);\n }\n\n private decodeContinuationToken(\n token?: string\n ): { nextPageParameters: SearchRequest; nextLink: string } | undefined {\n if (!token) {\n return undefined;\n }\n\n const decodedToken = decode(token);\n\n try {\n const result: {\n apiVersion: string;\n nextLink: string;\n nextPageParameters: SearchRequest;\n } = JSON.parse(decodedToken);\n\n if (result.apiVersion !== this.apiVersion) {\n throw new RangeError(`Continuation token uses unsupported apiVersion \"${this.apiVersion}\"`);\n }\n\n return {\n nextLink: result.nextLink,\n nextPageParameters: result.nextPageParameters,\n };\n } catch (e: any) {\n throw new Error(`Corrupted or invalid continuation token: ${decodedToken}`);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-shadow\n private extractOperationOptions<T extends OperationOptions>(\n obj: T\n ): {\n operationOptions: OperationOptions;\n restOptions: any;\n } {\n const { abortSignal, requestOptions, tracingOptions, ...restOptions } = obj;\n\n return {\n operationOptions: {\n abortSignal,\n requestOptions,\n tracingOptions,\n },\n restOptions,\n };\n }\n\n private convertSelect<Fields>(select?: Fields[]): string | undefined {\n if (select) {\n return select.join(\",\");\n }\n return select;\n }\n\n private convertSearchFields<Fields>(searchFields?: Fields[]): string | undefined {\n if (searchFields) {\n return searchFields.join(\",\");\n }\n return searchFields;\n }\n\n private convertSemanticFields(semanticFields?: string[]): string | undefined {\n if (semanticFields) {\n return semanticFields.join(\",\");\n }\n return semanticFields;\n }\n\n private convertOrderBy(orderBy?: string[]): string | undefined {\n if (orderBy) {\n return orderBy.join(\",\");\n }\n return orderBy;\n }\n}\n"]}