@corti/sdk 0.0.0-alpha.10

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 (860) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +231 -0
  3. package/dist/cjs/api/errors/BadRequestError.d.ts +8 -0
  4. package/dist/cjs/api/errors/BadRequestError.js +52 -0
  5. package/dist/cjs/api/errors/ForbiddenError.d.ts +9 -0
  6. package/dist/cjs/api/errors/ForbiddenError.js +52 -0
  7. package/dist/cjs/api/errors/GatewayTimeoutError.d.ts +9 -0
  8. package/dist/cjs/api/errors/GatewayTimeoutError.js +52 -0
  9. package/dist/cjs/api/errors/InternalServerError.d.ts +8 -0
  10. package/dist/cjs/api/errors/InternalServerError.js +52 -0
  11. package/dist/cjs/api/errors/NotFoundError.d.ts +9 -0
  12. package/dist/cjs/api/errors/NotFoundError.js +52 -0
  13. package/dist/cjs/api/errors/UnauthorizedError.d.ts +8 -0
  14. package/dist/cjs/api/errors/UnauthorizedError.js +52 -0
  15. package/dist/cjs/api/errors/index.d.ts +6 -0
  16. package/dist/cjs/api/errors/index.js +22 -0
  17. package/dist/cjs/api/index.d.ts +3 -0
  18. package/dist/cjs/api/index.js +19 -0
  19. package/dist/cjs/api/resources/auth/client/Client.d.ts +49 -0
  20. package/dist/cjs/api/resources/auth/client/Client.js +129 -0
  21. package/dist/cjs/api/resources/auth/client/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/auth/client/index.js +17 -0
  23. package/dist/cjs/api/resources/auth/client/requests/AuthGetTokenRequest.d.ts +14 -0
  24. package/dist/cjs/api/resources/auth/client/requests/AuthGetTokenRequest.js +5 -0
  25. package/dist/cjs/api/resources/auth/client/requests/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/auth/client/requests/index.js +2 -0
  27. package/dist/cjs/api/resources/auth/index.d.ts +2 -0
  28. package/dist/cjs/api/resources/auth/index.js +18 -0
  29. package/dist/cjs/api/resources/auth/types/GetTokenResponse.d.ts +10 -0
  30. package/dist/cjs/api/resources/auth/types/GetTokenResponse.js +5 -0
  31. package/dist/cjs/api/resources/auth/types/index.d.ts +1 -0
  32. package/dist/cjs/api/resources/auth/types/index.js +17 -0
  33. package/dist/cjs/api/resources/documents/client/Client.d.ts +127 -0
  34. package/dist/cjs/api/resources/documents/client/Client.js +440 -0
  35. package/dist/cjs/api/resources/documents/client/index.d.ts +2 -0
  36. package/dist/cjs/api/resources/documents/client/index.js +17 -0
  37. package/dist/cjs/api/resources/documents/client/requests/DocumentsGetRequest.d.ts +13 -0
  38. package/dist/cjs/api/resources/documents/client/requests/DocumentsGetRequest.js +5 -0
  39. package/dist/cjs/api/resources/documents/client/requests/RequestDocumentCreate.d.ts +31 -0
  40. package/dist/cjs/api/resources/documents/client/requests/RequestDocumentCreate.js +5 -0
  41. package/dist/cjs/api/resources/documents/client/requests/RequestDocumentUpdate.d.ts +13 -0
  42. package/dist/cjs/api/resources/documents/client/requests/RequestDocumentUpdate.js +5 -0
  43. package/dist/cjs/api/resources/documents/client/requests/index.d.ts +3 -0
  44. package/dist/cjs/api/resources/documents/client/requests/index.js +2 -0
  45. package/dist/cjs/api/resources/documents/index.d.ts +2 -0
  46. package/dist/cjs/api/resources/documents/index.js +18 -0
  47. package/dist/cjs/api/resources/documents/types/RequestDocumentCreateContextItem.d.ts +10 -0
  48. package/dist/cjs/api/resources/documents/types/RequestDocumentCreateContextItem.js +5 -0
  49. package/dist/cjs/api/resources/documents/types/RequestDocumentUpdateSectionsItem.d.ts +9 -0
  50. package/dist/cjs/api/resources/documents/types/RequestDocumentUpdateSectionsItem.js +5 -0
  51. package/dist/cjs/api/resources/documents/types/index.d.ts +2 -0
  52. package/dist/cjs/api/resources/documents/types/index.js +18 -0
  53. package/dist/cjs/api/resources/facts/client/Client.d.ts +113 -0
  54. package/dist/cjs/api/resources/facts/client/Client.js +393 -0
  55. package/dist/cjs/api/resources/facts/client/index.d.ts +2 -0
  56. package/dist/cjs/api/resources/facts/client/index.js +17 -0
  57. package/dist/cjs/api/resources/facts/client/requests/RequestFactUpdate.d.ts +21 -0
  58. package/dist/cjs/api/resources/facts/client/requests/RequestFactUpdate.js +5 -0
  59. package/dist/cjs/api/resources/facts/client/requests/RequestFactsCreate.d.ts +17 -0
  60. package/dist/cjs/api/resources/facts/client/requests/RequestFactsCreate.js +5 -0
  61. package/dist/cjs/api/resources/facts/client/requests/RequestFactsUpdate.d.ts +16 -0
  62. package/dist/cjs/api/resources/facts/client/requests/RequestFactsUpdate.js +5 -0
  63. package/dist/cjs/api/resources/facts/client/requests/index.d.ts +3 -0
  64. package/dist/cjs/api/resources/facts/client/requests/index.js +2 -0
  65. package/dist/cjs/api/resources/facts/index.d.ts +2 -0
  66. package/dist/cjs/api/resources/facts/index.js +18 -0
  67. package/dist/cjs/api/resources/facts/types/RequestFactsCreateFactsItem.d.ts +12 -0
  68. package/dist/cjs/api/resources/facts/types/RequestFactsCreateFactsItem.js +5 -0
  69. package/dist/cjs/api/resources/facts/types/RequestFactsUpdateFactsItem.d.ts +14 -0
  70. package/dist/cjs/api/resources/facts/types/RequestFactsUpdateFactsItem.js +5 -0
  71. package/dist/cjs/api/resources/facts/types/index.d.ts +2 -0
  72. package/dist/cjs/api/resources/facts/types/index.js +18 -0
  73. package/dist/cjs/api/resources/index.d.ts +20 -0
  74. package/dist/cjs/api/resources/index.js +59 -0
  75. package/dist/cjs/api/resources/interactions/client/Client.d.ts +113 -0
  76. package/dist/cjs/api/resources/interactions/client/Client.js +442 -0
  77. package/dist/cjs/api/resources/interactions/client/index.d.ts +2 -0
  78. package/dist/cjs/api/resources/interactions/client/index.js +17 -0
  79. package/dist/cjs/api/resources/interactions/client/requests/InteractionsListRequest.d.ts +34 -0
  80. package/dist/cjs/api/resources/interactions/client/requests/InteractionsListRequest.js +5 -0
  81. package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionCreate.d.ts +22 -0
  82. package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionCreate.js +5 -0
  83. package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionUpdate.d.ts +16 -0
  84. package/dist/cjs/api/resources/interactions/client/requests/RequestInteractionUpdate.js +5 -0
  85. package/dist/cjs/api/resources/interactions/client/requests/index.d.ts +3 -0
  86. package/dist/cjs/api/resources/interactions/client/requests/index.js +2 -0
  87. package/dist/cjs/api/resources/interactions/index.d.ts +2 -0
  88. package/dist/cjs/api/resources/interactions/index.js +18 -0
  89. package/dist/cjs/api/resources/interactions/types/InteractionsListRequestDirection.d.ts +11 -0
  90. package/dist/cjs/api/resources/interactions/types/InteractionsListRequestDirection.js +10 -0
  91. package/dist/cjs/api/resources/interactions/types/InteractionsListRequestSort.d.ts +12 -0
  92. package/dist/cjs/api/resources/interactions/types/InteractionsListRequestSort.js +11 -0
  93. package/dist/cjs/api/resources/interactions/types/index.d.ts +2 -0
  94. package/dist/cjs/api/resources/interactions/types/index.js +18 -0
  95. package/dist/cjs/api/resources/recordings/client/Client.d.ts +94 -0
  96. package/dist/cjs/api/resources/recordings/client/Client.js +347 -0
  97. package/dist/cjs/api/resources/recordings/client/index.d.ts +1 -0
  98. package/dist/cjs/api/resources/recordings/client/index.js +2 -0
  99. package/dist/cjs/api/resources/recordings/index.d.ts +1 -0
  100. package/dist/cjs/api/resources/recordings/index.js +17 -0
  101. package/dist/cjs/api/resources/stream/client/Client.d.ts +35 -0
  102. package/dist/cjs/api/resources/stream/client/Client.js +82 -0
  103. package/dist/cjs/api/resources/stream/client/Socket.d.ts +54 -0
  104. package/dist/cjs/api/resources/stream/client/Socket.js +160 -0
  105. package/dist/cjs/api/resources/stream/client/index.d.ts +1 -0
  106. package/dist/cjs/api/resources/stream/client/index.js +17 -0
  107. package/dist/cjs/api/resources/stream/index.d.ts +1 -0
  108. package/dist/cjs/api/resources/stream/index.js +17 -0
  109. package/dist/cjs/api/resources/templates/client/Client.d.ts +77 -0
  110. package/dist/cjs/api/resources/templates/client/Client.js +281 -0
  111. package/dist/cjs/api/resources/templates/client/index.d.ts +2 -0
  112. package/dist/cjs/api/resources/templates/client/index.js +17 -0
  113. package/dist/cjs/api/resources/templates/client/requests/TemplatesListRequest.d.ts +21 -0
  114. package/dist/cjs/api/resources/templates/client/requests/TemplatesListRequest.js +5 -0
  115. package/dist/cjs/api/resources/templates/client/requests/TemplatesSectionsListRequest.d.ts +17 -0
  116. package/dist/cjs/api/resources/templates/client/requests/TemplatesSectionsListRequest.js +5 -0
  117. package/dist/cjs/api/resources/templates/client/requests/index.d.ts +2 -0
  118. package/dist/cjs/api/resources/templates/client/requests/index.js +2 -0
  119. package/dist/cjs/api/resources/templates/index.d.ts +1 -0
  120. package/dist/cjs/api/resources/templates/index.js +17 -0
  121. package/dist/cjs/api/resources/transcribe/client/Client.d.ts +34 -0
  122. package/dist/cjs/api/resources/transcribe/client/Client.js +82 -0
  123. package/dist/cjs/api/resources/transcribe/client/Socket.d.ts +54 -0
  124. package/dist/cjs/api/resources/transcribe/client/Socket.js +160 -0
  125. package/dist/cjs/api/resources/transcribe/client/index.d.ts +1 -0
  126. package/dist/cjs/api/resources/transcribe/client/index.js +17 -0
  127. package/dist/cjs/api/resources/transcribe/index.d.ts +1 -0
  128. package/dist/cjs/api/resources/transcribe/index.js +17 -0
  129. package/dist/cjs/api/resources/transcripts/client/Client.d.ts +110 -0
  130. package/dist/cjs/api/resources/transcripts/client/Client.js +402 -0
  131. package/dist/cjs/api/resources/transcripts/client/index.d.ts +2 -0
  132. package/dist/cjs/api/resources/transcripts/client/index.js +17 -0
  133. package/dist/cjs/api/resources/transcripts/client/requests/TranscriptCreate.d.ts +28 -0
  134. package/dist/cjs/api/resources/transcripts/client/requests/TranscriptCreate.js +5 -0
  135. package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsListRequest.d.ts +30 -0
  136. package/dist/cjs/api/resources/transcripts/client/requests/TranscriptsListRequest.js +5 -0
  137. package/dist/cjs/api/resources/transcripts/client/requests/index.d.ts +2 -0
  138. package/dist/cjs/api/resources/transcripts/client/requests/index.js +2 -0
  139. package/dist/cjs/api/resources/transcripts/index.d.ts +2 -0
  140. package/dist/cjs/api/resources/transcripts/index.js +18 -0
  141. package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateModelName.d.ts +12 -0
  142. package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateModelName.js +11 -0
  143. package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.d.ts +10 -0
  144. package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.js +5 -0
  145. package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.d.ts +21 -0
  146. package/dist/cjs/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.js +20 -0
  147. package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestDirection.d.ts +11 -0
  148. package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestDirection.js +10 -0
  149. package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestSort.d.ts +11 -0
  150. package/dist/cjs/api/resources/transcripts/types/TranscriptsListRequestSort.js +10 -0
  151. package/dist/cjs/api/resources/transcripts/types/index.d.ts +5 -0
  152. package/dist/cjs/api/resources/transcripts/types/index.js +21 -0
  153. package/dist/cjs/api/types/DocumentContextData.d.ts +14 -0
  154. package/dist/cjs/api/types/DocumentContextData.js +5 -0
  155. package/dist/cjs/api/types/DocumentTemplate.d.ts +14 -0
  156. package/dist/cjs/api/types/DocumentTemplate.js +5 -0
  157. package/dist/cjs/api/types/Encounter.d.ts +16 -0
  158. package/dist/cjs/api/types/Encounter.js +5 -0
  159. package/dist/cjs/api/types/EncounterPeriod.d.ts +9 -0
  160. package/dist/cjs/api/types/EncounterPeriod.js +5 -0
  161. package/dist/cjs/api/types/EncounterStatus.d.ts +12 -0
  162. package/dist/cjs/api/types/EncounterStatus.js +14 -0
  163. package/dist/cjs/api/types/EncounterType.d.ts +11 -0
  164. package/dist/cjs/api/types/EncounterType.js +13 -0
  165. package/dist/cjs/api/types/EncounterUpdate.d.ts +16 -0
  166. package/dist/cjs/api/types/EncounterUpdate.js +5 -0
  167. package/dist/cjs/api/types/ErrorResponse.d.ts +11 -0
  168. package/dist/cjs/api/types/ErrorResponse.js +5 -0
  169. package/dist/cjs/api/types/FactContext.d.ts +12 -0
  170. package/dist/cjs/api/types/FactContext.js +5 -0
  171. package/dist/cjs/api/types/GenderEnum.d.ts +10 -0
  172. package/dist/cjs/api/types/GenderEnum.js +12 -0
  173. package/dist/cjs/api/types/ParticipantRoleEnum.d.ts +9 -0
  174. package/dist/cjs/api/types/ParticipantRoleEnum.js +11 -0
  175. package/dist/cjs/api/types/Patient.d.ts +16 -0
  176. package/dist/cjs/api/types/Patient.js +5 -0
  177. package/dist/cjs/api/types/PatientUpdate.d.ts +16 -0
  178. package/dist/cjs/api/types/PatientUpdate.js +5 -0
  179. package/dist/cjs/api/types/ResponseAllTemplateSections.d.ts +8 -0
  180. package/dist/cjs/api/types/ResponseAllTemplateSections.js +5 -0
  181. package/dist/cjs/api/types/ResponseAllTemplates.d.ts +8 -0
  182. package/dist/cjs/api/types/ResponseAllTemplates.js +5 -0
  183. package/dist/cjs/api/types/ResponseAllTemplatesDataItem.d.ts +20 -0
  184. package/dist/cjs/api/types/ResponseAllTemplatesDataItem.js +5 -0
  185. package/dist/cjs/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.d.ts +10 -0
  186. package/dist/cjs/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.js +5 -0
  187. package/dist/cjs/api/types/ResponseAllTemplatesDataItemTranslationsItem.d.ts +11 -0
  188. package/dist/cjs/api/types/ResponseAllTemplatesDataItemTranslationsItem.js +5 -0
  189. package/dist/cjs/api/types/ResponseDocumentList.d.ts +7 -0
  190. package/dist/cjs/api/types/ResponseDocumentList.js +5 -0
  191. package/dist/cjs/api/types/ResponseDocumentRead.d.ts +22 -0
  192. package/dist/cjs/api/types/ResponseDocumentRead.js +5 -0
  193. package/dist/cjs/api/types/ResponseDocumentReadSectionsItem.d.ts +17 -0
  194. package/dist/cjs/api/types/ResponseDocumentReadSectionsItem.js +5 -0
  195. package/dist/cjs/api/types/ResponseFactGroupsFiltered.d.ts +7 -0
  196. package/dist/cjs/api/types/ResponseFactGroupsFiltered.js +5 -0
  197. package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItem.d.ts +9 -0
  198. package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItem.js +5 -0
  199. package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.d.ts +8 -0
  200. package/dist/cjs/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.js +5 -0
  201. package/dist/cjs/api/types/ResponseFactUpdate.d.ts +22 -0
  202. package/dist/cjs/api/types/ResponseFactUpdate.js +5 -0
  203. package/dist/cjs/api/types/ResponseFactsCreate.d.ts +8 -0
  204. package/dist/cjs/api/types/ResponseFactsCreate.js +5 -0
  205. package/dist/cjs/api/types/ResponseFactsCreateFactsItem.d.ts +20 -0
  206. package/dist/cjs/api/types/ResponseFactsCreateFactsItem.js +5 -0
  207. package/dist/cjs/api/types/ResponseFactsList.d.ts +8 -0
  208. package/dist/cjs/api/types/ResponseFactsList.js +5 -0
  209. package/dist/cjs/api/types/ResponseFactsListFactsItem.d.ts +23 -0
  210. package/dist/cjs/api/types/ResponseFactsListFactsItem.js +5 -0
  211. package/dist/cjs/api/types/ResponseFactsListFactsItemEvidenceItem.d.ts +11 -0
  212. package/dist/cjs/api/types/ResponseFactsListFactsItemEvidenceItem.js +5 -0
  213. package/dist/cjs/api/types/ResponseFactsUpdate.d.ts +8 -0
  214. package/dist/cjs/api/types/ResponseFactsUpdate.js +5 -0
  215. package/dist/cjs/api/types/ResponseFactsUpdateFactsItem.d.ts +22 -0
  216. package/dist/cjs/api/types/ResponseFactsUpdateFactsItem.js +5 -0
  217. package/dist/cjs/api/types/ResponseInteraction.d.ts +24 -0
  218. package/dist/cjs/api/types/ResponseInteraction.js +5 -0
  219. package/dist/cjs/api/types/ResponseInteractionCreate.d.ts +10 -0
  220. package/dist/cjs/api/types/ResponseInteractionCreate.js +5 -0
  221. package/dist/cjs/api/types/ResponseInteractions.d.ts +7 -0
  222. package/dist/cjs/api/types/ResponseInteractions.js +5 -0
  223. package/dist/cjs/api/types/ResponseMetadataCreate.d.ts +7 -0
  224. package/dist/cjs/api/types/ResponseMetadataCreate.js +5 -0
  225. package/dist/cjs/api/types/ResponseMetadataCreateParticipantsRolesItem.d.ts +10 -0
  226. package/dist/cjs/api/types/ResponseMetadataCreateParticipantsRolesItem.js +5 -0
  227. package/dist/cjs/api/types/ResponseRecordingCreate.d.ts +8 -0
  228. package/dist/cjs/api/types/ResponseRecordingCreate.js +5 -0
  229. package/dist/cjs/api/types/ResponseRecordingList.d.ts +8 -0
  230. package/dist/cjs/api/types/ResponseRecordingList.js +5 -0
  231. package/dist/cjs/api/types/ResponseTranscriptCreate.d.ts +13 -0
  232. package/dist/cjs/api/types/ResponseTranscriptCreate.js +5 -0
  233. package/dist/cjs/api/types/ResponseTranscriptCreateTranscriptsItem.d.ts +17 -0
  234. package/dist/cjs/api/types/ResponseTranscriptCreateTranscriptsItem.js +5 -0
  235. package/dist/cjs/api/types/ResponseTranscriptListAll.d.ts +7 -0
  236. package/dist/cjs/api/types/ResponseTranscriptListAll.js +5 -0
  237. package/dist/cjs/api/types/ResponseTranscriptListAllTranscriptsItem.d.ts +9 -0
  238. package/dist/cjs/api/types/ResponseTranscriptListAllTranscriptsItem.js +5 -0
  239. package/dist/cjs/api/types/Section.d.ts +22 -0
  240. package/dist/cjs/api/types/Section.js +5 -0
  241. package/dist/cjs/api/types/SectionTranslationsItem.d.ts +11 -0
  242. package/dist/cjs/api/types/SectionTranslationsItem.js +5 -0
  243. package/dist/cjs/api/types/StreamConfigData.d.ts +8 -0
  244. package/dist/cjs/api/types/StreamConfigData.js +5 -0
  245. package/dist/cjs/api/types/StreamConfigMode.d.ts +10 -0
  246. package/dist/cjs/api/types/StreamConfigMode.js +5 -0
  247. package/dist/cjs/api/types/StreamConfigModeOutputLocale.d.ts +21 -0
  248. package/dist/cjs/api/types/StreamConfigModeOutputLocale.js +20 -0
  249. package/dist/cjs/api/types/StreamConfigModeType.d.ts +11 -0
  250. package/dist/cjs/api/types/StreamConfigModeType.js +10 -0
  251. package/dist/cjs/api/types/StreamConfigStatusMessage.d.ts +12 -0
  252. package/dist/cjs/api/types/StreamConfigStatusMessage.js +5 -0
  253. package/dist/cjs/api/types/StreamConfigStatusMessageType.d.ts +15 -0
  254. package/dist/cjs/api/types/StreamConfigStatusMessageType.js +14 -0
  255. package/dist/cjs/api/types/StreamConfigTranscription.d.ts +14 -0
  256. package/dist/cjs/api/types/StreamConfigTranscription.js +5 -0
  257. package/dist/cjs/api/types/StreamConfigTranscriptionPrimaryLanguage.d.ts +21 -0
  258. package/dist/cjs/api/types/StreamConfigTranscriptionPrimaryLanguage.js +20 -0
  259. package/dist/cjs/api/types/StreamConfigurationMessage.d.ts +8 -0
  260. package/dist/cjs/api/types/StreamConfigurationMessage.js +5 -0
  261. package/dist/cjs/api/types/StreamEndMessage.d.ts +6 -0
  262. package/dist/cjs/api/types/StreamEndMessage.js +5 -0
  263. package/dist/cjs/api/types/StreamEndedMessage.d.ts +6 -0
  264. package/dist/cjs/api/types/StreamEndedMessage.js +5 -0
  265. package/dist/cjs/api/types/StreamErrorDetail.d.ts +15 -0
  266. package/dist/cjs/api/types/StreamErrorDetail.js +5 -0
  267. package/dist/cjs/api/types/StreamErrorMessage.d.ts +8 -0
  268. package/dist/cjs/api/types/StreamErrorMessage.js +5 -0
  269. package/dist/cjs/api/types/StreamFact.d.ts +21 -0
  270. package/dist/cjs/api/types/StreamFact.js +5 -0
  271. package/dist/cjs/api/types/StreamFactsMessage.d.ts +8 -0
  272. package/dist/cjs/api/types/StreamFactsMessage.js +5 -0
  273. package/dist/cjs/api/types/StreamParticipant.d.ts +10 -0
  274. package/dist/cjs/api/types/StreamParticipant.js +5 -0
  275. package/dist/cjs/api/types/StreamParticipantRole.d.ts +12 -0
  276. package/dist/cjs/api/types/StreamParticipantRole.js +11 -0
  277. package/dist/cjs/api/types/StreamTranscript.d.ts +16 -0
  278. package/dist/cjs/api/types/StreamTranscript.js +5 -0
  279. package/dist/cjs/api/types/StreamTranscriptMessage.d.ts +8 -0
  280. package/dist/cjs/api/types/StreamTranscriptMessage.js +5 -0
  281. package/dist/cjs/api/types/StreamTranscriptTime.d.ts +9 -0
  282. package/dist/cjs/api/types/StreamTranscriptTime.js +5 -0
  283. package/dist/cjs/api/types/StreamUsageMessage.d.ts +8 -0
  284. package/dist/cjs/api/types/StreamUsageMessage.js +5 -0
  285. package/dist/cjs/api/types/TemplateFiltered.d.ts +20 -0
  286. package/dist/cjs/api/types/TemplateFiltered.js +5 -0
  287. package/dist/cjs/api/types/TemplateFilteredTemplateSectionsItem.d.ts +10 -0
  288. package/dist/cjs/api/types/TemplateFilteredTemplateSectionsItem.js +5 -0
  289. package/dist/cjs/api/types/TemplateFilteredTranslationsItem.d.ts +11 -0
  290. package/dist/cjs/api/types/TemplateFilteredTranslationsItem.js +5 -0
  291. package/dist/cjs/api/types/TranscribeCommand.d.ts +12 -0
  292. package/dist/cjs/api/types/TranscribeCommand.js +5 -0
  293. package/dist/cjs/api/types/TranscribeCommandData.d.ts +15 -0
  294. package/dist/cjs/api/types/TranscribeCommandData.js +5 -0
  295. package/dist/cjs/api/types/TranscribeCommandMessage.d.ts +8 -0
  296. package/dist/cjs/api/types/TranscribeCommandMessage.js +5 -0
  297. package/dist/cjs/api/types/TranscribeCommandVariable.d.ts +11 -0
  298. package/dist/cjs/api/types/TranscribeCommandVariable.js +5 -0
  299. package/dist/cjs/api/types/TranscribeConfigStatusMessage.d.ts +12 -0
  300. package/dist/cjs/api/types/TranscribeConfigStatusMessage.js +5 -0
  301. package/dist/cjs/api/types/TranscribeConfigStatusMessageType.d.ts +12 -0
  302. package/dist/cjs/api/types/TranscribeConfigStatusMessageType.js +11 -0
  303. package/dist/cjs/api/types/TranscribeConfigurationMessage.d.ts +8 -0
  304. package/dist/cjs/api/types/TranscribeConfigurationMessage.js +5 -0
  305. package/dist/cjs/api/types/TranscribeConfigurationMessageConfiguration.d.ts +16 -0
  306. package/dist/cjs/api/types/TranscribeConfigurationMessageConfiguration.js +5 -0
  307. package/dist/cjs/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.d.ts +21 -0
  308. package/dist/cjs/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.js +20 -0
  309. package/dist/cjs/api/types/TranscribeEndMessage.d.ts +6 -0
  310. package/dist/cjs/api/types/TranscribeEndMessage.js +5 -0
  311. package/dist/cjs/api/types/TranscribeEndedMessage.d.ts +6 -0
  312. package/dist/cjs/api/types/TranscribeEndedMessage.js +5 -0
  313. package/dist/cjs/api/types/TranscribeErrorMessage.d.ts +8 -0
  314. package/dist/cjs/api/types/TranscribeErrorMessage.js +5 -0
  315. package/dist/cjs/api/types/TranscribeErrorMessageError.d.ts +15 -0
  316. package/dist/cjs/api/types/TranscribeErrorMessageError.js +5 -0
  317. package/dist/cjs/api/types/TranscribeTranscriptData.d.ts +15 -0
  318. package/dist/cjs/api/types/TranscribeTranscriptData.js +5 -0
  319. package/dist/cjs/api/types/TranscribeTranscriptMessage.d.ts +8 -0
  320. package/dist/cjs/api/types/TranscribeTranscriptMessage.js +5 -0
  321. package/dist/cjs/api/types/TranscribeUsageMessage.d.ts +8 -0
  322. package/dist/cjs/api/types/TranscribeUsageMessage.js +5 -0
  323. package/dist/cjs/api/types/Transcript.d.ts +17 -0
  324. package/dist/cjs/api/types/Transcript.js +5 -0
  325. package/dist/cjs/api/types/UsageInfo.d.ts +6 -0
  326. package/dist/cjs/api/types/UsageInfo.js +5 -0
  327. package/dist/cjs/api/types/Uuid.d.ts +4 -0
  328. package/dist/cjs/api/types/Uuid.js +5 -0
  329. package/dist/cjs/api/types/V2DocumentContextTypeEnum.d.ts +9 -0
  330. package/dist/cjs/api/types/V2DocumentContextTypeEnum.js +11 -0
  331. package/dist/cjs/api/types/V2SourceEnum.d.ts +9 -0
  332. package/dist/cjs/api/types/V2SourceEnum.js +11 -0
  333. package/dist/cjs/api/types/WritingStyle.d.ts +7 -0
  334. package/dist/cjs/api/types/WritingStyle.js +5 -0
  335. package/dist/cjs/api/types/index.d.ts +91 -0
  336. package/dist/cjs/api/types/index.js +107 -0
  337. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  338. package/dist/cjs/core/auth/BasicAuth.js +26 -0
  339. package/dist/cjs/core/auth/BearerToken.d.ts +5 -0
  340. package/dist/cjs/core/auth/BearerToken.js +15 -0
  341. package/dist/cjs/core/auth/OAuthTokenProvider.d.ts +25 -0
  342. package/dist/cjs/core/auth/OAuthTokenProvider.js +86 -0
  343. package/dist/cjs/core/auth/index.d.ts +3 -0
  344. package/dist/cjs/core/auth/index.js +9 -0
  345. package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
  346. package/dist/cjs/core/fetcher/APIResponse.js +2 -0
  347. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +17 -0
  348. package/dist/cjs/core/fetcher/BinaryResponse.js +14 -0
  349. package/dist/cjs/core/fetcher/Fetcher.d.ts +40 -0
  350. package/dist/cjs/core/fetcher/Fetcher.js +120 -0
  351. package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
  352. package/dist/cjs/core/fetcher/Headers.js +84 -0
  353. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
  354. package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
  355. package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
  356. package/dist/cjs/core/fetcher/RawResponse.js +44 -0
  357. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +4 -0
  358. package/dist/cjs/core/fetcher/ResponseWithBody.js +6 -0
  359. package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
  360. package/dist/cjs/core/fetcher/Supplier.js +22 -0
  361. package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
  362. package/dist/cjs/core/fetcher/createRequestUrl.js +12 -0
  363. package/dist/cjs/core/fetcher/getFetchFn.d.ts +4 -0
  364. package/dist/cjs/core/fetcher/getFetchFn.js +68 -0
  365. package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
  366. package/dist/cjs/core/fetcher/getHeader.js +11 -0
  367. package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
  368. package/dist/cjs/core/fetcher/getRequestBody.js +23 -0
  369. package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
  370. package/dist/cjs/core/fetcher/getResponseBody.js +54 -0
  371. package/dist/cjs/core/fetcher/index.d.ts +9 -0
  372. package/dist/cjs/core/fetcher/index.js +15 -0
  373. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
  374. package/dist/cjs/core/fetcher/makeRequest.js +42 -0
  375. package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
  376. package/dist/cjs/core/fetcher/requestWithRetries.js +40 -0
  377. package/dist/cjs/core/fetcher/signals.d.ts +11 -0
  378. package/dist/cjs/core/fetcher/signals.js +36 -0
  379. package/dist/cjs/core/headers.d.ts +3 -0
  380. package/dist/cjs/core/headers.js +29 -0
  381. package/dist/cjs/core/index.d.ts +6 -0
  382. package/dist/cjs/core/index.js +22 -0
  383. package/dist/cjs/core/json.d.ts +15 -0
  384. package/dist/cjs/core/json.js +24 -0
  385. package/dist/cjs/core/pagination/Page.d.ts +32 -0
  386. package/dist/cjs/core/pagination/Page.js +100 -0
  387. package/dist/cjs/core/pagination/Pageable.d.ts +14 -0
  388. package/dist/cjs/core/pagination/Pageable.js +10 -0
  389. package/dist/cjs/core/pagination/index.d.ts +2 -0
  390. package/dist/cjs/core/pagination/index.js +7 -0
  391. package/dist/cjs/core/runtime/index.d.ts +1 -0
  392. package/dist/cjs/core/runtime/index.js +5 -0
  393. package/dist/cjs/core/runtime/runtime.d.ts +9 -0
  394. package/dist/cjs/core/runtime/runtime.js +102 -0
  395. package/dist/cjs/core/utils/index.d.ts +1 -0
  396. package/dist/cjs/core/utils/index.js +5 -0
  397. package/dist/cjs/core/utils/setObjectProperty.d.ts +11 -0
  398. package/dist/cjs/core/utils/setObjectProperty.js +42 -0
  399. package/dist/cjs/core/websocket/events.d.ts +36 -0
  400. package/dist/cjs/core/websocket/events.js +27 -0
  401. package/dist/cjs/core/websocket/index.d.ts +1 -0
  402. package/dist/cjs/core/websocket/index.js +17 -0
  403. package/dist/cjs/core/websocket/ws.d.ts +137 -0
  404. package/dist/cjs/core/websocket/ws.js +452 -0
  405. package/dist/cjs/custom/CortiAuth.d.ts +57 -0
  406. package/dist/cjs/custom/CortiAuth.js +185 -0
  407. package/dist/cjs/custom/CortiClient.d.ts +113 -0
  408. package/dist/cjs/custom/CortiClient.js +148 -0
  409. package/dist/cjs/custom/CustomStream.d.ts +15 -0
  410. package/dist/cjs/custom/CustomStream.js +82 -0
  411. package/dist/cjs/custom/CustomStreamSocket.d.ts +11 -0
  412. package/dist/cjs/custom/CustomStreamSocket.js +62 -0
  413. package/dist/cjs/custom/CustomTranscribe.d.ts +15 -0
  414. package/dist/cjs/custom/CustomTranscribe.js +82 -0
  415. package/dist/cjs/custom/CustomTranscribeSocket.d.ts +11 -0
  416. package/dist/cjs/custom/CustomTranscribeSocket.js +62 -0
  417. package/dist/cjs/custom/RefreshBearerProvider.d.ts +23 -0
  418. package/dist/cjs/custom/RefreshBearerProvider.js +85 -0
  419. package/dist/cjs/environments.d.ts +26 -0
  420. package/dist/cjs/environments.js +23 -0
  421. package/dist/cjs/errors/CortiError.d.ts +15 -0
  422. package/dist/cjs/errors/CortiError.js +30 -0
  423. package/dist/cjs/errors/CortiTimeoutError.d.ts +6 -0
  424. package/dist/cjs/errors/CortiTimeoutError.js +13 -0
  425. package/dist/cjs/errors/index.d.ts +2 -0
  426. package/dist/cjs/errors/index.js +7 -0
  427. package/dist/cjs/index.d.ts +14 -0
  428. package/dist/cjs/index.js +56 -0
  429. package/dist/cjs/version.d.ts +1 -0
  430. package/dist/cjs/version.js +4 -0
  431. package/dist/esm/api/errors/BadRequestError.d.mts +8 -0
  432. package/dist/esm/api/errors/BadRequestError.mjs +15 -0
  433. package/dist/esm/api/errors/ForbiddenError.d.mts +9 -0
  434. package/dist/esm/api/errors/ForbiddenError.mjs +15 -0
  435. package/dist/esm/api/errors/GatewayTimeoutError.d.mts +9 -0
  436. package/dist/esm/api/errors/GatewayTimeoutError.mjs +15 -0
  437. package/dist/esm/api/errors/InternalServerError.d.mts +8 -0
  438. package/dist/esm/api/errors/InternalServerError.mjs +15 -0
  439. package/dist/esm/api/errors/NotFoundError.d.mts +9 -0
  440. package/dist/esm/api/errors/NotFoundError.mjs +15 -0
  441. package/dist/esm/api/errors/UnauthorizedError.d.mts +8 -0
  442. package/dist/esm/api/errors/UnauthorizedError.mjs +15 -0
  443. package/dist/esm/api/errors/index.d.mts +6 -0
  444. package/dist/esm/api/errors/index.mjs +6 -0
  445. package/dist/esm/api/index.d.mts +3 -0
  446. package/dist/esm/api/index.mjs +3 -0
  447. package/dist/esm/api/resources/auth/client/Client.d.mts +49 -0
  448. package/dist/esm/api/resources/auth/client/Client.mjs +89 -0
  449. package/dist/esm/api/resources/auth/client/index.d.mts +2 -0
  450. package/dist/esm/api/resources/auth/client/index.mjs +1 -0
  451. package/dist/esm/api/resources/auth/client/requests/AuthGetTokenRequest.d.mts +14 -0
  452. package/dist/esm/api/resources/auth/client/requests/AuthGetTokenRequest.mjs +4 -0
  453. package/dist/esm/api/resources/auth/client/requests/index.d.mts +1 -0
  454. package/dist/esm/api/resources/auth/client/requests/index.mjs +1 -0
  455. package/dist/esm/api/resources/auth/index.d.mts +2 -0
  456. package/dist/esm/api/resources/auth/index.mjs +2 -0
  457. package/dist/esm/api/resources/auth/types/GetTokenResponse.d.mts +10 -0
  458. package/dist/esm/api/resources/auth/types/GetTokenResponse.mjs +4 -0
  459. package/dist/esm/api/resources/auth/types/index.d.mts +1 -0
  460. package/dist/esm/api/resources/auth/types/index.mjs +1 -0
  461. package/dist/esm/api/resources/documents/client/Client.d.mts +127 -0
  462. package/dist/esm/api/resources/documents/client/Client.mjs +400 -0
  463. package/dist/esm/api/resources/documents/client/index.d.mts +2 -0
  464. package/dist/esm/api/resources/documents/client/index.mjs +1 -0
  465. package/dist/esm/api/resources/documents/client/requests/DocumentsGetRequest.d.mts +13 -0
  466. package/dist/esm/api/resources/documents/client/requests/DocumentsGetRequest.mjs +4 -0
  467. package/dist/esm/api/resources/documents/client/requests/RequestDocumentCreate.d.mts +31 -0
  468. package/dist/esm/api/resources/documents/client/requests/RequestDocumentCreate.mjs +4 -0
  469. package/dist/esm/api/resources/documents/client/requests/RequestDocumentUpdate.d.mts +13 -0
  470. package/dist/esm/api/resources/documents/client/requests/RequestDocumentUpdate.mjs +4 -0
  471. package/dist/esm/api/resources/documents/client/requests/index.d.mts +3 -0
  472. package/dist/esm/api/resources/documents/client/requests/index.mjs +1 -0
  473. package/dist/esm/api/resources/documents/index.d.mts +2 -0
  474. package/dist/esm/api/resources/documents/index.mjs +2 -0
  475. package/dist/esm/api/resources/documents/types/RequestDocumentCreateContextItem.d.mts +10 -0
  476. package/dist/esm/api/resources/documents/types/RequestDocumentCreateContextItem.mjs +4 -0
  477. package/dist/esm/api/resources/documents/types/RequestDocumentUpdateSectionsItem.d.mts +9 -0
  478. package/dist/esm/api/resources/documents/types/RequestDocumentUpdateSectionsItem.mjs +4 -0
  479. package/dist/esm/api/resources/documents/types/index.d.mts +2 -0
  480. package/dist/esm/api/resources/documents/types/index.mjs +2 -0
  481. package/dist/esm/api/resources/facts/client/Client.d.mts +113 -0
  482. package/dist/esm/api/resources/facts/client/Client.mjs +353 -0
  483. package/dist/esm/api/resources/facts/client/index.d.mts +2 -0
  484. package/dist/esm/api/resources/facts/client/index.mjs +1 -0
  485. package/dist/esm/api/resources/facts/client/requests/RequestFactUpdate.d.mts +21 -0
  486. package/dist/esm/api/resources/facts/client/requests/RequestFactUpdate.mjs +4 -0
  487. package/dist/esm/api/resources/facts/client/requests/RequestFactsCreate.d.mts +17 -0
  488. package/dist/esm/api/resources/facts/client/requests/RequestFactsCreate.mjs +4 -0
  489. package/dist/esm/api/resources/facts/client/requests/RequestFactsUpdate.d.mts +16 -0
  490. package/dist/esm/api/resources/facts/client/requests/RequestFactsUpdate.mjs +4 -0
  491. package/dist/esm/api/resources/facts/client/requests/index.d.mts +3 -0
  492. package/dist/esm/api/resources/facts/client/requests/index.mjs +1 -0
  493. package/dist/esm/api/resources/facts/index.d.mts +2 -0
  494. package/dist/esm/api/resources/facts/index.mjs +2 -0
  495. package/dist/esm/api/resources/facts/types/RequestFactsCreateFactsItem.d.mts +12 -0
  496. package/dist/esm/api/resources/facts/types/RequestFactsCreateFactsItem.mjs +4 -0
  497. package/dist/esm/api/resources/facts/types/RequestFactsUpdateFactsItem.d.mts +14 -0
  498. package/dist/esm/api/resources/facts/types/RequestFactsUpdateFactsItem.mjs +4 -0
  499. package/dist/esm/api/resources/facts/types/index.d.mts +2 -0
  500. package/dist/esm/api/resources/facts/types/index.mjs +2 -0
  501. package/dist/esm/api/resources/index.d.mts +20 -0
  502. package/dist/esm/api/resources/index.mjs +20 -0
  503. package/dist/esm/api/resources/interactions/client/Client.d.mts +113 -0
  504. package/dist/esm/api/resources/interactions/client/Client.mjs +402 -0
  505. package/dist/esm/api/resources/interactions/client/index.d.mts +2 -0
  506. package/dist/esm/api/resources/interactions/client/index.mjs +1 -0
  507. package/dist/esm/api/resources/interactions/client/requests/InteractionsListRequest.d.mts +34 -0
  508. package/dist/esm/api/resources/interactions/client/requests/InteractionsListRequest.mjs +4 -0
  509. package/dist/esm/api/resources/interactions/client/requests/RequestInteractionCreate.d.mts +22 -0
  510. package/dist/esm/api/resources/interactions/client/requests/RequestInteractionCreate.mjs +4 -0
  511. package/dist/esm/api/resources/interactions/client/requests/RequestInteractionUpdate.d.mts +16 -0
  512. package/dist/esm/api/resources/interactions/client/requests/RequestInteractionUpdate.mjs +4 -0
  513. package/dist/esm/api/resources/interactions/client/requests/index.d.mts +3 -0
  514. package/dist/esm/api/resources/interactions/client/requests/index.mjs +1 -0
  515. package/dist/esm/api/resources/interactions/index.d.mts +2 -0
  516. package/dist/esm/api/resources/interactions/index.mjs +2 -0
  517. package/dist/esm/api/resources/interactions/types/InteractionsListRequestDirection.d.mts +11 -0
  518. package/dist/esm/api/resources/interactions/types/InteractionsListRequestDirection.mjs +7 -0
  519. package/dist/esm/api/resources/interactions/types/InteractionsListRequestSort.d.mts +12 -0
  520. package/dist/esm/api/resources/interactions/types/InteractionsListRequestSort.mjs +8 -0
  521. package/dist/esm/api/resources/interactions/types/index.d.mts +2 -0
  522. package/dist/esm/api/resources/interactions/types/index.mjs +2 -0
  523. package/dist/esm/api/resources/recordings/client/Client.d.mts +94 -0
  524. package/dist/esm/api/resources/recordings/client/Client.mjs +307 -0
  525. package/dist/esm/api/resources/recordings/client/index.d.mts +1 -0
  526. package/dist/esm/api/resources/recordings/client/index.mjs +1 -0
  527. package/dist/esm/api/resources/recordings/index.d.mts +1 -0
  528. package/dist/esm/api/resources/recordings/index.mjs +1 -0
  529. package/dist/esm/api/resources/stream/client/Client.d.mts +35 -0
  530. package/dist/esm/api/resources/stream/client/Client.mjs +45 -0
  531. package/dist/esm/api/resources/stream/client/Socket.d.mts +54 -0
  532. package/dist/esm/api/resources/stream/client/Socket.mjs +123 -0
  533. package/dist/esm/api/resources/stream/client/index.d.mts +1 -0
  534. package/dist/esm/api/resources/stream/client/index.mjs +1 -0
  535. package/dist/esm/api/resources/stream/index.d.mts +1 -0
  536. package/dist/esm/api/resources/stream/index.mjs +1 -0
  537. package/dist/esm/api/resources/templates/client/Client.d.mts +77 -0
  538. package/dist/esm/api/resources/templates/client/Client.mjs +241 -0
  539. package/dist/esm/api/resources/templates/client/index.d.mts +2 -0
  540. package/dist/esm/api/resources/templates/client/index.mjs +1 -0
  541. package/dist/esm/api/resources/templates/client/requests/TemplatesListRequest.d.mts +21 -0
  542. package/dist/esm/api/resources/templates/client/requests/TemplatesListRequest.mjs +4 -0
  543. package/dist/esm/api/resources/templates/client/requests/TemplatesSectionsListRequest.d.mts +17 -0
  544. package/dist/esm/api/resources/templates/client/requests/TemplatesSectionsListRequest.mjs +4 -0
  545. package/dist/esm/api/resources/templates/client/requests/index.d.mts +2 -0
  546. package/dist/esm/api/resources/templates/client/requests/index.mjs +1 -0
  547. package/dist/esm/api/resources/templates/index.d.mts +1 -0
  548. package/dist/esm/api/resources/templates/index.mjs +1 -0
  549. package/dist/esm/api/resources/transcribe/client/Client.d.mts +34 -0
  550. package/dist/esm/api/resources/transcribe/client/Client.mjs +45 -0
  551. package/dist/esm/api/resources/transcribe/client/Socket.d.mts +54 -0
  552. package/dist/esm/api/resources/transcribe/client/Socket.mjs +123 -0
  553. package/dist/esm/api/resources/transcribe/client/index.d.mts +1 -0
  554. package/dist/esm/api/resources/transcribe/client/index.mjs +1 -0
  555. package/dist/esm/api/resources/transcribe/index.d.mts +1 -0
  556. package/dist/esm/api/resources/transcribe/index.mjs +1 -0
  557. package/dist/esm/api/resources/transcripts/client/Client.d.mts +110 -0
  558. package/dist/esm/api/resources/transcripts/client/Client.mjs +362 -0
  559. package/dist/esm/api/resources/transcripts/client/index.d.mts +2 -0
  560. package/dist/esm/api/resources/transcripts/client/index.mjs +1 -0
  561. package/dist/esm/api/resources/transcripts/client/requests/TranscriptCreate.d.mts +28 -0
  562. package/dist/esm/api/resources/transcripts/client/requests/TranscriptCreate.mjs +4 -0
  563. package/dist/esm/api/resources/transcripts/client/requests/TranscriptsListRequest.d.mts +30 -0
  564. package/dist/esm/api/resources/transcripts/client/requests/TranscriptsListRequest.mjs +4 -0
  565. package/dist/esm/api/resources/transcripts/client/requests/index.d.mts +2 -0
  566. package/dist/esm/api/resources/transcripts/client/requests/index.mjs +1 -0
  567. package/dist/esm/api/resources/transcripts/index.d.mts +2 -0
  568. package/dist/esm/api/resources/transcripts/index.mjs +2 -0
  569. package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateModelName.d.mts +12 -0
  570. package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateModelName.mjs +8 -0
  571. package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.d.mts +10 -0
  572. package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreateParticipantsItem.mjs +4 -0
  573. package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.d.mts +21 -0
  574. package/dist/esm/api/resources/transcripts/types/RequestTranscriptCreatePrimaryLanguage.mjs +17 -0
  575. package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestDirection.d.mts +11 -0
  576. package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestDirection.mjs +7 -0
  577. package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestSort.d.mts +11 -0
  578. package/dist/esm/api/resources/transcripts/types/TranscriptsListRequestSort.mjs +7 -0
  579. package/dist/esm/api/resources/transcripts/types/index.d.mts +5 -0
  580. package/dist/esm/api/resources/transcripts/types/index.mjs +5 -0
  581. package/dist/esm/api/types/DocumentContextData.d.mts +14 -0
  582. package/dist/esm/api/types/DocumentContextData.mjs +4 -0
  583. package/dist/esm/api/types/DocumentTemplate.d.mts +14 -0
  584. package/dist/esm/api/types/DocumentTemplate.mjs +4 -0
  585. package/dist/esm/api/types/Encounter.d.mts +16 -0
  586. package/dist/esm/api/types/Encounter.mjs +4 -0
  587. package/dist/esm/api/types/EncounterPeriod.d.mts +9 -0
  588. package/dist/esm/api/types/EncounterPeriod.mjs +4 -0
  589. package/dist/esm/api/types/EncounterStatus.d.mts +12 -0
  590. package/dist/esm/api/types/EncounterStatus.mjs +11 -0
  591. package/dist/esm/api/types/EncounterType.d.mts +11 -0
  592. package/dist/esm/api/types/EncounterType.mjs +10 -0
  593. package/dist/esm/api/types/EncounterUpdate.d.mts +16 -0
  594. package/dist/esm/api/types/EncounterUpdate.mjs +4 -0
  595. package/dist/esm/api/types/ErrorResponse.d.mts +11 -0
  596. package/dist/esm/api/types/ErrorResponse.mjs +4 -0
  597. package/dist/esm/api/types/FactContext.d.mts +12 -0
  598. package/dist/esm/api/types/FactContext.mjs +4 -0
  599. package/dist/esm/api/types/GenderEnum.d.mts +10 -0
  600. package/dist/esm/api/types/GenderEnum.mjs +9 -0
  601. package/dist/esm/api/types/ParticipantRoleEnum.d.mts +9 -0
  602. package/dist/esm/api/types/ParticipantRoleEnum.mjs +8 -0
  603. package/dist/esm/api/types/Patient.d.mts +16 -0
  604. package/dist/esm/api/types/Patient.mjs +4 -0
  605. package/dist/esm/api/types/PatientUpdate.d.mts +16 -0
  606. package/dist/esm/api/types/PatientUpdate.mjs +4 -0
  607. package/dist/esm/api/types/ResponseAllTemplateSections.d.mts +8 -0
  608. package/dist/esm/api/types/ResponseAllTemplateSections.mjs +4 -0
  609. package/dist/esm/api/types/ResponseAllTemplates.d.mts +8 -0
  610. package/dist/esm/api/types/ResponseAllTemplates.mjs +4 -0
  611. package/dist/esm/api/types/ResponseAllTemplatesDataItem.d.mts +20 -0
  612. package/dist/esm/api/types/ResponseAllTemplatesDataItem.mjs +4 -0
  613. package/dist/esm/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.d.mts +10 -0
  614. package/dist/esm/api/types/ResponseAllTemplatesDataItemTemplateSectionsItem.mjs +4 -0
  615. package/dist/esm/api/types/ResponseAllTemplatesDataItemTranslationsItem.d.mts +11 -0
  616. package/dist/esm/api/types/ResponseAllTemplatesDataItemTranslationsItem.mjs +4 -0
  617. package/dist/esm/api/types/ResponseDocumentList.d.mts +7 -0
  618. package/dist/esm/api/types/ResponseDocumentList.mjs +4 -0
  619. package/dist/esm/api/types/ResponseDocumentRead.d.mts +22 -0
  620. package/dist/esm/api/types/ResponseDocumentRead.mjs +4 -0
  621. package/dist/esm/api/types/ResponseDocumentReadSectionsItem.d.mts +17 -0
  622. package/dist/esm/api/types/ResponseDocumentReadSectionsItem.mjs +4 -0
  623. package/dist/esm/api/types/ResponseFactGroupsFiltered.d.mts +7 -0
  624. package/dist/esm/api/types/ResponseFactGroupsFiltered.mjs +4 -0
  625. package/dist/esm/api/types/ResponseFactGroupsFilteredDataItem.d.mts +9 -0
  626. package/dist/esm/api/types/ResponseFactGroupsFilteredDataItem.mjs +4 -0
  627. package/dist/esm/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.d.mts +8 -0
  628. package/dist/esm/api/types/ResponseFactGroupsFilteredDataItemTranslationsItem.mjs +4 -0
  629. package/dist/esm/api/types/ResponseFactUpdate.d.mts +22 -0
  630. package/dist/esm/api/types/ResponseFactUpdate.mjs +4 -0
  631. package/dist/esm/api/types/ResponseFactsCreate.d.mts +8 -0
  632. package/dist/esm/api/types/ResponseFactsCreate.mjs +4 -0
  633. package/dist/esm/api/types/ResponseFactsCreateFactsItem.d.mts +20 -0
  634. package/dist/esm/api/types/ResponseFactsCreateFactsItem.mjs +4 -0
  635. package/dist/esm/api/types/ResponseFactsList.d.mts +8 -0
  636. package/dist/esm/api/types/ResponseFactsList.mjs +4 -0
  637. package/dist/esm/api/types/ResponseFactsListFactsItem.d.mts +23 -0
  638. package/dist/esm/api/types/ResponseFactsListFactsItem.mjs +4 -0
  639. package/dist/esm/api/types/ResponseFactsListFactsItemEvidenceItem.d.mts +11 -0
  640. package/dist/esm/api/types/ResponseFactsListFactsItemEvidenceItem.mjs +4 -0
  641. package/dist/esm/api/types/ResponseFactsUpdate.d.mts +8 -0
  642. package/dist/esm/api/types/ResponseFactsUpdate.mjs +4 -0
  643. package/dist/esm/api/types/ResponseFactsUpdateFactsItem.d.mts +22 -0
  644. package/dist/esm/api/types/ResponseFactsUpdateFactsItem.mjs +4 -0
  645. package/dist/esm/api/types/ResponseInteraction.d.mts +24 -0
  646. package/dist/esm/api/types/ResponseInteraction.mjs +4 -0
  647. package/dist/esm/api/types/ResponseInteractionCreate.d.mts +10 -0
  648. package/dist/esm/api/types/ResponseInteractionCreate.mjs +4 -0
  649. package/dist/esm/api/types/ResponseInteractions.d.mts +7 -0
  650. package/dist/esm/api/types/ResponseInteractions.mjs +4 -0
  651. package/dist/esm/api/types/ResponseMetadataCreate.d.mts +7 -0
  652. package/dist/esm/api/types/ResponseMetadataCreate.mjs +4 -0
  653. package/dist/esm/api/types/ResponseMetadataCreateParticipantsRolesItem.d.mts +10 -0
  654. package/dist/esm/api/types/ResponseMetadataCreateParticipantsRolesItem.mjs +4 -0
  655. package/dist/esm/api/types/ResponseRecordingCreate.d.mts +8 -0
  656. package/dist/esm/api/types/ResponseRecordingCreate.mjs +4 -0
  657. package/dist/esm/api/types/ResponseRecordingList.d.mts +8 -0
  658. package/dist/esm/api/types/ResponseRecordingList.mjs +4 -0
  659. package/dist/esm/api/types/ResponseTranscriptCreate.d.mts +13 -0
  660. package/dist/esm/api/types/ResponseTranscriptCreate.mjs +4 -0
  661. package/dist/esm/api/types/ResponseTranscriptCreateTranscriptsItem.d.mts +17 -0
  662. package/dist/esm/api/types/ResponseTranscriptCreateTranscriptsItem.mjs +4 -0
  663. package/dist/esm/api/types/ResponseTranscriptListAll.d.mts +7 -0
  664. package/dist/esm/api/types/ResponseTranscriptListAll.mjs +4 -0
  665. package/dist/esm/api/types/ResponseTranscriptListAllTranscriptsItem.d.mts +9 -0
  666. package/dist/esm/api/types/ResponseTranscriptListAllTranscriptsItem.mjs +4 -0
  667. package/dist/esm/api/types/Section.d.mts +22 -0
  668. package/dist/esm/api/types/Section.mjs +4 -0
  669. package/dist/esm/api/types/SectionTranslationsItem.d.mts +11 -0
  670. package/dist/esm/api/types/SectionTranslationsItem.mjs +4 -0
  671. package/dist/esm/api/types/StreamConfigData.d.mts +8 -0
  672. package/dist/esm/api/types/StreamConfigData.mjs +4 -0
  673. package/dist/esm/api/types/StreamConfigMode.d.mts +10 -0
  674. package/dist/esm/api/types/StreamConfigMode.mjs +4 -0
  675. package/dist/esm/api/types/StreamConfigModeOutputLocale.d.mts +21 -0
  676. package/dist/esm/api/types/StreamConfigModeOutputLocale.mjs +17 -0
  677. package/dist/esm/api/types/StreamConfigModeType.d.mts +11 -0
  678. package/dist/esm/api/types/StreamConfigModeType.mjs +7 -0
  679. package/dist/esm/api/types/StreamConfigStatusMessage.d.mts +12 -0
  680. package/dist/esm/api/types/StreamConfigStatusMessage.mjs +4 -0
  681. package/dist/esm/api/types/StreamConfigStatusMessageType.d.mts +15 -0
  682. package/dist/esm/api/types/StreamConfigStatusMessageType.mjs +11 -0
  683. package/dist/esm/api/types/StreamConfigTranscription.d.mts +14 -0
  684. package/dist/esm/api/types/StreamConfigTranscription.mjs +4 -0
  685. package/dist/esm/api/types/StreamConfigTranscriptionPrimaryLanguage.d.mts +21 -0
  686. package/dist/esm/api/types/StreamConfigTranscriptionPrimaryLanguage.mjs +17 -0
  687. package/dist/esm/api/types/StreamConfigurationMessage.d.mts +8 -0
  688. package/dist/esm/api/types/StreamConfigurationMessage.mjs +4 -0
  689. package/dist/esm/api/types/StreamEndMessage.d.mts +6 -0
  690. package/dist/esm/api/types/StreamEndMessage.mjs +4 -0
  691. package/dist/esm/api/types/StreamEndedMessage.d.mts +6 -0
  692. package/dist/esm/api/types/StreamEndedMessage.mjs +4 -0
  693. package/dist/esm/api/types/StreamErrorDetail.d.mts +15 -0
  694. package/dist/esm/api/types/StreamErrorDetail.mjs +4 -0
  695. package/dist/esm/api/types/StreamErrorMessage.d.mts +8 -0
  696. package/dist/esm/api/types/StreamErrorMessage.mjs +4 -0
  697. package/dist/esm/api/types/StreamFact.d.mts +21 -0
  698. package/dist/esm/api/types/StreamFact.mjs +4 -0
  699. package/dist/esm/api/types/StreamFactsMessage.d.mts +8 -0
  700. package/dist/esm/api/types/StreamFactsMessage.mjs +4 -0
  701. package/dist/esm/api/types/StreamParticipant.d.mts +10 -0
  702. package/dist/esm/api/types/StreamParticipant.mjs +4 -0
  703. package/dist/esm/api/types/StreamParticipantRole.d.mts +12 -0
  704. package/dist/esm/api/types/StreamParticipantRole.mjs +8 -0
  705. package/dist/esm/api/types/StreamTranscript.d.mts +16 -0
  706. package/dist/esm/api/types/StreamTranscript.mjs +4 -0
  707. package/dist/esm/api/types/StreamTranscriptMessage.d.mts +8 -0
  708. package/dist/esm/api/types/StreamTranscriptMessage.mjs +4 -0
  709. package/dist/esm/api/types/StreamTranscriptTime.d.mts +9 -0
  710. package/dist/esm/api/types/StreamTranscriptTime.mjs +4 -0
  711. package/dist/esm/api/types/StreamUsageMessage.d.mts +8 -0
  712. package/dist/esm/api/types/StreamUsageMessage.mjs +4 -0
  713. package/dist/esm/api/types/TemplateFiltered.d.mts +20 -0
  714. package/dist/esm/api/types/TemplateFiltered.mjs +4 -0
  715. package/dist/esm/api/types/TemplateFilteredTemplateSectionsItem.d.mts +10 -0
  716. package/dist/esm/api/types/TemplateFilteredTemplateSectionsItem.mjs +4 -0
  717. package/dist/esm/api/types/TemplateFilteredTranslationsItem.d.mts +11 -0
  718. package/dist/esm/api/types/TemplateFilteredTranslationsItem.mjs +4 -0
  719. package/dist/esm/api/types/TranscribeCommand.d.mts +12 -0
  720. package/dist/esm/api/types/TranscribeCommand.mjs +4 -0
  721. package/dist/esm/api/types/TranscribeCommandData.d.mts +15 -0
  722. package/dist/esm/api/types/TranscribeCommandData.mjs +4 -0
  723. package/dist/esm/api/types/TranscribeCommandMessage.d.mts +8 -0
  724. package/dist/esm/api/types/TranscribeCommandMessage.mjs +4 -0
  725. package/dist/esm/api/types/TranscribeCommandVariable.d.mts +11 -0
  726. package/dist/esm/api/types/TranscribeCommandVariable.mjs +4 -0
  727. package/dist/esm/api/types/TranscribeConfigStatusMessage.d.mts +12 -0
  728. package/dist/esm/api/types/TranscribeConfigStatusMessage.mjs +4 -0
  729. package/dist/esm/api/types/TranscribeConfigStatusMessageType.d.mts +12 -0
  730. package/dist/esm/api/types/TranscribeConfigStatusMessageType.mjs +8 -0
  731. package/dist/esm/api/types/TranscribeConfigurationMessage.d.mts +8 -0
  732. package/dist/esm/api/types/TranscribeConfigurationMessage.mjs +4 -0
  733. package/dist/esm/api/types/TranscribeConfigurationMessageConfiguration.d.mts +16 -0
  734. package/dist/esm/api/types/TranscribeConfigurationMessageConfiguration.mjs +4 -0
  735. package/dist/esm/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.d.mts +21 -0
  736. package/dist/esm/api/types/TranscribeConfigurationMessageConfigurationPrimaryLanguage.mjs +17 -0
  737. package/dist/esm/api/types/TranscribeEndMessage.d.mts +6 -0
  738. package/dist/esm/api/types/TranscribeEndMessage.mjs +4 -0
  739. package/dist/esm/api/types/TranscribeEndedMessage.d.mts +6 -0
  740. package/dist/esm/api/types/TranscribeEndedMessage.mjs +4 -0
  741. package/dist/esm/api/types/TranscribeErrorMessage.d.mts +8 -0
  742. package/dist/esm/api/types/TranscribeErrorMessage.mjs +4 -0
  743. package/dist/esm/api/types/TranscribeErrorMessageError.d.mts +15 -0
  744. package/dist/esm/api/types/TranscribeErrorMessageError.mjs +4 -0
  745. package/dist/esm/api/types/TranscribeTranscriptData.d.mts +15 -0
  746. package/dist/esm/api/types/TranscribeTranscriptData.mjs +4 -0
  747. package/dist/esm/api/types/TranscribeTranscriptMessage.d.mts +8 -0
  748. package/dist/esm/api/types/TranscribeTranscriptMessage.mjs +4 -0
  749. package/dist/esm/api/types/TranscribeUsageMessage.d.mts +8 -0
  750. package/dist/esm/api/types/TranscribeUsageMessage.mjs +4 -0
  751. package/dist/esm/api/types/Transcript.d.mts +17 -0
  752. package/dist/esm/api/types/Transcript.mjs +4 -0
  753. package/dist/esm/api/types/UsageInfo.d.mts +6 -0
  754. package/dist/esm/api/types/UsageInfo.mjs +4 -0
  755. package/dist/esm/api/types/Uuid.d.mts +4 -0
  756. package/dist/esm/api/types/Uuid.mjs +4 -0
  757. package/dist/esm/api/types/V2DocumentContextTypeEnum.d.mts +9 -0
  758. package/dist/esm/api/types/V2DocumentContextTypeEnum.mjs +8 -0
  759. package/dist/esm/api/types/V2SourceEnum.d.mts +9 -0
  760. package/dist/esm/api/types/V2SourceEnum.mjs +8 -0
  761. package/dist/esm/api/types/WritingStyle.d.mts +7 -0
  762. package/dist/esm/api/types/WritingStyle.mjs +4 -0
  763. package/dist/esm/api/types/index.d.mts +91 -0
  764. package/dist/esm/api/types/index.mjs +91 -0
  765. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  766. package/dist/esm/core/auth/BasicAuth.mjs +23 -0
  767. package/dist/esm/core/auth/BearerToken.d.mts +5 -0
  768. package/dist/esm/core/auth/BearerToken.mjs +12 -0
  769. package/dist/esm/core/auth/OAuthTokenProvider.d.mts +25 -0
  770. package/dist/esm/core/auth/OAuthTokenProvider.mjs +49 -0
  771. package/dist/esm/core/auth/index.d.mts +3 -0
  772. package/dist/esm/core/auth/index.mjs +3 -0
  773. package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
  774. package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
  775. package/dist/esm/core/fetcher/BinaryResponse.d.mts +17 -0
  776. package/dist/esm/core/fetcher/BinaryResponse.mjs +11 -0
  777. package/dist/esm/core/fetcher/Fetcher.d.mts +40 -0
  778. package/dist/esm/core/fetcher/Fetcher.mjs +116 -0
  779. package/dist/esm/core/fetcher/Headers.d.mts +2 -0
  780. package/dist/esm/core/fetcher/Headers.mjs +82 -0
  781. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
  782. package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
  783. package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
  784. package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
  785. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +4 -0
  786. package/dist/esm/core/fetcher/ResponseWithBody.mjs +3 -0
  787. package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
  788. package/dist/esm/core/fetcher/Supplier.mjs +19 -0
  789. package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
  790. package/dist/esm/core/fetcher/createRequestUrl.mjs +6 -0
  791. package/dist/esm/core/fetcher/getFetchFn.d.mts +4 -0
  792. package/dist/esm/core/fetcher/getFetchFn.mjs +32 -0
  793. package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
  794. package/dist/esm/core/fetcher/getHeader.mjs +8 -0
  795. package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
  796. package/dist/esm/core/fetcher/getRequestBody.mjs +20 -0
  797. package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
  798. package/dist/esm/core/fetcher/getResponseBody.mjs +51 -0
  799. package/dist/esm/core/fetcher/index.d.mts +9 -0
  800. package/dist/esm/core/fetcher/index.mjs +5 -0
  801. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
  802. package/dist/esm/core/fetcher/makeRequest.mjs +38 -0
  803. package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
  804. package/dist/esm/core/fetcher/requestWithRetries.mjs +37 -0
  805. package/dist/esm/core/fetcher/signals.d.mts +11 -0
  806. package/dist/esm/core/fetcher/signals.mjs +32 -0
  807. package/dist/esm/core/headers.d.mts +3 -0
  808. package/dist/esm/core/headers.mjs +25 -0
  809. package/dist/esm/core/index.d.mts +6 -0
  810. package/dist/esm/core/index.mjs +6 -0
  811. package/dist/esm/core/json.d.mts +15 -0
  812. package/dist/esm/core/json.mjs +19 -0
  813. package/dist/esm/core/pagination/Page.d.mts +32 -0
  814. package/dist/esm/core/pagination/Page.mjs +96 -0
  815. package/dist/esm/core/pagination/Pageable.d.mts +14 -0
  816. package/dist/esm/core/pagination/Pageable.mjs +6 -0
  817. package/dist/esm/core/pagination/index.d.mts +2 -0
  818. package/dist/esm/core/pagination/index.mjs +2 -0
  819. package/dist/esm/core/runtime/index.d.mts +1 -0
  820. package/dist/esm/core/runtime/index.mjs +1 -0
  821. package/dist/esm/core/runtime/runtime.d.mts +9 -0
  822. package/dist/esm/core/runtime/runtime.mjs +99 -0
  823. package/dist/esm/core/utils/index.d.mts +1 -0
  824. package/dist/esm/core/utils/index.mjs +1 -0
  825. package/dist/esm/core/utils/setObjectProperty.d.mts +11 -0
  826. package/dist/esm/core/utils/setObjectProperty.mjs +39 -0
  827. package/dist/esm/core/websocket/events.d.mts +36 -0
  828. package/dist/esm/core/websocket/events.mjs +21 -0
  829. package/dist/esm/core/websocket/index.d.mts +1 -0
  830. package/dist/esm/core/websocket/index.mjs +1 -0
  831. package/dist/esm/core/websocket/ws.d.mts +137 -0
  832. package/dist/esm/core/websocket/ws.mjs +415 -0
  833. package/dist/esm/custom/CortiAuth.d.mts +57 -0
  834. package/dist/esm/custom/CortiAuth.mjs +145 -0
  835. package/dist/esm/custom/CortiClient.d.mts +113 -0
  836. package/dist/esm/custom/CortiClient.mjs +111 -0
  837. package/dist/esm/custom/CustomStream.d.mts +15 -0
  838. package/dist/esm/custom/CustomStream.mjs +45 -0
  839. package/dist/esm/custom/CustomStreamSocket.d.mts +11 -0
  840. package/dist/esm/custom/CustomStreamSocket.mjs +25 -0
  841. package/dist/esm/custom/CustomTranscribe.d.mts +15 -0
  842. package/dist/esm/custom/CustomTranscribe.mjs +45 -0
  843. package/dist/esm/custom/CustomTranscribeSocket.d.mts +11 -0
  844. package/dist/esm/custom/CustomTranscribeSocket.mjs +25 -0
  845. package/dist/esm/custom/RefreshBearerProvider.d.mts +23 -0
  846. package/dist/esm/custom/RefreshBearerProvider.mjs +48 -0
  847. package/dist/esm/environments.d.mts +26 -0
  848. package/dist/esm/environments.mjs +20 -0
  849. package/dist/esm/errors/CortiError.d.mts +15 -0
  850. package/dist/esm/errors/CortiError.mjs +26 -0
  851. package/dist/esm/errors/CortiTimeoutError.d.mts +6 -0
  852. package/dist/esm/errors/CortiTimeoutError.mjs +9 -0
  853. package/dist/esm/errors/index.d.mts +2 -0
  854. package/dist/esm/errors/index.mjs +2 -0
  855. package/dist/esm/index.d.mts +14 -0
  856. package/dist/esm/index.mjs +15 -0
  857. package/dist/esm/version.d.mts +1 -0
  858. package/dist/esm/version.mjs +1 -0
  859. package/package.json +71 -0
  860. package/reference.md +1726 -0
