@antlur/backstage 1.2.1 → 1.2.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.
@@ -7,5 +7,9 @@ class WebsiteService extends base_1.BaseService {
7
7
  const res = await this.client.get("/websites");
8
8
  return res.data[0];
9
9
  }
10
+ async routes() {
11
+ const website = await this.getWebsite();
12
+ return this.client.get(`/websites/${website.id}/routes`);
13
+ }
10
14
  }
11
15
  exports.WebsiteService = WebsiteService;
@@ -2,5 +2,6 @@ import { Website } from "../types";
2
2
  import { BaseService } from "./base";
3
3
  export declare class WebsiteService extends BaseService {
4
4
  getWebsite(): Promise<Website>;
5
+ routes(): Promise<string[]>;
5
6
  }
6
7
  //# sourceMappingURL=website.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"website.d.ts","sourceRoot":"","sources":["../../../src/endpoints/website.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,cAAe,SAAQ,WAAW;IACvC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;CAIrC"}
1
+ {"version":3,"file":"website.d.ts","sourceRoot":"","sources":["../../../src/endpoints/website.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,cAAe,SAAQ,WAAW;IACvC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAK9B,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAKlC"}
@@ -4,4 +4,8 @@ export class WebsiteService extends BaseService {
4
4
  const res = await this.client.get("/websites");
5
5
  return res.data[0];
6
6
  }
7
+ async routes() {
8
+ const website = await this.getWebsite();
9
+ return this.client.get(`/websites/${website.id}/routes`);
10
+ }
7
11
  }
@@ -2,5 +2,6 @@ import { Website } from "../types";
2
2
  import { BaseService } from "./base";
3
3
  export declare class WebsiteService extends BaseService {
4
4
  getWebsite(): Promise<Website>;
5
+ routes(): Promise<string[]>;
5
6
  }
6
7
  //# sourceMappingURL=website.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"website.d.ts","sourceRoot":"","sources":["../../../src/endpoints/website.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,cAAe,SAAQ,WAAW;IACvC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;CAIrC"}
1
+ {"version":3,"file":"website.d.ts","sourceRoot":"","sources":["../../../src/endpoints/website.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,qBAAa,cAAe,SAAQ,WAAW;IACvC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAK9B,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAKlC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antlur/backstage",
3
3
  "author": "Anthony Holmes",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "description": "A simple client for Backstage CMS",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "module": "./dist/esm/index.js",
@@ -6,4 +6,10 @@ export class WebsiteService extends BaseService {
6
6
  const res = await this.client.get<ApiCollectionResponse<Website>>("/websites");
7
7
  return res.data[0];
8
8
  }
9
+
10
+ async routes(): Promise<string[]> {
11
+ const website = await this.getWebsite();
12
+
13
+ return this.client.get<string[]>(`/websites/${website.id}/routes`);
14
+ }
9
15
  }