@supernova-studio/client 0.57.16 → 0.57.17

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.57.16",
3
+ "version": "0.57.17",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ import { DTOUser } from "../users";
3
+
4
+ export const DTODesignSystemContactsResponse = z.object({
5
+ contacts: z.object({
6
+ workspace: z.array(DTOUser),
7
+ designSystem: z.array(DTOUser),
8
+ }),
9
+ });
10
+
11
+ export type DTODesignSystemContactsResponse = z.infer<typeof DTODesignSystemContactsResponse>;
@@ -1,4 +1,5 @@
1
1
  export * from "./brand";
2
+ export * from "./contact";
2
3
  export * from "./data-source";
3
4
  export * from "./design-system";
4
5
  export * from "./elements-diff";
@@ -0,0 +1,12 @@
1
+ import { DTODesignSystemContactsResponse } from "../../dto";
2
+ import { RequestExecutor } from "../../transport/request-executor";
3
+
4
+ export class DesignSystemContactsEndpoint {
5
+ constructor(private readonly requestExecutor: RequestExecutor) {}
6
+
7
+ list(dsId: string) {
8
+ return this.requestExecutor.json(`/design-systems/${dsId}/contacts`, DTODesignSystemContactsResponse, {
9
+ method: "GET",
10
+ });
11
+ }
12
+ }
@@ -6,18 +6,21 @@ import { DesignSystemBffEndpoint } from "./bff";
6
6
  import { DesignSystemMembersEndpoint } from "./members";
7
7
  import { DesignSystemSourcesEndpoint } from "./sources";
8
8
  import { DesignSystemVersionsEndpoint } from "./versions/versions";
9
+ import { DesignSystemContactsEndpoint } from "./contact";
9
10
 
10
11
  export class DesignSystemsEndpoint {
11
12
  readonly members: DesignSystemMembersEndpoint;
12
13
  readonly versions: DesignSystemVersionsEndpoint;
13
14
  readonly bff: DesignSystemBffEndpoint;
14
15
  readonly sources: DesignSystemSourcesEndpoint;
16
+ readonly contacts: DesignSystemContactsEndpoint;
15
17
 
16
18
  constructor(private readonly requestExecutor: RequestExecutor) {
17
19
  this.members = new DesignSystemMembersEndpoint(requestExecutor);
18
20
  this.versions = new DesignSystemVersionsEndpoint(requestExecutor);
19
21
  this.bff = new DesignSystemBffEndpoint(requestExecutor);
20
22
  this.sources = new DesignSystemSourcesEndpoint(requestExecutor);
23
+ this.contacts = new DesignSystemContactsEndpoint(requestExecutor);
21
24
  }
22
25
 
23
26
  create(body: DTODesignSystemCreateInput) {
@@ -1,5 +1,6 @@
1
1
  export * from "./versions";
2
2
  export * from "./bff";
3
+ export * from "./contact";
3
4
  export * from "./design-systems";
4
5
  export * from "./members";
5
6
  export * from "./sources";