@excali-boards/boards-api-client 1.1.30 → 1.1.32

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.
@@ -4,20 +4,23 @@ import { BoardsManager } from '../core/manager';
4
4
  export declare class APIUsers {
5
5
  private web;
6
6
  constructor(web: BoardsManager);
7
- getCurrentUser({ auth }: UsersFunctionsInput['getCurrentUser']): Promise<import("..").WebResponse<GetUsersOutput>>;
8
- updateUser({ auth, body }: UsersFunctionsInput['updateUser']): Promise<import("..").WebResponse<string>>;
9
- deleteAccount({ auth }: UsersFunctionsInput['deleteAccount']): Promise<import("..").WebResponse<void>>;
7
+ getUser({ auth, userId }: UsersFunctionsInput['getCurrentUser']): Promise<import("..").WebResponse<GetUsersOutput>>;
8
+ updateUser({ auth, userId, body }: UsersFunctionsInput['updateUser']): Promise<import("..").WebResponse<string>>;
9
+ deleteAccount({ auth, userId }: UsersFunctionsInput['deleteAccount']): Promise<import("..").WebResponse<void>>;
10
10
  }
11
11
  export type UsersFunctionsInput = {
12
12
  'getCurrentUser': {
13
13
  auth: string;
14
+ userId?: string;
14
15
  };
15
16
  'updateUser': {
16
17
  auth: string;
18
+ userId?: string;
17
19
  body: UserInput;
18
20
  };
19
21
  'deleteAccount': {
20
22
  auth: string;
23
+ userId?: string;
21
24
  };
22
25
  'isCurrentUserDev': {
23
26
  auth: string;
@@ -28,5 +31,6 @@ export type GetUsersOutput = DBUserPartialType & {
28
31
  };
29
32
  export type UserInput = {
30
33
  mainGroupId?: string | null;
34
+ displayName?: string;
31
35
  platform?: Platforms;
32
36
  };
@@ -8,22 +8,22 @@ class APIUsers {
8
8
  this.web = web;
9
9
  }
10
10
  // Methods.
11
- async getCurrentUser({ auth }) {
11
+ async getUser({ auth, userId }) {
12
12
  return await this.web.request({
13
13
  method: 'GET', auth,
14
- endpoint: this.web.qp('/users'),
14
+ endpoint: this.web.qp('/users' + (userId ? `/${userId}` : '')),
15
15
  });
16
16
  }
17
- async updateUser({ auth, body }) {
17
+ async updateUser({ auth, userId, body }) {
18
18
  return await this.web.request({
19
19
  method: 'PATCH', auth, body,
20
- endpoint: this.web.qp('/users'),
20
+ endpoint: this.web.qp('/users' + (userId ? `/${userId}` : '')),
21
21
  });
22
22
  }
23
- async deleteAccount({ auth }) {
23
+ async deleteAccount({ auth, userId }) {
24
24
  return await this.web.request({
25
25
  method: 'DELETE', auth,
26
- endpoint: this.web.qp('/users'),
26
+ endpoint: this.web.qp('/users' + (userId ? `/${userId}` : '')),
27
27
  });
28
28
  }
29
29
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.30",
2
+ "version": "1.1.32",
3
3
  "name": "@excali-boards/boards-api-client",
4
4
  "description": "A simple API client for the Boards API.",
5
5
  "repository": "https://github.com/Excali-Boards/boards-api-client",