@deepgram/sdk 1.3.1 → 1.4.2
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 +7 -1
- package/dist/browser/index.js +1 -0
- package/dist/index.d.ts +1315 -24
- package/dist/index.js +1 -41
- package/package.json +16 -5
- package/tsconfig-es6.json +16 -0
- package/webpack.config.js +35 -0
- package/dist/billing.d.ts +0 -18
- package/dist/billing.js +0 -73
- package/dist/billing.js.map +0 -1
- package/dist/constants/defaultOptions.d.ts +0 -6
- package/dist/constants/defaultOptions.js +0 -10
- package/dist/constants/defaultOptions.js.map +0 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -18
- package/dist/constants/index.js.map +0 -1
- package/dist/enums/alternatives.d.ts +0 -4
- package/dist/enums/alternatives.js +0 -3
- package/dist/enums/alternatives.js.map +0 -1
- package/dist/enums/connectionState.d.ts +0 -6
- package/dist/enums/connectionState.js +0 -11
- package/dist/enums/connectionState.js.map +0 -1
- package/dist/enums/diarization.d.ts +0 -4
- package/dist/enums/diarization.js +0 -3
- package/dist/enums/diarization.js.map +0 -1
- package/dist/enums/index.d.ts +0 -7
- package/dist/enums/index.js +0 -24
- package/dist/enums/index.js.map +0 -1
- package/dist/enums/liveTranscriptionEvents.d.ts +0 -6
- package/dist/enums/liveTranscriptionEvents.js +0 -3
- package/dist/enums/liveTranscriptionEvents.js.map +0 -1
- package/dist/enums/models.d.ts +0 -5
- package/dist/enums/models.js +0 -3
- package/dist/enums/models.js.map +0 -1
- package/dist/enums/punctuation.d.ts +0 -4
- package/dist/enums/punctuation.js +0 -3
- package/dist/enums/punctuation.js.map +0 -1
- package/dist/enums/searchKind.d.ts +0 -4
- package/dist/enums/searchKind.js +0 -3
- package/dist/enums/searchKind.js.map +0 -1
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.js +0 -18
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/secondsToTimestamp.d.ts +0 -1
- package/dist/helpers/secondsToTimestamp.js +0 -8
- package/dist/helpers/secondsToTimestamp.js.map +0 -1
- package/dist/httpRequest.d.ts +0 -3
- package/dist/httpRequest.js +0 -91
- package/dist/httpRequest.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invitation.d.ts +0 -29
- package/dist/invitation.js +0 -99
- package/dist/invitation.js.map +0 -1
- package/dist/keys.d.ts +0 -32
- package/dist/keys.js +0 -132
- package/dist/keys.js.map +0 -1
- package/dist/members.d.ts +0 -18
- package/dist/members.js +0 -73
- package/dist/members.js.map +0 -1
- package/dist/projects.d.ts +0 -21
- package/dist/projects.js +0 -82
- package/dist/projects.js.map +0 -1
- package/dist/scopes.d.ts +0 -20
- package/dist/scopes.js +0 -77
- package/dist/scopes.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -18
- package/dist/transcription/index.js +0 -72
- package/dist/transcription/index.js.map +0 -1
- package/dist/transcription/liveTranscription.d.ts +0 -23
- package/dist/transcription/liveTranscription.js +0 -83
- package/dist/transcription/liveTranscription.js.map +0 -1
- package/dist/transcription/preRecordedTranscription.d.ts +0 -8
- package/dist/transcription/preRecordedTranscription.js +0 -114
- package/dist/transcription/preRecordedTranscription.js.map +0 -1
- package/dist/types/balance.d.ts +0 -6
- package/dist/types/balance.js +0 -3
- package/dist/types/balance.js.map +0 -1
- package/dist/types/balanceList.d.ts +0 -4
- package/dist/types/balanceList.js +0 -3
- package/dist/types/balanceList.js.map +0 -1
- package/dist/types/channel.d.ts +0 -25
- package/dist/types/channel.js +0 -3
- package/dist/types/channel.js.map +0 -1
- package/dist/types/createKeyOptions.d.ts +0 -13
- package/dist/types/createKeyOptions.js +0 -3
- package/dist/types/createKeyOptions.js.map +0 -1
- package/dist/types/hit.d.ts +0 -21
- package/dist/types/hit.js +0 -3
- package/dist/types/hit.js.map +0 -1
- package/dist/types/index.d.ts +0 -35
- package/dist/types/index.js +0 -52
- package/dist/types/index.js.map +0 -1
- package/dist/types/invitationList.d.ts +0 -4
- package/dist/types/invitationList.js +0 -3
- package/dist/types/invitationList.js.map +0 -1
- package/dist/types/invitationOptions.d.ts +0 -4
- package/dist/types/invitationOptions.js +0 -3
- package/dist/types/invitationOptions.js.map +0 -1
- package/dist/types/key.d.ts +0 -25
- package/dist/types/key.js +0 -3
- package/dist/types/key.js.map +0 -1
- package/dist/types/keyResponse.d.ts +0 -50
- package/dist/types/keyResponse.js +0 -3
- package/dist/types/keyResponse.js.map +0 -1
- package/dist/types/keyword.d.ts +0 -4
- package/dist/types/keyword.js +0 -3
- package/dist/types/keyword.js.map +0 -1
- package/dist/types/liveTranscriptionOptions.d.ts +0 -148
- package/dist/types/liveTranscriptionOptions.js +0 -3
- package/dist/types/liveTranscriptionOptions.js.map +0 -1
- package/dist/types/liveTranscriptionResponse.d.ts +0 -9
- package/dist/types/liveTranscriptionResponse.js +0 -3
- package/dist/types/liveTranscriptionResponse.js.map +0 -1
- package/dist/types/member.d.ts +0 -7
- package/dist/types/member.js +0 -3
- package/dist/types/member.js.map +0 -1
- package/dist/types/memberList.d.ts +0 -4
- package/dist/types/memberList.js +0 -3
- package/dist/types/memberList.js.map +0 -1
- package/dist/types/message.d.ts +0 -3
- package/dist/types/message.js +0 -3
- package/dist/types/message.js.map +0 -1
- package/dist/types/metadata.d.ts +0 -8
- package/dist/types/metadata.js +0 -3
- package/dist/types/metadata.js.map +0 -1
- package/dist/types/prerecordedTranscriptionOptions.d.ts +0 -126
- package/dist/types/prerecordedTranscriptionOptions.js +0 -3
- package/dist/types/prerecordedTranscriptionOptions.js.map +0 -1
- package/dist/types/prerecordedTranscriptionResponse.d.ts +0 -25
- package/dist/types/prerecordedTranscriptionResponse.js +0 -51
- package/dist/types/prerecordedTranscriptionResponse.js.map +0 -1
- package/dist/types/project.d.ts +0 -17
- package/dist/types/project.js +0 -3
- package/dist/types/project.js.map +0 -1
- package/dist/types/projectPatchResponse.d.ts +0 -6
- package/dist/types/projectPatchResponse.js +0 -3
- package/dist/types/projectPatchResponse.js.map +0 -1
- package/dist/types/projectResponse.d.ts +0 -4
- package/dist/types/projectResponse.js +0 -3
- package/dist/types/projectResponse.js.map +0 -1
- package/dist/types/scopeList.d.ts +0 -3
- package/dist/types/scopeList.js +0 -3
- package/dist/types/scopeList.js.map +0 -1
- package/dist/types/search.d.ts +0 -14
- package/dist/types/search.js +0 -3
- package/dist/types/search.js.map +0 -1
- package/dist/types/transcriptionSource.d.ts +0 -14
- package/dist/types/transcriptionSource.js +0 -3
- package/dist/types/transcriptionSource.js.map +0 -1
- package/dist/types/usageCallback.d.ts +0 -4
- package/dist/types/usageCallback.js +0 -3
- package/dist/types/usageCallback.js.map +0 -1
- package/dist/types/usageField.d.ts +0 -7
- package/dist/types/usageField.js +0 -3
- package/dist/types/usageField.js.map +0 -1
- package/dist/types/usageFieldOptions.d.ts +0 -4
- package/dist/types/usageFieldOptions.js +0 -3
- package/dist/types/usageFieldOptions.js.map +0 -1
- package/dist/types/usageOptions.d.ts +0 -23
- package/dist/types/usageOptions.js +0 -3
- package/dist/types/usageOptions.js.map +0 -1
- package/dist/types/usageRequest.d.ts +0 -11
- package/dist/types/usageRequest.js +0 -3
- package/dist/types/usageRequest.js.map +0 -1
- package/dist/types/usageRequestDetail.d.ts +0 -30
- package/dist/types/usageRequestDetail.js +0 -3
- package/dist/types/usageRequestDetail.js.map +0 -1
- package/dist/types/usageRequestList.d.ts +0 -6
- package/dist/types/usageRequestList.js +0 -3
- package/dist/types/usageRequestList.js.map +0 -1
- package/dist/types/usageRequestListOptions.d.ts +0 -7
- package/dist/types/usageRequestListOptions.js +0 -3
- package/dist/types/usageRequestListOptions.js.map +0 -1
- package/dist/types/usageRequestMessage.d.ts +0 -3
- package/dist/types/usageRequestMessage.js +0 -3
- package/dist/types/usageRequestMessage.js.map +0 -1
- package/dist/types/usageResponse.d.ts +0 -10
- package/dist/types/usageResponse.js +0 -3
- package/dist/types/usageResponse.js.map +0 -1
- package/dist/types/usageResponseDetail.d.ts +0 -6
- package/dist/types/usageResponseDetail.js +0 -3
- package/dist/types/usageResponseDetail.js.map +0 -1
- package/dist/types/utterance.d.ts +0 -39
- package/dist/types/utterance.js +0 -3
- package/dist/types/utterance.js.map +0 -1
- package/dist/types/wordBase.d.ts +0 -8
- package/dist/types/wordBase.js +0 -3
- package/dist/types/wordBase.js.map +0 -1
- package/dist/usage.d.ts +0 -34
- package/dist/usage.js +0 -122
- package/dist/usage.js.map +0 -1
- package/dist/userAgent.d.ts +0 -1
- package/dist/userAgent.js +0 -20
- package/dist/userAgent.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function secondsToTimestamp(seconds: number): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=secondsToTimestamp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"secondsToTimestamp.js","sourceRoot":"","sources":["../../src/helpers/secondsToTimestamp.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAAC,OAAe;IAChD,OAAO,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC/D,CAAC;AAFD,gDAEC"}
|
package/dist/httpRequest.d.ts
DELETED
package/dist/httpRequest.js
DELETED
|
@@ -1,91 +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
|
-
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
|
-
//# sourceMappingURL=httpRequest.js.map
|
package/dist/httpRequest.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpRequest.js","sourceRoot":"","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CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACK,mCAAgB,GAAxB;QACE,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;SAC5C;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SACtE;IACH,CAAC;IACH,eAAC;AAAD,CAAC,AAzCD,IAyCC;AAzCY,4BAAQ"}
|
package/dist/invitation.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/invitation.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Invitation = void 0;
|
|
40
|
-
var httpRequest_1 = require("./httpRequest");
|
|
41
|
-
var Invitation = /** @class */ (function () {
|
|
42
|
-
function Invitation(_credentials, _apiUrl) {
|
|
43
|
-
this._credentials = _credentials;
|
|
44
|
-
this._apiUrl = _apiUrl;
|
|
45
|
-
this.apiPath = "/v1/projects";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Lists all the current invites of a specified project.
|
|
49
|
-
* @param projectId Unique identifier of the project
|
|
50
|
-
*/
|
|
51
|
-
Invitation.prototype.list = function (projectId) {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/invites"))];
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Sends an invitation to join the specified project.
|
|
60
|
-
* @param projectId Unique identifier of the project
|
|
61
|
-
*/
|
|
62
|
-
Invitation.prototype.send = function (projectId, options) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
-
return __generator(this, function (_a) {
|
|
65
|
-
return [2 /*return*/, (0, httpRequest_1._request)("POST", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/invites"), JSON.stringify({
|
|
66
|
-
email: options.email,
|
|
67
|
-
scope: options.scope,
|
|
68
|
-
}))];
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Removes the authenticated account from the specified project.
|
|
74
|
-
* @param projectId Unique identifier of the project
|
|
75
|
-
*/
|
|
76
|
-
Invitation.prototype.leave = function (projectId) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
-
return __generator(this, function (_a) {
|
|
79
|
-
return [2 /*return*/, (0, httpRequest_1._request)("DELETE", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/leave"))];
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Removes the specified email from the invitations on the specified project.
|
|
85
|
-
* @param projectId Unique identifier of the project
|
|
86
|
-
* @param email email address of the invitee
|
|
87
|
-
* NOTE: This will return successful even if the email does not have an invite on the project.
|
|
88
|
-
*/
|
|
89
|
-
Invitation.prototype.delete = function (projectId, email) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
return __generator(this, function (_a) {
|
|
92
|
-
return [2 /*return*/, (0, httpRequest_1._request)("DELETE", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/invites/").concat(email))];
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
return Invitation;
|
|
97
|
-
}());
|
|
98
|
-
exports.Invitation = Invitation;
|
|
99
|
-
//# sourceMappingURL=invitation.js.map
|
package/dist/invitation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invitation.js","sourceRoot":"","sources":["../src/invitation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,oBAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;;OAGG;IACG,yBAAI,GAAV,UAAW,SAAiB;;;gBAC1B,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,aAAU,CACvC,EAAC;;;KACH;IAED;;;OAGG;IACG,yBAAI,GAAV,UAAW,SAAiB,EAAE,OAA0B;;;gBACtD,sBAAO,IAAA,sBAAQ,EACb,MAAM,EACN,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,aAAU,EACtC,IAAI,CAAC,SAAS,CAAC;wBACb,KAAK,EAAE,OAAO,CAAC,KAAK;wBACpB,KAAK,EAAE,OAAO,CAAC,KAAK;qBACrB,CAAC,CACH,EAAC;;;KACH;IAED;;;OAGG;IACG,0BAAK,GAAX,UAAY,SAAiB;;;gBAC3B,sBAAO,IAAA,sBAAQ,EACb,QAAQ,EACR,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,WAAQ,CACrC,EAAC;;;KACH;IAED;;;;;OAKG;IACG,2BAAM,GAAZ,UAAa,SAAiB,EAAE,KAAa;;;gBAC3C,sBAAO,IAAA,sBAAQ,EACb,QAAQ,EACR,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,sBAAY,KAAK,CAAE,CAChD,EAAC;;;KACH;IACH,iBAAC;AAAD,CAAC,AA9DD,IA8DC;AA9DY,gCAAU"}
|
package/dist/keys.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { CreateKeyOptions, KeyResponse, Key } from "./types";
|
|
2
|
-
export declare class Keys {
|
|
3
|
-
private _credentials;
|
|
4
|
-
private _apiUrl;
|
|
5
|
-
constructor(_credentials: string, _apiUrl: string);
|
|
6
|
-
private apiPath;
|
|
7
|
-
/**
|
|
8
|
-
* Retrieves all keys associated with the provided projectId
|
|
9
|
-
* @param projectId Unique identifier of the project containing API keys
|
|
10
|
-
*/
|
|
11
|
-
list(projectId: string): Promise<KeyResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves a specific key associated with the provided projectId
|
|
14
|
-
* @param projectId Unique identifier of the project containing API keys
|
|
15
|
-
* @param keyId Unique identifier for the key to retrieve
|
|
16
|
-
*/
|
|
17
|
-
get(projectId: string, keyId: string): Promise<Key>;
|
|
18
|
-
/**
|
|
19
|
-
* Creates an API key with the provided scopes
|
|
20
|
-
* @param projectId Unique identifier of the project to create an API key under
|
|
21
|
-
* @param comment Comment to describe the key
|
|
22
|
-
* @param scopes Permission scopes associated with the API key
|
|
23
|
-
* @param options Optional options used when creating API keys
|
|
24
|
-
*/
|
|
25
|
-
create(projectId: string, comment: string, scopes: Array<string>, options?: CreateKeyOptions): Promise<Key>;
|
|
26
|
-
/**
|
|
27
|
-
* Deletes an API key
|
|
28
|
-
* @param projectId Unique identifier of the project to create an API key under
|
|
29
|
-
* @param keyId Unique identifier for the key to delete
|
|
30
|
-
*/
|
|
31
|
-
delete(projectId: string, keyId: string): Promise<void>;
|
|
32
|
-
}
|
package/dist/keys.js
DELETED
|
@@ -1,132 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.Keys = void 0;
|
|
51
|
-
var httpRequest_1 = require("./httpRequest");
|
|
52
|
-
var Keys = /** @class */ (function () {
|
|
53
|
-
function Keys(_credentials, _apiUrl) {
|
|
54
|
-
this._credentials = _credentials;
|
|
55
|
-
this._apiUrl = _apiUrl;
|
|
56
|
-
this.apiPath = "/v1/projects";
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves all keys associated with the provided projectId
|
|
60
|
-
* @param projectId Unique identifier of the project containing API keys
|
|
61
|
-
*/
|
|
62
|
-
Keys.prototype.list = function (projectId) {
|
|
63
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
64
|
-
var response, output;
|
|
65
|
-
return __generator(this, function (_a) {
|
|
66
|
-
switch (_a.label) {
|
|
67
|
-
case 0: return [4 /*yield*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/keys"))];
|
|
68
|
-
case 1:
|
|
69
|
-
response = _a.sent();
|
|
70
|
-
output = response.api_keys.map(function (apiKey) {
|
|
71
|
-
return __assign(__assign({}, apiKey), apiKey.api_key);
|
|
72
|
-
});
|
|
73
|
-
return [2 /*return*/, { api_keys: output }];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Retrieves a specific key associated with the provided projectId
|
|
80
|
-
* @param projectId Unique identifier of the project containing API keys
|
|
81
|
-
* @param keyId Unique identifier for the key to retrieve
|
|
82
|
-
*/
|
|
83
|
-
Keys.prototype.get = function (projectId, keyId) {
|
|
84
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
85
|
-
return __generator(this, function (_a) {
|
|
86
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/keys/").concat(keyId))];
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Creates an API key with the provided scopes
|
|
92
|
-
* @param projectId Unique identifier of the project to create an API key under
|
|
93
|
-
* @param comment Comment to describe the key
|
|
94
|
-
* @param scopes Permission scopes associated with the API key
|
|
95
|
-
* @param options Optional options used when creating API keys
|
|
96
|
-
*/
|
|
97
|
-
Keys.prototype.create = function (projectId, comment, scopes, options) {
|
|
98
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
99
|
-
return __generator(this, function (_a) {
|
|
100
|
-
/** Throw an error if the user provided both expirationDate and timeToLive */
|
|
101
|
-
if (options &&
|
|
102
|
-
options.expirationDate !== undefined &&
|
|
103
|
-
options.timeToLive !== undefined) {
|
|
104
|
-
throw new Error("Please provide expirationDate or timeToLive or neither. Providing both is not allowed.");
|
|
105
|
-
}
|
|
106
|
-
return [2 /*return*/, (0, httpRequest_1._request)("POST", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/keys"), JSON.stringify({
|
|
107
|
-
comment: comment,
|
|
108
|
-
scopes: scopes,
|
|
109
|
-
expiration_date: options && options.expirationDate
|
|
110
|
-
? options.expirationDate
|
|
111
|
-
: undefined,
|
|
112
|
-
time_to_live_in_seconds: options && options.timeToLive ? options.timeToLive : undefined,
|
|
113
|
-
}))];
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Deletes an API key
|
|
119
|
-
* @param projectId Unique identifier of the project to create an API key under
|
|
120
|
-
* @param keyId Unique identifier for the key to delete
|
|
121
|
-
*/
|
|
122
|
-
Keys.prototype.delete = function (projectId, keyId) {
|
|
123
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
-
return __generator(this, function (_a) {
|
|
125
|
-
return [2 /*return*/, (0, httpRequest_1._request)("DELETE", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/keys/").concat(keyId))];
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
|
-
return Keys;
|
|
130
|
-
}());
|
|
131
|
-
exports.Keys = Keys;
|
|
132
|
-
//# sourceMappingURL=keys.js.map
|
package/dist/keys.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,cAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;;OAGG;IACG,mBAAI,GAAV,UAAW,SAAiB;;;;;4BACT,qBAAM,IAAA,sBAAQ,EAC7B,KAAK,E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AC,CAAC,SAAS;qBACjE,CAAC,CACH,EAAC;;;KACH;IAED;;;;OAIG;IACG,qBAAM,GAAZ,UAAa,SAAiB,EAAE,KAAa;;;gBAC3C,sBAAO,IAAA,sBAAQ,EACb,QAAQ,EACR,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,mBAAS,KAAK,CAAE,CAC7C,EAAC;;;KACH;IACH,WAAC;AAAD,CAAC,AAhGD,IAgGC;AAhGY,oBAAI"}
|
package/dist/members.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { MemberList, Message } from "./types";
|
|
2
|
-
export declare class Members {
|
|
3
|
-
private _credentials;
|
|
4
|
-
private _apiUrl;
|
|
5
|
-
constructor(_credentials: string, _apiUrl: string);
|
|
6
|
-
private apiPath;
|
|
7
|
-
/**
|
|
8
|
-
* Retrieves account objects for all of the accounts in the specified project.
|
|
9
|
-
* @param projectId Unique identifier of the project
|
|
10
|
-
*/
|
|
11
|
-
listMembers(projectId: string): Promise<MemberList>;
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves account objects for all of the accounts in the specified project.
|
|
14
|
-
* @param projectId Unique identifier of the project
|
|
15
|
-
* @param memberId Unique identifier of the member
|
|
16
|
-
*/
|
|
17
|
-
removeMember(projectId: string, memberId: string): Promise<Message>;
|
|
18
|
-
}
|
package/dist/members.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Members = void 0;
|
|
40
|
-
var httpRequest_1 = require("./httpRequest");
|
|
41
|
-
var Members = /** @class */ (function () {
|
|
42
|
-
function Members(_credentials, _apiUrl) {
|
|
43
|
-
this._credentials = _credentials;
|
|
44
|
-
this._apiUrl = _apiUrl;
|
|
45
|
-
this.apiPath = "/v1/projects";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Retrieves account objects for all of the accounts in the specified project.
|
|
49
|
-
* @param projectId Unique identifier of the project
|
|
50
|
-
*/
|
|
51
|
-
Members.prototype.listMembers = function (projectId) {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/members"))];
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Retrieves account objects for all of the accounts in the specified project.
|
|
60
|
-
* @param projectId Unique identifier of the project
|
|
61
|
-
* @param memberId Unique identifier of the member
|
|
62
|
-
*/
|
|
63
|
-
Members.prototype.removeMember = function (projectId, memberId) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
-
return __generator(this, function (_a) {
|
|
66
|
-
return [2 /*return*/, (0, httpRequest_1._request)("DELETE", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId, "/members/").concat(memberId))];
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
return Members;
|
|
71
|
-
}());
|
|
72
|
-
exports.Members = Members;
|
|
73
|
-
//# sourceMappingURL=members.js.map
|
package/dist/members.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"members.js","sourceRoot":"","sources":["../src/members.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,iBAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;;OAGG;IACG,6BAAW,GAAjB,UAAkB,SAAiB;;;gBACjC,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,aAAU,CACvC,EAAC;;;KACH;IAED;;;;OAIG;IACG,8BAAY,GAAlB,UAAmB,SAAiB,EAAE,QAAgB;;;gBACpD,sBAAO,IAAA,sBAAQ,EACb,QAAQ,EACR,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,SAAS,sBAAY,QAAQ,CAAE,CACnD,EAAC;;;KACH;IACH,cAAC;AAAD,CAAC,AA/BD,IA+BC;AA/BY,0BAAO"}
|
package/dist/projects.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Project, ProjectPatchResponse, ProjectResponse } from "./types";
|
|
2
|
-
export declare class Projects {
|
|
3
|
-
private _credentials;
|
|
4
|
-
private _apiUrl;
|
|
5
|
-
constructor(_credentials: string, _apiUrl: string);
|
|
6
|
-
private apiPath;
|
|
7
|
-
/**
|
|
8
|
-
* Returns all projects accessible by the API key
|
|
9
|
-
*/
|
|
10
|
-
list(): Promise<ProjectResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Retrieves a specific project based on the provided projectId
|
|
13
|
-
* @param projectId Unique identifier of the project to retrieve
|
|
14
|
-
*/
|
|
15
|
-
get(projectId: string): Promise<Project>;
|
|
16
|
-
/**
|
|
17
|
-
* Update a specific project
|
|
18
|
-
* @param project project to update
|
|
19
|
-
*/
|
|
20
|
-
update(project: Project): Promise<ProjectPatchResponse>;
|
|
21
|
-
}
|
package/dist/projects.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Projects = void 0;
|
|
40
|
-
var httpRequest_1 = require("./httpRequest");
|
|
41
|
-
var Projects = /** @class */ (function () {
|
|
42
|
-
function Projects(_credentials, _apiUrl) {
|
|
43
|
-
this._credentials = _credentials;
|
|
44
|
-
this._apiUrl = _apiUrl;
|
|
45
|
-
this.apiPath = "/v1/projects";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns all projects accessible by the API key
|
|
49
|
-
*/
|
|
50
|
-
Projects.prototype.list = function () {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, this.apiPath)];
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves a specific project based on the provided projectId
|
|
59
|
-
* @param projectId Unique identifier of the project to retrieve
|
|
60
|
-
*/
|
|
61
|
-
Projects.prototype.get = function (projectId) {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
-
return __generator(this, function (_a) {
|
|
64
|
-
return [2 /*return*/, (0, httpRequest_1._request)("GET", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(projectId))];
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Update a specific project
|
|
70
|
-
* @param project project to update
|
|
71
|
-
*/
|
|
72
|
-
Projects.prototype.update = function (project) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
return [2 /*return*/, (0, httpRequest_1._request)("PATCH", this._credentials, this._apiUrl, "".concat(this.apiPath, "/").concat(project.project_id))];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
return Projects;
|
|
80
|
-
}());
|
|
81
|
-
exports.Projects = Projects;
|
|
82
|
-
//# sourceMappingURL=projects.js.map
|
package/dist/projects.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../src/projects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AAGzC;IACE,kBAAoB,YAAoB,EAAU,OAAe;QAA7C,iBAAY,GAAZ,YAAY,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAEzD,YAAO,GAAG,cAAc,CAAC;IAFmC,CAAC;IAIrE;;OAEG;IACG,uBAAI,GAAV;;;gBACE,sBAAO,IAAA,sBAAQ,EACb,KAAK,EACL,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,CACb,EAAC;;;KACH;IAED;;;OAGG;IACG,sBAAG,GAAT,UAAU,SAAiB;;;gBACzB,sBAAO,IAAA,sBAAQ,EACb,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,UAAa,OAAgB;;;gBAC3B,sBAAO,IAAA,sBAAQ,EACb,OAAO,EACP,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,UAAG,IAAI,CAAC,OAAO,cAAI,OAAO,CAAC,UAAU,CAAE,CACxC,EAAC;;;KACH;IACH,eAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,4BAAQ"}
|