docs: Add full Swagger JSDoc coverage

This commit is contained in:
Maksim Eltyshev
2025-09-08 16:20:27 +02:00
parent e6b4c33542
commit 5ad3134519
128 changed files with 7610 additions and 0 deletions

View File

@@ -10,6 +10,58 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Action:
* type: object
* required:
* - cardId
* - type
* - data
* properties:
* id:
* type: string
* description: Unique identifier for the action
* example: 1357158568008091264
* boardId:
* type: string
* nullable: true
* description: ID of the board where the action occurred
* example: 1357158568008091265
* cardId:
* type: string
* description: ID of the card where the action occurred
* example: 1357158568008091266
* userId:
* type: string
* nullable: true
* description: ID of the user who performed the action
* example: 1357158568008091267
* type:
* type: string
* enum: [createCard, moveCard, addMemberToCard, removeMemberFromCard, completeTask, uncompleteTask]
* description: Type of the action
* example: moveCard
* data:
* type: object
* description: Action specific data (varies by type)
* example: {"card": {"name": "Implement user authentication"}, "toList": {"id": "1357158568008091268", "name": "To Do", "type": "active"}, "fromList": {"id": "1357158568008091269", "name": "Done", "type": "closed"}}
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the action was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the action was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Types = {
CREATE_CARD: 'createCard',
MOVE_CARD: 'moveCard',

View File

@@ -10,6 +10,58 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Attachment:
* type: object
* required:
* - cardId
* - type
* - data
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the attachment
* example: 1357158568008091264
* cardId:
* type: string
* description: ID of the card the attachment belongs to
* example: 1357158568008091265
* creatorUserId:
* type: string
* nullable: true
* description: ID of the user who created the attachment
* example: 1357158568008091266
* type:
* type: string
* enum: [file, link]
* description: Type of the attachment
* example: link
* data:
* type: object
* description: Attachment specific data (varies by type)
* example: {"url": "https://google.com/search?q=planka", "faviconUrl": "https://storage.example.com/favicons/google.com.png"}
* name:
* type: string
* description: Name/title of the attachment
* example: Google Link
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the attachment was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the attachment was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Types = {
FILE: 'file',
LINK: 'link',

View File

@@ -10,6 +10,60 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* BackgroundImage:
* type: object
* required:
* - projectId
* - size
* - url
* - thumbnailUrls
* properties:
* id:
* type: string
* description: Unique identifier for the background image
* example: 1357158568008091264
* projectId:
* type: string
* description: ID of the project the background image belongs to
* example: 1357158568008091265
* size:
* type: string
* description: File size of the background image in bytes
* example: 1024576
* url:
* type: string
* format: uri
* description: URL to access the full-size background image
* example: https://storage.example.com/background-images/1357158568008091264/original.jpg
* thumbnailUrls:
* type: object
* required:
* - outside360
* description: URLs for different thumbnail sizes of the background image
* properties:
* outside360:
* type: string
* format: uri
* description: URL for 360px thumbnail version
* example: https://storage.example.com/background-images/1357158568008091264/outside-360.jpg
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the background image was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the background image was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,42 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* BaseCustomFieldGroup:
* type: object
* required:
* - projectId
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the base custom field group
* example: 1357158568008091264
* projectId:
* type: string
* description: ID of the project the base custom field group belongs to
* example: 1357158568008091265
* name:
* type: string
* description: Name/title of the base custom field group
* example: Base Properties
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the base custom field group was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the base custom field group was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,69 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Board:
* type: object
* required:
* - projectId
* - position
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the board
* example: 1357158568008091264
* projectId:
* type: string
* description: ID of the project the board belongs to
* example: 1357158568008091265
* position:
* type: number
* description: Position of the board within the project
* example: 65536
* name:
* type: string
* description: Name/title of the board
* example: Development Board
* defaultView:
* type: string
* enum: [kanban, grid, list]
* description: Default view for the board
* example: kanban
* defaultCardType:
* type: string
* enum: [project, story]
* description: Default card type for new cards
* example: project
* limitCardTypesToDefaultOne:
* type: boolean
* description: Whether to limit card types to default one
* example: false
* alwaysDisplayCardCreator:
* type: boolean
* description: Whether to always display the card creator
* example: false
* expandTaskListsByDefault:
* type: boolean
* description: Whether to expand task lists by default
* example: false
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the board was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the board was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Card = require('./Card');
const Views = {

View File

@@ -10,6 +10,58 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* BoardMembership:
* type: object
* required:
* - role
* - projectId
* - boardId
* - userId
* properties:
* id:
* type: string
* description: Unique identifier for the board membership
* example: 1357158568008091264
* projectId:
* type: string
* description: ID of the project the board membership belongs to (denormalized)
* example: 1357158568008091265
* boardId:
* type: string
* description: ID of the board the membership is associated with
* example: 1357158568008091266
* userId:
* type: string
* description: ID of the user who is a member of the board
* example: 1357158568008091267
* role:
* type: string
* enum: [editor, viewer]
* description: Role of the user in the board
* example: editor
* canComment:
* type: boolean
* nullable: true
* description: Whether the user can comment on cards (applies only to viewers)
* example: true
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the board membership was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the board membership was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Roles = {
EDITOR: 'editor',
VIEWER: 'viewer',

View File

@@ -10,6 +10,120 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Card:
* type: object
* required:
* - boardId
* - listId
* - type
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the card
* example: 1357158568008091264
* boardId:
* type: string
* description: ID of the board the card belongs to (denormalized)
* example: 1357158568008091265
* listId:
* type: string
* description: ID of the list the card belongs to
* example: 1357158568008091266
* creatorUserId:
* type: string
* nullable: true
* description: ID of the user who created the card
* example: 1357158568008091267
* prevListId:
* type: string
* nullable: true
* description: ID of the previous list the card was in (available when in archive or trash)
* example: 1357158568008091268
* coverAttachmentId:
* type: string
* nullable: true
* description: ID of the attachment used as cover
* example: 1357158568008091269
* type:
* type: string
* enum: [project, story]
* description: Type of the card
* example: project
* position:
* type: number
* nullable: true
* description: Position of the card within the list
* example: 65536
* name:
* type: string
* description: Name/title of the card
* example: Implement user authentication
* description:
* type: string
* nullable: true
* description: Detailed description of the card
* example: Add JWT-based authentication system...
* dueDate:
* type: string
* format: date-time
* nullable: true
* description: Due date for the card
* example: 2024-01-01T00:00:00.000Z
* isDueCompleted:
* type: boolean
* nullable: true
* description: Whether the due date is completed
* example: false
* stopwatch:
* type: object
* required:
* - startedAt
* - total
* nullable: true
* description: Stopwatch data for time tracking
* properties:
* startedAt:
* type: string
* format: date-time
* description: When the stopwatch was started
* example: 2024-01-01T00:00:00.000Z
* total:
* type: number
* description: Total time in seconds
* example: 3600
* commentsTotal:
* type: number
* description: Total number of comments on the card
* example: 100
* isClosed:
* type: boolean
* description: Whether the card is closed
* example: false
* listChangedAt:
* type: string
* format: date-time
* nullable: true
* description: When the card was last moved between lists
* example: 2024-01-01T00:00:00.000Z
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the card was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the card was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Types = {
PROJECT: 'project',
STORY: 'story',

View File

@@ -10,6 +10,42 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* CardLabel:
* type: object
* required:
* - cardId
* - labelId
* properties:
* id:
* type: string
* description: Unique identifier for the card-label association
* example: 1357158568008091264
* cardId:
* type: string
* description: ID of the card the label is associated with
* example: 1357158568008091265
* labelId:
* type: string
* description: ID of the label associated with the card
* example: 1357158568008091266
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the card-label association was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the card-label association was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,42 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* CardMembership:
* type: object
* required:
* - cardId
* - userId
* properties:
* id:
* type: string
* description: Unique identifier for the card membership
* example: 1357158568008091264
* cardId:
* type: string
* description: ID of the card the user is a member of
* example: 1357158568008091265
* userId:
* type: string
* description: ID of the user who is a member of the card
* example: 1357158568008091266
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the card membership was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the card membership was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,47 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Comment:
* type: object
* required:
* - cardId
* - text
* properties:
* id:
* type: string
* description: Unique identifier for the comment
* example: 1357158568008091264
* cardId:
* type: string
* description: ID of the card the comment belongs to
* example: 1357158568008091265
* userId:
* type: string
* nullable: true
* description: ID of the user who created the comment
* example: 1357158568008091266
* text:
* type: string
* description: Content of the comment
* example: This task is almost complete...
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the comment was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the comment was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,48 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Config:
* type: object
* required:
* - id
* - isInitialized
* - version
* properties:
* id:
* type: string
* description: Unique identifier for the config (always set to '1')
* example: 1
* isInitialized:
* type: boolean
* description: Whether the PLANKA instance has been initialized
* example: true
* version:
* type: string
* description: Current version of the PLANKA application
* example: 2.0.0
* activeUsersLimit:
* type: number
* nullable: true
* description: Maximum number of active users allowed (conditionally added for admins if configured)
* example: 100
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the config was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the config was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const MAIN_ID = '1';
module.exports = {

View File

@@ -10,6 +10,57 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* CustomField:
* type: object
* required:
* - position
* - name
* - showOnFrontOfCard
* properties:
* id:
* type: string
* description: Unique identifier for the custom field
* example: 1357158568008091264
* baseCustomFieldGroupId:
* type: string
* nullable: true
* description: ID of the base custom field group the custom field belongs to
* example: 1357158568008091265
* customFieldGroupId:
* type: string
* nullable: true
* description: ID of the custom field group the custom field belongs to
* example: 1357158568008091266
* position:
* type: number
* description: Position of the custom field within the group
* example: 65536
* name:
* type: string
* description: Name/title of the custom field
* example: Priority
* showOnFrontOfCard:
* type: boolean
* description: Whether to show the field on the front of cards
* example: true
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the custom field was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the custom field was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,57 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* CustomFieldGroup:
* type: object
* required:
* - position
* properties:
* id:
* type: string
* description: Unique identifier for the custom field group
* example: 1357158568008091264
* boardId:
* type: string
* nullable: true
* description: ID of the board the custom field group belongs to
* example: 1357158568008091265
* cardId:
* type: string
* nullable: true
* description: ID of the card the custom field group belongs to
* example: 1357158568008091266
* baseCustomFieldGroupId:
* type: string
* nullable: true
* description: ID of the base custom field group used as a template
* example: 1357158568008091267
* position:
* type: number
* description: Position of the custom field group within the board/card
* example: 65536
* name:
* type: string
* nullable: true
* description: Name/title of the custom field group
* example: Properties
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the custom field group was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the custom field group was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,52 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* CustomFieldValue:
* type: object
* required:
* - cardId
* - customFieldGroupId
* - customFieldId
* - content
* properties:
* id:
* type: string
* description: Unique identifier for the custom field value
* example: 1357158568008091264
* cardId:
* type: string
* description: ID of the card the value belongs to
* example: 1357158568008091265
* customFieldGroupId:
* type: string
* description: ID of the custom field group the value belongs to
* example: 1357158568008091266
* customFieldId:
* type: string
* description: ID of the custom field the value belongs to
* example: 1357158568008091267
* content:
* type: string
* description: Content/value of the custom field
* example: High Priority
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the custom field value was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the custom field value was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,53 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Label:
* type: object
* required:
* - boardId
* - position
* - color
* properties:
* id:
* type: string
* description: Unique identifier for the label
* example: 1357158568008091264
* boardId:
* type: string
* description: ID of the board the label belongs to
* example: 1357158568008091265
* position:
* type: number
* description: Position of the label within the board
* example: 65536
* name:
* type: string
* nullable: true
* description: Name/title of the label
* example: Bug
* color:
* type: string
* enum: [muddy-grey, autumn-leafs, morning-sky, antique-blue, egg-yellow, desert-sand, dark-granite, fresh-salad, lagoon-blue, midnight-blue, light-orange, pumpkin-orange, light-concrete, sunny-grass, navy-blue, lilac-eyes, apricot-red, orange-peel, silver-glint, bright-moss, deep-ocean, summer-sky, berry-red, light-cocoa, grey-stone, tank-green, coral-green, sugar-plum, pink-tulip, shady-rust, wet-rock, wet-moss, turquoise-sea, lavender-fields, piggy-red, light-mud, gun-metal, modern-green, french-coast, sweet-lilac, red-burgundy, pirate-gold]
* description: Color of the label
* example: berry-red
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the label was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the label was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const COLORS = [
'muddy-grey',
'autumn-leafs',

View File

@@ -10,6 +10,59 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* List:
* type: object
* required:
* - boardId
* - type
* properties:
* id:
* type: string
* description: Unique identifier for the list
* example: 1357158568008091264
* boardId:
* type: string
* description: ID of the board the list belongs to
* example: 1357158568008091265
* type:
* type: string
* enum: [active, closed, archive, trash]
* description: Type/status of the list
* example: active
* position:
* type: number
* nullable: true
* description: Position of the list within the board
* example: 65536
* name:
* type: string
* nullable: true
* description: Name/title of the list
* example: To Do
* color:
* type: string
* enum: [berry-red, pumpkin-orange, lagoon-blue, pink-tulip, light-mud, orange-peel, bright-moss, antique-blue, dark-granite, turquoise-sea]
* nullable: true
* description: Color for the list
* example: lagoon-blue
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the list was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the list was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Types = {
ACTIVE: 'active',
CLOSED: 'closed',

View File

@@ -10,6 +10,79 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Notification:
* type: object
* required:
* - id
* - userId
* - boardId
* - cardId
* - type
* - data
* - isRead
* properties:
* id:
* type: string
* description: Unique identifier for the notification
* example: 1357158568008091264
* userId:
* type: string
* description: ID of the user who receives the notification
* example: 1357158568008091265
* creatorUserId:
* type: string
* nullable: true
* description: ID of the user who created the notification
* example: 1357158568008091266
* boardId:
* type: string
* description: ID of the board associated with the notification (denormalized)
* example: 1357158568008091267
* cardId:
* type: string
* description: ID of the card associated with the notification
* example: 1357158568008091268
* commentId:
* type: string
* nullable: true
* description: ID of the comment associated with the notification
* example: 1357158568008091269
* actionId:
* type: string
* nullable: true
* description: ID of the action associated with the notification
* example: 1357158568008091270
* type:
* type: string
* enum: [moveCard, commentCard, addMemberToCard, mentionInComment]
* description: Type of the notification
* example: commentCard
* data:
* type: object
* description: Notification payload specific to the type
* example: {"card": {"name": "Implement user authentication"}, "text": "This task is almost complete..."}
* isRead:
* type: boolean
* description: Whether the notification has been read
* example: false
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the notification was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the notification was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Types = {
MOVE_CARD: 'moveCard',
COMMENT_CARD: 'commentCard',

View File

@@ -10,6 +10,53 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* NotificationService:
* type: object
* required:
* - url
* - format
* properties:
* id:
* type: string
* description: Unique identifier for the notification service
* example: 1357158568008091264
* userId:
* type: string
* nullable: true
* description: ID of the user the service is associated with
* example: 1357158568008091265
* boardId:
* type: string
* nullable: true
* description: ID of the board the service is associated with
* example: 1357158568008091266
* url:
* type: string
* description: URL endpoint for notifications
* example: https://example.service.com/planka
* format:
* type: string
* enum: [text, markdown, html]
* description: Format for notification messages
* example: text
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the notification service was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the notification service was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Formats = {
TEXT: 'text',
MARKDOWN: 'markdown',

View File

@@ -10,6 +10,69 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Project:
* type: object
* required:
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the project
* example: 1357158568008091264
* ownerProjectManagerId:
* type: string
* nullable: true
* description: ID of the project manager who owns the project
* example: 1357158568008091265
* backgroundImageId:
* type: string
* nullable: true
* description: ID of the background image used as background
* example: 1357158568008091266
* name:
* type: string
* description: Name/title of the project
* example: Development Project
* description:
* type: string
* nullable: true
* description: Detailed description of the project
* example: A project for developing new features...
* backgroundType:
* type: string
* enum: [gradient, image]
* nullable: true
* description: Type of background for the project
* example: gradient
* backgroundGradient:
* type: string
* enum: [old-lime, ocean-dive, tzepesch-style, jungle-mesh, strawberry-dust, purple-rose, sun-scream, warm-rust, sky-change, green-eyes, blue-xchange, blood-orange, sour-peel, green-ninja, algae-green, coral-reef, steel-grey, heat-waves, velvet-lounge, purple-rain, blue-steel, blueish-curve, prism-light, green-mist, red-curtain]
* nullable: true
* description: Gradient background for the project
* example: ocean-dive
* isHidden:
* type: boolean
* default: false
* description: Whether the project is hidden
* example: false
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the project was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the project was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Types = {
PRIVATE: 'private',
SHARED: 'shared',

View File

@@ -10,6 +10,42 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* ProjectManager:
* type: object
* required:
* - projectId
* - userId
* properties:
* id:
* type: string
* description: Unique identifier for the project manager
* example: 1357158568008091264
* projectId:
* type: string
* description: ID of the project the manager is associated with
* example: 1357158568008091265
* userId:
* type: string
* description: ID of the user who is assigned as project manager
* example: 1357158568008091266
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the project manager was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the project manager was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,62 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Task:
* type: object
* required:
* - taskListId
* - position
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the task
* example: 1357158568008091264
* taskListId:
* type: string
* description: ID of the task list the task belongs to
* example: 1357158568008091265
* linkedCardId:
* type: string
* nullable: true
* description: ID of the card linked to the task
* example: 1357158568008091266
* assigneeUserId:
* type: string
* nullable: true
* description: ID of the user assigned to the task
* example: 1357158568008091267
* position:
* type: number
* description: Position of the task within the task list
* example: 65536
* name:
* type: string
* description: Name/title of the task
* example: Write unit tests
* isCompleted:
* type: boolean
* default: false
* description: Whether the task is completed
* example: false
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the task was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the task was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,57 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* TaskList:
* type: object
* required:
* - cardId
* - position
* - name
* properties:
* id:
* type: string
* description: Unique identifier for the task list
* example: 1357158568008091264
* cardId:
* type: string
* description: ID of the card the task list belongs to
* example: 1357158568008091265
* position:
* type: number
* description: Position of the task list within the card
* example: 65536
* name:
* type: string
* description: Name/title of the task list
* example: Development Tasks
* showOnFrontOfCard:
* type: boolean
* default: true
* description: Whether to show the task list on the front of the card
* example: true
* hideCompletedTasks:
* type: boolean
* default: false
* description: Whether to hide completed tasks
* example: false
* createdAt:
* type: string
* format: date-time
* nullable: true
* description: When the task list was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* nullable: true
* description: When the task list was last updated
* example: 2024-01-01T00:00:00.000Z
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗

View File

@@ -10,6 +10,167 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* User:
* type: object
* required:
* - id
* - email
* - role
* - name
* - termsType
* properties:
* id:
* type: string
* description: Unique identifier for the user
* example: 1357158568008091264
* email:
* type: string
* format: email
* description: Email address for login and notifications (private field)
* example: john.doe@example.com
* role:
* type: string
* enum: [admin, projectOwner, boardUser]
* description: User role defining access permissions
* example: admin
* name:
* type: string
* description: Full display name of the user
* example: John Doe
* username:
* type: string
* minLength: 3
* maxLength: 32
* pattern: "^[a-zA-Z0-9]+((_{1}|\\.|){1}[a-zA-Z0-9])*$"
* nullable: true
* description: Unique username for user identification
* example: john_doe
* avatar:
* type: object
* required:
* - url
* - thumbnailUrls
* nullable: true
* description: Avatar information for the user with generated URLs
* properties:
* url:
* type: string
* format: uri
* description: URL to the full-size avatar image
* example: https://storage.example.com/user-avatars/1357158568008091264/original.jpg
* thumbnailUrls:
* type: object
* required:
* - cover180
* description: URLs for different thumbnail sizes
* properties:
* cover180:
* type: string
* format: uri
* description: URL for 180px cover thumbnail
* example: https://storage.example.com/user-avatars/1357158568008091264/cover-180.jpg
* gravatarUrl:
* type: string
* format: uri
* nullable: true
* description: Gravatar URL for the user (conditionally added if configured)
* example: https://www.gravatar.com/avatar/abc123
* phone:
* type: string
* nullable: true
* description: Contact phone number
* example: +1234567890
* organization:
* type: string
* nullable: true
* description: Organization or company name
* example: Acme Corporation
* language:
* type: string
* enum: [ar-YE, bg-BG, cs-CZ, da-DK, de-DE, el-GR, en-GB, en-US, es-ES, et-EE, fa-IR, fi-FI, fr-FR, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, pt-PT, ro-RO, ru-RU, sk-SK, sr-Cyrl-RS, sr-Latn-RS, sv-SE, tr-TR, uk-UA, uz-UZ, zh-CN, zh-TW]
* nullable: true
* description: Preferred language for user interface and notifications (personal field)
* example: en-US
* subscribeToOwnCards:
* type: boolean
* default: false
* description: Whether the user subscribes to their own cards (personal field)
* example: false
* subscribeToCardWhenCommenting:
* type: boolean
* default: true
* description: Whether the user subscribes to cards when commenting (personal field)
* example: true
* turnOffRecentCardHighlighting:
* type: boolean
* default: false
* description: Whether recent card highlighting is disabled (personal field)
* example: false
* enableFavoritesByDefault:
* type: boolean
* default: false
* description: Whether favorites are enabled by default (personal field)
* example: false
* defaultEditorMode:
* type: string
* enum: [wysiwyg, markup]
* default: wysiwyg
* description: Default markdown editor mode (personal field)
* example: wysiwyg
* defaultHomeView:
* type: string
* enum: [gridProjects, groupedProjects]
* default: groupedProjects
* description: Default view mode for the home page (personal field)
* example: groupedProjects
* defaultProjectsOrder:
* type: string
* enum: [byDefault, alphabetically, byCreationTime]
* default: byDefault
* description: Default sort order for projects display (personal field)
* example: byDefault
* termsType:
* type: string
* description: Type of terms applicable to the user based on role
* example: general
* isSsoUser:
* type: boolean
* default: false
* description: Whether the user is SSO user (private field)
* example: false
* isDeactivated:
* type: boolean
* default: false
* description: Whether the user account is deactivated and cannot log in
* example: false
* isDefaultAdmin:
* type: boolean
* nullable: true
* description: Whether the user is the default admin (visible only to current user or admin)
* example: false
* lockedFieldNames:
* type: array
* items:
* type: string
* nullable: true
* description: List of fields locked from editing (visible only to current user or admin)
* example: [email, password, name]
* createdAt:
* type: string
* format: date-time
* description: When the user was created
* example: 2024-01-01T00:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* description: When the user was last updated
* example: 2024-01-01T00:00:00.000Z
*/
const Roles = {
ADMIN: 'admin',
PROJECT_OWNER: 'projectOwner',

View File

@@ -10,6 +10,57 @@
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
/**
* @swagger
* components:
* schemas:
* Webhook:
* type: object
* required:
* - name
* - url
* properties:
* id:
* type: string
* description: Unique identifier for the webhook
* example: 1357158568008091264
* name:
* type: string
* description: Name/title of the webhook
* example: Webhook Updates
* url:
* type: string
* description: URL endpoint for the webhook
* example: https://example.service.com/planka
* accessToken:
* type: string
* nullable: true
* description: Access token for webhook authentication
* example: secret_token_123
* events:
* type: array
* items:
* type: string
* description: List of events that trigger the webhook
* example: [cardCreate, cardUpdate, cardDelete]
* excludedEvents:
* type: array
* items:
* type: string
* description: List of events excluded from the webhook
* example: [userCreate, userUpdate, userDelete]
* createdAt:
* type: string
* format: date-time
* description: When the webhook was created
* example: 2024-03-01T12:00:00.000Z
* updatedAt:
* type: string
* format: date-time
* description: When the webhook was last updated
* example: 2024-03-02T15:30:00.000Z
*/
const Events = {
ACTION_CREATE: 'actionCreate',