@deepgram/sdk 1.0.1 → 1.2.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 (45) hide show
  1. package/CHANGELOG.md +89 -1
  2. package/README.md +41 -734
  3. package/dist/helpers/index.d.ts +1 -0
  4. package/dist/helpers/index.js +14 -0
  5. package/dist/helpers/index.js.map +1 -0
  6. package/dist/helpers/secondsToTimestamp.d.ts +1 -0
  7. package/dist/helpers/secondsToTimestamp.js +8 -0
  8. package/dist/helpers/secondsToTimestamp.js.map +1 -0
  9. package/dist/httpRequest.d.ts +2 -1
  10. package/dist/httpRequest.js +22 -13
  11. package/dist/httpRequest.js.map +1 -1
  12. package/dist/keys.d.ts +3 -2
  13. package/dist/keys.js +19 -5
  14. package/dist/keys.js.map +1 -1
  15. package/dist/projects.d.ts +6 -1
  16. package/dist/projects.js +13 -2
  17. package/dist/projects.js.map +1 -1
  18. package/dist/transcription/index.js +1 -1
  19. package/dist/transcription/index.js.map +1 -1
  20. package/dist/transcription/liveTranscription.js +1 -1
  21. package/dist/transcription/liveTranscription.js.map +1 -1
  22. package/dist/transcription/preRecordedTranscription.js +35 -10
  23. package/dist/transcription/preRecordedTranscription.js.map +1 -1
  24. package/dist/types/createKeyOptions.d.ts +13 -0
  25. package/dist/types/createKeyOptions.js +3 -0
  26. package/dist/types/createKeyOptions.js.map +1 -0
  27. package/dist/types/index.d.ts +3 -0
  28. package/dist/types/index.js +3 -0
  29. package/dist/types/index.js.map +1 -1
  30. package/dist/types/key.d.ts +2 -2
  31. package/dist/types/prerecordedTranscriptionResponse.d.ts +18 -2
  32. package/dist/types/prerecordedTranscriptionResponse.js +48 -0
  33. package/dist/types/prerecordedTranscriptionResponse.js.map +1 -1
  34. package/dist/types/project.d.ts +6 -2
  35. package/dist/types/projectPatchResponse.d.ts +6 -0
  36. package/dist/types/projectPatchResponse.js +3 -0
  37. package/dist/types/projectPatchResponse.js.map +1 -0
  38. package/dist/types/transcriptionSource.d.ts +6 -1
  39. package/dist/types/usageRequest.d.ts +1 -1
  40. package/dist/types/utterance.d.ts +38 -0
  41. package/dist/types/utterance.js +3 -0
  42. package/dist/types/utterance.js.map +1 -0
  43. package/dist/usage.js +4 -4
  44. package/dist/usage.js.map +1 -1
  45. package/package.json +18 -18
package/CHANGELOG.md CHANGED
@@ -9,6 +9,91 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ---
11
11
 
12
+ ## [1.2.0]
13
+
14
+ ### Updated
15
+
16
+ - Updated the `keys.create` function to allow new `expirationDate` or `timeToLive`
17
+ values. These are optional and one at most can be provided. Providing both will
18
+ throw an error.
19
+
20
+ ## [1.1.0]
21
+
22
+ ### Added
23
+
24
+ - Prerecorded transcription responses can now be used to generate WebVTT and
25
+ SRT caption files. Example:
26
+
27
+ ```js
28
+ const response = await deepgram.transcription.preRecorded(
29
+ { url: "URL_TO_FILE" },
30
+ {
31
+ punctuate: true,
32
+ utterances: true,
33
+ }
34
+ );
35
+ const webVTT = response.toWebVTT();
36
+ const SRT = response.toSRT();
37
+ ```
38
+
39
+ The [utterances](https://developers.deepgram.com/documentation/features/utterances/)
40
+ feature is required to use this functionality.
41
+
42
+ ## [1.0.3]
43
+
44
+ ### Added
45
+
46
+ - In addition to a Url and Buffer, `trascricription.preRecorded` now accepts a
47
+ ReadStream as a source of the file to transcribe.
48
+
49
+ ### Updated
50
+
51
+ - Removed a console log that occurred when an HTTP request ended
52
+
53
+ ## [1.0.2]
54
+
55
+ ### Added
56
+
57
+ - `deepgram.projects.update` will now update a project
58
+ - Prerecorded transcription responses now include utterances
59
+
60
+ ### Updated
61
+
62
+ - The project type has been modified to the following:
63
+
64
+ ```ts
65
+ {
66
+ project_id: string;
67
+ name?: string;
68
+ company?: string;
69
+ };
70
+ ```
71
+
72
+ - The key type has been modified to the following:
73
+
74
+ ```ts
75
+ {
76
+ api_key_id: string;
77
+ key?: string;
78
+ comment: string;
79
+ created: string;
80
+ scopes: Array<string>;
81
+ };
82
+ ```
83
+
84
+ - The usage request type has been modified to the following:
85
+
86
+ ```ts
87
+ {
88
+ request_id: string;
89
+ created: string;
90
+ path: string;
91
+ accessor: string;
92
+ response?: UsageRequestDetail | UsageRequestMessage;
93
+ callback?: UsageCallback;
94
+ };
95
+ ```
96
+
12
97
  ## [1.0.0]
13
98
 
14
99
  ### Added
@@ -52,7 +137,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
52
137
 
53
138
  ---
54
139
 
55
- [unreleased]: https://github.com/deepgram/node-sdk/compare/1.0.0...HEAD
140
+ [unreleased]: https://github.com/deepgram/node-sdk/compare/1.1.0...HEAD
141
+ [1.1.0]: https://github.com/deepgram/node-sdk/compare/1.0.3...1.1.0
142
+ [1.0.3]: https://github.com/deepgram/node-sdk/compare/1.0.2...1.0.3
143
+ [1.0.2]: https://github.com/deepgram/node-sdk/compare/1.0.0...1.0.2
56
144
  [1.0.0]: https://github.com/deepgram/node-sdk/compare/0.6.5...1.0.0
57
145
  [0.6.5]: https://github.com/deepgram/node-sdk/compare/0.6.4...0.6.5
58
146
  [0.6.4]: https://github.com/deepgram/node-sdk/compare/edc07b4...0.6.4