@azure/search-documents 11.3.0 → 12.0.0-alpha.20230306.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.
- package/README.md +19 -41
- package/dist/index.js +3897 -1007
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/generated/data/index.js +1 -1
- package/dist-esm/src/generated/data/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js +202 -1
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js +138 -1
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/data/models/parameters.js +72 -22
- package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js +32 -76
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/operationsInterfaces/documents.js +9 -0
- package/dist-esm/src/generated/data/operationsInterfaces/documents.js.map +1 -0
- package/dist-esm/src/generated/data/operationsInterfaces/index.js +9 -0
- package/dist-esm/src/generated/data/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/generated/data/searchClient.js +33 -5
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/data/searchClientContext.js +13 -11
- package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
- package/dist-esm/src/generated/service/index.js +1 -1
- package/dist-esm/src/generated/service/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js +1284 -1
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/mappers.js +750 -25
- package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/service/models/parameters.js +51 -10
- package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/service/operations/aliases.js +160 -0
- package/dist-esm/src/generated/service/operations/aliases.js.map +1 -0
- package/dist-esm/src/generated/service/operations/dataSources.js +16 -39
- package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
- package/dist-esm/src/generated/service/operations/index.js +1 -0
- package/dist-esm/src/generated/service/operations/index.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexers.js +47 -57
- package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexes.js +16 -55
- package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
- package/dist-esm/src/generated/service/operations/skillsets.js +42 -39
- package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
- package/dist-esm/src/generated/service/operations/synonymMaps.js +12 -38
- package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist-esm/src/generated/service/operationsInterfaces/aliases.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/aliases.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/index.js +14 -0
- package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexers.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexers.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexes.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexes.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js.map +1 -0
- package/dist-esm/src/generated/service/searchServiceClient.js +38 -16
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClientContext.js +13 -11
- package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
- package/dist-esm/src/geographyPoint.js +1 -1
- package/dist-esm/src/geographyPoint.js.map +1 -1
- package/dist-esm/src/index.js +4 -2
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/indexDocumentsBatch.js +1 -1
- package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
- package/dist-esm/src/indexModels.js +0 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/odataMetadataPolicy.js +7 -15
- package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
- package/dist-esm/src/searchApiKeyCredentialPolicy.js +8 -21
- package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/src/searchAudience.js.map +1 -1
- package/dist-esm/src/searchClient.js +200 -70
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +240 -74
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexerClient.js +143 -86
- package/dist-esm/src/searchIndexerClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +16 -17
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/serialization.js +5 -5
- package/dist-esm/src/serialization.js.map +1 -1
- package/dist-esm/src/serviceModels.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +68 -31
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/dist-esm/src/synonymMapHelper.js +6 -2
- package/dist-esm/src/synonymMapHelper.js.map +1 -1
- package/dist-esm/src/tracing.js +6 -5
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +48 -49
- package/types/search-documents.d.ts +1935 -235
- package/CHANGELOG.md +0 -227
|
@@ -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
|
|
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
|
-
/** Class
|
|
12
|
-
export class
|
|
11
|
+
/** Class containing Skillsets operations. */
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,20 @@ export class Skillsets {
|
|
|
71
55
|
* @param options The options parameters.
|
|
72
56
|
*/
|
|
73
57
|
create(skillset, options) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
58
|
+
return this.client.sendOperationRequest({ skillset, options }, createOperationSpec);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Reset an existing skillset in a search service.
|
|
62
|
+
* @param skillsetName The name of the skillset to reset.
|
|
63
|
+
* @param skillNames The names of skills to reset.
|
|
64
|
+
* @param options The options parameters.
|
|
65
|
+
*/
|
|
66
|
+
resetSkills(skillsetName, skillNames, options) {
|
|
67
|
+
return this.client.sendOperationRequest({ skillsetName, skillNames, options }, resetSkillsOperationSpec);
|
|
79
68
|
}
|
|
80
69
|
}
|
|
81
70
|
// Operation Specifications
|
|
82
|
-
const serializer =
|
|
71
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
83
72
|
const createOrUpdateOperationSpec = {
|
|
84
73
|
path: "/skillsets('{skillsetName}')",
|
|
85
74
|
httpMethod: "PUT",
|
|
@@ -95,12 +84,15 @@ const createOrUpdateOperationSpec = {
|
|
|
95
84
|
}
|
|
96
85
|
},
|
|
97
86
|
requestBody: Parameters.skillset,
|
|
98
|
-
queryParameters: [
|
|
87
|
+
queryParameters: [
|
|
88
|
+
Parameters.apiVersion,
|
|
89
|
+
Parameters.skipIndexerResetRequirementForCache,
|
|
90
|
+
Parameters.disableCacheReprocessingChangeDetection
|
|
91
|
+
],
|
|
99
92
|
urlParameters: [Parameters.endpoint, Parameters.skillsetName],
|
|
100
93
|
headerParameters: [
|
|
101
94
|
Parameters.contentType,
|
|
102
95
|
Parameters.accept,
|
|
103
|
-
Parameters.xMsClientRequestId,
|
|
104
96
|
Parameters.ifMatch,
|
|
105
97
|
Parameters.ifNoneMatch,
|
|
106
98
|
Parameters.prefer
|
|
@@ -122,7 +114,6 @@ const deleteOperationSpec = {
|
|
|
122
114
|
urlParameters: [Parameters.endpoint, Parameters.skillsetName],
|
|
123
115
|
headerParameters: [
|
|
124
116
|
Parameters.accept,
|
|
125
|
-
Parameters.xMsClientRequestId,
|
|
126
117
|
Parameters.ifMatch,
|
|
127
118
|
Parameters.ifNoneMatch
|
|
128
119
|
],
|
|
@@ -141,7 +132,7 @@ const getOperationSpec = {
|
|
|
141
132
|
},
|
|
142
133
|
queryParameters: [Parameters.apiVersion],
|
|
143
134
|
urlParameters: [Parameters.endpoint, Parameters.skillsetName],
|
|
144
|
-
headerParameters: [Parameters.accept
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
145
136
|
serializer
|
|
146
137
|
};
|
|
147
138
|
const listOperationSpec = {
|
|
@@ -157,7 +148,7 @@ const listOperationSpec = {
|
|
|
157
148
|
},
|
|
158
149
|
queryParameters: [Parameters.apiVersion, Parameters.select],
|
|
159
150
|
urlParameters: [Parameters.endpoint],
|
|
160
|
-
headerParameters: [Parameters.accept
|
|
151
|
+
headerParameters: [Parameters.accept],
|
|
161
152
|
serializer
|
|
162
153
|
};
|
|
163
154
|
const createOperationSpec = {
|
|
@@ -174,11 +165,23 @@ const createOperationSpec = {
|
|
|
174
165
|
requestBody: Parameters.skillset,
|
|
175
166
|
queryParameters: [Parameters.apiVersion],
|
|
176
167
|
urlParameters: [Parameters.endpoint],
|
|
177
|
-
headerParameters: [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
168
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
169
|
+
mediaType: "json",
|
|
170
|
+
serializer
|
|
171
|
+
};
|
|
172
|
+
const resetSkillsOperationSpec = {
|
|
173
|
+
path: "/skillsets('{skillsetName}')/search.resetskills",
|
|
174
|
+
httpMethod: "POST",
|
|
175
|
+
responses: {
|
|
176
|
+
204: {},
|
|
177
|
+
default: {
|
|
178
|
+
bodyMapper: Mappers.SearchError
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
requestBody: Parameters.skillNames,
|
|
182
|
+
queryParameters: [Parameters.apiVersion],
|
|
183
|
+
urlParameters: [Parameters.endpoint, Parameters.skillsetName],
|
|
184
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
182
185
|
mediaType: "json",
|
|
183
186
|
serializer
|
|
184
187
|
};
|
|
@@ -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,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,sCAAsC;AACtC,MAAM,OAAO,SAAS;IAGpB;;;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,MAAM,kBAAkB,GAAgC;YACtD,YAAY;YACZ,QAAQ;YACR,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC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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 * 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;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,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,QAA+B,EAC/B,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE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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"]}
|
|
@@ -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
|
|
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
|
-
/** Class
|
|
12
|
-
export class
|
|
11
|
+
/** Class containing SynonymMaps operations. */
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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
|
|
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;;;;;OAK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AC,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,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;IAED;;;;OAIG;IACH,GAAG,CACD,cAAsB,EACtB,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,cAAc,EAAE,OAAO,EAAE,EAC3B,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,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AE;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"]}
|
|
@@ -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=aliases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/aliases.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 SearchAlias,\n AliasesCreateOptionalParams,\n AliasesCreateResponse,\n AliasesListOptionalParams,\n AliasesListResponse,\n AliasesCreateOrUpdateOptionalParams,\n AliasesCreateOrUpdateResponse,\n AliasesDeleteOptionalParams,\n AliasesGetOptionalParams,\n AliasesGetResponse\n} from \"../models\";\n\n/** Interface representing a Aliases. */\nexport interface Aliases {\n /**\n * Creates a new search alias.\n * @param alias The definition of the alias to create.\n * @param options The options parameters.\n */\n create(\n alias: SearchAlias,\n options?: AliasesCreateOptionalParams\n ): Promise<AliasesCreateResponse>;\n /**\n * Lists all aliases available for a search service.\n * @param options The options parameters.\n */\n list(options?: AliasesListOptionalParams): Promise<AliasesListResponse>;\n /**\n * Creates a new search alias or updates an alias if it already exists.\n * @param aliasName The definition of the alias to create or update.\n * @param alias The definition of the alias to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n aliasName: string,\n alias: SearchAlias,\n options?: AliasesCreateOrUpdateOptionalParams\n ): Promise<AliasesCreateOrUpdateResponse>;\n /**\n * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no\n * recovery option. The mapped index is untouched by this operation.\n * @param aliasName The name of the alias to delete.\n * @param options The options parameters.\n */\n delete(\n aliasName: string,\n options?: AliasesDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves an alias definition.\n * @param aliasName The name of the alias to retrieve.\n * @param options The options parameters.\n */\n get(\n aliasName: string,\n options?: AliasesGetOptionalParams\n ): Promise<AliasesGetResponse>;\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,14 @@
|
|
|
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
|
+
export * from "./aliases";
|
|
14
|
+
//# 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;AAC1B,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\";\nexport * from \"./aliases\";\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=indexers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/indexers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n IndexersResetOptionalParams,\n IndexersResetDocsOptionalParams,\n IndexersRunOptionalParams,\n SearchIndexer,\n IndexersCreateOrUpdateOptionalParams,\n IndexersCreateOrUpdateResponse,\n IndexersDeleteOptionalParams,\n IndexersGetOptionalParams,\n IndexersGetResponse,\n IndexersListOptionalParams,\n IndexersListResponse,\n IndexersCreateOptionalParams,\n IndexersCreateResponse,\n IndexersGetStatusOptionalParams,\n IndexersGetStatusResponse\n} from \"../models\";\n\n/** Interface representing a Indexers. */\nexport interface Indexers {\n /**\n * Resets the change tracking state associated with an indexer.\n * @param indexerName The name of the indexer to reset.\n * @param options The options parameters.\n */\n reset(\n indexerName: string,\n options?: IndexersResetOptionalParams\n ): Promise<void>;\n /**\n * Resets specific documents in the datasource to be selectively re-ingested by the indexer.\n * @param indexerName The name of the indexer to reset documents for.\n * @param options The options parameters.\n */\n resetDocs(\n indexerName: string,\n options?: IndexersResetDocsOptionalParams\n ): Promise<void>;\n /**\n * Runs an indexer on-demand.\n * @param indexerName The name of the indexer to run.\n * @param options The options parameters.\n */\n run(indexerName: string, options?: IndexersRunOptionalParams): Promise<void>;\n /**\n * Creates a new indexer or updates an indexer if it already exists.\n * @param indexerName The name of the indexer to create or update.\n * @param indexer The definition of the indexer to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexerName: string,\n indexer: SearchIndexer,\n options?: IndexersCreateOrUpdateOptionalParams\n ): Promise<IndexersCreateOrUpdateResponse>;\n /**\n * Deletes an indexer.\n * @param indexerName The name of the indexer to delete.\n * @param options The options parameters.\n */\n delete(\n indexerName: string,\n options?: IndexersDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves an indexer definition.\n * @param indexerName The name of the indexer to retrieve.\n * @param options The options parameters.\n */\n get(\n indexerName: string,\n options?: IndexersGetOptionalParams\n ): Promise<IndexersGetResponse>;\n /**\n * Lists all indexers available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexersListOptionalParams): Promise<IndexersListResponse>;\n /**\n * Creates a new indexer.\n * @param indexer The definition of the indexer to create.\n * @param options The options parameters.\n */\n create(\n indexer: SearchIndexer,\n options?: IndexersCreateOptionalParams\n ): Promise<IndexersCreateResponse>;\n /**\n * Returns the current status and execution history of an indexer.\n * @param indexerName The name of the indexer for which to retrieve status.\n * @param options The options parameters.\n */\n getStatus(\n indexerName: string,\n options?: IndexersGetStatusOptionalParams\n ): Promise<IndexersGetStatusResponse>;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=indexes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SearchIndex,\n IndexesCreateOptionalParams,\n IndexesCreateResponse,\n IndexesListOptionalParams,\n IndexesListResponse,\n IndexesCreateOrUpdateOptionalParams,\n IndexesCreateOrUpdateResponse,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesGetResponse,\n IndexesGetStatisticsOptionalParams,\n IndexesGetStatisticsResponse,\n AnalyzeRequest,\n IndexesAnalyzeOptionalParams,\n IndexesAnalyzeResponse\n} from \"../models\";\n\n/** Interface representing a Indexes. */\nexport interface Indexes {\n /**\n * Creates a new search index.\n * @param index The definition of the index to create.\n * @param options The options parameters.\n */\n create(\n index: SearchIndex,\n options?: IndexesCreateOptionalParams\n ): Promise<IndexesCreateResponse>;\n /**\n * Lists all indexes available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexesListOptionalParams): Promise<IndexesListResponse>;\n /**\n * Creates a new search index or updates an index if it already exists.\n * @param indexName The definition of the index to create or update.\n * @param index The definition of the index to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexName: string,\n index: SearchIndex,\n options?: IndexesCreateOrUpdateOptionalParams\n ): Promise<IndexesCreateOrUpdateResponse>;\n /**\n * Deletes a search index and all the documents it contains. This operation is permanent, with no\n * recovery option. Make sure you have a master copy of your index definition, data ingestion code, and\n * a backup of the primary data source in case you need to re-build the index.\n * @param indexName The name of the index to delete.\n * @param options The options parameters.\n */\n delete(\n indexName: string,\n options?: IndexesDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves an index definition.\n * @param indexName The name of the index to retrieve.\n * @param options The options parameters.\n */\n get(\n indexName: string,\n options?: IndexesGetOptionalParams\n ): Promise<IndexesGetResponse>;\n /**\n * Returns statistics for the given index, including a document count and storage usage.\n * @param indexName The name of the index for which to retrieve statistics.\n * @param options The options parameters.\n */\n getStatistics(\n indexName: string,\n options?: IndexesGetStatisticsOptionalParams\n ): Promise<IndexesGetStatisticsResponse>;\n /**\n * Shows how an analyzer breaks text into tokens.\n * @param indexName The name of the index for which to test an analyzer.\n * @param request The text and analyzer or analysis components to test.\n * @param options The options parameters.\n */\n analyze(\n indexName: string,\n request: AnalyzeRequest,\n options?: IndexesAnalyzeOptionalParams\n ): Promise<IndexesAnalyzeResponse>;\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=skillsets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse,\n SkillNames,\n SkillsetsResetSkillsOptionalParams\n} from \"../models\";\n\n/** Interface representing a Skillsets. */\nexport interface Skillsets {\n /**\n * Creates a new skillset in a search service or updates the skillset if it already exists.\n * @param skillsetName The name of the skillset to create or update.\n * @param skillset The skillset containing one or more skills to create or update in a search service.\n * @param options The options parameters.\n */\n createOrUpdate(\n skillsetName: string,\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOrUpdateOptionalParams\n ): Promise<SkillsetsCreateOrUpdateResponse>;\n /**\n * Deletes a skillset in a search service.\n * @param skillsetName The name of the skillset to delete.\n * @param options The options parameters.\n */\n delete(\n skillsetName: string,\n options?: SkillsetsDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves a skillset in a search service.\n * @param skillsetName The name of the skillset to retrieve.\n * @param options The options parameters.\n */\n get(\n skillsetName: string,\n options?: SkillsetsGetOptionalParams\n ): Promise<SkillsetsGetResponse>;\n /**\n * List all skillsets in a search service.\n * @param options The options parameters.\n */\n list(options?: SkillsetsListOptionalParams): Promise<SkillsetsListResponse>;\n /**\n * Creates a new skillset in a search service.\n * @param skillset The skillset containing one or more skills to create in a search service.\n * @param options The options parameters.\n */\n create(\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOptionalParams\n ): Promise<SkillsetsCreateResponse>;\n /**\n * 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}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=synonymMaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operationsInterfaces/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n SynonymMap,\n SynonymMapsCreateOrUpdateOptionalParams,\n SynonymMapsCreateOrUpdateResponse,\n SynonymMapsDeleteOptionalParams,\n SynonymMapsGetOptionalParams,\n SynonymMapsGetResponse,\n SynonymMapsListOptionalParams,\n SynonymMapsListResponse,\n SynonymMapsCreateOptionalParams,\n SynonymMapsCreateResponse\n} from \"../models\";\n\n/** Interface representing a SynonymMaps. */\nexport interface SynonymMaps {\n /**\n * Creates a new synonym map or updates a synonym map if it already exists.\n * @param synonymMapName The name of the synonym map to create or update.\n * @param synonymMap The definition of the synonym map to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n synonymMapName: string,\n synonymMap: SynonymMap,\n options?: SynonymMapsCreateOrUpdateOptionalParams\n ): Promise<SynonymMapsCreateOrUpdateResponse>;\n /**\n * Deletes a synonym map.\n * @param synonymMapName The name of the synonym map to delete.\n * @param options The options parameters.\n */\n delete(\n synonymMapName: string,\n options?: SynonymMapsDeleteOptionalParams\n ): Promise<void>;\n /**\n * Retrieves a synonym map definition.\n * @param synonymMapName The name of the synonym map to retrieve.\n * @param options The options parameters.\n */\n get(\n synonymMapName: string,\n options?: SynonymMapsGetOptionalParams\n ): Promise<SynonymMapsGetResponse>;\n /**\n * Lists all synonym maps available for a search service.\n * @param options The options parameters.\n */\n list(\n options?: SynonymMapsListOptionalParams\n ): Promise<SynonymMapsListResponse>;\n /**\n * Creates a new synonym map.\n * @param synonymMap The definition of the synonym map to create.\n * @param options The options parameters.\n */\n create(\n synonymMap: SynonymMap,\n options?: SynonymMapsCreateOptionalParams\n ): Promise<SynonymMapsCreateResponse>;\n}\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
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
|
|
9
|
-
import
|
|
8
|
+
import * as coreClient from "@azure/core-client";
|
|
9
|
+
import * as coreHttpCompat from "@azure/core-http-compat";
|
|
10
|
+
import { DataSourcesImpl, IndexersImpl, SkillsetsImpl, SynonymMapsImpl, IndexesImpl, AliasesImpl } from "./operations";
|
|
10
11
|
import * as Parameters from "./models/parameters";
|
|
11
12
|
import * as Mappers from "./models/mappers";
|
|
12
|
-
import { SearchServiceClientContext } from "./searchServiceClientContext";
|
|
13
13
|
/** @internal */
|
|
14
|
-
export class SearchServiceClient extends
|
|
14
|
+
export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {
|
|
15
15
|
/**
|
|
16
16
|
* Initializes a new instance of the SearchServiceClient class.
|
|
17
17
|
* @param endpoint The endpoint URL of the search service.
|
|
@@ -19,26 +19,48 @@ export class SearchServiceClient extends SearchServiceClientContext {
|
|
|
19
19
|
* @param options The parameter options
|
|
20
20
|
*/
|
|
21
21
|
constructor(endpoint, apiVersion, options) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
var _a, _b;
|
|
23
|
+
if (endpoint === undefined) {
|
|
24
|
+
throw new Error("'endpoint' cannot be null");
|
|
25
|
+
}
|
|
26
|
+
if (apiVersion === undefined) {
|
|
27
|
+
throw new Error("'apiVersion' cannot be null");
|
|
28
|
+
}
|
|
29
|
+
// Initializing default values for options
|
|
30
|
+
if (!options) {
|
|
31
|
+
options = {};
|
|
32
|
+
}
|
|
33
|
+
const defaults = {
|
|
34
|
+
requestContentType: "application/json; charset=utf-8"
|
|
35
|
+
};
|
|
36
|
+
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
|
|
37
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
38
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
39
|
+
: `${packageDetails}`;
|
|
40
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
41
|
+
userAgentPrefix
|
|
42
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
|
|
43
|
+
super(optionsWithDefaults);
|
|
44
|
+
// Parameter assignments
|
|
45
|
+
this.endpoint = endpoint;
|
|
46
|
+
this.apiVersion = apiVersion;
|
|
47
|
+
this.dataSources = new DataSourcesImpl(this);
|
|
48
|
+
this.indexers = new IndexersImpl(this);
|
|
49
|
+
this.skillsets = new SkillsetsImpl(this);
|
|
50
|
+
this.synonymMaps = new SynonymMapsImpl(this);
|
|
51
|
+
this.indexes = new IndexesImpl(this);
|
|
52
|
+
this.aliases = new AliasesImpl(this);
|
|
28
53
|
}
|
|
29
54
|
/**
|
|
30
55
|
* Gets service level statistics for a search service.
|
|
31
56
|
* @param options The options parameters.
|
|
32
57
|
*/
|
|
33
58
|
getServiceStatistics(options) {
|
|
34
|
-
|
|
35
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
36
|
-
};
|
|
37
|
-
return this.sendOperationRequest(operationArguments, getServiceStatisticsOperationSpec);
|
|
59
|
+
return this.sendOperationRequest({ options }, getServiceStatisticsOperationSpec);
|
|
38
60
|
}
|
|
39
61
|
}
|
|
40
62
|
// Operation Specifications
|
|
41
|
-
const serializer =
|
|
63
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
42
64
|
const getServiceStatisticsOperationSpec = {
|
|
43
65
|
path: "/servicestats",
|
|
44
66
|
httpMethod: "GET",
|
|
@@ -52,7 +74,7 @@ const getServiceStatisticsOperationSpec = {
|
|
|
52
74
|
},
|
|
53
75
|
queryParameters: [Parameters.apiVersion],
|
|
54
76
|
urlParameters: [Parameters.endpoint],
|
|
55
|
-
headerParameters: [Parameters.accept
|
|
77
|
+
headerParameters: [Parameters.accept],
|
|
56
78
|
serializer
|
|
57
79
|
};
|
|
58
80
|
//# sourceMappingURL=searchServiceClient.js.map
|