@livechat/developer-studio-api 2.0.58 → 2.0.60
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 +13 -2
- package/dist/index.mjs +13 -2
- package/package.json +2 -2
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
|
@@ -455,7 +455,6 @@ var gitHubRepositoryApi = {
|
|
|
455
455
|
return __async(this, null, function* () {
|
|
456
456
|
const upsert = (sha) => __async(this, null, function* () {
|
|
457
457
|
var _a;
|
|
458
|
-
console.log("sha: ", sha);
|
|
459
458
|
const response = yield githubClientInstance.put(
|
|
460
459
|
`/repos/${repositoryName}/contents/livechat.config.json`,
|
|
461
460
|
{
|
|
@@ -486,7 +485,6 @@ var gitHubRepositoryApi = {
|
|
|
486
485
|
seed = yield this.getRepositorySeed(repositoryName, authorization);
|
|
487
486
|
} catch (e) {
|
|
488
487
|
}
|
|
489
|
-
console.log("seed: ", seed);
|
|
490
488
|
return yield upsert(seed == null ? void 0 : seed.sha);
|
|
491
489
|
});
|
|
492
490
|
},
|
|
@@ -565,6 +563,19 @@ var gitHubRepositoryApi = {
|
|
|
565
563
|
return data;
|
|
566
564
|
});
|
|
567
565
|
},
|
|
566
|
+
getCommits(repositoryName, authorization) {
|
|
567
|
+
return __async(this, null, function* () {
|
|
568
|
+
var _a;
|
|
569
|
+
const { data: commits } = yield githubClientInstance.get(
|
|
570
|
+
`/repos/${repositoryName}/git/commits`,
|
|
571
|
+
getGithubClientRequestConfig({
|
|
572
|
+
token: (_a = authorization == null ? void 0 : authorization.tokens) == null ? void 0 : _a.app,
|
|
573
|
+
ensureAuthorizationToken: true
|
|
574
|
+
})
|
|
575
|
+
);
|
|
576
|
+
return commits;
|
|
577
|
+
});
|
|
578
|
+
},
|
|
568
579
|
commitFiles(data, authorization) {
|
|
569
580
|
return __async(this, null, function* () {
|
|
570
581
|
var _a, _b, _c, _d, _e;
|
package/dist/index.mjs
CHANGED
|
@@ -368,7 +368,6 @@ var gitHubRepositoryApi = {
|
|
|
368
368
|
return __async(this, null, function* () {
|
|
369
369
|
const upsert = (sha) => __async(this, null, function* () {
|
|
370
370
|
var _a;
|
|
371
|
-
console.log("sha: ", sha);
|
|
372
371
|
const response = yield githubClientInstance.put(
|
|
373
372
|
`/repos/${repositoryName}/contents/livechat.config.json`,
|
|
374
373
|
{
|
|
@@ -399,7 +398,6 @@ var gitHubRepositoryApi = {
|
|
|
399
398
|
seed = yield this.getRepositorySeed(repositoryName, authorization);
|
|
400
399
|
} catch (e) {
|
|
401
400
|
}
|
|
402
|
-
console.log("seed: ", seed);
|
|
403
401
|
return yield upsert(seed == null ? void 0 : seed.sha);
|
|
404
402
|
});
|
|
405
403
|
},
|
|
@@ -478,6 +476,19 @@ var gitHubRepositoryApi = {
|
|
|
478
476
|
return data;
|
|
479
477
|
});
|
|
480
478
|
},
|
|
479
|
+
getCommits(repositoryName, authorization) {
|
|
480
|
+
return __async(this, null, function* () {
|
|
481
|
+
var _a;
|
|
482
|
+
const { data: commits } = yield githubClientInstance.get(
|
|
483
|
+
`/repos/${repositoryName}/git/commits`,
|
|
484
|
+
getGithubClientRequestConfig({
|
|
485
|
+
token: (_a = authorization == null ? void 0 : authorization.tokens) == null ? void 0 : _a.app,
|
|
486
|
+
ensureAuthorizationToken: true
|
|
487
|
+
})
|
|
488
|
+
);
|
|
489
|
+
return commits;
|
|
490
|
+
});
|
|
491
|
+
},
|
|
481
492
|
commitFiles(data, authorization) {
|
|
482
493
|
return __async(this, null, function* () {
|
|
483
494
|
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.60",
|
|
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,9 +17,9 @@
|
|
|
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",
|
|
22
21
|
"tsconfig": "0.0.0",
|
|
22
|
+
"config": "0.0.0",
|
|
23
23
|
"types": "0.0.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|