@upsnap/strapi 1.0.9 → 1.0.10
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/admin/{App-CZcDoGMB.mjs → App-BIxhBt5_.mjs} +1606 -504
- package/dist/admin/{App-CEvUaGYv.js → App-CH5fBeNI.js} +1605 -503
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +100 -1
- package/dist/server/index.mjs +100 -1
- package/dist/server/src/index.d.ts +9 -0
- package/package.json +1 -1
package/dist/admin/index.js
CHANGED
|
@@ -38,7 +38,7 @@ const index = {
|
|
|
38
38
|
defaultMessage: PLUGIN_ID.slice(0, 1).toUpperCase() + PLUGIN_ID.slice(1)
|
|
39
39
|
},
|
|
40
40
|
Component: async () => {
|
|
41
|
-
const { App } = await Promise.resolve().then(() => require("./App-
|
|
41
|
+
const { App } = await Promise.resolve().then(() => require("./App-CH5fBeNI.js"));
|
|
42
42
|
return App;
|
|
43
43
|
}
|
|
44
44
|
});
|
package/dist/admin/index.mjs
CHANGED
|
@@ -36,7 +36,7 @@ const index = {
|
|
|
36
36
|
defaultMessage: PLUGIN_ID.slice(0, 1).toUpperCase() + PLUGIN_ID.slice(1)
|
|
37
37
|
},
|
|
38
38
|
Component: async () => {
|
|
39
|
-
const { App } = await import("./App-
|
|
39
|
+
const { App } = await import("./App-BIxhBt5_.mjs");
|
|
40
40
|
return App;
|
|
41
41
|
}
|
|
42
42
|
});
|
package/dist/server/index.js
CHANGED
|
@@ -1022,6 +1022,59 @@ const notificationChannels = ({ strapi }) => ({
|
|
|
1022
1022
|
ctx.body = { deleteResult };
|
|
1023
1023
|
}
|
|
1024
1024
|
});
|
|
1025
|
+
const tags = ({ strapi }) => ({
|
|
1026
|
+
async getTags(ctx) {
|
|
1027
|
+
const tagsData = await service({ strapi }).makeBackendRequest(`/user/tags`, {
|
|
1028
|
+
method: "GET"
|
|
1029
|
+
});
|
|
1030
|
+
ctx.body = { tagsData };
|
|
1031
|
+
},
|
|
1032
|
+
async getTagsByID(ctx) {
|
|
1033
|
+
const id = ctx.params.id;
|
|
1034
|
+
const tagsData = await service({ strapi }).makeBackendRequest(
|
|
1035
|
+
`/user/tags/${id}`,
|
|
1036
|
+
{
|
|
1037
|
+
method: "GET"
|
|
1038
|
+
}
|
|
1039
|
+
);
|
|
1040
|
+
ctx.body = { tagsData };
|
|
1041
|
+
},
|
|
1042
|
+
async createTag(ctx) {
|
|
1043
|
+
const { name, color } = ctx.request.body;
|
|
1044
|
+
const tagsData = await service({ strapi }).makeBackendRequest(`/user/tags`, {
|
|
1045
|
+
method: "POST",
|
|
1046
|
+
body: JSON.stringify({ name, color })
|
|
1047
|
+
});
|
|
1048
|
+
ctx.body = { tagsData };
|
|
1049
|
+
},
|
|
1050
|
+
async updateTags(ctx) {
|
|
1051
|
+
const id = ctx.params.id;
|
|
1052
|
+
const { ...data } = ctx.request.body;
|
|
1053
|
+
if (!id) {
|
|
1054
|
+
ctx.status = 400;
|
|
1055
|
+
ctx.body = { error: "Tag ID is required" };
|
|
1056
|
+
return;
|
|
1057
|
+
}
|
|
1058
|
+
const tagsData = await service({ strapi }).makeBackendRequest(
|
|
1059
|
+
`/user/tags/${id}`,
|
|
1060
|
+
{
|
|
1061
|
+
method: "PUT",
|
|
1062
|
+
body: JSON.stringify(data)
|
|
1063
|
+
}
|
|
1064
|
+
);
|
|
1065
|
+
ctx.body = { tagsData };
|
|
1066
|
+
},
|
|
1067
|
+
async deleteTags(ctx) {
|
|
1068
|
+
const id = ctx.params.id;
|
|
1069
|
+
const tagsData = await service({ strapi }).makeBackendRequest(
|
|
1070
|
+
`/user/tags/${id}`,
|
|
1071
|
+
{
|
|
1072
|
+
method: "DELETE"
|
|
1073
|
+
}
|
|
1074
|
+
);
|
|
1075
|
+
ctx.body = { tagsData };
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1025
1078
|
const controllers = {
|
|
1026
1079
|
controller,
|
|
1027
1080
|
settings,
|
|
@@ -1029,7 +1082,8 @@ const controllers = {
|
|
|
1029
1082
|
statusPage,
|
|
1030
1083
|
regions,
|
|
1031
1084
|
userDetails,
|
|
1032
|
-
notificationChannels
|
|
1085
|
+
notificationChannels,
|
|
1086
|
+
tags
|
|
1033
1087
|
};
|
|
1034
1088
|
const middlewares = {};
|
|
1035
1089
|
const policies = {};
|
|
@@ -1405,6 +1459,51 @@ const routes = {
|
|
|
1405
1459
|
policies: [],
|
|
1406
1460
|
auth: false
|
|
1407
1461
|
}
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
method: "GET",
|
|
1465
|
+
path: "/tags",
|
|
1466
|
+
handler: "tags.getTags",
|
|
1467
|
+
config: {
|
|
1468
|
+
policies: [],
|
|
1469
|
+
auth: false
|
|
1470
|
+
}
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
method: "GET",
|
|
1474
|
+
path: "/tags/:id",
|
|
1475
|
+
handler: "tags.getTagsByID",
|
|
1476
|
+
config: {
|
|
1477
|
+
policies: [],
|
|
1478
|
+
auth: false
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
method: "POST",
|
|
1483
|
+
path: "/tags",
|
|
1484
|
+
handler: "tags.createTag",
|
|
1485
|
+
config: {
|
|
1486
|
+
policies: [],
|
|
1487
|
+
auth: false
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
method: "PUT",
|
|
1492
|
+
path: "/tags/:id",
|
|
1493
|
+
handler: "tags.updateTags",
|
|
1494
|
+
config: {
|
|
1495
|
+
policies: [],
|
|
1496
|
+
auth: false
|
|
1497
|
+
}
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
method: "DELETE",
|
|
1501
|
+
path: "/tags/:id",
|
|
1502
|
+
handler: "tags.deleteTags",
|
|
1503
|
+
config: {
|
|
1504
|
+
policies: [],
|
|
1505
|
+
auth: false
|
|
1506
|
+
}
|
|
1408
1507
|
}
|
|
1409
1508
|
]
|
|
1410
1509
|
}
|
package/dist/server/index.mjs
CHANGED
|
@@ -1020,6 +1020,59 @@ const notificationChannels = ({ strapi }) => ({
|
|
|
1020
1020
|
ctx.body = { deleteResult };
|
|
1021
1021
|
}
|
|
1022
1022
|
});
|
|
1023
|
+
const tags = ({ strapi }) => ({
|
|
1024
|
+
async getTags(ctx) {
|
|
1025
|
+
const tagsData = await service({ strapi }).makeBackendRequest(`/user/tags`, {
|
|
1026
|
+
method: "GET"
|
|
1027
|
+
});
|
|
1028
|
+
ctx.body = { tagsData };
|
|
1029
|
+
},
|
|
1030
|
+
async getTagsByID(ctx) {
|
|
1031
|
+
const id = ctx.params.id;
|
|
1032
|
+
const tagsData = await service({ strapi }).makeBackendRequest(
|
|
1033
|
+
`/user/tags/${id}`,
|
|
1034
|
+
{
|
|
1035
|
+
method: "GET"
|
|
1036
|
+
}
|
|
1037
|
+
);
|
|
1038
|
+
ctx.body = { tagsData };
|
|
1039
|
+
},
|
|
1040
|
+
async createTag(ctx) {
|
|
1041
|
+
const { name, color } = ctx.request.body;
|
|
1042
|
+
const tagsData = await service({ strapi }).makeBackendRequest(`/user/tags`, {
|
|
1043
|
+
method: "POST",
|
|
1044
|
+
body: JSON.stringify({ name, color })
|
|
1045
|
+
});
|
|
1046
|
+
ctx.body = { tagsData };
|
|
1047
|
+
},
|
|
1048
|
+
async updateTags(ctx) {
|
|
1049
|
+
const id = ctx.params.id;
|
|
1050
|
+
const { ...data } = ctx.request.body;
|
|
1051
|
+
if (!id) {
|
|
1052
|
+
ctx.status = 400;
|
|
1053
|
+
ctx.body = { error: "Tag ID is required" };
|
|
1054
|
+
return;
|
|
1055
|
+
}
|
|
1056
|
+
const tagsData = await service({ strapi }).makeBackendRequest(
|
|
1057
|
+
`/user/tags/${id}`,
|
|
1058
|
+
{
|
|
1059
|
+
method: "PUT",
|
|
1060
|
+
body: JSON.stringify(data)
|
|
1061
|
+
}
|
|
1062
|
+
);
|
|
1063
|
+
ctx.body = { tagsData };
|
|
1064
|
+
},
|
|
1065
|
+
async deleteTags(ctx) {
|
|
1066
|
+
const id = ctx.params.id;
|
|
1067
|
+
const tagsData = await service({ strapi }).makeBackendRequest(
|
|
1068
|
+
`/user/tags/${id}`,
|
|
1069
|
+
{
|
|
1070
|
+
method: "DELETE"
|
|
1071
|
+
}
|
|
1072
|
+
);
|
|
1073
|
+
ctx.body = { tagsData };
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1023
1076
|
const controllers = {
|
|
1024
1077
|
controller,
|
|
1025
1078
|
settings,
|
|
@@ -1027,7 +1080,8 @@ const controllers = {
|
|
|
1027
1080
|
statusPage,
|
|
1028
1081
|
regions,
|
|
1029
1082
|
userDetails,
|
|
1030
|
-
notificationChannels
|
|
1083
|
+
notificationChannels,
|
|
1084
|
+
tags
|
|
1031
1085
|
};
|
|
1032
1086
|
const middlewares = {};
|
|
1033
1087
|
const policies = {};
|
|
@@ -1403,6 +1457,51 @@ const routes = {
|
|
|
1403
1457
|
policies: [],
|
|
1404
1458
|
auth: false
|
|
1405
1459
|
}
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
method: "GET",
|
|
1463
|
+
path: "/tags",
|
|
1464
|
+
handler: "tags.getTags",
|
|
1465
|
+
config: {
|
|
1466
|
+
policies: [],
|
|
1467
|
+
auth: false
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
method: "GET",
|
|
1472
|
+
path: "/tags/:id",
|
|
1473
|
+
handler: "tags.getTagsByID",
|
|
1474
|
+
config: {
|
|
1475
|
+
policies: [],
|
|
1476
|
+
auth: false
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
method: "POST",
|
|
1481
|
+
path: "/tags",
|
|
1482
|
+
handler: "tags.createTag",
|
|
1483
|
+
config: {
|
|
1484
|
+
policies: [],
|
|
1485
|
+
auth: false
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
method: "PUT",
|
|
1490
|
+
path: "/tags/:id",
|
|
1491
|
+
handler: "tags.updateTags",
|
|
1492
|
+
config: {
|
|
1493
|
+
policies: [],
|
|
1494
|
+
auth: false
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
method: "DELETE",
|
|
1499
|
+
path: "/tags/:id",
|
|
1500
|
+
handler: "tags.deleteTags",
|
|
1501
|
+
config: {
|
|
1502
|
+
policies: [],
|
|
1503
|
+
auth: false
|
|
1504
|
+
}
|
|
1406
1505
|
}
|
|
1407
1506
|
]
|
|
1408
1507
|
}
|
|
@@ -91,6 +91,15 @@ declare const _default: {
|
|
|
91
91
|
updateNotificationChannel(ctx: any): Promise<void>;
|
|
92
92
|
deleteNotificationChannel(ctx: any): Promise<void>;
|
|
93
93
|
};
|
|
94
|
+
tags: ({ strapi }: {
|
|
95
|
+
strapi: import('@strapi/types/dist/core').Strapi;
|
|
96
|
+
}) => {
|
|
97
|
+
getTags(ctx: any): Promise<void>;
|
|
98
|
+
getTagsByID(ctx: any): Promise<void>;
|
|
99
|
+
createTag(ctx: any): Promise<void>;
|
|
100
|
+
updateTags(ctx: any): Promise<void>;
|
|
101
|
+
deleteTags(ctx: any): Promise<void>;
|
|
102
|
+
};
|
|
94
103
|
};
|
|
95
104
|
routes: {
|
|
96
105
|
admin: {
|
package/package.json
CHANGED