@azure/search-documents 11.3.0-beta.6 → 11.3.0
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/CHANGELOG.md +28 -0
- package/README.md +73 -35
- package/dist/index.js +839 -2940
- 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 +0 -1
- package/dist-esm/src/generated/data/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js +1 -202
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js +1 -138
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/data/models/parameters.js +13 -72
- package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js +51 -23
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/searchClient.js +2 -2
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/data/searchClientContext.js +11 -13
- package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
- package/dist-esm/src/generated/service/index.js +0 -1
- package/dist-esm/src/generated/service/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js +1 -904
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/mappers.js +11 -674
- package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/service/models/parameters.js +1 -37
- package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/service/operations/dataSources.js +30 -13
- package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexers.js +45 -45
- package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexes.js +40 -11
- package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
- package/dist-esm/src/generated/service/operations/skillsets.js +30 -43
- package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
- package/dist-esm/src/generated/service/operations/synonymMaps.js +29 -9
- package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js +12 -9
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClientContext.js +11 -13
- 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 +3 -4
- 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.map +1 -1
- package/dist-esm/src/odataMetadataPolicy.js +15 -7
- package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
- package/dist-esm/src/searchApiKeyCredentialPolicy.js +21 -8
- package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/src/searchAudience.js +21 -0
- package/dist-esm/src/searchAudience.js.map +1 -0
- package/dist-esm/src/searchClient.js +56 -77
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +57 -70
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexerClient.js +65 -119
- package/dist-esm/src/searchIndexerClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +11 -11
- 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 +31 -69
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/dist-esm/src/synonymMapHelper.js +2 -6
- package/dist-esm/src/synonymMapHelper.js.map +1 -1
- package/dist-esm/src/tracing.js +1 -1
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +38 -38
- package/types/search-documents.d.ts +188 -1049
- package/dist-esm/src/generated/data/operationsInterfaces/documents.js +0 -9
- package/dist-esm/src/generated/data/operationsInterfaces/documents.js.map +0 -1
- package/dist-esm/src/generated/data/operationsInterfaces/index.js +0 -9
- package/dist-esm/src/generated/data/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js +0 -9
- package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js.map +0 -1
- package/dist-esm/src/generated/service/operationsInterfaces/index.js +0 -13
- package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/generated/service/operationsInterfaces/indexers.js +0 -9
- package/dist-esm/src/generated/service/operationsInterfaces/indexers.js.map +0 -1
- package/dist-esm/src/generated/service/operationsInterfaces/indexes.js +0 -9
- package/dist-esm/src/generated/service/operationsInterfaces/indexes.js.map +0 -1
- package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js +0 -9
- package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js.map +0 -1
- package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js +0 -9
- package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
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 { SearchIndexerDataSource as SearchIndexerDataSourceMapper,
|
|
8
|
+
import { SearchIndexerDataSource as SearchIndexerDataSourceMapper, SearchIndexer as SearchIndexerMapper, SearchIndexerSkillset as SearchIndexerSkillsetMapper, SynonymMap as SynonymMapMapper, SearchIndex as SearchIndexMapper, AnalyzeRequest as AnalyzeRequestMapper } from "../models/mappers";
|
|
9
9
|
export const contentType = {
|
|
10
10
|
parameterPath: ["options", "contentType"],
|
|
11
11
|
mapper: {
|
|
@@ -101,15 +101,6 @@ export const apiVersion = {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
export const skipIndexerResetRequirementForCache = {
|
|
105
|
-
parameterPath: ["options", "skipIndexerResetRequirementForCache"],
|
|
106
|
-
mapper: {
|
|
107
|
-
serializedName: "ignoreResetRequirements",
|
|
108
|
-
type: {
|
|
109
|
-
name: "Boolean"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
104
|
export const select = {
|
|
114
105
|
parameterPath: ["options", "select"],
|
|
115
106
|
mapper: {
|
|
@@ -129,33 +120,10 @@ export const indexerName = {
|
|
|
129
120
|
}
|
|
130
121
|
}
|
|
131
122
|
};
|
|
132
|
-
export const keysOrIds = {
|
|
133
|
-
parameterPath: ["options", "keysOrIds"],
|
|
134
|
-
mapper: DocumentKeysOrIdsMapper
|
|
135
|
-
};
|
|
136
|
-
export const overwrite = {
|
|
137
|
-
parameterPath: ["options", "overwrite"],
|
|
138
|
-
mapper: {
|
|
139
|
-
defaultValue: false,
|
|
140
|
-
serializedName: "overwrite",
|
|
141
|
-
type: {
|
|
142
|
-
name: "Boolean"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
123
|
export const indexer = {
|
|
147
124
|
parameterPath: "indexer",
|
|
148
125
|
mapper: SearchIndexerMapper
|
|
149
126
|
};
|
|
150
|
-
export const disableCacheReprocessingChangeDetection = {
|
|
151
|
-
parameterPath: ["options", "disableCacheReprocessingChangeDetection"],
|
|
152
|
-
mapper: {
|
|
153
|
-
serializedName: "disableCacheReprocessingChangeDetection",
|
|
154
|
-
type: {
|
|
155
|
-
name: "Boolean"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
127
|
export const skillset = {
|
|
160
128
|
parameterPath: "skillset",
|
|
161
129
|
mapper: SearchIndexerSkillsetMapper
|
|
@@ -170,10 +138,6 @@ export const skillsetName = {
|
|
|
170
138
|
}
|
|
171
139
|
}
|
|
172
140
|
};
|
|
173
|
-
export const skillNames = {
|
|
174
|
-
parameterPath: "skillNames",
|
|
175
|
-
mapper: SkillNamesMapper
|
|
176
|
-
};
|
|
177
141
|
export const synonymMap = {
|
|
178
142
|
parameterPath: "synonymMap",
|
|
179
143
|
mapper: SynonymMapMapper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/service/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,uBAAuB,IAAI,6BAA6B,EACxD,iBAAiB,IAAI,uBAAuB,EAC5C,aAAa,IAAI,mBAAmB,EACpC,qBAAqB,IAAI,2BAA2B,EACpD,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,EAC9B,WAAW,IAAI,iBAAiB,EAChC,cAAc,IAAI,oBAAoB,EACvC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAuB;IAC5C,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE,6BAA6B;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UA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E,oBAAoB;QACpC,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAuB;IACzC,aAAa,EAAE,SAAS;IACxB,MAAM,EAAE,oBAAoB;CAC7B,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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n SearchIndexerDataSource as SearchIndexerDataSourceMapper,\n DocumentKeysOrIds as DocumentKeysOrIdsMapper,\n SearchIndexer as SearchIndexerMapper,\n SearchIndexerSkillset as SearchIndexerSkillsetMapper,\n SkillNames as SkillNamesMapper,\n SynonymMap as SynonymMapMapper,\n SearchIndex as SearchIndexMapper,\n AnalyzeRequest as AnalyzeRequestMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const dataSource: OperationParameter = {\n parameterPath: \"dataSource\",\n mapper: SearchIndexerDataSourceMapper\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const dataSourceName: OperationURLParameter = {\n parameterPath: \"dataSourceName\",\n mapper: {\n serializedName: \"dataSourceName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const xMsClientRequestId: OperationParameter = {\n parameterPath: [\"options\", \"requestOptionsParam\", \"xMsClientRequestId\"],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"Uuid\"\n }\n }\n};\n\nexport const ifMatch: OperationParameter = {\n parameterPath: [\"options\", \"ifMatch\"],\n mapper: {\n serializedName: \"If-Match\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const ifNoneMatch: OperationParameter = {\n parameterPath: [\"options\", \"ifNoneMatch\"],\n mapper: {\n serializedName: \"If-None-Match\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const prefer: OperationParameter = {\n parameterPath: \"prefer\",\n mapper: {\n defaultValue: \"return=representation\",\n isConstant: true,\n serializedName: \"Prefer\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n serializedName: \"api-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const skipIndexerResetRequirementForCache: OperationQueryParameter = {\n parameterPath: [\"options\", \"skipIndexerResetRequirementForCache\"],\n mapper: {\n serializedName: \"ignoreResetRequirements\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const select: OperationQueryParameter = {\n parameterPath: [\"options\", \"select\"],\n mapper: {\n serializedName: \"$select\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const indexerName: OperationURLParameter = {\n parameterPath: \"indexerName\",\n mapper: {\n serializedName: \"indexerName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const keysOrIds: OperationParameter = {\n parameterPath: [\"options\", \"keysOrIds\"],\n mapper: DocumentKeysOrIdsMapper\n};\n\nexport const overwrite: OperationQueryParameter = {\n parameterPath: [\"options\", \"overwrite\"],\n mapper: {\n defaultValue: false,\n serializedName: \"overwrite\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const indexer: OperationParameter = {\n parameterPath: \"indexer\",\n mapper: SearchIndexerMapper\n};\n\nexport const disableCacheReprocessingChangeDetection: OperationQueryParameter = {\n parameterPath: [\"options\", \"disableCacheReprocessingChangeDetection\"],\n mapper: {\n serializedName: \"disableCacheReprocessingChangeDetection\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const skillset: OperationParameter = {\n parameterPath: \"skillset\",\n mapper: SearchIndexerSkillsetMapper\n};\n\nexport const skillsetName: OperationURLParameter = {\n parameterPath: \"skillsetName\",\n mapper: {\n serializedName: \"skillsetName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const skillNames: OperationParameter = {\n parameterPath: \"skillNames\",\n mapper: SkillNamesMapper\n};\n\nexport const synonymMap: OperationParameter = {\n parameterPath: \"synonymMap\",\n mapper: SynonymMapMapper\n};\n\nexport const synonymMapName: OperationURLParameter = {\n parameterPath: \"synonymMapName\",\n mapper: {\n serializedName: \"synonymMapName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const index: OperationParameter = {\n parameterPath: \"index\",\n mapper: SearchIndexMapper\n};\n\nexport const indexName: OperationURLParameter = {\n parameterPath: \"indexName\",\n mapper: {\n serializedName: \"indexName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const allowIndexDowntime: OperationQueryParameter = {\n parameterPath: [\"options\", \"allowIndexDowntime\"],\n mapper: {\n serializedName: \"allowIndexDowntime\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const request: OperationParameter = {\n parameterPath: \"request\",\n mapper: AnalyzeRequestMapper\n};\n"]}
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/service/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,uBAAuB,IAAI,6BAA6B,EACxD,aAAa,IAAI,mBAAmB,EACpC,qBAAqB,IAAI,2BAA2B,EACpD,UAAU,IAAI,gBAAgB,EAC9B,WAAW,IAAI,iBAAiB,EAChC,cAAc,IAAI,oBAAoB,EACvC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,WAAW,G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ft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-http\";\nimport {\n SearchIndexerDataSource as SearchIndexerDataSourceMapper,\n SearchIndexer as SearchIndexerMapper,\n SearchIndexerSkillset as SearchIndexerSkillsetMapper,\n SynonymMap as SynonymMapMapper,\n SearchIndex as SearchIndexMapper,\n AnalyzeRequest as AnalyzeRequestMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const dataSource: OperationParameter = {\n parameterPath: \"dataSource\",\n mapper: SearchIndexerDataSourceMapper\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const dataSourceName: OperationURLParameter = {\n parameterPath: \"dataSourceName\",\n mapper: {\n serializedName: \"dataSourceName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const xMsClientRequestId: OperationParameter = {\n parameterPath: [\"options\", \"requestOptionsParam\", \"xMsClientRequestId\"],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"Uuid\"\n }\n }\n};\n\nexport const ifMatch: OperationParameter = {\n parameterPath: [\"options\", \"ifMatch\"],\n mapper: {\n serializedName: \"If-Match\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const ifNoneMatch: OperationParameter = {\n parameterPath: [\"options\", \"ifNoneMatch\"],\n mapper: {\n serializedName: \"If-None-Match\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const prefer: OperationParameter = {\n parameterPath: \"prefer\",\n mapper: {\n defaultValue: \"return=representation\",\n isConstant: true,\n serializedName: \"Prefer\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n serializedName: \"api-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const select: OperationQueryParameter = {\n parameterPath: [\"options\", \"select\"],\n mapper: {\n serializedName: \"$select\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const indexerName: OperationURLParameter = {\n parameterPath: \"indexerName\",\n mapper: {\n serializedName: \"indexerName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const indexer: OperationParameter = {\n parameterPath: \"indexer\",\n mapper: SearchIndexerMapper\n};\n\nexport const skillset: OperationParameter = {\n parameterPath: \"skillset\",\n mapper: SearchIndexerSkillsetMapper\n};\n\nexport const skillsetName: OperationURLParameter = {\n parameterPath: \"skillsetName\",\n mapper: {\n serializedName: \"skillsetName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const synonymMap: OperationParameter = {\n parameterPath: \"synonymMap\",\n mapper: SynonymMapMapper\n};\n\nexport const synonymMapName: OperationURLParameter = {\n parameterPath: \"synonymMapName\",\n mapper: {\n serializedName: \"synonymMapName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const index: OperationParameter = {\n parameterPath: \"index\",\n mapper: SearchIndexMapper\n};\n\nexport const indexName: OperationURLParameter = {\n parameterPath: \"indexName\",\n mapper: {\n serializedName: \"indexName\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const allowIndexDowntime: OperationQueryParameter = {\n parameterPath: [\"options\", \"allowIndexDowntime\"],\n mapper: {\n serializedName: \"allowIndexDowntime\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const request: OperationParameter = {\n parameterPath: \"request\",\n mapper: AnalyzeRequestMapper\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 coreHttp from "@azure/core-http";
|
|
9
9
|
import * as Mappers from "../models/mappers";
|
|
10
10
|
import * as Parameters from "../models/parameters";
|
|
11
|
-
/** Class
|
|
12
|
-
export class
|
|
11
|
+
/** Class representing a DataSources. */
|
|
12
|
+
export class DataSources {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize a new instance of the class DataSources class.
|
|
15
15
|
* @param client Reference to the service client
|
|
@@ -24,7 +24,12 @@ export class DataSourcesImpl {
|
|
|
24
24
|
* @param options The options parameters.
|
|
25
25
|
*/
|
|
26
26
|
createOrUpdate(dataSourceName, dataSource, options) {
|
|
27
|
-
|
|
27
|
+
const operationArguments = {
|
|
28
|
+
dataSourceName,
|
|
29
|
+
dataSource,
|
|
30
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
31
|
+
};
|
|
32
|
+
return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
|
|
28
33
|
}
|
|
29
34
|
/**
|
|
30
35
|
* Deletes a datasource.
|
|
@@ -32,7 +37,11 @@ export class DataSourcesImpl {
|
|
|
32
37
|
* @param options The options parameters.
|
|
33
38
|
*/
|
|
34
39
|
delete(dataSourceName, options) {
|
|
35
|
-
|
|
40
|
+
const operationArguments = {
|
|
41
|
+
dataSourceName,
|
|
42
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
43
|
+
};
|
|
44
|
+
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
|
36
45
|
}
|
|
37
46
|
/**
|
|
38
47
|
* Retrieves a datasource definition.
|
|
@@ -40,14 +49,21 @@ export class DataSourcesImpl {
|
|
|
40
49
|
* @param options The options parameters.
|
|
41
50
|
*/
|
|
42
51
|
get(dataSourceName, options) {
|
|
43
|
-
|
|
52
|
+
const operationArguments = {
|
|
53
|
+
dataSourceName,
|
|
54
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
55
|
+
};
|
|
56
|
+
return this.client.sendOperationRequest(operationArguments, getOperationSpec);
|
|
44
57
|
}
|
|
45
58
|
/**
|
|
46
59
|
* Lists all datasources available for a search service.
|
|
47
60
|
* @param options The options parameters.
|
|
48
61
|
*/
|
|
49
62
|
list(options) {
|
|
50
|
-
|
|
63
|
+
const operationArguments = {
|
|
64
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
65
|
+
};
|
|
66
|
+
return this.client.sendOperationRequest(operationArguments, listOperationSpec);
|
|
51
67
|
}
|
|
52
68
|
/**
|
|
53
69
|
* Creates a new datasource.
|
|
@@ -55,11 +71,15 @@ export class DataSourcesImpl {
|
|
|
55
71
|
* @param options The options parameters.
|
|
56
72
|
*/
|
|
57
73
|
create(dataSource, options) {
|
|
58
|
-
|
|
74
|
+
const operationArguments = {
|
|
75
|
+
dataSource,
|
|
76
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
77
|
+
};
|
|
78
|
+
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
|
59
79
|
}
|
|
60
80
|
}
|
|
61
81
|
// Operation Specifications
|
|
62
|
-
const serializer =
|
|
82
|
+
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
|
63
83
|
const createOrUpdateOperationSpec = {
|
|
64
84
|
path: "/datasources('{dataSourceName}')",
|
|
65
85
|
httpMethod: "PUT",
|
|
@@ -75,10 +95,7 @@ const createOrUpdateOperationSpec = {
|
|
|
75
95
|
}
|
|
76
96
|
},
|
|
77
97
|
requestBody: Parameters.dataSource,
|
|
78
|
-
queryParameters: [
|
|
79
|
-
Parameters.apiVersion,
|
|
80
|
-
Parameters.skipIndexerResetRequirementForCache
|
|
81
|
-
],
|
|
98
|
+
queryParameters: [Parameters.apiVersion],
|
|
82
99
|
urlParameters: [Parameters.endpoint, Parameters.dataSourceName],
|
|
83
100
|
headerParameters: [
|
|
84
101
|
Parameters.contentType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/dataSources.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,MAAkC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,cAAsB,EACtB,UAAmC,EACnC,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,OAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,UAAmC,EACnC,OAAyC;QAEzC,OA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AW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,kBAAkB;KAC9B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { DataSources } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClientContext } from \"../searchServiceClientContext\";\nimport {\n SearchIndexerDataSource,\n DataSourcesCreateOrUpdateOptionalParams,\n DataSourcesCreateOrUpdateResponse,\n DataSourcesDeleteOptionalParams,\n DataSourcesGetOptionalParams,\n DataSourcesGetResponse,\n DataSourcesListOptionalParams,\n DataSourcesListResponse,\n DataSourcesCreateOptionalParams,\n DataSourcesCreateResponse\n} from \"../models\";\n\n/** Class containing DataSources operations. */\nexport class DataSourcesImpl implements DataSources {\n private readonly client: SearchServiceClientContext;\n\n /**\n * Initialize a new instance of the class DataSources class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClientContext) {\n this.client = client;\n }\n\n /**\n * Creates a new 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 return this.client.sendOperationRequest(\n { dataSourceName, dataSource, options },\n createOrUpdateOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { dataSourceName, options },\n deleteOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { dataSourceName, options },\n getOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\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 return this.client.sendOperationRequest(\n { dataSource, options },\n createOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.dataSource,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache\n ],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\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.dataSourceName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListDataSourcesResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.dataSource,\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":"dataSources.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/dataSources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAA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;AACF,MAAM,mBAAmB,GAA2B;IAClD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,kBAAkB;KAC9B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\nimport {\n SearchIndexerDataSource,\n DataSourcesCreateOrUpdateOptionalParams,\n DataSourcesCreateOrUpdateResponse,\n DataSourcesDeleteOptionalParams,\n DataSourcesGetOptionalParams,\n DataSourcesGetResponse,\n DataSourcesListOptionalParams,\n DataSourcesListResponse,\n DataSourcesCreateOptionalParams,\n DataSourcesCreateResponse\n} from \"../models\";\n\n/** Class representing a DataSources. */\nexport class DataSources {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class DataSources 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 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 const operationArguments: coreHttp.OperationArguments = {\n dataSourceName,\n dataSource,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOrUpdateOperationSpec\n ) as Promise<DataSourcesCreateOrUpdateResponse>;\n }\n\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<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n dataSourceName,\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 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 const operationArguments: coreHttp.OperationArguments = {\n dataSourceName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getOperationSpec\n ) as Promise<DataSourcesGetResponse>;\n }\n\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 const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n listOperationSpec\n ) as Promise<DataSourcesListResponse>;\n }\n\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 const operationArguments: coreHttp.OperationArguments = {\n dataSource,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOperationSpec\n ) as Promise<DataSourcesCreateResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreHttp.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.dataSource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\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: \"/datasources('{dataSourceName}')\",\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.dataSourceName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreHttp.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst listOperationSpec: coreHttp.OperationSpec = {\n path: \"/datasources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListDataSourcesResult\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: \"/datasources\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerDataSource\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.dataSource,\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"]}
|
|
@@ -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 coreHttp from "@azure/core-http";
|
|
9
9
|
import * as Mappers from "../models/mappers";
|
|
10
10
|
import * as Parameters from "../models/parameters";
|
|
11
|
-
/** Class
|
|
12
|
-
export class
|
|
11
|
+
/** Class representing a Indexers. */
|
|
12
|
+
export class Indexers {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize a new instance of the class Indexers class.
|
|
15
15
|
* @param client Reference to the service client
|
|
@@ -23,15 +23,11 @@ export class IndexersImpl {
|
|
|
23
23
|
* @param options The options parameters.
|
|
24
24
|
*/
|
|
25
25
|
reset(indexerName, options) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* @param options The options parameters.
|
|
32
|
-
*/
|
|
33
|
-
resetDocs(indexerName, options) {
|
|
34
|
-
return this.client.sendOperationRequest({ indexerName, options }, resetDocsOperationSpec);
|
|
26
|
+
const operationArguments = {
|
|
27
|
+
indexerName,
|
|
28
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
29
|
+
};
|
|
30
|
+
return this.client.sendOperationRequest(operationArguments, resetOperationSpec);
|
|
35
31
|
}
|
|
36
32
|
/**
|
|
37
33
|
* Runs an indexer on-demand.
|
|
@@ -39,7 +35,11 @@ export class IndexersImpl {
|
|
|
39
35
|
* @param options The options parameters.
|
|
40
36
|
*/
|
|
41
37
|
run(indexerName, options) {
|
|
42
|
-
|
|
38
|
+
const operationArguments = {
|
|
39
|
+
indexerName,
|
|
40
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
41
|
+
};
|
|
42
|
+
return this.client.sendOperationRequest(operationArguments, runOperationSpec);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Creates a new indexer or updates an indexer if it already exists.
|
|
@@ -48,7 +48,12 @@ export class IndexersImpl {
|
|
|
48
48
|
* @param options The options parameters.
|
|
49
49
|
*/
|
|
50
50
|
createOrUpdate(indexerName, indexer, options) {
|
|
51
|
-
|
|
51
|
+
const operationArguments = {
|
|
52
|
+
indexerName,
|
|
53
|
+
indexer,
|
|
54
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
55
|
+
};
|
|
56
|
+
return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
|
|
52
57
|
}
|
|
53
58
|
/**
|
|
54
59
|
* Deletes an indexer.
|
|
@@ -56,7 +61,11 @@ export class IndexersImpl {
|
|
|
56
61
|
* @param options The options parameters.
|
|
57
62
|
*/
|
|
58
63
|
delete(indexerName, options) {
|
|
59
|
-
|
|
64
|
+
const operationArguments = {
|
|
65
|
+
indexerName,
|
|
66
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
67
|
+
};
|
|
68
|
+
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
|
60
69
|
}
|
|
61
70
|
/**
|
|
62
71
|
* Retrieves an indexer definition.
|
|
@@ -64,14 +73,21 @@ export class IndexersImpl {
|
|
|
64
73
|
* @param options The options parameters.
|
|
65
74
|
*/
|
|
66
75
|
get(indexerName, options) {
|
|
67
|
-
|
|
76
|
+
const operationArguments = {
|
|
77
|
+
indexerName,
|
|
78
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
79
|
+
};
|
|
80
|
+
return this.client.sendOperationRequest(operationArguments, getOperationSpec);
|
|
68
81
|
}
|
|
69
82
|
/**
|
|
70
83
|
* Lists all indexers available for a search service.
|
|
71
84
|
* @param options The options parameters.
|
|
72
85
|
*/
|
|
73
86
|
list(options) {
|
|
74
|
-
|
|
87
|
+
const operationArguments = {
|
|
88
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
89
|
+
};
|
|
90
|
+
return this.client.sendOperationRequest(operationArguments, listOperationSpec);
|
|
75
91
|
}
|
|
76
92
|
/**
|
|
77
93
|
* Creates a new indexer.
|
|
@@ -79,7 +95,11 @@ export class IndexersImpl {
|
|
|
79
95
|
* @param options The options parameters.
|
|
80
96
|
*/
|
|
81
97
|
create(indexer, options) {
|
|
82
|
-
|
|
98
|
+
const operationArguments = {
|
|
99
|
+
indexer,
|
|
100
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
101
|
+
};
|
|
102
|
+
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
|
83
103
|
}
|
|
84
104
|
/**
|
|
85
105
|
* Returns the current status and execution history of an indexer.
|
|
@@ -87,11 +107,15 @@ export class IndexersImpl {
|
|
|
87
107
|
* @param options The options parameters.
|
|
88
108
|
*/
|
|
89
109
|
getStatus(indexerName, options) {
|
|
90
|
-
|
|
110
|
+
const operationArguments = {
|
|
111
|
+
indexerName,
|
|
112
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
113
|
+
};
|
|
114
|
+
return this.client.sendOperationRequest(operationArguments, getStatusOperationSpec);
|
|
91
115
|
}
|
|
92
116
|
}
|
|
93
117
|
// Operation Specifications
|
|
94
|
-
const serializer =
|
|
118
|
+
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
|
95
119
|
const resetOperationSpec = {
|
|
96
120
|
path: "/indexers('{indexerName}')/search.reset",
|
|
97
121
|
httpMethod: "POST",
|
|
@@ -106,26 +130,6 @@ const resetOperationSpec = {
|
|
|
106
130
|
headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
|
|
107
131
|
serializer
|
|
108
132
|
};
|
|
109
|
-
const resetDocsOperationSpec = {
|
|
110
|
-
path: "/indexers('{indexerName}')/search.resetdocs",
|
|
111
|
-
httpMethod: "POST",
|
|
112
|
-
responses: {
|
|
113
|
-
204: {},
|
|
114
|
-
default: {
|
|
115
|
-
bodyMapper: Mappers.SearchError
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
requestBody: Parameters.keysOrIds,
|
|
119
|
-
queryParameters: [Parameters.apiVersion, Parameters.overwrite],
|
|
120
|
-
urlParameters: [Parameters.endpoint, Parameters.indexerName],
|
|
121
|
-
headerParameters: [
|
|
122
|
-
Parameters.contentType,
|
|
123
|
-
Parameters.accept,
|
|
124
|
-
Parameters.xMsClientRequestId
|
|
125
|
-
],
|
|
126
|
-
mediaType: "json",
|
|
127
|
-
serializer
|
|
128
|
-
};
|
|
129
133
|
const runOperationSpec = {
|
|
130
134
|
path: "/indexers('{indexerName}')/search.run",
|
|
131
135
|
httpMethod: "POST",
|
|
@@ -155,11 +159,7 @@ const createOrUpdateOperationSpec = {
|
|
|
155
159
|
}
|
|
156
160
|
},
|
|
157
161
|
requestBody: Parameters.indexer,
|
|
158
|
-
queryParameters: [
|
|
159
|
-
Parameters.apiVersion,
|
|
160
|
-
Parameters.skipIndexerResetRequirementForCache,
|
|
161
|
-
Parameters.disableCacheReprocessingChangeDetection
|
|
162
|
-
],
|
|
162
|
+
queryParameters: [Parameters.apiVersion],
|
|
163
163
|
urlParameters: [Parameters.endpoint, Parameters.indexerName],
|
|
164
164
|
headerParameters: [
|
|
165
165
|
Parameters.contentType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAoBnD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAkC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CACH,WAAmB,EACnB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CACP,WAAmB,EACnB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,sBAAsB,CACvB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,WAAmB,EAAE,OAAmC;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,WAAmB,EACnB,OAAsB,EACtB,OAA8C;QAE9C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EACjC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,WAAmB,EACnB,OAAsC;QAEtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,O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UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Indexers } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClientContext } from \"../searchServiceClientContext\";\nimport {\n 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/** Class containing Indexers operations. */\nexport class IndexersImpl implements Indexers {\n private readonly client: SearchServiceClientContext;\n\n /**\n * Initialize a new instance of the class Indexers class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClientContext) {\n this.client = client;\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, options },\n resetOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, options },\n resetDocsOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, options },\n runOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, indexer, options },\n createOrUpdateOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, options },\n deleteOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, options },\n getOperationSpec\n );\n }\n\n /**\n * Lists all indexers available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexersListOptionalParams): Promise<IndexersListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\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 return this.client.sendOperationRequest(\n { indexer, options },\n createOperationSpec\n );\n }\n\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 return this.client.sendOperationRequest(\n { indexerName, options },\n getStatusOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst resetOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.reset\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst resetDocsOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.resetdocs\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.keysOrIds,\n queryParameters: [Parameters.apiVersion, Parameters.overwrite],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\nconst runOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.run\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer\n },\n 201: {\n bodyMapper: Mappers.SearchIndexer\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.indexer,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer\n ],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\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.indexerName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexersResult\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexer\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.indexer,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\nconst getStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerStatus\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexers.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;AAmBnD,qCAAqC;AACrC,MAAM,OAAO,QAAQ;IAGnB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CACH,WAAmB,EACnB,OAAqC;QAErC,MAAM,kBAAkB,GAAgC;YACtD,WAAW;YACX,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,kBAAkB,EAClB,kBAAkB,CACe,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,WAAmB,EACnB,OAAmC;QAEnC,MAAM,kBAAkB,GAAgC;YACtD,WAAW;YACX,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,kBAAkB,EAClB,gBAAgB,CACiB,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACH,cAAc,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jB,UAAU,CAAC,kBAAkB;KAC9B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA2B;IACrD,IAAI,EAAE,0CAA0C;IAChD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClient } from \"../searchServiceClient\";\nimport {\n IndexersResetOptionalParams,\n IndexersRunOptionalParams,\n SearchIndexer,\n IndexersCreateOrUpdateOptionalParams,\n IndexersCreateOrUpdateResponse,\n IndexersDeleteOptionalParams,\n IndexersGetOptionalParams,\n IndexersGetResponse,\n IndexersListOptionalParams,\n IndexersListResponse,\n IndexersCreateOptionalParams,\n IndexersCreateResponse,\n IndexersGetStatusOptionalParams,\n IndexersGetStatusResponse\n} from \"../models\";\n\n/** Class representing a Indexers. */\nexport class Indexers {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Indexers class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\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<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexerName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n resetOperationSpec\n ) as Promise<coreHttp.RestResponse>;\n }\n\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(\n indexerName: string,\n options?: IndexersRunOptionalParams\n ): Promise<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexerName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n runOperationSpec\n ) as Promise<coreHttp.RestResponse>;\n }\n\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 const operationArguments: coreHttp.OperationArguments = {\n indexerName,\n indexer,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOrUpdateOperationSpec\n ) as Promise<IndexersCreateOrUpdateResponse>;\n }\n\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<coreHttp.RestResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n indexerName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n deleteOperationSpec\n ) as Promise<coreHttp.RestResponse>;\n }\n\n /**\n * Retrieves an 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 const operationArguments: coreHttp.OperationArguments = {\n indexerName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getOperationSpec\n ) as Promise<IndexersGetResponse>;\n }\n\n /**\n * Lists all indexers available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexersListOptionalParams): Promise<IndexersListResponse> {\n const operationArguments: coreHttp.OperationArguments = {\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n listOperationSpec\n ) as Promise<IndexersListResponse>;\n }\n\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 const operationArguments: coreHttp.OperationArguments = {\n indexer,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n createOperationSpec\n ) as Promise<IndexersCreateResponse>;\n }\n\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 const operationArguments: coreHttp.OperationArguments = {\n indexerName,\n options: coreHttp.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(\n operationArguments,\n getStatusOperationSpec\n ) as Promise<IndexersGetStatusResponse>;\n }\n}\n// Operation Specifications\nconst serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);\n\nconst resetOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.reset\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst runOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.run\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst createOrUpdateOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer\n },\n 201: {\n bodyMapper: Mappers.SearchIndexer\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.indexer,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\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: \"/indexers('{indexerName}')\",\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.indexerName],\n headerParameters: [\n Parameters.accept,\n Parameters.xMsClientRequestId,\n Parameters.ifMatch,\n Parameters.ifNoneMatch\n ],\n serializer\n};\nconst getOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\n serializer\n};\nconst listOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexersResult\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: \"/indexers\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexer\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n requestBody: Parameters.indexer,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.xMsClientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\nconst getStatusOperationSpec: coreHttp.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerStatus\n },\n default: {\n bodyMapper: Mappers.SearchError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],\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 coreHttp from "@azure/core-http";
|
|
9
9
|
import * as Mappers from "../models/mappers";
|
|
10
10
|
import * as Parameters from "../models/parameters";
|
|
11
|
-
/** Class
|
|
12
|
-
export class
|
|
11
|
+
/** Class representing a Indexes. */
|
|
12
|
+
export class Indexes {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize a new instance of the class Indexes class.
|
|
15
15
|
* @param client Reference to the service client
|
|
@@ -23,14 +23,21 @@ export class IndexesImpl {
|
|
|
23
23
|
* @param options The options parameters.
|
|
24
24
|
*/
|
|
25
25
|
create(index, options) {
|
|
26
|
-
|
|
26
|
+
const operationArguments = {
|
|
27
|
+
index,
|
|
28
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
29
|
+
};
|
|
30
|
+
return this.client.sendOperationRequest(operationArguments, createOperationSpec);
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Lists all indexes available for a search service.
|
|
30
34
|
* @param options The options parameters.
|
|
31
35
|
*/
|
|
32
36
|
list(options) {
|
|
33
|
-
|
|
37
|
+
const operationArguments = {
|
|
38
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
39
|
+
};
|
|
40
|
+
return this.client.sendOperationRequest(operationArguments, listOperationSpec);
|
|
34
41
|
}
|
|
35
42
|
/**
|
|
36
43
|
* Creates a new search index or updates an index if it already exists.
|
|
@@ -39,7 +46,12 @@ export class IndexesImpl {
|
|
|
39
46
|
* @param options The options parameters.
|
|
40
47
|
*/
|
|
41
48
|
createOrUpdate(indexName, index, options) {
|
|
42
|
-
|
|
49
|
+
const operationArguments = {
|
|
50
|
+
indexName,
|
|
51
|
+
index,
|
|
52
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
53
|
+
};
|
|
54
|
+
return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
|
|
43
55
|
}
|
|
44
56
|
/**
|
|
45
57
|
* Deletes a search index and all the documents it contains. This operation is permanent, with no
|
|
@@ -49,7 +61,11 @@ export class IndexesImpl {
|
|
|
49
61
|
* @param options The options parameters.
|
|
50
62
|
*/
|
|
51
63
|
delete(indexName, options) {
|
|
52
|
-
|
|
64
|
+
const operationArguments = {
|
|
65
|
+
indexName,
|
|
66
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
67
|
+
};
|
|
68
|
+
return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
|
|
53
69
|
}
|
|
54
70
|
/**
|
|
55
71
|
* Retrieves an index definition.
|
|
@@ -57,7 +73,11 @@ export class IndexesImpl {
|
|
|
57
73
|
* @param options The options parameters.
|
|
58
74
|
*/
|
|
59
75
|
get(indexName, options) {
|
|
60
|
-
|
|
76
|
+
const operationArguments = {
|
|
77
|
+
indexName,
|
|
78
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
79
|
+
};
|
|
80
|
+
return this.client.sendOperationRequest(operationArguments, getOperationSpec);
|
|
61
81
|
}
|
|
62
82
|
/**
|
|
63
83
|
* Returns statistics for the given index, including a document count and storage usage.
|
|
@@ -65,7 +85,11 @@ export class IndexesImpl {
|
|
|
65
85
|
* @param options The options parameters.
|
|
66
86
|
*/
|
|
67
87
|
getStatistics(indexName, options) {
|
|
68
|
-
|
|
88
|
+
const operationArguments = {
|
|
89
|
+
indexName,
|
|
90
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
91
|
+
};
|
|
92
|
+
return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
|
|
69
93
|
}
|
|
70
94
|
/**
|
|
71
95
|
* Shows how an analyzer breaks text into tokens.
|
|
@@ -74,11 +98,16 @@ export class IndexesImpl {
|
|
|
74
98
|
* @param options The options parameters.
|
|
75
99
|
*/
|
|
76
100
|
analyze(indexName, request, options) {
|
|
77
|
-
|
|
101
|
+
const operationArguments = {
|
|
102
|
+
indexName,
|
|
103
|
+
request,
|
|
104
|
+
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
|
|
105
|
+
};
|
|
106
|
+
return this.client.sendOperationRequest(operationArguments, analyzeOperationSpec);
|
|
78
107
|
}
|
|
79
108
|
}
|
|
80
109
|
// Operation Specifications
|
|
81
|
-
const serializer =
|
|
110
|
+
const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
|
|
82
111
|
const createOperationSpec = {
|
|
83
112
|
path: "/indexes",
|
|
84
113
|
httpMethod: "POST",
|