@deepgram/sdk 1.4.0 → 1.4.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 +25 -0
- package/dist/browser/index.js +1 -0
- package/dist/index.d.ts +1342 -0
- package/dist/index.js +1 -0
- package/package.json +9 -6
- package/tsconfig-es6.json +16 -0
- package/webpack.config.js +21 -1
- package/bundle/billing.d.ts +0 -19
- package/bundle/billing.js +0 -73
- package/bundle/billing.js.map +0 -1
- package/bundle/browser/httpFetch.d.ts +0 -1
- package/bundle/browser/httpFetch.js +0 -75
- package/bundle/browser/httpFetch.js.map +0 -1
- package/bundle/browser/index.d.ts +0 -21
- package/bundle/browser/index.js +0 -35
- package/bundle/browser/index.js.map +0 -1
- package/bundle/browser/transcription/index.d.ts +0 -17
- package/bundle/browser/transcription/index.js +0 -75
- package/bundle/browser/transcription/index.js.map +0 -1
- package/bundle/browser/transcription/preRecordedTranscription.d.ts +0 -9
- package/bundle/browser/transcription/preRecordedTranscription.js +0 -87
- package/bundle/browser/transcription/preRecordedTranscription.js.map +0 -1
- package/bundle/constants/defaultOptions.d.ts +0 -6
- package/bundle/constants/defaultOptions.js +0 -10
- package/bundle/constants/defaultOptions.js.map +0 -1
- package/bundle/constants/index.d.ts +0 -1
- package/bundle/constants/index.js +0 -18
- package/bundle/constants/index.js.map +0 -1
- package/bundle/enums/alternatives.d.ts +0 -4
- package/bundle/enums/alternatives.js +0 -3
- package/bundle/enums/alternatives.js.map +0 -1
- package/bundle/enums/connectionState.d.ts +0 -6
- package/bundle/enums/connectionState.js +0 -11
- package/bundle/enums/connectionState.js.map +0 -1
- package/bundle/enums/diarization.d.ts +0 -4
- package/bundle/enums/diarization.js +0 -3
- package/bundle/enums/diarization.js.map +0 -1
- package/bundle/enums/index.d.ts +0 -7
- package/bundle/enums/index.js +0 -24
- package/bundle/enums/index.js.map +0 -1
- package/bundle/enums/liveTranscriptionEvents.d.ts +0 -6
- package/bundle/enums/liveTranscriptionEvents.js +0 -3
- package/bundle/enums/liveTranscriptionEvents.js.map +0 -1
- package/bundle/enums/models.d.ts +0 -5
- package/bundle/enums/models.js +0 -3
- package/bundle/enums/models.js.map +0 -1
- package/bundle/enums/punctuation.d.ts +0 -4
- package/bundle/enums/punctuation.js +0 -3
- package/bundle/enums/punctuation.js.map +0 -1
- package/bundle/enums/searchKind.d.ts +0 -4
- package/bundle/enums/searchKind.js +0 -3
- package/bundle/enums/searchKind.js.map +0 -1
- package/bundle/helpers/index.d.ts +0 -2
- package/bundle/helpers/index.js +0 -19
- package/bundle/helpers/index.js.map +0 -1
- package/bundle/helpers/secondsToTimestamp.d.ts +0 -1
- package/bundle/helpers/secondsToTimestamp.js +0 -8
- package/bundle/helpers/secondsToTimestamp.js.map +0 -1
- package/bundle/helpers/validateOptions.d.ts +0 -1
- package/bundle/helpers/validateOptions.js +0 -13
- package/bundle/helpers/validateOptions.js.map +0 -1
- package/bundle/httpRequest.d.ts +0 -3
- package/bundle/httpRequest.js +0 -91
- package/bundle/httpRequest.js.map +0 -1
- package/bundle/index.d.ts +0 -21
- package/bundle/index.js +0 -35
- package/bundle/index.js.map +0 -1
- package/bundle/invitation.d.ts +0 -30
- package/bundle/invitation.js +0 -99
- package/bundle/invitation.js.map +0 -1
- package/bundle/keys.d.ts +0 -33
- package/bundle/keys.js +0 -132
- package/bundle/keys.js.map +0 -1
- package/bundle/members.d.ts +0 -19
- package/bundle/members.js +0 -73
- package/bundle/members.js.map +0 -1
- package/bundle/projects.d.ts +0 -22
- package/bundle/projects.js +0 -82
- package/bundle/projects.js.map +0 -1
- package/bundle/scopes.d.ts +0 -21
- package/bundle/scopes.js +0 -77
- package/bundle/scopes.js.map +0 -1
- package/bundle/transcription/index.d.ts +0 -18
- package/bundle/transcription/index.js +0 -72
- package/bundle/transcription/index.js.map +0 -1
- package/bundle/transcription/liveTranscription.d.ts +0 -23
- package/bundle/transcription/liveTranscription.js +0 -83
- package/bundle/transcription/liveTranscription.js.map +0 -1
- package/bundle/transcription/preRecordedTranscription.d.ts +0 -8
- package/bundle/transcription/preRecordedTranscription.js +0 -114
- package/bundle/transcription/preRecordedTranscription.js.map +0 -1
- package/bundle/types/balance.d.ts +0 -6
- package/bundle/types/balance.js +0 -3
- package/bundle/types/balance.js.map +0 -1
- package/bundle/types/balanceList.d.ts +0 -4
- package/bundle/types/balanceList.js +0 -3
- package/bundle/types/balanceList.js.map +0 -1
- package/bundle/types/channel.d.ts +0 -25
- package/bundle/types/channel.js +0 -3
- package/bundle/types/channel.js.map +0 -1
- package/bundle/types/createKeyOptions.d.ts +0 -13
- package/bundle/types/createKeyOptions.js +0 -3
- package/bundle/types/createKeyOptions.js.map +0 -1
- package/bundle/types/hit.d.ts +0 -21
- package/bundle/types/hit.js +0 -3
- package/bundle/types/hit.js.map +0 -1
- package/bundle/types/index.d.ts +0 -38
- package/bundle/types/index.js +0 -55
- package/bundle/types/index.js.map +0 -1
- package/bundle/types/invitationList.d.ts +0 -4
- package/bundle/types/invitationList.js +0 -3
- package/bundle/types/invitationList.js.map +0 -1
- package/bundle/types/invitationOptions.d.ts +0 -4
- package/bundle/types/invitationOptions.js +0 -3
- package/bundle/types/invitationOptions.js.map +0 -1
- package/bundle/types/key.d.ts +0 -25
- package/bundle/types/key.js +0 -3
- package/bundle/types/key.js.map +0 -1
- package/bundle/types/keyResponse.d.ts +0 -10
- package/bundle/types/keyResponse.js +0 -3
- package/bundle/types/keyResponse.js.map +0 -1
- package/bundle/types/keyResponseObj.d.ts +0 -42
- package/bundle/types/keyResponseObj.js +0 -3
- package/bundle/types/keyResponseObj.js.map +0 -1
- package/bundle/types/keyword.d.ts +0 -4
- package/bundle/types/keyword.js +0 -3
- package/bundle/types/keyword.js.map +0 -1
- package/bundle/types/liveTranscriptionOptions.d.ts +0 -148
- package/bundle/types/liveTranscriptionOptions.js +0 -3
- package/bundle/types/liveTranscriptionOptions.js.map +0 -1
- package/bundle/types/liveTranscriptionResponse.d.ts +0 -9
- package/bundle/types/liveTranscriptionResponse.js +0 -3
- package/bundle/types/liveTranscriptionResponse.js.map +0 -1
- package/bundle/types/member.d.ts +0 -7
- package/bundle/types/member.js +0 -3
- package/bundle/types/member.js.map +0 -1
- package/bundle/types/memberList.d.ts +0 -4
- package/bundle/types/memberList.js +0 -3
- package/bundle/types/memberList.js.map +0 -1
- package/bundle/types/message.d.ts +0 -3
- package/bundle/types/message.js +0 -3
- package/bundle/types/message.js.map +0 -1
- package/bundle/types/metadata.d.ts +0 -8
- package/bundle/types/metadata.js +0 -3
- package/bundle/types/metadata.js.map +0 -1
- package/bundle/types/prerecordedTranscriptionOptions.d.ts +0 -126
- package/bundle/types/prerecordedTranscriptionOptions.js +0 -3
- package/bundle/types/prerecordedTranscriptionOptions.js.map +0 -1
- package/bundle/types/prerecordedTranscriptionResponse.d.ts +0 -25
- package/bundle/types/prerecordedTranscriptionResponse.js +0 -51
- package/bundle/types/prerecordedTranscriptionResponse.js.map +0 -1
- package/bundle/types/project.d.ts +0 -17
- package/bundle/types/project.js +0 -3
- package/bundle/types/project.js.map +0 -1
- package/bundle/types/projectPatchRequest.d.ts +0 -4
- package/bundle/types/projectPatchRequest.js +0 -3
- package/bundle/types/projectPatchRequest.js.map +0 -1
- package/bundle/types/projectPatchResponse.d.ts +0 -6
- package/bundle/types/projectPatchResponse.js +0 -3
- package/bundle/types/projectPatchResponse.js.map +0 -1
- package/bundle/types/projectResponse.d.ts +0 -4
- package/bundle/types/projectResponse.js +0 -3
- package/bundle/types/projectResponse.js.map +0 -1
- package/bundle/types/requestFunction.d.ts +0 -5
- package/bundle/types/requestFunction.js +0 -3
- package/bundle/types/requestFunction.js.map +0 -1
- package/bundle/types/scopeList.d.ts +0 -3
- package/bundle/types/scopeList.js +0 -3
- package/bundle/types/scopeList.js.map +0 -1
- package/bundle/types/search.d.ts +0 -14
- package/bundle/types/search.js +0 -3
- package/bundle/types/search.js.map +0 -1
- package/bundle/types/transcriptionSource.d.ts +0 -14
- package/bundle/types/transcriptionSource.js +0 -3
- package/bundle/types/transcriptionSource.js.map +0 -1
- package/bundle/types/usageCallback.d.ts +0 -4
- package/bundle/types/usageCallback.js +0 -3
- package/bundle/types/usageCallback.js.map +0 -1
- package/bundle/types/usageField.d.ts +0 -7
- package/bundle/types/usageField.js +0 -3
- package/bundle/types/usageField.js.map +0 -1
- package/bundle/types/usageFieldOptions.d.ts +0 -4
- package/bundle/types/usageFieldOptions.js +0 -3
- package/bundle/types/usageFieldOptions.js.map +0 -1
- package/bundle/types/usageOptions.d.ts +0 -23
- package/bundle/types/usageOptions.js +0 -3
- package/bundle/types/usageOptions.js.map +0 -1
- package/bundle/types/usageRequest.d.ts +0 -11
- package/bundle/types/usageRequest.js +0 -3
- package/bundle/types/usageRequest.js.map +0 -1
- package/bundle/types/usageRequestDetail.d.ts +0 -30
- package/bundle/types/usageRequestDetail.js +0 -3
- package/bundle/types/usageRequestDetail.js.map +0 -1
- package/bundle/types/usageRequestList.d.ts +0 -6
- package/bundle/types/usageRequestList.js +0 -3
- package/bundle/types/usageRequestList.js.map +0 -1
- package/bundle/types/usageRequestListOptions.d.ts +0 -7
- package/bundle/types/usageRequestListOptions.js +0 -3
- package/bundle/types/usageRequestListOptions.js.map +0 -1
- package/bundle/types/usageRequestMessage.d.ts +0 -3
- package/bundle/types/usageRequestMessage.js +0 -3
- package/bundle/types/usageRequestMessage.js.map +0 -1
- package/bundle/types/usageResponse.d.ts +0 -10
- package/bundle/types/usageResponse.js +0 -3
- package/bundle/types/usageResponse.js.map +0 -1
- package/bundle/types/usageResponseDetail.d.ts +0 -6
- package/bundle/types/usageResponseDetail.js +0 -3
- package/bundle/types/usageResponseDetail.js.map +0 -1
- package/bundle/types/utterance.d.ts +0 -39
- package/bundle/types/utterance.js +0 -3
- package/bundle/types/utterance.js.map +0 -1
- package/bundle/types/wordBase.d.ts +0 -8
- package/bundle/types/wordBase.js +0 -3
- package/bundle/types/wordBase.js.map +0 -1
- package/bundle/usage.d.ts +0 -35
- package/bundle/usage.js +0 -122
- package/bundle/usage.js.map +0 -1
- package/bundle/userAgent.d.ts +0 -1
- package/bundle/userAgent.js +0 -20
- package/bundle/userAgent.js.map +0 -1
package/bundle/types/search.d.ts
DELETED
|
@@ -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
|
-
};
|
package/bundle/types/search.js
DELETED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcriptionSource.js","sourceRoot":"","sources":["../../src/types/transcriptionSource.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageCallback.js","sourceRoot":"","sources":["../../src/types/usageCallback.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageField.js","sourceRoot":"","sources":["../../src/types/usageField.ts"],"names":[],"mappings":""}
|
|
@@ -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 +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 +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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageRequestDetail.js","sourceRoot":"","sources":["../../src/types/usageRequestDetail.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageRequestList.js","sourceRoot":"","sources":["../../src/types/usageRequestList.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageRequestListOptions.js","sourceRoot":"","sources":["../../src/types/usageRequestListOptions.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageRequestMessage.js","sourceRoot":"","sources":["../../src/types/usageRequestMessage.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usageResponse.js","sourceRoot":"","sources":["../../src/types/usageResponse.ts"],"names":[],"mappings":""}
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utterance.js","sourceRoot":"","sources":["../../src/types/utterance.ts"],"names":[],"mappings":""}
|
package/bundle/types/wordBase.js
DELETED
|
@@ -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
|
-
}
|
package/bundle/usage.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.Usage = void 0;
|
|
54
|
-
var querystring_1 = __importDefault(require("querystring"));
|
|
55
|
-
var Usage = /** @class */ (function () {
|
|
56
|
-
function Usage(_credentials, _apiUrl, _request) {
|
|
57
|
-
this._credentials = _credentials;
|
|
58
|
-
this._apiUrl = _apiUrl;
|
|
59
|
-
this._request = _request;
|
|
60
|
-
this.apiPath = "/v1/projects";
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Retrieves all requests associated with the provided projectId based
|
|
64
|
-
* on the provided options
|
|
65
|
-
* @param projectId Unique identifier of the project
|
|
66
|
-
* @param options Additional filter options
|
|
67
|
-
*/
|
|
68
|
-
Usage.prototype.listRequests = function (projectId, options) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
var requestOptions;
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
requestOptions = __assign({}, options);
|
|
73
|
-
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/requests?").concat(querystring_1.default.stringify(requestOptions)))];
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Retrieves a specific request associated with the provided projectId
|
|
79
|
-
* @param projectId Unique identifier of the project
|
|
80
|
-
* @param requestId Unique identifier for the request to retrieve
|
|
81
|
-
*/
|
|
82
|
-
Usage.prototype.getRequest = function (projectId, requestId) {
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/requests/").concat(requestId))];
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Retrieves usage associated with the provided projectId based
|
|
91
|
-
* on the provided options
|
|
92
|
-
* @param projectId Unique identifier of the project
|
|
93
|
-
* @param options Options to filter usage
|
|
94
|
-
*/
|
|
95
|
-
Usage.prototype.getUsage = function (projectId, options) {
|
|
96
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
97
|
-
var requestOptions;
|
|
98
|
-
return __generator(this, function (_a) {
|
|
99
|
-
requestOptions = __assign({}, options);
|
|
100
|
-
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/usage?").concat(querystring_1.default.stringify(requestOptions)))];
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Retrieves features used by the provided projectId based
|
|
106
|
-
* on the provided options
|
|
107
|
-
* @param projectId Unique identifier of the project
|
|
108
|
-
* @param options Options to filter usage
|
|
109
|
-
*/
|
|
110
|
-
Usage.prototype.getFields = function (projectId, options) {
|
|
111
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
-
var requestOptions;
|
|
113
|
-
return __generator(this, function (_a) {
|
|
114
|
-
requestOptions = __assign({}, options);
|
|
115
|
-
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/usage/fields?").concat(querystring_1.default.stringify(requestOptions)))];
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
return Usage;
|
|
120
|
-
}());
|
|
121
|
-
exports.Usage = Usage;
|
|
122
|
-
//# sourceMappingURL=usage.js.map
|
package/bundle/usage.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/usage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAsC;AAYtC;IACE,eACU,YAAoB,EACpB,OAAe,EACf,QAAyB;QAFzB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAiB;QAG3B,YAAO,GAAG,cAAc,CAAC;IAF9B,CAAC;IAIJ;;;;;OAKG;IACG,4BAAY,GAAlB,UACE,SAAiB,EACjB,OAAiC;;;;gBAE3B,cAAc,YAAQ,EAAE,EAAK,OAAO,CAAE,CAAC;gBAC7C,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,uBAAa,qBAAW,CAAC,SAAS,CAC5D,cAAc,CACf,CAAE,CACJ,EAAC;;;KACH;IAED;;;;OAIG;IACG,0BAAU,GAAhB,UACE,SAAiB,EACjB,SAAiB;;;gBAEjB,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,uBAAa,SAAS,CAAE,CACrD,EAAC;;;KACH;IAED;;;;;OAKG;IACG,wBAAQ,GAAd,UACE,SAAiB,EACjB,OAAsB;;;;gBAEhB,cAAc,YAAQ,EAAE,EAAK,OAAO,CAAE,CAAC;gBAC7C,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,oBAAU,qBAAW,CAAC,SAAS,CACzD,cAAc,CACf,CAAE,CACJ,EAAC;;;KACH;IAED;;;;;OAKG;IACG,yBAAS,GAAf,UACE,SAAiB,EACjB,OAA2B;;;;gBAErB,cAAc,YAAQ,EAAE,EAAK,OAAO,CAAE,CAAC;gBAC7C,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,2BAAiB,qBAAW,CAAC,SAAS,CAChE,cAAc,CACf,CAAE,CACJ,EAAC;;;KACH;IACH,YAAC;AAAD,CAAC,AAxFD,IAwFC;AAxFY,sBAAK"}
|
package/bundle/userAgent.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function userAgent(): string;
|
package/bundle/userAgent.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.userAgent = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* The following const is replaced during the CD
|
|
6
|
-
* process to the version from package.json
|
|
7
|
-
*/
|
|
8
|
-
var sdkVersion = "1.4.0";
|
|
9
|
-
function userAgent() {
|
|
10
|
-
var agent = "@deepgram/sdk/UNKNOWN node/UNKNOWN";
|
|
11
|
-
try {
|
|
12
|
-
agent = "@deepgram/sdk/".concat(sdkVersion, " node/").concat(process.version.replace("v", ""));
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
console.warn("Could not load package details");
|
|
16
|
-
}
|
|
17
|
-
return agent;
|
|
18
|
-
}
|
|
19
|
-
exports.userAgent = userAgent;
|
|
20
|
-
//# sourceMappingURL=userAgent.js.map
|
package/bundle/userAgent.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../src/userAgent.ts"],"names":[],"mappings":";;;AAAA;;;EAGE;AACF,IAAM,UAAU,GAAG,OAAO,CAAC;AAE3B,SAAgB,SAAS;IACvB,IAAI,KAAK,GAAG,oCAAoC,CAAC;IACjD,IAAI;QACF,KAAK,GAAG,wBAAiB,UAAU,mBAAS,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAE,CAAC;KAChF;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;KAChD;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AARD,8BAQC"}
|