@deepgram/sdk 3.3.5 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/README.md +129 -9
  2. package/dist/main/DeepgramClient.d.ts +65 -12
  3. package/dist/main/DeepgramClient.d.ts.map +1 -1
  4. package/dist/main/DeepgramClient.js +73 -18
  5. package/dist/main/DeepgramClient.js.map +1 -1
  6. package/dist/main/index.d.ts +13 -4
  7. package/dist/main/index.d.ts.map +1 -1
  8. package/dist/main/index.js +18 -8
  9. package/dist/main/index.js.map +1 -1
  10. package/dist/main/lib/constants.d.ts +16 -7
  11. package/dist/main/lib/constants.d.ts.map +1 -1
  12. package/dist/main/lib/constants.js +26 -9
  13. package/dist/main/lib/constants.js.map +1 -1
  14. package/dist/main/lib/enums/LiveConnectionState.d.ts +5 -0
  15. package/dist/main/lib/enums/LiveConnectionState.d.ts.map +1 -1
  16. package/dist/main/lib/enums/LiveConnectionState.js +5 -0
  17. package/dist/main/lib/enums/LiveConnectionState.js.map +1 -1
  18. package/dist/main/lib/enums/LiveTranscriptionEvents.d.ts +24 -3
  19. package/dist/main/lib/enums/LiveTranscriptionEvents.d.ts.map +1 -1
  20. package/dist/main/lib/enums/LiveTranscriptionEvents.js +23 -2
  21. package/dist/main/lib/enums/LiveTranscriptionEvents.js.map +1 -1
  22. package/dist/main/lib/enums/index.d.ts +2 -2
  23. package/dist/main/lib/enums/index.d.ts.map +1 -1
  24. package/dist/main/lib/enums/index.js +16 -5
  25. package/dist/main/lib/enums/index.js.map +1 -1
  26. package/dist/main/lib/fetch.d.ts +19 -1
  27. package/dist/main/lib/fetch.d.ts.map +1 -1
  28. package/dist/main/lib/fetch.js +19 -1
  29. package/dist/main/lib/fetch.js.map +1 -1
  30. package/dist/main/lib/helpers.d.ts +9 -5
  31. package/dist/main/lib/helpers.d.ts.map +1 -1
  32. package/dist/main/lib/helpers.js +82 -7
  33. package/dist/main/lib/helpers.js.map +1 -1
  34. package/dist/main/lib/types/CreateProjectKeySchema.d.ts +0 -1
  35. package/dist/main/lib/types/CreateProjectKeySchema.d.ts.map +1 -1
  36. package/dist/main/lib/types/DeepgramClientOptions.d.ts +75 -8
  37. package/dist/main/lib/types/DeepgramClientOptions.d.ts.map +1 -1
  38. package/dist/main/lib/types/Fetch.d.ts +3 -13
  39. package/dist/main/lib/types/Fetch.d.ts.map +1 -1
  40. package/dist/main/lib/types/LiveConfigOptions.d.ts +6 -3
  41. package/dist/main/lib/types/LiveConfigOptions.d.ts.map +1 -1
  42. package/dist/main/lib/types/TranscriptionSchema.d.ts +0 -1
  43. package/dist/main/lib/types/TranscriptionSchema.d.ts.map +1 -1
  44. package/dist/main/lib/types/UpdateProjectMemberScopeSchema.d.ts +1 -1
  45. package/dist/main/lib/types/UpdateProjectMemberScopeSchema.d.ts.map +1 -1
  46. package/dist/main/lib/types/UpdateProjectSchema.d.ts +0 -1
  47. package/dist/main/lib/types/UpdateProjectSchema.d.ts.map +1 -1
  48. package/dist/main/lib/types/index.d.ts +39 -39
  49. package/dist/main/lib/types/index.d.ts.map +1 -1
  50. package/dist/main/lib/types/index.js +53 -0
  51. package/dist/main/lib/types/index.js.map +1 -1
  52. package/dist/main/lib/version.d.ts +1 -1
  53. package/dist/main/lib/version.js +1 -1
  54. package/dist/main/packages/AbstractClient.d.ts +63 -10
  55. package/dist/main/packages/AbstractClient.d.ts.map +1 -1
  56. package/dist/main/packages/AbstractClient.js +103 -50
  57. package/dist/main/packages/AbstractClient.js.map +1 -1
  58. package/dist/main/packages/AbstractLiveClient.d.ts +114 -0
  59. package/dist/main/packages/AbstractLiveClient.d.ts.map +1 -0
  60. package/dist/main/packages/AbstractLiveClient.js +238 -0
  61. package/dist/main/packages/AbstractLiveClient.js.map +1 -0
  62. package/dist/main/packages/AbstractRestClient.d.ts +105 -0
  63. package/dist/main/packages/AbstractRestClient.d.ts.map +1 -0
  64. package/dist/main/packages/AbstractRestClient.js +185 -0
  65. package/dist/main/packages/AbstractRestClient.js.map +1 -0
  66. package/dist/main/packages/ListenClient.d.ts +21 -4
  67. package/dist/main/packages/ListenClient.d.ts.map +1 -1
  68. package/dist/main/packages/ListenClient.js +25 -5
  69. package/dist/main/packages/ListenClient.js.map +1 -1
  70. package/dist/main/packages/ListenLiveClient.d.ts +58 -0
  71. package/dist/main/packages/ListenLiveClient.d.ts.map +1 -0
  72. package/dist/main/packages/ListenLiveClient.js +119 -0
  73. package/dist/main/packages/ListenLiveClient.js.map +1 -0
  74. package/dist/main/packages/ListenRestClient.d.ts +57 -0
  75. package/dist/main/packages/ListenRestClient.d.ts.map +1 -0
  76. package/dist/main/packages/ListenRestClient.js +167 -0
  77. package/dist/main/packages/ListenRestClient.js.map +1 -0
  78. package/dist/main/packages/ManageRestClient.d.ts +286 -0
  79. package/dist/main/packages/ManageRestClient.d.ts.map +1 -0
  80. package/dist/main/packages/ManageRestClient.js +628 -0
  81. package/dist/main/packages/ManageRestClient.js.map +1 -0
  82. package/dist/main/packages/ReadRestClient.d.ts +57 -0
  83. package/dist/main/packages/ReadRestClient.d.ts.map +1 -0
  84. package/dist/main/packages/ReadRestClient.js +165 -0
  85. package/dist/main/packages/ReadRestClient.js.map +1 -0
  86. package/dist/main/packages/SelfHostedRestClient.d.ts +47 -0
  87. package/dist/main/packages/SelfHostedRestClient.d.ts.map +1 -0
  88. package/dist/main/packages/SelfHostedRestClient.js +120 -0
  89. package/dist/main/packages/SelfHostedRestClient.js.map +1 -0
  90. package/dist/main/packages/SpeakRestClient.d.ts +36 -0
  91. package/dist/main/packages/SpeakRestClient.d.ts.map +1 -0
  92. package/dist/main/packages/SpeakRestClient.js +84 -0
  93. package/dist/main/packages/SpeakRestClient.js.map +1 -0
  94. package/dist/main/packages/index.d.ts +10 -8
  95. package/dist/main/packages/index.d.ts.map +1 -1
  96. package/dist/main/packages/index.js +24 -17
  97. package/dist/main/packages/index.js.map +1 -1
  98. package/dist/module/DeepgramClient.d.ts +65 -12
  99. package/dist/module/DeepgramClient.d.ts.map +1 -1
  100. package/dist/module/DeepgramClient.js +72 -17
  101. package/dist/module/DeepgramClient.js.map +1 -1
  102. package/dist/module/index.d.ts +13 -4
  103. package/dist/module/index.d.ts.map +1 -1
  104. package/dist/module/index.js +18 -8
  105. package/dist/module/index.js.map +1 -1
  106. package/dist/module/lib/constants.d.ts +16 -7
  107. package/dist/module/lib/constants.d.ts.map +1 -1
  108. package/dist/module/lib/constants.js +26 -9
  109. package/dist/module/lib/constants.js.map +1 -1
  110. package/dist/module/lib/enums/LiveConnectionState.d.ts +5 -0
  111. package/dist/module/lib/enums/LiveConnectionState.d.ts.map +1 -1
  112. package/dist/module/lib/enums/LiveConnectionState.js +5 -0
  113. package/dist/module/lib/enums/LiveConnectionState.js.map +1 -1
  114. package/dist/module/lib/enums/LiveTranscriptionEvents.d.ts +24 -3
  115. package/dist/module/lib/enums/LiveTranscriptionEvents.d.ts.map +1 -1
  116. package/dist/module/lib/enums/LiveTranscriptionEvents.js +23 -2
  117. package/dist/module/lib/enums/LiveTranscriptionEvents.js.map +1 -1
  118. package/dist/module/lib/enums/index.d.ts +2 -2
  119. package/dist/module/lib/enums/index.d.ts.map +1 -1
  120. package/dist/module/lib/enums/index.js +2 -2
  121. package/dist/module/lib/enums/index.js.map +1 -1
  122. package/dist/module/lib/fetch.d.ts +19 -1
  123. package/dist/module/lib/fetch.d.ts.map +1 -1
  124. package/dist/module/lib/fetch.js +19 -1
  125. package/dist/module/lib/fetch.js.map +1 -1
  126. package/dist/module/lib/helpers.d.ts +9 -5
  127. package/dist/module/lib/helpers.d.ts.map +1 -1
  128. package/dist/module/lib/helpers.js +75 -4
  129. package/dist/module/lib/helpers.js.map +1 -1
  130. package/dist/module/lib/types/CreateProjectKeySchema.d.ts +0 -1
  131. package/dist/module/lib/types/CreateProjectKeySchema.d.ts.map +1 -1
  132. package/dist/module/lib/types/DeepgramClientOptions.d.ts +75 -8
  133. package/dist/module/lib/types/DeepgramClientOptions.d.ts.map +1 -1
  134. package/dist/module/lib/types/Fetch.d.ts +3 -13
  135. package/dist/module/lib/types/Fetch.d.ts.map +1 -1
  136. package/dist/module/lib/types/LiveConfigOptions.d.ts +6 -3
  137. package/dist/module/lib/types/LiveConfigOptions.d.ts.map +1 -1
  138. package/dist/module/lib/types/TranscriptionSchema.d.ts +0 -1
  139. package/dist/module/lib/types/TranscriptionSchema.d.ts.map +1 -1
  140. package/dist/module/lib/types/UpdateProjectMemberScopeSchema.d.ts +1 -1
  141. package/dist/module/lib/types/UpdateProjectMemberScopeSchema.d.ts.map +1 -1
  142. package/dist/module/lib/types/UpdateProjectSchema.d.ts +0 -1
  143. package/dist/module/lib/types/UpdateProjectSchema.d.ts.map +1 -1
  144. package/dist/module/lib/types/index.d.ts +39 -39
  145. package/dist/module/lib/types/index.d.ts.map +1 -1
  146. package/dist/module/lib/types/index.js +39 -1
  147. package/dist/module/lib/types/index.js.map +1 -1
  148. package/dist/module/lib/version.d.ts +1 -1
  149. package/dist/module/lib/version.js +1 -1
  150. package/dist/module/packages/AbstractClient.d.ts +63 -10
  151. package/dist/module/packages/AbstractClient.d.ts.map +1 -1
  152. package/dist/module/packages/AbstractClient.js +99 -50
  153. package/dist/module/packages/AbstractClient.js.map +1 -1
  154. package/dist/module/packages/AbstractLiveClient.d.ts +114 -0
  155. package/dist/module/packages/AbstractLiveClient.d.ts.map +1 -0
  156. package/dist/module/packages/AbstractLiveClient.js +211 -0
  157. package/dist/module/packages/AbstractLiveClient.js.map +1 -0
  158. package/dist/module/packages/AbstractRestClient.d.ts +105 -0
  159. package/dist/module/packages/AbstractRestClient.d.ts.map +1 -0
  160. package/dist/module/packages/AbstractRestClient.js +178 -0
  161. package/dist/module/packages/AbstractRestClient.js.map +1 -0
  162. package/dist/module/packages/ListenClient.d.ts +21 -4
  163. package/dist/module/packages/ListenClient.d.ts.map +1 -1
  164. package/dist/module/packages/ListenClient.js +25 -5
  165. package/dist/module/packages/ListenClient.js.map +1 -1
  166. package/dist/module/packages/ListenLiveClient.d.ts +58 -0
  167. package/dist/module/packages/ListenLiveClient.d.ts.map +1 -0
  168. package/dist/module/packages/ListenLiveClient.js +115 -0
  169. package/dist/module/packages/ListenLiveClient.js.map +1 -0
  170. package/dist/module/packages/ListenRestClient.d.ts +57 -0
  171. package/dist/module/packages/ListenRestClient.d.ts.map +1 -0
  172. package/dist/module/packages/ListenRestClient.js +163 -0
  173. package/dist/module/packages/ListenRestClient.js.map +1 -0
  174. package/dist/module/packages/ManageRestClient.d.ts +286 -0
  175. package/dist/module/packages/ManageRestClient.d.ts.map +1 -0
  176. package/dist/module/packages/ManageRestClient.js +624 -0
  177. package/dist/module/packages/ManageRestClient.js.map +1 -0
  178. package/dist/module/packages/ReadRestClient.d.ts +57 -0
  179. package/dist/module/packages/ReadRestClient.d.ts.map +1 -0
  180. package/dist/module/packages/ReadRestClient.js +161 -0
  181. package/dist/module/packages/ReadRestClient.js.map +1 -0
  182. package/dist/module/packages/SelfHostedRestClient.d.ts +47 -0
  183. package/dist/module/packages/SelfHostedRestClient.d.ts.map +1 -0
  184. package/dist/module/packages/SelfHostedRestClient.js +116 -0
  185. package/dist/module/packages/SelfHostedRestClient.js.map +1 -0
  186. package/dist/module/packages/SpeakRestClient.d.ts +36 -0
  187. package/dist/module/packages/SpeakRestClient.d.ts.map +1 -0
  188. package/dist/module/packages/SpeakRestClient.js +80 -0
  189. package/dist/module/packages/SpeakRestClient.js.map +1 -0
  190. package/dist/module/packages/index.d.ts +10 -8
  191. package/dist/module/packages/index.d.ts.map +1 -1
  192. package/dist/module/packages/index.js +10 -8
  193. package/dist/module/packages/index.js.map +1 -1
  194. package/dist/umd/deepgram.js +1 -1
  195. package/package.json +8 -6
  196. package/src/DeepgramClient.ts +81 -17
  197. package/src/index.ts +32 -7
  198. package/src/lib/constants.ts +33 -13
  199. package/src/lib/enums/LiveConnectionState.ts +11 -4
  200. package/src/lib/enums/LiveTranscriptionEvents.ts +27 -4
  201. package/src/lib/enums/index.ts +2 -2
  202. package/src/lib/fetch.ts +22 -2
  203. package/src/lib/helpers.ts +98 -9
  204. package/src/lib/types/CreateProjectKeySchema.ts +0 -1
  205. package/src/lib/types/DeepgramClientOptions.ts +75 -11
  206. package/src/lib/types/Fetch.ts +2 -24
  207. package/src/lib/types/LiveConfigOptions.ts +7 -3
  208. package/src/lib/types/TranscriptionSchema.ts +0 -2
  209. package/src/lib/types/UpdateProjectMemberScopeSchema.ts +1 -1
  210. package/src/lib/types/UpdateProjectSchema.ts +0 -1
  211. package/src/lib/types/index.ts +39 -54
  212. package/src/lib/version.ts +1 -1
  213. package/src/packages/AbstractClient.ts +129 -61
  214. package/src/packages/AbstractLiveClient.ts +280 -0
  215. package/src/packages/AbstractRestClient.ts +221 -0
  216. package/src/packages/ListenClient.ts +26 -5
  217. package/src/packages/ListenLiveClient.ts +133 -0
  218. package/src/packages/ListenRestClient.ts +201 -0
  219. package/src/packages/ManageRestClient.ts +760 -0
  220. package/src/packages/ReadRestClient.ts +200 -0
  221. package/src/packages/SelfHostedRestClient.ts +134 -0
  222. package/src/packages/SpeakRestClient.ts +79 -0
  223. package/src/packages/index.ts +10 -8
  224. package/dist/main/packages/AbstractRestfulClient.d.ts +0 -26
  225. package/dist/main/packages/AbstractRestfulClient.d.ts.map +0 -1
  226. package/dist/main/packages/AbstractRestfulClient.js +0 -118
  227. package/dist/main/packages/AbstractRestfulClient.js.map +0 -1
  228. package/dist/main/packages/AbstractWsClient.d.ts +0 -10
  229. package/dist/main/packages/AbstractWsClient.d.ts.map +0 -1
  230. package/dist/main/packages/AbstractWsClient.js +0 -33
  231. package/dist/main/packages/AbstractWsClient.js.map +0 -1
  232. package/dist/main/packages/LiveClient.d.ts +0 -28
  233. package/dist/main/packages/LiveClient.d.ts.map +0 -1
  234. package/dist/main/packages/LiveClient.js +0 -110
  235. package/dist/main/packages/LiveClient.js.map +0 -1
  236. package/dist/main/packages/ManageClient.d.ts +0 -97
  237. package/dist/main/packages/ManageClient.d.ts.map +0 -1
  238. package/dist/main/packages/ManageClient.js +0 -463
  239. package/dist/main/packages/ManageClient.js.map +0 -1
  240. package/dist/main/packages/OnPremClient.d.ts +0 -21
  241. package/dist/main/packages/OnPremClient.d.ts.map +0 -1
  242. package/dist/main/packages/OnPremClient.js +0 -99
  243. package/dist/main/packages/OnPremClient.js.map +0 -1
  244. package/dist/main/packages/PrerecordedClient.d.ts +0 -10
  245. package/dist/main/packages/PrerecordedClient.d.ts.map +0 -1
  246. package/dist/main/packages/PrerecordedClient.js +0 -125
  247. package/dist/main/packages/PrerecordedClient.js.map +0 -1
  248. package/dist/main/packages/ReadClient.d.ts +0 -10
  249. package/dist/main/packages/ReadClient.d.ts.map +0 -1
  250. package/dist/main/packages/ReadClient.js +0 -123
  251. package/dist/main/packages/ReadClient.js.map +0 -1
  252. package/dist/main/packages/SpeakClient.d.ts +0 -12
  253. package/dist/main/packages/SpeakClient.d.ts.map +0 -1
  254. package/dist/main/packages/SpeakClient.js +0 -57
  255. package/dist/main/packages/SpeakClient.js.map +0 -1
  256. package/dist/module/packages/AbstractRestfulClient.d.ts +0 -26
  257. package/dist/module/packages/AbstractRestfulClient.d.ts.map +0 -1
  258. package/dist/module/packages/AbstractRestfulClient.js +0 -114
  259. package/dist/module/packages/AbstractRestfulClient.js.map +0 -1
  260. package/dist/module/packages/AbstractWsClient.d.ts +0 -10
  261. package/dist/module/packages/AbstractWsClient.d.ts.map +0 -1
  262. package/dist/module/packages/AbstractWsClient.js +0 -29
  263. package/dist/module/packages/AbstractWsClient.js.map +0 -1
  264. package/dist/module/packages/LiveClient.d.ts +0 -28
  265. package/dist/module/packages/LiveClient.d.ts.map +0 -1
  266. package/dist/module/packages/LiveClient.js +0 -106
  267. package/dist/module/packages/LiveClient.js.map +0 -1
  268. package/dist/module/packages/ManageClient.d.ts +0 -97
  269. package/dist/module/packages/ManageClient.d.ts.map +0 -1
  270. package/dist/module/packages/ManageClient.js +0 -459
  271. package/dist/module/packages/ManageClient.js.map +0 -1
  272. package/dist/module/packages/OnPremClient.d.ts +0 -21
  273. package/dist/module/packages/OnPremClient.d.ts.map +0 -1
  274. package/dist/module/packages/OnPremClient.js +0 -95
  275. package/dist/module/packages/OnPremClient.js.map +0 -1
  276. package/dist/module/packages/PrerecordedClient.d.ts +0 -10
  277. package/dist/module/packages/PrerecordedClient.d.ts.map +0 -1
  278. package/dist/module/packages/PrerecordedClient.js +0 -121
  279. package/dist/module/packages/PrerecordedClient.js.map +0 -1
  280. package/dist/module/packages/ReadClient.d.ts +0 -10
  281. package/dist/module/packages/ReadClient.d.ts.map +0 -1
  282. package/dist/module/packages/ReadClient.js +0 -119
  283. package/dist/module/packages/ReadClient.js.map +0 -1
  284. package/dist/module/packages/SpeakClient.d.ts +0 -12
  285. package/dist/module/packages/SpeakClient.d.ts.map +0 -1
  286. package/dist/module/packages/SpeakClient.js +0 -53
  287. package/dist/module/packages/SpeakClient.js.map +0 -1
  288. package/src/packages/AbstractRestfulClient.ts +0 -160
  289. package/src/packages/AbstractWsClient.ts +0 -42
  290. package/src/packages/LiveClient.ts +0 -140
  291. package/src/packages/ManageClient.ts +0 -584
  292. package/src/packages/OnPremClient.ts +0 -113
  293. package/src/packages/PrerecordedClient.ts +0 -162
  294. package/src/packages/ReadClient.ts +0 -161
  295. package/src/packages/SpeakClient.ts +0 -50
