@supernova-studio/client 0.55.3 → 0.55.4

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.55.3",
3
+ "version": "0.55.4",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -1,3 +1,4 @@
1
+ import { UserProfileUpdate } from "@supernova-studio/model";
1
2
  import { z } from "zod";
2
3
 
3
4
  /**
@@ -22,6 +23,9 @@ export const DTOUserGetResponse = z.object({
22
23
  user: DTOUser,
23
24
  });
24
25
 
26
+ export const DTOUserProfileUpdate = UserProfileUpdate;
27
+
25
28
  export type DTOUserProfile = z.infer<typeof DTOUserProfile>;
26
29
  export type DTOUser = z.infer<typeof DTOUser>;
27
30
  export type DTOUserGetResponse = z.infer<typeof DTOUserGetResponse>;
31
+ export type DTOUserProfileUpdate = z.infer<typeof DTOUserProfileUpdate>;
@@ -1,4 +1,5 @@
1
- import { DTOUserWorkspaceMembershipsResponse } from "../dto";
1
+ import { UserProfileUpdate } from "@supernova-studio/model";
2
+ import { DTOUserProfileUpdate, DTOUserWorkspaceMembershipsResponse } from "../dto";
2
3
  import { DTOAuthenticatedUserResponse } from "../dto/users/authenticated-user";
3
4
  import { RequestExecutor } from "../transport/request-executor";
4
5
 
@@ -16,4 +17,11 @@ export class UsersEndpoint {
16
17
  delete(uid: string) {
17
18
  return this.requestExecutor.json(`/users/${uid}`, DTOAuthenticatedUserResponse, { method: "DELETE" });
18
19
  }
20
+
21
+ updateProfile(uid: string, body: DTOUserProfileUpdate) {
22
+ return this.requestExecutor.json(`/users/${uid}/profile`, DTOAuthenticatedUserResponse, {
23
+ method: "PUT",
24
+ body,
25
+ });
26
+ }
19
27
  }