docs: Improve Swagger JSDoc

This commit is contained in:
Maksim Eltyshev
2025-09-12 12:17:01 +02:00
parent 494800d131
commit b4979d214f
129 changed files with 294 additions and 248 deletions

View File

@@ -16,13 +16,13 @@ export const transformActivity = (activity) => ({
/* Actions */
const getActivitiesInBoard = (boardId, data, headers) =>
const getBoardActivities = (boardId, data, headers) =>
socket.get(`/boards/${boardId}/actions`, data, headers).then((body) => ({
...body,
items: body.items.map(transformActivity),
}));
const getActivitiesInCard = (cardId, data, headers) =>
const getCardActivities = (cardId, data, headers) =>
socket.get(`/cards/${cardId}/actions`, data, headers).then((body) => ({
...body,
items: body.items.map(transformActivity),
@@ -38,7 +38,7 @@ const makeHandleActivityCreate = (next) => (body) => {
};
export default {
getActivitiesInBoard,
getActivitiesInCard,
getBoardActivities,
getCardActivities,
makeHandleActivityCreate,
};

View File

@@ -7,10 +7,10 @@ import socket from './socket';
/* Actions */
const createCustomFieldGroupInBoard = (cardId, data, headers) =>
const createBoardCustomFieldGroup = (cardId, data, headers) =>
socket.post(`/boards/${cardId}/custom-field-groups`, data, headers);
const createCustomFieldGroupInCard = (cardId, data, headers) =>
const createCardCustomFieldGroup = (cardId, data, headers) =>
socket.post(`/cards/${cardId}/custom-field-groups`, data, headers);
const getCustomFieldGroup = (id, headers) =>
@@ -23,8 +23,8 @@ const deleteCustomFieldGroup = (id, headers) =>
socket.delete(`/custom-field-groups/${id}`, undefined, headers);
export default {
createCustomFieldGroupInBoard,
createCustomFieldGroupInCard,
createBoardCustomFieldGroup,
createCardCustomFieldGroup,
getCustomFieldGroup,
updateCustomFieldGroup,
deleteCustomFieldGroup,

View File

@@ -7,10 +7,10 @@ import socket from './socket';
/* Actions */
const createNotificationServiceInUser = (userId, data, headers) =>
const createUserNotificationService = (userId, data, headers) =>
socket.post(`/users/${userId}/notification-services`, data, headers);
const createNotificationServiceInBoard = (boardId, data, headers) =>
const createBoardNotificationService = (boardId, data, headers) =>
socket.post(`/boards/${boardId}/notification-services`, data, headers);
const updateNotificationService = (id, data, headers) =>
@@ -23,8 +23,8 @@ const deleteNotificationService = (id, headers) =>
socket.delete(`/notification-services/${id}`, undefined, headers);
export default {
createNotificationServiceInUser,
createNotificationServiceInBoard,
createUserNotificationService,
createBoardNotificationService,
updateNotificationService,
testNotificationService,
deleteNotificationService,

View File

@@ -22,7 +22,7 @@ export function* fetchActivitiesInBoard(boardId) {
({
items: activities,
included: { users },
} = yield call(request, api.getActivitiesInBoard, boardId, {
} = yield call(request, api.getBoardActivities, boardId, {
beforeId: lastActivityId || undefined,
}));
} catch (error) {
@@ -51,7 +51,7 @@ export function* fetchActivitiesInCard(cardId) {
({
items: activities,
included: { users },
} = yield call(request, api.getActivitiesInCard, cardId, {
} = yield call(request, api.getCardActivities, cardId, {
beforeId: lastActivityId || undefined,
}));
} catch (error) {

View File

@@ -31,7 +31,7 @@ export function* createCustomFieldGroupInBoard(boardId, data) {
try {
({ item: customFieldGroup } = yield call(
request,
api.createCustomFieldGroupInBoard,
api.createBoardCustomFieldGroup,
boardId,
nextData,
));
@@ -69,7 +69,7 @@ export function* createCustomFieldGroupInCard(cardId, data) {
try {
({ item: customFieldGroup } = yield call(
request,
api.createCustomFieldGroupInCard,
api.createCardCustomFieldGroup,
cardId,
nextData,
));

View File

@@ -27,7 +27,7 @@ export function* createNotificationServiceInCurrentUser(data) {
try {
({ item: notificationService } = yield call(
request,
api.createNotificationServiceInUser,
api.createUserNotificationService,
currentUserId,
data,
));
@@ -54,7 +54,7 @@ export function* createNotificationServiceInBoard(boardId, data) {
try {
({ item: notificationService } = yield call(
request,
api.createNotificationServiceInBoard,
api.createBoardNotificationService,
boardId,
data,
));