@supernova-studio/client 0.59.14 → 0.59.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.59.14",
3
+ "version": "0.59.15",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -7,6 +7,7 @@ import { DesignSystemMembersEndpoint } from "./members";
7
7
  import { DesignSystemSourcesEndpoint } from "./sources";
8
8
  import { DesignSystemVersionsEndpoint } from "./versions/versions";
9
9
  import { DesignSystemContactsEndpoint } from "./contact";
10
+ import { DesignSystemPageRedirectsEndpoint } from "./redirects";
10
11
 
11
12
  export class DesignSystemsEndpoint {
12
13
  readonly members: DesignSystemMembersEndpoint;
@@ -14,6 +15,7 @@ export class DesignSystemsEndpoint {
14
15
  readonly bff: DesignSystemBffEndpoint;
15
16
  readonly sources: DesignSystemSourcesEndpoint;
16
17
  readonly contacts: DesignSystemContactsEndpoint;
18
+ readonly redirects: DesignSystemPageRedirectsEndpoint;
17
19
 
18
20
  constructor(private readonly requestExecutor: RequestExecutor) {
19
21
  this.members = new DesignSystemMembersEndpoint(requestExecutor);
@@ -21,6 +23,7 @@ export class DesignSystemsEndpoint {
21
23
  this.bff = new DesignSystemBffEndpoint(requestExecutor);
22
24
  this.sources = new DesignSystemSourcesEndpoint(requestExecutor);
23
25
  this.contacts = new DesignSystemContactsEndpoint(requestExecutor);
26
+ this.redirects = new DesignSystemPageRedirectsEndpoint(requestExecutor);
24
27
  }
25
28
 
26
29
  create(body: DTODesignSystemCreateInput) {
@@ -3,4 +3,5 @@ export * from "./bff";
3
3
  export * from "./contact";
4
4
  export * from "./design-systems";
5
5
  export * from "./members";
6
+ export * from "./redirects";
6
7
  export * from "./sources";
@@ -0,0 +1,46 @@
1
+ import {
2
+ DTOPageRedirectDeleteResponse,
3
+ DTOPageRedirectListResponse,
4
+ DTOPageRedirectResponse,
5
+ DTOPageRedirectCreateBody,
6
+ DTOPageRedirectUpdateBody,
7
+ } from "../../dto/design-systems/redirects";
8
+ import { RequestExecutor } from "../../transport/request-executor";
9
+
10
+ export class DesignSystemPageRedirectsEndpoint {
11
+ constructor(private readonly requestExecutor: RequestExecutor) {}
12
+
13
+ create(dsId: string, body: DTOPageRedirectCreateBody) {
14
+ return this.requestExecutor.json(`/design-systems/${dsId}/documentation/redirects`, DTOPageRedirectResponse, {
15
+ body,
16
+ method: "POST",
17
+ });
18
+ }
19
+
20
+ list(dsId: string) {
21
+ return this.requestExecutor.json(`/design-systems/${dsId}/documentation/redirects`, DTOPageRedirectListResponse, {
22
+ method: "GET",
23
+ });
24
+ }
25
+
26
+ update(dsId: string, redirectId: string, body: DTOPageRedirectUpdateBody) {
27
+ return this.requestExecutor.json(
28
+ `/design-systems/${dsId}/documentation/redirects/${redirectId}`,
29
+ DTOPageRedirectResponse,
30
+ {
31
+ body,
32
+ method: "PUT",
33
+ }
34
+ );
35
+ }
36
+
37
+ delete(dsId: string, redirectId: string) {
38
+ return this.requestExecutor.json(
39
+ `/design-systems/${dsId}/documentation/redirects/${redirectId}`,
40
+ DTOPageRedirectDeleteResponse,
41
+ {
42
+ method: "DELETE",
43
+ }
44
+ );
45
+ }
46
+ }