@azure/search-documents 11.3.0-beta.2 → 11.3.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/index.js +2323 -801
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/generated/data/models/index.js +202 -1
  7. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  8. package/dist-esm/src/generated/data/models/mappers.js +6 -0
  9. package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
  10. package/dist-esm/src/generated/data/models/parameters.js +21 -13
  11. package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
  12. package/dist-esm/src/generated/data/operations/documents.js +16 -49
  13. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  14. package/dist-esm/src/generated/data/searchClientContext.js +13 -10
  15. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  16. package/dist-esm/src/generated/service/models/index.js +904 -1
  17. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  18. package/dist-esm/src/generated/service/models/mappers.js +335 -13
  19. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  20. package/dist-esm/src/generated/service/models/parameters.js +21 -3
  21. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  22. package/dist-esm/src/generated/service/operations/dataSources.js +12 -29
  23. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  24. package/dist-esm/src/generated/service/operations/indexers.js +40 -44
  25. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  26. package/dist-esm/src/generated/service/operations/indexes.js +10 -39
  27. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  28. package/dist-esm/src/generated/service/operations/skillsets.js +38 -29
  29. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  30. package/dist-esm/src/generated/service/operations/synonymMaps.js +8 -28
  31. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  32. package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js.map +1 -1
  33. package/dist-esm/src/generated/service/operationsInterfaces/indexers.js.map +1 -1
  34. package/dist-esm/src/generated/service/operationsInterfaces/indexes.js.map +1 -1
  35. package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js.map +1 -1
  36. package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js.map +1 -1
  37. package/dist-esm/src/generated/service/searchServiceClient.js +3 -6
  38. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  39. package/dist-esm/src/generated/service/searchServiceClientContext.js +13 -10
  40. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  41. package/dist-esm/src/geographyPoint.js +1 -1
  42. package/dist-esm/src/geographyPoint.js.map +1 -1
  43. package/dist-esm/src/index.js +4 -2
  44. package/dist-esm/src/index.js.map +1 -1
  45. package/dist-esm/src/indexDocumentsBatch.js +1 -1
  46. package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
  47. package/dist-esm/src/indexModels.js.map +1 -1
  48. package/dist-esm/src/odataMetadataPolicy.js +7 -15
  49. package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
  50. package/dist-esm/src/searchApiKeyCredentialPolicy.js +8 -21
  51. package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
  52. package/dist-esm/src/searchClient.js +73 -50
  53. package/dist-esm/src/searchClient.js.map +1 -1
  54. package/dist-esm/src/searchIndexClient.js +70 -53
  55. package/dist-esm/src/searchIndexClient.js.map +1 -1
  56. package/dist-esm/src/searchIndexerClient.js +119 -61
  57. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  58. package/dist-esm/src/searchIndexingBufferedSender.js +11 -11
  59. package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
  60. package/dist-esm/src/serialization.js +6 -6
  61. package/dist-esm/src/serialization.js.map +1 -1
  62. package/dist-esm/src/serviceModels.js.map +1 -1
  63. package/dist-esm/src/serviceUtils.js +33 -29
  64. package/dist-esm/src/serviceUtils.js.map +1 -1
  65. package/dist-esm/src/synonymMapHelper.js +1 -1
  66. package/dist-esm/src/synonymMapHelper.js.map +1 -1
  67. package/dist-esm/src/tracing.js +1 -1
  68. package/dist-esm/src/tracing.js.map +1 -1
  69. package/package.json +17 -28
  70. package/types/search-documents.d.ts +542 -52
@@ -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, SearchIndexer as SearchIndexerMapper, SearchIndexerSkillset as SearchIndexerSkillsetMapper, SynonymMap as SynonymMapMapper, SearchIndex as SearchIndexMapper, AnalyzeRequest as AnalyzeRequestMapper } from "../models/mappers";
8
+ import { SearchIndexerDataSource as SearchIndexerDataSourceMapper, DocumentKeysOrIds as DocumentKeysOrIdsMapper, SearchIndexer as SearchIndexerMapper, SearchIndexerSkillset as SearchIndexerSkillsetMapper, SkillNames as SkillNamesMapper, 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,8 +101,8 @@ export const apiVersion = {
101
101
  }
102
102
  }
