@deepgram/sdk 1.3.0 → 1.3.1-beta
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/.devcontainer/Dockerfile +16 -0
- package/.devcontainer/devcontainer.json +29 -0
- package/CHANGELOG.md +196 -190
- package/CODE_OF_CONDUCT.md +127 -127
- package/CONTRIBUTING.md +50 -50
- package/LICENSE +21 -21
- package/README.md +151 -151
- package/dist/billing.d.ts +18 -18
- package/dist/billing.js +72 -72
- package/dist/billing.js.map +1 -1
- package/dist/constants/defaultOptions.d.ts +6 -6
- package/dist/constants/defaultOptions.js +9 -9
- package/dist/constants/defaultOptions.js.map +0 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +17 -13
- package/dist/constants/index.js.map +1 -1
- package/dist/enums/alternatives.d.ts +4 -4
- package/dist/enums/alternatives.js +2 -2
- package/dist/enums/alternatives.js.map +0 -0
- package/dist/enums/connectionState.d.ts +6 -6
- package/dist/enums/connectionState.js +10 -10
- package/dist/enums/connectionState.js.map +0 -0
- package/dist/enums/diarization.d.ts +4 -4
- package/dist/enums/diarization.js +2 -2
- package/dist/enums/diarization.js.map +0 -0
- package/dist/enums/index.d.ts +7 -7
- package/dist/enums/index.js +23 -19
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/liveTranscriptionEvents.d.ts +6 -6
- package/dist/enums/liveTranscriptionEvents.js +2 -2
- package/dist/enums/liveTranscriptionEvents.js.map +0 -0
- package/dist/enums/models.d.ts +5 -5
- package/dist/enums/models.js +2 -2
- package/dist/enums/models.js.map +0 -0
- package/dist/enums/punctuation.d.ts +4 -4
- package/dist/enums/punctuation.js +2 -2
- package/dist/enums/punctuation.js.map +0 -0
- package/dist/enums/searchKind.d.ts +4 -4
- package/dist/enums/searchKind.js +2 -2
- package/dist/enums/searchKind.js.map +0 -0
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +17 -13
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/secondsToTimestamp.d.ts +1 -1
- package/dist/helpers/secondsToTimestamp.js +7 -7
- package/dist/helpers/secondsToTimestamp.js.map +0 -0
- package/dist/httpRequest.d.ts +3 -3
- package/dist/httpRequest.js +90 -90
- package/dist/httpRequest.js.map +1 -1
- package/dist/index.d.ts +25 -25
- package/dist/index.js +40 -40
- package/dist/index.js.map +0 -0
- package/dist/invitation.d.ts +29 -29
- package/dist/invitation.js +98 -98
- package/dist/invitation.js.map +1 -1
- package/dist/keys.d.ts +32 -32
- package/dist/keys.js +131 -131
- package/dist/keys.js.map +1 -1
- package/dist/members.d.ts +18 -18
- package/dist/members.js +72 -72
- package/dist/members.js.map +1 -1
- package/dist/projects.d.ts +21 -21
- package/dist/projects.js +81 -81
- package/dist/projects.js.map +1 -1
- package/dist/scopes.d.ts +20 -20
- package/dist/scopes.js +76 -76
- package/dist/scopes.js.map +1 -1
- package/dist/transcription/index.d.ts +18 -18
- package/dist/transcription/index.js +71 -71
- package/dist/transcription/index.js.map +0 -0
- package/dist/transcription/liveTranscription.d.ts +23 -23
- package/dist/transcription/liveTranscription.js +82 -82
- package/dist/transcription/liveTranscription.js.map +1 -1
- package/dist/transcription/preRecordedTranscription.d.ts +8 -8
- package/dist/transcription/preRecordedTranscription.js +113 -113
- package/dist/transcription/preRecordedTranscription.js.map +1 -1
- package/dist/types/balance.d.ts +6 -6
- package/dist/types/balance.js +2 -2
- package/dist/types/balance.js.map +0 -0
- package/dist/types/balanceList.d.ts +4 -4
- package/dist/types/balanceList.js +2 -2
- package/dist/types/balanceList.js.map +0 -0
- package/dist/types/channel.d.ts +25 -25
- package/dist/types/channel.js +2 -2
- package/dist/types/channel.js.map +0 -0
- package/dist/types/createKeyOptions.d.ts +13 -13
- package/dist/types/createKeyOptions.js +2 -2
- package/dist/types/createKeyOptions.js.map +0 -0
- package/dist/types/hit.d.ts +21 -21
- package/dist/types/hit.js +2 -2
- package/dist/types/hit.js.map +0 -0
- package/dist/types/index.d.ts +35 -35
- package/dist/types/index.js +51 -47
- package/dist/types/index.js.map +1 -1
- package/dist/types/invitationList.d.ts +4 -4
- package/dist/types/invitationList.js +2 -2
- package/dist/types/invitationList.js.map +0 -0
- package/dist/types/invitationOptions.d.ts +4 -4
- package/dist/types/invitationOptions.js +2 -2
- package/dist/types/invitationOptions.js.map +0 -0
- package/dist/types/key.d.ts +25 -25
- package/dist/types/key.js +2 -2
- package/dist/types/key.js.map +0 -0
- package/dist/types/keyResponse.d.ts +50 -50
- package/dist/types/keyResponse.js +2 -2
- package/dist/types/keyResponse.js.map +0 -0
- package/dist/types/keyword.d.ts +4 -4
- package/dist/types/keyword.js +2 -2
- package/dist/types/keyword.js.map +0 -0
- package/dist/types/liveTranscriptionOptions.d.ts +148 -148
- package/dist/types/liveTranscriptionOptions.js +2 -2
- package/dist/types/liveTranscriptionOptions.js.map +0 -0
- package/dist/types/liveTranscriptionResponse.d.ts +9 -9
- package/dist/types/liveTranscriptionResponse.js +2 -2
- package/dist/types/liveTranscriptionResponse.js.map +0 -0
- package/dist/types/member.d.ts +7 -7
- package/dist/types/member.js +2 -2
- package/dist/types/member.js.map +0 -0
- package/dist/types/memberList.d.ts +4 -4
- package/dist/types/memberList.js +2 -2
- package/dist/types/memberList.js.map +0 -0
- package/dist/types/message.d.ts +3 -3
- package/dist/types/message.js +2 -2
- package/dist/types/message.js.map +0 -0
- package/dist/types/metadata.d.ts +8 -8
- package/dist/types/metadata.js +2 -2
- package/dist/types/metadata.js.map +0 -0
- package/dist/types/prerecordedTranscriptionOptions.d.ts +126 -126
- package/dist/types/prerecordedTranscriptionOptions.js +2 -2
- package/dist/types/prerecordedTranscriptionOptions.js.map +0 -0
- package/dist/types/prerecordedTranscriptionResponse.d.ts +25 -25
- package/dist/types/prerecordedTranscriptionResponse.js +50 -50
- package/dist/types/prerecordedTranscriptionResponse.js.map +1 -1
- package/dist/types/project.d.ts +17 -17
- package/dist/types/project.js +2 -2
- package/dist/types/project.js.map +0 -0
- package/dist/types/projectPatchResponse.d.ts +6 -6
- package/dist/types/projectPatchResponse.js +2 -2
- package/dist/types/projectPatchResponse.js.map +0 -0
- package/dist/types/projectResponse.d.ts +4 -4
- package/dist/types/projectResponse.js +2 -2
- package/dist/types/projectResponse.js.map +0 -0
- package/dist/types/scopeList.d.ts +3 -3
- package/dist/types/scopeList.js +2 -2
- package/dist/types/scopeList.js.map +0 -0
- package/dist/types/search.d.ts +14 -14
- package/dist/types/search.js +2 -2
- package/dist/types/search.js.map +0 -0
- package/dist/types/transcriptionSource.d.ts +14 -14
- package/dist/types/transcriptionSource.js +2 -2
- package/dist/types/transcriptionSource.js.map +0 -0
- package/dist/types/usageCallback.d.ts +4 -4
- package/dist/types/usageCallback.js +2 -2
- package/dist/types/usageCallback.js.map +0 -0
- package/dist/types/usageField.d.ts +7 -7
- package/dist/types/usageField.js +2 -2
- package/dist/types/usageField.js.map +0 -0
- package/dist/types/usageFieldOptions.d.ts +4 -4
- package/dist/types/usageFieldOptions.js +2 -2
- package/dist/types/usageFieldOptions.js.map +0 -0
- package/dist/types/usageOptions.d.ts +23 -23
- package/dist/types/usageOptions.js +2 -2
- package/dist/types/usageOptions.js.map +0 -0
- package/dist/types/usageRequest.d.ts +11 -11
- package/dist/types/usageRequest.js +2 -2
- package/dist/types/usageRequest.js.map +0 -0
- package/dist/types/usageRequestDetail.d.ts +30 -30
- package/dist/types/usageRequestDetail.js +2 -2
- package/dist/types/usageRequestDetail.js.map +0 -0
- package/dist/types/usageRequestList.d.ts +6 -6
- package/dist/types/usageRequestList.js +2 -2
- package/dist/types/usageRequestList.js.map +0 -0
- package/dist/types/usageRequestListOptions.d.ts +7 -7
- package/dist/types/usageRequestListOptions.js +2 -2
- package/dist/types/usageRequestListOptions.js.map +0 -0
- package/dist/types/usageRequestMessage.d.ts +3 -3
- package/dist/types/usageRequestMessage.js +2 -2
- package/dist/types/usageRequestMessage.js.map +0 -0
- package/dist/types/usageResponse.d.ts +10 -10
- package/dist/types/usageResponse.js +2 -2
- package/dist/types/usageResponse.js.map +0 -0
- package/dist/types/usageResponseDetail.d.ts +6 -6
- package/dist/types/usageResponseDetail.js +2 -2
- package/dist/types/usageResponseDetail.js.map +0 -0
- package/dist/types/utterance.d.ts +39 -39
- package/dist/types/utterance.js +2 -2
- package/dist/types/utterance.js.map +0 -0
- package/dist/types/wordBase.d.ts +8 -8
- package/dist/types/wordBase.js +2 -2
- package/dist/types/wordBase.js.map +0 -0
- package/dist/usage.d.ts +34 -34
- package/dist/usage.js +121 -121
- package/dist/usage.js.map +1 -1
- package/dist/userAgent.d.ts +1 -1
- package/dist/userAgent.js +19 -20
- package/dist/userAgent.js.map +1 -1
- package/package.json +59 -57
package/dist/enums/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./alternatives";
|
|
2
|
-
export * from "./connectionState";
|
|
3
|
-
export * from "./diarization";
|
|
4
|
-
export * from "./liveTranscriptionEvents";
|
|
5
|
-
export * from "./models";
|
|
6
|
-
export * from "./punctuation";
|
|
7
|
-
export * from "./searchKind";
|
|
1
|
+
export * from "./alternatives";
|
|
2
|
+
export * from "./connectionState";
|
|
3
|
+
export * from "./diarization";
|
|
4
|
+
export * from "./liveTranscriptionEvents";
|
|
5
|
+
export * from "./models";
|
|
6
|
+
export * from "./punctuation";
|
|
7
|
+
export * from "./searchKind";
|
package/dist/enums/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
__exportStar(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./alternatives"), exports);
|
|
18
|
+
__exportStar(require("./connectionState"), exports);
|
|
19
|
+
__exportStar(require("./diarization"), exports);
|
|
20
|
+
__exportStar(require("./liveTranscriptionEvents"), exports);
|
|
21
|
+
__exportStar(require("./models"), exports);
|
|
22
|
+
__exportStar(require("./punctuation"), exports);
|
|
23
|
+
__exportStar(require("./searchKind"), exports);
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
package/dist/enums/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,oDAAkC;AAClC,gDAA8B;AAC9B,4DAA0C;AAC1C,2CAAyB;AACzB,gDAA8B;AAC9B,+CAA6B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const enum LiveTranscriptionEvents {
|
|
2
|
-
Open = "open",
|
|
3
|
-
Close = "close",
|
|
4
|
-
TranscriptReceived = "transcriptReceived",
|
|
5
|
-
Error = "error"
|
|
6
|
-
}
|
|
1
|
+
export declare const enum LiveTranscriptionEvents {
|
|
2
|
+
Open = "open",
|
|
3
|
+
Close = "close",
|
|
4
|
+
TranscriptReceived = "transcriptReceived",
|
|
5
|
+
Error = "error"
|
|
6
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=liveTranscriptionEvents.js.map
|
|
File without changes
|
package/dist/enums/models.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const enum Models {
|
|
2
|
-
General = "general",
|
|
3
|
-
Meeting = "meeting",
|
|
4
|
-
PhoneCall = "phonecall"
|
|
5
|
-
}
|
|
1
|
+
export declare const enum Models {
|
|
2
|
+
General = "general",
|
|
3
|
+
Meeting = "meeting",
|
|
4
|
+
PhoneCall = "phonecall"
|
|
5
|
+
}
|
package/dist/enums/models.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=models.js.map
|
package/dist/enums/models.js.map
CHANGED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const enum Punctuation {
|
|
2
|
-
NonPunctuated = "non-punctuated",
|
|
3
|
-
Punctuated = "punctuated"
|
|
4
|
-
}
|
|
1
|
+
export declare const enum Punctuation {
|
|
2
|
+
NonPunctuated = "non-punctuated",
|
|
3
|
+
Punctuated = "punctuated"
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=punctuation.js.map
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const enum SearchKind {
|
|
2
|
-
NoSearch = "no-search",
|
|
3
|
-
WithSearch = "with-search"
|
|
4
|
-
}
|
|
1
|
+
export declare const enum SearchKind {
|
|
2
|
+
NoSearch = "no-search",
|
|
3
|
+
WithSearch = "with-search"
|
|
4
|
+
}
|
package/dist/enums/searchKind.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=searchKind.js.map
|
|
File without changes
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./secondsToTimestamp";
|
|
1
|
+
export * from "./secondsToTimestamp";
|
package/dist/helpers/index.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
__exportStar(
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./secondsToTimestamp"), exports);
|
|
14
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function secondsToTimestamp(seconds: number): string;
|
|
1
|
+
export declare function secondsToTimestamp(seconds: number): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.secondsToTimestamp = void 0;
|
|
4
|
-
function secondsToTimestamp(seconds) {
|
|
5
|
-
return new Date(seconds * 1000).toISOString().substr(11, 12);
|
|
6
|
-
}
|
|
7
|
-
exports.secondsToTimestamp = secondsToTimestamp;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.secondsToTimestamp = void 0;
|
|
4
|
+
function secondsToTimestamp(seconds) {
|
|
5
|
+
return new Date(seconds * 1000).toISOString().substr(11, 12);
|
|
6
|
+
}
|
|
7
|
+
exports.secondsToTimestamp = secondsToTimestamp;
|
|
8
8
|
//# sourceMappingURL=secondsToTimestamp.js.map
|
|
File without changes
|
package/dist/httpRequest.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ReadStream } from "fs";
|
|
3
|
-
export declare function _request<T>(method: string, api_key: string, apiUrl: string, path: string, payload?: string | Buffer | ReadStream, options?: Object): Promise<T>;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { ReadStream } from "fs";
|
|
3
|
+
export declare function _request<T>(method: string, api_key: string, apiUrl: string, path: string, payload?: string | Buffer | ReadStream, options?: Object): Promise<T>;
|
package/dist/httpRequest.js
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
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
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports._request = void 0;
|
|
15
|
-
var fs_1 = require("fs");
|
|
16
|
-
var https_1 = require("https");
|
|
17
|
-
var userAgent_1 = require("./userAgent");
|
|
18
|
-
var _requestOptions = function (api_key, apiUrl, path, method, payload,
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
override_options) {
|
|
21
|
-
var additionalHeaders = {};
|
|
22
|
-
if (payload && !(payload instanceof fs_1.ReadStream)) {
|
|
23
|
-
additionalHeaders["Content-Length"] = Buffer.byteLength(payload);
|
|
24
|
-
}
|
|
25
|
-
var options = {
|
|
26
|
-
host: apiUrl,
|
|
27
|
-
path: path,
|
|
28
|
-
method: method,
|
|
29
|
-
headers: __assign({ "User-Agent": (0, userAgent_1.userAgent)(), "Content-Type": "application/json", Authorization: "token "
|
|
30
|
-
};
|
|
31
|
-
var headers = options.headers;
|
|
32
|
-
if (override_options && override_options.headers) {
|
|
33
|
-
headers = __assign(__assign({}, headers), override_options.headers);
|
|
34
|
-
}
|
|
35
|
-
return __assign(__assign(__assign({}, options), override_options), { headers: headers });
|
|
36
|
-
};
|
|
37
|
-
function _request(method, api_key, apiUrl, path, payload,
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
39
|
-
options) {
|
|
40
|
-
var requestOptions = _requestOptions(api_key, apiUrl, path, method, payload, options);
|
|
41
|
-
return new Promise(function (resolve, reject) {
|
|
42
|
-
try {
|
|
43
|
-
var httpRequest_1 = (0, https_1.request)(requestOptions, function (dgRes) {
|
|
44
|
-
var dgResContent = "";
|
|
45
|
-
dgRes.on("data", function (chunk) {
|
|
46
|
-
dgResContent += chunk;
|
|
47
|
-
});
|
|
48
|
-
dgRes.on("end", function () {
|
|
49
|
-
var dgResponse;
|
|
50
|
-
try {
|
|
51
|
-
dgResponse = JSON.parse(dgResContent);
|
|
52
|
-
}
|
|
53
|
-
catch (err) {
|
|
54
|
-
dgResponse = { error: dgResContent };
|
|
55
|
-
}
|
|
56
|
-
if (dgResponse.error) {
|
|
57
|
-
reject("DG: "
|
|
58
|
-
}
|
|
59
|
-
resolve(dgResponse);
|
|
60
|
-
});
|
|
61
|
-
dgRes.on("error", function (err) {
|
|
62
|
-
reject("DG: "
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
httpRequest_1.on("error", function (err) {
|
|
66
|
-
reject("DG: "
|
|
67
|
-
});
|
|
68
|
-
if (payload) {
|
|
69
|
-
if (payload instanceof fs_1.ReadStream) {
|
|
70
|
-
payload.pipe(httpRequest_1);
|
|
71
|
-
payload.on("finish", function () {
|
|
72
|
-
httpRequest_1.end();
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
// It's a buffer
|
|
77
|
-
httpRequest_1.write(payload);
|
|
78
|
-
httpRequest_1.end();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
httpRequest_1.end();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
catch (err) {
|
|
86
|
-
reject("DG: "
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
exports._request = _request;
|
|
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
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports._request = void 0;
|
|
15
|
+
var fs_1 = require("fs");
|
|
16
|
+
var https_1 = require("https");
|
|
17
|
+
var userAgent_1 = require("./userAgent");
|
|
18
|
+
var _requestOptions = function (api_key, apiUrl, path, method, payload,
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
override_options) {
|
|
21
|
+
var additionalHeaders = {};
|
|
22
|
+
if (payload && !(payload instanceof fs_1.ReadStream)) {
|
|
23
|
+
additionalHeaders["Content-Length"] = Buffer.byteLength(payload);
|
|
24
|
+
}
|
|
25
|
+
var options = {
|
|
26
|
+
host: apiUrl,
|
|
27
|
+
path: path,
|
|
28
|
+
method: method,
|
|
29
|
+
headers: __assign({ "User-Agent": (0, userAgent_1.userAgent)(), "Content-Type": "application/json", Authorization: "token ".concat(api_key) }, additionalHeaders),
|
|
30
|
+
};
|
|
31
|
+
var headers = options.headers;
|
|
32
|
+
if (override_options && override_options.headers) {
|
|
33
|
+
headers = __assign(__assign({}, headers), override_options.headers);
|
|
34
|
+
}
|
|
35
|
+
return __assign(__assign(__assign({}, options), override_options), { headers: headers });
|
|
36
|
+
};
|
|
37
|
+
function _request(method, api_key, apiUrl, path, payload,
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
39
|
+
options) {
|
|
40
|
+
var requestOptions = _requestOptions(api_key, apiUrl, path, method, payload, options);
|
|
41
|
+
return new Promise(function (resolve, reject) {
|
|
42
|
+
try {
|
|
43
|
+
var httpRequest_1 = (0, https_1.request)(requestOptions, function (dgRes) {
|
|
44
|
+
var dgResContent = "";
|
|
45
|
+
dgRes.on("data", function (chunk) {
|
|
46
|
+
dgResContent += chunk;
|
|
47
|
+
});
|
|
48
|
+
dgRes.on("end", function () {
|
|
49
|
+
var dgResponse;
|
|
50
|
+
try {
|
|
51
|
+
dgResponse = JSON.parse(dgResContent);
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
dgResponse = { error: dgResContent };
|
|
55
|
+
}
|
|
56
|
+
if (dgResponse.error) {
|
|
57
|
+
reject("DG: ".concat(dgResContent));
|
|
58
|
+
}
|
|
59
|
+
resolve(dgResponse);
|
|
60
|
+
});
|
|
61
|
+
dgRes.on("error", function (err) {
|
|
62
|
+
reject("DG: ".concat(err));
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
httpRequest_1.on("error", function (err) {
|
|
66
|
+
reject("DG: ".concat(err));
|
|
67
|
+
});
|
|
68
|
+
if (payload) {
|
|
69
|
+
if (payload instanceof fs_1.ReadStream) {
|
|
70
|
+
payload.pipe(httpRequest_1);
|
|
71
|
+
payload.on("finish", function () {
|
|
72
|
+
httpRequest_1.end();
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// It's a buffer
|
|
77
|
+
httpRequest_1.write(payload);
|
|
78
|
+
httpRequest_1.end();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
httpRequest_1.end();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
reject("DG: ".concat(err));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
exports._request = _request;
|
|
91
91
|
//# sourceMappingURL=httpRequest.js.map
|
package/dist/httpRequest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpRequest.js","sourceRoot":"","sources":["../src/httpRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,yBAAgC;AAChC,+BAAgD;AAChD,yCAAwC;AAExC,IAAM,eAAe,GAAG,UACtB,OAAe,EACf,MAAc,EACd,IAAY,EACZ,MAAc,EACd,OAAsC;AACtC,8DAA8D;AAC9D,gBAAsB;IAEtB,IAAM,iBAAiB,GAAwC,EAAE,CAAC;IAClE,IAAI,OAAO,IAAI,CAAC,CAAC,OAAO,YAAY,eAAU,CAAC,EAAE;QAC/C,iBAAiB,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;KAClE;IAED,IAAM,OAAO,GAAG;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,MAAA;QACJ,MAAM,QAAA;QACN,OAAO,aACL,YAAY,EAAE,IAAA,qBAAS,GAAE,EACzB,cAAc,EAAE,kBAAkB,EAClC,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"httpRequest.js","sourceRoot":"","sources":["../src/httpRequest.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Keys } from "./keys";
|
|
2
|
-
import { Projects } from "./projects";
|
|
3
|
-
import { Transcriber } from "./transcription";
|
|
4
|
-
import { Usage } from "./usage";
|
|
5
|
-
import { Members } from "./members";
|
|
6
|
-
import { Invitation } from "./invitation";
|
|
7
|
-
import { Billing } from "./billing";
|
|
8
|
-
import { Scopes } from "./scopes";
|
|
9
|
-
export declare class Deepgram {
|
|
10
|
-
private _apiUrl;
|
|
11
|
-
private _apiKey;
|
|
12
|
-
keys: Keys;
|
|
13
|
-
projects: Projects;
|
|
14
|
-
transcription: Transcriber;
|
|
15
|
-
usage: Usage;
|
|
16
|
-
members: Members;
|
|
17
|
-
invitation: Invitation;
|
|
18
|
-
billing: Billing;
|
|
19
|
-
scopes: Scopes;
|
|
20
|
-
constructor(apiKey: string, apiUrl?: string);
|
|
21
|
-
/**
|
|
22
|
-
* Ensures that the provided options were provided
|
|
23
|
-
*/
|
|
24
|
-
private _validateOptions;
|
|
25
|
-
}
|
|
1
|
+
import { Keys } from "./keys";
|
|
2
|
+
import { Projects } from "./projects";
|
|
3
|
+
import { Transcriber } from "./transcription";
|
|
4
|
+
import { Usage } from "./usage";
|
|
5
|
+
import { Members } from "./members";
|
|
6
|
+
import { Invitation } from "./invitation";
|
|
7
|
+
import { Billing } from "./billing";
|
|
8
|
+
import { Scopes } from "./scopes";
|
|
9
|
+
export declare class Deepgram {
|
|
10
|
+
private _apiUrl;
|
|
11
|
+
private _apiKey;
|
|
12
|
+
keys: Keys;
|
|
13
|
+
projects: Projects;
|
|
14
|
+
transcription: Transcriber;
|
|
15
|
+
usage: Usage;
|
|
16
|
+
members: Members;
|
|
17
|
+
invitation: Invitation;
|
|
18
|
+
billing: Billing;
|
|
19
|
+
scopes: Scopes;
|
|
20
|
+
constructor(apiKey: string, apiUrl?: string);
|
|
21
|
+
/**
|
|
22
|
+
* Ensures that the provided options were provided
|
|
23
|
+
*/
|
|
24
|
+
private _validateOptions;
|
|
25
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Deepgram = void 0;
|
|
4
|
-
var constants_1 = require("./constants");
|
|
5
|
-
var keys_1 = require("./keys");
|
|
6
|
-
var projects_1 = require("./projects");
|
|
7
|
-
var transcription_1 = require("./transcription");
|
|
8
|
-
var usage_1 = require("./usage");
|
|
9
|
-
var members_1 = require("./members");
|
|
10
|
-
var invitation_1 = require("./invitation");
|
|
11
|
-
var billing_1 = require("./billing");
|
|
12
|
-
var scopes_1 = require("./scopes");
|
|
13
|
-
var Deepgram = /** @class */ (function () {
|
|
14
|
-
function Deepgram(apiKey, apiUrl) {
|
|
15
|
-
this._apiKey = apiKey;
|
|
16
|
-
this._apiUrl = apiUrl || constants_1.DefaultOptions.apiUrl;
|
|
17
|
-
this._validateOptions();
|
|
18
|
-
this.keys = new keys_1.Keys(this._apiKey, this._apiUrl);
|
|
19
|
-
this.projects = new projects_1.Projects(this._apiKey, this._apiUrl);
|
|
20
|
-
this.transcription = new transcription_1.Transcriber(this._apiKey, this._apiUrl);
|
|
21
|
-
this.usage = new usage_1.Usage(this._apiKey, this._apiUrl);
|
|
22
|
-
this.members = new members_1.Members(this._apiKey, this._apiUrl);
|
|
23
|
-
this.invitation = new invitation_1.Invitation(this._apiKey, this._apiUrl);
|
|
24
|
-
this.billing = new billing_1.Billing(this._apiKey, this._apiUrl);
|
|
25
|
-
this.scopes = new scopes_1.Scopes(this._apiKey, this._apiUrl);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Ensures that the provided options were provided
|
|
29
|
-
*/
|
|
30
|
-
Deepgram.prototype._validateOptions = function () {
|
|
31
|
-
if (!this._apiKey || this._apiKey.trim().length === 0) {
|
|
32
|
-
throw new Error("DG: API key is required");
|
|
33
|
-
}
|
|
34
|
-
if (!this._apiUrl || this._apiUrl.trim().length === 0) {
|
|
35
|
-
throw new Error("DG: API url should be a valid url or not provided");
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return Deepgram;
|
|
39
|
-
}());
|
|
40
|
-
exports.Deepgram = Deepgram;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Deepgram = void 0;
|
|
4
|
+
var constants_1 = require("./constants");
|
|
5
|
+
var keys_1 = require("./keys");
|
|
6
|
+
var projects_1 = require("./projects");
|
|
7
|
+
var transcription_1 = require("./transcription");
|
|
8
|
+
var usage_1 = require("./usage");
|
|
9
|
+
var members_1 = require("./members");
|
|
10
|
+
var invitation_1 = require("./invitation");
|
|
11
|
+
var billing_1 = require("./billing");
|
|
12
|
+
var scopes_1 = require("./scopes");
|
|
13
|
+
var Deepgram = /** @class */ (function () {
|
|
14
|
+
function Deepgram(apiKey, apiUrl) {
|
|
15
|
+
this._apiKey = apiKey;
|
|
16
|
+
this._apiUrl = apiUrl || constants_1.DefaultOptions.apiUrl;
|
|
17
|
+
this._validateOptions();
|
|
18
|
+
this.keys = new keys_1.Keys(this._apiKey, this._apiUrl);
|
|
19
|
+
this.projects = new projects_1.Projects(this._apiKey, this._apiUrl);
|
|
20
|
+
this.transcription = new transcription_1.Transcriber(this._apiKey, this._apiUrl);
|
|
21
|
+
this.usage = new usage_1.Usage(this._apiKey, this._apiUrl);
|
|
22
|
+
this.members = new members_1.Members(this._apiKey, this._apiUrl);
|
|
23
|
+
this.invitation = new invitation_1.Invitation(this._apiKey, this._apiUrl);
|
|
24
|
+
this.billing = new billing_1.Billing(this._apiKey, this._apiUrl);
|
|
25
|
+
this.scopes = new scopes_1.Scopes(this._apiKey, this._apiUrl);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Ensures that the provided options were provided
|
|
29
|
+
*/
|
|
30
|
+
Deepgram.prototype._validateOptions = function () {
|
|
31
|
+
if (!this._apiKey || this._apiKey.trim().length === 0) {
|
|
32
|
+
throw new Error("DG: API key is required");
|
|
33
|
+
}
|
|
34
|
+
if (!this._apiUrl || this._apiUrl.trim().length === 0) {
|
|
35
|
+
throw new Error("DG: API url should be a valid url or not provided");
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return Deepgram;
|
|
39
|
+
}());
|
|
40
|
+
exports.Deepgram = Deepgram;
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
File without changes
|
package/dist/invitation.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Message, InvitationOptions, InvitationList } from "./types";
|
|
2
|
-
export declare class Invitation {
|
|
3
|
-
private _credentials;
|
|
4
|
-
private _apiUrl;
|
|
5
|
-
constructor(_credentials: string, _apiUrl: string);
|
|
6
|
-
private apiPath;
|
|
7
|
-
/**
|
|
8
|
-
* Lists all the current invites of a specified project.
|
|
9
|
-
* @param projectId Unique identifier of the project
|
|
10
|
-
*/
|
|
11
|
-
list(projectId: string): Promise<InvitationList>;
|
|
12
|
-
/**
|
|
13
|
-
* Sends an invitation to join the specified project.
|
|
14
|
-
* @param projectId Unique identifier of the project
|
|
15
|
-
*/
|
|
16
|
-
send(projectId: string, options: InvitationOptions): Promise<Message>;
|
|
17
|
-
/**
|
|
18
|
-
* Removes the authenticated account from the specified project.
|
|
19
|
-
* @param projectId Unique identifier of the project
|
|
20
|
-
*/
|
|
21
|
-
leave(projectId: string): Promise<Message>;
|
|
22
|
-
/**
|
|
23
|
-
* Removes the specified email from the invitations on the specified project.
|
|
24
|
-
* @param projectId Unique identifier of the project
|
|
25
|
-
* @param email email address of the invitee
|
|
26
|
-
* NOTE: This will return successful even if the email does not have an invite on the project.
|
|
27
|
-
*/
|
|
28
|
-
delete(projectId: string, email: string): Promise<Message>;
|
|
29
|
-
}
|
|
1
|
+
import { Message, InvitationOptions, InvitationList } from "./types";
|
|
2
|
+
export declare class Invitation {
|
|
3
|
+
private _credentials;
|
|
4
|
+
private _apiUrl;
|
|
5
|
+
constructor(_credentials: string, _apiUrl: string);
|
|
6
|
+
private apiPath;
|
|
7
|
+
/**
|
|
8
|
+
* Lists all the current invites of a specified project.
|
|
9
|
+
* @param projectId Unique identifier of the project
|
|
10
|
+
*/
|
|
11
|
+
list(projectId: string): Promise<InvitationList>;
|
|
12
|
+
/**
|
|
13
|
+
* Sends an invitation to join the specified project.
|
|
14
|
+
* @param projectId Unique identifier of the project
|
|
15
|
+
*/
|
|
16
|
+
send(projectId: string, options: InvitationOptions): Promise<Message>;
|
|
17
|
+
/**
|
|
18
|
+
* Removes the authenticated account from the specified project.
|
|
19
|
+
* @param projectId Unique identifier of the project
|
|
20
|
+
*/
|
|
21
|
+
leave(projectId: string): Promise<Message>;
|
|
22
|
+
/**
|
|
23
|
+
* Removes the specified email from the invitations on the specified project.
|
|
24
|
+
* @param projectId Unique identifier of the project
|
|
25
|
+
* @param email email address of the invitee
|
|
26
|
+
* NOTE: This will return successful even if the email does not have an invite on the project.
|
|
27
|
+
*/
|
|
28
|
+
delete(projectId: string, email: string): Promise<Message>;
|
|
29
|
+
}
|