@deepgram/sdk 1.3.1-beta.1 → 1.4.1
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 +203 -196
- package/CODE_OF_CONDUCT.md +127 -127
- package/CONTRIBUTING.md +50 -50
- package/LICENSE +21 -21
- package/README.md +151 -151
- package/{dist → bundle}/billing.d.ts +3 -2
- package/{dist → bundle}/billing.js +4 -4
- package/bundle/billing.js.map +1 -0
- package/bundle/browser/httpFetch.d.ts +1 -0
- package/bundle/browser/httpFetch.js +75 -0
- package/bundle/browser/httpFetch.js.map +1 -0
- package/bundle/browser/index.d.ts +21 -0
- package/bundle/browser/index.js +35 -0
- package/bundle/browser/index.js.map +1 -0
- package/bundle/browser/transcription/index.d.ts +17 -0
- package/bundle/browser/transcription/index.js +75 -0
- package/bundle/browser/transcription/index.js.map +1 -0
- package/bundle/browser/transcription/preRecordedTranscription.d.ts +9 -0
- package/bundle/browser/transcription/preRecordedTranscription.js +87 -0
- package/bundle/browser/transcription/preRecordedTranscription.js.map +1 -0
- package/{dist → bundle}/constants/defaultOptions.d.ts +0 -0
- package/{dist → bundle}/constants/defaultOptions.js +0 -0
- package/{dist → bundle}/constants/defaultOptions.js.map +0 -0
- package/{dist → bundle}/constants/index.d.ts +0 -0
- package/{dist → bundle}/constants/index.js +0 -0
- package/{dist → bundle}/constants/index.js.map +0 -0
- package/{dist → bundle}/enums/alternatives.d.ts +0 -0
- package/{dist → bundle}/enums/alternatives.js +0 -0
- package/{dist → bundle}/enums/alternatives.js.map +0 -0
- package/{dist → bundle}/enums/connectionState.d.ts +0 -0
- package/{dist → bundle}/enums/connectionState.js +0 -0
- package/{dist → bundle}/enums/connectionState.js.map +0 -0
- package/{dist → bundle}/enums/diarization.d.ts +0 -0
- package/{dist → bundle}/enums/diarization.js +0 -0
- package/{dist → bundle}/enums/diarization.js.map +0 -0
- package/{dist → bundle}/enums/index.d.ts +0 -0
- package/{dist → bundle}/enums/index.js +0 -0
- package/{dist → bundle}/enums/index.js.map +0 -0
- package/{dist → bundle}/enums/liveTranscriptionEvents.d.ts +0 -0
- package/{dist → bundle}/enums/liveTranscriptionEvents.js +0 -0
- package/{dist → bundle}/enums/liveTranscriptionEvents.js.map +0 -0
- package/{dist → bundle}/enums/models.d.ts +0 -0
- package/{dist → bundle}/enums/models.js +0 -0
- package/{dist → bundle}/enums/models.js.map +0 -0
- package/{dist → bundle}/enums/punctuation.d.ts +0 -0
- package/{dist → bundle}/enums/punctuation.js +0 -0
- package/{dist → bundle}/enums/punctuation.js.map +0 -0
- package/{dist → bundle}/enums/searchKind.d.ts +0 -0
- package/{dist → bundle}/enums/searchKind.js +0 -0
- package/{dist → bundle}/enums/searchKind.js.map +0 -0
- package/{dist → bundle}/helpers/index.d.ts +1 -0
- package/{dist → bundle}/helpers/index.js +1 -0
- package/{dist → bundle}/helpers/index.js.map +1 -1
- package/{dist → bundle}/helpers/secondsToTimestamp.d.ts +0 -0
- package/{dist → bundle}/helpers/secondsToTimestamp.js +0 -0
- package/{dist → bundle}/helpers/secondsToTimestamp.js.map +0 -0
- package/bundle/helpers/validateOptions.d.ts +1 -0
- package/bundle/helpers/validateOptions.js +13 -0
- package/bundle/helpers/validateOptions.js.map +1 -0
- package/{dist → bundle}/httpRequest.d.ts +0 -0
- package/{dist → bundle}/httpRequest.js +0 -0
- package/{dist → bundle}/httpRequest.js.map +0 -0
- package/bundle/index.d.ts +21 -0
- package/bundle/index.js +35 -0
- package/bundle/index.js.map +1 -0
- package/{dist → bundle}/invitation.d.ts +3 -2
- package/{dist → bundle}/invitation.js +6 -6
- package/bundle/invitation.js.map +1 -0
- package/{dist → bundle}/keys.d.ts +3 -2
- package/{dist → bundle}/keys.js +6 -6
- package/bundle/keys.js.map +1 -0
- package/{dist → bundle}/members.d.ts +3 -2
- package/{dist → bundle}/members.js +4 -4
- package/bundle/members.js.map +1 -0
- package/{dist → bundle}/projects.d.ts +4 -3
- package/{dist → bundle}/projects.js +6 -6
- package/bundle/projects.js.map +1 -0
- package/{dist → bundle}/scopes.d.ts +3 -2
- package/{dist → bundle}/scopes.js +4 -4
- package/bundle/scopes.js.map +1 -0
- package/{dist → bundle}/transcription/index.d.ts +0 -0
- package/{dist → bundle}/transcription/index.js +0 -0
- package/{dist → bundle}/transcription/index.js.map +0 -0
- package/{dist → bundle}/transcription/liveTranscription.d.ts +0 -0
- package/{dist → bundle}/transcription/liveTranscription.js +0 -0
- package/{dist → bundle}/transcription/liveTranscription.js.map +0 -0
- package/{dist → bundle}/transcription/preRecordedTranscription.d.ts +0 -0
- package/{dist → bundle}/transcription/preRecordedTranscription.js +0 -0
- package/{dist → bundle}/transcription/preRecordedTranscription.js.map +0 -0
- package/{dist → bundle}/types/balance.d.ts +0 -0
- package/{dist → bundle}/types/balance.js +0 -0
- package/{dist → bundle}/types/balance.js.map +0 -0
- package/{dist → bundle}/types/balanceList.d.ts +0 -0
- package/{dist → bundle}/types/balanceList.js +0 -0
- package/{dist → bundle}/types/balanceList.js.map +0 -0
- package/{dist → bundle}/types/channel.d.ts +0 -0
- package/{dist → bundle}/types/channel.js +0 -0
- package/{dist → bundle}/types/channel.js.map +0 -0
- package/{dist → bundle}/types/createKeyOptions.d.ts +0 -0
- package/{dist → bundle}/types/createKeyOptions.js +0 -0
- package/{dist → bundle}/types/createKeyOptions.js.map +0 -0
- package/{dist → bundle}/types/hit.d.ts +0 -0
- package/{dist → bundle}/types/hit.js +0 -0
- package/{dist → bundle}/types/hit.js.map +0 -0
- package/{dist → bundle}/types/index.d.ts +3 -0
- package/{dist → bundle}/types/index.js +3 -0
- package/{dist → bundle}/types/index.js.map +1 -1
- package/{dist → bundle}/types/invitationList.d.ts +0 -0
- package/{dist → bundle}/types/invitationList.js +0 -0
- package/{dist → bundle}/types/invitationList.js.map +0 -0
- package/{dist → bundle}/types/invitationOptions.d.ts +0 -0
- package/{dist → bundle}/types/invitationOptions.js +0 -0
- package/{dist → bundle}/types/invitationOptions.js.map +0 -0
- package/{dist → bundle}/types/key.d.ts +0 -0
- package/{dist → bundle}/types/key.js +0 -0
- package/{dist → bundle}/types/key.js.map +0 -0
- package/bundle/types/keyResponse.d.ts +10 -0
- package/{dist → bundle}/types/keyResponse.js +0 -0
- package/{dist → bundle}/types/keyResponse.js.map +0 -0
- package/bundle/types/keyResponseObj.d.ts +42 -0
- package/bundle/types/keyResponseObj.js +3 -0
- package/bundle/types/keyResponseObj.js.map +1 -0
- package/{dist → bundle}/types/keyword.d.ts +0 -0
- package/{dist → bundle}/types/keyword.js +0 -0
- package/{dist → bundle}/types/keyword.js.map +0 -0
- package/{dist → bundle}/types/liveTranscriptionOptions.d.ts +0 -0
- package/{dist → bundle}/types/liveTranscriptionOptions.js +0 -0
- package/{dist → bundle}/types/liveTranscriptionOptions.js.map +0 -0
- package/{dist → bundle}/types/liveTranscriptionResponse.d.ts +0 -0
- package/{dist → bundle}/types/liveTranscriptionResponse.js +0 -0
- package/{dist → bundle}/types/liveTranscriptionResponse.js.map +0 -0
- package/{dist → bundle}/types/member.d.ts +0 -0
- package/{dist → bundle}/types/member.js +0 -0
- package/{dist → bundle}/types/member.js.map +0 -0
- package/{dist → bundle}/types/memberList.d.ts +0 -0
- package/{dist → bundle}/types/memberList.js +0 -0
- package/{dist → bundle}/types/memberList.js.map +0 -0
- package/{dist → bundle}/types/message.d.ts +0 -0
- package/{dist → bundle}/types/message.js +0 -0
- package/{dist → bundle}/types/message.js.map +0 -0
- package/{dist → bundle}/types/metadata.d.ts +0 -0
- package/{dist → bundle}/types/metadata.js +0 -0
- package/{dist → bundle}/types/metadata.js.map +0 -0
- package/{dist → bundle}/types/prerecordedTranscriptionOptions.d.ts +0 -0
- package/{dist → bundle}/types/prerecordedTranscriptionOptions.js +0 -0
- package/{dist → bundle}/types/prerecordedTranscriptionOptions.js.map +0 -0
- package/{dist → bundle}/types/prerecordedTranscriptionResponse.d.ts +0 -0
- package/{dist → bundle}/types/prerecordedTranscriptionResponse.js +0 -0
- package/{dist → bundle}/types/prerecordedTranscriptionResponse.js.map +0 -0
- package/{dist → bundle}/types/project.d.ts +0 -0
- package/{dist → bundle}/types/project.js +0 -0
- package/{dist → bundle}/types/project.js.map +0 -0
- package/bundle/types/projectPatchRequest.d.ts +4 -0
- package/bundle/types/projectPatchRequest.js +3 -0
- package/bundle/types/projectPatchRequest.js.map +1 -0
- package/{dist → bundle}/types/projectPatchResponse.d.ts +0 -0
- package/{dist → bundle}/types/projectPatchResponse.js +0 -0
- package/{dist → bundle}/types/projectPatchResponse.js.map +0 -0
- package/{dist → bundle}/types/projectResponse.d.ts +0 -0
- package/{dist → bundle}/types/projectResponse.js +0 -0
- package/{dist → bundle}/types/projectResponse.js.map +0 -0
- package/bundle/types/requestFunction.d.ts +5 -0
- package/bundle/types/requestFunction.js +3 -0
- package/bundle/types/requestFunction.js.map +1 -0
- package/{dist → bundle}/types/scopeList.d.ts +0 -0
- package/{dist → bundle}/types/scopeList.js +0 -0
- package/{dist → bundle}/types/scopeList.js.map +0 -0
- package/{dist → bundle}/types/search.d.ts +0 -0
- package/{dist → bundle}/types/search.js +0 -0
- package/{dist → bundle}/types/search.js.map +0 -0
- package/{dist → bundle}/types/transcriptionSource.d.ts +0 -0
- package/{dist → bundle}/types/transcriptionSource.js +0 -0
- package/{dist → bundle}/types/transcriptionSource.js.map +0 -0
- package/{dist → bundle}/types/usageCallback.d.ts +0 -0
- package/{dist → bundle}/types/usageCallback.js +0 -0
- package/{dist → bundle}/types/usageCallback.js.map +0 -0
- package/{dist → bundle}/types/usageField.d.ts +0 -0
- package/{dist → bundle}/types/usageField.js +0 -0
- package/{dist → bundle}/types/usageField.js.map +0 -0
- package/{dist → bundle}/types/usageFieldOptions.d.ts +0 -0
- package/{dist → bundle}/types/usageFieldOptions.js +0 -0
- package/{dist → bundle}/types/usageFieldOptions.js.map +0 -0
- package/{dist → bundle}/types/usageOptions.d.ts +0 -0
- package/{dist → bundle}/types/usageOptions.js +0 -0
- package/{dist → bundle}/types/usageOptions.js.map +0 -0
- package/{dist → bundle}/types/usageRequest.d.ts +0 -0
- package/{dist → bundle}/types/usageRequest.js +0 -0
- package/{dist → bundle}/types/usageRequest.js.map +0 -0
- package/{dist → bundle}/types/usageRequestDetail.d.ts +0 -0
- package/{dist → bundle}/types/usageRequestDetail.js +0 -0
- package/{dist → bundle}/types/usageRequestDetail.js.map +0 -0
- package/{dist → bundle}/types/usageRequestList.d.ts +0 -0
- package/{dist → bundle}/types/usageRequestList.js +0 -0
- package/{dist → bundle}/types/usageRequestList.js.map +0 -0
- package/{dist → bundle}/types/usageRequestListOptions.d.ts +0 -0
- package/{dist → bundle}/types/usageRequestListOptions.js +0 -0
- package/{dist → bundle}/types/usageRequestListOptions.js.map +0 -0
- package/{dist → bundle}/types/usageRequestMessage.d.ts +0 -0
- package/{dist → bundle}/types/usageRequestMessage.js +0 -0
- package/{dist → bundle}/types/usageRequestMessage.js.map +0 -0
- package/{dist → bundle}/types/usageResponse.d.ts +0 -0
- package/{dist → bundle}/types/usageResponse.js +0 -0
- package/{dist → bundle}/types/usageResponse.js.map +0 -0
- package/{dist → bundle}/types/usageResponseDetail.d.ts +0 -0
- package/{dist → bundle}/types/usageResponseDetail.js +0 -0
- package/{dist → bundle}/types/usageResponseDetail.js.map +0 -0
- package/{dist → bundle}/types/utterance.d.ts +0 -0
- package/{dist → bundle}/types/utterance.js +0 -0
- package/{dist → bundle}/types/utterance.js.map +0 -0
- package/{dist → bundle}/types/wordBase.d.ts +0 -0
- package/{dist → bundle}/types/wordBase.js +0 -0
- package/{dist → bundle}/types/wordBase.js.map +0 -0
- package/{dist → bundle}/usage.d.ts +3 -2
- package/{dist → bundle}/usage.js +6 -6
- package/bundle/usage.js.map +1 -0
- package/{dist → bundle}/userAgent.d.ts +0 -0
- package/{dist → bundle}/userAgent.js +1 -1
- package/bundle/userAgent.js.map +1 -0
- package/dist/browser/index.js +1659 -0
- package/dist/index.d.ts +1315 -24
- package/dist/index.js +1 -41
- package/package.json +67 -59
- package/webpack.config.js +15 -0
- package/.devcontainer/Dockerfile +0 -16
- package/.devcontainer/devcontainer.json +0 -29
- package/dist/billing.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invitation.js.map +0 -1
- package/dist/keys.js.map +0 -1
- package/dist/members.js.map +0 -1
- package/dist/projects.js.map +0 -1
- package/dist/scopes.js.map +0 -1
- package/dist/types/keyResponse.d.ts +0 -50
- package/dist/usage.js.map +0 -1
- package/dist/userAgent.js.map +0 -1
|
@@ -37,11 +37,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Projects = void 0;
|
|
40
|
-
var httpRequest_1 = require("./httpRequest");
|
|
41
40
|
var Projects = /** @class */ (function () {
|
|
42
|
-
function Projects(_credentials, _apiUrl) {
|
|
41
|
+
function Projects(_credentials, _apiUrl, _request) {
|
|
43
42
|
this._credentials = _credentials;
|
|
44
43
|
this._apiUrl = _apiUrl;
|
|
44
|
+
this._request = _request;
|
|
45
45
|
this.apiPath = "/v1/projects";
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
@@ -50,7 +50,7 @@ var Projects = /** @class */ (function () {
|
|
|
50
50
|
Projects.prototype.list = function () {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function () {
|
|
52
52
|
return __generator(this, function (_a) {
|
|
53
|
-
return [2 /*return*/,
|
|
53
|
+
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, this.apiPath)];
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
};
|
|
@@ -61,7 +61,7 @@ var Projects = /** @class */ (function () {
|
|
|
61
61
|
Projects.prototype.get = function (projectId) {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function () {
|
|
63
63
|
return __generator(this, function (_a) {
|
|
64
|
-
return [2 /*return*/,
|
|
64
|
+
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId))];
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
};
|
|
@@ -69,10 +69,10 @@ var Projects = /** @class */ (function () {
|
|
|
69
69
|
* Update a specific project
|
|
70
70
|
* @param project project to update
|
|
71
71
|
*/
|
|
72
|
-
Projects.prototype.update = function (project) {
|
|
72
|
+
Projects.prototype.update = function (project, payload) {
|
|
73
73
|
return __awaiter(this, void 0, void 0, function () {
|
|
74
74
|
return __generator(this, function (_a) {
|
|
75
|
-
return [2 /*return*/,
|
|
75
|
+
return [2 /*return*/, this._request("PATCH", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(project.project_id), JSON.stringify(payload))];
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/projects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;IACE,kBACU,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;;OAEG;IACG,uBAAI,GAAV;;;gBACE,sBAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,EAAC;;;KAC5E;IAED;;;OAGG;IACG,sBAAG,GAAT,UAAU,SAAiB;;;gBACzB,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,CAAE,CAC/B,EAAC;;;KACH;IAED;;;OAGG;IACG,yBAAM,GAAZ,UACE,OAAgB,EAChB,OAA4B;;;gBAE5B,sBAAO,IAAI,CAAC,QAAQ,CAClB,OAAO,EACP,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,OAAO,CAAC,UAAU,CAAE,EACvC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CACxB,EAAC;;;KACH;IACH,eAAC;AAAD,CAAC,AA7CD,IA6CC;AA7CY,4BAAQ"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ScopeList, Message } from "./types";
|
|
1
|
+
import { ScopeList, Message, RequestFunction } from "./types";
|
|
2
2
|
export declare class Scopes {
|
|
3
3
|
private _credentials;
|
|
4
4
|
private _apiUrl;
|
|
5
|
-
|
|
5
|
+
private _request;
|
|
6
|
+
constructor(_credentials: string, _apiUrl: string, _request: RequestFunction);
|
|
6
7
|
private apiPath;
|
|
7
8
|
/**
|
|
8
9
|
* Retrieves scopes of the specified member in the specified project.
|
|
@@ -37,11 +37,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Scopes = void 0;
|
|
40
|
-
var httpRequest_1 = require("./httpRequest");
|
|
41
40
|
var Scopes = /** @class */ (function () {
|
|
42
|
-
function Scopes(_credentials, _apiUrl) {
|
|
41
|
+
function Scopes(_credentials, _apiUrl, _request) {
|
|
43
42
|
this._credentials = _credentials;
|
|
44
43
|
this._apiUrl = _apiUrl;
|
|
44
|
+
this._request = _request;
|
|
45
45
|
this.apiPath = "/v1/projects";
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
@@ -52,7 +52,7 @@ var Scopes = /** @class */ (function () {
|
|
|
52
52
|
Scopes.prototype.get = function (projectId, memberId) {
|
|
53
53
|
return __awaiter(this, void 0, void 0, function () {
|
|
54
54
|
return __generator(this, function (_a) {
|
|
55
|
-
return [2 /*return*/,
|
|
55
|
+
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/members/").concat(memberId, "/scopes"))];
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
};
|
|
@@ -65,7 +65,7 @@ var Scopes = /** @class */ (function () {
|
|
|
65
65
|
Scopes.prototype.update = function (projectID, memberId, scope) {
|
|
66
66
|
return __awaiter(this, void 0, void 0, function () {
|
|
67
67
|
return __generator(this, function (_a) {
|
|
68
|
-
return [2 /*return*/,
|
|
68
|
+
return [2 /*return*/, this._request("PUT", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectID, "/members/").concat(memberId, "/scopes"), JSON.stringify({
|
|
69
69
|
scope: scope,
|
|
70
70
|
}))];
|
|
71
71
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;IACE,gBACU,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;;;;OAIG;IACG,oBAAG,GAAT,UAAU,SAAiB,EAAE,QAAgB;;;gBAC3C,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,sBAAY,QAAQ,YAAS,CAC1D,EAAC;;;KACH;IAED;;;;;OAKG;IACG,uBAAM,GAAZ,UACE,SAAiB,EACjB,QAAgB,EAChB,KAAa;;;gBAEb,sBAAO,IAAI,CAAC,QAAQ,CAClB,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,sBAAY,QAAQ,YAAS,EACzD,IAAI,CAAC,SAAS,CAAC;wBACb,KAAK,OAAA;qBACN,CAAC,CACH,EAAC;;;KACH;IACH,aAAC;AAAD,CAAC,AA5CD,IA4CC;AA5CY,wBAAM"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -49,4 +49,7 @@ __exportStar(require("./usageResponse"), exports);
|
|
|
49
49
|
__exportStar(require("./usageResponseDetail"), exports);
|
|
50
50
|
__exportStar(require("./utterance"), exports);
|
|
51
51
|
__exportStar(require("./wordBase"), exports);
|
|
52
|
+
__exportStar(require("./keyResponseObj"), exports);
|
|
53
|
+
__exportStar(require("./projectPatchRequest"), exports);
|
|
54
|
+
__exportStar(require("./requestFunction"), exports);
|
|
52
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,qDAAmC;AACnC,wCAAsB;AACtB,mDAAiC;AACjC,sDAAoC;AACpC,wCAAsB;AACtB,gDAA8B;AAC9B,6DAA2C;AAC3C,8DAA4C;AAC5C,2CAAyB;AACzB,+CAA6B;AAC7B,4CAA0B;AAC1B,6CAA2B;AAC3B,oEAAkD;AAClD,qEAAmD;AACnD,4CAA0B;AAC1B,yDAAuC;AACvC,oDAAkC;AAClC,8CAA4B;AAC5B,2CAAyB;AACzB,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,qDAAmC;AACnC,4DAA0C;AAC1C,kDAAgC;AAChC,wDAAsC;AACtC,8CAA4B;AAC5B,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,qDAAmC;AACnC,wCAAsB;AACtB,mDAAiC;AACjC,sDAAoC;AACpC,wCAAsB;AACtB,gDAA8B;AAC9B,6DAA2C;AAC3C,8DAA4C;AAC5C,2CAAyB;AACzB,+CAA6B;AAC7B,4CAA0B;AAC1B,6CAA2B;AAC3B,oEAAkD;AAClD,qEAAmD;AACnD,4CAA0B;AAC1B,yDAAuC;AACvC,oDAAkC;AAClC,8CAA4B;AAC5B,2CAAyB;AACzB,wDAAsC;AACtC,kDAAgC;AAChC,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,qDAAmC;AACnC,4DAA0C;AAC1C,kDAAgC;AAChC,wDAAsC;AACtC,8CAA4B;AAC5B,6CAA2B;AAC3B,mDAAiC;AACjC,wDAAsC;AACtC,oDAAkC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Key } from "./key";
|
|
2
|
+
import { Member } from "./member";
|
|
3
|
+
export declare type KeyResponseObj = {
|
|
4
|
+
/**
|
|
5
|
+
* Optional member associated with the API key
|
|
6
|
+
*/
|
|
7
|
+
member?: Member;
|
|
8
|
+
/**
|
|
9
|
+
* API key
|
|
10
|
+
*/
|
|
11
|
+
api_key: Key;
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier of the key to use in API requests
|
|
14
|
+
* @deprecated This property has moved to api_key.api_key_id and will
|
|
15
|
+
* be removed in future versions.
|
|
16
|
+
*/
|
|
17
|
+
api_key_id: string;
|
|
18
|
+
/**
|
|
19
|
+
* API key to send in API requests (Only displayed when first created)
|
|
20
|
+
* @deprecated This property has moved to api_key.key and will
|
|
21
|
+
* be removed in future versions.
|
|
22
|
+
*/
|
|
23
|
+
key?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Comment for user reference
|
|
26
|
+
* @deprecated This property has moved to api_key.comment and will
|
|
27
|
+
* be removed in future versions.
|
|
28
|
+
*/
|
|
29
|
+
comment: string;
|
|
30
|
+
/**
|
|
31
|
+
* Timestamp of the date/time the key was created
|
|
32
|
+
* @deprecated This property has moved to api_key.created and will
|
|
33
|
+
* be removed in future versions.
|
|
34
|
+
*/
|
|
35
|
+
created: string;
|
|
36
|
+
/**
|
|
37
|
+
* Array of scopes assigned to the key
|
|
38
|
+
* @deprecated This property has moved to api_key.scopes and will
|
|
39
|
+
* be removed in future versions.
|
|
40
|
+
*/
|
|
41
|
+
scopes: Array<string>;
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyResponseObj.js","sourceRoot":"","sources":["../../src/types/keyResponseObj.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectPatchRequest.js","sourceRoot":"","sources":["../../src/types/projectPatchRequest.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestFunction.js","sourceRoot":"","sources":["../../src/types/requestFunction.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { UsageField, UsageFieldOptions, UsageOptions, UsageRequest, UsageRequestList, UsageRequestListOptions, UsageResponse } from "./types";
|
|
1
|
+
import { RequestFunction, UsageField, UsageFieldOptions, UsageOptions, UsageRequest, UsageRequestList, UsageRequestListOptions, UsageResponse } from "./types";
|
|
2
2
|
export declare class Usage {
|
|
3
3
|
private _credentials;
|
|
4
4
|
private _apiUrl;
|
|
5
|
-
|
|
5
|
+
private _request;
|
|
6
|
+
constructor(_credentials: string, _apiUrl: string, _request: RequestFunction);
|
|
6
7
|
private apiPath;
|
|
7
8
|
/**
|
|
8
9
|
* Retrieves all requests associated with the provided projectId based
|
package/{dist → bundle}/usage.js
RENAMED
|
@@ -52,11 +52,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.Usage = void 0;
|
|
54
54
|
var querystring_1 = __importDefault(require("querystring"));
|
|
55
|
-
var httpRequest_1 = require("./httpRequest");
|
|
56
55
|
var Usage = /** @class */ (function () {
|
|
57
|
-
function Usage(_credentials, _apiUrl) {
|
|
56
|
+
function Usage(_credentials, _apiUrl, _request) {
|
|
58
57
|
this._credentials = _credentials;
|
|
59
58
|
this._apiUrl = _apiUrl;
|
|
59
|
+
this._request = _request;
|
|
60
60
|
this.apiPath = "/v1/projects";
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -70,7 +70,7 @@ var Usage = /** @class */ (function () {
|
|
|
70
70
|
var requestOptions;
|
|
71
71
|
return __generator(this, function (_a) {
|
|
72
72
|
requestOptions = __assign({}, options);
|
|
73
|
-
return [2 /*return*/,
|
|
73
|
+
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/requests?").concat(querystring_1.default.stringify(requestOptions)))];
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
76
|
};
|
|
@@ -82,7 +82,7 @@ var Usage = /** @class */ (function () {
|
|
|
82
82
|
Usage.prototype.getRequest = function (projectId, requestId) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function () {
|
|
84
84
|
return __generator(this, function (_a) {
|
|
85
|
-
return [2 /*return*/,
|
|
85
|
+
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/requests/").concat(requestId))];
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
};
|
|
@@ -97,7 +97,7 @@ var Usage = /** @class */ (function () {
|
|
|
97
97
|
var requestOptions;
|
|
98
98
|
return __generator(this, function (_a) {
|
|
99
99
|
requestOptions = __assign({}, options);
|
|
100
|
-
return [2 /*return*/,
|
|
100
|
+
return [2 /*return*/, this._request("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/usage?").concat(querystring_1.default.stringify(requestOptions)))];
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
103
|
};
|
|
@@ -112,7 +112,7 @@ var Usage = /** @class */ (function () {
|
|
|
112
112
|
var requestOptions;
|
|
113
113
|
return __generator(this, function (_a) {
|
|
114
114
|
requestOptions = __assign({}, options);
|
|
115
|
-
return [2 /*return*/,
|
|
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
116
|
});
|
|
117
117
|
});
|
|
118
118
|
};
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
File without changes
|