@deepgram/sdk 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/dist/browser/index.js +1 -1659
  2. package/dist/index.js +1 -1
  3. package/package.json +9 -6
  4. package/tsconfig-es6.json +16 -0
  5. package/webpack.config.js +21 -1
  6. package/bundle/billing.d.ts +0 -19
  7. package/bundle/billing.js +0 -73
  8. package/bundle/billing.js.map +0 -1
  9. package/bundle/browser/httpFetch.d.ts +0 -1
  10. package/bundle/browser/httpFetch.js +0 -75
  11. package/bundle/browser/httpFetch.js.map +0 -1
  12. package/bundle/browser/index.d.ts +0 -21
  13. package/bundle/browser/index.js +0 -35
  14. package/bundle/browser/index.js.map +0 -1
  15. package/bundle/browser/transcription/index.d.ts +0 -17
  16. package/bundle/browser/transcription/index.js +0 -75
  17. package/bundle/browser/transcription/index.js.map +0 -1
  18. package/bundle/browser/transcription/preRecordedTranscription.d.ts +0 -9
  19. package/bundle/browser/transcription/preRecordedTranscription.js +0 -87
  20. package/bundle/browser/transcription/preRecordedTranscription.js.map +0 -1
  21. package/bundle/constants/defaultOptions.d.ts +0 -6
  22. package/bundle/constants/defaultOptions.js +0 -10
  23. package/bundle/constants/defaultOptions.js.map +0 -1
  24. package/bundle/constants/index.d.ts +0 -1
  25. package/bundle/constants/index.js +0 -18
  26. package/bundle/constants/index.js.map +0 -1
  27. package/bundle/enums/alternatives.d.ts +0 -4
  28. package/bundle/enums/alternatives.js +0 -3
  29. package/bundle/enums/alternatives.js.map +0 -1
  30. package/bundle/enums/connectionState.d.ts +0 -6
  31. package/bundle/enums/connectionState.js +0 -11
  32. package/bundle/enums/connectionState.js.map +0 -1
  33. package/bundle/enums/diarization.d.ts +0 -4
  34. package/bundle/enums/diarization.js +0 -3
  35. package/bundle/enums/diarization.js.map +0 -1
  36. package/bundle/enums/index.d.ts +0 -7
  37. package/bundle/enums/index.js +0 -24
  38. package/bundle/enums/index.js.map +0 -1
  39. package/bundle/enums/liveTranscriptionEvents.d.ts +0 -6
  40. package/bundle/enums/liveTranscriptionEvents.js +0 -3
  41. package/bundle/enums/liveTranscriptionEvents.js.map +0 -1
  42. package/bundle/enums/models.d.ts +0 -5
  43. package/bundle/enums/models.js +0 -3
  44. package/bundle/enums/models.js.map +0 -1
  45. package/bundle/enums/punctuation.d.ts +0 -4
  46. package/bundle/enums/punctuation.js +0 -3
  47. package/bundle/enums/punctuation.js.map +0 -1
  48. package/bundle/enums/searchKind.d.ts +0 -4
  49. package/bundle/enums/searchKind.js +0 -3
  50. package/bundle/enums/searchKind.js.map +0 -1
  51. package/bundle/helpers/index.d.ts +0 -2
  52. package/bundle/helpers/index.js +0 -19
  53. package/bundle/helpers/index.js.map +0 -1
  54. package/bundle/helpers/secondsToTimestamp.d.ts +0 -1
  55. package/bundle/helpers/secondsToTimestamp.js +0 -8
  56. package/bundle/helpers/secondsToTimestamp.js.map +0 -1
  57. package/bundle/helpers/validateOptions.d.ts +0 -1
  58. package/bundle/helpers/validateOptions.js +0 -13
  59. package/bundle/helpers/validateOptions.js.map +0 -1
  60. package/bundle/httpRequest.d.ts +0 -3
  61. package/bundle/httpRequest.js +0 -91
  62. package/bundle/httpRequest.js.map +0 -1
  63. package/bundle/index.d.ts +0 -21
  64. package/bundle/index.js +0 -35
  65. package/bundle/index.js.map +0 -1
  66. package/bundle/invitation.d.ts +0 -30
  67. package/bundle/invitation.js +0 -99
  68. package/bundle/invitation.js.map +0 -1
  69. package/bundle/keys.d.ts +0 -33
  70. package/bundle/keys.js +0 -132
  71. package/bundle/keys.js.map +0 -1
  72. package/bundle/members.d.ts +0 -19
  73. package/bundle/members.js +0 -73
  74. package/bundle/members.js.map +0 -1
  75. package/bundle/projects.d.ts +0 -22
  76. package/bundle/projects.js +0 -82
  77. package/bundle/projects.js.map +0 -1
  78. package/bundle/scopes.d.ts +0 -21
  79. package/bundle/scopes.js +0 -77
  80. package/bundle/scopes.js.map +0 -1
  81. package/bundle/transcription/index.d.ts +0 -18
  82. package/bundle/transcription/index.js +0 -72
  83. package/bundle/transcription/index.js.map +0 -1
  84. package/bundle/transcription/liveTranscription.d.ts +0 -23
  85. package/bundle/transcription/liveTranscription.js +0 -83
  86. package/bundle/transcription/liveTranscription.js.map +0 -1
  87. package/bundle/transcription/preRecordedTranscription.d.ts +0 -8
  88. package/bundle/transcription/preRecordedTranscription.js +0 -114
  89. package/bundle/transcription/preRecordedTranscription.js.map +0 -1
  90. package/bundle/types/balance.d.ts +0 -6
  91. package/bundle/types/balance.js +0 -3
  92. package/bundle/types/balance.js.map +0 -1
  93. package/bundle/types/balanceList.d.ts +0 -4
  94. package/bundle/types/balanceList.js +0 -3
  95. package/bundle/types/balanceList.js.map +0 -1
  96. package/bundle/types/channel.d.ts +0 -25
  97. package/bundle/types/channel.js +0 -3
  98. package/bundle/types/channel.js.map +0 -1
  99. package/bundle/types/createKeyOptions.d.ts +0 -13
  100. package/bundle/types/createKeyOptions.js +0 -3
  101. package/bundle/types/createKeyOptions.js.map +0 -1
  102. package/bundle/types/hit.d.ts +0 -21
  103. package/bundle/types/hit.js +0 -3
  104. package/bundle/types/hit.js.map +0 -1
  105. package/bundle/types/index.d.ts +0 -38
  106. package/bundle/types/index.js +0 -55
  107. package/bundle/types/index.js.map +0 -1
  108. package/bundle/types/invitationList.d.ts +0 -4
  109. package/bundle/types/invitationList.js +0 -3
  110. package/bundle/types/invitationList.js.map +0 -1
  111. package/bundle/types/invitationOptions.d.ts +0 -4
  112. package/bundle/types/invitationOptions.js +0 -3
  113. package/bundle/types/invitationOptions.js.map +0 -1
  114. package/bundle/types/key.d.ts +0 -25
  115. package/bundle/types/key.js +0 -3
  116. package/bundle/types/key.js.map +0 -1
  117. package/bundle/types/keyResponse.d.ts +0 -10
  118. package/bundle/types/keyResponse.js +0 -3
  119. package/bundle/types/keyResponse.js.map +0 -1
  120. package/bundle/types/keyResponseObj.d.ts +0 -42
  121. package/bundle/types/keyResponseObj.js +0 -3
  122. package/bundle/types/keyResponseObj.js.map +0 -1
  123. package/bundle/types/keyword.d.ts +0 -4
  124. package/bundle/types/keyword.js +0 -3
  125. package/bundle/types/keyword.js.map +0 -1
  126. package/bundle/types/liveTranscriptionOptions.d.ts +0 -148
  127. package/bundle/types/liveTranscriptionOptions.js +0 -3
  128. package/bundle/types/liveTranscriptionOptions.js.map +0 -1
  129. package/bundle/types/liveTranscriptionResponse.d.ts +0 -9
  130. package/bundle/types/liveTranscriptionResponse.js +0 -3
  131. package/bundle/types/liveTranscriptionResponse.js.map +0 -1
  132. package/bundle/types/member.d.ts +0 -7
  133. package/bundle/types/member.js +0 -3
  134. package/bundle/types/member.js.map +0 -1
  135. package/bundle/types/memberList.d.ts +0 -4
  136. package/bundle/types/memberList.js +0 -3
  137. package/bundle/types/memberList.js.map +0 -1
  138. package/bundle/types/message.d.ts +0 -3
  139. package/bundle/types/message.js +0 -3
  140. package/bundle/types/message.js.map +0 -1
  141. package/bundle/types/metadata.d.ts +0 -8
  142. package/bundle/types/metadata.js +0 -3
  143. package/bundle/types/metadata.js.map +0 -1
  144. package/bundle/types/prerecordedTranscriptionOptions.d.ts +0 -126
  145. package/bundle/types/prerecordedTranscriptionOptions.js +0 -3
  146. package/bundle/types/prerecordedTranscriptionOptions.js.map +0 -1
  147. package/bundle/types/prerecordedTranscriptionResponse.d.ts +0 -25
  148. package/bundle/types/prerecordedTranscriptionResponse.js +0 -51
  149. package/bundle/types/prerecordedTranscriptionResponse.js.map +0 -1
  150. package/bundle/types/project.d.ts +0 -17
  151. package/bundle/types/project.js +0 -3
  152. package/bundle/types/project.js.map +0 -1
  153. package/bundle/types/projectPatchRequest.d.ts +0 -4
  154. package/bundle/types/projectPatchRequest.js +0 -3
  155. package/bundle/types/projectPatchRequest.js.map +0 -1
  156. package/bundle/types/projectPatchResponse.d.ts +0 -6
  157. package/bundle/types/projectPatchResponse.js +0 -3
  158. package/bundle/types/projectPatchResponse.js.map +0 -1
  159. package/bundle/types/projectResponse.d.ts +0 -4
  160. package/bundle/types/projectResponse.js +0 -3
  161. package/bundle/types/projectResponse.js.map +0 -1
  162. package/bundle/types/requestFunction.d.ts +0 -5
  163. package/bundle/types/requestFunction.js +0 -3
  164. package/bundle/types/requestFunction.js.map +0 -1
  165. package/bundle/types/scopeList.d.ts +0 -3
  166. package/bundle/types/scopeList.js +0 -3
  167. package/bundle/types/scopeList.js.map +0 -1
  168. package/bundle/types/search.d.ts +0 -14
  169. package/bundle/types/search.js +0 -3
  170. package/bundle/types/search.js.map +0 -1
  171. package/bundle/types/transcriptionSource.d.ts +0 -14
  172. package/bundle/types/transcriptionSource.js +0 -3
  173. package/bundle/types/transcriptionSource.js.map +0 -1
  174. package/bundle/types/usageCallback.d.ts +0 -4
  175. package/bundle/types/usageCallback.js +0 -3
  176. package/bundle/types/usageCallback.js.map +0 -1
  177. package/bundle/types/usageField.d.ts +0 -7
  178. package/bundle/types/usageField.js +0 -3
  179. package/bundle/types/usageField.js.map +0 -1
  180. package/bundle/types/usageFieldOptions.d.ts +0 -4
  181. package/bundle/types/usageFieldOptions.js +0 -3
  182. package/bundle/types/usageFieldOptions.js.map +0 -1
  183. package/bundle/types/usageOptions.d.ts +0 -23
  184. package/bundle/types/usageOptions.js +0 -3
  185. package/bundle/types/usageOptions.js.map +0 -1
  186. package/bundle/types/usageRequest.d.ts +0 -11
  187. package/bundle/types/usageRequest.js +0 -3
  188. package/bundle/types/usageRequest.js.map +0 -1
  189. package/bundle/types/usageRequestDetail.d.ts +0 -30
  190. package/bundle/types/usageRequestDetail.js +0 -3
  191. package/bundle/types/usageRequestDetail.js.map +0 -1
  192. package/bundle/types/usageRequestList.d.ts +0 -6
  193. package/bundle/types/usageRequestList.js +0 -3
  194. package/bundle/types/usageRequestList.js.map +0 -1
  195. package/bundle/types/usageRequestListOptions.d.ts +0 -7
  196. package/bundle/types/usageRequestListOptions.js +0 -3
  197. package/bundle/types/usageRequestListOptions.js.map +0 -1
  198. package/bundle/types/usageRequestMessage.d.ts +0 -3
  199. package/bundle/types/usageRequestMessage.js +0 -3
  200. package/bundle/types/usageRequestMessage.js.map +0 -1
  201. package/bundle/types/usageResponse.d.ts +0 -10
  202. package/bundle/types/usageResponse.js +0 -3
  203. package/bundle/types/usageResponse.js.map +0 -1
  204. package/bundle/types/usageResponseDetail.d.ts +0 -6
  205. package/bundle/types/usageResponseDetail.js +0 -3
  206. package/bundle/types/usageResponseDetail.js.map +0 -1
  207. package/bundle/types/utterance.d.ts +0 -39
  208. package/bundle/types/utterance.js +0 -3
  209. package/bundle/types/utterance.js.map +0 -1
  210. package/bundle/types/wordBase.d.ts +0 -8
  211. package/bundle/types/wordBase.js +0 -3
  212. package/bundle/types/wordBase.js.map +0 -1
  213. package/bundle/usage.d.ts +0 -35
  214. package/bundle/usage.js +0 -122
  215. package/bundle/usage.js.map +0 -1
  216. package/bundle/userAgent.d.ts +0 -1
  217. package/bundle/userAgent.js +0 -20
  218. package/bundle/userAgent.js.map +0 -1
