-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathitems.js
87 lines (86 loc) · 2 KB
/
items.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
import {
clearApiCache,
invokeFetch
} from "./chunks/YKZ2QYHN.js";
import "./chunks/DLKLPD7T.js";
import "./chunks/2ZQ3ZX7F.js";
// src/public/rest/items.ts
var getItems = async (query, options) => invokeFetch("items", {
method: "get",
pathTemplate: "/api/v1/items",
query,
options
});
var getItemsSettings = async (options) => invokeFetch("items", {
method: "get",
pathTemplate: "/api/v1/items/settings",
options
});
var patchItemsSettings = async (body, options) => invokeFetch("items", {
method: "patch",
pathTemplate: "/api/v1/items/settings",
body,
contentType: "application/json",
options
});
var deleteItem = async (itemId, options) => invokeFetch("items", {
method: "delete",
pathTemplate: "/api/v1/items/{itemId}",
pathVariables: { itemId },
options
});
var getItem = async (itemId, options) => invokeFetch("items", {
method: "get",
pathTemplate: "/api/v1/items/{itemId}",
pathVariables: { itemId },
options
});
var updateItem = async (itemId, body, options) => invokeFetch("items", {
method: "put",
pathTemplate: "/api/v1/items/{itemId}",
pathVariables: { itemId },
body,
contentType: "application/json",
options
});
var getItemCollections = async (itemId, query, options) => invokeFetch("items", {
method: "get",
pathTemplate: "/api/v1/items/{itemId}/collections",
pathVariables: { itemId },
query,
options
});
var getPublishedItems = async (itemId, query, options) => invokeFetch("items", {
method: "get",
pathTemplate: "/api/v1/items/{itemId}/publisheditems",
pathVariables: { itemId },
query,
options
});
function clearCache() {
return clearApiCache("items");
}
var itemsExport = {
getItems,
getItemsSettings,
patchItemsSettings,
deleteItem,
getItem,
updateItem,
getItemCollections,
getPublishedItems,
clearCache
};
var items_default = itemsExport;
export {
clearCache,
items_default as default,
deleteItem,
getItem,
getItemCollections,
getItems,
getItemsSettings,
getPublishedItems,
patchItemsSettings,
updateItem
};