103
103
  };
104
- export const ignoreResetRequirements = {
105
- parameterPath: ["options", "ignoreResetRequirements"],
104
+ export const skipIndexerResetRequirementForCache = {
105
+ parameterPath: ["options", "skipIndexerResetRequirementForCache"],
106
106
  mapper: {
107
107
  serializedName: "ignoreResetRequirements",
108
108
  type: {
@@ -129,6 +129,20 @@ export const indexerName = {
129
129
  }
130
130
  }
131
131
  };
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
+ };
132
146
  export const indexer = {
133
147
  parameterPath: "indexer",
134
148
  mapper: SearchIndexerMapper
@@ -156,6 +170,10 @@ export const skillsetName = {
156
170
  }
157
171
  }
158
172
  };
173
+ export const skillNames = {
174
+ parameterPath: "skillNames",
175
+ mapper: SkillNamesMapper
176
+ };
159
177
  export const synonymMap = {
160
178
  parameterPath: "synonymMap",
161
179
  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,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,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,C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M,EAAE;QACN,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAuB;IAC5C,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD,aAAa,EAAE,gBAAgB;IAC/B,MAAM,EAAE;QACN,cAAc,EAAE,gBAAgB;QAChC,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,OAAO;IACtB,MAAM,EAAE,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC9C,aAAa,EAAE,WAAW;IAC1B,MAAM,EAAE;QACN,cAAc,EAAE,WAAW;QAC3B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAA4B;IACzD,aAAa,EAAE,CAAC,SAAS,EAAE,oBAAoB,CAAC;IAChD,MAAM,EAAE;QACN,cAAc,EAAE,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-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 ignoreResetRequirements: OperationQueryParameter = {\n parameterPath: [\"options\", \"ignoreResetRequirements\"],\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 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 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,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,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAA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,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"]}
@@ -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 * as coreHttp from "@azure/core-http";
8
+ import * as coreClient from "@azure/core-client";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
- /** Class representing a DataSources. */
11
+ /** Class containing DataSources operations. */
12
12
  export class DataSourcesImpl {
13
13
  /**
14
14
  * Initialize a new instance of the class DataSources class.
@@ -24,12 +24,7 @@ export class DataSourcesImpl {
24
24
  * @param options The options parameters.
25
25
  */
26
26
  createOrUpdate(dataSourceName, dataSource, options) {
27
- const operationArguments = {
28
- dataSourceName,
29
- dataSource,
30
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
31
- };
32
- return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
27
+ return this.client.sendOperationRequest({ dataSourceName, dataSource, options }, createOrUpdateOperationSpec);
33
28
  }
34
29
  /**
35
30
  * Deletes a datasource.
@@ -37,11 +32,7 @@ export class DataSourcesImpl {
37
32
  * @param options The options parameters.
38
33
  */
39
34
  delete(dataSourceName, options) {
40
- const operationArguments = {
41
- dataSourceName,
42
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
43
- };
44
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
35
+ return this.client.sendOperationRequest({ dataSourceName, options }, deleteOperationSpec);
45
36
  }
46
37
  /**
47
38
  * Retrieves a datasource definition.
@@ -49,21 +40,14 @@ export class DataSourcesImpl {
49
40
  * @param options The options parameters.
50
41
  */
51
42
  get(dataSourceName, options) {
52
- const operationArguments = {
53
- dataSourceName,
54
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
55
- };
56
- return this.client.sendOperationRequest(operationArguments, getOperationSpec);
43
+ return this.client.sendOperationRequest({ dataSourceName, options }, getOperationSpec);
57
44
  }
58
45
  /**
59
46
  * Lists all datasources available for a search service.
60
47
  * @param options The options parameters.
61
48
  */
62
49
  list(options) {
63
- const operationArguments = {
64
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
65
- };
66
- return this.client.sendOperationRequest(operationArguments, listOperationSpec);
50
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
67
51
  }
68
52
  /**
69
53
  * Creates a new datasource.
@@ -71,15 +55,11 @@ export class DataSourcesImpl {
71
55
  * @param options The options parameters.
72
56
  */
73
57
  create(dataSource, options) {
74
- const operationArguments = {
75
- dataSource,
76
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
77
- };
78
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
58
+ return this.client.sendOperationRequest({ dataSource, options }, createOperationSpec);
79
59
  }
80
60
  }
81
61
  // Operation Specifications
82
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
62
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
83
63
  const createOrUpdateOperationSpec = {
84
64
  path: "/datasources('{dataSourceName}')",
85
65
  httpMethod: "PUT",
@@ -95,7 +75,10 @@ const createOrUpdateOperationSpec = {
95
75
  }
96
76
  },
97
77
  requestBody: Parameters.dataSource,
98
- queryParameters: [Parameters.apiVersion, Parameters.ignoreResetRequirements],
78
+ queryParameters: [
79
+ Parameters.apiVersion,
80
+ Parameters.skipIndexerResetRequirementForCache
81
+ ],
99
82
  urlParameters: [Parameters.endpoint, Parameters.dataSourceName],
100
83
  headerParameters: [
101
84
  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,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,wCAAwC;AACxC,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,MAAM,kBAAkB,GAAgC;YACtD,cAAc;YACd,UAAU;YACV,OAAO,EAAE,QAAQ,CAAC,oCAAoC,CAAC,OAAO,IAAI,EAAE,CAAC;SACtE,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,kBAAkB,EAClB,2BAA2B,CACkB,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,cAAsB,EACtB,OAAyC;QAEzC,MAAM,kBAAkB,GAAgC;YACtD,cAAc;YACd,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EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC;IAC/D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA2B;IAChD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA2B;IAClD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,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 { DataSources } from \"../operationsInterfaces\";\nimport * as coreHttp from \"@azure/core-http\";\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 representing a DataSources. */\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 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, Parameters.ignoreResetRequirements],\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"]}
