@livechat/developer-studio-api 2.0.57 → 2.0.59
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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -0
- package/dist/index.mjs +15 -0
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -2183,6 +2183,7 @@ declare const api: {
|
|
|
2183
2183
|
keys: GitHubRepositoryHook[];
|
|
2184
2184
|
} | undefined>;
|
|
2185
2185
|
getFile(path: string, repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<any>;
|
|
2186
|
+
getCommits(repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<{}[]>;
|
|
2186
2187
|
commitFiles(data: {
|
|
2187
2188
|
repositoryName: string;
|
|
2188
2189
|
repositoryBranch: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2183,6 +2183,7 @@ declare const api: {
|
|
|
2183
2183
|
keys: GitHubRepositoryHook[];
|
|
2184
2184
|
} | undefined>;
|
|
2185
2185
|
getFile(path: string, repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<any>;
|
|
2186
|
+
getCommits(repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<{}[]>;
|
|
2186
2187
|
commitFiles(data: {
|
|
2187
2188
|
repositoryName: string;
|
|
2188
2189
|
repositoryBranch: string;
|
package/dist/index.js
CHANGED
|
@@ -405,6 +405,8 @@ var gitHubRepositoryApi = {
|
|
|
405
405
|
})
|
|
406
406
|
);
|
|
407
407
|
repository = response2.data;
|
|
408
|
+
const commits = yield this.getCommits(repository.full_name);
|
|
409
|
+
console.log(commits);
|
|
408
410
|
} else {
|
|
409
411
|
const response2 = yield githubClientInstance.post(
|
|
410
412
|
`/user/repos`,
|
|
@@ -563,6 +565,19 @@ var gitHubRepositoryApi = {
|
|
|
563
565
|
return data;
|
|
564
566
|
});
|
|
565
567
|
},
|
|
568
|
+
getCommits(repositoryName, authorization) {
|
|
569
|
+
return __async(this, null, function* () {
|
|
570
|
+
var _a;
|
|
571
|
+
const { data: commits } = yield githubClientInstance.get(
|
|
572
|
+
`/repos/${repositoryName}/git/commits`,
|
|
573
|
+
getGithubClientRequestConfig({
|
|
574
|
+
token: (_a = authorization == null ? void 0 : authorization.tokens) == null ? void 0 : _a.app,
|
|
575
|
+
ensureAuthorizationToken: true
|
|
576
|
+
})
|
|
577
|
+
);
|
|
578
|
+
return commits;
|
|
579
|
+
});
|
|
580
|
+
},
|
|
566
581
|
commitFiles(data, authorization) {
|
|
567
582
|
return __async(this, null, function* () {
|
|
568
583
|
var _a, _b, _c, _d, _e;
|
package/dist/index.mjs
CHANGED
|
@@ -318,6 +318,8 @@ var gitHubRepositoryApi = {
|
|
|
318
318
|
})
|
|
319
319
|
);
|
|
320
320
|
repository = response2.data;
|
|
321
|
+
const commits = yield this.getCommits(repository.full_name);
|
|
322
|
+
console.log(commits);
|
|
321
323
|
} else {
|
|
322
324
|
const response2 = yield githubClientInstance.post(
|
|
323
325
|
`/user/repos`,
|
|
@@ -476,6 +478,19 @@ var gitHubRepositoryApi = {
|
|
|
476
478
|
return data;
|
|
477
479
|
});
|
|
478
480
|
},
|
|
481
|
+
getCommits(repositoryName, authorization) {
|
|
482
|
+
return __async(this, null, function* () {
|
|
483
|
+
var _a;
|
|
484
|
+
const { data: commits } = yield githubClientInstance.get(
|
|
485
|
+
`/repos/${repositoryName}/git/commits`,
|
|
486
|
+
getGithubClientRequestConfig({
|
|
487
|
+
token: (_a = authorization == null ? void 0 : authorization.tokens) == null ? void 0 : _a.app,
|
|
488
|
+
ensureAuthorizationToken: true
|
|
489
|
+
})
|
|
490
|
+
);
|
|
491
|
+
return commits;
|
|
492
|
+
});
|
|
493
|
+
},
|
|
479
494
|
commitFiles(data, authorization) {
|
|
480
495
|
return __async(this, null, function* () {
|
|
481
496
|
var _a, _b, _c, _d, _e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.59",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"@types/node": "^17.0.12",
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
|
-
"config": "0.0.0",
|
|
21
20
|
"eslint-config-custom-lib": "0.0.1",
|
|
21
|
+
"tsconfig": "0.0.0",
|
|
22
22
|
"types": "0.0.1",
|
|
23
|
-
"
|
|
23
|
+
"config": "0.0.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|