@@ -1,25 +0,0 @@
1
- import { Metadata } from "./metadata";
2
- import { Channel } from "./channel";
3
- import { Utterance } from "./utterance";
4
- export declare class PrerecordedTranscriptionResponse {
5
- request_id?: string;
6
- metadata?: Metadata;
7
- results?: {
8
- channels: Array<Channel>;
9
- utterances?: Array<Utterance>;
10
- };
11
- /**
12
- * Converts the transcription to the WebVTT format
13
- * @remarks In order to translate the transcription to WebVTT, the utterances
14
- * feature must be used.
15
- * @returns A string with the transcription in the WebVTT format
16
- */
17
- toWebVTT(): string;
18
- /**
19
- * Converts the transcription to the SRT format
20
- * @remarks In order to translate the transcription to SRT, the utterances
21
- * feature must be used.
22
- * @returns A string with the transcription in the SRT format
23
- */
24
- toSRT(): string;
25
- }
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrerecordedTranscriptionResponse = void 0;
4
- var helpers_1 = require("../helpers");
5
- var PrerecordedTranscriptionResponse = /** @class */ (function () {
6
- function PrerecordedTranscriptionResponse() {
7
- }
8
- /**
9
- * Converts the transcription to the WebVTT format
10
- * @remarks In order to translate the transcription to WebVTT, the utterances
11
- * feature must be used.
12
- * @returns A string with the transcription in the WebVTT format
13
- */
14
- PrerecordedTranscriptionResponse.prototype.toWebVTT = function () {
15
- var _a, _b, _c, _d;
16
- if (!this.results || !this.results.utterances) {
17
- throw new Error("This function requires a transcript that was generated with the utterances feature.");
18
- }
19
- var webVTT = "WEBVTT\n\n";
20
- webVTT += "NOTE\nTranscription provided by Deepgram\nRequest Id: ".concat((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.request_id, "\nCreated: ").concat((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.created, "\nDuration: ").concat((_c = this.metadata) === null || _c === void 0 ? void 0 : _c.duration, "\nChannels: ").concat((_d = this.metadata) === null || _d === void 0 ? void 0 : _d.channels, "\n\n");
21
- for (var i = 0; i < this.results.utterances.length; i++) {
22
- var utterance = this.results.utterances[i];
23
- var start = (0, helpers_1.secondsToTimestamp)(utterance.start);
24
- var end = (0, helpers_1.secondsToTimestamp)(utterance.end);
25
- webVTT += "".concat(i + 1, "\n").concat(start, " --> ").concat(end, "\n- ").concat(utterance.transcript, "\n\n");
26
- }
27
- return webVTT;
28
- };
29
- /**
30
- * Converts the transcription to the SRT format
31
- * @remarks In order to translate the transcription to SRT, the utterances
32
- * feature must be used.
33
- * @returns A string with the transcription in the SRT format
34
- */
35
- PrerecordedTranscriptionResponse.prototype.toSRT = function () {
36
- if (!this.results || !this.results.utterances) {
37
- throw new Error("This function requires a transcript that was generated with the utterances feature.");
38
- }
39
- var srt = "";
40
- for (var i = 0; i < this.results.utterances.length; i++) {
41
- var utterance = this.results.utterances[i];
42
- var start = (0, helpers_1.secondsToTimestamp)(utterance.start).replace(".", ",");
43
- var end = (0, helpers_1.secondsToTimestamp)(utterance.end).replace(".", ",");
44
- srt += "".concat(i + 1, "\n").concat(start, " --> ").concat(end, "\n").concat(utterance.transcript, "\n\n");
45
- }
46
- return srt;
47
- };
48
- return PrerecordedTranscriptionResponse;
49
- }());
50
- exports.PrerecordedTranscriptionResponse = PrerecordedTranscriptionResponse;
51
- //# sourceMappingURL=prerecordedTranscriptionResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prerecordedTranscriptionResponse.js","sourceRoot":"","sources":["../../src/types/prerecordedTranscriptionResponse.ts"],"names":[],"mappings":";;;AAGA,sCAAgD;AAEhD;IAAA;IA2DA,CAAC;IAnDC;;;;;OAKG;IACI,mDAAQ,GAAf;;QACE,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC7C,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAC;SACH;QAED,IAAI,MAAM,GAAG,YAAY,CAAC;QAE1B,MAAM,IAAI,gEAAyD,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,wBAAc,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,yBAAe,MAAA,IAAI,CAAC,QAAQ,0CAAE,QAAQ,yBAAe,MAAA,IAAI,CAAC,QAAQ,0CAAE,QAAQ,SAAM,CAAC;QAEnN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvD,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAM,KAAK,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAClD,IAAM,GAAG,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC9C,MAAM,IAAI,UAAG,CAAC,GAAG,CAAC,eAAK,KAAK,kBAAQ,GAAG,iBAAO,SAAS,CAAC,UAAU,SAAM,CAAC;SAC1E;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACI,gDAAK,GAAZ;QACE,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC7C,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAC;SACH;QAED,IAAI,GAAG,GAAG,EAAE,CAAC;QAEb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvD,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAM,KAAK,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACpE,IAAM,GAAG,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAChE,GAAG,IAAI,UAAG,CAAC,GAAG,CAAC,eAAK,KAAK,kBAAQ,GAAG,eAAK,SAAS,CAAC,UAAU,SAAM,CAAC;SACrE;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IACH,uCAAC;AAAD,CAAC,AA3DD,IA2DC;AA3DY,4EAAgC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Deepgram project
3
- */
4
- export declare type Project = {
5
- /**
6
- * Unique identifier of the project
7
- */
8
- project_id: string;
9
- /**
10
- * User provided name of the project
11
- */
12
- name?: string;
13
- /**
14
- * Name of the company associated with the project. Optional.
15
- */
16
- company?: string;
17
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=project.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare type ProjectPatchRequest = {
2
- name?: string;
3
- company?: string;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=projectPatchRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projectPatchRequest.js","sourceRoot":"","sources":["../../src/types/projectPatchRequest.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- export declare type ProjectPatchResponse = {
2
- /**
3
- * Success message.
4
- */
5
- message: string;
6
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=projectPatchResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projectPatchResponse.js","sourceRoot":"","sources":["../../src/types/projectPatchResponse.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { Project } from "./project";
2
- export declare type ProjectResponse = {
3
- projects: Array<Project>;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=projectResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projectResponse.js","sourceRoot":"","sources":["../../src/types/projectResponse.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- /// <reference types="node" />
2
- import { ReadStream } from "fs";
3
- export declare type RequestFunction = NodeRequest | BrowserRequest;
4
- export declare type NodeRequest = (method: string, api_key: string, apiUrl: string, path: string, payload?: string | Buffer | ReadStream, options?: Object) => Promise<any>;
5
- export declare type BrowserRequest = (method: string, api_key: string, apiUrl: string, path: string, payload?: string) => Promise<any>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=requestFunction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requestFunction.js","sourceRoot":"","sources":["../../src/types/requestFunction.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export declare type ScopeList = {
2
- scopes: Array<string>;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=scopeList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scopeList.js","sourceRoot":"","sources":["../../src/types/scopeList.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- import { Hit } from "./hit";
2
- /**
3
- * Search result for a transcription
4
- */
5
- export declare type Search = {
6
- /**
7
- * Term for which Deepgram is searching.
8
- */
9
- query: string;
10
- /**
11
- * Instances of query found in transcript
12
- */
13
- hits: Array<Hit>;
14
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/types/search.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- /// <reference types="node" />
2
- import { ReadStream } from "fs";
3
- export declare type TranscriptionSource = UrlSource | BufferSource | ReadStreamSource;
4
- export declare type ReadStreamSource = {
5
- stream: ReadStream;
6
- mimetype: string;
7
- };
8
- export declare type UrlSource = {
9
- url: string;
10
- };
11
- export declare type BufferSource = {
12
- buffer: Buffer;
13
- mimetype: string;
14
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=transcriptionSource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transcriptionSource.js","sourceRoot":"","sources":["../../src/types/transcriptionSource.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare type UsageCallback = {
2
- code: number;
3
- completed: string;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageCallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageCallback.js","sourceRoot":"","sources":["../../src/types/usageCallback.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export declare type UsageField = {
2
- tags: Array<string>;
3
- models: Array<string>;
4
- processing_methods: Array<string>;
5
- languages: Array<string>;
6
- features: Array<string>;
7
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageField.js","sourceRoot":"","sources":["../../src/types/usageField.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare type UsageFieldOptions = {
2
- start?: string;
3
- end?: string;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageFieldOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageFieldOptions.js","sourceRoot":"","sources":["../../src/types/usageFieldOptions.ts"],"names":[],"mappings":""}
@@ -1,23 +0,0 @@
1
- export declare type UsageOptions = {
2
- start?: string;
3
- end?: string;
4
- accessor?: string;
5
- tag?: Array<string>;
6
- method?: "sync" | "async" | "streaming";
7
- model?: string;
8
- multichannel?: boolean;
9
- interim_results?: boolean;
10
- punctuate?: boolean;
11
- ner?: boolean;
12
- utterances?: boolean;
13
- replace?: boolean;
14
- profanity_filter?: boolean;
15
- keywords?: boolean;
16
- sentiment?: boolean;
17
- diarize?: boolean;
18
- detect_language?: boolean;
19
- search?: boolean;
20
- redact?: boolean;
21
- alternatives?: boolean;
22
- numerals?: boolean;
23
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageOptions.js","sourceRoot":"","sources":["../../src/types/usageOptions.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- import { UsageCallback } from "./usageCallback";
2
- import { UsageRequestDetail } from "./usageRequestDetail";
3
- import { UsageRequestMessage } from "./usageRequestMessage";
4
- export declare type UsageRequest = {
5
- request_id: string;
6
- created: string;
7
- path: string;
8
- accessor: string;
9
- response?: UsageRequestDetail | UsageRequestMessage;
10
- callback?: UsageCallback;
11
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageRequest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageRequest.js","sourceRoot":"","sources":["../../src/types/usageRequest.ts"],"names":[],"mappings":""}
@@ -1,30 +0,0 @@
1
- export declare type UsageRequestDetail = {
2
- details: {
3
- usd: number;
4
- duration: number;
5
- total_audio: number;
6
- channels: number;
7
- streams: number;
8
- model: string;
9
- method: "sync" | "async" | "streaming";
10
- tags: Array<string>;
11
- features: Array<string>;
12
- config: {
13
- multichannel?: boolean;
14
- interim_results?: boolean;
15
- punctuate?: boolean;
16
- ner?: boolean;
17
- utterances?: boolean;
18
- replace?: boolean;
19
- profanity_filter?: boolean;
20
- keywords?: boolean;
21
- sentiment?: boolean;
22
- diarize?: boolean;
23
- detect_language?: boolean;
24
- search?: boolean;
25
- redact?: boolean;
26
- alternatives?: boolean;
27
- numerals?: boolean;
28
- };
29
- };
30
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageRequestDetail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageRequestDetail.js","sourceRoot":"","sources":["../../src/types/usageRequestDetail.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- import { UsageRequest } from "./usageRequest";
2
- export declare type UsageRequestList = {
3
- page: number;
4
- limit: number;
5
- requests?: Array<UsageRequest>;
6
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageRequestList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageRequestList.js","sourceRoot":"","sources":["../../src/types/usageRequestList.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export declare type UsageRequestListOptions = {
2
- start?: string;
3
- end?: string;
4
- page?: number;
5
- limit?: number;
6
- status?: "succeeded" | "failed";
7
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageRequestListOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageRequestListOptions.js","sourceRoot":"","sources":["../../src/types/usageRequestListOptions.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export declare type UsageRequestMessage = {
2
- message?: string;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageRequestMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageRequestMessage.js","sourceRoot":"","sources":["../../src/types/usageRequestMessage.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import { UsageResponseDetail } from "./usageResponseDetail";
2
- export declare type UsageResponse = {
3
- start: string;
4
- end: string;
5
- resolution: {
6
- units: string;
7
- amount: number;
8
- };
9
- results: Array<UsageResponseDetail>;
10
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageResponse.js","sourceRoot":"","sources":["../../src/types/usageResponse.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- export declare type UsageResponseDetail = {
2
- start: string;
3
- end: string;
4
- hours: number;
5
- requests: number;
6
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=usageResponseDetail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usageResponseDetail.js","sourceRoot":"","sources":["../../src/types/usageResponseDetail.ts"],"names":[],"mappings":""}
@@ -1,39 +0,0 @@
1
- import { WordBase } from "./wordBase";
2
- export declare type Utterance = {
3
- /**
4
- * Start time (in seconds) from the beginning of the audio stream.
5
- */
6
- start: number;
7
- /**
8
- * End time (in seconds) from the beginning of the audio stream.
9
- */
10
- end: number;
11
- /**
12
- * Floating point value between 0 and 1 that indicates overall transcript
13
- * reliability. Larger values indicate higher confidence.
14
- */
15
- confidence: number;
16
- /**
17
- * Audio channel to which the utterance belongs. When using multichannel audio,
18
- * utterances are chronologically ordered by channel.
19
- */
20
- channel: number;
21
- /**
22
- * Transcript for the audio segment being processed.
23
- */
24
- transcript: string;
25
- /**
26
- * Object containing each word in the transcript, along with its start time
27
- * and end time (in seconds) from the beginning of the audio stream, and a confidence value.
28
- */
29
- words: Array<WordBase>;
30
- /**
31
- * Integer indicating the predicted speaker of the majority of words
32
- * in the utterance who is saying the words being processed.
33
- */
34
- speaker?: number;
35
- /**
36
- * Unique identifier of the utterance
37
- */
38
- id: string;
39
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=utterance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utterance.js","sourceRoot":"","sources":["../../src/types/utterance.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export declare type WordBase = {
2
- word: string;
3
- start: number;
4
- end: number;
5
- confidence: number;
6
- punctuated_word?: string;
7
- speaker?: number;
8
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=wordBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wordBase.js","sourceRoot":"","sources":["../../src/types/wordBase.ts"],"names":[],"mappings":""}
package/bundle/usage.d.ts DELETED
@@ -1,35 +0,0 @@
1
- import { RequestFunction, UsageField, UsageFieldOptions, UsageOptions, UsageRequest, UsageRequestList, UsageRequestListOptions, UsageResponse } from "./types";
2
- export declare class Usage {
3
- private _credentials;
4
- private _apiUrl;
5
- private _request;
6
- constructor(_credentials: string, _apiUrl: string, _request: RequestFunction);
7
- private apiPath;
8
- /**
9
- * Retrieves all requests associated with the provided projectId based
10
- * on the provided options
11
- * @param projectId Unique identifier of the project
12
- * @param options Additional filter options
13
- */
14
- listRequests(projectId: string, options?: UsageRequestListOptions): Promise<UsageRequestList>;
15
- /**
16
- * Retrieves a specific request associated with the provided projectId
17
- * @param projectId Unique identifier of the project
18
- * @param requestId Unique identifier for the request to retrieve
19
- */
20
- getRequest(projectId: string, requestId: string): Promise<UsageRequest>;
21
- /**
22
- * Retrieves usage associated with the provided projectId based
23
- * on the provided options
24
- * @param projectId Unique identifier of the project
25
- * @param options Options to filter usage
26
- */
27
- getUsage(projectId: string, options?: UsageOptions): Promise<UsageResponse>;
28
- /**
29
- * Retrieves features used by the provided projectId based
30
- * on the provided options
31
- * @param projectId Unique identifier of the project
32
- * @param options Options to filter usage
33
- */
34
- getFields(projectId: string, options?: UsageFieldOptions): Promise<UsageField>;
35
- }