sarvamai 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/Client.d.ts +45 -0
  2. package/Client.js +37 -0
  3. package/README.md +159 -0
  4. package/api/errors/BadRequestError.d.ts +7 -0
  5. package/api/errors/BadRequestError.js +51 -0
  6. package/api/errors/ForbiddenError.d.ts +8 -0
  7. package/api/errors/ForbiddenError.js +51 -0
  8. package/api/errors/InternalServerError.d.ts +7 -0
  9. package/api/errors/InternalServerError.js +51 -0
  10. package/api/errors/ServiceUnavailableError.d.ts +8 -0
  11. package/api/errors/ServiceUnavailableError.js +51 -0
  12. package/api/errors/TooManyRequestsError.d.ts +8 -0
  13. package/api/errors/TooManyRequestsError.js +51 -0
  14. package/api/errors/UnprocessableEntityError.d.ts +7 -0
  15. package/api/errors/UnprocessableEntityError.js +51 -0
  16. package/api/errors/index.d.ts +6 -0
  17. package/api/errors/index.js +22 -0
  18. package/api/index.d.ts +3 -0
  19. package/api/index.js +19 -0
  20. package/api/resources/analytics/client/Client.d.ts +73 -0
  21. package/api/resources/analytics/client/Client.js +223 -0
  22. package/api/resources/analytics/client/index.d.ts +1 -0
  23. package/api/resources/analytics/client/index.js +17 -0
  24. package/api/resources/analytics/client/requests/CallAnalyticsRequest.d.ts +24 -0
  25. package/api/resources/analytics/client/requests/CallAnalyticsRequest.js +5 -0
  26. package/api/resources/analytics/client/requests/index.d.ts +1 -0
  27. package/api/resources/analytics/client/requests/index.js +2 -0
  28. package/api/resources/analytics/index.d.ts +1 -0
  29. package/api/resources/analytics/index.js +17 -0
  30. package/api/resources/index.d.ts +10 -0
  31. package/api/resources/index.js +49 -0
  32. package/api/resources/pdf/client/Client.d.ts +63 -0
  33. package/api/resources/pdf/client/Client.js +215 -0
  34. package/api/resources/pdf/client/index.d.ts +1 -0
  35. package/api/resources/pdf/client/index.js +17 -0
  36. package/api/resources/pdf/client/requests/ParsePdfRequest.d.ts +21 -0
  37. package/api/resources/pdf/client/requests/ParsePdfRequest.js +5 -0
  38. package/api/resources/pdf/client/requests/TranslatePdfRequest.d.ts +32 -0
  39. package/api/resources/pdf/client/requests/TranslatePdfRequest.js +5 -0
  40. package/api/resources/pdf/client/requests/index.d.ts +2 -0
  41. package/api/resources/pdf/client/requests/index.js +2 -0
  42. package/api/resources/pdf/index.d.ts +1 -0
  43. package/api/resources/pdf/index.js +17 -0
  44. package/api/resources/speechToText/client/Client.d.ts +93 -0
  45. package/api/resources/speechToText/client/Client.js +263 -0
  46. package/api/resources/speechToText/client/index.d.ts +1 -0
  47. package/api/resources/speechToText/client/index.js +17 -0
  48. package/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.d.ts +33 -0
  49. package/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.js +5 -0
  50. package/api/resources/speechToText/client/requests/SpeechToTextTranslationRequest.d.ts +22 -0
  51. package/api/resources/speechToText/client/requests/SpeechToTextTranslationRequest.js +5 -0
  52. package/api/resources/speechToText/client/requests/index.d.ts +2 -0
  53. package/api/resources/speechToText/client/requests/index.js +2 -0
  54. package/api/resources/speechToText/index.d.ts +1 -0
  55. package/api/resources/speechToText/index.js +17 -0
  56. package/api/resources/text/client/Client.d.ts +127 -0
  57. package/api/resources/text/client/Client.js +314 -0
  58. package/api/resources/text/client/index.d.ts +1 -0
  59. package/api/resources/text/client/index.js +17 -0
  60. package/api/resources/text/client/requests/LanguageIdentificationRequest.d.ts +13 -0
  61. package/api/resources/text/client/requests/LanguageIdentificationRequest.js +5 -0
  62. package/api/resources/text/client/requests/TranslationRequest.d.ts +77 -0
  63. package/api/resources/text/client/requests/TranslationRequest.js +5 -0
  64. package/api/resources/text/client/requests/TransliterationRequest.d.ts +68 -0
  65. package/api/resources/text/client/requests/TransliterationRequest.js +5 -0
  66. package/api/resources/text/client/requests/index.d.ts +3 -0
  67. package/api/resources/text/client/requests/index.js +2 -0
  68. package/api/resources/text/index.d.ts +1 -0
  69. package/api/resources/text/index.js +17 -0
  70. package/api/resources/textToSpeech/client/Client.d.ts +51 -0
  71. package/api/resources/textToSpeech/client/Client.js +134 -0
  72. package/api/resources/textToSpeech/client/index.d.ts +1 -0
  73. package/api/resources/textToSpeech/client/index.js +17 -0
  74. package/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.ts +35 -0
  75. package/api/resources/textToSpeech/client/requests/TextToSpeechRequest.js +5 -0
  76. package/api/resources/textToSpeech/client/requests/index.d.ts +1 -0
  77. package/api/resources/textToSpeech/client/requests/index.js +2 -0
  78. package/api/resources/textToSpeech/index.d.ts +1 -0
  79. package/api/resources/textToSpeech/index.js +17 -0
  80. package/api/types/CallAnalyticsJobParameters.d.ts +21 -0
  81. package/api/types/CallAnalyticsJobParameters.js +5 -0
  82. package/api/types/CallAnalyticsJobRequest.d.ts +10 -0
  83. package/api/types/CallAnalyticsJobRequest.js +5 -0
  84. package/api/types/CallAnalyticsResponse.d.ts +19 -0
  85. package/api/types/CallAnalyticsResponse.js +5 -0
  86. package/api/types/DiarizedEntry.d.ts +13 -0
  87. package/api/types/DiarizedEntry.js +5 -0
  88. package/api/types/DiarizedTranscript.d.ts +8 -0
  89. package/api/types/DiarizedTranscript.js +5 -0
  90. package/api/types/ErrorCode.d.ts +16 -0
  91. package/api/types/ErrorCode.js +18 -0
  92. package/api/types/ErrorDetails.d.ts +10 -0
  93. package/api/types/ErrorDetails.js +5 -0
  94. package/api/types/ErrorMessage.d.ts +8 -0
  95. package/api/types/ErrorMessage.js +5 -0
  96. package/api/types/Language.d.ts +17 -0
  97. package/api/types/Language.js +19 -0
  98. package/api/types/LanguageIdentificationResponse.d.ts +39 -0
  99. package/api/types/LanguageIdentificationResponse.js +5 -0
  100. package/api/types/NumeralsFormat.d.ts +8 -0
  101. package/api/types/NumeralsFormat.js +10 -0
  102. package/api/types/ParsedPageResponse.d.ts +7 -0
  103. package/api/types/ParsedPageResponse.js +5 -0
  104. package/api/types/PromptCaching.d.ts +8 -0
  105. package/api/types/PromptCaching.js +10 -0
  106. package/api/types/QnaResponse.d.ts +15 -0
  107. package/api/types/QnaResponse.js +5 -0
  108. package/api/types/Question.d.ts +23 -0
  109. package/api/types/Question.js +5 -0
  110. package/api/types/QuestionType.d.ts +11 -0
  111. package/api/types/QuestionType.js +13 -0
  112. package/api/types/SarvamMode.d.ts +8 -0
  113. package/api/types/SarvamMode.js +10 -0
  114. package/api/types/SpeechSampleRate.d.ts +4 -0
  115. package/api/types/SpeechSampleRate.js +5 -0
  116. package/api/types/SpeechToTextLanguage.d.ts +18 -0
  117. package/api/types/SpeechToTextLanguage.js +20 -0
  118. package/api/types/SpeechToTextModel.d.ts +9 -0
  119. package/api/types/SpeechToTextModel.js +11 -0
  120. package/api/types/SpeechToTextResponse.d.ts +15 -0
  121. package/api/types/SpeechToTextResponse.js +5 -0
  122. package/api/types/SpeechToTextTranslateLanguage.d.ts +17 -0
  123. package/api/types/SpeechToTextTranslateLanguage.js +19 -0
  124. package/api/types/SpeechToTextTranslateModel.d.ts +10 -0
  125. package/api/types/SpeechToTextTranslateModel.js +12 -0
  126. package/api/types/SpeechToTextTranslateResponse.d.ts +13 -0
  127. package/api/types/SpeechToTextTranslateResponse.js +5 -0
  128. package/api/types/SpokenFormNumeralsFormat.d.ts +8 -0
  129. package/api/types/SpokenFormNumeralsFormat.js +10 -0
  130. package/api/types/TextAnalyticsRequest.d.ts +9 -0
  131. package/api/types/TextAnalyticsRequest.js +5 -0
  132. package/api/types/TextAnalyticsResponse.d.ts +9 -0
  133. package/api/types/TextAnalyticsResponse.js +5 -0
  134. package/api/types/TextToSpeechLanguage.d.ts +17 -0
  135. package/api/types/TextToSpeechLanguage.js +19 -0
  136. package/api/types/TextToSpeechModel.d.ts +4 -0
  137. package/api/types/TextToSpeechModel.js +5 -0
  138. package/api/types/TextToSpeechResponse.d.ts +8 -0
  139. package/api/types/TextToSpeechResponse.js +5 -0
  140. package/api/types/TextToSpeechSpeaker.d.ts +18 -0
  141. package/api/types/TextToSpeechSpeaker.js +20 -0
  142. package/api/types/TimestampsModel.d.ts +11 -0
  143. package/api/types/TimestampsModel.js +5 -0
  144. package/api/types/TranslateMode.d.ts +10 -0
  145. package/api/types/TranslateMode.js +12 -0
  146. package/api/types/TranslateModel.d.ts +4 -0
  147. package/api/types/TranslateModel.js +5 -0
  148. package/api/types/TranslatePostprocessing.d.ts +9 -0
  149. package/api/types/TranslatePostprocessing.js +11 -0
  150. package/api/types/TranslateSourceLanguage.d.ts +18 -0
  151. package/api/types/TranslateSourceLanguage.js +20 -0
  152. package/api/types/TranslateSpeakerGender.d.ts +8 -0
  153. package/api/types/TranslateSpeakerGender.js +10 -0
  154. package/api/types/TranslateTargetLanguage.d.ts +17 -0
  155. package/api/types/TranslateTargetLanguage.js +19 -0
  156. package/api/types/TranslatedPage.d.ts +7 -0
  157. package/api/types/TranslatedPage.js +5 -0
  158. package/api/types/TranslationResponse.d.ts +10 -0
  159. package/api/types/TranslationResponse.js +5 -0
  160. package/api/types/TranslatiterateTargetLanguage.d.ts +17 -0
  161. package/api/types/TranslatiterateTargetLanguage.js +19 -0
  162. package/api/types/TransliterateSourceLanguage.d.ts +18 -0
  163. package/api/types/TransliterateSourceLanguage.js +20 -0
  164. package/api/types/TransliterationResponse.d.ts +10 -0
  165. package/api/types/TransliterationResponse.js +5 -0
  166. package/api/types/index.d.ts +43 -0
  167. package/api/types/index.js +59 -0
  168. package/core/fetcher/APIResponse.d.ts +10 -0
  169. package/core/fetcher/APIResponse.js +2 -0
  170. package/core/fetcher/Fetcher.d.ts +39 -0
  171. package/core/fetcher/Fetcher.js +100 -0
  172. package/core/fetcher/Supplier.d.ts +4 -0
  173. package/core/fetcher/Supplier.js +22 -0
  174. package/core/fetcher/createRequestUrl.d.ts +1 -0
  175. package/core/fetcher/createRequestUrl.js +12 -0
  176. package/core/fetcher/getFetchFn.d.ts +4 -0
  177. package/core/fetcher/getFetchFn.js +68 -0
  178. package/core/fetcher/getHeader.d.ts +1 -0
  179. package/core/fetcher/getHeader.js +11 -0
  180. package/core/fetcher/getRequestBody.d.ts +7 -0
  181. package/core/fetcher/getRequestBody.js +23 -0
  182. package/core/fetcher/getResponseBody.d.ts +1 -0
  183. package/core/fetcher/getResponseBody.js +54 -0
  184. package/core/fetcher/index.d.ts +5 -0
  185. package/core/fetcher/index.js +9 -0
  186. package/core/fetcher/makeRequest.d.ts +1 -0
  187. package/core/fetcher/makeRequest.js +42 -0
  188. package/core/fetcher/requestWithRetries.d.ts +1 -0
  189. package/core/fetcher/requestWithRetries.js +40 -0
  190. package/core/fetcher/signals.d.ts +11 -0
  191. package/core/fetcher/signals.js +36 -0
  192. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  193. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  194. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  195. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  196. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  197. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  198. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  199. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  200. package/core/form-data-utils/FormDataWrapper.d.ts +60 -0
  201. package/core/form-data-utils/FormDataWrapper.js +188 -0
  202. package/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  203. package/core/form-data-utils/encodeAsFormParameter.js +18 -0
  204. package/core/form-data-utils/index.d.ts +2 -0
  205. package/core/form-data-utils/index.js +20 -0
  206. package/core/index.d.ts +3 -0
  207. package/core/index.js +19 -0
  208. package/core/json.d.ts +15 -0
  209. package/core/json.js +24 -0
  210. package/core/runtime/index.d.ts +1 -0
  211. package/core/runtime/index.js +5 -0
  212. package/core/runtime/runtime.d.ts +9 -0
  213. package/core/runtime/runtime.js +103 -0
  214. package/dist/Client.d.ts +45 -0
  215. package/dist/Client.js +37 -0
  216. package/dist/api/errors/BadRequestError.d.ts +7 -0
  217. package/dist/api/errors/BadRequestError.js +51 -0
  218. package/dist/api/errors/ForbiddenError.d.ts +8 -0
  219. package/dist/api/errors/ForbiddenError.js +51 -0
  220. package/dist/api/errors/InternalServerError.d.ts +7 -0
  221. package/dist/api/errors/InternalServerError.js +51 -0
  222. package/dist/api/errors/ServiceUnavailableError.d.ts +8 -0
  223. package/dist/api/errors/ServiceUnavailableError.js +51 -0
  224. package/dist/api/errors/TooManyRequestsError.d.ts +8 -0
  225. package/dist/api/errors/TooManyRequestsError.js +51 -0
  226. package/dist/api/errors/UnprocessableEntityError.d.ts +7 -0
  227. package/dist/api/errors/UnprocessableEntityError.js +51 -0
  228. package/dist/api/errors/index.d.ts +6 -0
  229. package/dist/api/errors/index.js +22 -0
  230. package/dist/api/index.d.ts +3 -0
  231. package/dist/api/index.js +19 -0
  232. package/dist/api/resources/analytics/client/Client.d.ts +73 -0
  233. package/dist/api/resources/analytics/client/Client.js +223 -0
  234. package/dist/api/resources/analytics/client/index.d.ts +1 -0
  235. package/dist/api/resources/analytics/client/index.js +17 -0
  236. package/dist/api/resources/analytics/client/requests/CallAnalyticsRequest.d.ts +24 -0
  237. package/dist/api/resources/analytics/client/requests/CallAnalyticsRequest.js +5 -0
  238. package/dist/api/resources/analytics/client/requests/index.d.ts +1 -0
  239. package/dist/api/resources/analytics/client/requests/index.js +2 -0
  240. package/dist/api/resources/analytics/index.d.ts +1 -0
  241. package/dist/api/resources/analytics/index.js +17 -0
  242. package/dist/api/resources/index.d.ts +10 -0
  243. package/dist/api/resources/index.js +49 -0
  244. package/dist/api/resources/pdf/client/Client.d.ts +63 -0
  245. package/dist/api/resources/pdf/client/Client.js +215 -0
  246. package/dist/api/resources/pdf/client/index.d.ts +1 -0
  247. package/dist/api/resources/pdf/client/index.js +17 -0
  248. package/dist/api/resources/pdf/client/requests/ParsePdfRequest.d.ts +21 -0
  249. package/dist/api/resources/pdf/client/requests/ParsePdfRequest.js +5 -0
  250. package/dist/api/resources/pdf/client/requests/TranslatePdfRequest.d.ts +32 -0
  251. package/dist/api/resources/pdf/client/requests/TranslatePdfRequest.js +5 -0
  252. package/dist/api/resources/pdf/client/requests/index.d.ts +2 -0
  253. package/dist/api/resources/pdf/client/requests/index.js +2 -0
  254. package/dist/api/resources/pdf/index.d.ts +1 -0
  255. package/dist/api/resources/pdf/index.js +17 -0
  256. package/dist/api/resources/speechToText/client/Client.d.ts +93 -0
  257. package/dist/api/resources/speechToText/client/Client.js +263 -0
  258. package/dist/api/resources/speechToText/client/index.d.ts +1 -0
  259. package/dist/api/resources/speechToText/client/index.js +17 -0
  260. package/dist/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.d.ts +33 -0
  261. package/dist/api/resources/speechToText/client/requests/SpeechToTextTranscriptionRequest.js +5 -0
  262. package/dist/api/resources/speechToText/client/requests/SpeechToTextTranslationRequest.d.ts +22 -0
  263. package/dist/api/resources/speechToText/client/requests/SpeechToTextTranslationRequest.js +5 -0
  264. package/dist/api/resources/speechToText/client/requests/index.d.ts +2 -0
  265. package/dist/api/resources/speechToText/client/requests/index.js +2 -0
  266. package/dist/api/resources/speechToText/index.d.ts +1 -0
  267. package/dist/api/resources/speechToText/index.js +17 -0
  268. package/dist/api/resources/text/client/Client.d.ts +127 -0
  269. package/dist/api/resources/text/client/Client.js +314 -0
  270. package/dist/api/resources/text/client/index.d.ts +1 -0
  271. package/dist/api/resources/text/client/index.js +17 -0
  272. package/dist/api/resources/text/client/requests/LanguageIdentificationRequest.d.ts +13 -0
  273. package/dist/api/resources/text/client/requests/LanguageIdentificationRequest.js +5 -0
  274. package/dist/api/resources/text/client/requests/TranslationRequest.d.ts +77 -0
  275. package/dist/api/resources/text/client/requests/TranslationRequest.js +5 -0
  276. package/dist/api/resources/text/client/requests/TransliterationRequest.d.ts +68 -0
  277. package/dist/api/resources/text/client/requests/TransliterationRequest.js +5 -0
  278. package/dist/api/resources/text/client/requests/index.d.ts +3 -0
  279. package/dist/api/resources/text/client/requests/index.js +2 -0
  280. package/dist/api/resources/text/index.d.ts +1 -0
  281. package/dist/api/resources/text/index.js +17 -0
  282. package/dist/api/resources/textToSpeech/client/Client.d.ts +51 -0
  283. package/dist/api/resources/textToSpeech/client/Client.js +134 -0
  284. package/dist/api/resources/textToSpeech/client/index.d.ts +1 -0
  285. package/dist/api/resources/textToSpeech/client/index.js +17 -0
  286. package/dist/api/resources/textToSpeech/client/requests/TextToSpeechRequest.d.ts +35 -0
  287. package/dist/api/resources/textToSpeech/client/requests/TextToSpeechRequest.js +5 -0
  288. package/dist/api/resources/textToSpeech/client/requests/index.d.ts +1 -0
  289. package/dist/api/resources/textToSpeech/client/requests/index.js +2 -0
  290. package/dist/api/resources/textToSpeech/index.d.ts +1 -0
  291. package/dist/api/resources/textToSpeech/index.js +17 -0
  292. package/dist/api/types/CallAnalyticsJobParameters.d.ts +21 -0
  293. package/dist/api/types/CallAnalyticsJobParameters.js +5 -0
  294. package/dist/api/types/CallAnalyticsJobRequest.d.ts +10 -0
  295. package/dist/api/types/CallAnalyticsJobRequest.js +5 -0
  296. package/dist/api/types/CallAnalyticsResponse.d.ts +19 -0
  297. package/dist/api/types/CallAnalyticsResponse.js +5 -0
  298. package/dist/api/types/DiarizedEntry.d.ts +13 -0
  299. package/dist/api/types/DiarizedEntry.js +5 -0
  300. package/dist/api/types/DiarizedTranscript.d.ts +8 -0
  301. package/dist/api/types/DiarizedTranscript.js +5 -0
  302. package/dist/api/types/ErrorCode.d.ts +16 -0
  303. package/dist/api/types/ErrorCode.js +18 -0
  304. package/dist/api/types/ErrorDetails.d.ts +10 -0
  305. package/dist/api/types/ErrorDetails.js +5 -0
  306. package/dist/api/types/ErrorMessage.d.ts +8 -0
  307. package/dist/api/types/ErrorMessage.js +5 -0
  308. package/dist/api/types/Language.d.ts +17 -0
  309. package/dist/api/types/Language.js +19 -0
  310. package/dist/api/types/LanguageIdentificationResponse.d.ts +39 -0
  311. package/dist/api/types/LanguageIdentificationResponse.js +5 -0
  312. package/dist/api/types/NumeralsFormat.d.ts +8 -0
  313. package/dist/api/types/NumeralsFormat.js +10 -0
  314. package/dist/api/types/ParsedPageResponse.d.ts +7 -0
  315. package/dist/api/types/ParsedPageResponse.js +5 -0
  316. package/dist/api/types/PromptCaching.d.ts +8 -0
  317. package/dist/api/types/PromptCaching.js +10 -0
  318. package/dist/api/types/QnaResponse.d.ts +15 -0
  319. package/dist/api/types/QnaResponse.js +5 -0
  320. package/dist/api/types/Question.d.ts +23 -0
  321. package/dist/api/types/Question.js +5 -0
  322. package/dist/api/types/QuestionType.d.ts +11 -0
  323. package/dist/api/types/QuestionType.js +13 -0
  324. package/dist/api/types/SarvamMode.d.ts +8 -0
  325. package/dist/api/types/SarvamMode.js +10 -0
  326. package/dist/api/types/SpeechSampleRate.d.ts +4 -0
  327. package/dist/api/types/SpeechSampleRate.js +5 -0
  328. package/dist/api/types/SpeechToTextLanguage.d.ts +18 -0
  329. package/dist/api/types/SpeechToTextLanguage.js +20 -0
  330. package/dist/api/types/SpeechToTextModel.d.ts +9 -0
  331. package/dist/api/types/SpeechToTextModel.js +11 -0
  332. package/dist/api/types/SpeechToTextResponse.d.ts +15 -0
  333. package/dist/api/types/SpeechToTextResponse.js +5 -0
  334. package/dist/api/types/SpeechToTextTranslateLanguage.d.ts +17 -0
  335. package/dist/api/types/SpeechToTextTranslateLanguage.js +19 -0
  336. package/dist/api/types/SpeechToTextTranslateModel.d.ts +10 -0
  337. package/dist/api/types/SpeechToTextTranslateModel.js +12 -0
  338. package/dist/api/types/SpeechToTextTranslateResponse.d.ts +13 -0
  339. package/dist/api/types/SpeechToTextTranslateResponse.js +5 -0
  340. package/dist/api/types/SpokenFormNumeralsFormat.d.ts +8 -0
  341. package/dist/api/types/SpokenFormNumeralsFormat.js +10 -0
  342. package/dist/api/types/TextAnalyticsRequest.d.ts +9 -0
  343. package/dist/api/types/TextAnalyticsRequest.js +5 -0
  344. package/dist/api/types/TextAnalyticsResponse.d.ts +9 -0
  345. package/dist/api/types/TextAnalyticsResponse.js +5 -0
  346. package/dist/api/types/TextToSpeechLanguage.d.ts +17 -0
  347. package/dist/api/types/TextToSpeechLanguage.js +19 -0
  348. package/dist/api/types/TextToSpeechModel.d.ts +4 -0
  349. package/dist/api/types/TextToSpeechModel.js +5 -0
  350. package/dist/api/types/TextToSpeechResponse.d.ts +8 -0
  351. package/dist/api/types/TextToSpeechResponse.js +5 -0
  352. package/dist/api/types/TextToSpeechSpeaker.d.ts +18 -0
  353. package/dist/api/types/TextToSpeechSpeaker.js +20 -0
  354. package/dist/api/types/TimestampsModel.d.ts +11 -0
  355. package/dist/api/types/TimestampsModel.js +5 -0
  356. package/dist/api/types/TranslateMode.d.ts +10 -0
  357. package/dist/api/types/TranslateMode.js +12 -0
  358. package/dist/api/types/TranslateModel.d.ts +4 -0
  359. package/dist/api/types/TranslateModel.js +5 -0
  360. package/dist/api/types/TranslatePostprocessing.d.ts +9 -0
  361. package/dist/api/types/TranslatePostprocessing.js +11 -0
  362. package/dist/api/types/TranslateSourceLanguage.d.ts +18 -0
  363. package/dist/api/types/TranslateSourceLanguage.js +20 -0
  364. package/dist/api/types/TranslateSpeakerGender.d.ts +8 -0
  365. package/dist/api/types/TranslateSpeakerGender.js +10 -0
  366. package/dist/api/types/TranslateTargetLanguage.d.ts +17 -0
  367. package/dist/api/types/TranslateTargetLanguage.js +19 -0
  368. package/dist/api/types/TranslatedPage.d.ts +7 -0
  369. package/dist/api/types/TranslatedPage.js +5 -0
  370. package/dist/api/types/TranslationResponse.d.ts +10 -0
  371. package/dist/api/types/TranslationResponse.js +5 -0
  372. package/dist/api/types/TranslatiterateTargetLanguage.d.ts +17 -0
  373. package/dist/api/types/TranslatiterateTargetLanguage.js +19 -0
  374. package/dist/api/types/TransliterateSourceLanguage.d.ts +18 -0
  375. package/dist/api/types/TransliterateSourceLanguage.js +20 -0
  376. package/dist/api/types/TransliterationResponse.d.ts +10 -0
  377. package/dist/api/types/TransliterationResponse.js +5 -0
  378. package/dist/api/types/index.d.ts +43 -0
  379. package/dist/api/types/index.js +59 -0
  380. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  381. package/dist/core/fetcher/APIResponse.js +2 -0
  382. package/dist/core/fetcher/Fetcher.d.ts +39 -0
  383. package/dist/core/fetcher/Fetcher.js +100 -0
  384. package/dist/core/fetcher/Supplier.d.ts +4 -0
  385. package/dist/core/fetcher/Supplier.js +22 -0
  386. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  387. package/dist/core/fetcher/createRequestUrl.js +12 -0
  388. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  389. package/dist/core/fetcher/getFetchFn.js +68 -0
  390. package/dist/core/fetcher/getHeader.d.ts +1 -0
  391. package/dist/core/fetcher/getHeader.js +11 -0
  392. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  393. package/dist/core/fetcher/getRequestBody.js +23 -0
  394. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  395. package/dist/core/fetcher/getResponseBody.js +54 -0
  396. package/dist/core/fetcher/index.d.ts +5 -0
  397. package/dist/core/fetcher/index.js +9 -0
  398. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  399. package/dist/core/fetcher/makeRequest.js +42 -0
  400. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  401. package/dist/core/fetcher/requestWithRetries.js +40 -0
  402. package/dist/core/fetcher/signals.d.ts +11 -0
  403. package/dist/core/fetcher/signals.js +36 -0
  404. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  405. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  406. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  407. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  408. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  409. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  410. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  411. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  412. package/dist/core/form-data-utils/FormDataWrapper.d.ts +60 -0
  413. package/dist/core/form-data-utils/FormDataWrapper.js +188 -0
  414. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +4 -0
  415. package/dist/core/form-data-utils/encodeAsFormParameter.js +18 -0
  416. package/dist/core/form-data-utils/index.d.ts +2 -0
  417. package/dist/core/form-data-utils/index.js +20 -0
  418. package/dist/core/index.d.ts +3 -0
  419. package/dist/core/index.js +19 -0
  420. package/dist/core/json.d.ts +15 -0
  421. package/dist/core/json.js +24 -0
  422. package/dist/core/runtime/index.d.ts +1 -0
  423. package/dist/core/runtime/index.js +5 -0
  424. package/dist/core/runtime/runtime.d.ts +9 -0
  425. package/dist/core/runtime/runtime.js +103 -0
  426. package/dist/environments.d.ts +8 -0
  427. package/dist/environments.js +10 -0
  428. package/dist/errors/SarvamError.d.ts +12 -0
  429. package/dist/errors/SarvamError.js +33 -0
  430. package/dist/errors/SarvamTimeoutError.d.ts +6 -0
  431. package/dist/errors/SarvamTimeoutError.js +13 -0
  432. package/dist/errors/index.d.ts +2 -0
  433. package/dist/errors/index.js +7 -0
  434. package/dist/index.d.ts +4 -0
  435. package/dist/index.js +44 -0
  436. package/dist/version.d.ts +1 -0
  437. package/dist/version.js +4 -0
  438. package/environments.d.ts +8 -0
  439. package/environments.js +10 -0
  440. package/errors/SarvamError.d.ts +12 -0
  441. package/errors/SarvamError.js +33 -0
  442. package/errors/SarvamTimeoutError.d.ts +6 -0
  443. package/errors/SarvamTimeoutError.js +13 -0
  444. package/errors/index.d.ts +2 -0
  445. package/errors/index.js +7 -0
  446. package/index.d.ts +4 -0
  447. package/index.js +44 -0
  448. package/jest.config.mjs +8 -0
  449. package/package.json +43 -0
  450. package/reference.md +768 -0
  451. package/scripts/rename-to-esm-files.js +115 -0
  452. package/version.d.ts +1 -0
  453. package/version.js +4 -0
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
+ return new (P || (P = Promise))(function (resolve, reject) {
41
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
45
+ });
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.TextToSpeech = void 0;
52
+ const environments = __importStar(require("../../../../environments"));
53
+ const core = __importStar(require("../../../../core"));
54
+ const Sarvam = __importStar(require("../../../index"));
55
+ const url_join_1 = __importDefault(require("url-join"));
56
+ const errors = __importStar(require("../../../../errors/index"));
57
+ class TextToSpeech {
58
+ constructor(_options = {}) {
59
+ this._options = _options;
60
+ }
61
+ /**
62
+ * This is the model to convert text into spoken audio.
63
+ * The output is a wave file encoded as a base64 string.
64
+ *
65
+ * @param {Sarvam.TextToSpeechRequest} request
66
+ * @param {TextToSpeech.RequestOptions} requestOptions - Request-specific configuration.
67
+ *
68
+ * @throws {@link Sarvam.BadRequestError}
69
+ * @throws {@link Sarvam.ForbiddenError}
70
+ * @throws {@link Sarvam.UnprocessableEntityError}
71
+ * @throws {@link Sarvam.TooManyRequestsError}
72
+ * @throws {@link Sarvam.InternalServerError}
73
+ *
74
+ * @example
75
+ * await client.textToSpeech.convert({
76
+ * inputs: ["inputs"],
77
+ * target_language_code: "hi-IN"
78
+ * })
79
+ */
80
+ convert(request, requestOptions) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ var _a, _b;
83
+ const _response = yield core.fetcher({
84
+ url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.SarvamEnvironment.Production, "text-to-speech"),
85
+ method: "POST",
86
+ headers: Object.assign({ "api-subscription-key": (yield core.Supplier.get(this._options.apiSubscriptionKey)) != null
87
+ ? yield core.Supplier.get(this._options.apiSubscriptionKey)
88
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "sarvamai", "X-Fern-SDK-Version": "0.0.2", "User-Agent": "sarvamai/0.0.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
+ contentType: "application/json",
90
+ requestType: "json",
91
+ body: request,
92
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
94
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ });
96
+ if (_response.ok) {
97
+ return _response.body;
98
+ }
99
+ if (_response.error.reason === "status-code") {
100
+ switch (_response.error.statusCode) {
101
+ case 400:
102
+ throw new Sarvam.BadRequestError(_response.error.body);
103
+ case 403:
104
+ throw new Sarvam.ForbiddenError(_response.error.body);
105
+ case 422:
106
+ throw new Sarvam.UnprocessableEntityError(_response.error.body);
107
+ case 429:
108
+ throw new Sarvam.TooManyRequestsError(_response.error.body);
109
+ case 500:
110
+ throw new Sarvam.InternalServerError(_response.error.body);
111
+ default:
112
+ throw new errors.SarvamError({
113
+ statusCode: _response.error.statusCode,
114
+ body: _response.error.body,
115
+ });
116
+ }
117
+ }
118
+ switch (_response.error.reason) {
119
+ case "non-json":
120
+ throw new errors.SarvamError({
121
+ statusCode: _response.error.statusCode,
122
+ body: _response.error.rawBody,
123
+ });
124
+ case "timeout":
125
+ throw new errors.SarvamTimeoutError("Timeout exceeded when calling POST /text-to-speech.");
126
+ case "unknown":
127
+ throw new errors.SarvamError({
128
+ message: _response.error.errorMessage,
129
+ });
130
+ }
131
+ });
132
+ }
133
+ }
134
+ exports.TextToSpeech = TextToSpeech;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,35 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * inputs: ["inputs"],
9
+ * target_language_code: "hi-IN"
10
+ * }
11
+ */
12
+ export interface TextToSpeechRequest {
13
+ /** The text(s) to be converted into speech. Each text should be no longer than 500 characters. You can send up to 3 texts in a single API call. The text can be code-mixed, combining English and Indic languages. */
14
+ inputs: string[];
15
+ /** The language of the text is BCP-47 format */
16
+ target_language_code: Sarvam.TextToSpeechLanguage;
17
+ /** The speaker to be used for the output audio. If not provided, Meera will be used as default. */
18
+ speaker?: Sarvam.TextToSpeechSpeaker;
19
+ /** Controls the pitch of the audio. Lower values result in a deeper voice, while higher values make it sharper. The suitable range is between -0.75 and 0.75. */
20
+ pitch?: number;
21
+ /** Controls the speed of the audio. Lower values result in slower speech, while higher values make it faster. The suitable range is between 0.5 and 2.0. Default is 1.0. */
22
+ pace?: number;
23
+ /** Controls the loudness of the audio. Lower values result in quieter audio, while higher values make it louder. The suitable range is between 0.3 and 3.0. */
24
+ loudness?: number;
25
+ /** Specifies the sample rate of the output audio. Supported values are 8000, 16000, and 22050 Hz. If not provided, the default is 22050 Hz. */
26
+ speech_sample_rate?: Sarvam.SpeechSampleRate;
27
+ /** Controls whether normalization of English words and numeric entities (e.g., numbers, dates) is performed. Set to true for better handling of mixed-language text. Default is false. */
28
+ enable_preprocessing?: boolean;
29
+ /** Specifies the model to use for text-to-speech conversion. */
30
+ model?: Sarvam.TextToSpeechModel;
31
+ /** Weight for interpolating with English speaker at encoder */
32
+ eng_interpolation_wt?: number;
33
+ /** Override the default speaker triplets */
34
+ override_triplets?: Record<string, unknown>;
35
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { type TextToSpeechRequest } from "./TextToSpeechRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./client";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface CallAnalyticsJobParameters {
6
+ /**
7
+ * List of questions to be answered based on the call content. Each question should be a valid JSON object with the following structure:
8
+ * ```[{id: "q001", text: "What was the main issue discussed in the call?", description: "Identify the primary concern or topic of the conversation", type: "enum", properties: {"options": ["NEW_CONNECTION", "INTERNET_ISSUES", "REFUND"]}}].```The `type` field must be one of: `boolean`, `enum`, `short answer`, `long answer`, or `number`. For `enum` type questions, include an 'options' list in the properties.
9
+ */
10
+ questions: Sarvam.Question[];
11
+ /** Model to be used for converting speech to text in target language */
12
+ model?: Sarvam.SpeechToTextTranslateModel;
13
+ /**
14
+ * Enables speaker diarization, which identifies and separates different speakers in the audio.
15
+ * When set to true, the API will provide speaker-specific segments in the response.
16
+ * Note: This parameter is currently in Beta mode.
17
+ */
18
+ with_diarization?: boolean;
19
+ /** Number of speakers to be detected in the audio. */
20
+ num_speakers?: number;
21
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface CallAnalyticsJobRequest {
6
+ /** Job UUID */
7
+ job_id: string;
8
+ /** Job Parameters for the bulk call analytics job */
9
+ job_parameters: Sarvam.CallAnalyticsJobParameters;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface CallAnalyticsResponse {
6
+ request_id?: string;
7
+ /** Unique identifier for the analyzed audio file. */
8
+ file_name?: string;
9
+ /** Full transcript of the call generated by Sarvam's inhouse speech-to-text model. */
10
+ transcript: string;
11
+ /** List of answers to predefined questions, derived from the call analysis. It can be null if no valid answers were generated. */
12
+ answers?: Sarvam.QnaResponse[];
13
+ /** Duration of the analyzed call in seconds. */
14
+ duration_in_seconds?: number;
15
+ /** This will return the BCP-47 code of language spoken in the input. If multiple languages are detected, this will return language code of most predominant spoken language. If no language is detected, this will be null */
16
+ language_code?: Sarvam.SpeechToTextTranslateLanguage;
17
+ /** Diarized transcript of the provided speech */
18
+ diarized_transcript?: Sarvam.DiarizedTranscript;
19
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DiarizedEntry {
5
+ /** transcript of the segment of that audio */
6
+ transcript: string;
7
+ /** Start time of the word in seconds. */
8
+ start_time_seconds: number;
9
+ /** End time of the word in seconds. */
10
+ end_time_seconds: number;
11
+ /** Speaker ID for the word. */
12
+ speaker_id: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface DiarizedTranscript {
6
+ /** List of diarized transcript entries. */
7
+ entries: Sarvam.DiarizedEntry[];
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ErrorCode = "invalid_request_error" | "internal_server_error" | "unprocessable_entity_error" | "insufficient_quota_error" | "invalid_api_key_error" | "authentication_error" | "rate_limit_exceeded_error" | "not_found_error" | "model_call_error" | "high_load_error";
5
+ export declare const ErrorCode: {
6
+ readonly InvalidRequestError: "invalid_request_error";
7
+ readonly InternalServerError: "internal_server_error";
8
+ readonly UnprocessableEntityError: "unprocessable_entity_error";
9
+ readonly InsufficientQuotaError: "insufficient_quota_error";
10
+ readonly InvalidApiKeyError: "invalid_api_key_error";
11
+ readonly AuthenticationError: "authentication_error";
12
+ readonly RateLimitExceededError: "rate_limit_exceeded_error";
13
+ readonly NotFoundError: "not_found_error";
14
+ readonly ModelCallError: "model_call_error";
15
+ readonly HighLoadError: "high_load_error";
16
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ErrorCode = void 0;
7
+ exports.ErrorCode = {
8
+ InvalidRequestError: "invalid_request_error",
9
+ InternalServerError: "internal_server_error",
10
+ UnprocessableEntityError: "unprocessable_entity_error",
11
+ InsufficientQuotaError: "insufficient_quota_error",
12
+ InvalidApiKeyError: "invalid_api_key_error",
13
+ AuthenticationError: "authentication_error",
14
+ RateLimitExceededError: "rate_limit_exceeded_error",
15
+ NotFoundError: "not_found_error",
16
+ ModelCallError: "model_call_error",
17
+ HighLoadError: "high_load_error",
18
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface ErrorDetails {
6
+ /** Message describing the error */
7
+ message: string;
8
+ /** Error code for the specific error that has occured. Refer to the error code documentation for more details. */
9
+ code: Sarvam.ErrorCode;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface ErrorMessage {
6
+ /** Error details */
7
+ error: Sarvam.ErrorDetails;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type Language = "hi-IN" | "bn-IN" | "kn-IN" | "ml-IN" | "mr-IN" | "od-IN" | "pa-IN" | "ta-IN" | "te-IN" | "en-IN" | "gu-IN";
5
+ export declare const Language: {
6
+ readonly HiIn: "hi-IN";
7
+ readonly BnIn: "bn-IN";
8
+ readonly KnIn: "kn-IN";
9
+ readonly MlIn: "ml-IN";
10
+ readonly MrIn: "mr-IN";
11
+ readonly OdIn: "od-IN";
12
+ readonly PaIn: "pa-IN";
13
+ readonly TaIn: "ta-IN";
14
+ readonly TeIn: "te-IN";
15
+ readonly EnIn: "en-IN";
16
+ readonly GuIn: "gu-IN";
17
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Language = void 0;
7
+ exports.Language = {
8
+ HiIn: "hi-IN",
9
+ BnIn: "bn-IN",
10
+ KnIn: "kn-IN",
11
+ MlIn: "ml-IN",
12
+ MrIn: "mr-IN",
13
+ OdIn: "od-IN",
14
+ PaIn: "pa-IN",
15
+ TaIn: "ta-IN",
16
+ TeIn: "te-IN",
17
+ EnIn: "en-IN",
18
+ GuIn: "gu-IN",
19
+ };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface LanguageIdentificationResponse {
5
+ request_id?: string;
6
+ /**
7
+ * The detected language code of the input text.
8
+ *
9
+ * Available languages:
10
+ * - **`en-IN`**: English
11
+ * - **`hi-IN`**: Hindi
12
+ * - **`bn-IN`**: Bengali
13
+ * - **`gu-IN`**: Gujarati
14
+ * - **`kn-IN`**: Kannada
15
+ * - **`ml-IN`**: Malayalam
16
+ * - **`mr-IN`**: Marathi
17
+ * - **`od-IN`**: Odia
18
+ * - **`pa-IN`**: Punjabi
19
+ * - **`ta-IN`**: Tamil
20
+ * - **`te-IN`**: Telugu
21
+ */
22
+ language_code?: string;
23
+ /**
24
+ * The detected script code of the input text.
25
+ *
26
+ * Available scripts:
27
+ * - **`Latn`**: Latin (Romanized script)
28
+ * - **`Deva`**: Devanagari (Hindi, Marathi)
29
+ * - **`Beng`**: Bengali
30
+ * - **`Gujr`**: Gujarati
31
+ * - **`Knda`**: Kannada
32
+ * - **`Mlym`**: Malayalam
33
+ * - **`Orya`**: Odia
34
+ * - **`Guru`**: Gurmukhi
35
+ * - **`Taml`**: Tamil
36
+ * - **`Telu`**: Telugu
37
+ */
38
+ script_code?: string;
39
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type NumeralsFormat = "international" | "native";
5
+ export declare const NumeralsFormat: {
6
+ readonly International: "international";
7
+ readonly Native: "native";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.NumeralsFormat = void 0;
7
+ exports.NumeralsFormat = {
8
+ International: "international",
9
+ Native: "native",
10
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ParsedPageResponse {
5
+ /** The base64 encoded HTML string corresponding to the parsed page. The output will be an empty string if parsing fails for some reason. */
6
+ output?: string;
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type PromptCaching = "true" | "false";
5
+ export declare const PromptCaching: {
6
+ readonly True: "true";
7
+ readonly False: "false";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PromptCaching = void 0;
7
+ exports.PromptCaching = {
8
+ True: "true",
9
+ False: "false",
10
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface QnaResponse {
5
+ /** Unique identifier for the question-answer pair, corresponding to the question ID in the request. */
6
+ id: string;
7
+ /** The original question text that was asked and analyzed. */
8
+ question: string;
9
+ /** Explanation or reasoning provided by the analysis model to justify the answer. */
10
+ reasoning: string;
11
+ /** The answer to the question, derived from the call analysis. The format may vary based on the question type (e.g., boolean, enum, text). */
12
+ response: string;
13
+ /** Relevant excerpt from the call transcript that supports the answer. This provides direct evidence for the response. */
14
+ utterance: string;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sarvam from "../index";
5
+ export interface Question {
6
+ /** Unique identifier for the question. This should be a short, distinct string or number. */
7
+ id: string;
8
+ /** The actual text of the question to be answered based on the call content. */
9
+ text: string;
10
+ /** Optional description or context for the question. Use this to provide additional information to the LLM for better reasoning. */
11
+ description?: string;
12
+ /**
13
+ * The type of question, which determines how it should be answered and processed. Valid types are:
14
+ * - boolean: A yes/no question
15
+ * - enum: A question with predefined answer options
16
+ * - short answer: A question requiring a brief text response
17
+ * - long answer: A question requiring a detailed text response
18
+ * - number: A question expecting a numeric answer
19
+ */
20
+ type: Sarvam.QuestionType;
21
+ /** Additional properties specific to the question type. For 'enum' types, this should include an 'options' list. */
22
+ properties?: Record<string, unknown>;
23
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type QuestionType = "boolean" | "enum" | "short answer" | "long answer" | "number";
5
+ export declare const QuestionType: {
6
+ readonly Boolean: "boolean";
7
+ readonly Enum: "enum";
8
+ readonly ShortAnswer: "short answer";
9
+ readonly LongAnswer: "long answer";
10
+ readonly Number: "number";
11
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.QuestionType = void 0;
7
+ exports.QuestionType = {
8
+ Boolean: "boolean",
9
+ Enum: "enum",
10
+ ShortAnswer: "short answer",
11
+ LongAnswer: "long answer",
12
+ Number: "number",
13
+ };