-
Notifications
You must be signed in to change notification settings - Fork 3
/
users.js
104 lines (103 loc) · 2.26 KB
/
users.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import {
clearApiCache,
invokeFetch
} from "./chunks/SMQGR3VM.js";
import "./chunks/3KD5W26Z.js";
import "./chunks/2ZQ3ZX7F.js";
// src/public/rest/users.ts
var getUsers = async (query, options) => invokeFetch("users", {
method: "get",
pathTemplate: "/api/v1/users",
query,
options
});
var createUser = async (body, options) => invokeFetch("users", {
method: "post",
pathTemplate: "/api/v1/users",
body,
contentType: "application/json",
options
});
var countUsers = async (query, options) => invokeFetch("users", {
method: "get",
pathTemplate: "/api/v1/users/actions/count",
query,
options
});
var filterUsers = async (query, body, options) => invokeFetch("users", {
method: "post",
pathTemplate: "/api/v1/users/actions/filter",
query,
body,
contentType: "application/json",
options
});
var inviteUsers = async (body, options) => invokeFetch("users", {
method: "post",
pathTemplate: "/api/v1/users/actions/invite",
body,
contentType: "application/json",
options
});
var getMyUser = async (options) => invokeFetch("users", {
method: "get",
pathTemplate: "/api/v1/users/me",
options
});
var getUsersMetadata = async (options) => invokeFetch("users", {
method: "get",
pathTemplate: "/api/v1/users/metadata",
options
});
var deleteUser = async (userId, options) => invokeFetch("users", {
method: "delete",
pathTemplate: "/api/v1/users/{userId}",
pathVariables: { userId },
options
});
var getUser = async (userId, query, options) => invokeFetch("users", {
method: "get",
pathTemplate: "/api/v1/users/{userId}",
pathVariables: { userId },
query,
options
});
var patchUser = async (userId, body, options) => invokeFetch("users", {
method: "patch",
pathTemplate: "/api/v1/users/{userId}",
pathVariables: { userId },
body,
contentType: "application/json",
options
});
function clearCache() {
return clearApiCache("users");
}
var usersExport = {
getUsers,
createUser,
countUsers,
filterUsers,
inviteUsers,
getMyUser,
getUsersMetadata,
deleteUser,
getUser,
patchUser,
clearCache
};
var users_default = usersExport;
export {
clearCache,
countUsers,
createUser,
users_default as default,
deleteUser,
filterUsers,
getMyUser,
getUser,
getUsers,
getUsersMetadata,
inviteUsers,
patchUser
};