@livechat/developer-studio-api 1.0.8 → 1.0.9

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 CHANGED
@@ -2097,6 +2097,7 @@ declare const api: {
2097
2097
  createRepositoryBuildHook(repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<{
2098
2098
  keys: GitHubRepositoryHook[];
2099
2099
  } | undefined>;
2100
+ getFile(path: string, repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<any>;
2100
2101
  commitFiles(data: {
2101
2102
  repositoryName: string;
2102
2103
  repositoryBranch: string;
package/dist/index.d.ts CHANGED
@@ -2097,6 +2097,7 @@ declare const api: {
2097
2097
  createRepositoryBuildHook(repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<{
2098
2098
  keys: GitHubRepositoryHook[];
2099
2099
  } | undefined>;
2100
+ getFile(path: string, repositoryName: string, authorization?: GithubClientInstanceAuthorization | undefined): Promise<any>;
2100
2101
  commitFiles(data: {
2101
2102
  repositoryName: string;
2102
2103
  repositoryBranch: string;
package/dist/index.js CHANGED
@@ -548,6 +548,19 @@ var gitHubRepositoryApi = {
548
548
  }
549
549
  });
550
550
  },
551
+ getFile(path, repositoryName, authorization) {
552
+ return __async(this, null, function* () {
553
+ var _a;
554
+ const { data } = yield githubClientInstance.get(
555
+ `/repos/${repositoryName}/contents/${path}`,
556
+ getGithubClientRequestConfig({
557
+ token: (_a = authorization == null ? void 0 : authorization.tokens) == null ? void 0 : _a.app,
558
+ ensureAuthorizationToken: true
559
+ })
560
+ );
561
+ return data;
562
+ });
563
+ },
551
564
  commitFiles(data, authorization) {
552
565
  return __async(this, null, function* () {
553
566
  var _a, _b, _c, _d, _e;
package/dist/index.mjs CHANGED
@@ -464,6 +464,19 @@ var gitHubRepositoryApi = {
464
464
  }
465
465
  });
466
466
  },
467
+ getFile(path, repositoryName, authorization) {
468
+ return __async(this, null, function* () {
469
+ var _a;
470
+ const { data } = yield githubClientInstance.get(
471
+ `/repos/${repositoryName}/contents/${path}`,
472
+ getGithubClientRequestConfig({
473
+ token: (_a = authorization == null ? void 0 : authorization.tokens) == null ? void 0 : _a.app,
474
+ ensureAuthorizationToken: true
475
+ })
476
+ );
477
+ return data;
478
+ });
479
+ },
467
480
  commitFiles(data, authorization) {
468
481
  return __async(this, null, function* () {
469
482
  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": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",