@azure/search-documents 11.3.1 → 11.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +19 -41
  2. package/dist/index.js +786 -1021
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/generated/data/index.js +1 -0
  7. package/dist-esm/src/generated/data/index.js.map +1 -1
  8. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  9. package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
  10. package/dist-esm/src/generated/data/models/parameters.js +11 -21
  11. package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
  12. package/dist-esm/src/generated/data/operations/documents.js +21 -73
  13. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  14. package/dist-esm/src/generated/data/operationsInterfaces/documents.js +9 -0
  15. package/dist-esm/src/generated/data/operationsInterfaces/documents.js.map +1 -0
  16. package/dist-esm/src/generated/data/operationsInterfaces/index.js +9 -0
  17. package/dist-esm/src/generated/data/operationsInterfaces/index.js.map +1 -0
  18. package/dist-esm/src/generated/data/searchClient.js +2 -2
  19. package/dist-esm/src/generated/data/searchClient.js.map +1 -1
  20. package/dist-esm/src/generated/data/searchClientContext.js +7 -11
  21. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  22. package/dist-esm/src/generated/service/index.js +1 -0
  23. package/dist-esm/src/generated/service/index.js.map +1 -1
  24. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  25. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  26. package/dist-esm/src/generated/service/models/parameters.js +0 -9
  27. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  28. package/dist-esm/src/generated/service/operations/dataSources.js +11 -37
  29. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  30. package/dist-esm/src/generated/service/operations/indexers.js +17 -55
  31. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  32. package/dist-esm/src/generated/service/operations/indexes.js +15 -54
  33. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  34. package/dist-esm/src/generated/service/operations/skillsets.js +11 -37
  35. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  36. package/dist-esm/src/generated/service/operations/synonymMaps.js +11 -37
  37. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  38. package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js +9 -0
  39. package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js.map +1 -0
  40. package/dist-esm/src/generated/service/operationsInterfaces/index.js +13 -0
  41. package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -0
  42. package/dist-esm/src/generated/service/operationsInterfaces/indexers.js +9 -0
  43. package/dist-esm/src/generated/service/operationsInterfaces/indexers.js.map +1 -0
  44. package/dist-esm/src/generated/service/operationsInterfaces/indexes.js +9 -0
  45. package/dist-esm/src/generated/service/operationsInterfaces/indexes.js.map +1 -0
  46. package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js +9 -0
  47. package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js.map +1 -0
  48. package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js +9 -0
  49. package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js.map +1 -0
  50. package/dist-esm/src/generated/service/searchServiceClient.js +10 -13
  51. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  52. package/dist-esm/src/generated/service/searchServiceClientContext.js +7 -11
  53. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  54. package/dist-esm/src/geographyPoint.js +1 -1
  55. package/dist-esm/src/geographyPoint.js.map +1 -1
  56. package/dist-esm/src/index.js +2 -2
  57. package/dist-esm/src/index.js.map +1 -1
  58. package/dist-esm/src/indexDocumentsBatch.js +1 -1
  59. package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
  60. package/dist-esm/src/indexModels.js.map +1 -1
  61. package/dist-esm/src/odataMetadataPolicy.js +7 -15
  62. package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
  63. package/dist-esm/src/searchApiKeyCredentialPolicy.js +8 -21
  64. package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
  65. package/dist-esm/src/searchAudience.js.map +1 -1
  66. package/dist-esm/src/searchClient.js +108 -126
  67. package/dist-esm/src/searchClient.js.map +1 -1
  68. package/dist-esm/src/searchIndexClient.js +112 -101
  69. package/dist-esm/src/searchIndexClient.js.map +1 -1
  70. package/dist-esm/src/searchIndexerClient.js +94 -106
  71. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  72. package/dist-esm/src/searchIndexingBufferedSender.js +16 -17
  73. package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
  74. package/dist-esm/src/serialization.js +6 -6
  75. package/dist-esm/src/serialization.js.map +1 -1
  76. package/dist-esm/src/serviceModels.js.map +1 -1
  77. package/dist-esm/src/serviceUtils.js +43 -61
  78. package/dist-esm/src/serviceUtils.js.map +1 -1
  79. package/dist-esm/src/synonymMapHelper.js +6 -2
  80. package/dist-esm/src/synonymMapHelper.js.map +1 -1
  81. package/dist-esm/src/tracing.js +6 -5
  82. package/dist-esm/src/tracing.js.map +1 -1
  83. package/package.json +53 -53
  84. package/types/search-documents.d.ts +137 -117
  85. package/CHANGELOG.md +0 -233
  86. package/dist-esm/src/generated/data/models/documentsMappers.js +0 -9
  87. package/dist-esm/src/generated/data/models/documentsMappers.js.map +0 -1
  88. package/dist-esm/src/generated/service/models/dataSourcesMappers.js +0 -9
  89. package/dist-esm/src/generated/service/models/dataSourcesMappers.js.map +0 -1
  90. package/dist-esm/src/generated/service/models/indexersMappers.js +0 -9
  91. package/dist-esm/src/generated/service/models/indexersMappers.js.map +0 -1
  92. package/dist-esm/src/generated/service/models/indexesMappers.js +0 -9
  93. package/dist-esm/src/generated/service/models/indexesMappers.js.map +0 -1
  94. package/dist-esm/src/generated/service/models/skillsetsMappers.js +0 -9
  95. package/dist-esm/src/generated/service/models/skillsetsMappers.js.map +0 -1
  96. package/dist-esm/src/generated/service/models/synonymMapsMappers.js +0 -9
  97. package/dist-esm/src/generated/service/models/synonymMapsMappers.js.map +0 -1