1
+ {"version":3,"file":"dataSources.js","s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AAC;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"]}
@@ -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 * as coreHttp from "@azure/core-http";
8
+ import * as coreClient from "@azure/core-client";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
- /** Class representing a Indexers. */
11
+ /** Class containing Indexers operations. */
12
12
  export class IndexersImpl {
13
13
  /**
14
14
  * Initialize a new instance of the class Indexers class.
@@ -23,11 +23,15 @@ export class IndexersImpl {
23
23
  * @param options The options parameters.
24
24
  */
25
25
  reset(indexerName, options) {
26
- const operationArguments = {
27
- indexerName,
28
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
29
- };
30
- return this.client.sendOperationRequest(operationArguments, resetOperationSpec);
26
+ return this.client.sendOperationRequest({ indexerName, options }, resetOperationSpec);
27
+ }
28
+ /**
29
+ * Resets specific documents in the datasource to be selectively re-ingested by the indexer.
30
+ * @param indexerName The name of the indexer to reset documents for.
31
+ * @param options The options parameters.
32
+ */
33
+ resetDocs(indexerName, options) {
34
+ return this.client.sendOperationRequest({ indexerName, options }, resetDocsOperationSpec);
31
35
  }
32
36
  /**
33
37
  * Runs an indexer on-demand.
@@ -35,11 +39,7 @@ export class IndexersImpl {
35
39
  * @param options The options parameters.
36
40
  */
37
41
  run(indexerName, options) {
38
- const operationArguments = {
39
- indexerName,
40
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
41
- };
42
- return this.client.sendOperationRequest(operationArguments, runOperationSpec);
42
+ return this.client.sendOperationRequest({ indexerName, options }, runOperationSpec);
43
43
  }
44
44
  /**
45
45
  * Creates a new indexer or updates an indexer if it already exists.
@@ -48,12 +48,7 @@ export class IndexersImpl {
48
48
  * @param options The options parameters.
49
49
  */
50
50
  createOrUpdate(indexerName, indexer, options) {
51
- const operationArguments = {
52
- indexerName,
53
- indexer,
54
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
55
- };
56
- return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
51
+ return this.client.sendOperationRequest({ indexerName, indexer, options }, createOrUpdateOperationSpec);
57
52
  }
58
53
  /**
59
54
  * Deletes an indexer.
@@ -61,11 +56,7 @@ export class IndexersImpl {
61
56
  * @param options The options parameters.
62
57
  */
63
58
  delete(indexerName, options) {
64
- const operationArguments = {
65
- indexerName,
66
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
67
- };
68
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
59
+ return this.client.sendOperationRequest({ indexerName, options }, deleteOperationSpec);
69
60
  }
70
61
  /**
71
62
  * Retrieves an indexer definition.
@@ -73,21 +64,14 @@ export class IndexersImpl {
73
64
  * @param options The options parameters.
74
65
  */
75
66
  get(indexerName, options) {
76
- const operationArguments = {
77
- indexerName,
78
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
79
- };
80
- return this.client.sendOperationRequest(operationArguments, getOperationSpec);
67
+ return this.client.sendOperationRequest({ indexerName, options }, getOperationSpec);
81
68
  }
82
69
  /**
83
70
  * Lists all indexers available for a search service.
84
71
  * @param options The options parameters.
85
72
  */
86
73
  list(options) {
87
- const operationArguments = {
88
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
89
- };
90
- return this.client.sendOperationRequest(operationArguments, listOperationSpec);
74
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
91
75
  }
92
76
  /**
93
77
  * Creates a new indexer.
@@ -95,11 +79,7 @@ export class IndexersImpl {
95
79
  * @param options The options parameters.
96
80
  */
97
81
  create(indexer, options) {
98
- const operationArguments = {
99
- indexer,
100
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
101
- };
102
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
82
+ return this.client.sendOperationRequest({ indexer, options }, createOperationSpec);
103
83
  }
104
84
  /**
105
85
  * Returns the current status and execution history of an indexer.
@@ -107,15 +87,11 @@ export class IndexersImpl {
107
87
  * @param options The options parameters.
108
88
  */
109
89
  getStatus(indexerName, options) {
110
- const operationArguments = {
111
- indexerName,
112
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
113
- };
114
- return this.client.sendOperationRequest(operationArguments, getStatusOperationSpec);
90
+ return this.client.sendOperationRequest({ indexerName, options }, getStatusOperationSpec);
115
91
  }
116
92
  }
