@deepgram/sdk 1.2.2 → 1.2.4

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.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ---
11
11
 
12
+ ## [1.2.4]
13
+
14
+ ### Fixed
15
+
16
+ - Getting the list of API keys was returning the wrong type of object. The SDK now returns the correct object type, but also returns what was previously implemented with deprecation notices.
17
+ - The `version` parameter was typed as required for both pre-recorded and live transcription. Changed this to be optional.
18
+
12
19
  ## [1.2.2]
13
20
 
14
21
  ### Updated
@@ -151,7 +158,8 @@ throw an error.
151
158
 
152
159
  ---
153
160
 
154
- [unreleased]: https://github.com/deepgram/node-sdk/compare/1.2.2...HEAD
161
+ [unreleased]: https://github.com/deepgram/node-sdk/compare/1.2.4...HEAD
162
+ [1.2.2]: https://github.com/deepgram/node-sdk/compare/1.2.2...1.2.4
155
163
  [1.2.2]: https://github.com/deepgram/node-sdk/compare/1.2.1...1.2.2
156
164
  [1.2.1]: https://github.com/deepgram/node-sdk/compare/1.2.0...1.2.1
157
165
  [1.2.0]: https://github.com/deepgram/node-sdk/compare/1.1.0...1.2.0
package/README.md CHANGED
@@ -147,5 +147,5 @@ project, let us know! You can either:
147
147
 
148
148
  Check out the Developer Documentation at [https://developers.deepgram.com/](https://developers.deepgram.com/)
149
149
 
150
- [signup]: https://console.deepgram.com?utm_source=node-sdk&utm_content=readme
150
+ [signup]: https://console.deepgram.com/signup?utm_medium=github&utm_source=DEVREL&utm_content=node-sdk
151
151
  [license]: LICENSE.txt
package/dist/keys.js CHANGED
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
14
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
15
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -50,8 +61,17 @@ var Keys = /** @class */ (function () {
50
61
  */
51
62
  Keys.prototype.list = function (projectId) {
52
63
  return __awaiter(this, void 0, void 0, function () {
64
+ var response, output;
53
65
  return __generator(this, function (_a) {
54
- return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, this.apiPath + "/" + projectId + "/keys")];
66
+ switch (_a.label) {
67
+ case 0: return [4 /*yield*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, this.apiPath + "/" + projectId + "/keys")];
68
+ case 1:
69
+ response = _a.sent();
70
+ output = response.api_keys.map(function (apiKey) {
71
+ return __assign(__assign({}, apiKey), apiKey.api_key);
72
+ });
73
+ return [2 /*return*/, { api_keys: output }];
74
+ }
55
75
  });
56
76
  });
57
77
  };
package/dist/keys.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,cAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;;OAGG;IACG,mBAAI,GAAV,UAAW,SAAiB;;;gBAC1B,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACT,IAAI,CAAC,OAAO,SAAI,SAAS,UAAO,CACpC,EAAC;;;KACH;IAED;;;;OAIG;IACG,kBAAG,GAAT,UAAU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EACnC,IAAI,CAAC,SAAS,CAAC;wBACb,OAAO,SAAA;wBACP,MAAM,QAAA;wBACN,eAAe,EACb,OAAO,IAAI,OAAO,CAAC,cAAc;4BAC/B,CAAC,CAAC,OAAO,CAAC,cAAc;4BACxB,CAAC,CAAC,SAAS;wBACf,uBAAuB,EACrB,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;qBACjE,CAAC,CACH,EAAC;;;KACH;IAED;;;;OAIG;IACG,qBAAM,GAAZ,UAAa,SAAiB,EAAE,KAAa;;;gBAC3C,sBAAO,IAAA,sBAAQ,EACb,QAAQ,EACR,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACT,IAAI,CAAC,OAAO,SAAI,SAAS,cAAS,KAAO,CAC7C,EAAC;;;KACH;IACH,WAAC;AAAD,CAAC,AAhGD,IAgGC;AAhGY,oBAAI"}
@@ -1,4 +1,5 @@
1
1
  import { Key } from "./key";
2
+ import { Member } from "./member";
2
3
  /**
3
4
  * Response from the Deepgram API to list keys
4
5
  */
@@ -6,5 +7,44 @@ export declare type KeyResponse = {
6
7
  /**
7
8
  * Array of API keys associated with the project
8
9
  */
9
- api_keys: Array<Key>;
10
+ api_keys: Array<{
11
+ /**
12
+ * Optional member associated with the API key
13
+ */
14
+ member?: Member;
15
+ /**
16
+ * API key
17
+ */
18
+ api_key: Key;
19
+ /**
20
+ * Unique identifier of the key to use in API requests
21
+ * @deprecated This property has moved to api_key.api_key_id and will
22
+ * be removed in future versions.
23
+ */
24
+ api_key_id: string;
25
+ /**
26
+ * API key to send in API requests (Only displayed when first created)
27
+ * @deprecated This property has moved to api_key.key and will
28
+ * be removed in future versions.
29
+ */
30
+ key?: string;
31
+ /**
32
+ * Comment for user reference
33
+ * @deprecated This property has moved to api_key.comment and will
34
+ * be removed in future versions.
35
+ */
36
+ comment: string;
37
+ /**
38
+ * Timestamp of the date/time the key was created
39
+ * @deprecated This property has moved to api_key.created and will
40
+ * be removed in future versions.
41
+ */
42
+ created: string;
43
+ /**
44
+ * Array of scopes assigned to the key
45
+ * @deprecated This property has moved to api_key.scopes and will
46
+ * be removed in future versions.
47
+ */
48
+ scopes: Array<string>;
49
+ }>;
10
50
  };
@@ -16,7 +16,7 @@ export declare type LiveTranscriptionOptions = {
16
16
  * @remarks latest OR <version_id>
17
17
  * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/version
18
18
  */
19
- version: string;
19
+ version?: string;
20
20
  /**
21
21
  * BCP-47 language tag that hints at the primary spoken language.
22
22
  * @default en-US
@@ -1,6 +1,6 @@
1
1
  export declare type Member = {
2
- id: string;
3
- name: string;
4
- scopes: Array<string>;
2
+ member_id: string;
3
+ name?: string;
4
+ scopes?: Array<string>;
5
5
  email: string;
6
6
  };
@@ -16,7 +16,7 @@ export declare type PrerecordedTranscriptionOptions = {
16
16
  * @remarks latest OR <version_id>
17
17
  * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/version
18
18
  */
19
- version: string;
19
+ version?: string;
20
20
  /**
21
21
  * BCP-47 language tag that hints at the primary spoken language.
22
22
  * @default en-US
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepgram/sdk",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "An SDK for the Deepgram automated speech recognition platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "git+https://github.com/deepgram/node-sdk.git"
16
+ "url": "git+https://github.com/deepgram/deepgram-node-sdk.git"
17
17
  },
18
18
  "keywords": [
19
19
  "deepgram",
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "license": "MIT",
29
29
  "bugs": {
30
- "url": "https://github.com/deepgram/node-sdk/issues"
30
+ "url": "https://github.com/deepgram/deepgram-node-sdk/issues"
31
31
  },
32
- "homepage": "https://github.com/deepgram/node-sdk#readme",
32
+ "homepage": "https://github.com/deepgram/deepgram-node-sdk#readme",
33
33
  "devDependencies": {
34
34
  "@types/chai": "^4.2.22",
35
35
  "@types/mocha": "^9.0.0",