@@ -5,11 +5,11 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreHttp from "@azure/core-http";
8
+ import * as coreClient from "@azure/core-client";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
11
  /** Class representing a Indexes. */
12
- export class Indexes {
12
+ export class IndexesImpl {
13
13
  /**
14
14
  * Initialize a new instance of the class Indexes class.
15
15
  * @param client Reference to the service client
@@ -23,21 +23,14 @@ export class Indexes {
23
23
  * @param options The options parameters.
24
24
  */
25
25
  create(index, options) {
26
- const operationArguments = {
27
- index,
28
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
29
- };
30
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
26
+ return this.client.sendOperationRequest({ index, options }, createOperationSpec);
31
27
  }
32
28
  /**
33
29
  * Lists all indexes available for a search service.
34
30
  * @param options The options parameters.
35
31
  */
36
32
  list(options) {
37
- const operationArguments = {
38
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
39
- };
40
- return this.client.sendOperationRequest(operationArguments, listOperationSpec);
33
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
41
34
  }
42
35
  /**
43
36
  * Creates a new search index or updates an index if it already exists.
@@ -46,12 +39,7 @@ export class Indexes {
46
39
  * @param options The options parameters.
47
40
  */
48
41
  createOrUpdate(indexName, index, options) {
49
- const operationArguments = {
50
- indexName,
51
- index,
52
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
53
- };
54
- return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
42
+ return this.client.sendOperationRequest({ indexName, index, options }, createOrUpdateOperationSpec);
55
43
  }
56
44
  /**
57
45
  * Deletes a search index and all the documents it contains. This operation is permanent, with no
@@ -61,11 +49,7 @@ export class Indexes {
61
49
  * @param options The options parameters.
62
50
  */
63
51
  delete(indexName, options) {
64
- const operationArguments = {
65
- indexName,
66
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
67
- };
68
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
52
+ return this.client.sendOperationRequest({ indexName, options }, deleteOperationSpec);
69
53
  }
70
54
  /**
71
55
  * Retrieves an index definition.
@@ -73,11 +57,7 @@ export class Indexes {
73
57
  * @param options The options parameters.
74
58
  */
75
59
  get(indexName, options) {
76
- const operationArguments = {
77
- indexName,
78
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
79
- };
80
- return this.client.sendOperationRequest(operationArguments, getOperationSpec);
60
+ return this.client.sendOperationRequest({ indexName, options }, getOperationSpec);
81
61
  }
82
62
  /**
83
63
  * Returns statistics for the given index, including a document count and storage usage.
@@ -85,11 +65,7 @@ export class Indexes {
85
65
  * @param options The options parameters.
86
66
  */
87
67
  getStatistics(indexName, options) {
88
- const operationArguments = {
89
- indexName,
90
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
91
- };
92
- return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
68
+ return this.client.sendOperationRequest({ indexName, options }, getStatisticsOperationSpec);
93
69
  }
94
70
  /**
95
71
  * Shows how an analyzer breaks text into tokens.
@@ -98,16 +74,11 @@ export class Indexes {
98
74
  * @param options The options parameters.
99
75
  */
100
76
  analyze(indexName, request, options) {
101
- const operationArguments = {
102
- indexName,
103
- request,
104
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
105
- };
106
- return this.client.sendOperationRequest(operationArguments, analyzeOperationSpec);
77
+ return this.client.sendOperationRequest({ indexName, request, options }, analyzeOperationSpec);
107
78
  }
108
79
  }
109
80
  // Operation Specifications
110
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
81
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
111
82
  const createOperationSpec = {
112
83
  path: "/indexes",
113
84
  httpMethod: "POST",
@@ -122,11 +93,7 @@ const createOperationSpec = {
122
93
  requestBody: Parameters.index,
123
94
  queryParameters: [Parameters.apiVersion],
124
95
  urlParameters: [Parameters.endpoint],
125
- headerParameters: [
126
- Parameters.contentType,
127
- Parameters.accept,
128
- Parameters.xMsClientRequestId
129
- ],
96
+ headerParameters: [Parameters.contentType, Parameters.accept],
130
97
  mediaType: "json",
131
98
  serializer
132
99
  };
@@ -143,7 +110,7 @@ const listOperationSpec = {
143
110
  },
144
111
  queryParameters: [Parameters.apiVersion, Parameters.select],
145
112
  urlParameters: [Parameters.endpoint],
146
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
113
+ headerParameters: [Parameters.accept],
147
114
  serializer
148
115
  };
149
116
  const createOrUpdateOperationSpec = {
@@ -166,7 +133,6 @@ const createOrUpdateOperationSpec = {
166
133
  headerParameters: [
167
134
  Parameters.contentType,
168
135
  Parameters.accept,
169
- Parameters.xMsClientRequestId,
170
136
  Parameters.ifMatch,
171
137
  Parameters.ifNoneMatch,
172
138
  Parameters.prefer
@@ -188,7 +154,6 @@ const deleteOperationSpec = {
188
154
  urlParameters: [Parameters.endpoint, Parameters.indexName],
189
155
  headerParameters: [
190
156
  Parameters.accept,
191
- Parameters.xMsClientRequestId,
192
157
  Parameters.ifMatch,
193
158
  Parameters.ifNoneMatch
194
159
  ],
@@ -207,7 +172,7 @@ const getOperationSpec = {
207
172
  },
208
173
  queryParameters: [Parameters.apiVersion],
209
174
  urlParameters: [Parameters.endpoint, Parameters.indexName],
210
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
175
+ headerParameters: [Parameters.accept],
211
176
  serializer
212
177
  };
213
178
  const getStatisticsOperationSpec = {
@@ -223,7 +188,7 @@ const getStatisticsOperationSpec = {
223
188
  },
224
189
  queryParameters: [Parameters.apiVersion],
225
190
  urlParameters: [Parameters.endpoint, Parameters.indexName],
226
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
191
+ headerParameters: [Parameters.accept],
227
192
  serializer
228
193
  };
229
194
  const analyzeOperationSpec = {
@@ -240,11 +205,7 @@ const analyzeOperationSpec = {
240
205
  requestBody: Parameters.request,
241
206
  queryParameters: [Parameters.apiVersion],
242
207
  urlParameters: [Parameters.endpoint, Parameters.indexName],
243
- headerParameters: [
244
- Parameters.contentType,
245
- Parameters.accept,
246
- Parameters.xMsClientRequestId
247
- ],
208
+ headerParameters: [Parameters.contentType, Parameters.accept],
248
209
  mediaType: "json",
249
210
  serializer
250
211
  };
@@ -1 +1 @@
1
- {"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAoBnD,oCAAoC;AACpC,MAAM,OAAO,OAAO;IAGlB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAkB,EAClB,OAAqC;QAErC,MAAM,kBAAkB,GAAgC;YACtD,KAAK;YACL,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,kBAAkB,EAClB,mBAAmB,CACc,CAAC;IACtC,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAAmC;QACtC,MAAM,kBAAkB,GAAgC;YACtD,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,kBAAkB,EAClB,iBA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tB,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 * as coreHttp from \"@azure/core-http\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\nimport {\n SearchIndex,\n IndexesCreateOptionalParams,\n IndexesCreateResponse,\n IndexesListOptionalParams,\n IndexesListResponse,\n IndexesCreateOrUpdateOptionalParams,\n IndexesCreateOrUpdateResponse,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesGetResponse,\n IndexesGetStatisticsOptionalParams,\n IndexesGetStatisticsResponse,\n AnalyzeRequest,\n IndexesAnalyzeOptionalParams,\n IndexesAnalyzeResponse\n} from \"../models\";\n\n/** Class representing a Indexes. */\nexport class Indexes {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Indexes 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 search index.\n * @param index The definition of the index to create.\n * @param options The options parameters.\n */\n create(\n index: SearchIndex,\n options?: IndexesCreateOptionalParams\n ): Promise<IndexesCreateResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n index,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOperationSpec\n ) as Promise<IndexesCreateResponse>;\n }\n\n /**\n * Lists all indexes available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexesListOptionalParams): Promise<IndexesListResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n listOperationSpec\n ) as Promise<IndexesListResponse>;\n }\n\n /**\n * Creates a new search index or updates an index if it already exists.\n * @param indexName The definition of the index to create or update.\n * @param index The definition of the index to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexName: string,\n index: SearchIndex,\n options?: IndexesCreateOrUpdateOptionalParams\n ): Promise<IndexesCreateOrUpdateResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexName,\n index,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOrUpdateOperationSpec\n ) as Promise<IndexesCreateOrUpdateResponse>;\n }\n\n /**\n * Deletes a search index and all the documents it contains. This operation is permanent, with no\n * recovery option. Make sure you have a master copy of your index definition, data ingestion code, and\n * a backup of the primary data source in case you need to re-build the index.\n * @param indexName The name of the index to delete.\n * @param options The options parameters.\n */\n delete(\n indexName: string,\n options?: IndexesDeleteOptionalParams\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n deleteOperationSpec\n ) as Promise<coreHttp.RestResponse>;\n }\n\n /**\n * Retrieves an index definition.\n * @param indexName The name of the index to retrieve.\n * @param options The options parameters.\n */\n get(\n indexName: string,\n options?: IndexesGetOptionalParams\n ): Promise<IndexesGetResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getOperationSpec\n ) as Promise<IndexesGetResponse>;\n }\n\n /**\n * Returns statistics for the given index, including a document count and storage usage.\n * @param indexName The name of the index for which to retrieve statistics.\n * @param options The options parameters.\n */\n getStatistics(\n indexName: string,\n options?: IndexesGetStatisticsOptionalParams\n ): Promise<IndexesGetStatisticsResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getStatisticsOperationSpec\n ) as Promise<IndexesGetStatisticsResponse>;\n }\n\n /**\n * Shows how an analyzer breaks text into tokens.\n * @param indexName The name of the index for which to test an analyzer.\n * @param request The text and analyzer or analysis components to test.\n * @param options The options parameters.\n */\n analyze(\n indexName: string,\n request: AnalyzeRequest,\n options?: IndexesAnalyzeOptionalParams\n ): Promise<IndexesAnalyzeResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexName,\n request,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n analyzeOperationSpec\n ) as Promise<IndexesAnalyzeResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndex\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.index,\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 listOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexesResult\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 createOrUpdateOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex\n },\n 201: {\n bodyMapper: Mappers.SearchIndex\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion, Parameters.allowIndexDowntime],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\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: coreHttp.OperationSpec = {\n path: \"/indexes('{indexName}')\",\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.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst getStatisticsOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexes('{indexName}')/search.stats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetIndexStatisticsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst analyzeOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexes('{indexName}')/search.analyze\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexes.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;AAoBnD,oCAAoC;AACpC,MAAM,OAAO,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAAkC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAkB,EAClB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,OAAO,EAAE,EAClB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAAmC;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,SAAiB,EACjB,KAAkB,EAClB,OAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,EAC7B,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,SAAiB,EACjB,OAAkC;QAElC,OAAO,IAA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;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,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 { Indexes } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClientContext } from \"../searchServiceClientContext\";\nimport {\n SearchIndex,\n IndexesCreateOptionalParams,\n IndexesCreateResponse,\n IndexesListOptionalParams,\n IndexesListResponse,\n IndexesCreateOrUpdateOptionalParams,\n IndexesCreateOrUpdateResponse,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesGetResponse,\n IndexesGetStatisticsOptionalParams,\n IndexesGetStatisticsResponse,\n AnalyzeRequest,\n IndexesAnalyzeOptionalParams,\n IndexesAnalyzeResponse\n} from \"../models\";\n\n/** Class representing a Indexes. */\nexport class IndexesImpl implements Indexes {\n private readonly client: SearchServiceClientContext;\n\n /**\n * Initialize a new instance of the class Indexes class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClientContext) {\n this.client = client;\n }\n\n /**\n * Creates a new search index.\n * @param index The definition of the index to create.\n * @param options The options parameters.\n */\n create(\n index: SearchIndex,\n options?: IndexesCreateOptionalParams\n ): Promise<IndexesCreateResponse> {\n return this.client.sendOperationRequest(\n { index, options },\n createOperationSpec\n );\n }\n\n /**\n * Lists all indexes available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexesListOptionalParams): Promise<IndexesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new search index or updates an index if it already exists.\n * @param indexName The definition of the index to create or update.\n * @param index The definition of the index to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexName: string,\n index: SearchIndex,\n options?: IndexesCreateOrUpdateOptionalParams\n ): Promise<IndexesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { indexName, index, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Deletes a search index and all the documents it contains. This operation is permanent, with no\n * recovery option. Make sure you have a master copy of your index definition, data ingestion code, and\n * a backup of the primary data source in case you need to re-build the index.\n * @param indexName The name of the index to delete.\n * @param options The options parameters.\n */\n delete(\n indexName: string,\n options?: IndexesDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Retrieves an index definition.\n * @param indexName The name of the index to retrieve.\n * @param options The options parameters.\n */\n get(\n indexName: string,\n options?: IndexesGetOptionalParams\n ): Promise<IndexesGetResponse> {\n return this.client.sendOperationRequest(\n { indexName, options },\n getOperationSpec\n );\n }\n\n /**\n * Returns statistics for the given index, including a document count and storage usage.\n * @param indexName The name of the index for which to retrieve statistics.\n * @param options The options parameters.\n */\n getStatistics(\n indexName: string,\n options?: IndexesGetStatisticsOptionalParams\n ): Promise<IndexesGetStatisticsResponse> {\n return this.client.sendOperationRequest(\n { indexName, options },\n getStatisticsOperationSpec\n );\n }\n\n /**\n * Shows how an analyzer breaks text into tokens.\n * @param indexName The name of the index for which to test an analyzer.\n * @param request The text and analyzer or analysis components to test.\n * @param options The options parameters.\n */\n analyze(\n indexName: string,\n request: AnalyzeRequest,\n options?: IndexesAnalyzeOptionalParams\n ): Promise<IndexesAnalyzeResponse> {\n return this.client.sendOperationRequest(\n { indexName, request, options },\n analyzeOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndex\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexesResult\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex\n },\n 201: {\n bodyMapper: Mappers.SearchIndex\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion, Parameters.allowIndexDowntime],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\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: \"/indexes('{indexName}')\",\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.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getStatisticsOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')/search.stats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetIndexStatisticsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst analyzeOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')/search.analyze\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -5,11 +5,11 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreHttp from "@azure/core-http";
8
+ import * as coreClient from "@azure/core-client";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
11
  /** Class representing a Skillsets. */
12
- export class Skillsets {
12
+ export class SkillsetsImpl {
13
13
  /**
14
14
  * Initialize a new instance of the class Skillsets class.
15
15
  * @param client Reference to the service client
@@ -24,12 +24,7 @@ export class Skillsets {
24
24
  * @param options The options parameters.
25
25
  */
26
26
  createOrUpdate(skillsetName, skillset, options) {
27
- const operationArguments = {
28
- skillsetName,
29
- skillset,
30
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
31
- };
32
- return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
27
+ return this.client.sendOperationRequest({ skillsetName, skillset, options }, createOrUpdateOperationSpec);
33
28
  }
34
29
  /**
35
30
  * Deletes a skillset in a search service.
@@ -37,11 +32,7 @@ export class Skillsets {
37
32
  * @param options The options parameters.
38
33
  */
39
34
  delete(skillsetName, options) {
40
- const operationArguments = {
41
- skillsetName,
42
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
43
- };
44
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
35
+ return this.client.sendOperationRequest({ skillsetName, options }, deleteOperationSpec);
45
36
  }
46
37
  /**
47
38
  * Retrieves a skillset in a search service.
@@ -49,21 +40,14 @@ export class Skillsets {
49
40
  * @param options The options parameters.
50
41
  */
51
42
  get(skillsetName, options) {
52
- const operationArguments = {
53
- skillsetName,
54
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
55
- };
56
- return this.client.sendOperationRequest(operationArguments, getOperationSpec);
43
+ return this.client.sendOperationRequest({ skillsetName, options }, getOperationSpec);
57
44
  }
58
45
  /**
59
46
  * List all skillsets in a search service.
60
47
  * @param options The options parameters.
61
48
  */
62
49
  list(options) {
63
- const operationArguments = {
64
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
65
- };
66
- return this.client.sendOperationRequest(operationArguments, listOperationSpec);
50
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
67
51
  }
68
52
  /**
69
53
  * Creates a new skillset in a search service.
@@ -71,15 +55,11 @@ export class Skillsets {
71
55
  * @param options The options parameters.
72
56
  */
73
57
  create(skillset, options) {
74
- const operationArguments = {
75
- skillset,
76
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
77
- };
78
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
58
+ return this.client.sendOperationRequest({ skillset, options }, createOperationSpec);
79
59
  }
80
60
  }
81
61
  // Operation Specifications
82
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
62
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
83
63
  const createOrUpdateOperationSpec = {
84
64
  path: "/skillsets('{skillsetName}')",
85
65
  httpMethod: "PUT",
@@ -100,7 +80,6 @@ const createOrUpdateOperationSpec = {
100
80
  headerParameters: [
101
81
  Parameters.contentType,
102
82
  Parameters.accept,
103
- Parameters.xMsClientRequestId,
104
83
  Parameters.ifMatch,
105
84
  Parameters.ifNoneMatch,
106
85
  Parameters.prefer
@@ -122,7 +101,6 @@ const deleteOperationSpec = {
122
101
  urlParameters: [Parameters.endpoint, Parameters.skillsetName],
123
102
  headerParameters: [
124
103
  Parameters.accept,
125
- Parameters.xMsClientRequestId,
126
104
  Parameters.ifMatch,
127
105
  Parameters.ifNoneMatch
128
106
  ],
@@ -141,7 +119,7 @@ const getOperationSpec = {
141
119
  },
142
120
  queryParameters: [Parameters.apiVersion],
143
121
  urlParameters: [Parameters.endpoint, Parameters.skillsetName],
144
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
122
+ headerParameters: [Parameters.accept],
145
123
  serializer
146
124
  };
147
125
  const listOperationSpec = {
@@ -157,7 +135,7 @@ const listOperationSpec = {
157
135
  },
158
136
  queryParameters: [Parameters.apiVersion, Parameters.select],
159
137
  urlParameters: [Parameters.endpoint],
160
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
138
+ headerParameters: [Parameters.accept],
161
139
  serializer
162
140
  };
163
141
  const createOperationSpec = {
@@ -174,11 +152,7 @@ const createOperationSpec = {
174
152
  requestBody: Parameters.skillset,
175
153
  queryParameters: [Parameters.apiVersion],
176
154
  urlParameters: [Parameters.endpoint],
177
- headerParameters: [
178
- Parameters.contentType,
179
- Parameters.accept,
180
- Parameters.xMsClientRequestId
181
- ],
155
+ headerParameters: [Parameters.contentType, Parameters.accept],
182
156
  mediaType: "json",
183
157
  serializer
184
158
  };
@@ -1 +1 @@
1
- {"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAA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D,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;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 * as coreHttp from \"@azure/core-http\";\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} from \"../models\";\n\n/** Class representing a Skillsets. */\nexport class 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 const operationArguments: coreHttp.OperationArguments = {\n skillsetName,\n skillset,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOrUpdateOperationSpec\n ) as Promise<SkillsetsCreateOrUpdateResponse>;\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<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n skillsetName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n deleteOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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 const operationArguments: coreHttp.OperationArguments = {\n skillsetName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getOperationSpec\n ) as Promise<SkillsetsGetResponse>;\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 const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n listOperationSpec\n ) as Promise<SkillsetsListResponse>;\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 const operationArguments: coreHttp.OperationArguments = {\n skillset,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOperationSpec\n ) as Promise<SkillsetsCreateResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreHttp.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: [Parameters.apiVersion],\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: coreHttp.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: coreHttp.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: coreHttp.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: coreHttp.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};\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;AAenD,sCAAsC;AACtC,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAAkC;QAC5C,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,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AU;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","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 { SearchServiceClientContext } from \"../searchServiceClientContext\";\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse\n} from \"../models\";\n\n/** Class representing a Skillsets. */\nexport class SkillsetsImpl implements Skillsets {\n private readonly client: SearchServiceClientContext;\n\n /**\n * Initialize a new instance of the class Skillsets class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClientContext) {\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// 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: [Parameters.apiVersion],\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};\n"]}
@@ -5,11 +5,11 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import * as coreHttp from "@azure/core-http";
8
+ import * as coreClient from "@azure/core-client";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
11
  /** Class representing a SynonymMaps. */
12
- export class SynonymMaps {
12
+ export class SynonymMapsImpl {
13
13
  /**
14
14
  * Initialize a new instance of the class SynonymMaps class.
15
15
  * @param client Reference to the service client
@@ -24,12 +24,7 @@ export class SynonymMaps {
24
24
  * @param options The options parameters.
25
25
  */
26
26
  createOrUpdate(synonymMapName, synonymMap, options) {
27
- const operationArguments = {
28
- synonymMapName,
29
- synonymMap,
30
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
31
- };
32
- return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
27
+ return this.client.sendOperationRequest({ synonymMapName, synonymMap, options }, createOrUpdateOperationSpec);
33
28
  }
34
29
  /**
35
30
  * Deletes a synonym map.
@@ -37,11 +32,7 @@ export class SynonymMaps {
37
32
  * @param options The options parameters.
38
33
  */
39
34
  delete(synonymMapName, options) {
40
- const operationArguments = {
41
- synonymMapName,
42
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
43
- };
44
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
35
+ return this.client.sendOperationRequest({ synonymMapName, options }, deleteOperationSpec);
45
36
  }
46
37
  /**
47
38
  * Retrieves a synonym map definition.
@@ -49,21 +40,14 @@ export class SynonymMaps {
49
40
  * @param options The options parameters.
50
41
  */
51
42
  get(synonymMapName, options) {
52
- const operationArguments = {
53
- synonymMapName,
54
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
55
- };
56
- return this.client.sendOperationRequest(operationArguments, getOperationSpec);
43
+ return this.client.sendOperationRequest({ synonymMapName, options }, getOperationSpec);
57
44
  }
58
45
  /**
59
46
  * Lists all synonym maps available for a search service.
60
47
  * @param options The options parameters.
61
48
  */
62
49
  list(options) {
63
- const operationArguments = {
64
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
65
- };
66
- return this.client.sendOperationRequest(operationArguments, listOperationSpec);
50
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
67
51
  }
68
52
  /**
69
53
  * Creates a new synonym map.
@@ -71,15 +55,11 @@ export class SynonymMaps {
71
55
  * @param options The options parameters.
72
56
  */
73
57
  create(synonymMap, options) {
74
- const operationArguments = {
75
- synonymMap,
76
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
77
- };
78
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
58
+ return this.client.sendOperationRequest({ synonymMap, options }, createOperationSpec);
79
59
  }
80
60
  }
81
61
  // Operation Specifications
82
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
62
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
83
63
  const createOrUpdateOperationSpec = {
84
64
  path: "/synonymmaps('{synonymMapName}')",
85
65
  httpMethod: "PUT",
@@ -100,7 +80,6 @@ const createOrUpdateOperationSpec = {
100
80
  headerParameters: [
101
81
  Parameters.contentType,
102
82
  Parameters.accept,
103
- Parameters.xMsClientRequestId,
104
83
  Parameters.ifMatch,
105
84
  Parameters.ifNoneMatch,
106
85
  Parameters.prefer
@@ -122,7 +101,6 @@ const deleteOperationSpec = {
122
101
  urlParameters: [Parameters.endpoint, Parameters.synonymMapName],
123
102
  headerParameters: [
124
103
  Parameters.accept,
125
- Parameters.xMsClientRequestId,
126
104
  Parameters.ifMatch,
127
105
  Parameters.ifNoneMatch
128
106
  ],
@@ -141,7 +119,7 @@ const getOperationSpec = {
141
119
  },
142
120
  queryParameters: [Parameters.apiVersion],
143
121
  urlParameters: [Parameters.endpoint, Parameters.synonymMapName],
144
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
122
+ headerParameters: [Parameters.accept],
145
123
  serializer
146
124
  };
147
125
  const listOperationSpec = {
@@ -157,7 +135,7 @@ const listOperationSpec = {
157
135
  },
158
136
  queryParameters: [Parameters.apiVersion, Parameters.select],
159
137
  urlParameters: [Parameters.endpoint],
160
- headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
138
+ headerParameters: [Parameters.accept],
161
139
  serializer
162
140
  };
163
141
  const createOperationSpec = {
@@ -174,11 +152,7 @@ const createOperationSpec = {
174
152
  requestBody: Parameters.synonymMap,
175
153
  queryParameters: [Parameters.apiVersion],
176
154
  urlParameters: [Parameters.endpoint],
177
- headerParameters: [
178
- Parameters.contentType,
179
- Parameters.accept,
180
- Parameters.xMsClientRequestId
181
- ],
155
+ headerParameters: [Parameters.contentType, Parameters.accept],
182
156
  mediaType: "json",
183
157
  serializer
184
158
  };
@@ -1 +1 @@
1
- {"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,wCAAwC;AACxC,MAAM,OAAO,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,cAAsB,EACtB,UAAsB,EACtB,OAAiD;QAEjD,MAAM,kBAAkB,GAAgC;YACtD,cAAc;YACd,UAAU;YACV,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,kBAAkB,EAClB,2BAA2B,CACkB,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,cAAsB,EACtB,OAAyC;QAEzC,MAAM,kBAAkB,GAAgC;YACtD,cAAc;YACd,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAA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AAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA2B;IAChD,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,GAA2B;IAClD,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 * as coreHttp from \"@azure/core-http\";\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 representing a SynonymMaps. */\nexport class 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 const operationArguments: coreHttp.OperationArguments = {\n synonymMapName,\n synonymMap,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOrUpdateOperationSpec\n ) as Promise<SynonymMapsCreateOrUpdateResponse>;\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<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n synonymMapName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n deleteOperationSpec\n ) as Promise<coreHttp.RestResponse>;\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 const operationArguments: coreHttp.OperationArguments = {\n synonymMapName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getOperationSpec\n ) as Promise<SynonymMapsGetResponse>;\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 const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n listOperationSpec\n ) as Promise<SynonymMapsListResponse>;\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 const operationArguments: coreHttp.OperationArguments = {\n synonymMap,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOperationSpec\n ) as Promise<SynonymMapsCreateResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreHttp.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: coreHttp.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: coreHttp.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: coreHttp.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: coreHttp.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,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,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC;IAC/D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,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,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 { SearchServiceClientContext } from \"../searchServiceClientContext\";\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 representing a SynonymMaps. */\nexport class SynonymMapsImpl implements SynonymMaps {\n private readonly client: SearchServiceClientContext;\n\n /**\n * Initialize a new instance of the class SynonymMaps class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClientContext) {\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"]}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=dataSources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/dataSources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SearchIndexerDataSource,\n DataSourcesCreateOrUpdateOptionalParams,\n DataSourcesCreateOrUpdateResponse,\n DataSourcesDeleteOptionalParams,\n DataSourcesGetOptionalParams,\n DataSourcesGetResponse,\n DataSourcesListOptionalParams,\n DataSourcesListResponse,\n DataSourcesCreateOptionalParams,\n DataSourcesCreateResponse\n} from \"../models\";\n\n/** Interface representing a DataSources. */\nexport interface DataSources {\n /**\n * Creates a new datasource or updates a datasource if it already exists.\n * @param dataSourceName The name of the datasource to create or update.\n * @param dataSource The definition of the datasource to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n dataSourceName: string,\n dataSource: SearchIndexerDataSource,\n options?: DataSourcesCreateOrUpdateOptionalParams\n ): Promise<DataSourcesCreateOrUpdateResponse>;\n /**\n * Deletes a datasource.\n * @param dataSourceName The name of the datasource to delete.\n * @param options The options parameters.\n */\n delete(\n dataSourceName: string,\n options?: DataSourcesDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves a datasource definition.\n * @param dataSourceName The name of the datasource to retrieve.\n * @param options The options parameters.\n */\n get(\n dataSourceName: string,\n options?: DataSourcesGetOptionalParams\n ): Promise<DataSourcesGetResponse>;\n /**\n * Lists all datasources available for a search service.\n * @param options The options parameters.\n */\n list(\n options?: DataSourcesListOptionalParams\n ): Promise<DataSourcesListResponse>;\n /**\n * Creates a new datasource.\n * @param dataSource The definition of the datasource to create.\n * @param options The options parameters.\n */\n create(\n dataSource: SearchIndexerDataSource,\n options?: DataSourcesCreateOptionalParams\n ): Promise<DataSourcesCreateResponse>;\n}\n"]}
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export * from "./dataSources";
9
+ export * from "./indexers";
10
+ export * from "./skillsets";
11
+ export * from "./synonymMaps";
12
+ export * from "./indexes";
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,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\nexport * from \"./dataSources\";\nexport * from \"./indexers\";\nexport * from \"./skillsets\";\nexport * from \"./synonymMaps\";\nexport * from \"./indexes\";\n"]}