-
Notifications
You must be signed in to change notification settings - Fork 3
/
brands.js
123 lines (122 loc) · 3.31 KB
/
brands.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import {
clearApiCache,
invokeFetch
} from "./chunks/SMQGR3VM.js";
import "./chunks/3KD5W26Z.js";
import "./chunks/2ZQ3ZX7F.js";
// src/public/rest/brands.ts
var getBrands = async (query, options) => invokeFetch("brands", {
method: "get",
pathTemplate: "/api/v1/brands",
query,
options
});
var createBrand = async (body, options) => invokeFetch("brands", {
method: "post",
pathTemplate: "/api/v1/brands",
body,
contentType: "multipart/form-data",
options
});
var getActiveBrand = async (options) => invokeFetch("brands", {
method: "get",
pathTemplate: "/api/v1/brands/active",
options
});
var deleteBrand = async (brandId, options) => invokeFetch("brands", {
method: "delete",
pathTemplate: "/api/v1/brands/{brand-id}",
pathVariables: { "brand-id": brandId },
options
});
var getBrand = async (brandId, options) => invokeFetch("brands", {
method: "get",
pathTemplate: "/api/v1/brands/{brand-id}",
pathVariables: { "brand-id": brandId },
options
});
var patchBrand = async (brandId, body, options) => invokeFetch("brands", {
method: "patch",
pathTemplate: "/api/v1/brands/{brand-id}",
pathVariables: { "brand-id": brandId },
body,
contentType: "application/json",
options
});
var activateBrand = async (brandId, body, options) => invokeFetch("brands", {
method: "post",
pathTemplate: "/api/v1/brands/{brand-id}/actions/activate",
pathVariables: { "brand-id": brandId },
body,
options
});
var deactivateBrand = async (brandId, body, options) => invokeFetch("brands", {
method: "post",
pathTemplate: "/api/v1/brands/{brand-id}/actions/deactivate",
pathVariables: { "brand-id": brandId },
body,
options
});
var deleteBrandFile = async (brandId, brandFileId, options) => invokeFetch("brands", {
method: "delete",
pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}",
pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId },
options
});
var getBrandFile = async (brandId, brandFileId, options) => invokeFetch("brands", {
method: "get",
pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}",
pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId },
options
});
var createBrandFile = async (brandId, brandFileId, body, options) => invokeFetch("brands", {
method: "post",
pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}",
pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId },
body,
contentType: "multipart/form-data",
options
});
var updateBrandFile = async (brandId, brandFileId, body, options) => invokeFetch("brands", {
method: "put",
pathTemplate: "/api/v1/brands/{brand-id}/files/{brand-file-id}",
pathVariables: { "brand-id": brandId, "brand-file-id": brandFileId },
body,
contentType: "multipart/form-data",
options
});
function clearCache() {
return clearApiCache("brands");
}
var brandsExport = {
getBrands,
createBrand,
getActiveBrand,
deleteBrand,
getBrand,
patchBrand,
activateBrand,
deactivateBrand,
deleteBrandFile,
getBrandFile,
createBrandFile,
updateBrandFile,
clearCache
};
var brands_default = brandsExport;
export {
activateBrand,
clearCache,
createBrand,
createBrandFile,
deactivateBrand,
brands_default as default,
deleteBrand,
deleteBrandFile,
getActiveBrand,
getBrand,
getBrandFile,
getBrands,
patchBrand,
updateBrandFile
};