@excali-boards/boards-api-client 1.1.31 → 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.
- package/dist/classes/users.d.ts +6 -3
- package/dist/classes/users.js +6 -6
- package/package.json +1 -1
package/dist/classes/users.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/dist/classes/users.js
CHANGED
|
@@ -8,22 +8,22 @@ class APIUsers {
|
|
|
8
8
|
this.web = web;
|
|
9
9
|
}
|
|
10
10
|
// Methods.
|
|
11
|
-
async
|
|
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