117
93
  // Operation Specifications
118
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
94
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
119
95
  const resetOperationSpec = {
120
96
  path: "/indexers('{indexerName}')/search.reset",
121
97
  httpMethod: "POST",
@@ -130,6 +106,26 @@ const resetOperationSpec = {
130
106
  headerParameters: [Parameters.accept, Parameters.xMsClientRequestId],
131
107
  serializer
132
108
  };
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
+ };
133
129
  const runOperationSpec = {
134
130
  path: "/indexers('{indexerName}')/search.run",
135
131
  httpMethod: "POST",
@@ -161,7 +157,7 @@ const createOrUpdateOperationSpec = {
161
157
  requestBody: Parameters.indexer,
162
158
  queryParameters: [
163
159
  Parameters.apiVersion,
164
- Parameters.ignoreResetRequirements,
160
+ Parameters.skipIndexerResetRequirementForCache,
165
161
  Parameters.disableCacheReprocessingChangeDetection
166
162
  ],
167
163
  urlParameters: [Parameters.endpoint, Parameters.indexerName],
@@ -1 +1 @@
1
- {"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,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,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAkC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;I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CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC;IACpE,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA2B;IAClD,IAAI,EAAE,WAAW;IACjB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,OAAO;IAC/B,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;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 { Indexers } from \"../operationsInterfaces\";\nimport * as coreHttp from \"@azure/core-http\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { SearchServiceClientContext } from \"../searchServiceClientContext\";\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 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<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: [\n Parameters.apiVersion,\n Parameters.ignoreResetRequirements,\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: 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"]}
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,OAA8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,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA6B;IACvD,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 { 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"]}
@@ -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 * as coreHttp from "@azure/core-http";
8
+ import * as coreClient from "@azure/core-client";
9
9
  import * as Mappers from "../models/mappers";
10
10
  import * as Parameters from "../models/parameters";
11
- /** Class representing a Indexes. */
11
+ /** Class containing Indexes operations. */
12
12
  export class IndexesImpl {
13
13
  /**
14
14
  * Initialize a new instance of the class Indexes class.
@@ -23,21 +23,14 @@ export class IndexesImpl {
23
23
  * @param options The options parameters.
24
24
  */
25
25
  create(index, options) {
26
- const operationArguments = {
27
- index,
28
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
29
- };
30
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
26
+ return this.client.sendOperationRequest({ index, options }, createOperationSpec);
31
27
  }
32
28
  /**
33
29
  * Lists all indexes available for a search service.
34
30
  * @param options The options parameters.
35
31
  */
36
32
  list(options) {
37
- const operationArguments = {
38
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
39
- };
40
- return this.client.sendOperationRequest(operationArguments, listOperationSpec);
33
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
41
34
  }
42
35
  /**
43
36
  * Creates a new search index or updates an index if it already exists.
@@ -46,12 +39,7 @@ export class IndexesImpl {
46
39
  * @param options The options parameters.
47
40
  */
48
41
  createOrUpdate(indexName, index, options) {
49
- const operationArguments = {
50
- indexName,
51
- index,
52
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
53
- };
54
- return this.client.sendOperationRequest(operationArguments, createOrUpdateOperationSpec);
42
+ return this.client.sendOperationRequest({ indexName, index, options }, createOrUpdateOperationSpec);
55
43
  }
56
44
  /**
57
45
  * Deletes a search index and all the documents it contains. This operation is permanent, with no
@@ -61,11 +49,7 @@ export class IndexesImpl {
61
49
  * @param options The options parameters.
62
50
  */
63
51
  delete(indexName, options) {
64
- const operationArguments = {
65
- indexName,
66
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
67
- };
68
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
52
+ return this.client.sendOperationRequest({ indexName, options }, deleteOperationSpec);
69
53
  }
70
54
  /**
71
55
  * Retrieves an index definition.
@@ -73,11 +57,7 @@ export class IndexesImpl {
73
57
  * @param options The options parameters.
74
58
  */
75
59
  get(indexName, options) {
76
- const operationArguments = {
77
- indexName,
78
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
79
- };
80
- return this.client.sendOperationRequest(operationArguments, getOperationSpec);
60
+ return this.client.sendOperationRequest({ indexName, options }, getOperationSpec);
81
61
  }
82
62
  /**
83
63
  * Returns statistics for the given index, including a document count and storage usage.
@@ -85,11 +65,7 @@ export class IndexesImpl {
85
65
  * @param options The options parameters.
86
66
  */
87
67
  getStatistics(indexName, options) {
88
- const operationArguments = {
89
- indexName,
90
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
91
- };
92
- return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
68
+ return this.client.sendOperationRequest({ indexName, options }, getStatisticsOperationSpec);
93
69
  }
94
70
  /**
95
71
  * Shows how an analyzer breaks text into tokens.
@@ -98,16 +74,11 @@ export class IndexesImpl {
98
74
  * @param options The options parameters.
99
75
  */
100
76
  analyze(indexName, request, options) {
101
- const operationArguments = {
102
- indexName,
103
- request,
104
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
105
- };
106
- return this.client.sendOperationRequest(operationArguments, analyzeOperationSpec);
77
+ return this.client.sendOperationRequest({ indexName, request, options }, analyzeOperationSpec);
107
78
  }
108
79
  }
109
80
  // Operation Specifications
110
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
81
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
111
82
  const createOperationSpec = {
112
83
  path: "/indexes",
113
84
  httpMethod: "POST",