@azure/search-documents 12.3.0-alpha.20260310.2 → 13.0.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.
Files changed (744) hide show
  1. package/dist/browser/base64.d.ts.map +1 -1
  2. package/dist/browser/base64.js +3 -2
  3. package/dist/browser/base64.js.map +1 -1
  4. package/dist/browser/index.d.ts +9 -7
  5. package/dist/browser/index.d.ts.map +1 -1
  6. package/dist/browser/index.js +3 -4
  7. package/dist/browser/index.js.map +1 -1
  8. package/dist/browser/indexModels.d.ts +13 -112
  9. package/dist/browser/indexModels.d.ts.map +1 -1
  10. package/dist/browser/indexModels.js.map +1 -1
  11. package/dist/browser/knowledgeBaseModels.d.ts +4 -17
  12. package/dist/browser/knowledgeBaseModels.d.ts.map +1 -1
  13. package/dist/browser/knowledgeBaseModels.js.map +1 -1
  14. package/dist/browser/knowledgeBaseRetrieval/api/index.d.ts +2 -1
  15. package/dist/browser/knowledgeBaseRetrieval/api/index.d.ts.map +1 -1
  16. package/dist/browser/knowledgeBaseRetrieval/api/index.js +1 -1
  17. package/dist/browser/knowledgeBaseRetrieval/api/index.js.map +1 -1
  18. package/dist/browser/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts +3 -1
  19. package/dist/browser/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts.map +1 -1
  20. package/dist/browser/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +3 -3
  21. package/dist/browser/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -1
  22. package/dist/browser/knowledgeBaseRetrieval/api/operations.d.ts +2 -2
  23. package/dist/browser/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
  24. package/dist/browser/knowledgeBaseRetrieval/api/operations.js +9 -8
  25. package/dist/browser/knowledgeBaseRetrieval/api/operations.js.map +1 -1
  26. package/dist/browser/knowledgeBaseRetrieval/api/options.d.ts +2 -2
  27. package/dist/browser/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
  28. package/dist/browser/knowledgeBaseRetrieval/api/options.js.map +1 -1
  29. package/dist/browser/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts +2 -2
  30. package/dist/browser/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts.map +1 -1
  31. package/dist/browser/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js +4 -4
  32. package/dist/browser/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js.map +1 -1
  33. package/dist/browser/knowledgeRetrievalClient.d.ts +2 -2
  34. package/dist/browser/knowledgeRetrievalClient.d.ts.map +1 -1
  35. package/dist/browser/knowledgeRetrievalClient.js +4 -4
  36. package/dist/browser/knowledgeRetrievalClient.js.map +1 -1
  37. package/dist/browser/models/azure/search/documents/index.d.ts +2 -1
  38. package/dist/browser/models/azure/search/documents/index.d.ts.map +1 -1
  39. package/dist/browser/models/azure/search/documents/index.js +1 -1
  40. package/dist/browser/models/azure/search/documents/index.js.map +1 -1
  41. package/dist/browser/models/azure/search/documents/indexes/index.d.ts +2 -1
  42. package/dist/browser/models/azure/search/documents/indexes/index.d.ts.map +1 -1
  43. package/dist/browser/models/azure/search/documents/indexes/index.js +1 -1
  44. package/dist/browser/models/azure/search/documents/indexes/index.js.map +1 -1
  45. package/dist/browser/models/azure/search/documents/indexes/models.d.ts +50 -477
  46. package/dist/browser/models/azure/search/documents/indexes/models.d.ts.map +1 -1
  47. package/dist/browser/models/azure/search/documents/indexes/models.js +40 -526
  48. package/dist/browser/models/azure/search/documents/indexes/models.js.map +1 -1
  49. package/dist/browser/models/azure/search/documents/knowledgeBases/index.d.ts +2 -1
  50. package/dist/browser/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
  51. package/dist/browser/models/azure/search/documents/knowledgeBases/index.js +1 -1
  52. package/dist/browser/models/azure/search/documents/knowledgeBases/index.js.map +1 -1
  53. package/dist/browser/models/azure/search/documents/knowledgeBases/models.d.ts +135 -242
  54. package/dist/browser/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
  55. package/dist/browser/models/azure/search/documents/knowledgeBases/models.js +131 -291
  56. package/dist/browser/models/azure/search/documents/knowledgeBases/models.js.map +1 -1
  57. package/dist/browser/models/azure/search/documents/models.d.ts +2 -466
  58. package/dist/browser/models/azure/search/documents/models.d.ts.map +1 -1
  59. package/dist/browser/models/azure/search/documents/models.js +1 -429
  60. package/dist/browser/models/azure/search/documents/models.js.map +1 -1
  61. package/dist/browser/models/index.d.ts +1 -0
  62. package/dist/browser/models/index.d.ts.map +1 -1
  63. package/dist/browser/models/index.js.map +1 -1
  64. package/dist/browser/models/models.d.ts +3 -3
  65. package/dist/browser/models/models.d.ts.map +1 -1
  66. package/dist/browser/models/models.js +3 -3
  67. package/dist/browser/models/models.js.map +1 -1
  68. package/dist/browser/search/api/index.d.ts +2 -1
  69. package/dist/browser/search/api/index.d.ts.map +1 -1
  70. package/dist/browser/search/api/index.js +1 -1
  71. package/dist/browser/search/api/index.js.map +1 -1
  72. package/dist/browser/search/api/operations.d.ts.map +1 -1
  73. package/dist/browser/search/api/operations.js +35 -54
  74. package/dist/browser/search/api/operations.js.map +1 -1
  75. package/dist/browser/search/api/options.d.ts +19 -31
  76. package/dist/browser/search/api/options.d.ts.map +1 -1
  77. package/dist/browser/search/api/options.js.map +1 -1
  78. package/dist/browser/search/api/searchContext.js +1 -1
  79. package/dist/browser/search/api/searchContext.js.map +1 -1
  80. package/dist/browser/searchClient.d.ts +0 -1
  81. package/dist/browser/searchClient.d.ts.map +1 -1
  82. package/dist/browser/searchClient.js +22 -39
  83. package/dist/browser/searchClient.js.map +1 -1
  84. package/dist/browser/searchIndex/api/index.d.ts +4 -3
  85. package/dist/browser/searchIndex/api/index.d.ts.map +1 -1
  86. package/dist/browser/searchIndex/api/index.js +2 -2
  87. package/dist/browser/searchIndex/api/index.js.map +1 -1
  88. package/dist/browser/searchIndex/api/operations.d.ts +2 -6
  89. package/dist/browser/searchIndex/api/operations.d.ts.map +1 -1
  90. package/dist/browser/searchIndex/api/operations.js +186 -96
  91. package/dist/browser/searchIndex/api/operations.js.map +1 -1
  92. package/dist/browser/searchIndex/api/options.d.ts +60 -5
  93. package/dist/browser/searchIndex/api/options.d.ts.map +1 -1
  94. package/dist/browser/searchIndex/api/options.js.map +1 -1
  95. package/dist/browser/searchIndex/api/searchIndexContext.js +1 -1
  96. package/dist/browser/searchIndex/api/searchIndexContext.js.map +1 -1
  97. package/dist/browser/searchIndex/index.d.ts +1 -1
  98. package/dist/browser/searchIndex/index.d.ts.map +1 -1
  99. package/dist/browser/searchIndex/index.js.map +1 -1
  100. package/dist/browser/searchIndex/searchIndexClient.d.ts +2 -4
  101. package/dist/browser/searchIndex/searchIndexClient.d.ts.map +1 -1
  102. package/dist/browser/searchIndex/searchIndexClient.js +1 -5
  103. package/dist/browser/searchIndex/searchIndexClient.js.map +1 -1
  104. package/dist/browser/searchIndexClient.d.ts +2 -7
  105. package/dist/browser/searchIndexClient.d.ts.map +1 -1
  106. package/dist/browser/searchIndexClient.js +2 -9
  107. package/dist/browser/searchIndexClient.js.map +1 -1
  108. package/dist/browser/searchIndexer/api/index.d.ts +4 -3
  109. package/dist/browser/searchIndexer/api/index.d.ts.map +1 -1
  110. package/dist/browser/searchIndexer/api/index.js +2 -2
  111. package/dist/browser/searchIndexer/api/index.js.map +1 -1
  112. package/dist/browser/searchIndexer/api/operations.d.ts +2 -14
  113. package/dist/browser/searchIndexer/api/operations.d.ts.map +1 -1
  114. package/dist/browser/searchIndexer/api/operations.js +112 -150
  115. package/dist/browser/searchIndexer/api/operations.js.map +1 -1
  116. package/dist/browser/searchIndexer/api/options.d.ts +36 -30
  117. package/dist/browser/searchIndexer/api/options.d.ts.map +1 -1
  118. package/dist/browser/searchIndexer/api/options.js.map +1 -1
  119. package/dist/browser/searchIndexer/api/searchIndexerContext.js +1 -1
  120. package/dist/browser/searchIndexer/api/searchIndexerContext.js.map +1 -1
  121. package/dist/browser/searchIndexer/index.d.ts +1 -1
  122. package/dist/browser/searchIndexer/index.d.ts.map +1 -1
  123. package/dist/browser/searchIndexer/index.js.map +1 -1
  124. package/dist/browser/searchIndexer/searchIndexerClient.d.ts +2 -8
  125. package/dist/browser/searchIndexer/searchIndexerClient.d.ts.map +1 -1
  126. package/dist/browser/searchIndexer/searchIndexerClient.js +1 -13
  127. package/dist/browser/searchIndexer/searchIndexerClient.js.map +1 -1
  128. package/dist/browser/searchIndexerClient.d.ts +1 -14
  129. package/dist/browser/searchIndexerClient.d.ts.map +1 -1
  130. package/dist/browser/searchIndexerClient.js +0 -27
  131. package/dist/browser/searchIndexerClient.js.map +1 -1
  132. package/dist/browser/searchIndexingBufferedSender.d.ts.map +1 -1
  133. package/dist/browser/searchIndexingBufferedSender.js +3 -7
  134. package/dist/browser/searchIndexingBufferedSender.js.map +1 -1
  135. package/dist/browser/serviceModels.d.ts +7 -191
  136. package/dist/browser/serviceModels.d.ts.map +1 -1
  137. package/dist/browser/serviceModels.js.map +1 -1
  138. package/dist/browser/serviceUtils.d.ts +3 -5
  139. package/dist/browser/serviceUtils.d.ts.map +1 -1
  140. package/dist/browser/serviceUtils.js +30 -87
  141. package/dist/browser/serviceUtils.js.map +1 -1
  142. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
  143. package/dist/browser/{synonymMapHelper.d.ts → synonymMapHelper-browser.d.mts} +3 -3
  144. package/dist/browser/synonymMapHelper-browser.d.mts.map +1 -0
  145. package/dist/browser/{synonymMapHelper.js → synonymMapHelper-browser.mjs} +3 -3
  146. package/dist/browser/synonymMapHelper-browser.mjs.map +1 -0
  147. package/dist/browser/timers-browser.d.mts +8 -0
  148. package/dist/browser/timers-browser.d.mts.map +1 -0
  149. package/dist/browser/timers-browser.mjs +13 -0
  150. package/dist/browser/timers-browser.mjs.map +1 -0
  151. package/dist/browser/tracing.d.ts.map +1 -1
  152. package/dist/browser/walk.js +1 -1
  153. package/dist/browser/walk.js.map +1 -1
  154. package/dist/commonjs/base64.d.ts.map +1 -1
  155. package/dist/commonjs/base64.js +4 -2
  156. package/dist/commonjs/base64.js.map +3 -3
  157. package/dist/commonjs/geographyPoint.js +1 -0
  158. package/dist/commonjs/geographyPoint.js.map +1 -1
  159. package/dist/commonjs/index.d.ts +8 -6
  160. package/dist/commonjs/index.d.ts.map +1 -1
  161. package/dist/commonjs/index.js +1 -29
  162. package/dist/commonjs/index.js.map +3 -3
  163. package/dist/commonjs/indexDocumentsBatch.js +1 -0
  164. package/dist/commonjs/indexDocumentsBatch.js.map +1 -1
  165. package/dist/commonjs/indexModels.d.ts +13 -112
  166. package/dist/commonjs/indexModels.d.ts.map +1 -1
  167. package/dist/commonjs/indexModels.js +1 -0
  168. package/dist/commonjs/indexModels.js.map +2 -2
  169. package/dist/commonjs/knowledgeBaseModels.d.ts +4 -17
  170. package/dist/commonjs/knowledgeBaseModels.d.ts.map +1 -1
  171. package/dist/commonjs/knowledgeBaseModels.js +1 -0
  172. package/dist/commonjs/knowledgeBaseModels.js.map +2 -2
  173. package/dist/commonjs/knowledgeBaseRetrieval/api/index.d.ts +2 -1
  174. package/dist/commonjs/knowledgeBaseRetrieval/api/index.d.ts.map +1 -1
  175. package/dist/commonjs/knowledgeBaseRetrieval/api/index.js +1 -0
  176. package/dist/commonjs/knowledgeBaseRetrieval/api/index.js.map +3 -3
  177. package/dist/commonjs/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts +3 -1
  178. package/dist/commonjs/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts.map +1 -1
  179. package/dist/commonjs/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +4 -3
  180. package/dist/commonjs/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +3 -3
  181. package/dist/commonjs/knowledgeBaseRetrieval/api/operations.d.ts +2 -2
  182. package/dist/commonjs/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
  183. package/dist/commonjs/knowledgeBaseRetrieval/api/operations.js +9 -7
  184. package/dist/commonjs/knowledgeBaseRetrieval/api/operations.js.map +3 -3
  185. package/dist/commonjs/knowledgeBaseRetrieval/api/options.d.ts +2 -2
  186. package/dist/commonjs/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
  187. package/dist/commonjs/knowledgeBaseRetrieval/api/options.js +1 -0
  188. package/dist/commonjs/knowledgeBaseRetrieval/api/options.js.map +2 -2
  189. package/dist/commonjs/knowledgeBaseRetrieval/index.js +1 -0
  190. package/dist/commonjs/knowledgeBaseRetrieval/index.js.map +1 -1
  191. package/dist/commonjs/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts +2 -2
  192. package/dist/commonjs/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts.map +1 -1
  193. package/dist/commonjs/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js +5 -4
  194. package/dist/commonjs/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js.map +3 -3
  195. package/dist/commonjs/knowledgeRetrievalClient.d.ts +2 -2
  196. package/dist/commonjs/knowledgeRetrievalClient.d.ts.map +1 -1
  197. package/dist/commonjs/knowledgeRetrievalClient.js +10 -4
  198. package/dist/commonjs/knowledgeRetrievalClient.js.map +3 -3
  199. package/dist/commonjs/logger.js +1 -0
  200. package/dist/commonjs/logger.js.map +1 -1
  201. package/dist/commonjs/models/azure/search/documents/index.d.ts +2 -1
  202. package/dist/commonjs/models/azure/search/documents/index.d.ts.map +1 -1
  203. package/dist/commonjs/models/azure/search/documents/index.js +3 -16
  204. package/dist/commonjs/models/azure/search/documents/index.js.map +3 -3
  205. package/dist/commonjs/models/azure/search/documents/indexes/index.d.ts +2 -1
  206. package/dist/commonjs/models/azure/search/documents/indexes/index.d.ts.map +1 -1
  207. package/dist/commonjs/models/azure/search/documents/indexes/index.js +1 -18
  208. package/dist/commonjs/models/azure/search/documents/indexes/index.js.map +3 -3
  209. package/dist/commonjs/models/azure/search/documents/indexes/models.d.ts +50 -477
  210. package/dist/commonjs/models/azure/search/documents/indexes/models.d.ts.map +1 -1
  211. package/dist/commonjs/models/azure/search/documents/indexes/models.js +40 -501
  212. package/dist/commonjs/models/azure/search/documents/indexes/models.js.map +4 -4
  213. package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.d.ts +2 -1
  214. package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
  215. package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.js +1 -2
  216. package/dist/commonjs/models/azure/search/documents/knowledgeBases/index.js.map +3 -3
  217. package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.d.ts +135 -242
  218. package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
  219. package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.js +136 -335
  220. package/dist/commonjs/models/azure/search/documents/knowledgeBases/models.js.map +4 -4
  221. package/dist/commonjs/models/azure/search/documents/models.d.ts +2 -466
  222. package/dist/commonjs/models/azure/search/documents/models.d.ts.map +1 -1
  223. package/dist/commonjs/models/azure/search/documents/models.js +8 -354
  224. package/dist/commonjs/models/azure/search/documents/models.js.map +4 -4
  225. package/dist/commonjs/models/index.d.ts +1 -0
  226. package/dist/commonjs/models/index.d.ts.map +1 -1
  227. package/dist/commonjs/models/index.js +1 -0
  228. package/dist/commonjs/models/index.js.map +2 -2
  229. package/dist/commonjs/models/models.d.ts +3 -3
  230. package/dist/commonjs/models/models.d.ts.map +1 -1
  231. package/dist/commonjs/models/models.js +2 -1
  232. package/dist/commonjs/models/models.js.map +3 -3
  233. package/dist/commonjs/odata.js +1 -0
  234. package/dist/commonjs/odata.js.map +1 -1
  235. package/dist/commonjs/odataMetadataPolicy.js +1 -0
  236. package/dist/commonjs/odataMetadataPolicy.js.map +1 -1
  237. package/dist/commonjs/search/api/index.d.ts +2 -1
  238. package/dist/commonjs/search/api/index.d.ts.map +1 -1
  239. package/dist/commonjs/search/api/index.js +1 -0
  240. package/dist/commonjs/search/api/index.js.map +3 -3
  241. package/dist/commonjs/search/api/operations.d.ts.map +1 -1
  242. package/dist/commonjs/search/api/operations.js +22 -42
  243. package/dist/commonjs/search/api/operations.js.map +3 -3
  244. package/dist/commonjs/search/api/options.d.ts +19 -31
  245. package/dist/commonjs/search/api/options.d.ts.map +1 -1
  246. package/dist/commonjs/search/api/options.js +1 -0
  247. package/dist/commonjs/search/api/options.js.map +2 -2
  248. package/dist/commonjs/search/api/searchContext.js +2 -1
  249. package/dist/commonjs/search/api/searchContext.js.map +2 -2
  250. package/dist/commonjs/search/index.js +1 -0
  251. package/dist/commonjs/search/index.js.map +1 -1
  252. package/dist/commonjs/search/searchClient.js +1 -0
  253. package/dist/commonjs/search/searchClient.js.map +1 -1
  254. package/dist/commonjs/searchApiKeyCredentialPolicy.js +1 -0
  255. package/dist/commonjs/searchApiKeyCredentialPolicy.js.map +1 -1
  256. package/dist/commonjs/searchAudience.js +1 -0
  257. package/dist/commonjs/searchAudience.js.map +1 -1
  258. package/dist/commonjs/searchClient.d.ts +0 -1
  259. package/dist/commonjs/searchClient.d.ts.map +1 -1
  260. package/dist/commonjs/searchClient.js +24 -43
  261. package/dist/commonjs/searchClient.js.map +3 -3
  262. package/dist/commonjs/searchIndex/api/index.d.ts +4 -3
  263. package/dist/commonjs/searchIndex/api/index.d.ts.map +1 -1
  264. package/dist/commonjs/searchIndex/api/index.js +1 -2
  265. package/dist/commonjs/searchIndex/api/index.js.map +3 -3
  266. package/dist/commonjs/searchIndex/api/operations.d.ts +2 -6
  267. package/dist/commonjs/searchIndex/api/operations.d.ts.map +1 -1
  268. package/dist/commonjs/searchIndex/api/operations.js +126 -108
  269. package/dist/commonjs/searchIndex/api/operations.js.map +3 -3
  270. package/dist/commonjs/searchIndex/api/options.d.ts +60 -5
  271. package/dist/commonjs/searchIndex/api/options.d.ts.map +1 -1
  272. package/dist/commonjs/searchIndex/api/options.js +1 -0
  273. package/dist/commonjs/searchIndex/api/options.js.map +2 -2
  274. package/dist/commonjs/searchIndex/api/searchIndexContext.js +2 -1
  275. package/dist/commonjs/searchIndex/api/searchIndexContext.js.map +2 -2
  276. package/dist/commonjs/searchIndex/index.d.ts +1 -1
  277. package/dist/commonjs/searchIndex/index.d.ts.map +1 -1
  278. package/dist/commonjs/searchIndex/index.js +1 -0
  279. package/dist/commonjs/searchIndex/index.js.map +2 -2
  280. package/dist/commonjs/searchIndex/searchIndexClient.d.ts +2 -4
  281. package/dist/commonjs/searchIndex/searchIndexClient.d.ts.map +1 -1
  282. package/dist/commonjs/searchIndex/searchIndexClient.js +1 -4
  283. package/dist/commonjs/searchIndex/searchIndexClient.js.map +3 -3
  284. package/dist/commonjs/searchIndexClient.d.ts +2 -7
  285. package/dist/commonjs/searchIndexClient.d.ts.map +1 -1
  286. package/dist/commonjs/searchIndexClient.js +3 -9
  287. package/dist/commonjs/searchIndexClient.js.map +3 -3
  288. package/dist/commonjs/searchIndexer/api/index.d.ts +4 -3
  289. package/dist/commonjs/searchIndexer/api/index.d.ts.map +1 -1
  290. package/dist/commonjs/searchIndexer/api/index.js +1 -6
  291. package/dist/commonjs/searchIndexer/api/index.js.map +3 -3
  292. package/dist/commonjs/searchIndexer/api/operations.d.ts +2 -14
  293. package/dist/commonjs/searchIndexer/api/operations.d.ts.map +1 -1
  294. package/dist/commonjs/searchIndexer/api/operations.js +76 -168
  295. package/dist/commonjs/searchIndexer/api/operations.js.map +3 -3
  296. package/dist/commonjs/searchIndexer/api/options.d.ts +36 -30
  297. package/dist/commonjs/searchIndexer/api/options.d.ts.map +1 -1
  298. package/dist/commonjs/searchIndexer/api/options.js +1 -0
  299. package/dist/commonjs/searchIndexer/api/options.js.map +2 -2
  300. package/dist/commonjs/searchIndexer/api/searchIndexerContext.js +2 -1
  301. package/dist/commonjs/searchIndexer/api/searchIndexerContext.js.map +2 -2
  302. package/dist/commonjs/searchIndexer/index.d.ts +1 -1
  303. package/dist/commonjs/searchIndexer/index.d.ts.map +1 -1
  304. package/dist/commonjs/searchIndexer/index.js +1 -0
  305. package/dist/commonjs/searchIndexer/index.js.map +2 -2
  306. package/dist/commonjs/searchIndexer/searchIndexerClient.d.ts +2 -8
  307. package/dist/commonjs/searchIndexer/searchIndexerClient.d.ts.map +1 -1
  308. package/dist/commonjs/searchIndexer/searchIndexerClient.js +1 -12
  309. package/dist/commonjs/searchIndexer/searchIndexerClient.js.map +3 -3
  310. package/dist/commonjs/searchIndexerClient.d.ts +1 -14
  311. package/dist/commonjs/searchIndexerClient.d.ts.map +1 -1
  312. package/dist/commonjs/searchIndexerClient.js +1 -39
  313. package/dist/commonjs/searchIndexerClient.js.map +3 -3
  314. package/dist/commonjs/searchIndexingBufferedSender.d.ts.map +1 -1
  315. package/dist/commonjs/searchIndexingBufferedSender.js +4 -7
  316. package/dist/commonjs/searchIndexingBufferedSender.js.map +3 -3
  317. package/dist/commonjs/serialization.js +1 -0
  318. package/dist/commonjs/serialization.js.map +1 -1
  319. package/dist/commonjs/serviceModels.d.ts +7 -191
  320. package/dist/commonjs/serviceModels.d.ts.map +1 -1
  321. package/dist/commonjs/serviceModels.js +1 -0
  322. package/dist/commonjs/serviceModels.js.map +3 -3
  323. package/dist/commonjs/serviceUtils.d.ts +3 -5
  324. package/dist/commonjs/serviceUtils.d.ts.map +1 -1
  325. package/dist/commonjs/serviceUtils.js +31 -89
  326. package/dist/commonjs/serviceUtils.js.map +3 -3
  327. package/dist/commonjs/static-helpers/pagingHelpers.js +1 -0
  328. package/dist/commonjs/static-helpers/pagingHelpers.js.map +2 -2
  329. package/dist/commonjs/static-helpers/serialization/build-csv-collection.js +1 -0
  330. package/dist/commonjs/static-helpers/serialization/build-csv-collection.js.map +1 -1
  331. package/dist/commonjs/static-helpers/serialization/build-newline-collection.js +1 -0
  332. package/dist/commonjs/static-helpers/serialization/build-newline-collection.js.map +1 -1
  333. package/dist/commonjs/static-helpers/serialization/build-pipe-collection.js +1 -0
  334. package/dist/commonjs/static-helpers/serialization/build-pipe-collection.js.map +1 -1
  335. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.js +1 -0
  336. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.js.map +1 -1
  337. package/dist/commonjs/static-helpers/serialization/parse-csv-collection.js +1 -0
  338. package/dist/commonjs/static-helpers/serialization/parse-csv-collection.js.map +1 -1
  339. package/dist/commonjs/static-helpers/serialization/parse-newline-collection.js +1 -0
  340. package/dist/commonjs/static-helpers/serialization/parse-newline-collection.js.map +1 -1
  341. package/dist/commonjs/static-helpers/serialization/parse-pipe-collection.js +1 -0
  342. package/dist/commonjs/static-helpers/serialization/parse-pipe-collection.js.map +1 -1
  343. package/dist/commonjs/static-helpers/serialization/serialize-record.js +1 -0
  344. package/dist/commonjs/static-helpers/serialization/serialize-record.js.map +1 -1
  345. package/dist/commonjs/static-helpers/urlTemplate.js +1 -0
  346. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
  347. package/dist/commonjs/synonymMapHelper.js +1 -0
  348. package/dist/commonjs/synonymMapHelper.js.map +1 -1
  349. package/dist/commonjs/timers.d.ts +9 -0
  350. package/dist/commonjs/timers.d.ts.map +1 -0
  351. package/dist/commonjs/{errorModels.js → timers.js} +19 -2
  352. package/dist/commonjs/timers.js.map +7 -0
  353. package/dist/commonjs/tracing.d.ts.map +1 -1
  354. package/dist/commonjs/tracing.js +1 -0
  355. package/dist/commonjs/tracing.js.map +1 -1
  356. package/dist/commonjs/tsdoc-metadata.json +1 -1
  357. package/dist/commonjs/walk.js +2 -1
  358. package/dist/commonjs/walk.js.map +3 -3
  359. package/dist/esm/base64.d.ts.map +1 -1
  360. package/dist/esm/base64.js +16 -8
  361. package/dist/esm/base64.js.map +1 -7
  362. package/dist/esm/geographyPoint.js +35 -32
  363. package/dist/esm/geographyPoint.js.map +1 -7
  364. package/dist/esm/index.d.ts +8 -6
  365. package/dist/esm/index.d.ts.map +1 -1
  366. package/dist/esm/index.js +17 -190
  367. package/dist/esm/index.js.map +1 -7
  368. package/dist/esm/indexDocumentsBatch.js +78 -73
  369. package/dist/esm/indexDocumentsBatch.js.map +1 -7
  370. package/dist/esm/indexModels.d.ts +13 -112
  371. package/dist/esm/indexModels.d.ts.map +1 -1
  372. package/dist/esm/indexModels.js +4 -0
  373. package/dist/esm/indexModels.js.map +1 -7
  374. package/dist/esm/knowledgeBaseModels.d.ts +4 -17
  375. package/dist/esm/knowledgeBaseModels.d.ts.map +1 -1
  376. package/dist/esm/knowledgeBaseModels.js +4 -0
  377. package/dist/esm/knowledgeBaseModels.js.map +1 -7
  378. package/dist/esm/knowledgeBaseRetrieval/api/index.d.ts +2 -1
  379. package/dist/esm/knowledgeBaseRetrieval/api/index.d.ts.map +1 -1
  380. package/dist/esm/knowledgeBaseRetrieval/api/index.js +5 -8
  381. package/dist/esm/knowledgeBaseRetrieval/api/index.js.map +1 -7
  382. package/dist/esm/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts +3 -1
  383. package/dist/esm/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts.map +1 -1
  384. package/dist/esm/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +22 -20
  385. package/dist/esm/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -7
  386. package/dist/esm/knowledgeBaseRetrieval/api/operations.d.ts +2 -2
  387. package/dist/esm/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
  388. package/dist/esm/knowledgeBaseRetrieval/api/operations.js +39 -42
  389. package/dist/esm/knowledgeBaseRetrieval/api/operations.js.map +1 -7
  390. package/dist/esm/knowledgeBaseRetrieval/api/options.d.ts +2 -2
  391. package/dist/esm/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
  392. package/dist/esm/knowledgeBaseRetrieval/api/options.js +4 -0
  393. package/dist/esm/knowledgeBaseRetrieval/api/options.js.map +1 -7
  394. package/dist/esm/knowledgeBaseRetrieval/index.js +4 -4
  395. package/dist/esm/knowledgeBaseRetrieval/index.js.map +1 -7
  396. package/dist/esm/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts +2 -2
  397. package/dist/esm/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts.map +1 -1
  398. package/dist/esm/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js +22 -20
  399. package/dist/esm/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js.map +1 -7
  400. package/dist/esm/knowledgeRetrievalClient.d.ts +2 -2
  401. package/dist/esm/knowledgeRetrievalClient.d.ts.map +1 -1
  402. package/dist/esm/knowledgeRetrievalClient.js +89 -91
  403. package/dist/esm/knowledgeRetrievalClient.js.map +1 -7
  404. package/dist/esm/logger.js +7 -4
  405. package/dist/esm/logger.js.map +1 -7
  406. package/dist/esm/models/azure/search/documents/index.d.ts +2 -1
  407. package/dist/esm/models/azure/search/documents/index.d.ts.map +1 -1
  408. package/dist/esm/models/azure/search/documents/index.js +4 -36
  409. package/dist/esm/models/azure/search/documents/index.js.map +1 -7
  410. package/dist/esm/models/azure/search/documents/indexes/index.d.ts +2 -1
  411. package/dist/esm/models/azure/search/documents/indexes/index.d.ts.map +1 -1
  412. package/dist/esm/models/azure/search/documents/indexes/index.js +4 -130
  413. package/dist/esm/models/azure/search/documents/indexes/index.js.map +1 -7
  414. package/dist/esm/models/azure/search/documents/indexes/models.d.ts +50 -477
  415. package/dist/esm/models/azure/search/documents/indexes/models.d.ts.map +1 -1
  416. package/dist/esm/models/azure/search/documents/indexes/models.js +6374 -6188
  417. package/dist/esm/models/azure/search/documents/indexes/models.js.map +1 -7
  418. package/dist/esm/models/azure/search/documents/knowledgeBases/index.d.ts +2 -1
  419. package/dist/esm/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
  420. package/dist/esm/models/azure/search/documents/knowledgeBases/index.js +4 -16
  421. package/dist/esm/models/azure/search/documents/knowledgeBases/index.js.map +1 -7
  422. package/dist/esm/models/azure/search/documents/knowledgeBases/models.d.ts +135 -242
  423. package/dist/esm/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
  424. package/dist/esm/models/azure/search/documents/knowledgeBases/models.js +592 -790
  425. package/dist/esm/models/azure/search/documents/knowledgeBases/models.js.map +1 -7
  426. package/dist/esm/models/azure/search/documents/models.d.ts +2 -466
  427. package/dist/esm/models/azure/search/documents/models.d.ts.map +1 -1
  428. package/dist/esm/models/azure/search/documents/models.js +591 -919
  429. package/dist/esm/models/azure/search/documents/models.js.map +1 -7
  430. package/dist/esm/models/index.d.ts +1 -0
  431. package/dist/esm/models/index.d.ts.map +1 -1
  432. package/dist/esm/models/index.js +4 -4
  433. package/dist/esm/models/index.js.map +1 -7
  434. package/dist/esm/models/models.d.ts +3 -3
  435. package/dist/esm/models/models.d.ts.map +1 -1
  436. package/dist/esm/models/models.js +14 -13
  437. package/dist/esm/models/models.js.map +1 -7
  438. package/dist/esm/odata.js +43 -26
  439. package/dist/esm/odata.js.map +1 -7
  440. package/dist/esm/odataMetadataPolicy.js +15 -11
  441. package/dist/esm/odataMetadataPolicy.js.map +1 -7
  442. package/dist/esm/search/api/index.d.ts +2 -1
  443. package/dist/esm/search/api/index.d.ts.map +1 -1
  444. package/dist/esm/search/api/index.js +5 -26
  445. package/dist/esm/search/api/index.js.map +1 -7
  446. package/dist/esm/search/api/operations.d.ts.map +1 -1
  447. package/dist/esm/search/api/operations.js +418 -452
  448. package/dist/esm/search/api/operations.js.map +1 -7
  449. package/dist/esm/search/api/options.d.ts +19 -31
  450. package/dist/esm/search/api/options.d.ts.map +1 -1
  451. package/dist/esm/search/api/options.js +4 -0
  452. package/dist/esm/search/api/options.js.map +1 -7
  453. package/dist/esm/search/api/searchContext.js +22 -20
  454. package/dist/esm/search/api/searchContext.js.map +1 -7
  455. package/dist/esm/search/index.js +4 -4
  456. package/dist/esm/search/index.js.map +1 -7
  457. package/dist/esm/search/searchClient.js +55 -63
  458. package/dist/esm/search/searchClient.js.map +1 -7
  459. package/dist/esm/searchApiKeyCredentialPolicy.js +17 -13
  460. package/dist/esm/searchApiKeyCredentialPolicy.js.map +1 -7
  461. package/dist/esm/searchAudience.js +21 -9
  462. package/dist/esm/searchAudience.js.map +1 -7
  463. package/dist/esm/searchClient.d.ts +0 -1
  464. package/dist/esm/searchClient.d.ts.map +1 -1
  465. package/dist/esm/searchClient.js +539 -624
  466. package/dist/esm/searchClient.js.map +1 -7
  467. package/dist/esm/searchIndex/api/index.d.ts +4 -3
  468. package/dist/esm/searchIndex/api/index.d.ts.map +1 -1
  469. package/dist/esm/searchIndex/api/index.js +5 -70
  470. package/dist/esm/searchIndex/api/index.js.map +1 -7
  471. package/dist/esm/searchIndex/api/operations.d.ts +2 -6
  472. package/dist/esm/searchIndex/api/operations.d.ts.map +1 -1
  473. package/dist/esm/searchIndex/api/operations.js +1087 -1177
  474. package/dist/esm/searchIndex/api/operations.js.map +1 -7
  475. package/dist/esm/searchIndex/api/options.d.ts +60 -5
  476. package/dist/esm/searchIndex/api/options.d.ts.map +1 -1
  477. package/dist/esm/searchIndex/api/options.js +4 -0
  478. package/dist/esm/searchIndex/api/options.js.map +1 -7
  479. package/dist/esm/searchIndex/api/searchIndexContext.js +22 -20
  480. package/dist/esm/searchIndex/api/searchIndexContext.js.map +1 -7
  481. package/dist/esm/searchIndex/index.d.ts +1 -1
  482. package/dist/esm/searchIndex/index.d.ts.map +1 -1
  483. package/dist/esm/searchIndex/index.js +4 -4
  484. package/dist/esm/searchIndex/index.js.map +1 -7
  485. package/dist/esm/searchIndex/searchIndexClient.d.ts +2 -4
  486. package/dist/esm/searchIndex/searchIndexClient.d.ts.map +1 -1
  487. package/dist/esm/searchIndex/searchIndexClient.js +139 -173
  488. package/dist/esm/searchIndex/searchIndexClient.js.map +1 -7
  489. package/dist/esm/searchIndexClient.d.ts +2 -7
  490. package/dist/esm/searchIndexClient.d.ts.map +1 -1
  491. package/dist/esm/searchIndexClient.js +448 -588
  492. package/dist/esm/searchIndexClient.js.map +1 -7
  493. package/dist/esm/searchIndexer/api/index.d.ts +4 -3
  494. package/dist/esm/searchIndexer/api/index.d.ts.map +1 -1
  495. package/dist/esm/searchIndexer/api/index.js +5 -50
  496. package/dist/esm/searchIndexer/api/index.js.map +1 -7
  497. package/dist/esm/searchIndexer/api/operations.d.ts +2 -14
  498. package/dist/esm/searchIndexer/api/operations.d.ts.map +1 -1
  499. package/dist/esm/searchIndexer/api/operations.js +676 -809
  500. package/dist/esm/searchIndexer/api/operations.js.map +1 -7
  501. package/dist/esm/searchIndexer/api/options.d.ts +36 -30
  502. package/dist/esm/searchIndexer/api/options.d.ts.map +1 -1
  503. package/dist/esm/searchIndexer/api/options.js +4 -0
  504. package/dist/esm/searchIndexer/api/options.js.map +1 -7
  505. package/dist/esm/searchIndexer/api/searchIndexerContext.js +22 -20
  506. package/dist/esm/searchIndexer/api/searchIndexerContext.js.map +1 -7
  507. package/dist/esm/searchIndexer/index.d.ts +1 -1
  508. package/dist/esm/searchIndexer/index.d.ts.map +1 -1
  509. package/dist/esm/searchIndexer/index.js +4 -4
  510. package/dist/esm/searchIndexer/index.js.map +1 -7
  511. package/dist/esm/searchIndexer/searchIndexerClient.d.ts +2 -8
  512. package/dist/esm/searchIndexer/searchIndexerClient.d.ts.map +1 -1
  513. package/dist/esm/searchIndexer/searchIndexerClient.js +91 -123
  514. package/dist/esm/searchIndexer/searchIndexerClient.js.map +1 -7
  515. package/dist/esm/searchIndexerClient.d.ts +1 -14
  516. package/dist/esm/searchIndexerClient.d.ts.map +1 -1
  517. package/dist/esm/searchIndexerClient.js +347 -473
  518. package/dist/esm/searchIndexerClient.js.map +1 -7
  519. package/dist/esm/searchIndexingBufferedSender.d.ts.map +1 -1
  520. package/dist/esm/searchIndexingBufferedSender.js +302 -285
  521. package/dist/esm/searchIndexingBufferedSender.js.map +1 -7
  522. package/dist/esm/serialization.js +112 -111
  523. package/dist/esm/serialization.js.map +1 -7
  524. package/dist/esm/serviceModels.d.ts +7 -191
  525. package/dist/esm/serviceModels.d.ts.map +1 -1
  526. package/dist/esm/serviceModels.js +654 -162
  527. package/dist/esm/serviceModels.js.map +1 -7
  528. package/dist/esm/serviceUtils.d.ts +3 -5
  529. package/dist/esm/serviceUtils.d.ts.map +1 -1
  530. package/dist/esm/serviceUtils.js +776 -865
  531. package/dist/esm/serviceUtils.js.map +1 -7
  532. package/dist/esm/static-helpers/pagingHelpers.js +122 -98
  533. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -7
  534. package/dist/esm/static-helpers/serialization/build-csv-collection.js +5 -5
  535. package/dist/esm/static-helpers/serialization/build-csv-collection.js.map +1 -7
  536. package/dist/esm/static-helpers/serialization/build-newline-collection.js +5 -5
  537. package/dist/esm/static-helpers/serialization/build-newline-collection.js.map +1 -7
  538. package/dist/esm/static-helpers/serialization/build-pipe-collection.js +5 -5
  539. package/dist/esm/static-helpers/serialization/build-pipe-collection.js.map +1 -7
  540. package/dist/esm/static-helpers/serialization/check-prop-undefined.js +15 -9
  541. package/dist/esm/static-helpers/serialization/check-prop-undefined.js.map +1 -7
  542. package/dist/esm/static-helpers/serialization/parse-csv-collection.js +5 -5
  543. package/dist/esm/static-helpers/serialization/parse-csv-collection.js.map +1 -7
  544. package/dist/esm/static-helpers/serialization/parse-newline-collection.js +5 -5
  545. package/dist/esm/static-helpers/serialization/parse-newline-collection.js.map +1 -7
  546. package/dist/esm/static-helpers/serialization/parse-pipe-collection.js +5 -5
  547. package/dist/esm/static-helpers/serialization/parse-pipe-collection.js.map +1 -7
  548. package/dist/esm/static-helpers/serialization/serialize-record.js +17 -16
  549. package/dist/esm/static-helpers/serialization/serialize-record.js.map +1 -7
  550. package/dist/esm/static-helpers/urlTemplate.js +169 -142
  551. package/dist/esm/static-helpers/urlTemplate.js.map +1 -7
  552. package/dist/esm/synonymMapHelper.js +20 -9
  553. package/dist/esm/synonymMapHelper.js.map +1 -7
  554. package/dist/esm/timers.d.ts +9 -0
  555. package/dist/esm/timers.d.ts.map +1 -0
  556. package/dist/esm/timers.js +15 -0
  557. package/dist/esm/timers.js.map +1 -0
  558. package/dist/esm/tracing.d.ts.map +1 -1
  559. package/dist/esm/tracing.js +11 -8
  560. package/dist/esm/tracing.js.map +1 -7
  561. package/dist/esm/walk.js +64 -52
  562. package/dist/esm/walk.js.map +1 -7
  563. package/dist/react-native/base64.d.ts.map +1 -1
  564. package/dist/react-native/base64.js +3 -2
  565. package/dist/react-native/base64.js.map +1 -1
  566. package/dist/react-native/index.d.ts +9 -7
  567. package/dist/react-native/index.d.ts.map +1 -1
  568. package/dist/react-native/index.js +3 -4
  569. package/dist/react-native/index.js.map +1 -1
  570. package/dist/react-native/indexModels.d.ts +13 -112
  571. package/dist/react-native/indexModels.d.ts.map +1 -1
  572. package/dist/react-native/indexModels.js.map +1 -1
  573. package/dist/react-native/knowledgeBaseModels.d.ts +4 -17
  574. package/dist/react-native/knowledgeBaseModels.d.ts.map +1 -1
  575. package/dist/react-native/knowledgeBaseModels.js.map +1 -1
  576. package/dist/react-native/knowledgeBaseRetrieval/api/index.d.ts +2 -1
  577. package/dist/react-native/knowledgeBaseRetrieval/api/index.d.ts.map +1 -1
  578. package/dist/react-native/knowledgeBaseRetrieval/api/index.js +1 -1
  579. package/dist/react-native/knowledgeBaseRetrieval/api/index.js.map +1 -1
  580. package/dist/react-native/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts +3 -1
  581. package/dist/react-native/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.d.ts.map +1 -1
  582. package/dist/react-native/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js +3 -3
  583. package/dist/react-native/knowledgeBaseRetrieval/api/knowledgeBaseRetrievalContext.js.map +1 -1
  584. package/dist/react-native/knowledgeBaseRetrieval/api/operations.d.ts +2 -2
  585. package/dist/react-native/knowledgeBaseRetrieval/api/operations.d.ts.map +1 -1
  586. package/dist/react-native/knowledgeBaseRetrieval/api/operations.js +9 -8
  587. package/dist/react-native/knowledgeBaseRetrieval/api/operations.js.map +1 -1
  588. package/dist/react-native/knowledgeBaseRetrieval/api/options.d.ts +2 -2
  589. package/dist/react-native/knowledgeBaseRetrieval/api/options.d.ts.map +1 -1
  590. package/dist/react-native/knowledgeBaseRetrieval/api/options.js.map +1 -1
  591. package/dist/react-native/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts +2 -2
  592. package/dist/react-native/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.d.ts.map +1 -1
  593. package/dist/react-native/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js +4 -4
  594. package/dist/react-native/knowledgeBaseRetrieval/knowledgeBaseRetrievalClient.js.map +1 -1
  595. package/dist/react-native/knowledgeRetrievalClient.d.ts +2 -2
  596. package/dist/react-native/knowledgeRetrievalClient.d.ts.map +1 -1
  597. package/dist/react-native/knowledgeRetrievalClient.js +4 -4
  598. package/dist/react-native/knowledgeRetrievalClient.js.map +1 -1
  599. package/dist/react-native/models/azure/search/documents/index.d.ts +2 -1
  600. package/dist/react-native/models/azure/search/documents/index.d.ts.map +1 -1
  601. package/dist/react-native/models/azure/search/documents/index.js +1 -1
  602. package/dist/react-native/models/azure/search/documents/index.js.map +1 -1
  603. package/dist/react-native/models/azure/search/documents/indexes/index.d.ts +2 -1
  604. package/dist/react-native/models/azure/search/documents/indexes/index.d.ts.map +1 -1
  605. package/dist/react-native/models/azure/search/documents/indexes/index.js +1 -1
  606. package/dist/react-native/models/azure/search/documents/indexes/index.js.map +1 -1
  607. package/dist/react-native/models/azure/search/documents/indexes/models.d.ts +50 -477
  608. package/dist/react-native/models/azure/search/documents/indexes/models.d.ts.map +1 -1
  609. package/dist/react-native/models/azure/search/documents/indexes/models.js +40 -526
  610. package/dist/react-native/models/azure/search/documents/indexes/models.js.map +1 -1
  611. package/dist/react-native/models/azure/search/documents/knowledgeBases/index.d.ts +2 -1
  612. package/dist/react-native/models/azure/search/documents/knowledgeBases/index.d.ts.map +1 -1
  613. package/dist/react-native/models/azure/search/documents/knowledgeBases/index.js +1 -1
  614. package/dist/react-native/models/azure/search/documents/knowledgeBases/index.js.map +1 -1
  615. package/dist/react-native/models/azure/search/documents/knowledgeBases/models.d.ts +135 -242
  616. package/dist/react-native/models/azure/search/documents/knowledgeBases/models.d.ts.map +1 -1
  617. package/dist/react-native/models/azure/search/documents/knowledgeBases/models.js +131 -291
  618. package/dist/react-native/models/azure/search/documents/knowledgeBases/models.js.map +1 -1
  619. package/dist/react-native/models/azure/search/documents/models.d.ts +2 -466
  620. package/dist/react-native/models/azure/search/documents/models.d.ts.map +1 -1
  621. package/dist/react-native/models/azure/search/documents/models.js +1 -429
  622. package/dist/react-native/models/azure/search/documents/models.js.map +1 -1
  623. package/dist/react-native/models/index.d.ts +1 -0
  624. package/dist/react-native/models/index.d.ts.map +1 -1
  625. package/dist/react-native/models/index.js.map +1 -1
  626. package/dist/react-native/models/models.d.ts +3 -3
  627. package/dist/react-native/models/models.d.ts.map +1 -1
  628. package/dist/react-native/models/models.js +3 -3
  629. package/dist/react-native/models/models.js.map +1 -1
  630. package/dist/react-native/search/api/index.d.ts +2 -1
  631. package/dist/react-native/search/api/index.d.ts.map +1 -1
  632. package/dist/react-native/search/api/index.js +1 -1
  633. package/dist/react-native/search/api/index.js.map +1 -1
  634. package/dist/react-native/search/api/operations.d.ts.map +1 -1
  635. package/dist/react-native/search/api/operations.js +35 -54
  636. package/dist/react-native/search/api/operations.js.map +1 -1
  637. package/dist/react-native/search/api/options.d.ts +19 -31
  638. package/dist/react-native/search/api/options.d.ts.map +1 -1
  639. package/dist/react-native/search/api/options.js.map +1 -1
  640. package/dist/react-native/search/api/searchContext.js +1 -1
  641. package/dist/react-native/search/api/searchContext.js.map +1 -1
  642. package/dist/react-native/searchClient.d.ts +0 -1
  643. package/dist/react-native/searchClient.d.ts.map +1 -1
  644. package/dist/react-native/searchClient.js +22 -39
  645. package/dist/react-native/searchClient.js.map +1 -1
  646. package/dist/react-native/searchIndex/api/index.d.ts +4 -3
  647. package/dist/react-native/searchIndex/api/index.d.ts.map +1 -1
  648. package/dist/react-native/searchIndex/api/index.js +2 -2
  649. package/dist/react-native/searchIndex/api/index.js.map +1 -1
  650. package/dist/react-native/searchIndex/api/operations.d.ts +2 -6
  651. package/dist/react-native/searchIndex/api/operations.d.ts.map +1 -1
  652. package/dist/react-native/searchIndex/api/operations.js +186 -96
  653. package/dist/react-native/searchIndex/api/operations.js.map +1 -1
  654. package/dist/react-native/searchIndex/api/options.d.ts +60 -5
  655. package/dist/react-native/searchIndex/api/options.d.ts.map +1 -1
  656. package/dist/react-native/searchIndex/api/options.js.map +1 -1
  657. package/dist/react-native/searchIndex/api/searchIndexContext.js +1 -1
  658. package/dist/react-native/searchIndex/api/searchIndexContext.js.map +1 -1
  659. package/dist/react-native/searchIndex/index.d.ts +1 -1
  660. package/dist/react-native/searchIndex/index.d.ts.map +1 -1
  661. package/dist/react-native/searchIndex/index.js.map +1 -1
  662. package/dist/react-native/searchIndex/searchIndexClient.d.ts +2 -4
  663. package/dist/react-native/searchIndex/searchIndexClient.d.ts.map +1 -1
  664. package/dist/react-native/searchIndex/searchIndexClient.js +1 -5
  665. package/dist/react-native/searchIndex/searchIndexClient.js.map +1 -1
  666. package/dist/react-native/searchIndexClient.d.ts +2 -7
  667. package/dist/react-native/searchIndexClient.d.ts.map +1 -1
  668. package/dist/react-native/searchIndexClient.js +2 -9
  669. package/dist/react-native/searchIndexClient.js.map +1 -1
  670. package/dist/react-native/searchIndexer/api/index.d.ts +4 -3
  671. package/dist/react-native/searchIndexer/api/index.d.ts.map +1 -1
  672. package/dist/react-native/searchIndexer/api/index.js +2 -2
  673. package/dist/react-native/searchIndexer/api/index.js.map +1 -1
  674. package/dist/react-native/searchIndexer/api/operations.d.ts +2 -14
  675. package/dist/react-native/searchIndexer/api/operations.d.ts.map +1 -1
  676. package/dist/react-native/searchIndexer/api/operations.js +112 -150
  677. package/dist/react-native/searchIndexer/api/operations.js.map +1 -1
  678. package/dist/react-native/searchIndexer/api/options.d.ts +36 -30
  679. package/dist/react-native/searchIndexer/api/options.d.ts.map +1 -1
  680. package/dist/react-native/searchIndexer/api/options.js.map +1 -1
  681. package/dist/react-native/searchIndexer/api/searchIndexerContext.js +1 -1
  682. package/dist/react-native/searchIndexer/api/searchIndexerContext.js.map +1 -1
  683. package/dist/react-native/searchIndexer/index.d.ts +1 -1
  684. package/dist/react-native/searchIndexer/index.d.ts.map +1 -1
  685. package/dist/react-native/searchIndexer/index.js.map +1 -1
  686. package/dist/react-native/searchIndexer/searchIndexerClient.d.ts +2 -8
  687. package/dist/react-native/searchIndexer/searchIndexerClient.d.ts.map +1 -1
  688. package/dist/react-native/searchIndexer/searchIndexerClient.js +1 -13
  689. package/dist/react-native/searchIndexer/searchIndexerClient.js.map +1 -1
  690. package/dist/react-native/searchIndexerClient.d.ts +1 -14
  691. package/dist/react-native/searchIndexerClient.d.ts.map +1 -1
  692. package/dist/react-native/searchIndexerClient.js +0 -27
  693. package/dist/react-native/searchIndexerClient.js.map +1 -1
  694. package/dist/react-native/searchIndexingBufferedSender.d.ts.map +1 -1
  695. package/dist/react-native/searchIndexingBufferedSender.js +3 -7
  696. package/dist/react-native/searchIndexingBufferedSender.js.map +1 -1
  697. package/dist/react-native/serviceModels.d.ts +7 -191
  698. package/dist/react-native/serviceModels.d.ts.map +1 -1
  699. package/dist/react-native/serviceModels.js.map +1 -1
  700. package/dist/react-native/serviceUtils.d.ts +3 -5
  701. package/dist/react-native/serviceUtils.d.ts.map +1 -1
  702. package/dist/react-native/serviceUtils.js +30 -87
  703. package/dist/react-native/serviceUtils.js.map +1 -1
  704. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
  705. package/dist/react-native/{synonymMapHelper.d.ts → synonymMapHelper-browser.d.mts} +4 -3
  706. package/dist/react-native/synonymMapHelper-browser.d.mts.map +1 -0
  707. package/dist/react-native/synonymMapHelper-browser.mjs +14 -0
  708. package/dist/react-native/synonymMapHelper-browser.mjs.map +1 -0
  709. package/dist/react-native/synonymMapHelper-react-native.d.mts +2 -0
  710. package/dist/react-native/synonymMapHelper-react-native.d.mts.map +1 -0
  711. package/dist/react-native/synonymMapHelper-react-native.mjs +4 -0
  712. package/dist/react-native/synonymMapHelper-react-native.mjs.map +1 -0
  713. package/dist/react-native/timers-browser.d.mts +8 -0
  714. package/dist/react-native/timers-browser.d.mts.map +1 -0
  715. package/dist/react-native/timers-browser.mjs +13 -0
  716. package/dist/react-native/timers-browser.mjs.map +1 -0
  717. package/dist/react-native/timers-react-native.d.mts +2 -0
  718. package/dist/react-native/timers-react-native.d.mts.map +1 -0
  719. package/dist/react-native/timers-react-native.mjs +4 -0
  720. package/dist/react-native/timers-react-native.mjs.map +1 -0
  721. package/dist/react-native/tracing.d.ts.map +1 -1
  722. package/dist/react-native/walk.js +1 -1
  723. package/dist/react-native/walk.js.map +1 -1
  724. package/package.json +33 -20
  725. package/dist/browser/errorModels.d.ts +0 -56
  726. package/dist/browser/errorModels.d.ts.map +0 -1
  727. package/dist/browser/errorModels.js +0 -4
  728. package/dist/browser/errorModels.js.map +0 -1
  729. package/dist/browser/synonymMapHelper.d.ts.map +0 -1
  730. package/dist/browser/synonymMapHelper.js.map +0 -1
  731. package/dist/commonjs/errorModels.d.ts +0 -56
  732. package/dist/commonjs/errorModels.d.ts.map +0 -1
  733. package/dist/commonjs/errorModels.js.map +0 -7
  734. package/dist/esm/errorModels.d.ts +0 -56
  735. package/dist/esm/errorModels.d.ts.map +0 -1
  736. package/dist/esm/errorModels.js +0 -0
  737. package/dist/esm/errorModels.js.map +0 -7
  738. package/dist/react-native/errorModels.d.ts +0 -56
  739. package/dist/react-native/errorModels.d.ts.map +0 -1
  740. package/dist/react-native/errorModels.js +0 -4
  741. package/dist/react-native/errorModels.js.map +0 -1
  742. package/dist/react-native/synonymMapHelper.d.ts.map +0 -1
  743. package/dist/react-native/synonymMapHelper.js +0 -24
  744. package/dist/react-native/synonymMapHelper.js.map +0 -1
