@vssue/api-gitlab-v4
Advanced tools
Comparing version 0.1.9 to 0.2.0
324
lib/index.js
@@ -17,3 +17,3 @@ import * as tslib_1 from "tslib"; | ||
this.repo = repo; | ||
this.labels = labels; | ||
this.labels = labels.join(','); | ||
this.clientId = clientId; | ||
@@ -31,2 +31,5 @@ this.clientSecret = clientSecret; | ||
Object.defineProperty(GitlabV4.prototype, "platform", { | ||
/** | ||
* The platform api info | ||
*/ | ||
get: function () { | ||
@@ -37,2 +40,6 @@ return { | ||
version: 'v4', | ||
meta: { | ||
reactable: true, | ||
sortable: true, | ||
}, | ||
}; | ||
@@ -43,3 +50,6 @@ }, | ||
}); | ||
GitlabV4.prototype.redirectAuthorize = function () { | ||
/** | ||
* Redirect to the authorization page of platform. | ||
*/ | ||
GitlabV4.prototype.redirectAuth = function () { | ||
window.location.href = buildURL(concatURL(this.baseURL, 'oauth/authorize'), { | ||
@@ -52,3 +62,11 @@ client_id: this.clientId, | ||
}; | ||
GitlabV4.prototype.handleAuthorize = function () { | ||
/** | ||
* Handle authorization. | ||
* | ||
* @remarks | ||
* If the `code` and `state` exist in the query, and the `state` matches, remove them from query, and try to get the access token. | ||
* | ||
* @return A string for access token, `null` for no authorization code | ||
*/ | ||
GitlabV4.prototype.handleAuth = function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
@@ -78,6 +96,13 @@ var query, code, replaceURL, accessToken; | ||
}; | ||
/** | ||
* Get user access token via `code` | ||
* | ||
* @param options.code - The code from the query | ||
* | ||
* @return User access token | ||
*/ | ||
GitlabV4.prototype.getAccessToken = function (_a) { | ||
var code = _a.code; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var response, accessToken; | ||
var data; | ||
return tslib_1.__generator(this, function (_b) { | ||
@@ -93,5 +118,4 @@ switch (_b.label) { | ||
case 1: | ||
response = _b.sent(); | ||
accessToken = response.data.access_token; | ||
return [2 /*return*/, accessToken]; | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, data.access_token]; | ||
} | ||
@@ -101,6 +125,13 @@ }); | ||
}; | ||
/** | ||
* Get the logined user with access token. | ||
* | ||
* @param options.accessToken - User access token | ||
* | ||
* @return The user | ||
*/ | ||
GitlabV4.prototype.getUser = function (_a) { | ||
var accessToken = _a.accessToken; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var response, user; | ||
var data; | ||
return tslib_1.__generator(this, function (_b) { | ||
@@ -112,5 +143,4 @@ switch (_b.label) { | ||
case 1: | ||
response = _b.sent(); | ||
user = response.data; | ||
return [2 /*return*/, normalizeUser(user)]; | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, normalizeUser(data)]; | ||
} | ||
@@ -120,16 +150,19 @@ }); | ||
}; | ||
GitlabV4.prototype.getIssues = function (_a) { | ||
var accessToken = _a.accessToken; | ||
/** | ||
* Get issue of this page according to the issue id or the issue title | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.issueTitle - The title of issue | ||
* | ||
* @return The raw response of issue | ||
*/ | ||
GitlabV4.prototype.getIssue = function (_a) { | ||
var accessToken = _a.accessToken, issueId = _a.issueId, issueTitle = _a.issueTitle; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var options, response, issues; | ||
var options, data, e_1, data, issue; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
options = { | ||
params: { | ||
labels: this.labels, | ||
// to avoid caching | ||
timestamp: Date.now(), | ||
}, | ||
}; | ||
options = {}; | ||
if (accessToken) { | ||
@@ -140,7 +173,33 @@ options.headers = { | ||
} | ||
if (!issueId) return [3 /*break*/, 5]; | ||
_b.label = 1; | ||
case 1: | ||
_b.trys.push([1, 3, , 4]); | ||
return [4 /*yield*/, this.$http.get("api/v4/projects/" + this._encodedRepo + "/issues/" + issueId, options)]; | ||
case 2: | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, normalizeIssue(data)]; | ||
case 3: | ||
e_1 = _b.sent(); | ||
if (e_1.response && e_1.response.status === 404) { | ||
return [2 /*return*/, null]; | ||
} | ||
else { | ||
throw e_1; | ||
} | ||
return [3 /*break*/, 4]; | ||
case 4: return [3 /*break*/, 7]; | ||
case 5: | ||
options.params = { | ||
labels: this.labels, | ||
order_by: 'created_at', | ||
sort: 'asc', | ||
search: issueTitle, | ||
}; | ||
return [4 /*yield*/, this.$http.get("api/v4/projects/" + this._encodedRepo + "/issues", options)]; | ||
case 1: | ||
response = _b.sent(); | ||
issues = response.data; | ||
return [2 /*return*/, issues.map(normalizeIssue)]; | ||
case 6: | ||
data = (_b.sent()).data; | ||
issue = data.map(normalizeIssue).find(function (item) { return item.title === issueTitle; }); | ||
return [2 /*return*/, issue || null]; | ||
case 7: return [2 /*return*/]; | ||
} | ||
@@ -150,14 +209,26 @@ }); | ||
}; | ||
/** | ||
* Get comments of this page according to the issue id or the issue title | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.query - The query parameters | ||
* | ||
* @return The comments | ||
*/ | ||
GitlabV4.prototype.getComments = function (_a) { | ||
var issueId = _a.issueId, accessToken = _a.accessToken; | ||
var accessToken = _a.accessToken, issueId = _a.issueId, _b = _a.query, _c = _b === void 0 ? {} : _b, _d = _c.page, page = _d === void 0 ? 1 : _d, _e = _c.perPage, perPage = _e === void 0 ? 10 : _e, _f = _c.sort, sort = _f === void 0 ? 'desc' : _f; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var e_1, _b, options, response, comments, getCommentsMeta, _loop_1, comments_1, comments_1_1, comment; | ||
var e_2, _g, options, response, commentsRaw, getCommentsMeta, _loop_1, commentsRaw_1, commentsRaw_1_1, comment; | ||
var _this = this; | ||
return tslib_1.__generator(this, function (_c) { | ||
switch (_c.label) { | ||
return tslib_1.__generator(this, function (_h) { | ||
switch (_h.label) { | ||
case 0: | ||
options = { | ||
params: { | ||
// to avoid caching | ||
timestamp: Date.now(), | ||
// pagination | ||
'page': page, | ||
'per_page': perPage, | ||
'order_by': 'created_at', | ||
'sort': sort, | ||
}, | ||
@@ -172,4 +243,4 @@ }; | ||
case 1: | ||
response = _c.sent(); | ||
comments = response.data; | ||
response = _h.sent(); | ||
commentsRaw = response.data; | ||
getCommentsMeta = []; | ||
@@ -184,2 +255,3 @@ _loop_1 = function (comment) { | ||
return [4 /*yield*/, this.getMarkdownContent({ | ||
accessToken: accessToken, | ||
contentRaw: comment.body, | ||
@@ -200,5 +272,5 @@ })]; | ||
return [4 /*yield*/, this.getCommentReactions({ | ||
accessToken: accessToken, | ||
issueId: issueId, | ||
commentId: comment.id, | ||
accessToken: accessToken, | ||
})]; | ||
@@ -213,18 +285,23 @@ case 1: | ||
try { | ||
for (comments_1 = tslib_1.__values(comments), comments_1_1 = comments_1.next(); !comments_1_1.done; comments_1_1 = comments_1.next()) { | ||
comment = comments_1_1.value; | ||
for (commentsRaw_1 = tslib_1.__values(commentsRaw), commentsRaw_1_1 = commentsRaw_1.next(); !commentsRaw_1_1.done; commentsRaw_1_1 = commentsRaw_1.next()) { | ||
comment = commentsRaw_1_1.value; | ||
_loop_1(comment); | ||
} | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
catch (e_2_1) { e_2 = { error: e_2_1 }; } | ||
finally { | ||
try { | ||
if (comments_1_1 && !comments_1_1.done && (_b = comments_1.return)) _b.call(comments_1); | ||
if (commentsRaw_1_1 && !commentsRaw_1_1.done && (_g = commentsRaw_1.return)) _g.call(commentsRaw_1); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
finally { if (e_2) throw e_2.error; } | ||
} | ||
return [4 /*yield*/, Promise.all(getCommentsMeta)]; | ||
case 2: | ||
_c.sent(); | ||
return [2 /*return*/, comments.map(normalizeComment)]; | ||
_h.sent(); | ||
return [2 /*return*/, { | ||
count: Number(response.headers['x-total']), | ||
page: Number(response.headers['x-page']), | ||
perPage: Number(response.headers['x-per-page']), | ||
data: commentsRaw.map(normalizeComment), | ||
}]; | ||
} | ||
@@ -234,16 +311,55 @@ }); | ||
}; | ||
/** | ||
* Get the parse HTML of markdown content | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.contentRaw - The id of issue | ||
* | ||
* @return `true` if succeed, `false` if failed | ||
*/ | ||
GitlabV4.prototype.getMarkdownContent = function (_a) { | ||
var accessToken = _a.accessToken, contentRaw = _a.contentRaw; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var options, data; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
options = {}; | ||
if (accessToken) { | ||
options.headers = { | ||
'Authorization': "Bearer " + accessToken, | ||
}; | ||
} | ||
return [4 /*yield*/, this.$http.post("api/v4/markdown", { | ||
text: contentRaw, | ||
gfm: true, | ||
}, options)]; | ||
case 1: | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, data.html]; | ||
} | ||
}); | ||
}); | ||
}; | ||
/** | ||
* Get reactions of a cooment | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.commentId - The id of comment | ||
* | ||
* @return The comments | ||
*/ | ||
GitlabV4.prototype.getCommentReactions = function (_a) { | ||
var issueId = _a.issueId, commentId = _a.commentId, accessToken = _a.accessToken; | ||
var accessToken = _a.accessToken, issueId = _a.issueId, commentId = _a.commentId; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var response, reactions; | ||
var data; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.$http.get("api/v4/projects/" + this._encodedRepo + "/issues/" + issueId + "/notes/" + commentId + "/award_emoji", { | ||
params: {}, | ||
headers: { 'Authorization': "Bearer " + accessToken }, | ||
})]; | ||
case 1: | ||
response = _b.sent(); | ||
reactions = response.data; | ||
return [2 /*return*/, normalizeReactions(reactions)]; | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, normalizeReactions(data)]; | ||
} | ||
@@ -253,6 +369,15 @@ }); | ||
}; | ||
/** | ||
* Create a new issue | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.title - The title of issue | ||
* @param options.content - The content of issue | ||
* | ||
* @return The created issue | ||
*/ | ||
GitlabV4.prototype.createIssue = function (_a) { | ||
var title = _a.title, content = _a.content, accessToken = _a.accessToken; | ||
var accessToken = _a.accessToken, title = _a.title, content = _a.content; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var response, issue; | ||
var data; | ||
return tslib_1.__generator(this, function (_b) { | ||
@@ -268,5 +393,4 @@ switch (_b.label) { | ||
case 1: | ||
response = _b.sent(); | ||
issue = response.data; | ||
return [2 /*return*/, normalizeIssue(issue)]; | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, normalizeIssue(data)]; | ||
} | ||
@@ -276,6 +400,15 @@ }); | ||
}; | ||
GitlabV4.prototype.createIssueComment = function (_a) { | ||
var issueId = _a.issueId, content = _a.content, accessToken = _a.accessToken; | ||
/** | ||
* Create a new comment | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.content - The content of comment | ||
* | ||
* @return The created comment | ||
*/ | ||
GitlabV4.prototype.createComment = function (_a) { | ||
var accessToken = _a.accessToken, issueId = _a.issueId, content = _a.content; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var response, comment; | ||
var data; | ||
return tslib_1.__generator(this, function (_b) { | ||
@@ -289,5 +422,4 @@ switch (_b.label) { | ||
case 1: | ||
response = _b.sent(); | ||
comment = response.data; | ||
return [2 /*return*/, normalizeComment(comment)]; | ||
data = (_b.sent()).data; | ||
return [2 /*return*/, normalizeComment(data)]; | ||
} | ||
@@ -297,6 +429,15 @@ }); | ||
}; | ||
/** | ||
* Create a new reaction of issue | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.reaction - The reaction | ||
* | ||
* @return `true` if succeed, `false` if already token | ||
*/ | ||
GitlabV4.prototype.createIssueReaction = function (_a) { | ||
var issueId = _a.issueId, reaction = _a.reaction, accessToken = _a.accessToken; | ||
var accessToken = _a.accessToken, issueId = _a.issueId, reaction = _a.reaction; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var e_2; | ||
var response, e_3; | ||
return tslib_1.__generator(this, function (_b) { | ||
@@ -312,7 +453,13 @@ switch (_b.label) { | ||
case 1: | ||
_b.sent(); | ||
return [2 /*return*/, true]; | ||
response = _b.sent(); | ||
return [2 /*return*/, response.status === 201]; | ||
case 2: | ||
e_2 = _b.sent(); | ||
return [2 /*return*/, false]; | ||
e_3 = _b.sent(); | ||
if (e_3.response && e_3.response.status === 404) { | ||
return [2 /*return*/, false]; | ||
} | ||
else { | ||
throw e_3; | ||
} | ||
return [3 /*break*/, 3]; | ||
case 3: return [2 /*return*/]; | ||
@@ -323,6 +470,16 @@ } | ||
}; | ||
/** | ||
* Create a new reaction of comment | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.commentId - The id of comment | ||
* @param options.reaction - The reaction | ||
* | ||
* @return `true` if succeed, `false` if already token | ||
*/ | ||
GitlabV4.prototype.createCommentReaction = function (_a) { | ||
var issueId = _a.issueId, commentId = _a.commentId, reaction = _a.reaction, accessToken = _a.accessToken; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var e_3; | ||
var response, e_4; | ||
return tslib_1.__generator(this, function (_b) { | ||
@@ -340,7 +497,16 @@ switch (_b.label) { | ||
case 1: | ||
_b.sent(); | ||
return [2 /*return*/, true]; | ||
response = _b.sent(); | ||
return [2 /*return*/, response.status === 201]; | ||
case 2: | ||
e_3 = _b.sent(); | ||
return [2 /*return*/, false]; | ||
e_4 = _b.sent(); | ||
// it could be a bug of gitlab | ||
// if a reaction (award emoji) has already existed, it returns a 404 response with a buggy message | ||
// have submitted a issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/56147 | ||
if (e_4.response && e_4.response.status === 404) { | ||
return [2 /*return*/, false]; | ||
} | ||
else { | ||
throw e_4; | ||
} | ||
return [3 /*break*/, 3]; | ||
case 3: return [2 /*return*/]; | ||
@@ -351,23 +517,5 @@ } | ||
}; | ||
GitlabV4.prototype.getMarkdownContent = function (_a) { | ||
var contentRaw = _a.contentRaw; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var response, content; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, this.$http.post("api/v4/markdown", { | ||
text: contentRaw, | ||
gfm: true, | ||
})]; | ||
case 1: | ||
response = _b.sent(); | ||
content = response.data.html; | ||
return [2 /*return*/, content]; | ||
} | ||
}); | ||
}); | ||
}; | ||
return GitlabV4; | ||
}()); | ||
export default GitlabV4; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQU1BLE9BQU8sS0FHTixNQUFNLE9BQU8sQ0FBQTtBQUVkLE9BQU8sRUFDTCxRQUFRLEVBQ1IsU0FBUyxFQUNULFdBQVcsRUFDWCxVQUFVLEdBQ1gsTUFBTSxjQUFjLENBQUE7QUFFckIsT0FBTyxFQUNMLGFBQWEsRUFDYixjQUFjLEVBQ2QsZ0JBQWdCLEVBQ2hCLGtCQUFrQixFQUNsQixlQUFlLEdBQ2hCLE1BQU0sU0FBUyxDQUFBO0FBRWhCOzs7OztHQUtHO0FBQ0g7SUFvQkUsa0JBQWEsRUFRSztZQVBoQixlQUE4QixFQUE5QixtREFBOEIsRUFDOUIsZ0JBQUssRUFDTCxjQUFJLEVBQ0osa0JBQU0sRUFDTixzQkFBUSxFQUNSLDhCQUFZLEVBQ1osZ0JBQUs7UUFFTCxJQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQTtRQUN0QixJQUFJLENBQUMsS0FBSyxHQUFHLEtBQUssQ0FBQTtRQUNsQixJQUFJLENBQUMsSUFBSSxHQU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FJlcG99L2lzc3Vlcy8ke2lzc3VlSWR9L25vdGVzLyR7Y29tbWVudElkfS9hd2FyZF9lbW9qaWAsIHtcbiAgICAgICAgbmFtZTogbWFwUmVhY3Rpb25OYW1lKHJlYWN0aW9uKSxcbiAgICAgIH0sIHtcbiAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICdBdXRob3JpemF0aW9uJzogYEJlYXJlciAke2FjY2Vzc1Rva2VufWAsXG4gICAgICAgIH0sXG4gICAgICB9KVxuICAgICAgcmV0dXJuIHJlc3BvbnNlLnN0YXR1cyA9PT0gMjAxXG4gICAgfSBjYXRjaCAoZSkge1xuICAgICAgLy8gaXQgY291bGQgYmUgYSBidWcgb2YgZ2l0bGFiXG4gICAgICAvLyBpZiBhIHJlYWN0aW9uIChhd2FyZCBlbW9qaSkgaGFzIGFscmVhZHkgZXhpc3RlZCwgaXQgcmV0dXJucyBhIDQwNCByZXNwb25zZSB3aXRoIGEgYnVnZ3kgbWVzc2FnZVxuICAgICAgLy8gaGF2ZSBzdWJtaXR0ZWQgYSBpc3N1ZTogaHR0cHM6Ly9naXRsYWIuY29tL2dpdGxhYi1vcmcvZ2l0bGFiLWNlL2lzc3Vlcy81NjE0N1xuICAgICAgaWYgKGUucmVzcG9uc2UgJiYgZS5yZXNwb25zZS5zdGF0dXMgPT09IDQwNCkge1xuICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IGVcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiJdfQ== |
@@ -13,2 +13,3 @@ export function normalizeUser(user) { | ||
content: issue.description, | ||
link: issue.web_url, | ||
}; | ||
@@ -48,2 +49,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncy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gIHJldHVybiB7XG4gICAgbGlrZTogcmVhY3Rpb25zLmZpbHRlcihpdGVtID0+IGl0ZW0ubmFtZSA9PT0gJ3RodW1ic3VwJykubGVuZ3RoLFxuICAgIHVubGlrZTogcmVhY3Rpb25zLmZpbHRlcihpdGVtID0+IGl0ZW0ubmFtZSA9PT0gJ3RodW1ic2Rvd24nKS5sZW5ndGgsXG4gICAgaGVhcnQ6IHJlYWN0aW9ucy5maWx0ZXIoaXRlbSA9PiBpdGVtLm5hbWUgPT09ICdoZWFydCcpLmxlbmd0aCxcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gbWFwUmVhY3Rpb25OYW1lIChyZWFjdGlvbjoga2V5b2YgVnNzdWVBUEkuUmVhY3Rpb25zKTogc3RyaW5nIHtcbiAgaWYgKHJlYWN0aW9uID09PSAnbGlrZScpIHJldHVybiAndGh1bWJzdXAnXG4gIGlmIChyZWFjdGlvbiA9PT0gJ3VubGlrZScpIHJldHVybiAndGh1bWJzZG93bidcbiAgcmV0dXJuIHJlYWN0aW9uXG59XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgbm9ybWFsaXplVXNlcixcbiAgbm9ybWFsaXplSXNzdWUsXG4gIG5vcm1hbGl6ZUNvbW1lbnQsXG4gIG5vcm1hbGl6ZVJlYWN0aW9ucyxcbiAgbWFwUmVhY3Rpb25OYW1lLFxufVxuIl19 |
{ | ||
"name": "@vssue/api-gitlab-v4", | ||
"version": "0.1.9", | ||
"version": "0.2.0", | ||
"description": "Vssue api for gitlab v4", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@vssue/utils": "^0.1.2", | ||
"@vssue/utils": "^0.2.0", | ||
"axios": "^0.18.0" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "58b1042ca58ffec75718d48fb0e4026082e39d11" | ||
"gitHead": "b766459604ded3b56082a642a88e211433c7dbc2" | ||
} |
@@ -8,1 +8,6 @@ # @vssue/api-gitlab-v4 | ||
[__Github Repo__](https://github.com/meteorlxy/vssue) | ||
## Features | ||
- Comments sortable: `true` | ||
- Comments reactions: `true` |
@@ -1,2 +0,2 @@ | ||
import { Reactions, VssueAPI, VssueAPIOptions } from 'vssue'; | ||
import { VssueAPI, VssueAPIOptions } from 'vssue'; | ||
import { AxiosInstance } from 'axios'; | ||
@@ -9,3 +9,3 @@ /** | ||
*/ | ||
export default class GitlabV4 implements VssueAPI { | ||
export default class GitlabV4 implements VssueAPI.Instance { | ||
baseURL: string; | ||
@@ -20,43 +20,150 @@ owner: string; | ||
private _encodedRepo; | ||
readonly platform: { | ||
name: string; | ||
link: string; | ||
version: string; | ||
}; | ||
constructor({ baseURL, owner, repo, labels, clientId, clientSecret, state, }: VssueAPIOptions); | ||
redirectAuthorize(): void; | ||
handleAuthorize(): Promise<any>; | ||
/** | ||
* The platform api info | ||
*/ | ||
readonly platform: VssueAPI.Platform; | ||
/** | ||
* Redirect to the authorization page of platform. | ||
*/ | ||
redirectAuth(): void; | ||
/** | ||
* Handle authorization. | ||
* | ||
* @remarks | ||
* If the `code` and `state` exist in the query, and the `state` matches, remove them from query, and try to get the access token. | ||
* | ||
* @return A string for access token, `null` for no authorization code | ||
*/ | ||
handleAuth(): Promise<string | null>; | ||
/** | ||
* Get user access token via `code` | ||
* | ||
* @param options.code - The code from the query | ||
* | ||
* @return User access token | ||
*/ | ||
getAccessToken({ code }: { | ||
code: any; | ||
}): Promise<any>; | ||
code: string; | ||
}): Promise<string>; | ||
/** | ||
* Get the logined user with access token. | ||
* | ||
* @param options.accessToken - User access token | ||
* | ||
* @return The user | ||
*/ | ||
getUser({ accessToken }: { | ||
accessToken: any; | ||
}): Promise<import("vssue").User>; | ||
getIssues({ accessToken }: { | ||
}): Promise<VssueAPI.User>; | ||
/** | ||
* Get issue of this page according to the issue id or the issue title | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.issueTitle - The title of issue | ||
* | ||
* @return The raw response of issue | ||
*/ | ||
getIssue({ accessToken, issueId, issueTitle, }: { | ||
accessToken: any; | ||
}): Promise<any>; | ||
getComments({ issueId, accessToken, }: { | ||
issueId: any; | ||
issueTitle: any; | ||
}): Promise<VssueAPI.Issue | null>; | ||
/** | ||
* Get comments of this page according to the issue id or the issue title | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.query - The query parameters | ||
* | ||
* @return The comments | ||
*/ | ||
getComments({ accessToken, issueId, query: { page, perPage, sort, }, }: { | ||
accessToken: any; | ||
}): Promise<any>; | ||
getCommentReactions({ issueId, commentId, accessToken, }: { | ||
issueId: any; | ||
query?: { | ||
page?: number | undefined; | ||
perPage?: number | undefined; | ||
sort?: string | undefined; | ||
} | undefined; | ||
}): Promise<VssueAPI.Comments>; | ||
/** | ||
* Get the parse HTML of markdown content | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.contentRaw - The id of issue | ||
* | ||
* @return `true` if succeed, `false` if failed | ||
*/ | ||
getMarkdownContent({ accessToken, contentRaw, }: { | ||
accessToken?: string | null; | ||
contentRaw: string; | ||
}): Promise<string>; | ||
/** | ||
* Get reactions of a cooment | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.commentId - The id of comment | ||
* | ||
* @return The comments | ||
*/ | ||
getCommentReactions({ accessToken, issueId, commentId, }: { | ||
accessToken: any; | ||
issueId: any; | ||
commentId: any; | ||
}): Promise<VssueAPI.Reactions>; | ||
/** | ||
* Create a new issue | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.title - The title of issue | ||
* @param options.content - The content of issue | ||
* | ||
* @return The created issue | ||
*/ | ||
createIssue({ accessToken, title, content, }: { | ||
accessToken: any; | ||
}): Promise<Reactions>; | ||
createIssue({ title, content, accessToken, }: { | ||
title: any; | ||
content: any; | ||
}): Promise<VssueAPI.Issue>; | ||
/** | ||
* Create a new comment | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.content - The content of comment | ||
* | ||
* @return The created comment | ||
*/ | ||
createComment({ accessToken, issueId, content, }: { | ||
accessToken: any; | ||
}): Promise<import("vssue").Issue>; | ||
createIssueComment({ issueId, content, accessToken, }: { | ||
issueId: any; | ||
content: any; | ||
}): Promise<VssueAPI.Comment>; | ||
/** | ||
* Create a new reaction of issue | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.reaction - The reaction | ||
* | ||
* @return `true` if succeed, `false` if already token | ||
*/ | ||
createIssueReaction({ accessToken, issueId, reaction, }: { | ||
accessToken: any; | ||
}): Promise<import("vssue").Comment>; | ||
createIssueReaction({ issueId, reaction, accessToken, }: { | ||
issueId: any; | ||
reaction: any; | ||
accessToken: any; | ||
}): Promise<boolean>; | ||
/** | ||
* Create a new reaction of comment | ||
* | ||
* @param options.accessToken - User access token | ||
* @param options.issueId - The id of issue | ||
* @param options.commentId - The id of comment | ||
* @param options.reaction - The reaction | ||
* | ||
* @return `true` if succeed, `false` if already token | ||
*/ | ||
createCommentReaction({ issueId, commentId, reaction, accessToken, }: { | ||
@@ -68,5 +175,2 @@ issueId: any; | ||
}): Promise<boolean>; | ||
getMarkdownContent({ contentRaw }: { | ||
contentRaw: any; | ||
}): Promise<string>; | ||
} |
@@ -1,7 +0,7 @@ | ||
import { User, Issue, Comment, Reactions } from 'vssue'; | ||
export declare function normalizeUser(user: any): User; | ||
export declare function normalizeIssue(issue: any): Issue; | ||
export declare function normalizeComment(comment: any): Comment; | ||
export declare function normalizeReactions(reactions: any): Reactions; | ||
export declare function mapReactionName(reaction: any): any; | ||
import { VssueAPI } from 'vssue'; | ||
export declare function normalizeUser(user: any): VssueAPI.User; | ||
export declare function normalizeIssue(issue: any): VssueAPI.Issue; | ||
export declare function normalizeComment(comment: any): VssueAPI.Comment; | ||
export declare function normalizeReactions(reactions: any): VssueAPI.Reactions; | ||
export declare function mapReactionName(reaction: keyof VssueAPI.Reactions): string; | ||
declare const _default: { | ||
@@ -8,0 +8,0 @@ normalizeUser: typeof normalizeUser; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60788
728
13
1
+ Added@vssue/api-gitlab-v4@0.1.9(transitive)
+ Added@vssue/utils@0.2.0(transitive)
Updated@vssue/utils@^0.2.0