@azure/search-documents 11.3.1 → 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 +3887 -997
- 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 +741 -16
- 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 -233
|
@@ -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 Documents operations. */
|
|
12
|
+
export class DocumentsImpl {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize a new instance of the class Documents class.
|
|
15
15
|
* @param client Reference to the service client
|
|
@@ -22,20 +22,14 @@ export class Documents {
|
|
|
22
22
|
* @param options The options parameters.
|
|
23
23
|
*/
|
|
24
24
|
count(options) {
|
|
25
|
-
|
|
26
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
27
|
-
};
|
|
28
|
-
return this.client.sendOperationRequest(operationArguments, countOperationSpec);
|
|
25
|
+
return this.client.sendOperationRequest({ options }, countOperationSpec);
|
|
29
26
|
}
|
|
30
27
|
/**
|
|
31
28
|
* Searches for documents in the index.
|
|
32
29
|
* @param options The options parameters.
|
|
33
30
|
*/
|
|
34
31
|
searchGet(options) {
|
|
35
|
-
|
|
36
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
37
|
-
};
|
|
38
|
-
return this.client.sendOperationRequest(operationArguments, searchGetOperationSpec);
|
|
32
|
+
return this.client.sendOperationRequest({ options }, searchGetOperationSpec);
|
|
39
33
|
}
|
|
40
34
|
/**
|
|
41
35
|
* Searches for documents in the index.
|
|
@@ -43,11 +37,7 @@ export class Documents {
|
|
|
43
37
|
* @param options The options parameters.
|
|
44
38
|
*/
|
|
45
39
|
searchPost(searchRequest, options) {
|
|
46
|
-
|
|
47
|
-
searchRequest,
|
|
48
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
49
|
-
};
|
|
50
|
-
return this.client.sendOperationRequest(operationArguments, searchPostOperationSpec);
|
|
40
|
+
return this.client.sendOperationRequest({ searchRequest, options }, searchPostOperationSpec);
|
|
51
41
|
}
|
|
52
42
|
/**
|
|
53
43
|
* Retrieves a document from the index.
|
|
@@ -55,11 +45,7 @@ export class Documents {
|
|
|
55
45
|
* @param options The options parameters.
|
|
56
46
|
*/
|
|
57
47
|
get(key, options) {
|
|
58
|
-
|
|
59
|
-
key,
|
|
60
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
61
|
-
};
|
|
62
|
-
return this.client.sendOperationRequest(operationArguments, getOperationSpec);
|
|
48
|
+
return this.client.sendOperationRequest({ key, options }, getOperationSpec);
|
|
63
49
|
}
|
|
64
50
|
/**
|
|
65
51
|
* Suggests documents in the index that match the given partial query text.
|
|
@@ -70,12 +56,7 @@ export class Documents {
|
|
|
70
56
|
* @param options The options parameters.
|
|
71
57
|
*/
|
|
72
58
|
suggestGet(searchText, suggesterName, options) {
|
|
73
|
-
|
|
74
|
-
searchText,
|
|
75
|
-
suggesterName,
|
|
76
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
77
|
-
};
|
|
78
|
-
return this.client.sendOperationRequest(operationArguments, suggestGetOperationSpec);
|
|
59
|
+
return this.client.sendOperationRequest({ searchText, suggesterName, options }, suggestGetOperationSpec);
|
|
79
60
|
}
|
|
80
61
|
/**
|
|
81
62
|
* Suggests documents in the index that match the given partial query text.
|
|
@@ -83,11 +64,7 @@ export class Documents {
|
|
|
83
64
|
* @param options The options parameters.
|
|
84
65
|
*/
|
|
85
66
|
suggestPost(suggestRequest, options) {
|
|
86
|
-
|
|
87
|
-
suggestRequest,
|
|
88
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
89
|
-
};
|
|
90
|
-
return this.client.sendOperationRequest(operationArguments, suggestPostOperationSpec);
|
|
67
|
+
return this.client.sendOperationRequest({ suggestRequest, options }, suggestPostOperationSpec);
|
|
91
68
|
}
|
|
92
69
|
/**
|
|
93
70
|
* Sends a batch of document write actions to the index.
|
|
@@ -95,11 +72,7 @@ export class Documents {
|
|
|
95
72
|
* @param options The options parameters.
|
|
96
73
|
*/
|
|
97
74
|
index(batch, options) {
|
|
98
|
-
|
|
99
|
-
batch,
|
|
100
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
101
|
-
};
|
|
102
|
-
return this.client.sendOperationRequest(operationArguments, indexOperationSpec);
|
|
75
|
+
return this.client.sendOperationRequest({ batch, options }, indexOperationSpec);
|
|
103
76
|
}
|
|
104
77
|
/**
|
|
105
78
|
* Autocompletes incomplete query terms based on input text and matching terms in the index.
|
|
@@ -109,12 +82,7 @@ export class Documents {
|
|
|
109
82
|
* @param options The options parameters.
|
|
110
83
|
*/
|
|
111
84
|
autocompleteGet(searchText, suggesterName, options) {
|
|
112
|
-
|
|
113
|
-
searchText,
|
|
114
|
-
suggesterName,
|
|
115
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
116
|
-
};
|
|
117
|
-
return this.client.sendOperationRequest(operationArguments, autocompleteGetOperationSpec);
|
|
85
|
+
return this.client.sendOperationRequest({ searchText, suggesterName, options }, autocompleteGetOperationSpec);
|
|
118
86
|
}
|
|
119
87
|
/**
|
|
120
88
|
* Autocompletes incomplete query terms based on input text and matching terms in the index.
|
|
@@ -122,15 +90,11 @@ export class Documents {
|
|
|
122
90
|
* @param options The options parameters.
|
|
123
91
|
*/
|
|
124
92
|
autocompletePost(autocompleteRequest, options) {
|
|
125
|
-
|
|
126
|
-
autocompleteRequest,
|
|
127
|
-
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
128
|
-
};
|
|
129
|
-
return this.client.sendOperationRequest(operationArguments, autocompletePostOperationSpec);
|
|
93
|
+
return this.client.sendOperationRequest({ autocompleteRequest, options }, autocompletePostOperationSpec);
|
|
130
94
|
}
|
|
131
95
|
}
|
|
132
96
|
// Operation Specifications
|
|
133
|
-
const serializer =
|
|
97
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
134
98
|
const countOperationSpec = {
|
|
135
99
|
path: "/docs/$count",
|
|
136
100
|
httpMethod: "GET",
|
|
@@ -144,7 +108,7 @@ const countOperationSpec = {
|
|
|
144
108
|
},
|
|
145
109
|
queryParameters: [Parameters.apiVersion],
|
|
146
110
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
147
|
-
headerParameters: [Parameters.accept
|
|
111
|
+
headerParameters: [Parameters.accept],
|
|
148
112
|
serializer
|
|
149
113
|
};
|
|
150
114
|
const searchGetOperationSpec = {
|
|
@@ -172,16 +136,22 @@ const searchGetOperationSpec = {
|
|
|
172
136
|
Parameters.queryType,
|
|
173
137
|
Parameters.scoringParameters,
|
|
174
138
|
Parameters.scoringProfile,
|
|
139
|
+
Parameters.semanticConfiguration,
|
|
175
140
|
Parameters.searchFields,
|
|
141
|
+
Parameters.queryLanguage,
|
|
142
|
+
Parameters.speller,
|
|
143
|
+
Parameters.answers,
|
|
176
144
|
Parameters.searchMode,
|
|
177
145
|
Parameters.scoringStatistics,
|
|
178
146
|
Parameters.sessionId,
|
|
179
147
|
Parameters.select,
|
|
180
148
|
Parameters.skip,
|
|
181
|
-
Parameters.top
|
|
149
|
+
Parameters.top,
|
|
150
|
+
Parameters.captions,
|
|
151
|
+
Parameters.semanticFields
|
|
182
152
|
],
|
|
183
153
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
184
|
-
headerParameters: [Parameters.accept
|
|
154
|
+
headerParameters: [Parameters.accept],
|
|
185
155
|
serializer
|
|
186
156
|
};
|
|
187
157
|
const searchPostOperationSpec = {
|
|
@@ -198,11 +168,7 @@ const searchPostOperationSpec = {
|
|
|
198
168
|
requestBody: Parameters.searchRequest,
|
|
199
169
|
queryParameters: [Parameters.apiVersion],
|
|
200
170
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
201
|
-
headerParameters: [
|
|
202
|
-
Parameters.accept,
|
|
203
|
-
Parameters.xMsClientRequestId,
|
|
204
|
-
Parameters.contentType
|
|
205
|
-
],
|
|
171
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
206
172
|
mediaType: "json",
|
|
207
173
|
serializer
|
|
208
174
|
};
|
|
@@ -211,7 +177,9 @@ const getOperationSpec = {
|
|
|
211
177
|
httpMethod: "GET",
|
|
212
178
|
responses: {
|
|
213
179
|
200: {
|
|
214
|
-
bodyMapper: {
|
|
180
|
+
bodyMapper: {
|
|
181
|
+
type: { name: "Dictionary", value: { type: { name: "any" } } }
|
|
182
|
+
}
|
|
215
183
|
},
|
|
216
184
|
default: {
|
|
217
185
|
bodyMapper: Mappers.SearchError
|
|
@@ -219,7 +187,7 @@ const getOperationSpec = {
|
|
|
219
187
|
},
|
|
220
188
|
queryParameters: [Parameters.apiVersion, Parameters.selectedFields],
|
|
221
189
|
urlParameters: [Parameters.endpoint, Parameters.indexName, Parameters.key],
|
|
222
|
-
headerParameters: [Parameters.accept
|
|
190
|
+
headerParameters: [Parameters.accept],
|
|
223
191
|
serializer
|
|
224
192
|
};
|
|
225
193
|
const suggestGetOperationSpec = {
|
|
@@ -248,7 +216,7 @@ const suggestGetOperationSpec = {
|
|
|
248
216
|
Parameters.top1
|
|
249
217
|
],
|
|
250
218
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
251
|
-
headerParameters: [Parameters.accept
|
|
219
|
+
headerParameters: [Parameters.accept],
|
|
252
220
|
serializer
|
|
253
221
|
};
|
|
254
222
|
const suggestPostOperationSpec = {
|
|
@@ -265,11 +233,7 @@ const suggestPostOperationSpec = {
|
|
|
265
233
|
requestBody: Parameters.suggestRequest,
|
|
266
234
|
queryParameters: [Parameters.apiVersion],
|
|
267
235
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
268
|
-
headerParameters: [
|
|
269
|
-
Parameters.accept,
|
|
270
|
-
Parameters.xMsClientRequestId,
|
|
271
|
-
Parameters.contentType
|
|
272
|
-
],
|
|
236
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
273
237
|
mediaType: "json",
|
|
274
238
|
serializer
|
|
275
239
|
};
|
|
@@ -290,11 +254,7 @@ const indexOperationSpec = {
|
|
|
290
254
|
requestBody: Parameters.batch,
|
|
291
255
|
queryParameters: [Parameters.apiVersion],
|
|
292
256
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
293
|
-
headerParameters: [
|
|
294
|
-
Parameters.accept,
|
|
295
|
-
Parameters.xMsClientRequestId,
|
|
296
|
-
Parameters.contentType
|
|
297
|
-
],
|
|
257
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
298
258
|
mediaType: "json",
|
|
299
259
|
serializer
|
|
300
260
|
};
|
|
@@ -323,7 +283,7 @@ const autocompleteGetOperationSpec = {
|
|
|
323
283
|
Parameters.top2
|
|
324
284
|
],
|
|
325
285
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
326
|
-
headerParameters: [Parameters.accept
|
|
286
|
+
headerParameters: [Parameters.accept],
|
|
327
287
|
serializer
|
|
328
288
|
};
|
|
329
289
|
const autocompletePostOperationSpec = {
|
|
@@ -340,11 +300,7 @@ const autocompletePostOperationSpec = {
|
|
|
340
300
|
requestBody: Parameters.autocompleteRequest,
|
|
341
301
|
queryParameters: [Parameters.apiVersion],
|
|
342
302
|
urlParameters: [Parameters.endpoint, Parameters.indexName],
|
|
343
|
-
headerParameters: [
|
|
344
|
-
Parameters.accept,
|
|
345
|
-
Parameters.xMsClientRequestId,
|
|
346
|
-
Parameters.contentType
|
|
347
|
-
],
|
|
303
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
348
304
|
mediaType: "json",
|
|
349
305
|
serializer
|
|
350
306
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../../../src/generated/data/operations/documents.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;AA2BnD,sCAAsC;AACtC,MAAM,OAAO,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAAoB;QAC9B,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CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA2B;IAC5D,IAAI,EAAE,gCAAgC;IACtC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,kBAAkB;SACvC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,mBAAmB;IAC3C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE;QAChB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,kBAAkB;QAC7B,UAAU,CAAC,WAAW;KACvB;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 { SearchClient } from \"../searchClient\";\nimport {\n DocumentsCountOptionalParams,\n DocumentsCountResponse,\n DocumentsSearchGetOptionalParams,\n DocumentsSearchGetResponse,\n SearchRequest,\n DocumentsSearchPostOptionalParams,\n DocumentsSearchPostResponse,\n DocumentsGetOptionalParams,\n DocumentsGetResponse,\n DocumentsSuggestGetOptionalParams,\n DocumentsSuggestGetResponse,\n SuggestRequest,\n DocumentsSuggestPostOptionalParams,\n DocumentsSuggestPostResponse,\n IndexBatch,\n DocumentsIndexOptionalParams,\n DocumentsIndexResponse,\n DocumentsAutocompleteGetOptionalParams,\n DocumentsAutocompleteGetResponse,\n AutocompleteRequest,\n DocumentsAutocompletePostOptionalParams,\n DocumentsAutocompletePostResponse\n} from \"../models\";\n\n/** Class representing a Documents. */\nexport class Documents {\n private readonly client: SearchClient;\n\n /**\n * Initialize a new instance of the class Documents class.\n * @param client Reference to the service client\n */\n constructor(client: SearchClient) {\n this.client = client;\n }\n\n /**\n * Queries the number of documents in the index.\n * @param options The options parameters.\n */\n count(\n options?: DocumentsCountOptionalParams\n ): Promise<DocumentsCountResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n countOperationSpec\n ) as Promise<DocumentsCountResponse>;\n }\n\n /**\n * Searches for documents in the index.\n * @param options The options parameters.\n */\n searchGet(\n options?: DocumentsSearchGetOptionalParams\n ): Promise<DocumentsSearchGetResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n searchGetOperationSpec\n ) as Promise<DocumentsSearchGetResponse>;\n }\n\n /**\n * Searches for documents in the index.\n * @param searchRequest The definition of the Search request.\n * @param options The options parameters.\n */\n searchPost(\n searchRequest: SearchRequest,\n options?: DocumentsSearchPostOptionalParams\n ): Promise<DocumentsSearchPostResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n searchRequest,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n searchPostOperationSpec\n ) as Promise<DocumentsSearchPostResponse>;\n }\n\n /**\n * Retrieves a document from the index.\n * @param key The key of the document to retrieve.\n * @param options The options parameters.\n */\n get(\n key: string,\n options?: DocumentsGetOptionalParams\n ): Promise<DocumentsGetResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n key,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getOperationSpec\n ) as Promise<DocumentsGetResponse>;\n }\n\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param searchText The search text to use to suggest documents. Must be at least 1 character, and no\n * more than 100 characters.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n suggestGet(\n searchText: string,\n suggesterName: string,\n options?: DocumentsSuggestGetOptionalParams\n ): Promise<DocumentsSuggestGetResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n searchText,\n suggesterName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n suggestGetOperationSpec\n ) as Promise<DocumentsSuggestGetResponse>;\n }\n\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param suggestRequest The Suggest request.\n * @param options The options parameters.\n */\n suggestPost(\n suggestRequest: SuggestRequest,\n options?: DocumentsSuggestPostOptionalParams\n ): Promise<DocumentsSuggestPostResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n suggestRequest,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n suggestPostOperationSpec\n ) as Promise<DocumentsSuggestPostResponse>;\n }\n\n /**\n * Sends a batch of document write actions to the index.\n * @param batch The batch of index actions.\n * @param options The options parameters.\n */\n index(\n batch: IndexBatch,\n options?: DocumentsIndexOptionalParams\n ): Promise<DocumentsIndexResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n batch,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n indexOperationSpec\n ) as Promise<DocumentsIndexResponse>;\n }\n\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param searchText The incomplete term which should be auto-completed.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n autocompleteGet(\n searchText: string,\n suggesterName: string,\n options?: DocumentsAutocompleteGetOptionalParams\n ): Promise<DocumentsAutocompleteGetResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n searchText,\n suggesterName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n autocompleteGetOperationSpec\n ) as Promise<DocumentsAutocompleteGetResponse>;\n }\n\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param autocompleteRequest The definition of the Autocomplete request.\n * @param options The options parameters.\n */\n autocompletePost(\n autocompleteRequest: AutocompleteRequest,\n options?: DocumentsAutocompletePostOptionalParams\n ): Promise<DocumentsAutocompletePostResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n autocompleteRequest,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n autocompletePostOperationSpec\n ) as Promise<DocumentsAutocompletePostResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst countOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/$count\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: { type: { name: \"Number\" } }\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 searchGetOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText,\n Parameters.includeTotalResultCount,\n Parameters.facets,\n Parameters.filter,\n Parameters.highlightFields,\n Parameters.highlightPostTag,\n Parameters.highlightPreTag,\n Parameters.minimumCoverage,\n Parameters.orderBy,\n Parameters.queryType,\n Parameters.scoringParameters,\n Parameters.scoringProfile,\n Parameters.searchFields,\n Parameters.searchMode,\n Parameters.scoringStatistics,\n Parameters.sessionId,\n Parameters.select,\n Parameters.skip,\n Parameters.top\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst searchPostOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/search.post.search\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.searchRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.contentType\n ],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs('{key}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: { type: { name: \"any\" } }\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.selectedFields],\n urlParameters: [Parameters.endpoint, Parameters.indexName, Parameters.key],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst suggestGetOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/search.suggest\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText1,\n Parameters.suggesterName,\n Parameters.filter1,\n Parameters.useFuzzyMatching,\n Parameters.highlightPostTag1,\n Parameters.highlightPreTag1,\n Parameters.minimumCoverage1,\n Parameters.orderBy1,\n Parameters.searchFields1,\n Parameters.select1,\n Parameters.top1\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst suggestPostOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/search.post.suggest\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.suggestRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.contentType\n ],\n mediaType: \"json\",\n serializer\n};\nconst indexOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/search.index\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.IndexDocumentsResult\n },\n 207: {\n bodyMapper: Mappers.IndexDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.batch,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.contentType\n ],\n mediaType: \"json\",\n serializer\n};\nconst autocompleteGetOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/search.autocomplete\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutocompleteResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText1,\n Parameters.suggesterName,\n Parameters.autocompleteMode,\n Parameters.filter2,\n Parameters.useFuzzyMatching1,\n Parameters.highlightPostTag2,\n Parameters.highlightPreTag2,\n Parameters.minimumCoverage2,\n Parameters.searchFields2,\n Parameters.top2\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst autocompletePostOperationSpec: coreHttp.OperationSpec = {\n path: \"/docs/search.post.autocomplete\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutocompleteResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.autocompleteRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.contentType\n ],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../../../src/generated/data/operations/documents.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;AA2BnD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IAGxB;;;OAGG;IACH,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CACH,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,SAAS,CACP,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,sBAAsB,CACvB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,UAAU,CACR,aAA4B,EAC5B,OAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,aAAa,EAAE,OAAO,EAAE,EAC1B,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,GAAW,EACX,OAAoC;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;OAOG;IACH,U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AAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,mBAAmB;IAC3C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,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 { Documents } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchClient } from \"../searchClient\";\nimport {\n DocumentsCountOptionalParams,\n DocumentsCountResponse,\n DocumentsSearchGetOptionalParams,\n DocumentsSearchGetResponse,\n SearchRequest,\n DocumentsSearchPostOptionalParams,\n DocumentsSearchPostResponse,\n DocumentsGetOptionalParams,\n DocumentsGetResponse,\n DocumentsSuggestGetOptionalParams,\n DocumentsSuggestGetResponse,\n SuggestRequest,\n DocumentsSuggestPostOptionalParams,\n DocumentsSuggestPostResponse,\n IndexBatch,\n DocumentsIndexOptionalParams,\n DocumentsIndexResponse,\n DocumentsAutocompleteGetOptionalParams,\n DocumentsAutocompleteGetResponse,\n AutocompleteRequest,\n DocumentsAutocompletePostOptionalParams,\n DocumentsAutocompletePostResponse\n} from \"../models\";\n\n/** Class containing Documents operations. */\nexport class DocumentsImpl implements Documents {\n private readonly client: SearchClient;\n\n /**\n * Initialize a new instance of the class Documents class.\n * @param client Reference to the service client\n */\n constructor(client: SearchClient) {\n this.client = client;\n }\n\n /**\n * Queries the number of documents in the index.\n * @param options The options parameters.\n */\n count(\n options?: DocumentsCountOptionalParams\n ): Promise<DocumentsCountResponse> {\n return this.client.sendOperationRequest({ options }, countOperationSpec);\n }\n\n /**\n * Searches for documents in the index.\n * @param options The options parameters.\n */\n searchGet(\n options?: DocumentsSearchGetOptionalParams\n ): Promise<DocumentsSearchGetResponse> {\n return this.client.sendOperationRequest(\n { options },\n searchGetOperationSpec\n );\n }\n\n /**\n * Searches for documents in the index.\n * @param searchRequest The definition of the Search request.\n * @param options The options parameters.\n */\n searchPost(\n searchRequest: SearchRequest,\n options?: DocumentsSearchPostOptionalParams\n ): Promise<DocumentsSearchPostResponse> {\n return this.client.sendOperationRequest(\n { searchRequest, options },\n searchPostOperationSpec\n );\n }\n\n /**\n * Retrieves a document from the index.\n * @param key The key of the document to retrieve.\n * @param options The options parameters.\n */\n get(\n key: string,\n options?: DocumentsGetOptionalParams\n ): Promise<DocumentsGetResponse> {\n return this.client.sendOperationRequest({ key, options }, getOperationSpec);\n }\n\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param searchText The search text to use to suggest documents. Must be at least 1 character, and no\n * more than 100 characters.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n suggestGet(\n searchText: string,\n suggesterName: string,\n options?: DocumentsSuggestGetOptionalParams\n ): Promise<DocumentsSuggestGetResponse> {\n return this.client.sendOperationRequest(\n { searchText, suggesterName, options },\n suggestGetOperationSpec\n );\n }\n\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param suggestRequest The Suggest request.\n * @param options The options parameters.\n */\n suggestPost(\n suggestRequest: SuggestRequest,\n options?: DocumentsSuggestPostOptionalParams\n ): Promise<DocumentsSuggestPostResponse> {\n return this.client.sendOperationRequest(\n { suggestRequest, options },\n suggestPostOperationSpec\n );\n }\n\n /**\n * Sends a batch of document write actions to the index.\n * @param batch The batch of index actions.\n * @param options The options parameters.\n */\n index(\n batch: IndexBatch,\n options?: DocumentsIndexOptionalParams\n ): Promise<DocumentsIndexResponse> {\n return this.client.sendOperationRequest(\n { batch, options },\n indexOperationSpec\n );\n }\n\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param searchText The incomplete term which should be auto-completed.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n autocompleteGet(\n searchText: string,\n suggesterName: string,\n options?: DocumentsAutocompleteGetOptionalParams\n ): Promise<DocumentsAutocompleteGetResponse> {\n return this.client.sendOperationRequest(\n { searchText, suggesterName, options },\n autocompleteGetOperationSpec\n );\n }\n\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param autocompleteRequest The definition of the Autocomplete request.\n * @param options The options parameters.\n */\n autocompletePost(\n autocompleteRequest: AutocompleteRequest,\n options?: DocumentsAutocompletePostOptionalParams\n ): Promise<DocumentsAutocompletePostResponse> {\n return this.client.sendOperationRequest(\n { autocompleteRequest, options },\n autocompletePostOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst countOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/$count\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: { type: { name: \"Number\" } }\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 searchGetOperationSpec: coreClient.OperationSpec = {\n path: \"/docs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText,\n Parameters.includeTotalResultCount,\n Parameters.facets,\n Parameters.filter,\n Parameters.highlightFields,\n Parameters.highlightPostTag,\n Parameters.highlightPreTag,\n Parameters.minimumCoverage,\n Parameters.orderBy,\n Parameters.queryType,\n Parameters.scoringParameters,\n Parameters.scoringProfile,\n Parameters.semanticConfiguration,\n Parameters.searchFields,\n Parameters.queryLanguage,\n Parameters.speller,\n Parameters.answers,\n Parameters.searchMode,\n Parameters.scoringStatistics,\n Parameters.sessionId,\n Parameters.select,\n Parameters.skip,\n Parameters.top,\n Parameters.captions,\n Parameters.semanticFields\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst searchPostOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/search.post.search\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.searchRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/docs('{key}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Dictionary\", value: { type: { name: \"any\" } } }\n }\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.selectedFields],\n urlParameters: [Parameters.endpoint, Parameters.indexName, Parameters.key],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst suggestGetOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/search.suggest\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText1,\n Parameters.suggesterName,\n Parameters.filter1,\n Parameters.useFuzzyMatching,\n Parameters.highlightPostTag1,\n Parameters.highlightPreTag1,\n Parameters.minimumCoverage1,\n Parameters.orderBy1,\n Parameters.searchFields1,\n Parameters.select1,\n Parameters.top1\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst suggestPostOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/search.post.suggest\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.suggestRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst indexOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/search.index\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.IndexDocumentsResult\n },\n 207: {\n bodyMapper: Mappers.IndexDocumentsResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.batch,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst autocompleteGetOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/search.autocomplete\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutocompleteResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [\n Parameters.apiVersion,\n Parameters.searchText1,\n Parameters.suggesterName,\n Parameters.autocompleteMode,\n Parameters.filter2,\n Parameters.useFuzzyMatching1,\n Parameters.highlightPostTag2,\n Parameters.highlightPreTag2,\n Parameters.minimumCoverage2,\n Parameters.searchFields2,\n Parameters.top2\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst autocompletePostOperationSpec: coreClient.OperationSpec = {\n path: \"/docs/search.post.autocomplete\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AutocompleteResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.autocompleteRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept, Parameters.contentType],\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=documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../../../src/generated/data/operationsInterfaces/documents.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 DocumentsCountOptionalParams,\n DocumentsCountResponse,\n DocumentsSearchGetOptionalParams,\n DocumentsSearchGetResponse,\n SearchRequest,\n DocumentsSearchPostOptionalParams,\n DocumentsSearchPostResponse,\n DocumentsGetOptionalParams,\n DocumentsGetResponse,\n DocumentsSuggestGetOptionalParams,\n DocumentsSuggestGetResponse,\n SuggestRequest,\n DocumentsSuggestPostOptionalParams,\n DocumentsSuggestPostResponse,\n IndexBatch,\n DocumentsIndexOptionalParams,\n DocumentsIndexResponse,\n DocumentsAutocompleteGetOptionalParams,\n DocumentsAutocompleteGetResponse,\n AutocompleteRequest,\n DocumentsAutocompletePostOptionalParams,\n DocumentsAutocompletePostResponse\n} from \"../models\";\n\n/** Interface representing a Documents. */\nexport interface Documents {\n /**\n * Queries the number of documents in the index.\n * @param options The options parameters.\n */\n count(\n options?: DocumentsCountOptionalParams\n ): Promise<DocumentsCountResponse>;\n /**\n * Searches for documents in the index.\n * @param options The options parameters.\n */\n searchGet(\n options?: DocumentsSearchGetOptionalParams\n ): Promise<DocumentsSearchGetResponse>;\n /**\n * Searches for documents in the index.\n * @param searchRequest The definition of the Search request.\n * @param options The options parameters.\n */\n searchPost(\n searchRequest: SearchRequest,\n options?: DocumentsSearchPostOptionalParams\n ): Promise<DocumentsSearchPostResponse>;\n /**\n * Retrieves a document from the index.\n * @param key The key of the document to retrieve.\n * @param options The options parameters.\n */\n get(\n key: string,\n options?: DocumentsGetOptionalParams\n ): Promise<DocumentsGetResponse>;\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param searchText The search text to use to suggest documents. Must be at least 1 character, and no\n * more than 100 characters.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n suggestGet(\n searchText: string,\n suggesterName: string,\n options?: DocumentsSuggestGetOptionalParams\n ): Promise<DocumentsSuggestGetResponse>;\n /**\n * Suggests documents in the index that match the given partial query text.\n * @param suggestRequest The Suggest request.\n * @param options The options parameters.\n */\n suggestPost(\n suggestRequest: SuggestRequest,\n options?: DocumentsSuggestPostOptionalParams\n ): Promise<DocumentsSuggestPostResponse>;\n /**\n * Sends a batch of document write actions to the index.\n * @param batch The batch of index actions.\n * @param options The options parameters.\n */\n index(\n batch: IndexBatch,\n options?: DocumentsIndexOptionalParams\n ): Promise<DocumentsIndexResponse>;\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param searchText The incomplete term which should be auto-completed.\n * @param suggesterName The name of the suggester as specified in the suggesters collection that's part\n * of the index definition.\n * @param options The options parameters.\n */\n autocompleteGet(\n searchText: string,\n suggesterName: string,\n options?: DocumentsAutocompleteGetOptionalParams\n ): Promise<DocumentsAutocompleteGetResponse>;\n /**\n * Autocompletes incomplete query terms based on input text and matching terms in the index.\n * @param autocompleteRequest The definition of the Autocomplete request.\n * @param options The options parameters.\n */\n autocompletePost(\n autocompleteRequest: AutocompleteRequest,\n options?: DocumentsAutocompletePostOptionalParams\n ): Promise<DocumentsAutocompletePostResponse>;\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 * from "./documents";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/data/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,aAAa,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 \"./documents\";\n"]}
|
|
@@ -5,10 +5,10 @@
|
|
|
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
|
|
9
|
-
import {
|
|
8
|
+
import * as coreHttpCompat from "@azure/core-http-compat";
|
|
9
|
+
import { DocumentsImpl } from "./operations";
|
|
10
10
|
/** @internal */
|
|
11
|
-
export class SearchClient extends
|
|
11
|
+
export class SearchClient extends coreHttpCompat.ExtendedServiceClient {
|
|
12
12
|
/**
|
|
13
13
|
* Initializes a new instance of the SearchClient class.
|
|
14
14
|
* @param endpoint The endpoint URL of the search service.
|
|
@@ -17,8 +17,36 @@ export class SearchClient extends SearchClientContext {
|
|
|
17
17
|
* @param options The parameter options
|
|
18
18
|
*/
|
|
19
19
|
constructor(endpoint, indexName, apiVersion, options) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
var _a, _b;
|
|
21
|
+
if (endpoint === undefined) {
|
|
22
|
+
throw new Error("'endpoint' cannot be null");
|
|
23
|
+
}
|
|
24
|
+
if (indexName === undefined) {
|
|
25
|
+
throw new Error("'indexName' cannot be null");
|
|
26
|
+
}
|
|
27
|
+
if (apiVersion === undefined) {
|
|
28
|
+
throw new Error("'apiVersion' cannot be null");
|
|
29
|
+
}
|
|
30
|
+
// Initializing default values for options
|
|
31
|
+
if (!options) {
|
|
32
|
+
options = {};
|
|
33
|
+
}
|
|
34
|
+
const defaults = {
|
|
35
|
+
requestContentType: "application/json; charset=utf-8"
|
|
36
|
+
};
|
|
37
|
+
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
|
|
38
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
39
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
40
|
+
: `${packageDetails}`;
|
|
41
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
42
|
+
userAgentPrefix
|
|
43
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}/indexes('{indexName}')" });
|
|
44
|
+
super(optionsWithDefaults);
|
|
45
|
+
// Parameter assignments
|
|
46
|
+
this.endpoint = endpoint;
|
|
47
|
+
this.indexName = indexName;
|
|
48
|
+
this.apiVersion = apiVersion;
|
|
49
|
+
this.documents = new DocumentsImpl(this);
|
|
22
50
|
}
|
|
23
51
|
}
|
|
24
52
|
//# sourceMappingURL=searchClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClient.js","sourceRoot":"","sources":["../../../../src/generated/data/searchClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"searchClient.js","sourceRoot":"","sources":["../../../../src/generated/data/searchClient.ts"],"names":[],"mappings":"AAAA;;;;;;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AAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CAGF","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 coreHttpCompat from \"@azure/core-http-compat\";\nimport { DocumentsImpl } from \"./operations\";\nimport { Documents } from \"./operationsInterfaces\";\nimport {\n ApiVersion20210430Preview,\n SearchClientOptionalParams\n} from \"./models\";\n\n/** @internal */\nexport class SearchClient extends coreHttpCompat.ExtendedServiceClient {\n endpoint: string;\n indexName: string;\n apiVersion: ApiVersion20210430Preview;\n\n /**\n * Initializes a new instance of the SearchClient class.\n * @param endpoint The endpoint URL of the search service.\n * @param indexName The name of the index.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n indexName: string,\n apiVersion: ApiVersion20210430Preview,\n options?: SearchClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (indexName === undefined) {\n throw new Error(\"'indexName' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri:\n options.endpoint ??\n options.baseUri ??\n \"{endpoint}/indexes('{indexName}')\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.indexName = indexName;\n this.apiVersion = apiVersion;\n this.documents = new DocumentsImpl(this);\n }\n\n documents: Documents;\n}\n"]}
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
const packageName = "@azure/search-documents";
|
|
10
|
-
const packageVersion = "11.3.1";
|
|
8
|
+
import * as coreClient from "@azure/core-client";
|
|
11
9
|
/** @internal */
|
|
12
|
-
export class SearchClientContext extends
|
|
10
|
+
export class SearchClientContext extends coreClient.ServiceClient {
|
|
13
11
|
/**
|
|
14
12
|
* Initializes a new instance of the SearchClientContext class.
|
|
15
13
|
* @param endpoint The endpoint URL of the search service.
|
|
@@ -31,13 +29,17 @@ export class SearchClientContext extends coreHttp.ServiceClient {
|
|
|
31
29
|
if (!options) {
|
|
32
30
|
options = {};
|
|
33
31
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
const defaults = {
|
|
33
|
+
requestContentType: "application/json; charset=utf-8"
|
|
34
|
+
};
|
|
35
|
+
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.7`;
|
|
36
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
37
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
38
|
+
: `${packageDetails}`;
|
|
39
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
40
|
+
userAgentPrefix
|
|
41
|
+
}, baseUri: options.endpoint || "{endpoint}/indexes('{indexName}')" });
|
|
42
|
+
super(optionsWithDefaults);
|
|
41
43
|
// Parameter assignments
|
|
42
44
|
this.endpoint = endpoint;
|
|
43
45
|
this.indexName = indexName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClientContext.js","sourceRoot":"","sources":["../../../../src/generated/data/searchClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"searchClientContext.js","sourceRoot":"","sources":["../../../../src/generated/data/searchClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,gBAAgB;AAChB,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAK/D;;;;;;OAMG;IACH,YACE,QAAgB,EAChB,SAAiB,EACjB,UAAqC,EACrC,OAAoC;QAEpC,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,IAAI,SAAS,KAAK,SAAS,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;SAC/C;QACD,IAAI,UAAU,KAAK,SAAS,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,mCAAmC,GACjE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n ApiVersion20210430Preview,\n SearchClientOptionalParams\n} from \"./models\";\n\n/** @internal */\nexport class SearchClientContext extends coreClient.ServiceClient {\n endpoint: string;\n indexName: string;\n apiVersion: ApiVersion20210430Preview;\n\n /**\n * Initializes a new instance of the SearchClientContext class.\n * @param endpoint The endpoint URL of the search service.\n * @param indexName The name of the index.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n indexName: string,\n apiVersion: ApiVersion20210430Preview,\n options?: SearchClientOptionalParams\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (indexName === undefined) {\n throw new Error(\"'indexName' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-search-documents/11.3.0-beta.7`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{endpoint}/indexes('{indexName}')\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.indexName = indexName;\n this.apiVersion = apiVersion;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/service/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/service/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,wBAAwB,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 \"./models\";\nexport { SearchServiceClient } from \"./searchServiceClient\";\nexport * from \"./operationsInterfaces\";\n"]}
|