@@ -1,1213 +1,1123 @@
1
- import {
2
- synonymMapSerializer,
3
- synonymMapDeserializer,
4
- listSynonymMapsResultDeserializer,
5
- searchIndexSerializer,
6
- searchIndexDeserializer,
7
- _listIndexesResultDeserializer,
8
- getIndexStatisticsResultDeserializer,
9
- analyzeTextOptionsSerializer,
10
- analyzeResultDeserializer,
11
- searchAliasSerializer,
12
- searchAliasDeserializer,
13
- _listAliasesResultDeserializer,
14
- knowledgeBaseSerializer,
15
- knowledgeBaseDeserializer,
16
- _listKnowledgeBasesResultDeserializer,
17
- knowledgeSourceUnionSerializer,
18
- knowledgeSourceUnionDeserializer,
19
- _listKnowledgeSourcesResultDeserializer,
20
- searchServiceStatisticsDeserializer,
21
- _listIndexStatsSummaryDeserializer
22
- } from "../../models/azure/search/documents/indexes/models.js";
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { synonymMapSerializer, synonymMapDeserializer, listSynonymMapsResultDeserializer, searchIndexSerializer, searchIndexDeserializer, _listIndexesResultDeserializer, getIndexStatisticsResultDeserializer, analyzeTextOptionsSerializer, analyzeResultDeserializer, searchAliasSerializer, searchAliasDeserializer, _listAliasesResultDeserializer, knowledgeBaseSerializer, knowledgeBaseDeserializer, _listKnowledgeBasesResultDeserializer, knowledgeSourceUnionSerializer, knowledgeSourceUnionDeserializer, _listKnowledgeSourcesResultDeserializer, searchServiceStatisticsDeserializer, } from "../../models/azure/search/documents/indexes/models.js";
23
4
  import { knowledgeSourceStatusDeserializer } from "../../models/azure/search/documents/knowledgeBases/models.js";