@@ -0,0 +1,145 @@
1
+ /**
2
+ * This file is implementation of the Auth client that can be used in 2 scenarios:
3
+ * 1. Under the hood by the package when Client credentials are used
4
+ * 2. Directly imported by the user to implement Authorization code flow
5
+ *
6
+ * Locally based on the auto-generated Auth client (src/api/resources/auth/client/Client.ts), but with some changes:
7
+ * 1. Token request sends proper `application/x-www-form-urlencoded` content type instead of `application/json`
8
+ * 2. Token request accepts additional parameters to support Authorization code flow
9
+ * 3. Additional methods to support Authorization code flow
10
+ *
11
+ * All methods are re-implemented, but class still extends the auto-generated one to make sure that we keep the same interface
12
+ * and to maybe remove some of the re-implementations in the future when `x-www-form-urlencoded` is supported
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import { Auth as FernAuth } from "../api/resources/auth/client/Client.mjs";
24
+ import * as core from "../core/index.mjs";
25
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../core/headers.mjs";
26
+ import urlJoin from "url-join";
27
+ import * as errors from "../errors/index.mjs";
28
+ import * as environments from "../environments.mjs";
29
+ export class Auth extends FernAuth {
30
+ /**
31
+ * Patch: called custom implementation this.__getToken_custom instead of this.__getToken
32
+ */
33
+ getToken(request, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__getToken_custom(request, requestOptions));
35
+ }
36
+ /**
37
+ * Patch: added method to get Authorization URL for Authorization code flow
38
+ */
39
+ authorizeURL(_a, options_1) {
40
+ return __awaiter(this, arguments, void 0, function* ({ client_id, redirect_uri, }, options) {
41
+ var _b, _c;
42
+ const authUrl = new URL(urlJoin((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortiEnvironment.BetaEu)
43
+ .login, yield core.Supplier.get(this._options.tenantName), "protocol/openid-connect/auth"));
44
+ authUrl.searchParams.set('response_type', 'code');
45
+ authUrl.searchParams.set('scope', 'openid profile');
46
+ if (client_id !== undefined) {
47
+ authUrl.searchParams.set('client_id', client_id);
48
+ }
49
+ if (redirect_uri !== undefined) {
50
+ authUrl.searchParams.set('redirect_uri', redirect_uri);
51
+ }
52
+ const authUrlString = authUrl.toString();
53
+ if (typeof window !== "undefined" && !(options === null || options === void 0 ? void 0 : options.skipRedirect)) {
54
+ window.location.href = authUrlString;
55
+ return authUrlString;
56
+ }
57
+ return authUrlString;
58
+ });
59
+ }
60
+ /**
61
+ * Patch: calls __getToken_custom with additional fields to support Authorization code flow
62
+ */
63
+ getCodeFlowToken(request, requestOptions) {
64
+ return core.HttpResponsePromise.fromPromise(this.__getToken_custom(Object.assign(Object.assign({}, request), { grant_type: "authorization_code" }), requestOptions));
65
+ }
66
+ /**
67
+ * Patch: copy of this.__getToken with patches
68
+ */
69
+ __getToken_custom(
70
+ /**
71
+ * Patch: added additional fields to request to support Authorization code flow
72
+ */
73
+ request, requestOptions) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ var _a, _b;
76
+ const _response = yield core.fetcher({
77
+ url: urlJoin((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)).login,
78
+ /**
79
+ * Patch: use tenantName as path parameter
80
+ * (consider to be generated from the spec in the future)
81
+ */
82
+ yield core.Supplier.get(this._options.tenantName), "protocol/openid-connect/token"),
83
+ method: "POST",
84
+ headers: mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
85
+ /**
86
+ * Patch: Removed `Authorization` header, as it is not needed for getting the token
87
+ */
88
+ "Tenant-Name": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.tenantName,
89
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
+ contentType: "application/x-www-form-urlencoded",
91
+ /**
92
+ * Patch: removed `requestType: "json"`, made body a URLSearchParams object
93
+ */
94
+ body: new URLSearchParams(Object.assign(Object.assign(Object.assign(Object.assign({}, request), { scope: "openid",
95
+ /**
96
+ * Patch: `grant_type` uses values from request or defaults to "client_credentials"
97
+ */
98
+ grant_type: request.grant_type || "client_credentials" }), (request.grant_type === "authorization_code"
99
+ ? {
100
+ code: request.code,
101
+ redirect_uri: request.redirect_uri
102
+ }
103
+ : {})), (request.grant_type === "refresh_token"
104
+ ? {
105
+ refresh_token: request.refresh_token,
106
+ }
107
+ : {}))),
108
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
109
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
110
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
111
+ });
112
+ if (_response.ok) {
113
+ return { data: _response.body, rawResponse: _response.rawResponse };
114
+ }
115
+ if (_response.error.reason === "status-code") {
116
+ throw new errors.CortiError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
122
+ switch (_response.error.reason) {
123
+ case "non-json":
124
+ throw new errors.CortiError({
125
+ statusCode: _response.error.statusCode,
126
+ body: _response.error.rawBody,
127
+ rawResponse: _response.rawResponse,
128
+ });
129
+ case "timeout":
130
+ throw new errors.CortiTimeoutError("Timeout exceeded when calling POST /protocol/openid-connect/token.");
131
+ case "unknown":
132
+ throw new errors.CortiError({
133
+ message: _response.error.errorMessage,
134
+ rawResponse: _response.rawResponse,
135
+ });
136
+ }
137
+ });
138
+ }
139
+ /**
140
+ * Patch: calls __getToken_custom with additional fields to support Refresh token flow
141
+ */
142
+ refreshToken(request, requestOptions) {
143
+ return core.HttpResponsePromise.fromPromise(this.__getToken_custom(Object.assign(Object.assign({}, request), { grant_type: "refresh_token" }), requestOptions));
144
+ }
145
+ }
@@ -0,0 +1,113 @@
1
+ /**
2
+ * This file is the custom implementation of the main CortiClient class (src/Client.ts)
3
+ *
4
+ * It's (almost) handwritten, and it replaces the auto-generated version, and here is why:
5
+ *
6
+ * 1. The auto-generated version uses direct client imports -> we can not always easily replace them without a patch in Main client
7
+ * 2. The auto-generated version produces TypeScript error when initializes authClient in `_oauthTokenProvider`
8
+ * 3. `_oauthTokenProvider` is a private field in the auto-generated version,
9
+ * so we cannot easily rewrite it in the custom implementation. We can use another field for OAuthProvider,
10
+ * but then we need to rewrite all the methods anyway => it will be easier to forget,
11
+ * since it would exist in the class, but not properly implemented
12
+ *
13
+ * => Must be manually synced with src/Client.ts (which is auto-generated).
14
+ *
15
+ * All the patches marked with `// Patch: ...` comments.
16
+ */
17
+ import * as environments from "../environments.mjs";
18
+ import * as core from "../core/index.mjs";
19
+ import { Interactions } from "../api/resources/interactions/client/Client.mjs";
20
+ import { Recordings } from "../api/resources/recordings/client/Client.mjs";
21
+ import { Transcripts } from "../api/resources/transcripts/client/Client.mjs";
22
+ import { Facts } from "../api/resources/facts/client/Client.mjs";
23
+ import { Documents } from "../api/resources/documents/client/Client.mjs";
24
+ import { Templates } from "../api/resources/templates/client/Client.mjs";
25
+ /**
26
+ * Patch: changed import to custom Stream and Transcribe implementations
27
+ */
28
+ import { Stream } from "./CustomStream.mjs";
29
+ import { Transcribe } from "./CustomTranscribe.mjs";
30
+ /**
31
+ * Patch: added custom RefreshBearerProvider
32
+ */
33
+ import { BearerOptions } from "./RefreshBearerProvider.mjs";
34
+ export declare namespace CortiClient {
35
+ /**
36
+ * Patch: added new public interface for `Options` (+ `ClientCredentials` interface)
37
+ */
38
+ interface ClientCredentials {
39
+ clientId: core.Supplier<string>;
40
+ clientSecret: core.Supplier<string>;
41
+ }
42
+ interface Options {
43
+ environment: core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
44
+ /** Override the Tenant-Name header */
45
+ tenantName: core.Supplier<string>;
46
+ /** Additional headers to include in requests. */
47
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
48
+ auth: ClientCredentials | BearerOptions;
49
+ }
50
+ /**
51
+ * Patch:
52
+ * - renamed `Options` to `InternalOptions`
53
+ * - added `token` field to support BearerProvider
54
+ * - made clientId and clientSecret optional
55
+ */
56
+ interface InternalOptions {
57
+ environment: core.Supplier<environments.CortiEnvironment | environments.CortiEnvironmentUrls>;
58
+ /** Specify a custom URL to connect the client to. */
59
+ baseUrl?: core.Supplier<string>;
60
+ clientId?: core.Supplier<string>;
61
+ clientSecret?: core.Supplier<string>;
62
+ token?: core.Supplier<string>;
63
+ /** Override the Tenant-Name header */
64
+ tenantName: core.Supplier<string>;
65
+ /** Additional headers to include in requests. */
66
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
67
+ }
68
+ interface RequestOptions {
69
+ /** The maximum time to wait for a response in seconds. */
70
+ timeoutInSeconds?: number;
71
+ /** The number of times to retry the request. Defaults to 2. */
72
+ maxRetries?: number;
73
+ /** A hook to abort the request. */
74
+ abortSignal?: AbortSignal;
75
+ /** Override the Tenant-Name header */
76
+ tenantName?: string;
77
+ /** Additional headers to include in the request. */
78
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
79
+ }
80
+ }
81
+ export declare class CortiClient {
82
+ /**
83
+ * Patch: this._options is now of type `CortiClient.InternalOptions` (which matches generated implementation)
84
+ */
85
+ protected readonly _options: CortiClient.InternalOptions;
86
+ /**
87
+ * Patch: extended `_oauthTokenProvider` to support both `RefreshBearerProvider` and `OAuthTokenProvider` options
88
+ */
89
+ private readonly _oauthTokenProvider;
90
+ protected _interactions: Interactions | undefined;
91
+ protected _recordings: Recordings | undefined;
92
+ protected _transcripts: Transcripts | undefined;
93
+ protected _facts: Facts | undefined;
94
+ protected _templates: Templates | undefined;
95
+ protected _documents: Documents | undefined;
96
+ /**
97
+ * Patch: removed `auth` field
98
+ * `_oauthTokenProvider` uses Auth module directly to get the token,
99
+ * and our client also don't need to use it within the main client.
100
+ * For other cases they can use `CortiAuth` module directly.
101
+ */
102
+ protected _stream: Stream | undefined;
103
+ protected _transcribe: Transcribe | undefined;
104
+ constructor(_options: CortiClient.Options);
105
+ get interactions(): Interactions;
106
+ get recordings(): Recordings;
107
+ get transcripts(): Transcripts;
108
+ get facts(): Facts;
109
+ get documents(): Documents;
110
+ get templates(): Templates;
111
+ get stream(): Stream;
112
+ get transcribe(): Transcribe;
113
+ }
@@ -0,0 +1,111 @@
1
+ /**
2
+ * This file is the custom implementation of the main CortiClient class (src/Client.ts)
3
+ *
4
+ * It's (almost) handwritten, and it replaces the auto-generated version, and here is why:
5
+ *
6
+ * 1. The auto-generated version uses direct client imports -> we can not always easily replace them without a patch in Main client
7
+ * 2. The auto-generated version produces TypeScript error when initializes authClient in `_oauthTokenProvider`
8
+ * 3. `_oauthTokenProvider` is a private field in the auto-generated version,
9
+ * so we cannot easily rewrite it in the custom implementation. We can use another field for OAuthProvider,
10
+ * but then we need to rewrite all the methods anyway => it will be easier to forget,
11
+ * since it would exist in the class, but not properly implemented
12
+ *
13
+ * => Must be manually synced with src/Client.ts (which is auto-generated).
14
+ *
15
+ * All the patches marked with `// Patch: ...` comments.
16
+ */
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ import * as core from "../core/index.mjs";
27
+ /**
28
+ * Patch: changed import to custom Auth implementation
29
+ */
30
+ import { Auth } from "./CortiAuth.mjs";
31
+ import { mergeHeaders } from "../core/headers.mjs";
32
+ import { Interactions } from "../api/resources/interactions/client/Client.mjs";
33
+ import { Recordings } from "../api/resources/recordings/client/Client.mjs";
34
+ import { Transcripts } from "../api/resources/transcripts/client/Client.mjs";
35
+ import { Facts } from "../api/resources/facts/client/Client.mjs";
36
+ import { Documents } from "../api/resources/documents/client/Client.mjs";
37
+ import { Templates } from "../api/resources/templates/client/Client.mjs";
38
+ /**
39
+ * Patch: changed import to custom Stream and Transcribe implementations
40
+ */
41
+ import { Stream } from "./CustomStream.mjs";
42
+ import { Transcribe } from "./CustomTranscribe.mjs";
43
+ /**
44
+ * Patch: added custom RefreshBearerProvider
45
+ */
46
+ import { RefreshBearerProvider } from "./RefreshBearerProvider.mjs";
47
+ /**
48
+ * Patch: added SDK_VERSION import
49
+ */
50
+ import { SDK_VERSION } from '../version.mjs';
51
+ export class CortiClient {
52
+ constructor(_options) {
53
+ this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
54
+ "Tenant-Name": _options === null || _options === void 0 ? void 0 : _options.tenantName,
55
+ "X-Fern-Language": "JavaScript",
56
+ "X-Fern-SDK-Name": "@corti/sdk",
57
+ /**
58
+ * Patch: replaced hardcoded SDK version with imported one
59
+ */
60
+ "X-Fern-SDK-Version": SDK_VERSION,
61
+ "User-Agent": `@corti/sdk/${SDK_VERSION}`,
62
+ "X-Fern-Runtime": core.RUNTIME.type,
63
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
64
+ }, _options === null || _options === void 0 ? void 0 : _options.headers), clientId: "clientId" in _options.auth ? _options.auth.clientId : undefined, clientSecret: "clientSecret" in _options.auth ? _options.auth.clientSecret : undefined, token: "access_token" in _options.auth ? _options.auth.access_token : undefined });
65
+ /**
66
+ * Patch: if `accessToken` is provided, use BearerProvider, otherwise use OAuthTokenProvider
67
+ */
68
+ this._oauthTokenProvider = "access_token" in _options.auth ?
69
+ new RefreshBearerProvider(_options.auth) :
70
+ new core.OAuthTokenProvider({
71
+ clientId: _options.auth.clientId,
72
+ clientSecret: _options.auth.clientSecret,
73
+ /**
74
+ * Patch: provide whole `options` object to the Auth client, since it depends on both tenantName and environment
75
+ */
76
+ authClient: new Auth(this._options),
77
+ });
78
+ }
79
+ get interactions() {
80
+ var _a;
81
+ return ((_a = this._interactions) !== null && _a !== void 0 ? _a : (this._interactions = new Interactions(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
82
+ }
83
+ get recordings() {
84
+ var _a;
85
+ return ((_a = this._recordings) !== null && _a !== void 0 ? _a : (this._recordings = new Recordings(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
86
+ }
87
+ get transcripts() {
88
+ var _a;
89
+ return ((_a = this._transcripts) !== null && _a !== void 0 ? _a : (this._transcripts = new Transcripts(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
90
+ }
91
+ get facts() {
92
+ var _a;
93
+ return ((_a = this._facts) !== null && _a !== void 0 ? _a : (this._facts = new Facts(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
94
+ }
95
+ get documents() {
96
+ var _a;
97
+ return ((_a = this._documents) !== null && _a !== void 0 ? _a : (this._documents = new Documents(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
98
+ }
99
+ get templates() {
100
+ var _a;
101
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Templates(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
102
+ }
103
+ get stream() {
104
+ var _a;
105
+ return ((_a = this._stream) !== null && _a !== void 0 ? _a : (this._stream = new Stream(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
106
+ }
107
+ get transcribe() {
108
+ var _a;
109
+ return ((_a = this._transcribe) !== null && _a !== void 0 ? _a : (this._transcribe = new Transcribe(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
110
+ }
111
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Patch: use custom Stream implementation to support passing _options parameters to connection function
3
+ */
4
+ import { Stream as FernStream } from "../api/resources/stream/client/Client.mjs";
5
+ /**
6
+ * Patch: changed import to custom StreamSocket implementation
7
+ */
8
+ import { StreamSocket } from "./CustomStreamSocket.mjs";
9
+ export declare class Stream extends FernStream {
10
+ connect(args: Omit<FernStream.ConnectArgs, 'token' | 'tenant-name'>): Promise<StreamSocket>;
11
+ /**
12
+ * Patch: temporary fix of WS URL generation, while it doesn't work from Ferns side
13
+ */
14
+ private __connect_patch;
15
+ }
@@ -0,0 +1,45 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ /**
11
+ * Patch: use custom Stream implementation to support passing _options parameters to connection function
12
+ */
13
+ import { Stream as FernStream } from "../api/resources/stream/client/Client.mjs";
14
+ import * as core from "../core/index.mjs";
15
+ /**
16
+ * Patch: changed import to custom StreamSocket implementation
17
+ */
18
+ import { StreamSocket } from "./CustomStreamSocket.mjs";
19
+ import * as qs from "qs";
20
+ export class Stream extends FernStream {
21
+ connect(args) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ return this.__connect_patch(Object.assign(Object.assign({}, args), { token: yield this._getAuthorizationHeader(), "tenant-name": yield core.Supplier.get(this._options.tenantName) }));
24
+ });
25
+ }
26
+ /**
27
+ * Patch: temporary fix of WS URL generation, while it doesn't work from Ferns side
28
+ */
29
+ __connect_patch(args) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ var _a, _b, _c;
32
+ const queryParams = {};
33
+ if (args["tenant-name"] != null) {
34
+ queryParams["tenant-name"] = args["tenant-name"];
35
+ }
36
+ if (args["token"] != null) {
37
+ queryParams["token"] = args["token"];
38
+ }
39
+ let websocketHeaders = {};
40
+ websocketHeaders = Object.assign(Object.assign({}, websocketHeaders), args["headers"]);
41
+ const socket = new core.ReconnectingWebSocket(`${(_a = (yield core.Supplier.get(this._options["baseUrl"]))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options["environment"])).wss}/audio-bridge/v2/interactions/${encodeURIComponent(args["id"])}/streams?${qs.stringify(queryParams, { arrayFormat: "repeat" })}`, [], { debug: (_b = args["debug"]) !== null && _b !== void 0 ? _b : false, maxRetries: (_c = args["reconnectAttempts"]) !== null && _c !== void 0 ? _c : 30 }, websocketHeaders);
42
+ return new StreamSocket({ socket });
43
+ });
44
+ }
45
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Patch: file patches disability of auto-generating binary data methods for sending data to the socket
3
+ */
4
+ import { StreamSocket as FernStreamSocket } from '../api/resources/stream/client/Socket.mjs';
5
+ export declare class StreamSocket extends FernStreamSocket {
6
+ sendAudio(message: ArrayBuffer | string): void;
7
+ /**
8
+ * Patch: have to repeat this method, because it is private in the base class
9
+ */
10
+ private __assertSocketIsOpen;
11
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Patch: file patches disability of auto-generating binary data methods for sending data to the socket
3
+ */
4
+ import { StreamSocket as FernStreamSocket } from '../api/resources/stream/client/Socket.mjs';
5
+ import * as core from "../core/index.mjs";
6
+ export class StreamSocket extends FernStreamSocket {
7
+ sendAudio(message) {
8
+ if (typeof message === 'string') {
9
+ return super.sendAudio(message);
10
+ }
11
+ this.__assertSocketIsOpen();
12
+ this.socket.send(message);
13
+ }
14
+ /**
15
+ * Patch: have to repeat this method, because it is private in the base class
16
+ */
17
+ __assertSocketIsOpen() {
18
+ if (!this.socket) {
19
+ throw new Error("Socket is not connected.");
20
+ }
21
+ if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) {
22
+ throw new Error("Socket is not open.");
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Patch: use custom Transcribe implementation to support passing _options parameters to connection function
3
+ */
4
+ import { Transcribe as FernTranscribe } from "../api/resources/transcribe/client/Client.mjs";
5
+ /**
6
+ * Patch: changed import to custom TranscribeSocket implementation
7
+ */
8
+ import { TranscribeSocket } from "./CustomTranscribeSocket.mjs";
9
+ export declare class Transcribe extends FernTranscribe {
10
+ connect(args?: Omit<FernTranscribe.ConnectArgs, 'token' | 'tenant-name'>): Promise<TranscribeSocket>;
11
+ /**
12
+ * Patch: temporary fix of WS generation, while binary type isn't supported from Ferns side
13
+ */
14
+ private __connect_patch;
15
+ }
@@ -0,0 +1,45 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ /**
11
+ * Patch: use custom Transcribe implementation to support passing _options parameters to connection function
12
+ */
13
+ import { Transcribe as FernTranscribe } from "../api/resources/transcribe/client/Client.mjs";
14
+ import * as core from "../core/index.mjs";
15
+ /**
16
+ * Patch: changed import to custom TranscribeSocket implementation
17
+ */
18
+ import { TranscribeSocket } from "./CustomTranscribeSocket.mjs";
19
+ import * as qs from "qs";
20
+ export class Transcribe extends FernTranscribe {
21
+ connect() {
22
+ return __awaiter(this, arguments, void 0, function* (args = {}) {
23
+ return this.__connect_patch(Object.assign(Object.assign({}, args), { token: yield this._getAuthorizationHeader(), "tenant-name": yield core.Supplier.get(this._options.tenantName) }));
24
+ });
25
+ }
26
+ /**
27
+ * Patch: temporary fix of WS generation, while binary type isn't supported from Ferns side
28
+ */
29
+ __connect_patch(args) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ var _a, _b, _c;
32
+ const queryParams = {};
33
+ if (args["tenant-name"] != null) {
34
+ queryParams["tenant-name"] = args["tenant-name"];
35
+ }
36
+ if (args["token"] != null) {
37
+ queryParams["token"] = args["token"];
38
+ }
39
+ let websocketHeaders = {};
40
+ websocketHeaders = Object.assign(Object.assign({}, websocketHeaders), args["headers"]);
41
+ const socket = new core.ReconnectingWebSocket(`${(_a = (yield core.Supplier.get(this._options["baseUrl"]))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options["environment"])).wss}/audio-bridge/v2/transcribe?${qs.stringify(queryParams, { arrayFormat: "repeat" })}`, [], { debug: (_b = args["debug"]) !== null && _b !== void 0 ? _b : false, maxRetries: (_c = args["reconnectAttempts"]) !== null && _c !== void 0 ? _c : 30 }, websocketHeaders);
42
+ return new TranscribeSocket({ socket });
43
+ });
44
+ }
45
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Patch: file patches disability of auto-generating binary data methods for sending data to the socket
3
+ */
4
+ import { TranscribeSocket as FernTranscribeSocket } from '../api/resources/transcribe/client/Socket.mjs';
5
+ export declare class TranscribeSocket extends FernTranscribeSocket {
6
+ sendAudio(message: ArrayBuffer | string): void;
7
+ /**
8
+ * Patch: have to repeat this method, because it is private in the base class
9
+ */
10
+ private __assertSocketIsOpen;
11
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Patch: file patches disability of auto-generating binary data methods for sending data to the socket
3
+ */
4
+ import { TranscribeSocket as FernTranscribeSocket } from '../api/resources/transcribe/client/Socket.mjs';
5
+ import * as core from "../core/index.mjs";
6
+ export class TranscribeSocket extends FernTranscribeSocket {
7
+ sendAudio(message) {
8
+ if (typeof message === 'string') {
9
+ return super.sendAudio(message);
10
+ }
11
+ this.__assertSocketIsOpen();
12
+ this.socket.send(message);
13
+ }
14
+ /**
15
+ * Patch: have to repeat this method, because it is private in the base class
16
+ */
17
+ __assertSocketIsOpen() {
18
+ if (!this.socket) {
19
+ throw new Error("Socket is not connected.");
20
+ }
21
+ if (this.socket.readyState !== core.ReconnectingWebSocket.OPEN) {
22
+ throw new Error("Socket is not open.");
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * RefreshBearerProvider used as a replacement of OAuthTokenProvider, in case when accessToken from outside of library was used instead of Client credentials.
3
+ */
4
+ import * as core from "../core/index.mjs";
5
+ import * as api from "../api/index.mjs";
6
+ type RefreshAccessTokenFunction = (refreshToken?: string) => Promise<api.GetTokenResponse> | api.GetTokenResponse;
7
+ export type BearerOptions = Partial<Omit<api.GetTokenResponse, 'access_token'>> & {
8
+ refreshAccessToken?: RefreshAccessTokenFunction;
9
+ access_token: core.Supplier<string>;
10
+ };
11
+ export declare class RefreshBearerProvider {
12
+ private readonly BUFFER_IN_MINUTES;
13
+ private _accessToken;
14
+ private _refreshToken;
15
+ private _refreshAccessToken;
16
+ private _expiresAt;
17
+ private _refreshExpiresAt;
18
+ constructor({ access_token, refreshAccessToken, refresh_token, refresh_expires_in, expires_in, }: BearerOptions);
19
+ getToken(): Promise<string>;
20
+ private refresh;
21
+ private getExpiresAt;
22
+ }
23
+ export {};
@@ -0,0 +1,48 @@
1
+ /**
2
+ * RefreshBearerProvider used as a replacement of OAuthTokenProvider, in case when accessToken from outside of library was used instead of Client credentials.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as core from "../core/index.mjs";
14
+ export class RefreshBearerProvider {
15
+ constructor({ access_token, refreshAccessToken, refresh_token, refresh_expires_in, expires_in, }) {
16
+ this.BUFFER_IN_MINUTES = 2;
17
+ this._expiresAt = this.getExpiresAt(expires_in, this.BUFFER_IN_MINUTES);
18
+ this._refreshExpiresAt = this.getExpiresAt(refresh_expires_in, 0);
19
+ this._accessToken = access_token;
20
+ this._refreshToken = refresh_token;
21
+ this._refreshAccessToken = refreshAccessToken;
22
+ }
23
+ getToken() {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ if (this._accessToken && this._expiresAt > new Date()) {
26
+ return core.Supplier.get(this._accessToken);
27
+ }
28
+ return this.refresh();
29
+ });
30
+ }
31
+ refresh() {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ if (!this._refreshAccessToken || this._refreshToken && this._refreshExpiresAt < new Date()) {
34
+ return core.Supplier.get(this._accessToken);
35
+ }
36
+ const tokenResponse = yield this._refreshAccessToken(this._refreshToken);
37
+ this._accessToken = tokenResponse.access_token;
38
+ this._expiresAt = this.getExpiresAt(tokenResponse.expires_in, this.BUFFER_IN_MINUTES);
39
+ this._refreshToken = tokenResponse.refresh_token;
40
+ this._refreshExpiresAt = this.getExpiresAt(tokenResponse.refresh_expires_in, 0);
41
+ return this._accessToken;
42
+ });
43
+ }
44
+ getExpiresAt(expiresInSeconds = 0, bufferInMinutes = this.BUFFER_IN_MINUTES) {
45
+ const now = new Date();
46
+ return new Date(now.getTime() + expiresInSeconds * 1000 - bufferInMinutes * 60 * 1000);
47
+ }
48
+ }