@@ -0,0 +1,286 @@
1
+ import type { CreateProjectKeySchema, CreateProjectKeyResponse, DeepgramResponse, GetProjectBalanceResponse, GetProjectBalancesResponse, GetProjectInvitesResponse, GetProjectKeyResponse, GetProjectKeysResponse, GetProjectMemberScopesResponse, GetProjectMembersResponse, GetProjectResponse, GetProjectsResponse, GetProjectUsageFieldsSchema, GetProjectUsageFieldsResponse, GetProjectUsageRequestResponse, GetProjectUsageRequestsSchema, GetProjectUsageRequestsResponse, GetProjectUsageSummarySchema, GetProjectUsageSummaryResponse, MessageResponse, SendProjectInviteSchema, UpdateProjectMemberScopeSchema, UpdateProjectSchema, VoidResponse, GetTokenDetailsResponse } from "../lib/types";
2
+ import { AbstractRestClient } from "./AbstractRestClient";
3
+ /**
4
+ * The `ManageRestClient` class provides a set of methods for interacting with the Deepgram Manage API. It extends the `AbstractRestClient` class and provides functionality for managing projects, keys, members, invites, usage, and balances.
5
+ *
6
+ * The class has a `namespace` property that is set to `"manage"`, which is used in the construction of the request URLs.
7
+ *
8
+ * The methods in this class include:
9
+ * - `getTokenDetails`: Retrieves the details of the current authentication token.
10
+ * - `getProjects`: Retrieves a list of all projects associated with the authenticated account.
11
+ * - `getProject`: Retrieves the details of a specific project.
12
+ * - `updateProject`: Updates the details of a specific project.
13
+ * - `deleteProject`: Deletes a specific project.
14
+ * - `getProjectKeys`: Retrieves a list of all API keys associated with a specific project.
15
+ * - `getProjectKey`: Retrieves the details of a specific API key.
16
+ * - `createProjectKey`: Creates a new API key for a specific project.
17
+ * - `deleteProjectKey`: Deletes a specific API key.
18
+ * - `getProjectMembers`: Retrieves a list of all members associated with a specific project.
19
+ * - `removeProjectMember`: Removes a specific member from a project.
20
+ * - `getProjectMemberScopes`: Retrieves the scopes associated with a specific project member.
21
+ * - `updateProjectMemberScope`: Updates the scopes associated with a specific project member.
22
+ * - `getProjectInvites`: Retrieves a list of all pending invitations for a specific project.
23
+ * - `sendProjectInvite`: Sends a new invitation to a specific email address for a project.
24
+ * - `deleteProjectInvite`: Deletes a specific invitation for a project.
25
+ * - `leaveProject`: Removes the authenticated user from a specific project.
26
+ * - `getProjectUsageRequests`: Retrieves a list of all usage requests for a specific project.
27
+ * - `getProjectUsageRequest`: Retrieves the details of a specific usage request.
28
+ * - `getProjectUsageSummary`: Retrieves a summary of the usage for a specific project.
29
+ * - `getProjectUsageFields`: Retrieves a list of the available usage fields for a specific project.
30
+ * - `getProjectBalances`: Retrieves a list of all balances associated with a specific project.
31
+ * - `getProjectBalance`: Retrieves the details of a specific balance for a project.
32
+ */
33
+ /**
34
+ * The `ManageRestClient` class provides a set of methods for interacting with the Deepgram Manage API. It extends the `AbstractRestClient` class and provides functionality for managing projects, keys, members, invites, usage, and balances.
35
+ *
36
+ * The class has a `namespace` property that is set to `"manage"`, which is used in the construction of the request URLs.
37
+ *
38
+ * The methods in this class include:
39
+ * - `getTokenDetails`: Retrieves the details of the current authentication token.
40
+ * - `getProjects`: Retrieves a list of all projects associated with the authenticated account.
41
+ * - `getProject`: Retrieves the details of a specific project.
42
+ * - `updateProject`: Updates the details of a specific project.
43
+ * - `deleteProject`: Deletes a specific project.
44
+ * - `getProjectKeys`: Retrieves a list of all API keys associated with a specific project.
45
+ * - `getProjectKey`: Retrieves the details of a specific API key.
46
+ * - `createProjectKey`: Creates a new API key for a specific project.
47
+ * - `deleteProjectKey`: Deletes a specific API key.
48
+ * - `getProjectMembers`: Retrieves a list of all members associated with a specific project.
49
+ * - `removeProjectMember`: Removes a specific member from a project.
50
+ * - `getProjectMemberScopes`: Retrieves the scopes associated with a specific project member.
51
+ * - `updateProjectMemberScope`: Updates the scopes associated with a specific project member.
52
+ * - `getProjectInvites`: Retrieves a list of all pending invitations for a specific project.
53
+ * - `sendProjectInvite`: Sends a new invitation to a specific email address for a project.
54
+ * - `deleteProjectInvite`: Deletes a specific invitation for a project.
55
+ * - `leaveProject`: Removes the authenticated user from a specific project.
56
+ * - `getProjectUsageRequests`: Retrieves a list of all usage requests for a specific project.
57
+ * - `getProjectUsageRequest`: Retrieves the details of a specific usage request.
58
+ * - `getProjectUsageSummary`: Retrieves a summary of the usage for a specific project.
59
+ * - `getProjectUsageFields`: Retrieves a list of the available usage fields for a specific project.
60
+ * - `getProjectBalances`: Retrieves a list of all balances associated with a specific project.
61
+ * - `getProjectBalance`: Retrieves the details of a specific balance for a project.
62
+ */
63
+ export declare class ManageRestClient extends AbstractRestClient {
64
+ namespace: string;
65
+ /**
66
+ * Retrieves the details of the current authentication token.
67
+ *
68
+ * @returns A promise that resolves to an object containing the token details, or an error object if an error occurs.
69
+ * @see https://developers.deepgram.com/docs/authenticating#test-request
70
+ */
71
+ getTokenDetails(endpoint?: string): Promise<DeepgramResponse<GetTokenDetailsResponse>>;
72
+ /**
73
+ * Retrieves a list of all projects associated with the authenticated user.
74
+ *
75
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects".
76
+ * @returns A promise that resolves to an object containing the list of projects, or an error object if an error occurs.
77
+ * @see https://developers.deepgram.com/reference/get-projects
78
+ */
79
+ getProjects(endpoint?: string): Promise<DeepgramResponse<GetProjectsResponse>>;
80
+ /**
81
+ * Retrieves the details of a specific project associated with the authenticated user.
82
+ *
83
+ * @param projectId - The ID of the project to retrieve.
84
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId".
85
+ * @returns A promise that resolves to an object containing the project details, or an error object if an error occurs.
86
+ * @see https://developers.deepgram.com/reference/get-project
87
+ */
88
+ getProject(projectId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectResponse>>;
89
+ /**
90
+ * Updates an existing project associated with the authenticated user.
91
+ *
92
+ * @param projectId - The ID of the project to update.
93
+ * @param options - An object containing the updated project details.
94
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId".
95
+ * @returns A promise that resolves to an object containing the response message, or an error object if an error occurs.
96
+ * @see https://developers.deepgram.com/reference/update-project
97
+ */
98
+ updateProject(projectId: string, options: UpdateProjectSchema, endpoint?: string): Promise<DeepgramResponse<MessageResponse>>;
99
+ /**
100
+ * Deletes an existing project associated with the authenticated user.
101
+ *
102
+ * @param projectId - The ID of the project to delete.
103
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId".
104
+ * @returns A promise that resolves to an object containing the response message, or an error object if an error occurs.
105
+ * @see https://developers.deepgram.com/reference/delete-project
106
+ */
107
+ deleteProject(projectId: string, endpoint?: string): Promise<VoidResponse>;
108
+ /**
109
+ * Retrieves a list of project keys associated with the specified project.
110
+ *
111
+ * @param projectId - The ID of the project to retrieve the keys for.
112
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/keys".
113
+ * @returns A promise that resolves to an object containing the list of project keys, or an error object if an error occurs.
114
+ * @see https://developers.deepgram.com/reference/list-keys
115
+ */
116
+ getProjectKeys(projectId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectKeysResponse>>;
117
+ /**
118
+ * Retrieves a specific project key associated with the specified project.
119
+ *
120
+ * @param projectId - The ID of the project to retrieve the key for.
121
+ * @param keyId - The ID of the project key to retrieve.
122
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/keys/:keyId".
123
+ * @returns A promise that resolves to an object containing the project key, or an error object if an error occurs.
124
+ * @see https://developers.deepgram.com/reference/get-key
125
+ */
126
+ getProjectKey(projectId: string, keyId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectKeyResponse>>;
127
+ /**
128
+ * Creates a new project key for the specified project.
129
+ *
130
+ * @param projectId - The ID of the project to create the key for.
131
+ * @param options - An object containing the options for creating the project key.
132
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/keys".
133
+ * @returns A promise that resolves to an object containing the created project key, or an error object if an error occurs.
134
+ * @see https://developers.deepgram.com/reference/create-key
135
+ */
136
+ createProjectKey(projectId: string, options: CreateProjectKeySchema, endpoint?: string): Promise<DeepgramResponse<CreateProjectKeyResponse>>;
137
+ /**
138
+ * Deletes the specified project key.
139
+ *
140
+ * @param projectId - The ID of the project the key belongs to.
141
+ * @param keyId - The ID of the key to delete.
142
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/keys/:keyId".
143
+ * @returns A promise that resolves to an object containing a null result and an error object if an error occurs.
144
+ * @see https://developers.deepgram.com/reference/delete-key
145
+ */
146
+ deleteProjectKey(projectId: string, keyId: string, endpoint?: string): Promise<VoidResponse>;
147
+ /**
148
+ * Retrieves the members of the specified project.
149
+ *
150
+ * @param projectId - The ID of the project to retrieve members for.
151
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/members".
152
+ * @returns A promise that resolves to an object containing the project members and an error object if an error occurs.
153
+ * @see https://developers.deepgram.com/reference/get-members
154
+ */
155
+ getProjectMembers(projectId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectMembersResponse>>;
156
+ /**
157
+ * Removes a member from the specified project.
158
+ *
159
+ * @param projectId - The ID of the project to remove the member from.
160
+ * @param memberId - The ID of the member to remove.
161
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/members/:memberId".
162
+ * @returns A promise that resolves to an object containing a null error if the operation was successful, or an error object if an error occurred.
163
+ * @see https://developers.deepgram.com/reference/remove-member
164
+ */
165
+ removeProjectMember(projectId: string, memberId: string, endpoint?: string): Promise<VoidResponse>;
166
+ /**
167
+ * Retrieves the scopes for the specified project member.
168
+ *
169
+ * @param projectId - The ID of the project to retrieve the member scopes for.
170
+ * @param memberId - The ID of the member to retrieve the scopes for.
171
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/members/:memberId/scopes".
172
+ * @returns A promise that resolves to an object containing the retrieved scopes or an error object if an error occurred.
173
+ * @see https://developers.deepgram.com/reference/get-member-scopes
174
+ */
175
+ getProjectMemberScopes(projectId: string, memberId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectMemberScopesResponse>>;
176
+ /**
177
+ * Updates the scopes for the specified project member.
178
+ *
179
+ * @param projectId - The ID of the project to update the member scopes for.
180
+ * @param memberId - The ID of the member to update the scopes for.
181
+ * @param options - An object containing the new scopes to apply to the member.
182
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/members/:memberId/scopes".
183
+ * @returns A promise that resolves to an object containing the result of the update operation or an error object if an error occurred.
184
+ * @see https://developers.deepgram.com/reference/update-scope
185
+ */
186
+ updateProjectMemberScope(projectId: string, memberId: string, options: UpdateProjectMemberScopeSchema, endpoint?: string): Promise<DeepgramResponse<MessageResponse>>;
187
+ /**
188
+ * Retrieves the project invites for the specified project.
189
+ *
190
+ * @param projectId - The ID of the project to retrieve the invites for.
191
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/invites".
192
+ * @returns A promise that resolves to an object containing the result of the get operation or an error object if an error occurred.
193
+ * @see https://developers.deepgram.com/reference/list-invites
194
+ */
195
+ getProjectInvites(projectId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectInvitesResponse>>;
196
+ /**
197
+ * Sends a project invite to the specified email addresses.
198
+ *
199
+ * @param projectId - The ID of the project to send the invite for.
200
+ * @param options - An object containing the email addresses to invite and any additional options.
201
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/invites".
202
+ * @returns A promise that resolves to an object containing the result of the post operation or an error object if an error occurred.
203
+ * @see https://developers.deepgram.com/reference/send-invites
204
+ */
205
+ sendProjectInvite(projectId: string, options: SendProjectInviteSchema, endpoint?: string): Promise<DeepgramResponse<MessageResponse>>;
206
+ /**
207
+ * Deletes a project invite for the specified email address.
208
+ *
209
+ * @param projectId - The ID of the project to delete the invite for.
210
+ * @param email - The email address of the invite to delete.
211
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/invites/:email".
212
+ * @returns A promise that resolves to an object containing a null result and an error object if an error occurred.
213
+ * @see https://developers.deepgram.com/reference/delete-invite
214
+ */
215
+ deleteProjectInvite(projectId: string, email: string, endpoint?: string): Promise<VoidResponse>;
216
+ /**
217
+ * Leaves the specified project.
218
+ *
219
+ * @param projectId - The ID of the project to leave.
220
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/leave".
221
+ * @returns A promise that resolves to an object containing a null result and an error object if an error occurred.
222
+ * @see https://developers.deepgram.com/reference/leave-project
223
+ */
224
+ leaveProject(projectId: string, endpoint?: string): Promise<DeepgramResponse<MessageResponse>>;
225
+ /**
226
+ * Retrieves a list of usage requests for the specified project.
227
+ *
228
+ * @param projectId - The ID of the project to retrieve usage requests for.
229
+ * @param options - An object containing options to filter the usage requests, such as pagination parameters.
230
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/requests".
231
+ * @returns A promise that resolves to an object containing the list of usage requests and an error object if an error occurred.
232
+ * @see https://developers.deepgram.com/reference/get-all-requests
233
+ */
234
+ getProjectUsageRequests(projectId: string, options: GetProjectUsageRequestsSchema, endpoint?: string): Promise<DeepgramResponse<GetProjectUsageRequestsResponse>>;
235
+ /**
236
+ * Retrieves the details of a specific usage request for the specified project.
237
+ *
238
+ * @param projectId - The ID of the project to retrieve the usage request for.
239
+ * @param requestId - The ID of the usage request to retrieve.
240
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/requests/:requestId".
241
+ * @returns A promise that resolves to an object containing the usage request details and an error object if an error occurred.
242
+ * @see https://developers.deepgram.com/reference/get-request
243
+ */
244
+ getProjectUsageRequest(projectId: string, requestId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectUsageRequestResponse>>;
245
+ /**
246
+ * Retrieves the usage summary for the specified project.
247
+ *
248
+ * @param projectId - The ID of the project to retrieve the usage summary for.
249
+ * @param options - An object containing optional parameters for the request, such as filters and pagination options.
250
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/usage".
251
+ * @returns A promise that resolves to an object containing the usage summary and an error object if an error occurred.
252
+ * @see https://developers.deepgram.com/reference/get-usage
253
+ */
254
+ getProjectUsageSummary(projectId: string, options: GetProjectUsageSummarySchema, endpoint?: string): Promise<DeepgramResponse<GetProjectUsageSummaryResponse>>;
255
+ /**
256
+ * Retrieves the usage fields for the specified project.
257
+ *
258
+ * @param projectId - The ID of the project to retrieve the usage fields for.
259
+ * @param options - An object containing optional parameters for the request, such as filters and pagination options.
260
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/usage/fields".
261
+ * @returns A promise that resolves to an object containing the usage fields and an error object if an error occurred.
262
+ * @see https://developers.deepgram.com/reference/get-fields
263
+ */
264
+ getProjectUsageFields(projectId: string, options: GetProjectUsageFieldsSchema, endpoint?: string): Promise<DeepgramResponse<GetProjectUsageFieldsResponse>>;
265
+ /**
266
+ * Retrieves the balances for the specified project.
267
+ *
268
+ * @param projectId - The ID of the project to retrieve the balances for.
269
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/balances".
270
+ * @returns A promise that resolves to an object containing the project balances and an error object if an error occurred.
271
+ * @see https://developers.deepgram.com/reference/get-all-balances
272
+ */
273
+ getProjectBalances(projectId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectBalancesResponse>>;
274
+ /**
275
+ * Retrieves the balance for the specified project and balance ID.
276
+ *
277
+ * @param projectId - The ID of the project to retrieve the balance for.
278
+ * @param balanceId - The ID of the balance to retrieve.
279
+ * @param endpoint - The API endpoint to use for the request. Defaults to ":version/projects/:projectId/balances/:balanceId".
280
+ * @returns A promise that resolves to an object containing the project balance and an error object if an error occurred.
281
+ * @see https://developers.deepgram.com/reference/get-balance
282
+ */
283
+ getProjectBalance(projectId: string, balanceId: string, endpoint?: string): Promise<DeepgramResponse<GetProjectBalanceResponse>>;
284
+ }
285
+ export { ManageRestClient as ManageClient };
286
+ //# sourceMappingURL=ManageRestClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManageRestClient.d.ts","sourceRoot":"","sources":["../../../src/packages/ManageRestClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC9B,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,+BAA+B,EAC/B,4BAA4B,EAC5B,8BAA8B,EAC9B,eAAe,EACf,uBAAuB,EACvB,8BAA8B,EAC9B,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG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