24
5
  import { errorResponseDeserializer } from "../../models/azure/search/documents/models.js";
25
6
  import { _listIndexesSelectedResultDeserializer } from "../../models/models.js";
26
7
  import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js";
27
8
  import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
28
9
  import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client";
29
- function _listIndexStatsSummarySend(context, options = { requestOptions: {} }) {
30
- const path = expandUrlTemplate(
31
- "/indexstats{?api%2Dversion}",
32
- {
33
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
34
- },
35
- {
36
- allowReserved: options?.requestOptions?.skipUrlEncoding
10
+ export function _getServiceStatisticsSend(context, options = { requestOptions: {} }) {
11
+ const path = expandUrlTemplate("/servicestats{?api%2Dversion}", {
12
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
13
+ }, {
14
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
15
+ });
16
+ return context.path(path).get({
17
+ ...operationOptionsToRequestParameters(options),
18
+ headers: {
19
+ ...(options?.accept !== undefined
20
+ ? {
21
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
22
+ }
23
+ : {}),
24
+ ...(options?.clientRequestId !== undefined
25
+ ? { "x-ms-client-request-id": options?.clientRequestId }
26
+ : {}),
27
+ ...options.requestOptions?.headers,
28
+ },
29
+ });
30
+ }
31
+ export async function _getServiceStatisticsDeserialize(result) {
32
+ const expectedStatuses = ["200"];
33
+ if (!expectedStatuses.includes(result.status)) {
34
+ const error = createRestError(result);
35
+ error.details = errorResponseDeserializer(result.body);
36
+ throw error;
37
37
  }
38
- );
39
- return context.path(path).get({
40
- ...operationOptionsToRequestParameters(options),
41
- headers: {
42
- accept: "application/json;odata.metadata=minimal",
43
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
44
- ...options.requestOptions?.headers
38
+ return searchServiceStatisticsDeserializer(result.body);
39
+ }
40
+ /** Gets service level statistics for a search service. */
41
+ export async function getServiceStatistics(context, options = { requestOptions: {} }) {
42
+ const result = await _getServiceStatisticsSend(context, options);
43
+ return _getServiceStatisticsDeserialize(result);
44
+ }
45
+ export function _getKnowledgeSourceStatusSend(context, name, options = { requestOptions: {} }) {
46
+ const path = expandUrlTemplate("/knowledgesources('{sourceName}')/status{?api%2Dversion}", {
47
+ sourceName: name,
48
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
49
+ }, {
50
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
51
+ });
52
+ return context.path(path).get({
53
+ ...operationOptionsToRequestParameters(options),
54
+ headers: {
55
+ ...(options?.accept !== undefined
56
+ ? {
57
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
58
+ }
59
+ : {}),
60
+ ...(options?.clientRequestId !== undefined
61
+ ? { "x-ms-client-request-id": options?.clientRequestId }
62
+ : {}),
63
+ ...options.requestOptions?.headers,
64
+ },
65
+ });
66
+ }
67
+ export async function _getKnowledgeSourceStatusDeserialize(result) {
68
+ const expectedStatuses = ["200"];
69
+ if (!expectedStatuses.includes(result.status)) {
70
+ const error = createRestError(result);
71
+ error.details = errorResponseDeserializer(result.body);
72
+ throw error;
45
73
  }
46
- });
47
- }
48
- async function _listIndexStatsSummaryDeserialize(result) {
49
- const expectedStatuses = ["200"];
50
- if (!expectedStatuses.includes(result.status)) {
51
- const error = createRestError(result);
52
- error.details = errorResponseDeserializer(result.body);
53
- throw error;
54
- }
55
- return _listIndexStatsSummaryDeserializer(result.body);
56
- }
57
- function listIndexStatsSummary(context, options = { requestOptions: {} }) {
58
- return buildPagedAsyncIterator(
59
- context,
60
- () => _listIndexStatsSummarySend(context, options),
61
- _listIndexStatsSummaryDeserialize,
62
- ["200"],
63
- { itemName: "indexesStatistics", apiVersion: context.apiVersion ?? "2025-11-01-preview" }
64
- );
65
- }
66
- function _getServiceStatisticsSend(context, options = { requestOptions: {} }) {
67
- const path = expandUrlTemplate(
68
- "/servicestats{?api%2Dversion}",
69
- {
70
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
71
- },
72
- {
73
- allowReserved: options?.requestOptions?.skipUrlEncoding
74
+ return knowledgeSourceStatusDeserializer(result.body);
75
+ }
76
+ /** Retrieves the status of a knowledge source. */
77
+ export async function getKnowledgeSourceStatus(context, name, options = { requestOptions: {} }) {
78
+ const result = await _getKnowledgeSourceStatusSend(context, name, options);
79
+ return _getKnowledgeSourceStatusDeserialize(result);
80
+ }
81
+ export function _createKnowledgeSourceSend(context, knowledgeSource, options = { requestOptions: {} }) {
82
+ const path = expandUrlTemplate("/knowledgesources{?api%2Dversion}", {
83
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
84
+ }, {
85
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
86
+ });
87
+ return context.path(path).post({
88
+ ...operationOptionsToRequestParameters(options),
89
+ contentType: "application/json",
90
+ headers: {
91
+ ...(options?.accept !== undefined
92
+ ? {
93
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
94
+ }
95
+ : {}),
96
+ ...(options?.clientRequestId !== undefined
97
+ ? { "x-ms-client-request-id": options?.clientRequestId }
98
+ : {}),
99
+ ...options.requestOptions?.headers,
100
+ },
101
+ body: knowledgeSourceUnionSerializer(knowledgeSource),
102
+ });
103
+ }
104
+ export async function _createKnowledgeSourceDeserialize(result) {
105
+ const expectedStatuses = ["201"];
106
+ if (!expectedStatuses.includes(result.status)) {
107
+ const error = createRestError(result);
108
+ error.details = errorResponseDeserializer(result.body);
109
+ throw error;
74
110
  }
75
- );
76
- return context.path(path).get({
77
- ...operationOptionsToRequestParameters(options),
78
- headers: {
79
- accept: "application/json;odata.metadata=minimal",
80
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
81
- ...options.requestOptions?.headers
111
+ return knowledgeSourceUnionDeserializer(result.body);
112
+ }
113
+ /** Creates a new knowledge source. */
114
+ export async function createKnowledgeSource(context, knowledgeSource, options = { requestOptions: {} }) {
115
+ const result = await _createKnowledgeSourceSend(context, knowledgeSource, options);
116
+ return _createKnowledgeSourceDeserialize(result);
117
+ }
118
+ export function _listKnowledgeSourcesSend(context, options = { requestOptions: {} }) {
119
+ const path = expandUrlTemplate("/knowledgesources{?api%2Dversion}", {
120
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
121
+ }, {
122
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
123
+ });
124
+ return context.path(path).get({
125
+ ...operationOptionsToRequestParameters(options),
126
+ headers: {
127
+ ...(options?.accept !== undefined
128
+ ? {
129
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
130
+ }
131
+ : {}),
132
+ ...(options?.clientRequestId !== undefined
133
+ ? { "x-ms-client-request-id": options?.clientRequestId }
134
+ : {}),
135
+ ...options.requestOptions?.headers,
136
+ },
137
+ });
138
+ }
139
+ export async function _listKnowledgeSourcesDeserialize(result) {
140
+ const expectedStatuses = ["200"];
141
+ if (!expectedStatuses.includes(result.status)) {
142
+ const error = createRestError(result);
143
+ error.details = errorResponseDeserializer(result.body);
144
+ throw error;
82
145
  }
83
- });
84
- }
85
- async function _getServiceStatisticsDeserialize(result) {
86
- const expectedStatuses = ["200"];
87
- if (!expectedStatuses.includes(result.status)) {
88
- const error = createRestError(result);
89
- error.details = errorResponseDeserializer(result.body);
90
- throw error;
91
- }
92
- return searchServiceStatisticsDeserializer(result.body);
93
- }
94
- async function getServiceStatistics(context, options = { requestOptions: {} }) {
95
- const result = await _getServiceStatisticsSend(context, options);
96
- return _getServiceStatisticsDeserialize(result);
97
- }
98
- function _getKnowledgeSourceStatusSend(context, name, options = { requestOptions: {} }) {
99
- const path = expandUrlTemplate(
100
- "/knowledgesources('{sourceName}')/status{?api%2Dversion}",
101
- {
102
- sourceName: name,
103
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
104
- },
105
- {
106
- allowReserved: options?.requestOptions?.skipUrlEncoding
146
+ return _listKnowledgeSourcesResultDeserializer(result.body);
147
+ }
148
+ /** Lists all knowledge sources available for a search service. */
149
+ export function listKnowledgeSources(context, options = { requestOptions: {} }) {
150
+ return buildPagedAsyncIterator(context, () => _listKnowledgeSourcesSend(context, options), _listKnowledgeSourcesDeserialize, ["200"], { itemName: "value", apiVersion: context.apiVersion ?? "2026-04-01" });
151
+ }
152
+ export function _getKnowledgeSourceSend(context, name, options = { requestOptions: {} }) {
153
+ const path = expandUrlTemplate("/knowledgesources('{sourceName}'){?api%2Dversion}", {
154
+ sourceName: name,
155
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
156
+ }, {
157
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
158
+ });
159
+ return context.path(path).get({
160
+ ...operationOptionsToRequestParameters(options),
161
+ headers: {
162
+ ...(options?.accept !== undefined
163
+ ? {
164
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
165
+ }
166
+ : {}),
167
+ ...(options?.clientRequestId !== undefined
168
+ ? { "x-ms-client-request-id": options?.clientRequestId }
169
+ : {}),
170
+ ...options.requestOptions?.headers,
171
+ },
172
+ });
173
+ }
174
+ export async function _getKnowledgeSourceDeserialize(result) {
175
+ const expectedStatuses = ["200"];
176
+ if (!expectedStatuses.includes(result.status)) {
177
+ const error = createRestError(result);
178
+ error.details = errorResponseDeserializer(result.body);
179
+ throw error;
107
180
  }
108
- );
109
- return context.path(path).get({
110
- ...operationOptionsToRequestParameters(options),
111
- headers: {
112
- accept: "application/json;odata.metadata=minimal",
113
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
114
- ...options.requestOptions?.headers
181
+ return knowledgeSourceUnionDeserializer(result.body);
182
+ }
183
+ /** Retrieves a knowledge source definition. */
184
+ export async function getKnowledgeSource(context, name, options = { requestOptions: {} }) {
185
+ const result = await _getKnowledgeSourceSend(context, name, options);
186
+ return _getKnowledgeSourceDeserialize(result);
187
+ }
188
+ export function _deleteKnowledgeSourceSend(context, name, options = { requestOptions: {} }) {
189
+ const path = expandUrlTemplate("/knowledgesources('{sourceName}'){?api%2Dversion}", {
190
+ sourceName: name,
191
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
192
+ }, {
193
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
194
+ });
195
+ return context.path(path).delete({
196
+ ...operationOptionsToRequestParameters(options),
197
+ headers: {
198
+ ...(options?.accept !== undefined
199
+ ? {
200
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
201
+ }
202
+ : {}),
203
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
204
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
205
+ ...(options?.clientRequestId !== undefined
206
+ ? { "x-ms-client-request-id": options?.clientRequestId }
207
+ : {}),
208
+ ...options.requestOptions?.headers,
209
+ },
210
+ });
211
+ }
212
+ export async function _deleteKnowledgeSourceDeserialize(result) {
213
+ const expectedStatuses = ["204", "404"];
214
+ if (!expectedStatuses.includes(result.status)) {
215
+ const error = createRestError(result);
216
+ error.details = errorResponseDeserializer(result.body);
217
+ throw error;
115
218
  }
116
- });
117
- }
118
- async function _getKnowledgeSourceStatusDeserialize(result) {
119
- const expectedStatuses = ["200"];
120
- if (!expectedStatuses.includes(result.status)) {
121
- const error = createRestError(result);
122
- error.details = errorResponseDeserializer(result.body);
123
- throw error;
124
- }
125
- return knowledgeSourceStatusDeserializer(result.body);
126
- }
127
- async function getKnowledgeSourceStatus(context, name, options = { requestOptions: {} }) {
128
- const result = await _getKnowledgeSourceStatusSend(context, name, options);
129
- return _getKnowledgeSourceStatusDeserialize(result);
130
- }
131
- function _createKnowledgeSourceSend(context, knowledgeSource, options = { requestOptions: {} }) {
132
- const path = expandUrlTemplate(
133
- "/knowledgesources{?api%2Dversion}",
134
- {
135
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
136
- },
137
- {
138
- allowReserved: options?.requestOptions?.skipUrlEncoding
219
+ return;
220
+ }
221
+ /** Deletes an existing knowledge source. */
222
+ export async function deleteKnowledgeSource(context, name, options = { requestOptions: {} }) {
223
+ const result = await _deleteKnowledgeSourceSend(context, name, options);
224
+ return _deleteKnowledgeSourceDeserialize(result);
225
+ }
226
+ export function _createOrUpdateKnowledgeSourceSend(context, knowledgeSource, name, options = { requestOptions: {} }) {
227
+ const path = expandUrlTemplate("/knowledgesources('{sourceName}'){?api%2Dversion}", {
228
+ sourceName: name,
229
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
230
+ }, {
231
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
232
+ });
233
+ return context.path(path).put({
234
+ ...operationOptionsToRequestParameters(options),
235
+ contentType: "application/json",
236
+ headers: {
237
+ ...(options?.accept !== undefined
238
+ ? {
239
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
240
+ }
241
+ : {}),
242
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
243
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
244
+ prefer: "return=representation",
245
+ ...(options?.clientRequestId !== undefined
246
+ ? { "x-ms-client-request-id": options?.clientRequestId }
247
+ : {}),
248
+ ...options.requestOptions?.headers,
249
+ },
250
+ body: knowledgeSourceUnionSerializer(knowledgeSource),
251
+ });
252
+ }
253
+ export async function _createOrUpdateKnowledgeSourceDeserialize(result) {
254
+ const expectedStatuses = ["200", "201"];
255
+ if (!expectedStatuses.includes(result.status)) {
256
+ const error = createRestError(result);
257
+ error.details = errorResponseDeserializer(result.body);
258
+ throw error;
139
259
  }
140
- );
141
- return context.path(path).post({
142
- ...operationOptionsToRequestParameters(options),
143
- contentType: "application/json",
144
- headers: {
145
- accept: "application/json;odata.metadata=minimal",
146
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
147
- ...options.requestOptions?.headers
148
- },
149
- body: knowledgeSourceUnionSerializer(knowledgeSource)
150
- });
151
- }
152
- async function _createKnowledgeSourceDeserialize(result) {
153
- const expectedStatuses = ["201"];
154
- if (!expectedStatuses.includes(result.status)) {
155
- const error = createRestError(result);
156
- error.details = errorResponseDeserializer(result.body);
157
- throw error;
158
- }
159
- return knowledgeSourceUnionDeserializer(result.body);
160
- }
161
- async function createKnowledgeSource(context, knowledgeSource, options = { requestOptions: {} }) {
162
- const result = await _createKnowledgeSourceSend(context, knowledgeSource, options);
163
- return _createKnowledgeSourceDeserialize(result);
164
- }
165
- function _listKnowledgeSourcesSend(context, options = { requestOptions: {} }) {
166
- const path = expandUrlTemplate(
167
- "/knowledgesources{?api%2Dversion}",
168
- {
169
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
170
- },
171
- {
172
- allowReserved: options?.requestOptions?.skipUrlEncoding
260
+ return knowledgeSourceUnionDeserializer(result.body);
261
+ }
262
+ /** Creates a new knowledge source or updates an knowledge source if it already exists. */
263
+ export async function createOrUpdateKnowledgeSource(context, knowledgeSource, name, options = { requestOptions: {} }) {
264
+ const result = await _createOrUpdateKnowledgeSourceSend(context, knowledgeSource, name, options);
265
+ return _createOrUpdateKnowledgeSourceDeserialize(result);
266
+ }
267
+ export function _createKnowledgeBaseSend(context, knowledgeBase, options = { requestOptions: {} }) {
268
+ const path = expandUrlTemplate("/knowledgebases{?api%2Dversion}", {
269
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
270
+ }, {
271
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
272
+ });
273
+ return context.path(path).post({
274
+ ...operationOptionsToRequestParameters(options),
275
+ contentType: "application/json",
276
+ headers: {
277
+ ...(options?.accept !== undefined
278
+ ? {
279
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
280
+ }
281
+ : {}),
282
+ ...(options?.clientRequestId !== undefined
283
+ ? { "x-ms-client-request-id": options?.clientRequestId }
284
+ : {}),
285
+ ...options.requestOptions?.headers,
286
+ },
287
+ body: knowledgeBaseSerializer(knowledgeBase),
288
+ });
289
+ }
290
+ export async function _createKnowledgeBaseDeserialize(result) {
291
+ const expectedStatuses = ["201"];
292
+ if (!expectedStatuses.includes(result.status)) {
293
+ const error = createRestError(result);
294
+ error.details = errorResponseDeserializer(result.body);
295
+ throw error;
173
296
  }
174
- );
175
- return context.path(path).get({
176
- ...operationOptionsToRequestParameters(options),
177
- headers: {
178
- accept: "application/json;odata.metadata=minimal",
179
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
180
- ...options.requestOptions?.headers
297
+ return knowledgeBaseDeserializer(result.body);
298
+ }
299
+ /** Creates a new knowledge base. */
300
+ export async function createKnowledgeBase(context, knowledgeBase, options = { requestOptions: {} }) {
301
+ const result = await _createKnowledgeBaseSend(context, knowledgeBase, options);
302
+ return _createKnowledgeBaseDeserialize(result);
303
+ }
304
+ export function _listKnowledgeBasesSend(context, options = { requestOptions: {} }) {
305
+ const path = expandUrlTemplate("/knowledgebases{?api%2Dversion}", {
306
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
307
+ }, {
308
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
309
+ });
310
+ return context.path(path).get({
311
+ ...operationOptionsToRequestParameters(options),
312
+ headers: {
313
+ ...(options?.accept !== undefined
314
+ ? {
315
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
316
+ }
317
+ : {}),
318
+ ...(options?.clientRequestId !== undefined
319
+ ? { "x-ms-client-request-id": options?.clientRequestId }
320
+ : {}),
321
+ ...options.requestOptions?.headers,
322
+ },
323
+ });
324
+ }
325
+ export async function _listKnowledgeBasesDeserialize(result) {
326
+ const expectedStatuses = ["200"];
327
+ if (!expectedStatuses.includes(result.status)) {
328
+ const error = createRestError(result);
329
+ error.details = errorResponseDeserializer(result.body);
330
+ throw error;
181
331
  }
182
- });
183
- }
184
- async function _listKnowledgeSourcesDeserialize(result) {
185
- const expectedStatuses = ["200"];
186
- if (!expectedStatuses.includes(result.status)) {
187
- const error = createRestError(result);
188
- error.details = errorResponseDeserializer(result.body);
189
- throw error;
190
- }
191
- return _listKnowledgeSourcesResultDeserializer(result.body);
192
- }
193
- function listKnowledgeSources(context, options = { requestOptions: {} }) {
194
- return buildPagedAsyncIterator(
195
- context,
196
- () => _listKnowledgeSourcesSend(context, options),
197
- _listKnowledgeSourcesDeserialize,
198
- ["200"],
199
- { itemName: "value", apiVersion: context.apiVersion ?? "2025-11-01-preview" }
200
- );
201
- }
202
- function _getKnowledgeSourceSend(context, name, options = { requestOptions: {} }) {
203
- const path = expandUrlTemplate(
204
- "/knowledgesources('{sourceName}'){?api%2Dversion}",
205
- {
206
- sourceName: name,
207
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
208
- },
209
- {
210
- allowReserved: options?.requestOptions?.skipUrlEncoding
332
+ return _listKnowledgeBasesResultDeserializer(result.body);
333
+ }
334
+ /** Lists all knowledge bases available for a search service. */
335
+ export function listKnowledgeBases(context, options = { requestOptions: {} }) {
336
+ return buildPagedAsyncIterator(context, () => _listKnowledgeBasesSend(context, options), _listKnowledgeBasesDeserialize, ["200"], { itemName: "value", apiVersion: context.apiVersion ?? "2026-04-01" });
337
+ }
338
+ export function _getKnowledgeBaseSend(context, name, options = { requestOptions: {} }) {
339
+ const path = expandUrlTemplate("/knowledgebases('{knowledgeBaseName}'){?api%2Dversion}", {
340
+ knowledgeBaseName: name,
341
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
342
+ }, {
343
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
344
+ });
345
+ return context.path(path).get({
346
+ ...operationOptionsToRequestParameters(options),
347
+ headers: {
348
+ ...(options?.accept !== undefined
349
+ ? {
350
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
351
+ }
352
+ : {}),
353
+ ...(options?.clientRequestId !== undefined
354
+ ? { "x-ms-client-request-id": options?.clientRequestId }
355
+ : {}),
356
+ ...options.requestOptions?.headers,
357
+ },
358
+ });
359
+ }
360
+ export async function _getKnowledgeBaseDeserialize(result) {
361
+ const expectedStatuses = ["200"];
362
+ if (!expectedStatuses.includes(result.status)) {
363
+ const error = createRestError(result);
364
+ error.details = errorResponseDeserializer(result.body);
365
+ throw error;
211
366
  }
212
- );
213
- return context.path(path).get({
214
- ...operationOptionsToRequestParameters(options),
215
- headers: {
216
- accept: "application/json;odata.metadata=minimal",
217
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
218
- ...options.requestOptions?.headers
367
+ return knowledgeBaseDeserializer(result.body);
368
+ }
369
+ /** Retrieves a knowledge base definition. */
370
+ export async function getKnowledgeBase(context, name, options = { requestOptions: {} }) {
371
+ const result = await _getKnowledgeBaseSend(context, name, options);
372
+ return _getKnowledgeBaseDeserialize(result);
373
+ }
374
+ export function _deleteKnowledgeBaseSend(context, name, options = { requestOptions: {} }) {
375
+ const path = expandUrlTemplate("/knowledgebases('{knowledgeBaseName}'){?api%2Dversion}", {
376
+ knowledgeBaseName: name,
377
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
378
+ }, {
379
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
380
+ });
381
+ return context.path(path).delete({
382
+ ...operationOptionsToRequestParameters(options),
383
+ headers: {
384
+ ...(options?.accept !== undefined
385
+ ? {
386
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
387
+ }
388
+ : {}),
389
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
390
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
391
+ ...(options?.clientRequestId !== undefined
392
+ ? { "x-ms-client-request-id": options?.clientRequestId }
393
+ : {}),
394
+ ...options.requestOptions?.headers,
395
+ },
396
+ });
397
+ }
398
+ export async function _deleteKnowledgeBaseDeserialize(result) {
399
+ const expectedStatuses = ["204", "404"];
400
+ if (!expectedStatuses.includes(result.status)) {
401
+ const error = createRestError(result);
402
+ error.details = errorResponseDeserializer(result.body);
403
+ throw error;
219
404
  }
220
- });
221
- }
222
- async function _getKnowledgeSourceDeserialize(result) {
223
- const expectedStatuses = ["200"];
224
- if (!expectedStatuses.includes(result.status)) {
225
- const error = createRestError(result);
226
- error.details = errorResponseDeserializer(result.body);
227
- throw error;
228
- }
229
- return knowledgeSourceUnionDeserializer(result.body);
230
- }
231
- async function getKnowledgeSource(context, name, options = { requestOptions: {} }) {
232
- const result = await _getKnowledgeSourceSend(context, name, options);
233
- return _getKnowledgeSourceDeserialize(result);
234
- }
235
- function _deleteKnowledgeSourceSend(context, name, options = { requestOptions: {} }) {
236
- const path = expandUrlTemplate(
237
- "/knowledgesources('{sourceName}'){?api%2Dversion}",
238
- {
239
- sourceName: name,
240
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
241
- },
242
- {
243
- allowReserved: options?.requestOptions?.skipUrlEncoding
405
+ return;
406
+ }
407
+ /** Deletes a knowledge base. */
408
+ export async function deleteKnowledgeBase(context, name, options = { requestOptions: {} }) {
409
+ const result = await _deleteKnowledgeBaseSend(context, name, options);
410
+ return _deleteKnowledgeBaseDeserialize(result);
411
+ }
412
+ export function _createOrUpdateKnowledgeBaseSend(context, knowledgeBase, name, options = { requestOptions: {} }) {
413
+ const path = expandUrlTemplate("/knowledgebases('{knowledgeBaseName}'){?api%2Dversion}", {
414
+ knowledgeBaseName: name,
415
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
416
+ }, {
417
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
418
+ });
419
+ return context.path(path).put({
420
+ ...operationOptionsToRequestParameters(options),
421
+ contentType: "application/json",
422
+ headers: {
423
+ ...(options?.accept !== undefined
424
+ ? {
425
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
426
+ }
427
+ : {}),
428
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
429
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
430
+ prefer: "return=representation",
431
+ ...(options?.clientRequestId !== undefined
432
+ ? { "x-ms-client-request-id": options?.clientRequestId }
433
+ : {}),
434
+ ...options.requestOptions?.headers,
435
+ },
436
+ body: knowledgeBaseSerializer(knowledgeBase),
437
+ });
438
+ }
439
+ export async function _createOrUpdateKnowledgeBaseDeserialize(result) {
440
+ const expectedStatuses = ["200", "201"];
441
+ if (!expectedStatuses.includes(result.status)) {
442
+ const error = createRestError(result);
443
+ error.details = errorResponseDeserializer(result.body);
444
+ throw error;
244
445
  }
245
- );
246
- return context.path(path).delete({
247
- ...operationOptionsToRequestParameters(options),
248
- headers: {
249
- accept: "application/json;odata.metadata=minimal",
250
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
251
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
252
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
253
- ...options.requestOptions?.headers
446
+ return knowledgeBaseDeserializer(result.body);
447
+ }
448
+ /** Creates a new knowledge base or updates a knowledge base if it already exists. */
449
+ export async function createOrUpdateKnowledgeBase(context, knowledgeBase, name, options = { requestOptions: {} }) {
450
+ const result = await _createOrUpdateKnowledgeBaseSend(context, knowledgeBase, name, options);
451
+ return _createOrUpdateKnowledgeBaseDeserialize(result);
452
+ }
453
+ export function _createAliasSend(context, alias, options = { requestOptions: {} }) {
454
+ const path = expandUrlTemplate("/aliases{?api%2Dversion}", {
455
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
456
+ }, {
457
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
458
+ });
459
+ return context.path(path).post({
460
+ ...operationOptionsToRequestParameters(options),
461
+ contentType: "application/json",
462
+ headers: {
463
+ ...(options?.accept !== undefined
464
+ ? {
465
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
466
+ }
467
+ : {}),
468
+ ...(options?.clientRequestId !== undefined
469
+ ? { "x-ms-client-request-id": options?.clientRequestId }
470
+ : {}),
471
+ ...options.requestOptions?.headers,
472
+ },
473
+ body: searchAliasSerializer(alias),
474
+ });
475
+ }
476
+ export async function _createAliasDeserialize(result) {
477
+ const expectedStatuses = ["201"];
478
+ if (!expectedStatuses.includes(result.status)) {
479
+ const error = createRestError(result);
480
+ error.details = errorResponseDeserializer(result.body);
481
+ throw error;
254
482
  }
255
- });
256
- }
257
- async function _deleteKnowledgeSourceDeserialize(result) {
258
- const expectedStatuses = ["204", "404"];
259
- if (!expectedStatuses.includes(result.status)) {
260
- const error = createRestError(result);
261
- error.details = errorResponseDeserializer(result.body);
262
- throw error;
263
- }
264
- return;
265
- }
266
- async function deleteKnowledgeSource(context, name, options = { requestOptions: {} }) {
267
- const result = await _deleteKnowledgeSourceSend(context, name, options);
268
- return _deleteKnowledgeSourceDeserialize(result);
269
- }
270
- function _createOrUpdateKnowledgeSourceSend(context, knowledgeSource, name, options = { requestOptions: {} }) {
271
- const path = expandUrlTemplate(
272
- "/knowledgesources('{sourceName}'){?api%2Dversion}",
273
- {
274
- sourceName: name,
275
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
276
- },
277
- {
278
- allowReserved: options?.requestOptions?.skipUrlEncoding
483
+ return searchAliasDeserializer(result.body);
484
+ }
485
+ /** Creates a new search alias. */
486
+ export async function createAlias(context, alias, options = { requestOptions: {} }) {
487
+ const result = await _createAliasSend(context, alias, options);
488
+ return _createAliasDeserialize(result);
489
+ }
490
+ export function _listAliasesSend(context, options = { requestOptions: {} }) {
491
+ const path = expandUrlTemplate("/aliases{?api%2Dversion}", {
492
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
493
+ }, {
494
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
495
+ });
496
+ return context.path(path).get({
497
+ ...operationOptionsToRequestParameters(options),
498
+ headers: {
499
+ ...(options?.accept !== undefined
500
+ ? {
501
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
502
+ }
503
+ : {}),
504
+ ...(options?.clientRequestId !== undefined
505
+ ? { "x-ms-client-request-id": options?.clientRequestId }
506
+ : {}),
507
+ ...options.requestOptions?.headers,
508
+ },
509
+ });
510
+ }
511
+ export async function _listAliasesDeserialize(result) {
512
+ const expectedStatuses = ["200"];
513
+ if (!expectedStatuses.includes(result.status)) {
514
+ const error = createRestError(result);
515
+ error.details = errorResponseDeserializer(result.body);
516
+ throw error;
279
517
  }
280
- );
281
- return context.path(path).put({
282
- ...operationOptionsToRequestParameters(options),
283
- contentType: "application/json",
284
- headers: {
285
- accept: "application/json;odata.metadata=minimal",
286
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
287
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
288
- prefer: "return=representation",
289
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
290
- ...options.requestOptions?.headers
291
- },
292
- body: knowledgeSourceUnionSerializer(knowledgeSource)
293
- });
294
- }
295
- async function _createOrUpdateKnowledgeSourceDeserialize(result) {
296
- const expectedStatuses = ["200", "201"];
297
- if (!expectedStatuses.includes(result.status)) {
298
- const error = createRestError(result);
299
- error.details = errorResponseDeserializer(result.body);
300
- throw error;
301
- }
302
- return knowledgeSourceUnionDeserializer(result.body);
303
- }
304
- async function createOrUpdateKnowledgeSource(context, knowledgeSource, name, options = { requestOptions: {} }) {
305
- const result = await _createOrUpdateKnowledgeSourceSend(context, knowledgeSource, name, options);
306
- return _createOrUpdateKnowledgeSourceDeserialize(result);
307
- }
308
- function _createKnowledgeBaseSend(context, knowledgeBase, options = { requestOptions: {} }) {
309
- const path = expandUrlTemplate(
310
- "/knowledgebases{?api%2Dversion}",
311
- {
312
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
313
- },
314
- {
315
- allowReserved: options?.requestOptions?.skipUrlEncoding
518
+ return _listAliasesResultDeserializer(result.body);
519
+ }
520
+ /** Lists all aliases available for a search service. */
521
+ export function listAliases(context, options = { requestOptions: {} }) {
522
+ return buildPagedAsyncIterator(context, () => _listAliasesSend(context, options), _listAliasesDeserialize, ["200"], { itemName: "aliases", apiVersion: context.apiVersion ?? "2026-04-01" });
523
+ }
524
+ export function _getAliasSend(context, name, options = { requestOptions: {} }) {
525
+ const path = expandUrlTemplate("/aliases('{aliasName}'){?api%2Dversion}", {
526
+ aliasName: name,
527
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
528
+ }, {
529
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
530
+ });
531
+ return context.path(path).get({
532
+ ...operationOptionsToRequestParameters(options),
533
+ headers: {
534
+ ...(options?.accept !== undefined
535
+ ? {
536
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
537
+ }
538
+ : {}),
539
+ ...(options?.clientRequestId !== undefined
540
+ ? { "x-ms-client-request-id": options?.clientRequestId }
541
+ : {}),
542
+ ...options.requestOptions?.headers,
543
+ },
544
+ });
545
+ }
546
+ export async function _getAliasDeserialize(result) {
547
+ const expectedStatuses = ["200"];
548
+ if (!expectedStatuses.includes(result.status)) {
549
+ const error = createRestError(result);
550
+ error.details = errorResponseDeserializer(result.body);
551
+ throw error;
316
552
  }
317
- );
318
- return context.path(path).post({
319
- ...operationOptionsToRequestParameters(options),
320
- contentType: "application/json",
321
- headers: {
322
- accept: "application/json;odata.metadata=minimal",
323
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
324
- ...options.requestOptions?.headers
325
- },
326
- body: knowledgeBaseSerializer(knowledgeBase)
327
- });
328
- }
329
- async function _createKnowledgeBaseDeserialize(result) {
330
- const expectedStatuses = ["201"];
331
- if (!expectedStatuses.includes(result.status)) {
332
- const error = createRestError(result);
333
- error.details = errorResponseDeserializer(result.body);
334
- throw error;
335
- }
336
- return knowledgeBaseDeserializer(result.body);
337
- }
338
- async function createKnowledgeBase(context, knowledgeBase, options = { requestOptions: {} }) {
339
- const result = await _createKnowledgeBaseSend(context, knowledgeBase, options);
340
- return _createKnowledgeBaseDeserialize(result);
341
- }
342
- function _listKnowledgeBasesSend(context, options = { requestOptions: {} }) {
343
- const path = expandUrlTemplate(
344
- "/knowledgebases{?api%2Dversion}",
345
- {
346
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
347
- },
348
- {
349
- allowReserved: options?.requestOptions?.skipUrlEncoding
553
+ return searchAliasDeserializer(result.body);
554
+ }
555
+ /** Retrieves an alias definition. */
556
+ export async function getAlias(context, name, options = { requestOptions: {} }) {
557
+ const result = await _getAliasSend(context, name, options);
558
+ return _getAliasDeserialize(result);
559
+ }
560
+ export function _deleteAliasSend(context, name, options = { requestOptions: {} }) {
561
+ const path = expandUrlTemplate("/aliases('{aliasName}'){?api%2Dversion}", {
562
+ aliasName: name,
563
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
564
+ }, {
565
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
566
+ });
567
+ return context.path(path).delete({
568
+ ...operationOptionsToRequestParameters(options),
569
+ headers: {
570
+ ...(options?.accept !== undefined
571
+ ? {
572
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
573
+ }
574
+ : {}),
575
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
576
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
577
+ ...(options?.clientRequestId !== undefined
578
+ ? { "x-ms-client-request-id": options?.clientRequestId }
579
+ : {}),
580
+ ...options.requestOptions?.headers,
581
+ },
582
+ });
583
+ }
584
+ export async function _deleteAliasDeserialize(result) {
585
+ const expectedStatuses = ["204", "404"];
586
+ if (!expectedStatuses.includes(result.status)) {
587
+ const error = createRestError(result);
588
+ error.details = errorResponseDeserializer(result.body);
589
+ throw error;
350
590
  }
351
- );
352
- return context.path(path).get({
353
- ...operationOptionsToRequestParameters(options),
354
- headers: {
355
- accept: "application/json;odata.metadata=minimal",
356
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
357
- ...options.requestOptions?.headers
591
+ return;
592
+ }
593
+ /** Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation. */
594
+ export async function deleteAlias(context, name, options = { requestOptions: {} }) {
595
+ const result = await _deleteAliasSend(context, name, options);
596
+ return _deleteAliasDeserialize(result);
597
+ }
598
+ export function _createOrUpdateAliasSend(context, alias, name, options = { requestOptions: {} }) {
599
+ const path = expandUrlTemplate("/aliases('{aliasName}'){?api%2Dversion}", {
600
+ aliasName: name,
601
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
602
+ }, {
603
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
604
+ });
605
+ return context.path(path).put({
606
+ ...operationOptionsToRequestParameters(options),
607
+ contentType: "application/json",
608
+ headers: {
609
+ ...(options?.accept !== undefined
610
+ ? {
611
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
612
+ }
613
+ : {}),
614
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
615
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
616
+ prefer: "return=representation",
617
+ ...(options?.clientRequestId !== undefined
618
+ ? { "x-ms-client-request-id": options?.clientRequestId }
619
+ : {}),
620
+ ...options.requestOptions?.headers,
621
+ },
622
+ body: searchAliasSerializer(alias),
623
+ });
624
+ }
625
+ export async function _createOrUpdateAliasDeserialize(result) {
626
+ const expectedStatuses = ["200", "201"];
627
+ if (!expectedStatuses.includes(result.status)) {
628
+ const error = createRestError(result);
629
+ error.details = errorResponseDeserializer(result.body);
630
+ throw error;
358
631
  }
359
- });
360
- }
361
- async function _listKnowledgeBasesDeserialize(result) {
362
- const expectedStatuses = ["200"];
363
- if (!expectedStatuses.includes(result.status)) {
364
- const error = createRestError(result);
365
- error.details = errorResponseDeserializer(result.body);
366
- throw error;
367
- }
368
- return _listKnowledgeBasesResultDeserializer(result.body);
369
- }
370
- function listKnowledgeBases(context, options = { requestOptions: {} }) {
371
- return buildPagedAsyncIterator(
372
- context,
373
- () => _listKnowledgeBasesSend(context, options),
374
- _listKnowledgeBasesDeserialize,
375
- ["200"],
376
- { itemName: "value", apiVersion: context.apiVersion ?? "2025-11-01-preview" }
377
- );
378
- }
379
- function _getKnowledgeBaseSend(context, name, options = { requestOptions: {} }) {
380
- const path = expandUrlTemplate(
381
- "/knowledgebases('{knowledgeBaseName}'){?api%2Dversion}",
382
- {
383
- knowledgeBaseName: name,
384
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
385
- },
386
- {
387
- allowReserved: options?.requestOptions?.skipUrlEncoding
632
+ return searchAliasDeserializer(result.body);
633
+ }
634
+ /** Creates a new search alias or updates an alias if it already exists. */
635
+ export async function createOrUpdateAlias(context, alias, name, options = { requestOptions: {} }) {
636
+ const result = await _createOrUpdateAliasSend(context, alias, name, options);
637
+ return _createOrUpdateAliasDeserialize(result);
638
+ }
639
+ export function _analyzeTextSend(context, request, name, options = { requestOptions: {} }) {
640
+ const path = expandUrlTemplate("/indexes('{indexName}')/search.analyze{?api%2Dversion}", {
641
+ indexName: name,
642
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
643
+ }, {
644
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
645
+ });
646
+ return context.path(path).post({
647
+ ...operationOptionsToRequestParameters(options),
648
+ contentType: "application/json",
649
+ headers: {
650
+ ...(options?.accept !== undefined
651
+ ? {
652
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
653
+ }
654
+ : {}),
655
+ ...(options?.clientRequestId !== undefined
656
+ ? { "x-ms-client-request-id": options?.clientRequestId }
657
+ : {}),
658
+ ...options.requestOptions?.headers,
659
+ },
660
+ body: analyzeTextOptionsSerializer(request),
661
+ });
662
+ }
663
+ export async function _analyzeTextDeserialize(result) {
664
+ const expectedStatuses = ["200"];
665
+ if (!expectedStatuses.includes(result.status)) {
666
+ const error = createRestError(result);
667
+ error.details = errorResponseDeserializer(result.body);
668
+ throw error;
388
669
  }
389
- );
390
- return context.path(path).get({
391
- ...operationOptionsToRequestParameters(options),
392
- headers: {
393
- accept: "application/json;odata.metadata=minimal",
394
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
395
- ...options.requestOptions?.headers
670
+ return analyzeResultDeserializer(result.body);
671
+ }
672
+ /** Shows how an analyzer breaks text into tokens. */
673
+ export async function analyzeText(context, request, name, options = { requestOptions: {} }) {
674
+ const result = await _analyzeTextSend(context, request, name, options);
675
+ return _analyzeTextDeserialize(result);
676
+ }
677
+ export function _getIndexStatisticsSend(context, name, options = { requestOptions: {} }) {
678
+ const path = expandUrlTemplate("/indexes('{indexName}')/search.stats{?api%2Dversion}", {
679
+ indexName: name,
680
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
681
+ }, {
682
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
683
+ });
684
+ return context.path(path).get({
685
+ ...operationOptionsToRequestParameters(options),
686
+ headers: {
687
+ ...(options?.accept !== undefined
688
+ ? {
689
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
690
+ }
691
+ : {}),
692
+ ...(options?.clientRequestId !== undefined
693
+ ? { "x-ms-client-request-id": options?.clientRequestId }
694
+ : {}),
695
+ ...options.requestOptions?.headers,
696
+ },
697
+ });
698
+ }
699
+ export async function _getIndexStatisticsDeserialize(result) {
700
+ const expectedStatuses = ["200"];
701
+ if (!expectedStatuses.includes(result.status)) {
702
+ const error = createRestError(result);
703
+ error.details = errorResponseDeserializer(result.body);
704
+ throw error;
396
705
  }
397
- });
398
- }
399
- async function _getKnowledgeBaseDeserialize(result) {
400
- const expectedStatuses = ["200"];
401
- if (!expectedStatuses.includes(result.status)) {
402
- const error = createRestError(result);
403
- error.details = errorResponseDeserializer(result.body);
404
- throw error;
405
- }
406
- return knowledgeBaseDeserializer(result.body);
407
- }
408
- async function getKnowledgeBase(context, name, options = { requestOptions: {} }) {
409
- const result = await _getKnowledgeBaseSend(context, name, options);
410
- return _getKnowledgeBaseDeserialize(result);
411
- }
412
- function _deleteKnowledgeBaseSend(context, name, options = { requestOptions: {} }) {
413
- const path = expandUrlTemplate(
414
- "/knowledgebases('{knowledgeBaseName}'){?api%2Dversion}",
415
- {
416
- knowledgeBaseName: name,
417
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
418
- },
419
- {
420
- allowReserved: options?.requestOptions?.skipUrlEncoding
706
+ return getIndexStatisticsResultDeserializer(result.body);
707
+ }
708
+ /** Returns statistics for the given index, including a document count and storage usage. */
709
+ export async function getIndexStatistics(context, name, options = { requestOptions: {} }) {
710
+ const result = await _getIndexStatisticsSend(context, name, options);
711
+ return _getIndexStatisticsDeserialize(result);
712
+ }
713
+ export function _createIndexSend(context, index, options = { requestOptions: {} }) {
714
+ const path = expandUrlTemplate("/indexes{?api%2Dversion}", {
715
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
716
+ }, {
717
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
718
+ });
719
+ return context.path(path).post({
720
+ ...operationOptionsToRequestParameters(options),
721
+ contentType: "application/json",
722
+ headers: {
723
+ ...(options?.accept !== undefined
724
+ ? {
725
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
726
+ }
727
+ : {}),
728
+ ...(options?.clientRequestId !== undefined
729
+ ? { "x-ms-client-request-id": options?.clientRequestId }
730
+ : {}),
731
+ ...options.requestOptions?.headers,
732
+ },
733
+ body: searchIndexSerializer(index),
734
+ });
735
+ }
736
+ export async function _createIndexDeserialize(result) {
737
+ const expectedStatuses = ["201"];
738
+ if (!expectedStatuses.includes(result.status)) {
739
+ const error = createRestError(result);
740
+ error.details = errorResponseDeserializer(result.body);
741
+ throw error;
421
742
  }
422
- );
423
- return context.path(path).delete({
424
- ...operationOptionsToRequestParameters(options),
425
- headers: {
426
- accept: "application/json;odata.metadata=minimal",
427
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
428
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
429
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
430
- ...options.requestOptions?.headers
743
+ return searchIndexDeserializer(result.body);
744
+ }
745
+ /** Creates a new search index. */
746
+ export async function createIndex(context, index, options = { requestOptions: {} }) {
747
+ const result = await _createIndexSend(context, index, options);
748
+ return _createIndexDeserialize(result);
749
+ }
750
+ export function _listIndexesWithSelectedPropertiesSend(context, options = { requestOptions: {} }) {
751
+ const path = expandUrlTemplate("/indexes{?api%2Dversion,%24select}", {
752
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
753
+ "%24select": options?.select,
754
+ }, {
755
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
756
+ });
757
+ return context.path(path).get({
758
+ ...operationOptionsToRequestParameters(options),
759
+ headers: {
760
+ ...(options?.accept !== undefined
761
+ ? {
762
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
763
+ }
764
+ : {}),
765
+ ...(options?.clientRequestId !== undefined
766
+ ? { "x-ms-client-request-id": options?.clientRequestId }
767
+ : {}),
768
+ ...options.requestOptions?.headers,
769
+ },
770
+ });
771
+ }
772
+ export async function _listIndexesWithSelectedPropertiesDeserialize(result) {
773
+ const expectedStatuses = ["200"];
774
+ if (!expectedStatuses.includes(result.status)) {
775
+ const error = createRestError(result);
776
+ error.details = errorResponseDeserializer(result.body);
777
+ throw error;
431
778
  }
432
- });
433
- }
434
- async function _deleteKnowledgeBaseDeserialize(result) {
435
- const expectedStatuses = ["204", "404"];
436
- if (!expectedStatuses.includes(result.status)) {
437
- const error = createRestError(result);
438
- error.details = errorResponseDeserializer(result.body);
439
- throw error;
440
- }
441
- return;
442
- }
443
- async function deleteKnowledgeBase(context, name, options = { requestOptions: {} }) {
444
- const result = await _deleteKnowledgeBaseSend(context, name, options);
445
- return _deleteKnowledgeBaseDeserialize(result);
446
- }
447
- function _createOrUpdateKnowledgeBaseSend(context, knowledgeBase, name, options = { requestOptions: {} }) {
448
- const path = expandUrlTemplate(
449
- "/knowledgebases('{knowledgeBaseName}'){?api%2Dversion}",
450
- {
451
- knowledgeBaseName: name,
452
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
453
- },
454
- {
455
- allowReserved: options?.requestOptions?.skipUrlEncoding
779
+ return _listIndexesSelectedResultDeserializer(result.body);
780
+ }
781
+ /** Lists all indexes available for a search service. */
782
+ export function listIndexesWithSelectedProperties(context, options = { requestOptions: {} }) {
783
+ return buildPagedAsyncIterator(context, () => _listIndexesWithSelectedPropertiesSend(context, options), _listIndexesWithSelectedPropertiesDeserialize, ["200"], { itemName: "value", apiVersion: context.apiVersion ?? "2026-04-01" });
784
+ }
785
+ export function _listIndexesSend(context, options = { requestOptions: {} }) {
786
+ const path = expandUrlTemplate("/indexes{?api%2Dversion}", {
787
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
788
+ }, {
789
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
790
+ });
791
+ return context.path(path).get({
792
+ ...operationOptionsToRequestParameters(options),
793
+ headers: {
794
+ ...(options?.accept !== undefined
795
+ ? {
796
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
797
+ }
798
+ : {}),
799
+ ...(options?.clientRequestId !== undefined
800
+ ? { "x-ms-client-request-id": options?.clientRequestId }
801
+ : {}),
802
+ ...options.requestOptions?.headers,
803
+ },
804
+ });
805
+ }
806
+ export async function _listIndexesDeserialize(result) {
807
+ const expectedStatuses = ["200"];
808
+ if (!expectedStatuses.includes(result.status)) {
809
+ const error = createRestError(result);
810
+ error.details = errorResponseDeserializer(result.body);
811
+ throw error;
456
812
  }
457
- );
458
- return context.path(path).put({
459
- ...operationOptionsToRequestParameters(options),
460
- contentType: "application/json",
461
- headers: {
462
- accept: "application/json;odata.metadata=minimal",
463
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
464
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
465
- prefer: "return=representation",
466
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
467
- ...options.requestOptions?.headers
468
- },
469
- body: knowledgeBaseSerializer(knowledgeBase)
470
- });
471
- }
472
- async function _createOrUpdateKnowledgeBaseDeserialize(result) {
473
- const expectedStatuses = ["200", "201"];
474
- if (!expectedStatuses.includes(result.status)) {
475
- const error = createRestError(result);
476
- error.details = errorResponseDeserializer(result.body);
477
- throw error;
478
- }
479
- return knowledgeBaseDeserializer(result.body);
480
- }
481
- async function createOrUpdateKnowledgeBase(context, knowledgeBase, name, options = { requestOptions: {} }) {
482
- const result = await _createOrUpdateKnowledgeBaseSend(context, knowledgeBase, name, options);
483
- return _createOrUpdateKnowledgeBaseDeserialize(result);
484
- }
485
- function _createAliasSend(context, alias, options = { requestOptions: {} }) {
486
- const path = expandUrlTemplate(
487
- "/aliases{?api%2Dversion}",
488
- {
489
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
490
- },
491
- {
492
- allowReserved: options?.requestOptions?.skipUrlEncoding
813
+ return _listIndexesResultDeserializer(result.body);
814
+ }
815
+ /** Lists all indexes available for a search service. */
816
+ export function listIndexes(context, options = { requestOptions: {} }) {
817
+ return buildPagedAsyncIterator(context, () => _listIndexesSend(context, options), _listIndexesDeserialize, ["200"], { itemName: "indexes", apiVersion: context.apiVersion ?? "2026-04-01" });
818
+ }
819
+ export function _getIndexSend(context, name, options = { requestOptions: {} }) {
820
+ const path = expandUrlTemplate("/indexes('{indexName}'){?api%2Dversion}", {
821
+ indexName: name,
822
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
823
+ }, {
824
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
825
+ });
826
+ return context.path(path).get({
827
+ ...operationOptionsToRequestParameters(options),
828
+ headers: {
829
+ ...(options?.accept !== undefined
830
+ ? {
831
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
832
+ }
833
+ : {}),
834
+ ...(options?.clientRequestId !== undefined
835
+ ? { "x-ms-client-request-id": options?.clientRequestId }
836
+ : {}),
837
+ ...options.requestOptions?.headers,
838
+ },
839
+ });
840
+ }
841
+ export async function _getIndexDeserialize(result) {
842
+ const expectedStatuses = ["200"];
843
+ if (!expectedStatuses.includes(result.status)) {
844
+ const error = createRestError(result);
845
+ error.details = errorResponseDeserializer(result.body);
846
+ throw error;
493
847
  }
494
- );
495
- return context.path(path).post({
496
- ...operationOptionsToRequestParameters(options),
497
- contentType: "application/json",
498
- headers: {
499
- accept: "application/json;odata.metadata=minimal",
500
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
501
- ...options.requestOptions?.headers
502
- },
503
- body: searchAliasSerializer(alias)
504
- });
505
- }
506
- async function _createAliasDeserialize(result) {
507
- const expectedStatuses = ["201"];
508
- if (!expectedStatuses.includes(result.status)) {
509
- const error = createRestError(result);
510
- error.details = errorResponseDeserializer(result.body);
511
- throw error;
512
- }
513
- return searchAliasDeserializer(result.body);
514
- }
515
- async function createAlias(context, alias, options = { requestOptions: {} }) {
516
- const result = await _createAliasSend(context, alias, options);
517
- return _createAliasDeserialize(result);
518
- }
519
- function _listAliasesSend(context, options = { requestOptions: {} }) {
520
- const path = expandUrlTemplate(
521
- "/aliases{?api%2Dversion}",
522
- {
523
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
524
- },
525
- {
526
- allowReserved: options?.requestOptions?.skipUrlEncoding
848
+ return searchIndexDeserializer(result.body);
849
+ }
850
+ /** Retrieves an index definition. */
851
+ export async function getIndex(context, name, options = { requestOptions: {} }) {
852
+ const result = await _getIndexSend(context, name, options);
853
+ return _getIndexDeserialize(result);
854
+ }
855
+ export function _deleteIndexSend(context, name, options = { requestOptions: {} }) {
856
+ const path = expandUrlTemplate("/indexes('{indexName}'){?api%2Dversion}", {
857
+ indexName: name,
858
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
859
+ }, {
860
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
861
+ });
862
+ return context.path(path).delete({
863
+ ...operationOptionsToRequestParameters(options),
864
+ headers: {
865
+ ...(options?.accept !== undefined
866
+ ? {
867
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
868
+ }
869
+ : {}),
870
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
871
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
872
+ ...(options?.clientRequestId !== undefined
873
+ ? { "x-ms-client-request-id": options?.clientRequestId }
874
+ : {}),
875
+ ...options.requestOptions?.headers,
876
+ },
877
+ });
878
+ }
879
+ export async function _deleteIndexDeserialize(result) {
880
+ const expectedStatuses = ["204", "404"];
881
+ if (!expectedStatuses.includes(result.status)) {
882
+ const error = createRestError(result);
883
+ error.details = errorResponseDeserializer(result.body);
884
+ throw error;
527
885
  }
528
- );
529
- return context.path(path).get({
530
- ...operationOptionsToRequestParameters(options),
531
- headers: {
532
- accept: "application/json;odata.metadata=minimal",
533
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
534
- ...options.requestOptions?.headers
886
+ return;
887
+ }
888
+ /** Deletes a search index and all the documents it contains. This operation is permanent, with no recovery option. Make sure you have a master copy of your index definition, data ingestion code, and a backup of the primary data source in case you need to re-build the index. */
889
+ export async function deleteIndex(context, name, options = { requestOptions: {} }) {
890
+ const result = await _deleteIndexSend(context, name, options);
891
+ return _deleteIndexDeserialize(result);
892
+ }
893
+ export function _createOrUpdateIndexSend(context, index, name, options = { requestOptions: {} }) {
894
+ const path = expandUrlTemplate("/indexes('{indexName}'){?api%2Dversion,allowIndexDowntime}", {
895
+ indexName: name,
896
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
897
+ allowIndexDowntime: options?.allowIndexDowntime,
898
+ }, {
899
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
900
+ });
901
+ return context.path(path).put({
902
+ ...operationOptionsToRequestParameters(options),
903
+ contentType: "application/json",
904
+ headers: {
905
+ ...(options?.accept !== undefined
906
+ ? {
907
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
908
+ }
909
+ : {}),
910
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
911
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
912
+ prefer: "return=representation",
913
+ ...(options?.clientRequestId !== undefined
914
+ ? { "x-ms-client-request-id": options?.clientRequestId }
915
+ : {}),
916
+ ...options.requestOptions?.headers,
917
+ },
918
+ body: searchIndexSerializer(index),
919
+ });
920
+ }
921
+ export async function _createOrUpdateIndexDeserialize(result) {
922
+ const expectedStatuses = ["200", "201"];
923
+ if (!expectedStatuses.includes(result.status)) {
924
+ const error = createRestError(result);
925
+ error.details = errorResponseDeserializer(result.body);
926
+ throw error;
535
927
  }
536
- });
537
- }
538
- async function _listAliasesDeserialize(result) {
539
- const expectedStatuses = ["200"];
540
- if (!expectedStatuses.includes(result.status)) {
541
- const error = createRestError(result);
542
- error.details = errorResponseDeserializer(result.body);
543
- throw error;
544
- }
545
- return _listAliasesResultDeserializer(result.body);
546
- }
547
- function listAliases(context, options = { requestOptions: {} }) {
548
- return buildPagedAsyncIterator(
549
- context,
550
- () => _listAliasesSend(context, options),
551
- _listAliasesDeserialize,
552
- ["200"],
553
- { itemName: "aliases", apiVersion: context.apiVersion ?? "2025-11-01-preview" }
554
- );
555
- }
556
- function _getAliasSend(context, name, options = { requestOptions: {} }) {
557
- const path = expandUrlTemplate(
558
- "/aliases('{aliasName}'){?api%2Dversion}",
559
- {
560
- aliasName: name,
561
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
562
- },
563
- {
564
- allowReserved: options?.requestOptions?.skipUrlEncoding
928
+ return searchIndexDeserializer(result.body);
929
+ }
930
+ /** Creates a new search index or updates an index if it already exists. */
931
+ export async function createOrUpdateIndex(context, index, name, options = { requestOptions: {} }) {
932
+ const result = await _createOrUpdateIndexSend(context, index, name, options);
933
+ return _createOrUpdateIndexDeserialize(result);
934
+ }
935
+ export function _createSynonymMapSend(context, synonymMap, options = { requestOptions: {} }) {
936
+ const path = expandUrlTemplate("/synonymmaps{?api%2Dversion}", {
937
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
938
+ }, {
939
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
940
+ });
941
+ return context.path(path).post({
942
+ ...operationOptionsToRequestParameters(options),
943
+ contentType: "application/json",
944
+ headers: {
945
+ ...(options?.accept !== undefined
946
+ ? {
947
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
948
+ }
949
+ : {}),
950
+ ...(options?.clientRequestId !== undefined
951
+ ? { "x-ms-client-request-id": options?.clientRequestId }
952
+ : {}),
953
+ ...options.requestOptions?.headers,
954
+ },
955
+ body: synonymMapSerializer(synonymMap),
956
+ });
957
+ }
958
+ export async function _createSynonymMapDeserialize(result) {
959
+ const expectedStatuses = ["201"];
960
+ if (!expectedStatuses.includes(result.status)) {
961
+ const error = createRestError(result);
962
+ error.details = errorResponseDeserializer(result.body);
963
+ throw error;
565
964
  }
566
- );
567
- return context.path(path).get({
568
- ...operationOptionsToRequestParameters(options),
569
- headers: {
570
- accept: "application/json;odata.metadata=minimal",
571
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
572
- ...options.requestOptions?.headers
965
+ return synonymMapDeserializer(result.body);
966
+ }
967
+ /** Creates a new synonym map. */
968
+ export async function createSynonymMap(context, synonymMap, options = { requestOptions: {} }) {
969
+ const result = await _createSynonymMapSend(context, synonymMap, options);
970
+ return _createSynonymMapDeserialize(result);
971
+ }
972
+ export function _getSynonymMapsSend(context, options = { requestOptions: {} }) {
973
+ const path = expandUrlTemplate("/synonymmaps{?api%2Dversion,%24select}", {
974
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
975
+ "%24select": options?.select,
976
+ }, {
977
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
978
+ });
979
+ return context.path(path).get({
980
+ ...operationOptionsToRequestParameters(options),
981
+ headers: {
982
+ ...(options?.accept !== undefined
983
+ ? {
984
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
985
+ }
986
+ : {}),
987
+ ...(options?.clientRequestId !== undefined
988
+ ? { "x-ms-client-request-id": options?.clientRequestId }
989
+ : {}),
990
+ ...options.requestOptions?.headers,
991
+ },
992
+ });
993
+ }
994
+ export async function _getSynonymMapsDeserialize(result) {
995
+ const expectedStatuses = ["200"];
996
+ if (!expectedStatuses.includes(result.status)) {
997
+ const error = createRestError(result);
998
+ error.details = errorResponseDeserializer(result.body);
999
+ throw error;
573
1000
  }
574
- });
575
- }
576
- async function _getAliasDeserialize(result) {
577
- const expectedStatuses = ["200"];
578
- if (!expectedStatuses.includes(result.status)) {
579
- const error = createRestError(result);
580
- error.details = errorResponseDeserializer(result.body);
581
- throw error;
582
- }
583
- return searchAliasDeserializer(result.body);
584
- }
585
- async function getAlias(context, name, options = { requestOptions: {} }) {
586
- const result = await _getAliasSend(context, name, options);
587
- return _getAliasDeserialize(result);
588
- }
589
- function _deleteAliasSend(context, name, options = { requestOptions: {} }) {
590
- const path = expandUrlTemplate(
591
- "/aliases('{aliasName}'){?api%2Dversion}",
592
- {
593
- aliasName: name,
594
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
595
- },
596
- {
597
- allowReserved: options?.requestOptions?.skipUrlEncoding
1001
+ return listSynonymMapsResultDeserializer(result.body);
1002
+ }
1003
+ /** Lists all synonym maps available for a search service. */
1004
+ export async function getSynonymMaps(context, options = { requestOptions: {} }) {
1005
+ const result = await _getSynonymMapsSend(context, options);
1006
+ return _getSynonymMapsDeserialize(result);
1007
+ }
1008
+ export function _getSynonymMapSend(context, name, options = { requestOptions: {} }) {
1009
+ const path = expandUrlTemplate("/synonymmaps('{synonymMapName}'){?api%2Dversion}", {
1010
+ synonymMapName: name,
1011
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
1012
+ }, {
1013
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
1014
+ });
1015
+ return context.path(path).get({
1016
+ ...operationOptionsToRequestParameters(options),
1017
+ headers: {
1018
+ ...(options?.accept !== undefined
1019
+ ? {
1020
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
1021
+ }
1022
+ : {}),
1023
+ ...(options?.clientRequestId !== undefined
1024
+ ? { "x-ms-client-request-id": options?.clientRequestId }
1025
+ : {}),
1026
+ ...options.requestOptions?.headers,
1027
+ },
1028
+ });
1029
+ }
1030
+ export async function _getSynonymMapDeserialize(result) {
1031
+ const expectedStatuses = ["200"];
1032
+ if (!expectedStatuses.includes(result.status)) {
1033
+ const error = createRestError(result);
1034
+ error.details = errorResponseDeserializer(result.body);
1035
+ throw error;
598
1036
  }
599
- );
600
- return context.path(path).delete({
601
- ...operationOptionsToRequestParameters(options),
602
- headers: {
603
- accept: "application/json;odata.metadata=minimal",
604
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
605
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
606
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
607
- ...options.requestOptions?.headers
1037
+ return synonymMapDeserializer(result.body);
1038
+ }
1039
+ /** Retrieves a synonym map definition. */
1040
+ export async function getSynonymMap(context, name, options = { requestOptions: {} }) {
1041
+ const result = await _getSynonymMapSend(context, name, options);
1042
+ return _getSynonymMapDeserialize(result);
1043
+ }
1044
+ export function _deleteSynonymMapSend(context, name, options = { requestOptions: {} }) {
1045
+ const path = expandUrlTemplate("/synonymmaps('{synonymMapName}'){?api%2Dversion}", {
1046
+ synonymMapName: name,
1047
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
1048
+ }, {
1049
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
1050
+ });
1051
+ return context.path(path).delete({
1052
+ ...operationOptionsToRequestParameters(options),
1053
+ headers: {
1054
+ ...(options?.accept !== undefined
1055
+ ? {
1056
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
1057
+ }
1058
+ : {}),
1059
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
1060
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
1061
+ ...(options?.clientRequestId !== undefined
1062
+ ? { "x-ms-client-request-id": options?.clientRequestId }
1063
+ : {}),
1064
+ ...options.requestOptions?.headers,
1065
+ },
1066
+ });
1067
+ }
1068
+ export async function _deleteSynonymMapDeserialize(result) {
1069
+ const expectedStatuses = ["204", "404"];
1070
+ if (!expectedStatuses.includes(result.status)) {
1071
+ const error = createRestError(result);
1072
+ error.details = errorResponseDeserializer(result.body);
1073
+ throw error;
608
1074
  }
609
- });
610
- }
611
- async function _deleteAliasDeserialize(result) {
612
- const expectedStatuses = ["204", "404"];
613
- if (!expectedStatuses.includes(result.status)) {
614
- const error = createRestError(result);
615
- error.details = errorResponseDeserializer(result.body);
616
- throw error;
617
- }
618
- return;
619
- }
620
- async function deleteAlias(context, name, options = { requestOptions: {} }) {
621
- const result = await _deleteAliasSend(context, name, options);
622
- return _deleteAliasDeserialize(result);
623
- }
624
- function _createOrUpdateAliasSend(context, alias, name, options = { requestOptions: {} }) {
625
- const path = expandUrlTemplate(
626
- "/aliases('{aliasName}'){?api%2Dversion}",
627
- {
628
- aliasName: name,
629
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
630
- },
631
- {
632
- allowReserved: options?.requestOptions?.skipUrlEncoding
1075
+ return;
1076
+ }
1077
+ /** Deletes a synonym map. */
1078
+ export async function deleteSynonymMap(context, name, options = { requestOptions: {} }) {
1079
+ const result = await _deleteSynonymMapSend(context, name, options);
1080
+ return _deleteSynonymMapDeserialize(result);
1081
+ }
1082
+ export function _createOrUpdateSynonymMapSend(context, synonymMap, name, options = { requestOptions: {} }) {
1083
+ const path = expandUrlTemplate("/synonymmaps('{synonymMapName}'){?api%2Dversion}", {
1084
+ synonymMapName: name,
1085
+ "api%2Dversion": context.apiVersion ?? "2026-04-01",
1086
+ }, {
1087
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
1088
+ });
1089
+ return context.path(path).put({
1090
+ ...operationOptionsToRequestParameters(options),
1091
+ contentType: "application/json",
1092
+ headers: {
1093
+ ...(options?.accept !== undefined
1094
+ ? {
1095
+ accept: !options?.accept ? options?.accept : "application/json;odata.metadata=minimal",
1096
+ }
1097
+ : {}),
1098
+ ...(options?.ifMatch !== undefined ? { "if-match": options?.ifMatch } : {}),
1099
+ ...(options?.ifNoneMatch !== undefined ? { "if-none-match": options?.ifNoneMatch } : {}),
1100
+ prefer: "return=representation",
1101
+ ...(options?.clientRequestId !== undefined
1102
+ ? { "x-ms-client-request-id": options?.clientRequestId }
1103
+ : {}),
1104
+ ...options.requestOptions?.headers,
1105
+ },
1106
+ body: synonymMapSerializer(synonymMap),
1107
+ });
1108
+ }
1109
+ export async function _createOrUpdateSynonymMapDeserialize(result) {
1110
+ const expectedStatuses = ["200", "201"];
1111
+ if (!expectedStatuses.includes(result.status)) {
1112
+ const error = createRestError(result);
1113
+ error.details = errorResponseDeserializer(result.body);
1114
+ throw error;
633
1115
  }
634
- );
635
- return context.path(path).put({
636
- ...operationOptionsToRequestParameters(options),
637
- contentType: "application/json",
638
- headers: {
639
- accept: "application/json;odata.metadata=minimal",
640
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
641
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
642
- prefer: "return=representation",
643
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
644
- ...options.requestOptions?.headers
645
- },
646
- body: searchAliasSerializer(alias)
647
- });
648
- }
649
- async function _createOrUpdateAliasDeserialize(result) {
650
- const expectedStatuses = ["200", "201"];
651
- if (!expectedStatuses.includes(result.status)) {
652
- const error = createRestError(result);
653
- error.details = errorResponseDeserializer(result.body);
654
- throw error;
655
- }
656
- return searchAliasDeserializer(result.body);
657
- }
658
- async function createOrUpdateAlias(context, alias, name, options = { requestOptions: {} }) {
659
- const result = await _createOrUpdateAliasSend(context, alias, name, options);
660
- return _createOrUpdateAliasDeserialize(result);
661
- }
662
- function _analyzeTextSend(context, request, name, options = { requestOptions: {} }) {
663
- const path = expandUrlTemplate(
664
- "/indexes('{indexName}')/search.analyze{?api%2Dversion}",
665
- {
666
- indexName: name,
667
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
668
- },
669
- {
670
- allowReserved: options?.requestOptions?.skipUrlEncoding
671
- }
672
- );
673
- return context.path(path).post({
674
- ...operationOptionsToRequestParameters(options),
675
- contentType: "application/json",
676
- headers: {
677
- accept: "application/json;odata.metadata=minimal",
678
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
679
- ...options.requestOptions?.headers
680
- },
681
- body: analyzeTextOptionsSerializer(request)
682
- });
683
- }
684
- async function _analyzeTextDeserialize(result) {
685
- const expectedStatuses = ["200"];
686
- if (!expectedStatuses.includes(result.status)) {
687
- const error = createRestError(result);
688
- error.details = errorResponseDeserializer(result.body);
689
- throw error;
690
- }
691
- return analyzeResultDeserializer(result.body);
692
- }
693
- async function analyzeText(context, request, name, options = { requestOptions: {} }) {
694
- const result = await _analyzeTextSend(context, request, name, options);
695
- return _analyzeTextDeserialize(result);
696
- }
697
- function _getIndexStatisticsSend(context, name, options = { requestOptions: {} }) {
698
- const path = expandUrlTemplate(
699
- "/indexes('{indexName}')/search.stats{?api%2Dversion}",
700
- {
701
- indexName: name,
702
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
703
- },
704
- {
705
- allowReserved: options?.requestOptions?.skipUrlEncoding
706
- }
707
- );
708
- return context.path(path).get({
709
- ...operationOptionsToRequestParameters(options),
710
- headers: {
711
- accept: "application/json;odata.metadata=minimal",
712
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
713
- ...options.requestOptions?.headers
714
- }
715
- });
716
- }
717
- async function _getIndexStatisticsDeserialize(result) {
718
- const expectedStatuses = ["200"];
719
- if (!expectedStatuses.includes(result.status)) {
720
- const error = createRestError(result);
721
- error.details = errorResponseDeserializer(result.body);
722
- throw error;
723
- }
724
- return getIndexStatisticsResultDeserializer(result.body);
725
- }
726
- async function getIndexStatistics(context, name, options = { requestOptions: {} }) {
727
- const result = await _getIndexStatisticsSend(context, name, options);
728
- return _getIndexStatisticsDeserialize(result);
729
- }
730
- function _createIndexSend(context, index, options = { requestOptions: {} }) {
731
- const path = expandUrlTemplate(
732
- "/indexes{?api%2Dversion}",
733
- {
734
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
735
- },
736
- {
737
- allowReserved: options?.requestOptions?.skipUrlEncoding
738
- }
739
- );
740
- return context.path(path).post({
741
- ...operationOptionsToRequestParameters(options),
742
- contentType: "application/json",
743
- headers: {
744
- accept: "application/json;odata.metadata=minimal",
745
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
746
- ...options.requestOptions?.headers
747
- },
748
- body: searchIndexSerializer(index)
749
- });
750
- }
751
- async function _createIndexDeserialize(result) {
752
- const expectedStatuses = ["201"];
753
- if (!expectedStatuses.includes(result.status)) {
754
- const error = createRestError(result);
755
- error.details = errorResponseDeserializer(result.body);
756
- throw error;
757
- }
758
- return searchIndexDeserializer(result.body);
759
- }
760
- async function createIndex(context, index, options = { requestOptions: {} }) {
761
- const result = await _createIndexSend(context, index, options);
762
- return _createIndexDeserialize(result);
763
- }
764
- function _listIndexesWithSelectedPropertiesSend(context, options = { requestOptions: {} }) {
765
- const path = expandUrlTemplate(
766
- "/indexes{?api%2Dversion,%24select}",
767
- {
768
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview",
769
- "%24select": options?.select
770
- },
771
- {
772
- allowReserved: options?.requestOptions?.skipUrlEncoding
773
- }
774
- );
775
- return context.path(path).get({
776
- ...operationOptionsToRequestParameters(options),
777
- headers: {
778
- accept: "application/json;odata.metadata=minimal",
779
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
780
- ...options.requestOptions?.headers
781
- }
782
- });
783
- }
784
- async function _listIndexesWithSelectedPropertiesDeserialize(result) {
785
- const expectedStatuses = ["200"];
786
- if (!expectedStatuses.includes(result.status)) {
787
- const error = createRestError(result);
788
- error.details = errorResponseDeserializer(result.body);
789
- throw error;
790
- }
791
- return _listIndexesSelectedResultDeserializer(result.body);
792
- }
793
- function listIndexesWithSelectedProperties(context, options = { requestOptions: {} }) {
794
- return buildPagedAsyncIterator(
795
- context,
796
- () => _listIndexesWithSelectedPropertiesSend(context, options),
797
- _listIndexesWithSelectedPropertiesDeserialize,
798
- ["200"],
799
- { itemName: "value", apiVersion: context.apiVersion ?? "2025-11-01-preview" }
800
- );
801
- }
802
- function _listIndexesSend(context, options = { requestOptions: {} }) {
803
- const path = expandUrlTemplate(
804
- "/indexes{?api%2Dversion}",
805
- {
806
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
807
- },
808
- {
809
- allowReserved: options?.requestOptions?.skipUrlEncoding
810
- }
811
- );
812
- return context.path(path).get({
813
- ...operationOptionsToRequestParameters(options),
814
- headers: {
815
- accept: "application/json;odata.metadata=minimal",
816
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
817
- ...options.requestOptions?.headers
818
- }
819
- });
820
- }
821
- async function _listIndexesDeserialize(result) {
822
- const expectedStatuses = ["200"];
823
- if (!expectedStatuses.includes(result.status)) {
824
- const error = createRestError(result);
825
- error.details = errorResponseDeserializer(result.body);
826
- throw error;
827
- }
828
- return _listIndexesResultDeserializer(result.body);
829
- }
830
- function listIndexes(context, options = { requestOptions: {} }) {
831
- return buildPagedAsyncIterator(
832
- context,
833
- () => _listIndexesSend(context, options),
834
- _listIndexesDeserialize,
835
- ["200"],
836
- { itemName: "indexes", apiVersion: context.apiVersion ?? "2025-11-01-preview" }
837
- );
838
- }
839
- function _getIndexSend(context, name, options = { requestOptions: {} }) {
840
- const path = expandUrlTemplate(
841
- "/indexes('{indexName}'){?api%2Dversion}",
842
- {
843
- indexName: name,
844
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
845
- },
846
- {
847
- allowReserved: options?.requestOptions?.skipUrlEncoding
848
- }
849
- );
850
- return context.path(path).get({
851
- ...operationOptionsToRequestParameters(options),
852
- headers: {
853
- accept: "application/json;odata.metadata=minimal",
854
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
855
- ...options.requestOptions?.headers
856
- }
857
- });
858
- }
859
- async function _getIndexDeserialize(result) {
860
- const expectedStatuses = ["200"];
861
- if (!expectedStatuses.includes(result.status)) {
862
- const error = createRestError(result);
863
- error.details = errorResponseDeserializer(result.body);
864
- throw error;
865
- }
866
- return searchIndexDeserializer(result.body);
867
- }
868
- async function getIndex(context, name, options = { requestOptions: {} }) {
869
- const result = await _getIndexSend(context, name, options);
870
- return _getIndexDeserialize(result);
871
- }
872
- function _deleteIndexSend(context, name, options = { requestOptions: {} }) {
873
- const path = expandUrlTemplate(
874
- "/indexes('{indexName}'){?api%2Dversion}",
875
- {
876
- indexName: name,
877
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
878
- },
879
- {
880
- allowReserved: options?.requestOptions?.skipUrlEncoding
881
- }
882
- );
883
- return context.path(path).delete({
884
- ...operationOptionsToRequestParameters(options),
885
- headers: {
886
- accept: "application/json;odata.metadata=minimal",
887
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
888
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
889
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
890
- ...options.requestOptions?.headers
891
- }
892
- });
893
- }
894
- async function _deleteIndexDeserialize(result) {
895
- const expectedStatuses = ["204", "404"];
896
- if (!expectedStatuses.includes(result.status)) {
897
- const error = createRestError(result);
898
- error.details = errorResponseDeserializer(result.body);
899
- throw error;
900
- }
901
- return;
902
- }
903
- async function deleteIndex(context, name, options = { requestOptions: {} }) {
904
- const result = await _deleteIndexSend(context, name, options);
905
- return _deleteIndexDeserialize(result);
906
- }
907
- function _createOrUpdateIndexSend(context, index, name, options = { requestOptions: {} }) {
908
- const path = expandUrlTemplate(
909
- "/indexes('{indexName}'){?api%2Dversion,allowIndexDowntime}",
910
- {
911
- indexName: name,
912
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview",
913
- allowIndexDowntime: options?.allowIndexDowntime
914
- },
915
- {
916
- allowReserved: options?.requestOptions?.skipUrlEncoding
917
- }
918
- );
919
- return context.path(path).put({
920
- ...operationOptionsToRequestParameters(options),
921
- contentType: "application/json",
922
- headers: {
923
- accept: "application/json;odata.metadata=minimal",
924
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
925
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
926
- prefer: "return=representation",
927
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
928
- ...options.requestOptions?.headers
929
- },
930
- body: searchIndexSerializer(index)
931
- });
932
- }
933
- async function _createOrUpdateIndexDeserialize(result) {
934
- const expectedStatuses = ["200", "201"];
935
- if (!expectedStatuses.includes(result.status)) {
936
- const error = createRestError(result);
937
- error.details = errorResponseDeserializer(result.body);
938
- throw error;
939
- }
940
- return searchIndexDeserializer(result.body);
941
- }
942
- async function createOrUpdateIndex(context, index, name, options = { requestOptions: {} }) {
943
- const result = await _createOrUpdateIndexSend(context, index, name, options);
944
- return _createOrUpdateIndexDeserialize(result);
945
- }
946
- function _createSynonymMapSend(context, synonymMap, options = { requestOptions: {} }) {
947
- const path = expandUrlTemplate(
948
- "/synonymmaps{?api%2Dversion}",
949
- {
950
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
951
- },
952
- {
953
- allowReserved: options?.requestOptions?.skipUrlEncoding
954
- }
955
- );
956
- return context.path(path).post({
957
- ...operationOptionsToRequestParameters(options),
958
- contentType: "application/json",
959
- headers: {
960
- accept: "application/json;odata.metadata=minimal",
961
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
962
- ...options.requestOptions?.headers
963
- },
964
- body: synonymMapSerializer(synonymMap)
965
- });
966
- }
967
- async function _createSynonymMapDeserialize(result) {
968
- const expectedStatuses = ["201"];
969
- if (!expectedStatuses.includes(result.status)) {
970
- const error = createRestError(result);
971
- error.details = errorResponseDeserializer(result.body);
972
- throw error;
973
- }
974
- return synonymMapDeserializer(result.body);
975
- }
976
- async function createSynonymMap(context, synonymMap, options = { requestOptions: {} }) {
977
- const result = await _createSynonymMapSend(context, synonymMap, options);
978
- return _createSynonymMapDeserialize(result);
979
- }
980
- function _getSynonymMapsSend(context, options = { requestOptions: {} }) {
981
- const path = expandUrlTemplate(
982
- "/synonymmaps{?api%2Dversion,%24select}",
983
- {
984
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview",
985
- "%24select": options?.select
986
- },
987
- {
988
- allowReserved: options?.requestOptions?.skipUrlEncoding
989
- }
990
- );
991
- return context.path(path).get({
992
- ...operationOptionsToRequestParameters(options),
993
- headers: {
994
- accept: "application/json;odata.metadata=minimal",
995
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
996
- ...options.requestOptions?.headers
997
- }
998
- });
999
- }
1000
- async function _getSynonymMapsDeserialize(result) {
1001
- const expectedStatuses = ["200"];
1002
- if (!expectedStatuses.includes(result.status)) {
1003
- const error = createRestError(result);
1004
- error.details = errorResponseDeserializer(result.body);
1005
- throw error;
1006
- }
1007
- return listSynonymMapsResultDeserializer(result.body);
1008
- }
1009
- async function getSynonymMaps(context, options = { requestOptions: {} }) {
1010
- const result = await _getSynonymMapsSend(context, options);
1011
- return _getSynonymMapsDeserialize(result);
1012
- }
1013
- function _getSynonymMapSend(context, name, options = { requestOptions: {} }) {
1014
- const path = expandUrlTemplate(
1015
- "/synonymmaps('{synonymMapName}'){?api%2Dversion}",
1016
- {
1017
- synonymMapName: name,
1018
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
1019
- },
1020
- {
1021
- allowReserved: options?.requestOptions?.skipUrlEncoding
1022
- }
1023
- );
1024
- return context.path(path).get({
1025
- ...operationOptionsToRequestParameters(options),
1026
- headers: {
1027
- accept: "application/json;odata.metadata=minimal",
1028
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
1029
- ...options.requestOptions?.headers
1030
- }
1031
- });
1032
- }
1033
- async function _getSynonymMapDeserialize(result) {
1034
- const expectedStatuses = ["200"];
1035
- if (!expectedStatuses.includes(result.status)) {
1036
- const error = createRestError(result);
1037
- error.details = errorResponseDeserializer(result.body);
1038
- throw error;
1039
- }
1040
- return synonymMapDeserializer(result.body);
1041
- }
1042
- async function getSynonymMap(context, name, options = { requestOptions: {} }) {
1043
- const result = await _getSynonymMapSend(context, name, options);
1044
- return _getSynonymMapDeserialize(result);
1045
- }
1046
- function _deleteSynonymMapSend(context, name, options = { requestOptions: {} }) {
1047
- const path = expandUrlTemplate(
1048
- "/synonymmaps('{synonymMapName}'){?api%2Dversion}",
1049
- {
1050
- synonymMapName: name,
1051
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
1052
- },
1053
- {
1054
- allowReserved: options?.requestOptions?.skipUrlEncoding
1055
- }
1056
- );
1057
- return context.path(path).delete({
1058
- ...operationOptionsToRequestParameters(options),
1059
- headers: {
1060
- accept: "application/json;odata.metadata=minimal",
1061
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
1062
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
1063
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
1064
- ...options.requestOptions?.headers
1065
- }
1066
- });
1067
- }
1068
- async function _deleteSynonymMapDeserialize(result) {
1069
- const expectedStatuses = ["204", "404"];
1070
- if (!expectedStatuses.includes(result.status)) {
1071
- const error = createRestError(result);
1072
- error.details = errorResponseDeserializer(result.body);
1073
- throw error;
1074
- }
1075
- return;
1076
- }
1077
- async function deleteSynonymMap(context, name, options = { requestOptions: {} }) {
1078
- const result = await _deleteSynonymMapSend(context, name, options);
1079
- return _deleteSynonymMapDeserialize(result);
1080
- }
1081
- function _createOrUpdateSynonymMapSend(context, synonymMap, name, options = { requestOptions: {} }) {
1082
- const path = expandUrlTemplate(
1083
- "/synonymmaps('{synonymMapName}'){?api%2Dversion}",
1084
- {
1085
- synonymMapName: name,
1086
- "api%2Dversion": context.apiVersion ?? "2025-11-01-preview"
1087
- },
1088
- {
1089
- allowReserved: options?.requestOptions?.skipUrlEncoding
1090
- }
1091
- );
1092
- return context.path(path).put({
1093
- ...operationOptionsToRequestParameters(options),
1094
- contentType: "application/json",
1095
- headers: {
1096
- accept: "application/json;odata.metadata=minimal",
1097
- ...options?.ifMatch !== void 0 ? { "if-match": options?.ifMatch } : {},
1098
- ...options?.ifNoneMatch !== void 0 ? { "if-none-match": options?.ifNoneMatch } : {},
1099
- prefer: "return=representation",
1100
- ...options?.clientRequestId !== void 0 ? { "x-ms-client-request-id": options?.clientRequestId } : {},
1101
- ...options.requestOptions?.headers
1102
- },
1103
- body: synonymMapSerializer(synonymMap)
1104
- });
1105
- }
1106
- async function _createOrUpdateSynonymMapDeserialize(result) {
1107
- const expectedStatuses = ["200", "201"];
1108
- if (!expectedStatuses.includes(result.status)) {
1109
- const error = createRestError(result);
1110
- error.details = errorResponseDeserializer(result.body);
1111
- throw error;
1112
- }
1113
- return synonymMapDeserializer(result.body);
1114
- }
1115
- async function createOrUpdateSynonymMap(context, synonymMap, name, options = { requestOptions: {} }) {
1116
- const result = await _createOrUpdateSynonymMapSend(context, synonymMap, name, options);
1117
- return _createOrUpdateSynonymMapDeserialize(result);
1118
- }
1119
- export {
1120
- _analyzeTextDeserialize,
1121
- _analyzeTextSend,
1122
- _createAliasDeserialize,
1123
- _createAliasSend,
1124
- _createIndexDeserialize,
1125
- _createIndexSend,
1126
- _createKnowledgeBaseDeserialize,
1127
- _createKnowledgeBaseSend,
1128
- _createKnowledgeSourceDeserialize,
1129
- _createKnowledgeSourceSend,
1130
- _createOrUpdateAliasDeserialize,
1131
- _createOrUpdateAliasSend,
1132
- _createOrUpdateIndexDeserialize,
1133
- _createOrUpdateIndexSend,
1134
- _createOrUpdateKnowledgeBaseDeserialize,
1135
- _createOrUpdateKnowledgeBaseSend,
1136
- _createOrUpdateKnowledgeSourceDeserialize,
1137
- _createOrUpdateKnowledgeSourceSend,
1138
- _createOrUpdateSynonymMapDeserialize,
1139
- _createOrUpdateSynonymMapSend,
1140
- _createSynonymMapDeserialize,
1141
- _createSynonymMapSend,
1142
- _deleteAliasDeserialize,
1143
- _deleteAliasSend,
1144
- _deleteIndexDeserialize,
1145
- _deleteIndexSend,
1146
- _deleteKnowledgeBaseDeserialize,
1147
- _deleteKnowledgeBaseSend,
1148
- _deleteKnowledgeSourceDeserialize,
1149
- _deleteKnowledgeSourceSend,
1150
- _deleteSynonymMapDeserialize,
1151
- _deleteSynonymMapSend,
1152
- _getAliasDeserialize,
1153
- _getAliasSend,
1154
- _getIndexDeserialize,
1155
- _getIndexSend,
1156
- _getIndexStatisticsDeserialize,
1157
- _getIndexStatisticsSend,
1158
- _getKnowledgeBaseDeserialize,
1159
- _getKnowledgeBaseSend,
1160
- _getKnowledgeSourceDeserialize,
1161
- _getKnowledgeSourceSend,
1162
- _getKnowledgeSourceStatusDeserialize,
1163
- _getKnowledgeSourceStatusSend,
1164
- _getServiceStatisticsDeserialize,
1165
- _getServiceStatisticsSend,
1166
- _getSynonymMapDeserialize,
1167
- _getSynonymMapSend,
1168
- _getSynonymMapsDeserialize,
1169
- _getSynonymMapsSend,
1170
- _listAliasesDeserialize,
1171
- _listAliasesSend,
1172
- _listIndexStatsSummaryDeserialize,
1173
- _listIndexStatsSummarySend,
1174
- _listIndexesDeserialize,
1175
- _listIndexesSend,
1176
- _listIndexesWithSelectedPropertiesDeserialize,
1177
- _listIndexesWithSelectedPropertiesSend,
1178
- _listKnowledgeBasesDeserialize,
1179
- _listKnowledgeBasesSend,
1180
- _listKnowledgeSourcesDeserialize,
1181
- _listKnowledgeSourcesSend,
1182
- analyzeText,
1183
- createAlias,
1184
- createIndex,
1185
- createKnowledgeBase,
1186
- createKnowledgeSource,
1187
- createOrUpdateAlias,
1188
- createOrUpdateIndex,
1189
- createOrUpdateKnowledgeBase,
1190
- createOrUpdateKnowledgeSource,
1191
- createOrUpdateSynonymMap,
1192
- createSynonymMap,
1193
- deleteAlias,
1194
- deleteIndex,
1195
- deleteKnowledgeBase,
1196
- deleteKnowledgeSource,
1197
- deleteSynonymMap,
1198
- getAlias,
1199
- getIndex,
1200
- getIndexStatistics,
1201
- getKnowledgeBase,
1202
- getKnowledgeSource,
1203
- getKnowledgeSourceStatus,
1204
- getServiceStatistics,
1205
- getSynonymMap,
1206
- getSynonymMaps,
1207
- listAliases,
1208
- listIndexStatsSummary,
1209
- listIndexes,
1210
- listIndexesWithSelectedProperties,
1211
- listKnowledgeBases,
1212
- listKnowledgeSources
1213
- };
1116
+ return synonymMapDeserializer(result.body);
1117
+ }
1118
+ /** Creates a new synonym map or updates a synonym map if it already exists. */
1119
+ export async function createOrUpdateSynonymMap(context, synonymMap, name, options = { requestOptions: {} }) {
1120
+ const result = await _createOrUpdateSynonymMapSend(context, synonymMap, name, options);
1121
+ return _createOrUpdateSynonymMapDeserialize(result);
1122
+ }
1123
+ //# sourceMappingURL=operations.js.map