api-client-fideicomisos 1.4.0 → 1.6.0
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/client.d.ts +91 -26
- package/dist/client.js +4 -4
- package/dist/enpoints/backoffice/blog.d.ts +19 -7
- package/dist/enpoints/backoffice/blog.js +127 -85
- package/dist/enpoints/backoffice/homePage.d.ts +20 -0
- package/dist/enpoints/backoffice/homePage.js +92 -0
- package/dist/enpoints/backoffice/institucional.d.ts +11 -8
- package/dist/enpoints/backoffice/institucional.js +53 -32
- package/dist/enpoints/backoffice/proyectos.d.ts +48 -0
- package/dist/enpoints/backoffice/proyectos.js +174 -0
- package/dist/enpoints/backoffice/queHacemos.d.ts +26 -0
- package/dist/enpoints/backoffice/queHacemos.js +101 -0
- package/package.json +1 -1
- package/src/client.js +3 -3
- package/src/enpoints/backoffice/blog.js +72 -34
- package/src/enpoints/backoffice/homePage.js +84 -0
- package/src/enpoints/backoffice/institucional.js +32 -10
- package/src/enpoints/backoffice/proyectos.js +160 -0
- package/src/enpoints/backoffice/queHacemos.js +90 -0
- package/src/enpoints/backoffice/cardHomePage.js +0 -32
- package/src/enpoints/backoffice/companies.js +0 -67
- package/src/enpoints/backoffice/videoSection.js +0 -32
|
@@ -1,31 +1,4 @@
|
|
|
1
1
|
function companies({ client }) {
|
|
2
|
-
// ------------------BLOG SECTION-------------------
|
|
3
|
-
function getBlogSection({ jwtToken }) {
|
|
4
|
-
if (!jwtToken) throw new Error("Token is required");
|
|
5
|
-
return client({
|
|
6
|
-
url: `/api/blog-section`,
|
|
7
|
-
method: "get",
|
|
8
|
-
headers: {
|
|
9
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function updateBlogSection({ jwtToken, data }) {
|
|
15
|
-
if (!jwtToken) throw new Error("jwtToken is required");
|
|
16
|
-
if (!data) throw new Error("data is required");
|
|
17
|
-
|
|
18
|
-
const formattedData = { data: { ...data } };
|
|
19
|
-
return client({
|
|
20
|
-
url: `/api/blog-section`,
|
|
21
|
-
method: "put",
|
|
22
|
-
headers: {
|
|
23
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
24
|
-
},
|
|
25
|
-
data: formattedData,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
2
|
// ------------------CADA BLOG-------------------
|
|
30
3
|
function getByIdBlog({ blogId }) {
|
|
31
4
|
if (!blogId) throw new Error("blogId is required");
|
|
@@ -99,7 +72,7 @@ function companies({ client }) {
|
|
|
99
72
|
function getByIdTopic({ topicId }) {
|
|
100
73
|
if (!topicId) throw new Error("topicId is required");
|
|
101
74
|
return client({
|
|
102
|
-
url: `/api/
|
|
75
|
+
url: `/api/topics/${topicId}`,
|
|
103
76
|
method: "get",
|
|
104
77
|
});
|
|
105
78
|
}
|
|
@@ -107,7 +80,7 @@ function companies({ client }) {
|
|
|
107
80
|
function getAllTopic({ jwtToken }) {
|
|
108
81
|
if (!jwtToken) throw new Error("jwtToken is required");
|
|
109
82
|
return client({
|
|
110
|
-
url: `/api/
|
|
83
|
+
url: `/api/topics`,
|
|
111
84
|
method: "get",
|
|
112
85
|
headers: {
|
|
113
86
|
Authorization: `Bearer ${jwtToken}`,
|
|
@@ -121,7 +94,7 @@ function companies({ client }) {
|
|
|
121
94
|
if (!data) throw new Error("data is required");
|
|
122
95
|
const formattedData = { data: { ...data } };
|
|
123
96
|
return client({
|
|
124
|
-
url: `/api/
|
|
97
|
+
url: `/api/topics/${topicId}`,
|
|
125
98
|
method: "put",
|
|
126
99
|
headers: {
|
|
127
100
|
Authorization: `Bearer ${jwtToken}`,
|
|
@@ -136,7 +109,7 @@ function companies({ client }) {
|
|
|
136
109
|
|
|
137
110
|
const formattedData = { data: { ...data } };
|
|
138
111
|
return client({
|
|
139
|
-
url: "/api/
|
|
112
|
+
url: "/api/topics",
|
|
140
113
|
method: "post",
|
|
141
114
|
headers: {
|
|
142
115
|
Authorization: `Bearer ${jwtToken}`,
|
|
@@ -150,7 +123,69 @@ function companies({ client }) {
|
|
|
150
123
|
if (!topicId) throw new Error("topicId is required");
|
|
151
124
|
|
|
152
125
|
return client({
|
|
153
|
-
url: `/api/
|
|
126
|
+
url: `/api/topics/${topicId}`,
|
|
127
|
+
method: "delete",
|
|
128
|
+
headers: {
|
|
129
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//------------------- CATEGORIAS -------------------
|
|
134
|
+
function getCategorieId({ categorieId }) {
|
|
135
|
+
if (!categorieId) throw new Error("categorieId is required");
|
|
136
|
+
return client({
|
|
137
|
+
url: `/api/categories/${categorieId}`,
|
|
138
|
+
method: "get",
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function getAllCategories({ jwtToken }) {
|
|
143
|
+
if (!jwtToken) throw new Error("jwtToken is required");
|
|
144
|
+
return client({
|
|
145
|
+
url: `/api/categories`,
|
|
146
|
+
method: "get",
|
|
147
|
+
headers: {
|
|
148
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function updateCategorie({ jwtToken, categorieId, data }) {
|
|
154
|
+
if (!jwtToken) throw new Error("jwtToken is required");
|
|
155
|
+
if (!categorieId) throw new Error("categorieId is required");
|
|
156
|
+
if (!data) throw new Error("data is required");
|
|
157
|
+
const formattedData = { data: { ...data } };
|
|
158
|
+
return client({
|
|
159
|
+
url: `/api/categories/${categorieId}`,
|
|
160
|
+
method: "put",
|
|
161
|
+
headers: {
|
|
162
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
163
|
+
},
|
|
164
|
+
data: formattedData,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function createCategorie({ jwtToken, data }) {
|
|
169
|
+
if (!jwtToken) throw new Error("jwtToken is required");
|
|
170
|
+
if (!data) throw new Error("data is required");
|
|
171
|
+
|
|
172
|
+
const formattedData = { data: { ...data } };
|
|
173
|
+
return client({
|
|
174
|
+
url: "/api/categories",
|
|
175
|
+
method: "post",
|
|
176
|
+
headers: {
|
|
177
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
178
|
+
},
|
|
179
|
+
data: formattedData,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function deleteCategorie({ jwtToken, categorieId }) {
|
|
184
|
+
if (!jwtToken) throw new Error("jwtToken is required");
|
|
185
|
+
if (!categorieId) throw new Error("topicId is required");
|
|
186
|
+
|
|
187
|
+
return client({
|
|
188
|
+
url: `/api/categories/${categorieId}`,
|
|
154
189
|
method: "delete",
|
|
155
190
|
headers: {
|
|
156
191
|
Authorization: `Bearer ${jwtToken}`,
|
|
@@ -222,8 +257,6 @@ function companies({ client }) {
|
|
|
222
257
|
});
|
|
223
258
|
}
|
|
224
259
|
return {
|
|
225
|
-
getBlogSection,
|
|
226
|
-
updateBlogSection,
|
|
227
260
|
getByIdBlog,
|
|
228
261
|
getAllBlogs,
|
|
229
262
|
updateBlog,
|
|
@@ -239,6 +272,11 @@ function companies({ client }) {
|
|
|
239
272
|
deleteFile,
|
|
240
273
|
createFile,
|
|
241
274
|
getMediaById,
|
|
275
|
+
createCategorie,
|
|
276
|
+
deleteCategorie,
|
|
277
|
+
getCategorieId,
|
|
278
|
+
getAllCategories,
|
|
279
|
+
updateCategorie,
|
|
242
280
|
};
|
|
243
281
|
}
|
|
244
282
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
function home({ client }) {
|
|
2
|
+
function getCardHome(jwtToken) {
|
|
3
|
+
return client({
|
|
4
|
+
url: `/api/hero`,
|
|
5
|
+
method: "get",
|
|
6
|
+
headers: {
|
|
7
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function updateHome({ jwtToken, data }) {
|
|
12
|
+
const formattedData = {
|
|
13
|
+
data: {
|
|
14
|
+
...data,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
return client({
|
|
18
|
+
url: `/api/hero`,
|
|
19
|
+
method: "put",
|
|
20
|
+
headers: {
|
|
21
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
22
|
+
},
|
|
23
|
+
data: formattedData,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function getComoTrabajamos(jwtToken) {
|
|
27
|
+
return client({
|
|
28
|
+
url: `/api/como-trabajamo`,
|
|
29
|
+
method: "get",
|
|
30
|
+
headers: {
|
|
31
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function updateComoTrabajamos({ jwtToken, data }) {
|
|
36
|
+
const formattedData = {
|
|
37
|
+
data: {
|
|
38
|
+
...data,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
return client({
|
|
42
|
+
url: `/api/como-trabajamo`,
|
|
43
|
+
method: "put",
|
|
44
|
+
headers: {
|
|
45
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
46
|
+
},
|
|
47
|
+
data: formattedData,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function getContador(jwtToken) {
|
|
51
|
+
return client({
|
|
52
|
+
url: `/api/contador`,
|
|
53
|
+
method: "get",
|
|
54
|
+
headers: {
|
|
55
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function updateContador({ jwtToken, data }) {
|
|
60
|
+
const formattedData = {
|
|
61
|
+
data: {
|
|
62
|
+
...data,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
return client({
|
|
66
|
+
url: `/api/contador`,
|
|
67
|
+
method: "put",
|
|
68
|
+
headers: {
|
|
69
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
70
|
+
},
|
|
71
|
+
data: formattedData,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
updateHome,
|
|
77
|
+
getCardHome,
|
|
78
|
+
getComoTrabajamos,
|
|
79
|
+
updateComoTrabajamos,
|
|
80
|
+
getContador,
|
|
81
|
+
updateContador,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
module.exports = home;
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
function institucional({ client }) {
|
|
2
|
+
// ------------------ENFOQUE-------------------
|
|
3
|
+
function getNuestroEnfoque({ jwtToken }) {
|
|
4
|
+
return client({
|
|
5
|
+
url: "/api/enfoque",
|
|
6
|
+
method: "get",
|
|
7
|
+
headers: {
|
|
8
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function updateNuestroEnfoque({ jwtToken, data }) {
|
|
13
|
+
const formattedData = {
|
|
14
|
+
data: {
|
|
15
|
+
...data,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
return client({
|
|
19
|
+
url: "/api/enfoque",
|
|
20
|
+
method: "put",
|
|
21
|
+
headers: {
|
|
22
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
23
|
+
},
|
|
24
|
+
data: formattedData,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
2
28
|
// ------------------INSTITUCIONAL-------------------
|
|
3
29
|
function getInstitucional({ jwtToken }) {
|
|
4
30
|
return client({
|
|
@@ -32,13 +58,10 @@ function institucional({ client }) {
|
|
|
32
58
|
method: "get",
|
|
33
59
|
});
|
|
34
60
|
}
|
|
35
|
-
function getMembers(
|
|
61
|
+
function getMembers() {
|
|
36
62
|
return client({
|
|
37
63
|
url: `/api/member-teams`,
|
|
38
64
|
method: "get",
|
|
39
|
-
headers: {
|
|
40
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
41
|
-
},
|
|
42
65
|
});
|
|
43
66
|
}
|
|
44
67
|
function updateMember({ jwtToken, memberId, data }) {
|
|
@@ -82,19 +105,16 @@ function institucional({ client }) {
|
|
|
82
105
|
}
|
|
83
106
|
// ------------------AREAS-------------------
|
|
84
107
|
|
|
85
|
-
function getByIdArea({
|
|
108
|
+
function getByIdArea({ areaId }) {
|
|
86
109
|
return client({
|
|
87
|
-
url: `/api/
|
|
110
|
+
url: `/api/areas-teams/${areaId}`,
|
|
88
111
|
method: "get",
|
|
89
112
|
});
|
|
90
113
|
}
|
|
91
|
-
function getAreas(
|
|
114
|
+
function getAreas() {
|
|
92
115
|
return client({
|
|
93
116
|
url: `/api/areas-teams`,
|
|
94
117
|
method: "get",
|
|
95
|
-
headers: {
|
|
96
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
97
|
-
},
|
|
98
118
|
});
|
|
99
119
|
}
|
|
100
120
|
function updateArea({ jwtToken, areaId, data }) {
|
|
@@ -149,6 +169,8 @@ function institucional({ client }) {
|
|
|
149
169
|
updateArea,
|
|
150
170
|
createArea,
|
|
151
171
|
deleteArea,
|
|
172
|
+
getNuestroEnfoque,
|
|
173
|
+
updateNuestroEnfoque,
|
|
152
174
|
};
|
|
153
175
|
}
|
|
154
176
|
module.exports = institucional;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
function companies({ client }) {
|
|
2
|
+
// ------------------PROYECTOS-------------------
|
|
3
|
+
function getById({ projectId }) {
|
|
4
|
+
return client({
|
|
5
|
+
url: `/api/projects/${projectId}`,
|
|
6
|
+
method: "get",
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function getProjects({ jwtToken }) {
|
|
11
|
+
return client({
|
|
12
|
+
url: `/api/projects`,
|
|
13
|
+
method: "get",
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function updateProjects({ jwtToken, projectId, data }) {
|
|
20
|
+
const formattedData = {
|
|
21
|
+
data: {
|
|
22
|
+
...data,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
return client({
|
|
26
|
+
url: `/api/projects/${projectId}`,
|
|
27
|
+
method: "put",
|
|
28
|
+
headers: {
|
|
29
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
30
|
+
},
|
|
31
|
+
data: formattedData,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function createCompanie({ jwtToken, data }) {
|
|
35
|
+
const formattedData = {
|
|
36
|
+
data: {
|
|
37
|
+
...data,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
return client({
|
|
41
|
+
url: "/api/projects",
|
|
42
|
+
method: "post",
|
|
43
|
+
headers: {
|
|
44
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
45
|
+
},
|
|
46
|
+
data: formattedData,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function deleteCompanie({ jwtToken, projectId }) {
|
|
51
|
+
return client({
|
|
52
|
+
url: `/api/projects/${projectId}`,
|
|
53
|
+
method: "delete",
|
|
54
|
+
headers: {
|
|
55
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//----------------------ALIADOS-------------------
|
|
61
|
+
|
|
62
|
+
function getByIdAlido({ aliadoId }) {
|
|
63
|
+
return client({
|
|
64
|
+
url: `/api/aliados/${aliadoId}`,
|
|
65
|
+
method: "get",
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function getAliados({ jwtToken }) {
|
|
70
|
+
return client({
|
|
71
|
+
url: `/api/aliados`,
|
|
72
|
+
method: "get",
|
|
73
|
+
headers: {
|
|
74
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function updateAliado({ jwtToken, aliadoId, data }) {
|
|
79
|
+
const formattedData = {
|
|
80
|
+
data: {
|
|
81
|
+
...data,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
return client({
|
|
85
|
+
url: `/api/aliados/${aliadoId}`,
|
|
86
|
+
method: "put",
|
|
87
|
+
headers: {
|
|
88
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
89
|
+
},
|
|
90
|
+
data: formattedData,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function createAliado({ jwtToken, data }) {
|
|
94
|
+
const formattedData = {
|
|
95
|
+
data: {
|
|
96
|
+
...data,
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
return client({
|
|
100
|
+
url: "/api/aliados",
|
|
101
|
+
method: "post",
|
|
102
|
+
headers: {
|
|
103
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
104
|
+
},
|
|
105
|
+
data: formattedData,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function deleteAliados({ jwtToken, aliadoId }) {
|
|
110
|
+
return client({
|
|
111
|
+
url: `/api/aliados/${aliadoId}`,
|
|
112
|
+
method: "delete",
|
|
113
|
+
headers: {
|
|
114
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//-------------------NUESTROS PROYECTOS
|
|
120
|
+
function getNuestrosProyectosSection(jwtToken) {
|
|
121
|
+
return client({
|
|
122
|
+
url: `/api/nuestros-proyecto`,
|
|
123
|
+
method: "get",
|
|
124
|
+
headers: {
|
|
125
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function updateNuestrosProyectosSection({ jwtToken, data }) {
|
|
130
|
+
const formattedData = {
|
|
131
|
+
data: {
|
|
132
|
+
...data,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
return client({
|
|
136
|
+
url: `/api/nuestros-proyecto`,
|
|
137
|
+
method: "put",
|
|
138
|
+
headers: {
|
|
139
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
140
|
+
},
|
|
141
|
+
data: formattedData,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return {
|
|
146
|
+
getById,
|
|
147
|
+
getProjects,
|
|
148
|
+
updateProjects,
|
|
149
|
+
createCompanie,
|
|
150
|
+
deleteCompanie,
|
|
151
|
+
getByIdAlido,
|
|
152
|
+
getAliados,
|
|
153
|
+
updateAliado,
|
|
154
|
+
createAliado,
|
|
155
|
+
deleteAliados,
|
|
156
|
+
getNuestrosProyectosSection,
|
|
157
|
+
updateNuestrosProyectosSection,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
module.exports = companies;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
function queHacemoSeccion({ client }) {
|
|
2
|
+
// ------------------QUE HACEMOS-------------------
|
|
3
|
+
function getQueHacemos({ jwtToken }) {
|
|
4
|
+
return client({
|
|
5
|
+
url: "/api/que-hacemo",
|
|
6
|
+
method: "get",
|
|
7
|
+
headers: {
|
|
8
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function updateQueHacemos({ jwtToken, data }) {
|
|
13
|
+
const formattedData = {
|
|
14
|
+
data: {
|
|
15
|
+
...data,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
return client({
|
|
19
|
+
url: "/api/que-hacemo",
|
|
20
|
+
method: "put",
|
|
21
|
+
headers: {
|
|
22
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
23
|
+
},
|
|
24
|
+
data: formattedData,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ------------------APORTES-------------------
|
|
29
|
+
function getAporte({ jwtToken }) {
|
|
30
|
+
return client({
|
|
31
|
+
url: "/api/aporte",
|
|
32
|
+
method: "get",
|
|
33
|
+
headers: {
|
|
34
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function updateAporte({ jwtToken, data }) {
|
|
39
|
+
const formattedData = {
|
|
40
|
+
data: {
|
|
41
|
+
...data,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
return client({
|
|
45
|
+
url: "/api/aporte",
|
|
46
|
+
method: "put",
|
|
47
|
+
headers: {
|
|
48
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
49
|
+
},
|
|
50
|
+
data: formattedData,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//----------------- PROYECTOS SECCION --------------
|
|
55
|
+
|
|
56
|
+
function getSeccionProyectos({ jwtToken }) {
|
|
57
|
+
return client({
|
|
58
|
+
url: "/api/projects-que-hacemo",
|
|
59
|
+
method: "get",
|
|
60
|
+
headers: {
|
|
61
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function updateSeccionProyectos({ jwtToken, data }) {
|
|
66
|
+
const formattedData = {
|
|
67
|
+
data: {
|
|
68
|
+
...data,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
return client({
|
|
72
|
+
url: "/api/projects-que-hacemo",
|
|
73
|
+
method: "put",
|
|
74
|
+
headers: {
|
|
75
|
+
Authorization: `Bearer ${jwtToken}`,
|
|
76
|
+
},
|
|
77
|
+
data: formattedData,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
getQueHacemos,
|
|
83
|
+
updateQueHacemos,
|
|
84
|
+
getAporte,
|
|
85
|
+
updateAporte,
|
|
86
|
+
getSeccionProyectos,
|
|
87
|
+
updateSeccionProyectos,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
module.exports = queHacemoSeccion;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
function homeFondos({ client }) {
|
|
2
|
-
function getAllPanel(jwtToken) {
|
|
3
|
-
return client({
|
|
4
|
-
url: `/api/card-home`,
|
|
5
|
-
method: "get",
|
|
6
|
-
headers: {
|
|
7
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function updateHome({ jwtToken, data }) {
|
|
12
|
-
const formattedData = {
|
|
13
|
-
data: {
|
|
14
|
-
...data,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
return client({
|
|
18
|
-
url: `/api/card-home`,
|
|
19
|
-
method: "put",
|
|
20
|
-
headers: {
|
|
21
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
22
|
-
},
|
|
23
|
-
data: formattedData,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
updateHome,
|
|
29
|
-
getAllPanel,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
module.exports = homeFondos;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
function companies({ client }) {
|
|
2
|
-
// ------------------MIEMBROS DE AREAS-------------------
|
|
3
|
-
|
|
4
|
-
function getById({ companieId }) {
|
|
5
|
-
return client({
|
|
6
|
-
url: `/api/companies/${companieId}`,
|
|
7
|
-
method: "get",
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function getCompanies({ jwtToken }) {
|
|
11
|
-
return client({
|
|
12
|
-
url: `/api/companies`,
|
|
13
|
-
method: "get",
|
|
14
|
-
headers: {
|
|
15
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function updateCompanie({ jwtToken, companieId, data }) {
|
|
20
|
-
const formattedData = {
|
|
21
|
-
data: {
|
|
22
|
-
...data,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
return client({
|
|
26
|
-
url: `/api/companies/${companieId}`,
|
|
27
|
-
method: "put",
|
|
28
|
-
headers: {
|
|
29
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
30
|
-
},
|
|
31
|
-
data: formattedData,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function createCompanie({ jwtToken, data }) {
|
|
35
|
-
const formattedData = {
|
|
36
|
-
data: {
|
|
37
|
-
...data,
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
return client({
|
|
41
|
-
url: "/api/companies",
|
|
42
|
-
method: "post",
|
|
43
|
-
headers: {
|
|
44
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
45
|
-
},
|
|
46
|
-
data: formattedData,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function deleteCompanie({ jwtToken, companieId }) {
|
|
50
|
-
return client({
|
|
51
|
-
url: `/api/companies/${companieId}`,
|
|
52
|
-
method: "delete",
|
|
53
|
-
headers: {
|
|
54
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
getById,
|
|
61
|
-
getCompanies,
|
|
62
|
-
updateCompanie,
|
|
63
|
-
createCompanie,
|
|
64
|
-
deleteCompanie,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
module.exports = companies;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
function videoHome({ client }) {
|
|
2
|
-
function getAllPanel(jwtToken) {
|
|
3
|
-
return client({
|
|
4
|
-
url: `/api/video-home`,
|
|
5
|
-
method: "get",
|
|
6
|
-
headers: {
|
|
7
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
function updateVideo({ jwtToken, data }) {
|
|
12
|
-
const formattedData = {
|
|
13
|
-
data: {
|
|
14
|
-
...data,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
return client({
|
|
18
|
-
url: `/api/video-home`,
|
|
19
|
-
method: "put",
|
|
20
|
-
headers: {
|
|
21
|
-
Authorization: `Bearer ${jwtToken}`,
|
|
22
|
-
},
|
|
23
|
-
data: formattedData,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
updateVideo,
|
|
29
|
-
getAllPanel,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
module.exports = videoHome;
|