-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathroles.js
55 lines (54 loc) · 1.26 KB
/
roles.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
import {
clearApiCache,
invokeFetch
} from "./chunks/WY7IOA3Q.js";
import "./chunks/V3TZ54UE.js";
import "./chunks/2ZQ3ZX7F.js";
// src/public/rest/roles.ts
var getRoles = async (query, options) => invokeFetch("roles", {
method: "get",
pathTemplate: "/api/v1/roles",
query,
options
});
var createRole = async (body, options) => invokeFetch("roles", {
method: "post",
pathTemplate: "/api/v1/roles",
body,
contentType: "application/json",
options
});
var deleteRole = async (id, options) => invokeFetch("roles", {
method: "delete",
pathTemplate: "/api/v1/roles/{id}",
pathVariables: { id },
options
});
var getRole = async (id, options) => invokeFetch("roles", {
method: "get",
pathTemplate: "/api/v1/roles/{id}",
pathVariables: { id },
options
});
var patchRole = async (id, body, options) => invokeFetch("roles", {
method: "patch",
pathTemplate: "/api/v1/roles/{id}",
pathVariables: { id },
body,
contentType: "application/json",
options
});
function clearCache() {
return clearApiCache("roles");
}
var rolesExport = { getRoles, createRole, deleteRole, getRole, patchRole, clearCache };
var roles_default = rolesExport;
export {
clearCache,
createRole,
roles_default as default,
deleteRole,
getRole,
getRoles,
patchRole
};